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>
#include<string.h>
typedef struct{
  char name[21];
  int sc;
  int input;
}score;
int cmp(const void *a,const void *b){
  int c=(*(score *)b).sc-(*(score *)a).sc;
  return c?c:(*(score *)a).input-(*(score *)b).input;
}
int main(){
  int i,n,win,lose,draw,fa;
  char name[21];
  score ss[10];
  fa=1;
  do{
    scanf("%d",&n);
    if(!n) break;
    if(!fa){
      printf("\n");
    }
    for(i=0;i<n;i++){
      scanf("%s %d %d %d",name,&win,&lose,&draw);
      strcpy(ss[i].name,name);
      ss[i].sc=win*3+draw;
      ss[i].input=i;
    }
    qsort(ss,n,sizeof(score),cmp);
    for(i=0;i<n;i++) printf("%s,%d\n",ss[i].name,ss[i].sc);
    fa=0;
  }while(1);
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB51:
	.cfi_startproc
	endbr64
	movl	24(%rsi), %eax
	subl	24(%rdi), %eax
	jne	.L1
	movl	28(%rdi), %eax
	subl	28(%rsi), %eax
.L1:
	ret
	.cfi_endproc
.LFE51:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s %d %d %d"
.LC2:
	.string	"%s,%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.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
	movl	$1, %ebx
	subq	$392, %rsp
	.cfi_def_cfa_offset 448
	movq	%fs:40, %rax
	movq	%rax, 376(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rax
	movq	%rax, 8(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L10:
	movq	8(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	16(%rsp), %rsi
	testl	%esi, %esi
	je	.L5
	testl	%ebx, %ebx
	je	.L20
.L6:
	testl	%esi, %esi
	jle	.L7
	movq	(%rsp), %r13
	xorl	%r14d, %r14d
	leaq	28(%rsp), %r15
	leaq	24(%rsp), %r12
	leaq	20(%rsp), %rbp
	leaq	352(%rsp), %rbx
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r15, %r8
	movq	%r12, %rcx
	movq	%rbp, %rdx
	movq	%rbx, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%rbx, %rsi
	movq	%r13, %rdi
	movl	$21, %edx
	call	__strcpy_chk@PLT
	movl	20(%rsp), %eax
	movd	%r14d, %xmm1
	movslq	16(%rsp), %rsi
	addl	$1, %r14d
	addq	$32, %r13
	leal	(%rax,%rax,2), %eax
	addl	28(%rsp), %eax
	movd	%eax, %xmm0
	punpckldq	%xmm1, %xmm0
	movq	%xmm0, -8(%r13)
	cmpl	%r14d, %esi
	jg	.L8
.L7:
	movq	(%rsp), %rbx
	leaq	cmp(%rip), %rcx
	movl	$32, %edx
	xorl	%ebp, %ebp
	movq	%rbx, %rdi
	call	qsort@PLT
	movl	16(%rsp), %eax
	testl	%eax, %eax
	jle	.L12
	.p2align 4,,10
	.p2align 3
.L11:
	movl	24(%rbx), %ecx
	movq	%rbx, %rdx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	addl	$1, %ebp
	addq	$32, %rbx
	call	__printf_chk@PLT
	cmpl	%ebp, 16(%rsp)
	jg	.L11
.L12:
	xorl	%ebx, %ebx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L20:
	movl	$10, %edi
	call	putchar@PLT
	movslq	16(%rsp), %rsi
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	movq	376(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$392, %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
.L21:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.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
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB51:
	.cfi_startproc
	endbr64
	movl	24(%rsi), %eax
	subl	24(%rdi), %eax
	jne	.L1
	movl	28(%rdi), %eax
	subl	28(%rsi), %eax
.L1:
	ret
	.cfi_endproc
.LFE51:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s %d %d %d"
.LC2:
	.string	"%s,%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.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
	movl	$1, %ebx
	subq	$392, %rsp
	.cfi_def_cfa_offset 448
	movq	%fs:40, %rax
	movq	%rax, 376(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rax
	movq	%rax, 8(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L10:
	movq	8(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	16(%rsp), %rsi
	testl	%esi, %esi
	je	.L5
	testl	%ebx, %ebx
	je	.L20
.L6:
	testl	%esi, %esi
	jle	.L7
	movq	(%rsp), %r13
	xorl	%r14d, %r14d
	leaq	28(%rsp), %r15
	leaq	24(%rsp), %r12
	leaq	20(%rsp), %rbp
	leaq	352(%rsp), %rbx
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r15, %r8
	movq	%r12, %rcx
	movq	%rbp, %rdx
	movq	%rbx, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%rbx, %rsi
	movq	%r13, %rdi
	movl	$21, %edx
	call	__strcpy_chk@PLT
	movl	20(%rsp), %eax
	movd	%r14d, %xmm1
	movslq	16(%rsp), %rsi
	addl	$1, %r14d
	addq	$32, %r13
	leal	(%rax,%rax,2), %eax
	addl	28(%rsp), %eax
	movd	%eax, %xmm0
	punpckldq	%xmm1, %xmm0
	movq	%xmm0, -8(%r13)
	cmpl	%r14d, %esi
	jg	.L8
.L7:
	movq	(%rsp), %rbx
	leaq	cmp(%rip), %rcx
	movl	$32, %edx
	xorl	%ebp, %ebp
	movq	%rbx, %rdi
	call	qsort@PLT
	movl	16(%rsp), %eax
	testl	%eax, %eax
	jle	.L12
	.p2align 4,,10
	.p2align 3
.L11:
	movl	24(%rbx), %ecx
	movq	%rbx, %rdx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	addl	$1, %ebp
	addq	$32, %rbx
	call	__printf_chk@PLT
	cmpl	%ebp, 16(%rsp)
	jg	.L11
.L12:
	xorl	%ebx, %ebx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L20:
	movl	$10, %edi
	call	putchar@PLT
	movslq	16(%rsp), %rsi
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	movq	376(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$392, %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
.L21:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.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
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB51:
	.cfi_startproc
	endbr64
	movl	24(%rsi), %eax
	subl	24(%rdi), %eax
	jne	.L1
	movl	28(%rdi), %eax
	subl	28(%rsi), %eax
.L1:
	ret
	.cfi_endproc
.LFE51:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s %d %d %d"
.LC2:
	.string	"%s,%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.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
	movl	$1, %ebx
	subq	$392, %rsp
	.cfi_def_cfa_offset 448
	movq	%fs:40, %rax
	movq	%rax, 376(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rax
	movq	%rax, 8(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L10:
	movq	8(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	16(%rsp), %rsi
	testl	%esi, %esi
	je	.L5
	testl	%ebx, %ebx
	je	.L20
.L6:
	testl	%esi, %esi
	jle	.L7
	movq	(%rsp), %r13
	xorl	%r14d, %r14d
	leaq	28(%rsp), %r15
	leaq	24(%rsp), %r12
	leaq	20(%rsp), %rbp
	leaq	352(%rsp), %rbx
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r15, %r8
	movq	%r12, %rcx
	movq	%rbp, %rdx
	movq	%rbx, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%rbx, %rsi
	movq	%r13, %rdi
	movl	$21, %edx
	call	__strcpy_chk@PLT
	movl	20(%rsp), %eax
	movd	%r14d, %xmm1
	movslq	16(%rsp), %rsi
	addl	$1, %r14d
	addq	$32, %r13
	leal	(%rax,%rax,2), %eax
	addl	28(%rsp), %eax
	movd	%eax, %xmm0
	punpckldq	%xmm1, %xmm0
	movq	%xmm0, -8(%r13)
	cmpl	%r14d, %esi
	jg	.L8
.L7:
	movq	(%rsp), %rbx
	leaq	cmp(%rip), %rcx
	movl	$32, %edx
	xorl	%ebp, %ebp
	movq	%rbx, %rdi
	call	qsort@PLT
	movl	16(%rsp), %eax
	testl	%eax, %eax
	jle	.L12
	.p2align 4,,10
	.p2align 3
.L11:
	movl	24(%rbx), %ecx
	movq	%rbx, %rdx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	addl	$1, %ebp
	addq	$32, %rbx
	call	__printf_chk@PLT
	cmpl	%ebp, 16(%rsp)
	jg	.L11
.L12:
	xorl	%ebx, %ebx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L20:
	movl	$10, %edi
	call	putchar@PLT
	movslq	16(%rsp), %rsi
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	movq	376(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$392, %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
.L21:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.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>
#include<stdlib.h>
#include<string.h>
typedef struct{
  char name[21];
  int sc;
  int input;
}score;
int cmp(const void *a,const void *b){
  int c=(*(score *)b).sc-(*(score *)a).sc;
  return c?c:(*(score *)a).input-(*(score *)b).input;
}
int main(){
  int i,n,win,lose,draw,fa;
  char name[21];
  score ss[10];
  fa=1;
  do{
    scanf("%d",&n);
    if(!n) break;
    if(!fa){
      printf("\n");
    }
    for(i=0;i<n;i++){
      scanf("%s %d %d %d",name,&win,&lose,&draw);
      strcpy(ss[i].name,name);
      ss[i].sc=win*3+draw;
      ss[i].input=i;
    }
    qsort(ss,n,sizeof(score),cmp);
    for(i=0;i<n;i++) printf("%s,%d\n",ss[i].name,ss[i].sc);
    fa=0;
  }while(1);
  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>
#include<string.h>
typedef struct{
  char name[21];
  int sc;
  int input;
}score;
int cmp(const void *a,const void *b){
  int c=(*(score *)b).sc-(*(score *)a).sc;
  return c?c:(*(score *)a).input-(*(score *)b).input;
}
int main(){
  int i,n,win,lose,draw,fa;
  char name[21];
  score ss[10];
  fa=1;
  do{
    scanf("%d",&n);
    if(!n) break;
    if(!fa){
      printf("\n");
    }
    for(i=0;i<n;i++){
      scanf("%s %d %d %d",name,&win,&lose,&draw);
      strcpy(ss[i].name,name);
      ss[i].sc=win*3+draw;
      ss[i].input=i;
    }
    qsort(ss,n,sizeof(score),cmp);
    for(i=0;i<n;i++) printf("%s,%d\n",ss[i].name,ss[i].sc);
    fa=0;
  }while(1);
  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:

4
Japan 1 0 2
Egypt 1 2 0
Canada 0 2 1
Spain 2 0 1
3
India 0 2 0
Poland 1 0 1
Italy 1 -1 1
0
 4
Japan 1 0 2
Egypt 1 2 0
Canada 0 2 1
Spain 2 0 1
3
India 0 2 0
Poland 1 0 1
Italx 1 -1 1
0
 4
Japan 1 0 2
Egypt 1 2 0
Canada 0 2 1
niapS 2 0 1
3
India 0 2 0
Poland 1 0 1
Italy 1 1 1
0
 4
Japan 1 0 2
Egypt 1 2 0
Canada 0 2 1
Spain 2 0 1
3
India -1 2 0
Poland 1 0 1
Italx 1 -1 1
0
 4
Japan 1 0 2
Egypt 1 2 0
Caaadn 0 2 1
niapS 2 0 1
3
India 0 2 0
Poland 1 0 1
Italy 1 1 1
0
 4
Japan 1 0 2
Egypt 1 2 0
Canada 0 2 1
Spain 2 0 1
3
Jndia -1 2 0
Poland 1 0 1
Italx 1 -1 1
0
 4
Japan 1 0 2
Egypt 1 2 0
Caaadn 0 2 1
niapS 2 0 1
3
Iodia 0 2 0
Poland 1 0 1
Italy 1 1 1
0
 4
Japan 1 0 2
Egypt 1 2 0
Canada 0 2 1
Spain 1 0 1
3
Jndia -1 2 0
Poland 1 0 1
Italx 1 -1 1
0
 4
Japan 1 0 2
Egypt 1 2 0
Caaadn 0 2 1
niapS 2 0 1
3
Ioida 0 2 0
Poland 1 0 1
Italy 1 1 1
0
 4
Japan 1 0 2
Egypt 1 2 0
Caaadn 0 2 1
nibpS 2 0 1
3
Ioida 0 2 0
Poland 1 0 1
Italy 1 1 1
0

Spain,7
Japan,5
Egypt,3
Canada,1

Poland,4
Italy,4
India,0
 Spain,7
Japan,5
Egypt,3
Canada,1

Poland,4
Italx,4
India,0
 niapS,7
Japan,5
Egypt,3
Canada,1

Poland,4
Italy,4
India,0
 Spain,7
Japan,5
Egypt,3
Canada,1

Poland,4
Italx,4
India,-3
 niapS,7
Japan,5
Egypt,3
Caaadn,1

Poland,4
Italy,4
India,0
 Spain,7
Japan,5
Egypt,3
Canada,1

Poland,4
Italx,4
Jndia,-3
 niapS,7
Japan,5
Egypt,3
Caaadn,1

Poland,4
Italy,4
Iodia,0
 Japan,5
Spain,4
Egypt,3
Canada,1

Poland,4
Italx,4
Jndia,-3
 niapS,7
Japan,5
Egypt,3
Caaadn,1

Poland,4
Italy,4
Ioida,0
 nibpS,7
Japan,5
Egypt,3
Caaadn,1

Poland,4
Italy,4
Ioida,0

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>
#include<string.h>
typedef struct{
  char name[21];
  int sc;
  int input;
}score;
int cmp(const void *a,const void *b){
  int c=(*(score *)b).sc-(*(score *)a).sc;
  return c?c:(*(score *)a).input-(*(score *)b).input;
}
int main(){
  int i,n,win,lose,draw,fa;
  char name[21];
  score ss[10];
  fa=1;
  do{
    scanf("%d",&n);
    if(!n) break;
    if(!fa){
      printf("\n");
    }
    for(i=0;i<n;i++){
      scanf("%s %d %d %d",name,&win,&lose,&draw);
      strcpy(ss[i].name,name);
      ss[i].sc=win*3+draw;
      ss[i].input=i;
    }
    qsort(ss,n,sizeof(score),cmp);
    for(i=0;i<n;i++) printf("%s,%d\n",ss[i].name,ss[i].sc);
    fa=0;
  }while(1);
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB51:
	.cfi_startproc
	endbr64
	movl	24(%rsi), %eax
	subl	24(%rdi), %eax
	jne	.L1
	movl	28(%rdi), %eax
	subl	28(%rsi), %eax
.L1:
	ret
	.cfi_endproc
.LFE51:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s %d %d %d"
.LC2:
	.string	"%s,%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.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
	movl	$1, %ebx
	subq	$392, %rsp
	.cfi_def_cfa_offset 448
	movq	%fs:40, %rax
	movq	%rax, 376(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rax
	movq	%rax, 8(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L10:
	movq	8(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	16(%rsp), %rsi
	testl	%esi, %esi
	je	.L5
	testl	%ebx, %ebx
	je	.L20
.L6:
	testl	%esi, %esi
	jle	.L7
	movq	(%rsp), %r13
	xorl	%r14d, %r14d
	leaq	28(%rsp), %r15
	leaq	24(%rsp), %r12
	leaq	20(%rsp), %rbp
	leaq	352(%rsp), %rbx
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r15, %r8
	movq	%r12, %rcx
	movq	%rbp, %rdx
	movq	%rbx, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%rbx, %rsi
	movq	%r13, %rdi
	movl	$21, %edx
	call	__strcpy_chk@PLT
	movl	20(%rsp), %eax
	movd	%r14d, %xmm1
	movslq	16(%rsp), %rsi
	addl	$1, %r14d
	addq	$32, %r13
	leal	(%rax,%rax,2), %eax
	addl	28(%rsp), %eax
	movd	%eax, %xmm0
	punpckldq	%xmm1, %xmm0
	movq	%xmm0, -8(%r13)
	cmpl	%r14d, %esi
	jg	.L8
.L7:
	movq	(%rsp), %rbx
	leaq	cmp(%rip), %rcx
	movl	$32, %edx
	xorl	%ebp, %ebp
	movq	%rbx, %rdi
	call	qsort@PLT
	movl	16(%rsp), %eax
	testl	%eax, %eax
	jle	.L12
	.p2align 4,,10
	.p2align 3
.L11:
	movl	24(%rbx), %ecx
	movq	%rbx, %rdx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	addl	$1, %ebp
	addq	$32, %rbx
	call	__printf_chk@PLT
	cmpl	%ebp, 16(%rsp)
	jg	.L11
.L12:
	xorl	%ebx, %ebx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L20:
	movl	$10, %edi
	call	putchar@PLT
	movslq	16(%rsp), %rsi
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	movq	376(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$392, %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
.L21:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.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
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB51:
	.cfi_startproc
	endbr64
	movl	24(%rsi), %eax
	subl	24(%rdi), %eax
	jne	.L1
	movl	28(%rdi), %eax
	subl	28(%rsi), %eax
.L1:
	ret
	.cfi_endproc
.LFE51:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s %d %d %d"
.LC2:
	.string	"%s,%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.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
	movl	$1, %ebx
	subq	$392, %rsp
	.cfi_def_cfa_offset 448
	movq	%fs:40, %rax
	movq	%rax, 376(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rax
	movq	%rax, 8(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L10:
	movq	8(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	16(%rsp), %rsi
	testl	%esi, %esi
	je	.L5
	testl	%ebx, %ebx
	je	.L20
.L6:
	testl	%esi, %esi
	jle	.L7
	movq	(%rsp), %r13
	xorl	%r14d, %r14d
	leaq	28(%rsp), %r15
	leaq	24(%rsp), %r12
	leaq	20(%rsp), %rbp
	leaq	352(%rsp), %rbx
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r15, %r8
	movq	%r12, %rcx
	movq	%rbp, %rdx
	movq	%rbx, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%rbx, %rsi
	movq	%r13, %rdi
	movl	$21, %edx
	call	__strcpy_chk@PLT
	movl	20(%rsp), %eax
	movd	%r14d, %xmm1
	movslq	16(%rsp), %rsi
	addl	$1, %r14d
	addq	$32, %r13
	leal	(%rax,%rax,2), %eax
	addl	28(%rsp), %eax
	movd	%eax, %xmm0
	punpckldq	%xmm1, %xmm0
	movq	%xmm0, -8(%r13)
	cmpl	%r14d, %esi
	jg	.L8
.L7:
	movq	(%rsp), %rbx
	leaq	cmp(%rip), %rcx
	movl	$32, %edx
	xorl	%ebp, %ebp
	movq	%rbx, %rdi
	call	qsort@PLT
	movl	16(%rsp), %eax
	testl	%eax, %eax
	jle	.L12
	.p2align 4,,10
	.p2align 3
.L11:
	movl	24(%rbx), %ecx
	movq	%rbx, %rdx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	addl	$1, %ebp
	addq	$32, %rbx
	call	__printf_chk@PLT
	cmpl	%ebp, 16(%rsp)
	jg	.L11
.L12:
	xorl	%ebx, %ebx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L20:
	movl	$10, %edi
	call	putchar@PLT
	movslq	16(%rsp), %rsi
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	movq	376(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$392, %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
.L21:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.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:
```