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>
int MIN(int a,int b){return a<b?a:b;}
int main(){
  int n,i,d[100010]={};
  int b[30];
  char s[1000010];
  for(i=0;i<30;i++)b[i]=-1;
  for(i=1;i<100010;i++)d[i]=1e9;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%s",s);
    if(i)d[i]=d[i-1]+1;
    if(b[s[0]-'a']+1)d[i]=MIN(d[i],d[b[s[0]-'a']]);
    b[s[0]-'a']=i;
  }
  //for(i=0;i<n;i++)printf("%d\n",d[i]);
  printf("%d\n",d[n-1]+1);
  return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	MIN
	.type	MIN, @function
MIN:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	MIN, .-MIN
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-1396736(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3488, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-1400080(%rbp), %rax
	movl	$400040, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -1400212(%rbp)
	jmp	.L4
.L5:
	movl	-1400212(%rbp), %eax
	cltq
	movl	$-1, -1400208(%rbp,%rax,4)
	addl	$1, -1400212(%rbp)
.L4:
	cmpl	$29, -1400212(%rbp)
	jle	.L5
	movl	$1, -1400212(%rbp)
	jmp	.L6
.L7:
	movl	-1400212(%rbp), %eax
	cltq
	movl	$1000000000, -1400080(%rbp,%rax,4)
	addl	$1, -1400212(%rbp)
.L6:
	cmpl	$100009, -1400212(%rbp)
	jle	.L7
	leaq	-1400216(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -1400212(%rbp)
	jmp	.L8
.L11:
	leaq	-1000032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$0, -1400212(%rbp)
	je	.L9
	movl	-1400212(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-1400080(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-1400212(%rbp), %eax
	cltq
	movl	%edx, -1400080(%rbp,%rax,4)
.L9:
	movzbl	-1000032(%rbp), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	cltq
	movl	-1400208(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	je	.L10
	movzbl	-1000032(%rbp), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	cltq
	movl	-1400208(%rbp,%rax,4), %eax
	cltq
	movl	-1400080(%rbp,%rax,4), %edx
	movl	-1400212(%rbp), %eax
	cltq
	movl	-1400080(%rbp,%rax,4), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	MIN
	movl	-1400212(%rbp), %edx
	movslq	%edx, %rdx
	movl	%eax, -1400080(%rbp,%rdx,4)
.L10:
	movzbl	-1000032(%rbp), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	cltq
	movl	-1400212(%rbp), %edx
	movl	%edx, -1400208(%rbp,%rax,4)
	addl	$1, -1400212(%rbp)
.L8:
	movl	-1400216(%rbp), %eax
	cmpl	%eax, -1400212(%rbp)
	jl	.L11
	movl	-1400216(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-1400080(%rbp,%rax,4), %eax
	addl	$1, %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	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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.
user
	.file	"temp.c"
	.text
	.p2align 4
	.globl	MIN
	.type	MIN, @function
MIN:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%edi, %esi
	movl	%edi, %eax
	cmovle	%esi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	MIN, .-MIN
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%s"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	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
	leaq	-1396736(%rsp), %r11
	.cfi_def_cfa 11, 1396776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3496, %rsp
	.cfi_def_cfa_offset 1400272
	movl	$400040, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 1400216(%rsp)
	xorl	%eax, %eax
	leaq	144(%rsp), %rbx
	movq	%rbx, %rdi
	call	memset@PLT
	pcmpeqd	%xmm0, %xmm0
	movq	$-1, 128(%rsp)
	leaq	148(%rsp), %rax
	movaps	%xmm0, 16(%rsp)
	leaq	400180(%rsp), %rdx
	movaps	%xmm0, 32(%rsp)
	movaps	%xmm0, 48(%rsp)
	movaps	%xmm0, 64(%rsp)
	movaps	%xmm0, 80(%rsp)
	movaps	%xmm0, 96(%rsp)
	movaps	%xmm0, 112(%rsp)
	movdqa	.LC0(%rip), %xmm0
	.p2align 4,,10
	.p2align 3
.L4:
	movups	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L4
	leaq	12(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	movl	$1000000000, 400180(%rsp)
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L6
	leaq	400192(%rsp), %r12
	leaq	.LC2(%rip), %rbp
	xorl	%eax, %eax
	xorl	%r13d, %r13d
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-4(%rbx), %eax
	addl	$1, %eax
	movl	%eax, (%rbx)
.L9:
	movsbl	400192(%rsp), %eax
	subl	$97, %eax
	cltq
	movslq	16(%rsp,%rax,4), %rdx
	cmpl	$-1, %edx
	je	.L7
	movl	(%rbx), %ecx
	movl	144(%rsp,%rdx,4), %edx
	cmpl	%edx, %ecx
	cmovg	%edx, %ecx
	movl	%ecx, (%rbx)
.L7:
	movl	%r13d, 16(%rsp,%rax,4)
	movl	12(%rsp), %eax
	addl	$1, %r13d
	addq	$4, %rbx
	cmpl	%r13d, %eax
	jg	.L8
	.p2align 4,,10
	.p2align 3
.L6:
	subl	$1, %eax
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	cltq
	movl	144(%rsp,%rax,4), %edx
	xorl	%eax, %eax
	addl	$1, %edx
	call	__printf_chk@PLT
	movq	1400216(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$1400232, %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
.L14:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1000000000
	.long	1000000000
	.long	1000000000
	.long	1000000000
	.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
	.p2align 4
	.globl	MIN
	.type	MIN, @function
MIN:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%edi, %esi
	movl	%edi, %eax
	cmovle	%esi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	MIN, .-MIN
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%s"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	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
	leaq	-1396736(%rsp), %r11
	.cfi_def_cfa 11, 1396776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3496, %rsp
	.cfi_def_cfa_offset 1400272
	movl	$400040, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 1400216(%rsp)
	xorl	%eax, %eax
	leaq	144(%rsp), %rbx
	movq	%rbx, %rdi
	call	memset@PLT
	pcmpeqd	%xmm0, %xmm0
	movq	$-1, 128(%rsp)
	leaq	148(%rsp), %rax
	movaps	%xmm0, 16(%rsp)
	leaq	400180(%rsp), %rdx
	movaps	%xmm0, 32(%rsp)
	movaps	%xmm0, 48(%rsp)
	movaps	%xmm0, 64(%rsp)
	movaps	%xmm0, 80(%rsp)
	movaps	%xmm0, 96(%rsp)
	movaps	%xmm0, 112(%rsp)
	movdqa	.LC0(%rip), %xmm0
	.p2align 4,,10
	.p2align 3
.L4:
	movups	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L4
	leaq	12(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	movl	$1000000000, 400180(%rsp)
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L6
	leaq	400192(%rsp), %r12
	leaq	.LC2(%rip), %rbp
	xorl	%eax, %eax
	xorl	%r13d, %r13d
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-4(%rbx), %eax
	addl	$1, %eax
	movl	%eax, (%rbx)
.L9:
	movsbl	400192(%rsp), %eax
	subl	$97, %eax
	cltq
	movslq	16(%rsp,%rax,4), %rdx
	cmpl	$-1, %edx
	je	.L7
	movl	(%rbx), %ecx
	movl	144(%rsp,%rdx,4), %edx
	cmpl	%edx, %ecx
	cmovg	%edx, %ecx
	movl	%ecx, (%rbx)
.L7:
	movl	%r13d, 16(%rsp,%rax,4)
	movl	12(%rsp), %eax
	addl	$1, %r13d
	addq	$4, %rbx
	cmpl	%r13d, %eax
	jg	.L8
	.p2align 4,,10
	.p2align 3
.L6:
	subl	$1, %eax
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	cltq
	movl	144(%rsp,%rax,4), %edx
	xorl	%eax, %eax
	addl	$1, %edx
	call	__printf_chk@PLT
	movq	1400216(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$1400232, %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
.L14:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1000000000
	.long	1000000000
	.long	1000000000
	.long	1000000000
	.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>
int MIN(int a,int b){return a<b?a:b;}
int main(){
  int n,i,d[100010]={};
  int b[30];
  char s[1000010];
  for(i=0;i<30;i++)b[i]=-1;
  for(i=1;i<100010;i++)d[i]=1e9;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%s",s);
    if(i)d[i]=d[i-1]+1;
    if(b[s[0]-'a']+1)d[i]=MIN(d[i],d[b[s[0]-'a']]);
    b[s[0]-'a']=i;
  }
  //for(i=0;i<n;i++)printf("%d\n",d[i]);
  printf("%d\n",d[n-1]+1);
  return 0;
}


7
banana
ta
tomb
bus
sound
does
some
 7
ananab
ta
somb
bus
sound
does
semo
 7
banaoa
ta
tomb
bus
sound
does
some
 7
banaoa
ta
uomb
bus
sound
does
some
 7
banaoa
ua
tomb
bus
sound
does
some
 7
banaoa
ua
tomb
bus
spund
does
some
 7
banaoa
ua
tomb
bus
spund
seod
some
 7
banaoa
ua
tomb
bus
spund
sepd
some
 7
banaoa
va
tomb
bus
spund
sepd
some
 7
banana
at
tomb
bus
sound
does
semo

2
 3
 2
 2
 2
 2
 2
 2
 2
 2

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>
int MIN(int a,int b){return a<b?a:b;}
int main(){
  int n,i,d[100010]={};
  int b[30];
  char s[1000010];
  for(i=0;i<30;i++)b[i]=-1;
  for(i=1;i<100010;i++)d[i]=1e9;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%s",s);
    if(i)d[i]=d[i-1]+1;
    if(b[s[0]-'a']+1)d[i]=MIN(d[i],d[b[s[0]-'a']]);
    b[s[0]-'a']=i;
  }
  //for(i=0;i<n;i++)printf("%d\n",d[i]);
  printf("%d\n",d[n-1]+1);
  return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	MIN
	.type	MIN, @function
MIN:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	MIN, .-MIN
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-1396736(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3488, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-1400080(%rbp), %rax
	movl	$400040, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -1400212(%rbp)
	jmp	.L4
.L5:
	movl	-1400212(%rbp), %eax
	cltq
	movl	$-1, -1400208(%rbp,%rax,4)
	addl	$1, -1400212(%rbp)
.L4:
	cmpl	$29, -1400212(%rbp)
	jle	.L5
	movl	$1, -1400212(%rbp)
	jmp	.L6
.L7:
	movl	-1400212(%rbp), %eax
	cltq
	movl	$1000000000, -1400080(%rbp,%rax,4)
	addl	$1, -1400212(%rbp)
.L6:
	cmpl	$100009, -1400212(%rbp)
	jle	.L7
	leaq	-1400216(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -1400212(%rbp)
	jmp	.L8
.L11:
	leaq	-1000032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$0, -1400212(%rbp)
	je	.L9
	movl	-1400212(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-1400080(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-1400212(%rbp), %eax
	cltq
	movl	%edx, -1400080(%rbp,%rax,4)
.L9:
	movzbl	-1000032(%rbp), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	cltq
	movl	-1400208(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	je	.L10
	movzbl	-1000032(%rbp), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	cltq
	movl	-1400208(%rbp,%rax,4), %eax
	cltq
	movl	-1400080(%rbp,%rax,4), %edx
	movl	-1400212(%rbp), %eax
	cltq
	movl	-1400080(%rbp,%rax,4), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	MIN
	movl	-1400212(%rbp), %edx
	movslq	%edx, %rdx
	movl	%eax, -1400080(%rbp,%rdx,4)
.L10:
	movzbl	-1000032(%rbp), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	cltq
	movl	-1400212(%rbp), %edx
	movl	%edx, -1400208(%rbp,%rax,4)
	addl	$1, -1400212(%rbp)
.L8:
	movl	-1400216(%rbp), %eax
	cmpl	%eax, -1400212(%rbp)
	jl	.L11
	movl	-1400216(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-1400080(%rbp,%rax,4), %eax
	addl	$1, %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	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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.
train
	.file	"temp.c"
	.text
	.globl	MIN
	.type	MIN, @function
MIN:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	MIN, .-MIN
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-1396736(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3488, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-1400080(%rbp), %rax
	movl	$400040, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -1400212(%rbp)
	jmp	.L4
.L5:
	movl	-1400212(%rbp), %eax
	cltq
	movl	$-1, -1400208(%rbp,%rax,4)
	addl	$1, -1400212(%rbp)
.L4:
	cmpl	$29, -1400212(%rbp)
	jle	.L5
	movl	$1, -1400212(%rbp)
	jmp	.L6
.L7:
	movl	-1400212(%rbp), %eax
	cltq
	movl	$1000000000, -1400080(%rbp,%rax,4)
	addl	$1, -1400212(%rbp)
.L6:
	cmpl	$100009, -1400212(%rbp)
	jle	.L7
	leaq	-1400216(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -1400212(%rbp)
	jmp	.L8
.L11:
	leaq	-1000032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$0, -1400212(%rbp)
	je	.L9
	movl	-1400212(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-1400080(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-1400212(%rbp), %eax
	cltq
	movl	%edx, -1400080(%rbp,%rax,4)
.L9:
	movzbl	-1000032(%rbp), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	cltq
	movl	-1400208(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	je	.L10
	movzbl	-1000032(%rbp), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	cltq
	movl	-1400208(%rbp,%rax,4), %eax
	cltq
	movl	-1400080(%rbp,%rax,4), %edx
	movl	-1400212(%rbp), %eax
	cltq
	movl	-1400080(%rbp,%rax,4), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	MIN
	movl	-1400212(%rbp), %edx
	movslq	%edx, %rdx
	movl	%eax, -1400080(%rbp,%rdx,4)
.L10:
	movzbl	-1000032(%rbp), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	cltq
	movl	-1400212(%rbp), %edx
	movl	%edx, -1400208(%rbp,%rax,4)
	addl	$1, -1400212(%rbp)
.L8:
	movl	-1400216(%rbp), %eax
	cmpl	%eax, -1400212(%rbp)
	jl	.L11
	movl	-1400216(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-1400080(%rbp,%rax,4), %eax
	addl	$1, %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	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
