Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
int main(){
  int n,b,c,i,s;
  int min = 1000;
  int max = 0;
  int T[20];
  b = 0;
  T[b] = 0;
  while(1){
    scanf("%d",&n);
    if(n == 0)break;
    for(i=0;i<n;i++){
      scanf("%d",&s);
      if(s >= max) max = s;
      if(s <= min) min = s;
      T[b] += s;
    }
    T[b] = (T[b] - (min + max))/ (i - 2);
    b++;
    min = 1000;
    max = 0;
    i = 0;
    T[b] = 0;
  }
  for(c = 0; c<b; c++){
    printf("%d\n",T[c]);
  }
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$152, %rsp
	.cfi_def_cfa_offset 208
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	48(%rsp), %rax
	movl	$0, 48(%rsp)
	movq	%rax, 8(%rsp)
	movq	%rax, %r14
	leaq	40(%rsp), %rax
	movl	$0, 20(%rsp)
	movq	%rax, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L7:
	movq	24(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %edx
	testl	%edx, %edx
	je	.L2
	jle	.L18
	xorl	%r12d, %r12d
	movl	$1000, %r13d
	xorl	%r15d, %r15d
	leaq	44(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	xorl	%eax, %eax
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	movl	%r15d, %esi
	cmpl	%eax, %r12d
	cmovl	%eax, %r12d
	cmpl	%eax, %r13d
	cmovg	%eax, %r13d
	addl	(%r14), %eax
	addl	$1, %r15d
	movl	%eax, (%r14)
	cmpl	%r15d, 40(%rsp)
	jg	.L3
	leal	(%r12,%r13), %edx
	subl	$1, %esi
.L6:
	subl	%edx, %eax
	movl	$0, 4(%r14)
	addq	$4, %r14
	cltd
	addl	$1, 20(%rsp)
	idivl	%esi
	movl	%eax, -4(%r14)
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L2:
	movl	20(%rsp), %eax
	testl	%eax, %eax
	je	.L9
	movl	20(%rsp), %eax
	movq	8(%rsp), %rcx
	leaq	.LC1(%rip), %rbp
	subl	$1, %eax
	leaq	4(%rcx), %rbx
	leaq	(%rbx,%rax,4), %r13
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L19:
	addq	$4, %rbx
.L8:
	movq	8(%rsp), %rax
	movq	%rbp, %rsi
	movl	$1, %edi
	movl	(%rax), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	%rbx, 8(%rsp)
	cmpq	%r13, %rbx
	jne	.L19
.L9:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$152, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	movl	(%r14), %eax
	movl	$-2, %esi
	movl	$1000, %edx
	jmp	.L6
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$152, %rsp
	.cfi_def_cfa_offset 208
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	48(%rsp), %rax
	movl	$0, 48(%rsp)
	movq	%rax, 8(%rsp)
	movq	%rax, %r14
	leaq	40(%rsp), %rax
	movl	$0, 20(%rsp)
	movq	%rax, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L7:
	movq	24(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %edx
	testl	%edx, %edx
	je	.L2
	jle	.L18
	xorl	%r12d, %r12d
	movl	$1000, %r13d
	xorl	%r15d, %r15d
	leaq	44(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	xorl	%eax, %eax
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	movl	%r15d, %esi
	cmpl	%eax, %r12d
	cmovl	%eax, %r12d
	cmpl	%eax, %r13d
	cmovg	%eax, %r13d
	addl	(%r14), %eax
	addl	$1, %r15d
	movl	%eax, (%r14)
	cmpl	%r15d, 40(%rsp)
	jg	.L3
	leal	(%r12,%r13), %edx
	subl	$1, %esi
.L6:
	subl	%edx, %eax
	movl	$0, 4(%r14)
	addq	$4, %r14
	cltd
	addl	$1, 20(%rsp)
	idivl	%esi
	movl	%eax, -4(%r14)
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L2:
	movl	20(%rsp), %eax
	testl	%eax, %eax
	je	.L9
	movl	20(%rsp), %eax
	movq	8(%rsp), %rcx
	leaq	.LC1(%rip), %rbp
	subl	$1, %eax
	leaq	4(%rcx), %rbx
	leaq	(%rbx,%rax,4), %r13
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L19:
	addq	$4, %rbx
.L8:
	movq	8(%rsp), %rax
	movq	%rbp, %rsi
	movl	$1, %edi
	movl	(%rax), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	%rbx, 8(%rsp)
	cmpq	%r13, %rbx
	jne	.L19
.L9:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$152, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	movl	(%r14), %eax
	movl	$-2, %esi
	movl	$1000, %edx
	jmp	.L6
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```
rule
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$152, %rsp
	.cfi_def_cfa_offset 208
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	48(%rsp), %rax
	movl	$0, 48(%rsp)
	movq	%rax, 8(%rsp)
	movq	%rax, %r14
	leaq	40(%rsp), %rax
	movl	$0, 20(%rsp)
	movq	%rax, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L7:
	movq	24(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %edx
	testl	%edx, %edx
	je	.L2
	jle	.L18
	xorl	%r12d, %r12d
	movl	$1000, %r13d
	xorl	%r15d, %r15d
	leaq	44(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	xorl	%eax, %eax
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	movl	%r15d, %esi
	cmpl	%eax, %r12d
	cmovl	%eax, %r12d
	cmpl	%eax, %r13d
	cmovg	%eax, %r13d
	addl	(%r14), %eax
	addl	$1, %r15d
	movl	%eax, (%r14)
	cmpl	%r15d, 40(%rsp)
	jg	.L3
	leal	(%r12,%r13), %edx
	subl	$1, %esi
.L6:
	subl	%edx, %eax
	movl	$0, 4(%r14)
	addq	$4, %r14
	cltd
	addl	$1, 20(%rsp)
	idivl	%esi
	movl	%eax, -4(%r14)
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L2:
	movl	20(%rsp), %eax
	testl	%eax, %eax
	je	.L9
	movl	20(%rsp), %eax
	movq	8(%rsp), %rcx
	leaq	.LC1(%rip), %rbp
	subl	$1, %eax
	leaq	4(%rcx), %rbx
	leaq	(%rbx,%rax,4), %r13
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L19:
	addq	$4, %rbx
.L8:
	movq	8(%rsp), %rax
	movq	%rbp, %rsi
	movl	$1, %edi
	movl	(%rax), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	%rbx, 8(%rsp)
	cmpq	%r13, %rbx
	jne	.L19
.L9:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$152, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	movl	(%r14), %eax
	movl	$-2, %esi
	movl	$1000, %edx
	jmp	.L6
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```
```c
#include <stdio.h>
int main(){
  int n,b,c,i,s;
  int min = 1000;
  int max = 0;
  int T[20];
  b = 0;
  T[b] = 0;
  while(1){
    scanf("%d",&n);
    if(n == 0)break;
    for(i=0;i<n;i++){
      scanf("%d",&s);
      if(s >= max) max = s;
      if(s <= min) min = s;
      T[b] += s;
    }
    T[b] = (T[b] - (min + max))/ (i - 2);
    b++;
    min = 1000;
    max = 0;
    i = 0;
    T[b] = 0;
  }
  for(c = 0; c<b; c++){
    printf("%d\n",T[c]);
  }
  return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
int main(){
  int n,b,c,i,s;
  int min = 1000;
  int max = 0;
  int T[20];
  b = 0;
  T[b] = 0;
  while(1){
    scanf("%d",&n);
    if(n == 0)break;
    for(i=0;i<n;i++){
      scanf("%d",&s);
      if(s >= max) max = s;
      if(s <= min) min = s;
      T[b] += s;
    }
    T[b] = (T[b] - (min + max))/ (i - 2);
    b++;
    min = 1000;
    max = 0;
    i = 0;
    T[b] = 0;
  }
  for(c = 0; c<b; c++){
    printf("%d\n",T[c]);
  }
  return 0;
}```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

3
1000
342
0
5
2
2
9
11
932
5
300
1000
0
200
400
8
353
242
708
274
283
132
402
523
0
 3
1000
342
0
5
0
2
9
11
932
5
300
1000
0
200
400
8
353
242
402
274
283
132
402
523
0
 3
1000
342
0
5
2
2
9
11
932
5
300
1000
0
200
400
8
297
242
924
274
283
132
402
523
0
 3
1000
342
0
5
2
2
9
11
932
5
300
1000
0
200
400
8
297
242
924
274
5
132
402
523
0
 3
1000
342
0
5
0
2
9
11
932
5
300
1000
0
200
685
8
353
242
402
274
283
31
402
523
0
 3
1000
342
0
5
2
2
9
11
932
5
300
1000
0
200
400
8
297
242
924
274
5
132
531
523
0
 3
1000
342
0
5
0
2
9
11
932
5
300
1000
0
200
685
8
353
143
402
274
283
31
402
523
0
 3
1000
342
0
5
2
2
9
11
932
5
300
1000
0
200
400
8
203
242
924
274
5
132
531
523
0
 3
1000
342
0
5
2
2
9
11
932
5
300
1000
0
200
479
8
353
242
402
274
283
132
402
523
0
 3
1000
342
0
5
2
2
9
11
932
5
300
1000
0
200
400
8
353
242
708
274
283
132
13
523
0

342
7
300
346
 342
7
300
326
 342
7
300
336
 342
7
300
311
 342
7
395
326
 342
7
300
333
 342
7
395
309
 342
7
300
317
 342
7
326
326
 342
7
300
301

Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
int main(){
  int n,b,c,i,s;
  int min = 1000;
  int max = 0;
  int T[20];
  b = 0;
  T[b] = 0;
  while(1){
    scanf("%d",&n);
    if(n == 0)break;
    for(i=0;i<n;i++){
      scanf("%d",&s);
      if(s >= max) max = s;
      if(s <= min) min = s;
      T[b] += s;
    }
    T[b] = (T[b] - (min + max))/ (i - 2);
    b++;
    min = 1000;
    max = 0;
    i = 0;
    T[b] = 0;
  }
  for(c = 0; c<b; c++){
    printf("%d\n",T[c]);
  }
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$152, %rsp
	.cfi_def_cfa_offset 208
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	48(%rsp), %rax
	movl	$0, 48(%rsp)
	movq	%rax, 8(%rsp)
	movq	%rax, %r14
	leaq	40(%rsp), %rax
	movl	$0, 20(%rsp)
	movq	%rax, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L7:
	movq	24(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %edx
	testl	%edx, %edx
	je	.L2
	jle	.L18
	xorl	%r12d, %r12d
	movl	$1000, %r13d
	xorl	%r15d, %r15d
	leaq	44(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	xorl	%eax, %eax
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	movl	%r15d, %esi
	cmpl	%eax, %r12d
	cmovl	%eax, %r12d
	cmpl	%eax, %r13d
	cmovg	%eax, %r13d
	addl	(%r14), %eax
	addl	$1, %r15d
	movl	%eax, (%r14)
	cmpl	%r15d, 40(%rsp)
	jg	.L3
	leal	(%r12,%r13), %edx
	subl	$1, %esi
.L6:
	subl	%edx, %eax
	movl	$0, 4(%r14)
	addq	$4, %r14
	cltd
	addl	$1, 20(%rsp)
	idivl	%esi
	movl	%eax, -4(%r14)
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L2:
	movl	20(%rsp), %eax
	testl	%eax, %eax
	je	.L9
	movl	20(%rsp), %eax
	movq	8(%rsp), %rcx
	leaq	.LC1(%rip), %rbp
	subl	$1, %eax
	leaq	4(%rcx), %rbx
	leaq	(%rbx,%rax,4), %r13
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L19:
	addq	$4, %rbx
.L8:
	movq	8(%rsp), %rax
	movq	%rbp, %rsi
	movl	$1, %edi
	movl	(%rax), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	%rbx, 8(%rsp)
	cmpq	%r13, %rbx
	jne	.L19
.L9:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$152, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	movl	(%r14), %eax
	movl	$-2, %esi
	movl	$1000, %edx
	jmp	.L6
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$152, %rsp
	.cfi_def_cfa_offset 208
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	48(%rsp), %rax
	movl	$0, 48(%rsp)
	movq	%rax, 8(%rsp)
	movq	%rax, %r14
	leaq	40(%rsp), %rax
	movl	$0, 20(%rsp)
	movq	%rax, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L7:
	movq	24(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %edx
	testl	%edx, %edx
	je	.L2
	jle	.L18
	xorl	%r12d, %r12d
	movl	$1000, %r13d
	xorl	%r15d, %r15d
	leaq	44(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	xorl	%eax, %eax
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	movl	%r15d, %esi
	cmpl	%eax, %r12d
	cmovl	%eax, %r12d
	cmpl	%eax, %r13d
	cmovg	%eax, %r13d
	addl	(%r14), %eax
	addl	$1, %r15d
	movl	%eax, (%r14)
	cmpl	%r15d, 40(%rsp)
	jg	.L3
	leal	(%r12,%r13), %edx
	subl	$1, %esi
.L6:
	subl	%edx, %eax
	movl	$0, 4(%r14)
	addq	$4, %r14
	cltd
	addl	$1, 20(%rsp)
	idivl	%esi
	movl	%eax, -4(%r14)
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L2:
	movl	20(%rsp), %eax
	testl	%eax, %eax
	je	.L9
	movl	20(%rsp), %eax
	movq	8(%rsp), %rcx
	leaq	.LC1(%rip), %rbp
	subl	$1, %eax
	leaq	4(%rcx), %rbx
	leaq	(%rbx,%rax,4), %r13
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L19:
	addq	$4, %rbx
.L8:
	movq	8(%rsp), %rax
	movq	%rbp, %rsi
	movl	$1, %edi
	movl	(%rax), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	%rbx, 8(%rsp)
	cmpq	%r13, %rbx
	jne	.L19
.L9:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$152, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	movl	(%r14), %eax
	movl	$-2, %esi
	movl	$1000, %edx
	jmp	.L6
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```