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>
#include <stdlib.h>
#define N_MAX 100

int cmpint(const void *a, const void *b)
{
  return * (int*) a - * (int*) b;
}

int main()
{
  static int score[N_MAX];
  int n, i, sum;
  for (;;) {
    scanf("%d", &n);
    if (n == 0) break;
    for (i = 0; i < n; i++) {
      scanf("%d", &score[i]);
    }
    qsort(score, n, sizeof(int), cmpint);
    sum = 0;
    for (i = 1; i <= n - 2; i++) {
      sum += score[i];
    }
    printf("%d\n", sum / (n - 2));
  }
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmpint
	.type	cmpint, @function
cmpint:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	cmpint, .-cmpint
	.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:
.LFB40:
	.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
	leaq	cmpint(%rip), %r14
	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
	leaq	score.0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	testl	%esi, %esi
	je	.L4
	jle	.L5
	leaq	score.0(%rip), %r13
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	addq	$4, %r13
	cmpl	%r15d, %esi
	jg	.L6
.L5:
	movq	%r14, %rcx
	movl	$4, %edx
	movq	%rbp, %rdi
	call	qsort@PLT
	movl	4(%rsp), %eax
	leal	-1(%rax), %esi
	cmpl	$1, %esi
	jle	.L13
	leal	-2(%rax), %ecx
	subl	$3, %eax
	cmpl	$2, %eax
	jbe	.L14
	movl	%ecx, %edx
	leaq	4+score.0(%rip), %rax
	pxor	%xmm0, %xmm0
	shrl	$2, %edx
	leaq	16(%rax), %rdi
	subl	$1, %edx
	salq	$4, %rdx
	addq	%rdi, %rdx
	.p2align 4,,10
	.p2align 3
.L9:
	movdqu	(%rax), %xmm2
	addq	$16, %rax
	paddd	%xmm2, %xmm0
	cmpq	%rdx, %rax
	jne	.L9
	movdqa	%xmm0, %xmm1
	movl	%ecx, %edi
	psrldq	$8, %xmm1
	andl	$-4, %edi
	paddd	%xmm1, %xmm0
	leal	1(%rdi), %edx
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	cmpl	%ecx, %edi
	je	.L10
.L8:
	movslq	%edx, %rdi
	addl	0(%rbp,%rdi,4), %eax
	leal	1(%rdx), %edi
	cmpl	%esi, %edi
	jge	.L10
	movslq	%edi, %rdi
	addl	$2, %edx
	addl	0(%rbp,%rdi,4), %eax
	cmpl	%edx, %esi
	jle	.L10
	movslq	%edx, %rdx
	addl	0(%rbp,%rdx,4), %eax
.L10:
	cltd
	idivl	%ecx
.L7:
	movl	%eax, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L4:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$24, %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
.L13:
	.cfi_restore_state
	xorl	%eax, %eax
	jmp	.L7
.L14:
	xorl	%eax, %eax
	movl	$1, %edx
	jmp	.L8
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.local	score.0
	.comm	score.0,400,32
	.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
	.p2align 4
	.globl	cmpint
	.type	cmpint, @function
cmpint:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	cmpint, .-cmpint
	.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:
.LFB40:
	.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
	leaq	cmpint(%rip), %r14
	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
	leaq	score.0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	testl	%esi, %esi
	je	.L4
	jle	.L5
	leaq	score.0(%rip), %r13
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	addq	$4, %r13
	cmpl	%r15d, %esi
	jg	.L6
.L5:
	movq	%r14, %rcx
	movl	$4, %edx
	movq	%rbp, %rdi
	call	qsort@PLT
	movl	4(%rsp), %eax
	leal	-1(%rax), %esi
	cmpl	$1, %esi
	jle	.L13
	leal	-2(%rax), %ecx
	subl	$3, %eax
	cmpl	$2, %eax
	jbe	.L14
	movl	%ecx, %edx
	leaq	4+score.0(%rip), %rax
	pxor	%xmm0, %xmm0
	shrl	$2, %edx
	leaq	16(%rax), %rdi
	subl	$1, %edx
	salq	$4, %rdx
	addq	%rdi, %rdx
	.p2align 4,,10
	.p2align 3
.L9:
	movdqu	(%rax), %xmm2
	addq	$16, %rax
	paddd	%xmm2, %xmm0
	cmpq	%rdx, %rax
	jne	.L9
	movdqa	%xmm0, %xmm1
	movl	%ecx, %edi
	psrldq	$8, %xmm1
	andl	$-4, %edi
	paddd	%xmm1, %xmm0
	leal	1(%rdi), %edx
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	cmpl	%ecx, %edi
	je	.L10
.L8:
	movslq	%edx, %rdi
	addl	0(%rbp,%rdi,4), %eax
	leal	1(%rdx), %edi
	cmpl	%esi, %edi
	jge	.L10
	movslq	%edi, %rdi
	addl	$2, %edx
	addl	0(%rbp,%rdi,4), %eax
	cmpl	%edx, %esi
	jle	.L10
	movslq	%edx, %rdx
	addl	0(%rbp,%rdx,4), %eax
.L10:
	cltd
	idivl	%ecx
.L7:
	movl	%eax, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L4:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$24, %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
.L13:
	.cfi_restore_state
	xorl	%eax, %eax
	jmp	.L7
.L14:
	xorl	%eax, %eax
	movl	$1, %edx
	jmp	.L8
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.local	score.0
	.comm	score.0,400,32
	.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
	.p2align 4
	.globl	cmpint
	.type	cmpint, @function
cmpint:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	cmpint, .-cmpint
	.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:
.LFB40:
	.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
	leaq	cmpint(%rip), %r14
	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
	leaq	score.0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	testl	%esi, %esi
	je	.L4
	jle	.L5
	leaq	score.0(%rip), %r13
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	addq	$4, %r13
	cmpl	%r15d, %esi
	jg	.L6
.L5:
	movq	%r14, %rcx
	movl	$4, %edx
	movq	%rbp, %rdi
	call	qsort@PLT
	movl	4(%rsp), %eax
	leal	-1(%rax), %esi
	cmpl	$1, %esi
	jle	.L13
	leal	-2(%rax), %ecx
	subl	$3, %eax
	cmpl	$2, %eax
	jbe	.L14
	movl	%ecx, %edx
	leaq	4+score.0(%rip), %rax
	pxor	%xmm0, %xmm0
	shrl	$2, %edx
	leaq	16(%rax), %rdi
	subl	$1, %edx
	salq	$4, %rdx
	addq	%rdi, %rdx
	.p2align 4,,10
	.p2align 3
.L9:
	movdqu	(%rax), %xmm2
	addq	$16, %rax
	paddd	%xmm2, %xmm0
	cmpq	%rdx, %rax
	jne	.L9
	movdqa	%xmm0, %xmm1
	movl	%ecx, %edi
	psrldq	$8, %xmm1
	andl	$-4, %edi
	paddd	%xmm1, %xmm0
	leal	1(%rdi), %edx
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	cmpl	%ecx, %edi
	je	.L10
.L8:
	movslq	%edx, %rdi
	addl	0(%rbp,%rdi,4), %eax
	leal	1(%rdx), %edi
	cmpl	%esi, %edi
	jge	.L10
	movslq	%edi, %rdi
	addl	$2, %edx
	addl	0(%rbp,%rdi,4), %eax
	cmpl	%edx, %esi
	jle	.L10
	movslq	%edx, %rdx
	addl	0(%rbp,%rdx,4), %eax
.L10:
	cltd
	idivl	%ecx
.L7:
	movl	%eax, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L4:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$24, %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
.L13:
	.cfi_restore_state
	xorl	%eax, %eax
	jmp	.L7
.L14:
	xorl	%eax, %eax
	movl	$1, %edx
	jmp	.L8
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.local	score.0
	.comm	score.0,400,32
	.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>
#include <stdlib.h>
#define N_MAX 100

int cmpint(const void *a, const void *b)
{
  return * (int*) a - * (int*) b;
}

int main()
{
  static int score[N_MAX];
  int n, i, sum;
  for (;;) {
    scanf("%d", &n);
    if (n == 0) break;
    for (i = 0; i < n; i++) {
      scanf("%d", &score[i]);
    }
    qsort(score, n, sizeof(int), cmpint);
    sum = 0;
    for (i = 1; i <= n - 2; i++) {
      sum += score[i];
    }
    printf("%d\n", sum / (n - 2));
  }
  return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <stdlib.h>
#define N_MAX 100

int cmpint(const void *a, const void *b)
{
  return * (int*) a - * (int*) b;
}

int main()
{
  static int score[N_MAX];
  int n, i, sum;
  for (;;) {
    scanf("%d", &n);
    if (n == 0) break;
    for (i = 0; i < n; i++) {
      scanf("%d", &score[i]);
    }
    qsort(score, n, sizeof(int), cmpint);
    sum = 0;
    for (i = 1; i <= n - 2; i++) {
      sum += score[i];
    }
    printf("%d\n", sum / (n - 2));
  }
  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>
#include <stdlib.h>
#define N_MAX 100

int cmpint(const void *a, const void *b)
{
  return * (int*) a - * (int*) b;
}

int main()
{
  static int score[N_MAX];
  int n, i, sum;
  for (;;) {
    scanf("%d", &n);
    if (n == 0) break;
    for (i = 0; i < n; i++) {
      scanf("%d", &score[i]);
    }
    qsort(score, n, sizeof(int), cmpint);
    sum = 0;
    for (i = 1; i <= n - 2; i++) {
      sum += score[i];
    }
    printf("%d\n", sum / (n - 2));
  }
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmpint
	.type	cmpint, @function
cmpint:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	cmpint, .-cmpint
	.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:
.LFB40:
	.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
	leaq	cmpint(%rip), %r14
	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
	leaq	score.0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	testl	%esi, %esi
	je	.L4
	jle	.L5
	leaq	score.0(%rip), %r13
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	addq	$4, %r13
	cmpl	%r15d, %esi
	jg	.L6
.L5:
	movq	%r14, %rcx
	movl	$4, %edx
	movq	%rbp, %rdi
	call	qsort@PLT
	movl	4(%rsp), %eax
	leal	-1(%rax), %esi
	cmpl	$1, %esi
	jle	.L13
	leal	-2(%rax), %ecx
	subl	$3, %eax
	cmpl	$2, %eax
	jbe	.L14
	movl	%ecx, %edx
	leaq	4+score.0(%rip), %rax
	pxor	%xmm0, %xmm0
	shrl	$2, %edx
	leaq	16(%rax), %rdi
	subl	$1, %edx
	salq	$4, %rdx
	addq	%rdi, %rdx
	.p2align 4,,10
	.p2align 3
.L9:
	movdqu	(%rax), %xmm2
	addq	$16, %rax
	paddd	%xmm2, %xmm0
	cmpq	%rdx, %rax
	jne	.L9
	movdqa	%xmm0, %xmm1
	movl	%ecx, %edi
	psrldq	$8, %xmm1
	andl	$-4, %edi
	paddd	%xmm1, %xmm0
	leal	1(%rdi), %edx
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	cmpl	%ecx, %edi
	je	.L10
.L8:
	movslq	%edx, %rdi
	addl	0(%rbp,%rdi,4), %eax
	leal	1(%rdx), %edi
	cmpl	%esi, %edi
	jge	.L10
	movslq	%edi, %rdi
	addl	$2, %edx
	addl	0(%rbp,%rdi,4), %eax
	cmpl	%edx, %esi
	jle	.L10
	movslq	%edx, %rdx
	addl	0(%rbp,%rdx,4), %eax
.L10:
	cltd
	idivl	%ecx
.L7:
	movl	%eax, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L4:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$24, %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
.L13:
	.cfi_restore_state
	xorl	%eax, %eax
	jmp	.L7
.L14:
	xorl	%eax, %eax
	movl	$1, %edx
	jmp	.L8
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.local	score.0
	.comm	score.0,400,32
	.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
	.p2align 4
	.globl	cmpint
	.type	cmpint, @function
cmpint:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	cmpint, .-cmpint
	.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:
.LFB40:
	.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
	leaq	cmpint(%rip), %r14
	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
	leaq	score.0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	testl	%esi, %esi
	je	.L4
	jle	.L5
	leaq	score.0(%rip), %r13
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	addq	$4, %r13
	cmpl	%r15d, %esi
	jg	.L6
.L5:
	movq	%r14, %rcx
	movl	$4, %edx
	movq	%rbp, %rdi
	call	qsort@PLT
	movl	4(%rsp), %eax
	leal	-1(%rax), %esi
	cmpl	$1, %esi
	jle	.L13
	leal	-2(%rax), %ecx
	subl	$3, %eax
	cmpl	$2, %eax
	jbe	.L14
	movl	%ecx, %edx
	leaq	4+score.0(%rip), %rax
	pxor	%xmm0, %xmm0
	shrl	$2, %edx
	leaq	16(%rax), %rdi
	subl	$1, %edx
	salq	$4, %rdx
	addq	%rdi, %rdx
	.p2align 4,,10
	.p2align 3
.L9:
	movdqu	(%rax), %xmm2
	addq	$16, %rax
	paddd	%xmm2, %xmm0
	cmpq	%rdx, %rax
	jne	.L9
	movdqa	%xmm0, %xmm1
	movl	%ecx, %edi
	psrldq	$8, %xmm1
	andl	$-4, %edi
	paddd	%xmm1, %xmm0
	leal	1(%rdi), %edx
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	cmpl	%ecx, %edi
	je	.L10
.L8:
	movslq	%edx, %rdi
	addl	0(%rbp,%rdi,4), %eax
	leal	1(%rdx), %edi
	cmpl	%esi, %edi
	jge	.L10
	movslq	%edi, %rdi
	addl	$2, %edx
	addl	0(%rbp,%rdi,4), %eax
	cmpl	%edx, %esi
	jle	.L10
	movslq	%edx, %rdx
	addl	0(%rbp,%rdx,4), %eax
.L10:
	cltd
	idivl	%ecx
.L7:
	movl	%eax, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L4:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$24, %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
.L13:
	.cfi_restore_state
	xorl	%eax, %eax
	jmp	.L7
.L14:
	xorl	%eax, %eax
	movl	$1, %edx
	jmp	.L8
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.local	score.0
	.comm	score.0,400,32
	.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:
```