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

```c
#include<stdio.h>

void sort(int *a);

int main(void)
{
	int n,k;
	int i,j;
	char tmp[11];
	int cnt[26] = {0};
	int result= 0;
	
	scanf("%d %d\n", &n, &k);
	
	for(i = 0; i < n; i++){
		scanf("%s", tmp);
		cnt[tmp[0]-'A']++;
	}
	
	while(1){
		sort(cnt);
		for(i = 0; i < k;i++){
			cnt[i]--;
			if(cnt[i] < 0){
				printf("%d\n", result);
				return 0;
			}
		}
		result++;
	}
	
}

void sort(int *a){
	int i,j;
	int tmp;
	int max,num;
	
	for(i = 0; i < 26; i++){
			max= 0;
			num = i;
		for(j = i; j < 26; j++){
			if(a[j]>max){
				num = j;
				max = a[j];
			}
		}
		tmp = a[num];
		a[num] = a[i];
		a[i] = tmp;
	}
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d\n"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$144, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-128(%rbp), %rdx
	movl	$0, %eax
	movl	$13, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$0, -132(%rbp)
	leaq	-140(%rbp), %rdx
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -136(%rbp)
	jmp	.L2
.L3:
	leaq	-19(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	-19(%rbp), %eax
	movsbl	%al, %eax
	subl	$65, %eax
	movslq	%eax, %rdx
	movl	-128(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -128(%rbp,%rax,4)
	addl	$1, -136(%rbp)
.L2:
	movl	-144(%rbp), %eax
	cmpl	%eax, -136(%rbp)
	jl	.L3
.L8:
	leaq	-128(%rbp), %rax
	movq	%rax, %rdi
	call	sort
	movl	$0, -136(%rbp)
	jmp	.L4
.L7:
	movl	-136(%rbp), %eax
	cltq
	movl	-128(%rbp,%rax,4), %eax
	leal	-1(%rax), %edx
	movl	-136(%rbp), %eax
	cltq
	movl	%edx, -128(%rbp,%rax,4)
	movl	-136(%rbp), %eax
	cltq
	movl	-128(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jns	.L5
	movl	-132(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	jmp	.L10
.L5:
	addl	$1, -136(%rbp)
.L4:
	movl	-140(%rbp), %eax
	cmpl	%eax, -136(%rbp)
	jl	.L7
	addl	$1, -132(%rbp)
	jmp	.L8
.L10:
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	sort
	.type	sort, @function
sort:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -40(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L12
.L16:
	movl	$0, -12(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -8(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L13
.L15:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -12(%rbp)
	jge	.L14
	movl	-16(%rbp), %eax
	movl	%eax, -8(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -12(%rbp)
.L14:
	addl	$1, -16(%rbp)
.L13:
	cmpl	$25, -16(%rbp)
	jle	.L15
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -20(%rbp)
.L12:
	cmpl	$25, -20(%rbp)
	jle	.L16
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	sort, .-sort
	.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.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d\n"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movl	$13, %ecx
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$152, %rsp
	.cfi_def_cfa_offset 192
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	leaq	12(%rsp), %rdx
	movq	%rbx, %rdi
	leaq	8(%rsp), %rsi
	rep stosq
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	xorl	%r13d, %r13d
	leaq	125(%rsp), %r12
	leaq	.LC1(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	movsbl	125(%rsp), %eax
	subl	$65, %eax
	cltq
	addl	$1, 16(%rsp,%rax,4)
	cmpl	%r13d, 8(%rsp)
	jg	.L3
.L2:
	movl	12(%rsp), %r10d
	xorl	%r9d, %r9d
	leal	-1(%r10), %eax
	leaq	20(%rsp,%rax,4), %r8
.L11:
	xorl	%edi, %edi
	.p2align 4,,10
	.p2align 3
.L4:
	movslq	%edi, %rsi
	movq	%rdi, %rax
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%rbx,%rax,4), %edx
	cmpl	%edx, %ecx
	jge	.L7
	movslq	%eax, %rsi
	movl	%edx, %ecx
.L7:
	addq	$1, %rax
	cmpl	$26, %eax
	jne	.L8
	leaq	(%rbx,%rsi,4), %rax
	movl	(%rbx,%rdi,4), %ecx
	movl	(%rax), %edx
	movl	%ecx, (%rax)
	movl	%edx, (%rbx,%rdi,4)
	addq	$1, %rdi
	cmpq	$26, %rdi
	jne	.L4
	movq	%rbx, %rdx
	testl	%r10d, %r10d
	jg	.L5
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L10:
	addq	$4, %rdx
	cmpq	%rdx, %r8
	je	.L6
.L5:
	subl	$1, (%rdx)
	jns	.L10
	xorl	%eax, %eax
	movl	%r9d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$152, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	addl	$1, %r9d
	jmp	.L11
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.text
	.p2align 4
	.globl	sort
	.type	sort, @function
sort:
.LFB24:
	.cfi_startproc
	endbr64
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L27:
	movslq	%r8d, %rsi
	movq	%r8, %rax
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L26:
	movl	(%rdi,%rax,4), %edx
	cmpl	%edx, %ecx
	jge	.L25
	movslq	%eax, %rsi
	movl	%edx, %ecx
.L25:
	addq	$1, %rax
	cmpl	$26, %eax
	jne	.L26
	leaq	(%rdi,%rsi,4), %rax
	movl	(%rdi,%r8,4), %ecx
	movl	(%rax), %edx
	movl	%ecx, (%rax)
	movl	%edx, (%rdi,%r8,4)
	addq	$1, %r8
	cmpq	$26, %r8
	jne	.L27
	ret
	.cfi_endproc
.LFE24:
	.size	sort, .-sort
	.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
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d\n"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movl	$13, %ecx
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$152, %rsp
	.cfi_def_cfa_offset 192
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	leaq	12(%rsp), %rdx
	movq	%rbx, %rdi
	leaq	8(%rsp), %rsi
	rep stosq
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	xorl	%r13d, %r13d
	leaq	125(%rsp), %r12
	leaq	.LC1(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	movsbl	125(%rsp), %eax
	subl	$65, %eax
	cltq
	addl	$1, 16(%rsp,%rax,4)
	cmpl	%r13d, 8(%rsp)
	jg	.L3
.L2:
	movl	12(%rsp), %r10d
	xorl	%r9d, %r9d
	leal	-1(%r10), %eax
	leaq	20(%rsp,%rax,4), %r8
.L11:
	xorl	%edi, %edi
	.p2align 4,,10
	.p2align 3
.L4:
	movslq	%edi, %rsi
	movq	%rdi, %rax
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%rbx,%rax,4), %edx
	cmpl	%edx, %ecx
	jge	.L7
	movslq	%eax, %rsi
	movl	%edx, %ecx
.L7:
	addq	$1, %rax
	cmpl	$26, %eax
	jne	.L8
	leaq	(%rbx,%rsi,4), %rax
	movl	(%rbx,%rdi,4), %ecx
	movl	(%rax), %edx
	movl	%ecx, (%rax)
	movl	%edx, (%rbx,%rdi,4)
	addq	$1, %rdi
	cmpq	$26, %rdi
	jne	.L4
	movq	%rbx, %rdx
	testl	%r10d, %r10d
	jg	.L5
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L10:
	addq	$4, %rdx
	cmpq	%rdx, %r8
	je	.L6
.L5:
	subl	$1, (%rdx)
	jns	.L10
	xorl	%eax, %eax
	movl	%r9d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$152, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	addl	$1, %r9d
	jmp	.L11
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.text
	.p2align 4
	.globl	sort
	.type	sort, @function
sort:
.LFB24:
	.cfi_startproc
	endbr64
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L27:
	movslq	%r8d, %rsi
	movq	%r8, %rax
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L26:
	movl	(%rdi,%rax,4), %edx
	cmpl	%edx, %ecx
	jge	.L25
	movslq	%eax, %rsi
	movl	%edx, %ecx
.L25:
	addq	$1, %rax
	cmpl	$26, %eax
	jne	.L26
	leaq	(%rdi,%rsi,4), %rax
	movl	(%rdi,%r8,4), %ecx
	movl	(%rax), %edx
	movl	%ecx, (%rax)
	movl	%edx, (%rdi,%r8,4)
	addq	$1, %r8
	cmpq	$26, %r8
	jne	.L27
	ret
	.cfi_endproc
.LFE24:
	.size	sort, .-sort
	.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:

#include<stdio.h>

void sort(int *a);

int main(void)
{
	int n,k;
	int i,j;
	char tmp[11];
	int cnt[26] = {0};
	int result= 0;
	
	scanf("%d %d\n", &n, &k);
	
	for(i = 0; i < n; i++){
		scanf("%s", tmp);
		cnt[tmp[0]-'A']++;
	}
	
	while(1){
		sort(cnt);
		for(i = 0; i < k;i++){
			cnt[i]--;
			if(cnt[i] < 0){
				printf("%d\n", result);
				return 0;
			}
		}
		result++;
	}
	
}

void sort(int *a){
	int i,j;
	int tmp;
	int max,num;
	
	for(i = 0; i < 26; i++){
			max= 0;
			num = i;
		for(j = i; j < 26; j++){
			if(a[j]>max){
				num = j;
				max = a[j];
			}
		}
		tmp = a[num];
		a[num] = a[i];
		a[i] = tmp;
	}
}

9 3
APPLE
ANT
ATCODER
BLOCK
BULL
BOSS
CAT
GOD
EGG
 3 2
UK
KYOUDAI
KYOTOUNIV
 3 4
UK
KYOVDAI
KYOTOUNIV
 9 3
APPLE
BNT
ATCODER
BLOCK
BULL
BOSS
CTA
DOG
EGG
 9 1
ELQPA
UNB
ATCODER
LCOLB
KLUB
OSSB
TCA
GCO
GGE
 9 2
LAPPE
BNT
RCDOETA
KCOLC
UBLM
BOSS
CT@
DOG
EGG
 9 3
APPLE
ANT
ATCODER
BLOCK
BULL
BSSO
CAT
GOD
EGG
 3 2
UK
KYOVDAI
KYOTOUNIV
 9 3
APPLE
ANT
ATCODER
BLOCK
BULK
BSSO
CAT
GOD
EGG
 9 3
APPLE
ANT
ATCODER
BLOCK
BULK
OSSB
CAT
GOD
EGG

3
 1
 0
 2
 9
 4
 3
 1
 3
 3

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

```c
#include<stdio.h>

void sort(int *a);

int main(void)
{
	int n,k;
	int i,j;
	char tmp[11];
	int cnt[26] = {0};
	int result= 0;
	
	scanf("%d %d\n", &n, &k);
	
	for(i = 0; i < n; i++){
		scanf("%s", tmp);
		cnt[tmp[0]-'A']++;
	}
	
	while(1){
		sort(cnt);
		for(i = 0; i < k;i++){
			cnt[i]--;
			if(cnt[i] < 0){
				printf("%d\n", result);
				return 0;
			}
		}
		result++;
	}
	
}

void sort(int *a){
	int i,j;
	int tmp;
	int max,num;
	
	for(i = 0; i < 26; i++){
			max= 0;
			num = i;
		for(j = i; j < 26; j++){
			if(a[j]>max){
				num = j;
				max = a[j];
			}
		}
		tmp = a[num];
		a[num] = a[i];
		a[i] = tmp;
	}
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d\n"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$144, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-128(%rbp), %rdx
	movl	$0, %eax
	movl	$13, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$0, -132(%rbp)
	leaq	-140(%rbp), %rdx
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -136(%rbp)
	jmp	.L2
.L3:
	leaq	-19(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	-19(%rbp), %eax
	movsbl	%al, %eax
	subl	$65, %eax
	movslq	%eax, %rdx
	movl	-128(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -128(%rbp,%rax,4)
	addl	$1, -136(%rbp)
.L2:
	movl	-144(%rbp), %eax
	cmpl	%eax, -136(%rbp)
	jl	.L3
.L8:
	leaq	-128(%rbp), %rax
	movq	%rax, %rdi
	call	sort
	movl	$0, -136(%rbp)
	jmp	.L4
.L7:
	movl	-136(%rbp), %eax
	cltq
	movl	-128(%rbp,%rax,4), %eax
	leal	-1(%rax), %edx
	movl	-136(%rbp), %eax
	cltq
	movl	%edx, -128(%rbp,%rax,4)
	movl	-136(%rbp), %eax
	cltq
	movl	-128(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jns	.L5
	movl	-132(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	jmp	.L10
.L5:
	addl	$1, -136(%rbp)
.L4:
	movl	-140(%rbp), %eax
	cmpl	%eax, -136(%rbp)
	jl	.L7
	addl	$1, -132(%rbp)
	jmp	.L8
.L10:
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	sort
	.type	sort, @function
sort:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -40(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L12
.L16:
	movl	$0, -12(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -8(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L13
.L15:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -12(%rbp)
	jge	.L14
	movl	-16(%rbp), %eax
	movl	%eax, -8(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -12(%rbp)
.L14:
	addl	$1, -16(%rbp)
.L13:
	cmpl	$25, -16(%rbp)
	jle	.L15
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -20(%rbp)
.L12:
	cmpl	$25, -20(%rbp)
	jle	.L16
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	sort, .-sort
	.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.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d\n"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$144, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-128(%rbp), %rdx
	movl	$0, %eax
	movl	$13, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$0, -132(%rbp)
	leaq	-140(%rbp), %rdx
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -136(%rbp)
	jmp	.L2
.L3:
	leaq	-19(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	-19(%rbp), %eax
	movsbl	%al, %eax
	subl	$65, %eax
	movslq	%eax, %rdx
	movl	-128(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -128(%rbp,%rax,4)
	addl	$1, -136(%rbp)
.L2:
	movl	-144(%rbp), %eax
	cmpl	%eax, -136(%rbp)
	jl	.L3
.L8:
	leaq	-128(%rbp), %rax
	movq	%rax, %rdi
	call	sort
	movl	$0, -136(%rbp)
	jmp	.L4
.L7:
	movl	-136(%rbp), %eax
	cltq
	movl	-128(%rbp,%rax,4), %eax
	leal	-1(%rax), %edx
	movl	-136(%rbp), %eax
	cltq
	movl	%edx, -128(%rbp,%rax,4)
	movl	-136(%rbp), %eax
	cltq
	movl	-128(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jns	.L5
	movl	-132(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	jmp	.L10
.L5:
	addl	$1, -136(%rbp)
.L4:
	movl	-140(%rbp), %eax
	cmpl	%eax, -136(%rbp)
	jl	.L7
	addl	$1, -132(%rbp)
	jmp	.L8
.L10:
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	sort
	.type	sort, @function
sort:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -40(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L12
.L16:
	movl	$0, -12(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -8(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L13
.L15:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -12(%rbp)
	jge	.L14
	movl	-16(%rbp), %eax
	movl	%eax, -8(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -12(%rbp)
.L14:
	addl	$1, -16(%rbp)
.L13:
	cmpl	$25, -16(%rbp)
	jle	.L15
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -20(%rbp)
.L12:
	cmpl	$25, -20(%rbp)
	jle	.L16
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	sort, .-sort
	.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:
