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>
#include <math.h>
#include <string.h>
#include <stdlib.h>

int main(void)
{
	//変数の宣言
	int n;
	int d[60];
	int i,j,k;
	int time[13];
	int flag=0;
	int time24[25];
	int temp=0;
	int ans=100;
	int lastans=0;
	
	//データの読み込み
	scanf("%d",&n);
	
	
	for(i=0;i<=12;i++){
		time[i]=0;
	}
	
	for(i=0;i<24;i++){
		time24[i]=0;
	}
	for(i=0;i<n;i++){
		scanf("%d",&d[i]);
		time[d[i]]++;
	}
	
//	printf("nは%dです\n", n);
//	printf("データの読み込み終了\n");
	//実際の処理
	
	if(n>=24){
		printf("0");
		return 0;
	}else if(n<12){
//		printf("n<12\n");
		for(i=0;i<=12;i++){
			if(i==0){
				if(time[i]>=1) flag=1;
			}else if(i==12){
				if(time[i]>=2) flag=1;
			}else{
				if(time[i]>=3) flag=1;
			}
		}
		if(flag==1){
			printf("0");
			return 0;
		}
		
//		printf("s!=0\n");
		
		time24[0]=1;
		time24[24]=1;
		for(i=0;i<(1<<n);i++){
//			printf("i=%d\n",i);
			
			for(j=1;j<24;j++){
				time24[j]=0;
			}
			
			for(j=0;j<n;j++){
				if(i&(1<<j)){
					if(time24[d[j]]==0){
						time24[d[j]]=1;
					}else{
						time24[24-d[j]]=1;
					}
				}else{
					if(time24[24-d[j]]==0){
						time24[24-d[j]]=1;
					}else{
						time24[d[j]]=1;
					}
				}
			}
			
//			for(j=0;j<24;j++){
//				printf("time24[%d]=%d\n",j,time24[j]);
//			}
			temp=1;
			ans=100;
			for(j=1;j<=24;j++){
				if(time24[j]==1){
					if(temp<ans) ans=temp;
//					printf("temp=%d ans=%d",temp,ans);
					temp=1;
				}else{
					temp++;
				}
			}
			if(lastans<ans) lastans=ans;
//			printf("%d\n",ans);
		}
		printf("%d",lastans);
	}else{
		for(i=0;i<=12;i++){
			if(i==0){
				if(time[i]>=1) flag=1;
			}else if(i==12){
				if(time[i]>=2) flag=1;
			}else{
				if(time[i]>=3) flag=1;
			}
		}
		if(flag==1){
			printf("0");
		}else{
			printf("1");
		}
		return 0;
	}
	
//	printf("計算部分終了\n");
	
	//出力
	
//	printf("結果の出力終了\n");
	
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$464, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -448(%rbp)
	movl	$0, -444(%rbp)
	movl	$100, -440(%rbp)
	movl	$0, -436(%rbp)
	leaq	-460(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -456(%rbp)
	jmp	.L2
.L3:
	movl	-456(%rbp), %eax
	cltq
	movl	$0, -432(%rbp,%rax,4)
	addl	$1, -456(%rbp)
.L2:
	cmpl	$12, -456(%rbp)
	jle	.L3
	movl	$0, -456(%rbp)
	jmp	.L4
.L5:
	movl	-456(%rbp), %eax
	cltq
	movl	$0, -368(%rbp,%rax,4)
	addl	$1, -456(%rbp)
.L4:
	cmpl	$23, -456(%rbp)
	jle	.L5
	movl	$0, -456(%rbp)
	jmp	.L6
.L7:
	leaq	-256(%rbp), %rdx
	movl	-456(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-456(%rbp), %eax
	cltq
	movl	-256(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	movl	-432(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -432(%rbp,%rax,4)
	addl	$1, -456(%rbp)
.L6:
	movl	-460(%rbp), %eax
	cmpl	%eax, -456(%rbp)
	jl	.L7
	movl	-460(%rbp), %eax
	cmpl	$23, %eax
	jle	.L8
	movl	$48, %edi
	call	putchar@PLT
	movl	$0, %eax
	jmp	.L33
.L8:
	movl	-460(%rbp), %eax
	cmpl	$11, %eax
	jg	.L10
	movl	$0, -456(%rbp)
	jmp	.L11
.L15:
	cmpl	$0, -456(%rbp)
	jne	.L12
	movl	-456(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jle	.L13
	movl	$1, -448(%rbp)
	jmp	.L13
.L12:
	cmpl	$12, -456(%rbp)
	jne	.L14
	movl	-456(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	jle	.L13
	movl	$1, -448(%rbp)
	jmp	.L13
.L14:
	movl	-456(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	cmpl	$2, %eax
	jle	.L13
	movl	$1, -448(%rbp)
.L13:
	addl	$1, -456(%rbp)
.L11:
	cmpl	$12, -456(%rbp)
	jle	.L15
	cmpl	$1, -448(%rbp)
	jne	.L16
	movl	$48, %edi
	call	putchar@PLT
	movl	$0, %eax
	jmp	.L33
.L16:
	movl	$1, -368(%rbp)
	movl	$1, -272(%rbp)
	movl	$0, -456(%rbp)
	jmp	.L17
.L32:
	movl	$1, -452(%rbp)
	jmp	.L18
.L19:
	movl	-452(%rbp), %eax
	cltq
	movl	$0, -368(%rbp,%rax,4)
	addl	$1, -452(%rbp)
.L18:
	cmpl	$23, -452(%rbp)
	jle	.L19
	movl	$0, -452(%rbp)
	jmp	.L20
.L25:
	movl	-452(%rbp), %eax
	movl	-456(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L21
	movl	-452(%rbp), %eax
	cltq
	movl	-256(%rbp,%rax,4), %eax
	cltq
	movl	-368(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L22
	movl	-452(%rbp), %eax
	cltq
	movl	-256(%rbp,%rax,4), %eax
	cltq
	movl	$1, -368(%rbp,%rax,4)
	jmp	.L23
.L22:
	movl	-452(%rbp), %eax
	cltq
	movl	-256(%rbp,%rax,4), %edx
	movl	$24, %eax
	subl	%edx, %eax
	cltq
	movl	$1, -368(%rbp,%rax,4)
	jmp	.L23
.L21:
	movl	-452(%rbp), %eax
	cltq
	movl	-256(%rbp,%rax,4), %edx
	movl	$24, %eax
	subl	%edx, %eax
	cltq
	movl	-368(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L24
	movl	-452(%rbp), %eax
	cltq
	movl	-256(%rbp,%rax,4), %edx
	movl	$24, %eax
	subl	%edx, %eax
	cltq
	movl	$1, -368(%rbp,%rax,4)
	jmp	.L23
.L24:
	movl	-452(%rbp), %eax
	cltq
	movl	-256(%rbp,%rax,4), %eax
	cltq
	movl	$1, -368(%rbp,%rax,4)
.L23:
	addl	$1, -452(%rbp)
.L20:
	movl	-460(%rbp), %eax
	cmpl	%eax, -452(%rbp)
	jl	.L25
	movl	$1, -444(%rbp)
	movl	$100, -440(%rbp)
	movl	$1, -452(%rbp)
	jmp	.L26
.L30:
	movl	-452(%rbp), %eax
	cltq
	movl	-368(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	jne	.L27
	movl	-444(%rbp), %eax
	cmpl	-440(%rbp), %eax
	jge	.L28
	movl	-444(%rbp), %eax
	movl	%eax, -440(%rbp)
.L28:
	movl	$1, -444(%rbp)
	jmp	.L29
.L27:
	addl	$1, -444(%rbp)
.L29:
	addl	$1, -452(%rbp)
.L26:
	cmpl	$24, -452(%rbp)
	jle	.L30
	movl	-436(%rbp), %eax
	cmpl	-440(%rbp), %eax
	jge	.L31
	movl	-440(%rbp), %eax
	movl	%eax, -436(%rbp)
.L31:
	addl	$1, -456(%rbp)
.L17:
	movl	-460(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	cmpl	%eax, -456(%rbp)
	jl	.L32
	movl	-436(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L33
.L10:
	movl	$0, -456(%rbp)
	jmp	.L34
.L38:
	cmpl	$0, -456(%rbp)
	jne	.L35
	movl	-456(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jle	.L36
	movl	$1, -448(%rbp)
	jmp	.L36
.L35:
	cmpl	$12, -456(%rbp)
	jne	.L37
	movl	-456(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	jle	.L36
	movl	$1, -448(%rbp)
	jmp	.L36
.L37:
	movl	-456(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	cmpl	$2, %eax
	jle	.L36
	movl	$1, -448(%rbp)
.L36:
	addl	$1, -456(%rbp)
.L34:
	cmpl	$12, -456(%rbp)
	jle	.L38
	cmpl	$1, -448(%rbp)
	jne	.L39
	movl	$48, %edi
	call	putchar@PLT
	jmp	.L40
.L39:
	movl	$49, %edi
	call	putchar@PLT
.L40:
	movl	$0, %eax
.L33:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L41
	call	__stack_chk_fail@PLT
.L41:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movq	%rbp, %rdi
	subq	$448, %rsp
	.cfi_def_cfa_offset 496
	movq	%fs:40, %rax
	movq	%rax, 440(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	80(%rsp), %rdx
	pxor	%xmm0, %xmm0
	xorl	%eax, %eax
	movl	12(%rsp), %r8d
	movl	$12, %ecx
	movq	%rdx, %rdi
	movl	$0, 64(%rsp)
	rep stosq
	movaps	%xmm0, 16(%rsp)
	movaps	%xmm0, 32(%rsp)
	movaps	%xmm0, 48(%rsp)
	testl	%r8d, %r8d
	jle	.L2
	leaq	192(%rsp), %rbx
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movslq	(%rbx), %rax
	movl	12(%rsp), %r8d
	addq	$4, %rbx
	addl	$1, 16(%rsp,%rax,4)
	cmpl	%r12d, %r8d
	jg	.L3
	cmpl	$23, %r8d
	jg	.L6
.L2:
	movl	16(%rsp), %eax
	movl	64(%rsp), %edx
	cmpl	$11, %r8d
	jg	.L126
	testl	%eax, %eax
	jle	.L127
.L6:
	movl	$48, %edi
	call	putchar@PLT
.L69:
	movq	440(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L128
	addq	$448, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L127:
	.cfi_restore_state
	subl	$1, %edx
	jg	.L6
	xorl	%r11d, %r11d
	cmpl	$2, 20(%rsp)
	movl	$1, %r12d
	setg	%r11b
	cmpl	$3, 24(%rsp)
	cmovge	%r12d, %r11d
	cmpl	$3, 28(%rsp)
	cmovge	%r12d, %r11d
	cmpl	$3, 32(%rsp)
	cmovge	%r12d, %r11d
	cmpl	$3, 36(%rsp)
	cmovge	%r12d, %r11d
	cmpl	$3, 40(%rsp)
	cmovge	%r12d, %r11d
	cmpl	$3, 44(%rsp)
	cmovge	%r12d, %r11d
	cmpl	$3, 48(%rsp)
	cmovge	%r12d, %r11d
	cmpl	$3, 52(%rsp)
	cmovge	%r12d, %r11d
	cmpl	$2, 56(%rsp)
	jg	.L6
	cmpl	$2, 60(%rsp)
	jg	.L6
	cmpl	$1, %r11d
	je	.L6
	movl	$1, 80(%rsp)
	movl	%r8d, %ecx
	movl	%r11d, %r9d
	xorl	%eax, %eax
	sall	%cl, %r12d
	leaq	84(%rsp), %rbx
	movl	$1, 176(%rsp)
	leaq	184(%rsp), %r14
	leaq	92(%rsp), %r13
	leaq	180(%rsp), %rsi
	movl	$24, %r10d
	.p2align 4,,10
	.p2align 3
.L68:
	movq	%r13, %rdi
	movq	%rbx, %rcx
	movq	%rax, (%rbx)
	andq	$-8, %rdi
	movq	%rax, -16(%r14)
	subq	%rdi, %rcx
	addl	$92, %ecx
	shrl	$3, %ecx
	rep stosq
	testl	%r8d, %r8d
	jle	.L25
	movslq	192(%rsp), %rdx
	testb	$1, %r9b
	jne	.L21
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rcx
	movl	80(%rsp,%rcx,4), %edi
	testl	%edi, %edi
	jne	.L115
.L24:
	movl	$1, 80(%rsp,%rcx,4)
.L23:
	cmpl	$1, %r8d
	je	.L25
	movslq	196(%rsp), %rdx
	testb	$2, %r9b
	jne	.L26
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rcx
	movl	80(%rsp,%rcx,4), %edi
	testl	%edi, %edi
	jne	.L116
.L29:
	movl	$1, 80(%rsp,%rcx,4)
.L28:
	cmpl	$2, %r8d
	je	.L25
	movslq	200(%rsp), %rdx
	testb	$4, %r9b
	jne	.L30
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rcx
	movl	80(%rsp,%rcx,4), %edi
	testl	%edi, %edi
	jne	.L117
.L33:
	movl	$1, 80(%rsp,%rcx,4)
.L32:
	cmpl	$3, %r8d
	je	.L25
	movslq	204(%rsp), %rdx
	testb	$8, %r9b
	jne	.L34
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rcx
	movl	80(%rsp,%rcx,4), %edi
	testl	%edi, %edi
	jne	.L118
.L37:
	movl	$1, 80(%rsp,%rcx,4)
.L36:
	cmpl	$4, %r8d
	je	.L25
	movslq	208(%rsp), %rdx
	testb	$16, %r9b
	jne	.L38
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rcx
	movl	80(%rsp,%rcx,4), %edi
	testl	%edi, %edi
	jne	.L119
.L41:
	movl	$1, 80(%rsp,%rcx,4)
.L40:
	cmpl	$5, %r8d
	je	.L25
	movslq	212(%rsp), %rdx
	testb	$32, %r9b
	jne	.L42
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rcx
	movl	80(%rsp,%rcx,4), %edi
	testl	%edi, %edi
	jne	.L120
.L45:
	movl	$1, 80(%rsp,%rcx,4)
.L44:
	cmpl	$6, %r8d
	je	.L25
	movslq	216(%rsp), %rdx
	testb	$64, %r9b
	jne	.L46
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rcx
	movl	80(%rsp,%rcx,4), %edi
	testl	%edi, %edi
	jne	.L121
.L49:
	movl	$1, 80(%rsp,%rcx,4)
.L48:
	cmpl	$7, %r8d
	je	.L25
	movslq	220(%rsp), %rdx
	testb	$-128, %r9b
	jne	.L50
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rcx
	movl	80(%rsp,%rcx,4), %edi
	testl	%edi, %edi
	jne	.L122
.L53:
	movl	$1, 80(%rsp,%rcx,4)
.L52:
	cmpl	$8, %r8d
	je	.L25
	movslq	224(%rsp), %rdx
	testl	$256, %r9d
	jne	.L54
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rcx
	cmpl	$0, 80(%rsp,%rcx,4)
	jne	.L123
.L57:
	movl	$1, 80(%rsp,%rcx,4)
.L56:
	cmpl	$9, %r8d
	je	.L25
	movslq	228(%rsp), %rdx
	testl	$512, %r9d
	jne	.L58
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rcx
	cmpl	$0, 80(%rsp,%rcx,4)
	jne	.L124
.L61:
	movl	$1, 80(%rsp,%rcx,4)
.L60:
	cmpl	$11, %r8d
	jne	.L25
	movslq	232(%rsp), %rdx
	testl	$1024, %r9d
	je	.L62
	movslq	%edx, %rcx
	cmpl	$0, 80(%rsp,%rcx,4)
	je	.L114
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rdx
	movl	$1, 80(%rsp,%rdx,4)
	.p2align 4,,10
	.p2align 3
.L25:
	movq	%rbx, %rdx
	movl	$100, %edi
	movl	$1, %ecx
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L66:
	addq	$4, %rdx
	addl	$1, %ecx
	cmpq	%rdx, %rsi
	je	.L129
.L20:
	cmpl	$1, (%rdx)
	jne	.L66
	cmpl	%ecx, %edi
	cmovg	%ecx, %edi
	addq	$4, %rdx
	movl	$1, %ecx
	cmpq	%rdx, %rsi
	jne	.L20
.L129:
	cmpl	%edi, %r11d
	cmovl	%edi, %r11d
	addl	$1, %r9d
	cmpl	%r12d, %r9d
	jne	.L68
	movl	%r11d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L69
.L126:
	testl	%eax, %eax
	jg	.L6
	subl	$1, %edx
	jg	.L6
	movl	$1, %edx
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	movl	$1, %esi
	leaq	16(%rsp), %rdi
	jmp	.L10
.L130:
	cmpl	$3, (%rdi,%rax,4)
	cmovge	%esi, %ecx
	cmpl	$13, %edx
	je	.L8
.L7:
	addq	$1, %rax
	addl	$1, %edx
.L10:
	testq	%rax, %rax
	je	.L7
	cmpl	$12, %eax
	jne	.L130
.L8:
	subl	$1, %ecx
	je	.L6
	movl	$49, %edi
	call	putchar@PLT
	jmp	.L69
	.p2align 4,,10
	.p2align 3
.L21:
	movslq	%edx, %rcx
	movl	80(%rsp,%rcx,4), %edi
	testl	%edi, %edi
	je	.L24
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rdx
.L115:
	movl	$1, 80(%rsp,%rdx,4)
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L26:
	movslq	%edx, %rcx
	movl	80(%rsp,%rcx,4), %edi
	testl	%edi, %edi
	je	.L29
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rdx
.L116:
	movl	$1, 80(%rsp,%rdx,4)
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L30:
	movslq	%edx, %rcx
	movl	80(%rsp,%rcx,4), %edi
	testl	%edi, %edi
	je	.L33
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rdx
.L117:
	movl	$1, 80(%rsp,%rdx,4)
	jmp	.L32
	.p2align 4,,10
	.p2align 3
.L34:
	movslq	%edx, %rcx
	movl	80(%rsp,%rcx,4), %edi
	testl	%edi, %edi
	je	.L37
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rdx
.L118:
	movl	$1, 80(%rsp,%rdx,4)
	jmp	.L36
	.p2align 4,,10
	.p2align 3
.L38:
	movslq	%edx, %rcx
	movl	80(%rsp,%rcx,4), %edi
	testl	%edi, %edi
	je	.L41
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rdx
.L119:
	movl	$1, 80(%rsp,%rdx,4)
	jmp	.L40
.L42:
	movslq	%edx, %rcx
	movl	80(%rsp,%rcx,4), %edi
	testl	%edi, %edi
	je	.L45
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rdx
.L120:
	movl	$1, 80(%rsp,%rdx,4)
	jmp	.L44
.L46:
	movslq	%edx, %rcx
	movl	80(%rsp,%rcx,4), %edi
	testl	%edi, %edi
	je	.L49
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rdx
.L121:
	movl	$1, 80(%rsp,%rdx,4)
	jmp	.L48
.L50:
	movslq	%edx, %rcx
	movl	80(%rsp,%rcx,4), %edi
	testl	%edi, %edi
	je	.L53
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rdx
.L122:
	movl	$1, 80(%rsp,%rdx,4)
	jmp	.L52
.L54:
	movslq	%edx, %rcx
	cmpl	$0, 80(%rsp,%rcx,4)
	je	.L57
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rdx
.L123:
	movl	$1, 80(%rsp,%rdx,4)
	jmp	.L56
.L58:
	movslq	%edx, %rcx
	cmpl	$0, 80(%rsp,%rcx,4)
	je	.L61
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rdx
.L124:
	movl	$1, 80(%rsp,%rdx,4)
	jmp	.L60
.L114:
	movl	$1, 80(%rsp,%rcx,4)
	jmp	.L25
.L62:
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rcx
	cmpl	$0, 80(%rsp,%rcx,4)
	je	.L114
	movl	$1, 80(%rsp,%rdx,4)
	jmp	.L25
.L128:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movq	%rbp, %rdi
	subq	$448, %rsp
	.cfi_def_cfa_offset 496
	movq	%fs:40, %rax
	movq	%rax, 440(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	80(%rsp), %rdx
	pxor	%xmm0, %xmm0
	xorl	%eax, %eax
	movl	12(%rsp), %r8d
	movl	$12, %ecx
	movq	%rdx, %rdi
	movl	$0, 64(%rsp)
	rep stosq
	movaps	%xmm0, 16(%rsp)
	movaps	%xmm0, 32(%rsp)
	movaps	%xmm0, 48(%rsp)
	testl	%r8d, %r8d
	jle	.L2
	leaq	192(%rsp), %rbx
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movslq	(%rbx), %rax
	movl	12(%rsp), %r8d
	addq	$4, %rbx
	addl	$1, 16(%rsp,%rax,4)
	cmpl	%r12d, %r8d
	jg	.L3
	cmpl	$23, %r8d
	jg	.L6
.L2:
	movl	16(%rsp), %eax
	movl	64(%rsp), %edx
	cmpl	$11, %r8d
	jg	.L126
	testl	%eax, %eax
	jle	.L127
.L6:
	movl	$48, %edi
	call	putchar@PLT
.L69:
	movq	440(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L128
	addq	$448, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L127:
	.cfi_restore_state
	subl	$1, %edx
	jg	.L6
	xorl	%r11d, %r11d
	cmpl	$2, 20(%rsp)
	movl	$1, %r12d
	setg	%r11b
	cmpl	$3, 24(%rsp)
	cmovge	%r12d, %r11d
	cmpl	$3, 28(%rsp)
	cmovge	%r12d, %r11d
	cmpl	$3, 32(%rsp)
	cmovge	%r12d, %r11d
	cmpl	$3, 36(%rsp)
	cmovge	%r12d, %r11d
	cmpl	$3, 40(%rsp)
	cmovge	%r12d, %r11d
	cmpl	$3, 44(%rsp)
	cmovge	%r12d, %r11d
	cmpl	$3, 48(%rsp)
	cmovge	%r12d, %r11d
	cmpl	$3, 52(%rsp)
	cmovge	%r12d, %r11d
	cmpl	$2, 56(%rsp)
	jg	.L6
	cmpl	$2, 60(%rsp)
	jg	.L6
	cmpl	$1, %r11d
	je	.L6
	movl	$1, 80(%rsp)
	movl	%r8d, %ecx
	movl	%r11d, %r9d
	xorl	%eax, %eax
	sall	%cl, %r12d
	leaq	84(%rsp), %rbx
	movl	$1, 176(%rsp)
	leaq	184(%rsp), %r14
	leaq	92(%rsp), %r13
	leaq	180(%rsp), %rsi
	movl	$24, %r10d
	.p2align 4,,10
	.p2align 3
.L68:
	movq	%r13, %rdi
	movq	%rbx, %rcx
	movq	%rax, (%rbx)
	andq	$-8, %rdi
	movq	%rax, -16(%r14)
	subq	%rdi, %rcx
	addl	$92, %ecx
	shrl	$3, %ecx
	rep stosq
	testl	%r8d, %r8d
	jle	.L25
	movslq	192(%rsp), %rdx
	testb	$1, %r9b
	jne	.L21
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rcx
	movl	80(%rsp,%rcx,4), %edi
	testl	%edi, %edi
	jne	.L115
.L24:
	movl	$1, 80(%rsp,%rcx,4)
.L23:
	cmpl	$1, %r8d
	je	.L25
	movslq	196(%rsp), %rdx
	testb	$2, %r9b
	jne	.L26
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rcx
	movl	80(%rsp,%rcx,4), %edi
	testl	%edi, %edi
	jne	.L116
.L29:
	movl	$1, 80(%rsp,%rcx,4)
.L28:
	cmpl	$2, %r8d
	je	.L25
	movslq	200(%rsp), %rdx
	testb	$4, %r9b
	jne	.L30
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rcx
	movl	80(%rsp,%rcx,4), %edi
	testl	%edi, %edi
	jne	.L117
.L33:
	movl	$1, 80(%rsp,%rcx,4)
.L32:
	cmpl	$3, %r8d
	je	.L25
	movslq	204(%rsp), %rdx
	testb	$8, %r9b
	jne	.L34
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rcx
	movl	80(%rsp,%rcx,4), %edi
	testl	%edi, %edi
	jne	.L118
.L37:
	movl	$1, 80(%rsp,%rcx,4)
.L36:
	cmpl	$4, %r8d
	je	.L25
	movslq	208(%rsp), %rdx
	testb	$16, %r9b
	jne	.L38
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rcx
	movl	80(%rsp,%rcx,4), %edi
	testl	%edi, %edi
	jne	.L119
.L41:
	movl	$1, 80(%rsp,%rcx,4)
.L40:
	cmpl	$5, %r8d
	je	.L25
	movslq	212(%rsp), %rdx
	testb	$32, %r9b
	jne	.L42
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rcx
	movl	80(%rsp,%rcx,4), %edi
	testl	%edi, %edi
	jne	.L120
.L45:
	movl	$1, 80(%rsp,%rcx,4)
.L44:
	cmpl	$6, %r8d
	je	.L25
	movslq	216(%rsp), %rdx
	testb	$64, %r9b
	jne	.L46
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rcx
	movl	80(%rsp,%rcx,4), %edi
	testl	%edi, %edi
	jne	.L121
.L49:
	movl	$1, 80(%rsp,%rcx,4)
.L48:
	cmpl	$7, %r8d
	je	.L25
	movslq	220(%rsp), %rdx
	testb	$-128, %r9b
	jne	.L50
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rcx
	movl	80(%rsp,%rcx,4), %edi
	testl	%edi, %edi
	jne	.L122
.L53:
	movl	$1, 80(%rsp,%rcx,4)
.L52:
	cmpl	$8, %r8d
	je	.L25
	movslq	224(%rsp), %rdx
	testl	$256, %r9d
	jne	.L54
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rcx
	cmpl	$0, 80(%rsp,%rcx,4)
	jne	.L123
.L57:
	movl	$1, 80(%rsp,%rcx,4)
.L56:
	cmpl	$9, %r8d
	je	.L25
	movslq	228(%rsp), %rdx
	testl	$512, %r9d
	jne	.L58
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rcx
	cmpl	$0, 80(%rsp,%rcx,4)
	jne	.L124
.L61:
	movl	$1, 80(%rsp,%rcx,4)
.L60:
	cmpl	$11, %r8d
	jne	.L25
	movslq	232(%rsp), %rdx
	testl	$1024, %r9d
	je	.L62
	movslq	%edx, %rcx
	cmpl	$0, 80(%rsp,%rcx,4)
	je	.L114
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rdx
	movl	$1, 80(%rsp,%rdx,4)
	.p2align 4,,10
	.p2align 3
.L25:
	movq	%rbx, %rdx
	movl	$100, %edi
	movl	$1, %ecx
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L66:
	addq	$4, %rdx
	addl	$1, %ecx
	cmpq	%rdx, %rsi
	je	.L129
.L20:
	cmpl	$1, (%rdx)
	jne	.L66
	cmpl	%ecx, %edi
	cmovg	%ecx, %edi
	addq	$4, %rdx
	movl	$1, %ecx
	cmpq	%rdx, %rsi
	jne	.L20
.L129:
	cmpl	%edi, %r11d
	cmovl	%edi, %r11d
	addl	$1, %r9d
	cmpl	%r12d, %r9d
	jne	.L68
	movl	%r11d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L69
.L126:
	testl	%eax, %eax
	jg	.L6
	subl	$1, %edx
	jg	.L6
	movl	$1, %edx
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	movl	$1, %esi
	leaq	16(%rsp), %rdi
	jmp	.L10
.L130:
	cmpl	$3, (%rdi,%rax,4)
	cmovge	%esi, %ecx
	cmpl	$13, %edx
	je	.L8
.L7:
	addq	$1, %rax
	addl	$1, %edx
.L10:
	testq	%rax, %rax
	je	.L7
	cmpl	$12, %eax
	jne	.L130
.L8:
	subl	$1, %ecx
	je	.L6
	movl	$49, %edi
	call	putchar@PLT
	jmp	.L69
	.p2align 4,,10
	.p2align 3
.L21:
	movslq	%edx, %rcx
	movl	80(%rsp,%rcx,4), %edi
	testl	%edi, %edi
	je	.L24
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rdx
.L115:
	movl	$1, 80(%rsp,%rdx,4)
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L26:
	movslq	%edx, %rcx
	movl	80(%rsp,%rcx,4), %edi
	testl	%edi, %edi
	je	.L29
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rdx
.L116:
	movl	$1, 80(%rsp,%rdx,4)
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L30:
	movslq	%edx, %rcx
	movl	80(%rsp,%rcx,4), %edi
	testl	%edi, %edi
	je	.L33
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rdx
.L117:
	movl	$1, 80(%rsp,%rdx,4)
	jmp	.L32
	.p2align 4,,10
	.p2align 3
.L34:
	movslq	%edx, %rcx
	movl	80(%rsp,%rcx,4), %edi
	testl	%edi, %edi
	je	.L37
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rdx
.L118:
	movl	$1, 80(%rsp,%rdx,4)
	jmp	.L36
	.p2align 4,,10
	.p2align 3
.L38:
	movslq	%edx, %rcx
	movl	80(%rsp,%rcx,4), %edi
	testl	%edi, %edi
	je	.L41
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rdx
.L119:
	movl	$1, 80(%rsp,%rdx,4)
	jmp	.L40
.L42:
	movslq	%edx, %rcx
	movl	80(%rsp,%rcx,4), %edi
	testl	%edi, %edi
	je	.L45
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rdx
.L120:
	movl	$1, 80(%rsp,%rdx,4)
	jmp	.L44
.L46:
	movslq	%edx, %rcx
	movl	80(%rsp,%rcx,4), %edi
	testl	%edi, %edi
	je	.L49
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rdx
.L121:
	movl	$1, 80(%rsp,%rdx,4)
	jmp	.L48
.L50:
	movslq	%edx, %rcx
	movl	80(%rsp,%rcx,4), %edi
	testl	%edi, %edi
	je	.L53
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rdx
.L122:
	movl	$1, 80(%rsp,%rdx,4)
	jmp	.L52
.L54:
	movslq	%edx, %rcx
	cmpl	$0, 80(%rsp,%rcx,4)
	je	.L57
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rdx
.L123:
	movl	$1, 80(%rsp,%rdx,4)
	jmp	.L56
.L58:
	movslq	%edx, %rcx
	cmpl	$0, 80(%rsp,%rcx,4)
	je	.L61
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rdx
.L124:
	movl	$1, 80(%rsp,%rdx,4)
	jmp	.L60
.L114:
	movl	$1, 80(%rsp,%rcx,4)
	jmp	.L25
.L62:
	movl	%r10d, %ecx
	subl	%edx, %ecx
	movslq	%ecx, %rcx
	cmpl	$0, 80(%rsp,%rcx,4)
	je	.L114
	movl	$1, 80(%rsp,%rdx,4)
	jmp	.L25
.L128:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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:


#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>

int main(void)
{
	//変数の宣言
	int n;
	int d[60];
	int i,j,k;
	int time[13];
	int flag=0;
	int time24[25];
	int temp=0;
	int ans=100;
	int lastans=0;
	
	//データの読み込み
	scanf("%d",&n);
	
	
	for(i=0;i<=12;i++){
		time[i]=0;
	}
	
	for(i=0;i<24;i++){
		time24[i]=0;
	}
	for(i=0;i<n;i++){
		scanf("%d",&d[i]);
		time[d[i]]++;
	}
	
//	printf("nは%dです\n", n);
//	printf("データの読み込み終了\n");
	//実際の処理
	
	if(n>=24){
		printf("0");
		return 0;
	}else if(n<12){
//		printf("n<12\n");
		for(i=0;i<=12;i++){
			if(i==0){
				if(time[i]>=1) flag=1;
			}else if(i==12){
				if(time[i]>=2) flag=1;
			}else{
				if(time[i]>=3) flag=1;
			}
		}
		if(flag==1){
			printf("0");
			return 0;
		}
		
//		printf("s!=0\n");
		
		time24[0]=1;
		time24[24]=1;
		for(i=0;i<(1<<n);i++){
//			printf("i=%d\n",i);
			
			for(j=1;j<24;j++){
				time24[j]=0;
			}
			
			for(j=0;j<n;j++){
				if(i&(1<<j)){
					if(time24[d[j]]==0){
						time24[d[j]]=1;
					}else{
						time24[24-d[j]]=1;
					}
				}else{
					if(time24[24-d[j]]==0){
						time24[24-d[j]]=1;
					}else{
						time24[d[j]]=1;
					}
				}
			}
			
//			for(j=0;j<24;j++){
//				printf("time24[%d]=%d\n",j,time24[j]);
//			}
			temp=1;
			ans=100;
			for(j=1;j<=24;j++){
				if(time24[j]==1){
					if(temp<ans) ans=temp;
//					printf("temp=%d ans=%d",temp,ans);
					temp=1;
				}else{
					temp++;
				}
			}
			if(lastans<ans) lastans=ans;
//			printf("%d\n",ans);
		}
		printf("%d",lastans);
	}else{
		for(i=0;i<=12;i++){
			if(i==0){
				if(time[i]>=1) flag=1;
			}else if(i==12){
				if(time[i]>=2) flag=1;
			}else{
				if(time[i]>=3) flag=1;
			}
		}
		if(flag==1){
			printf("0");
		}else{
			printf("1");
		}
		return 0;
	}
	
//	printf("計算部分終了\n");
	
	//出力
	
//	printf("結果の出力終了\n");
	
}


3
7 12 8

4
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>
#include <math.h>
#include <string.h>
#include <stdlib.h>

int main(void)
{
	//変数の宣言
	int n;
	int d[60];
	int i,j,k;
	int time[13];
	int flag=0;
	int time24[25];
	int temp=0;
	int ans=100;
	int lastans=0;
	
	//データの読み込み
	scanf("%d",&n);
	
	
	for(i=0;i<=12;i++){
		time[i]=0;
	}
	
	for(i=0;i<24;i++){
		time24[i]=0;
	}
	for(i=0;i<n;i++){
		scanf("%d",&d[i]);
		time[d[i]]++;
	}
	
//	printf("nは%dです\n", n);
//	printf("データの読み込み終了\n");
	//実際の処理
	
	if(n>=24){
		printf("0");
		return 0;
	}else if(n<12){
//		printf("n<12\n");
		for(i=0;i<=12;i++){
			if(i==0){
				if(time[i]>=1) flag=1;
			}else if(i==12){
				if(time[i]>=2) flag=1;
			}else{
				if(time[i]>=3) flag=1;
			}
		}
		if(flag==1){
			printf("0");
			return 0;
		}
		
//		printf("s!=0\n");
		
		time24[0]=1;
		time24[24]=1;
		for(i=0;i<(1<<n);i++){
//			printf("i=%d\n",i);
			
			for(j=1;j<24;j++){
				time24[j]=0;
			}
			
			for(j=0;j<n;j++){
				if(i&(1<<j)){
					if(time24[d[j]]==0){
						time24[d[j]]=1;
					}else{
						time24[24-d[j]]=1;
					}
				}else{
					if(time24[24-d[j]]==0){
						time24[24-d[j]]=1;
					}else{
						time24[d[j]]=1;
					}
				}
			}
			
//			for(j=0;j<24;j++){
//				printf("time24[%d]=%d\n",j,time24[j]);
//			}
			temp=1;
			ans=100;
			for(j=1;j<=24;j++){
				if(time24[j]==1){
					if(temp<ans) ans=temp;
//					printf("temp=%d ans=%d",temp,ans);
					temp=1;
				}else{
					temp++;
				}
			}
			if(lastans<ans) lastans=ans;
//			printf("%d\n",ans);
		}
		printf("%d",lastans);
	}else{
		for(i=0;i<=12;i++){
			if(i==0){
				if(time[i]>=1) flag=1;
			}else if(i==12){
				if(time[i]>=2) flag=1;
			}else{
				if(time[i]>=3) flag=1;
			}
		}
		if(flag==1){
			printf("0");
		}else{
			printf("1");
		}
		return 0;
	}
	
//	printf("計算部分終了\n");
	
	//出力
	
//	printf("結果の出力終了\n");
	
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$464, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -448(%rbp)
	movl	$0, -444(%rbp)
	movl	$100, -440(%rbp)
	movl	$0, -436(%rbp)
	leaq	-460(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -456(%rbp)
	jmp	.L2
.L3:
	movl	-456(%rbp), %eax
	cltq
	movl	$0, -432(%rbp,%rax,4)
	addl	$1, -456(%rbp)
.L2:
	cmpl	$12, -456(%rbp)
	jle	.L3
	movl	$0, -456(%rbp)
	jmp	.L4
.L5:
	movl	-456(%rbp), %eax
	cltq
	movl	$0, -368(%rbp,%rax,4)
	addl	$1, -456(%rbp)
.L4:
	cmpl	$23, -456(%rbp)
	jle	.L5
	movl	$0, -456(%rbp)
	jmp	.L6
.L7:
	leaq	-256(%rbp), %rdx
	movl	-456(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-456(%rbp), %eax
	cltq
	movl	-256(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	movl	-432(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -432(%rbp,%rax,4)
	addl	$1, -456(%rbp)
.L6:
	movl	-460(%rbp), %eax
	cmpl	%eax, -456(%rbp)
	jl	.L7
	movl	-460(%rbp), %eax
	cmpl	$23, %eax
	jle	.L8
	movl	$48, %edi
	call	putchar@PLT
	movl	$0, %eax
	jmp	.L33
.L8:
	movl	-460(%rbp), %eax
	cmpl	$11, %eax
	jg	.L10
	movl	$0, -456(%rbp)
	jmp	.L11
.L15:
	cmpl	$0, -456(%rbp)
	jne	.L12
	movl	-456(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jle	.L13
	movl	$1, -448(%rbp)
	jmp	.L13
.L12:
	cmpl	$12, -456(%rbp)
	jne	.L14
	movl	-456(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	jle	.L13
	movl	$1, -448(%rbp)
	jmp	.L13
.L14:
	movl	-456(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	cmpl	$2, %eax
	jle	.L13
	movl	$1, -448(%rbp)
.L13:
	addl	$1, -456(%rbp)
.L11:
	cmpl	$12, -456(%rbp)
	jle	.L15
	cmpl	$1, -448(%rbp)
	jne	.L16
	movl	$48, %edi
	call	putchar@PLT
	movl	$0, %eax
	jmp	.L33
.L16:
	movl	$1, -368(%rbp)
	movl	$1, -272(%rbp)
	movl	$0, -456(%rbp)
	jmp	.L17
.L32:
	movl	$1, -452(%rbp)
	jmp	.L18
.L19:
	movl	-452(%rbp), %eax
	cltq
	movl	$0, -368(%rbp,%rax,4)
	addl	$1, -452(%rbp)
.L18:
	cmpl	$23, -452(%rbp)
	jle	.L19
	movl	$0, -452(%rbp)
	jmp	.L20
.L25:
	movl	-452(%rbp), %eax
	movl	-456(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L21
	movl	-452(%rbp), %eax
	cltq
	movl	-256(%rbp,%rax,4), %eax
	cltq
	movl	-368(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L22
	movl	-452(%rbp), %eax
	cltq
	movl	-256(%rbp,%rax,4), %eax
	cltq
	movl	$1, -368(%rbp,%rax,4)
	jmp	.L23
.L22:
	movl	-452(%rbp), %eax
	cltq
	movl	-256(%rbp,%rax,4), %edx
	movl	$24, %eax
	subl	%edx, %eax
	cltq
	movl	$1, -368(%rbp,%rax,4)
	jmp	.L23
.L21:
	movl	-452(%rbp), %eax
	cltq
	movl	-256(%rbp,%rax,4), %edx
	movl	$24, %eax
	subl	%edx, %eax
	cltq
	movl	-368(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L24
	movl	-452(%rbp), %eax
	cltq
	movl	-256(%rbp,%rax,4), %edx
	movl	$24, %eax
	subl	%edx, %eax
	cltq
	movl	$1, -368(%rbp,%rax,4)
	jmp	.L23
.L24:
	movl	-452(%rbp), %eax
	cltq
	movl	-256(%rbp,%rax,4), %eax
	cltq
	movl	$1, -368(%rbp,%rax,4)
.L23:
	addl	$1, -452(%rbp)
.L20:
	movl	-460(%rbp), %eax
	cmpl	%eax, -452(%rbp)
	jl	.L25
	movl	$1, -444(%rbp)
	movl	$100, -440(%rbp)
	movl	$1, -452(%rbp)
	jmp	.L26
.L30:
	movl	-452(%rbp), %eax
	cltq
	movl	-368(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	jne	.L27
	movl	-444(%rbp), %eax
	cmpl	-440(%rbp), %eax
	jge	.L28
	movl	-444(%rbp), %eax
	movl	%eax, -440(%rbp)
.L28:
	movl	$1, -444(%rbp)
	jmp	.L29
.L27:
	addl	$1, -444(%rbp)
.L29:
	addl	$1, -452(%rbp)
.L26:
	cmpl	$24, -452(%rbp)
	jle	.L30
	movl	-436(%rbp), %eax
	cmpl	-440(%rbp), %eax
	jge	.L31
	movl	-440(%rbp), %eax
	movl	%eax, -436(%rbp)
.L31:
	addl	$1, -456(%rbp)
.L17:
	movl	-460(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	cmpl	%eax, -456(%rbp)
	jl	.L32
	movl	-436(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L33
.L10:
	movl	$0, -456(%rbp)
	jmp	.L34
.L38:
	cmpl	$0, -456(%rbp)
	jne	.L35
	movl	-456(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jle	.L36
	movl	$1, -448(%rbp)
	jmp	.L36
.L35:
	cmpl	$12, -456(%rbp)
	jne	.L37
	movl	-456(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	jle	.L36
	movl	$1, -448(%rbp)
	jmp	.L36
.L37:
	movl	-456(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	cmpl	$2, %eax
	jle	.L36
	movl	$1, -448(%rbp)
.L36:
	addl	$1, -456(%rbp)
.L34:
	cmpl	$12, -456(%rbp)
	jle	.L38
	cmpl	$1, -448(%rbp)
	jne	.L39
	movl	$48, %edi
	call	putchar@PLT
	jmp	.L40
.L39:
	movl	$49, %edi
	call	putchar@PLT
.L40:
	movl	$0, %eax
.L33:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L41
	call	__stack_chk_fail@PLT
.L41:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$464, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -448(%rbp)
	movl	$0, -444(%rbp)
	movl	$100, -440(%rbp)
	movl	$0, -436(%rbp)
	leaq	-460(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -456(%rbp)
	jmp	.L2
.L3:
	movl	-456(%rbp), %eax
	cltq
	movl	$0, -432(%rbp,%rax,4)
	addl	$1, -456(%rbp)
.L2:
	cmpl	$12, -456(%rbp)
	jle	.L3
	movl	$0, -456(%rbp)
	jmp	.L4
.L5:
	movl	-456(%rbp), %eax
	cltq
	movl	$0, -368(%rbp,%rax,4)
	addl	$1, -456(%rbp)
.L4:
	cmpl	$23, -456(%rbp)
	jle	.L5
	movl	$0, -456(%rbp)
	jmp	.L6
.L7:
	leaq	-256(%rbp), %rdx
	movl	-456(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-456(%rbp), %eax
	cltq
	movl	-256(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	movl	-432(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -432(%rbp,%rax,4)
	addl	$1, -456(%rbp)
.L6:
	movl	-460(%rbp), %eax
	cmpl	%eax, -456(%rbp)
	jl	.L7
	movl	-460(%rbp), %eax
	cmpl	$23, %eax
	jle	.L8
	movl	$48, %edi
	call	putchar@PLT
	movl	$0, %eax
	jmp	.L33
.L8:
	movl	-460(%rbp), %eax
	cmpl	$11, %eax
	jg	.L10
	movl	$0, -456(%rbp)
	jmp	.L11
.L15:
	cmpl	$0, -456(%rbp)
	jne	.L12
	movl	-456(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jle	.L13
	movl	$1, -448(%rbp)
	jmp	.L13
.L12:
	cmpl	$12, -456(%rbp)
	jne	.L14
	movl	-456(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	jle	.L13
	movl	$1, -448(%rbp)
	jmp	.L13
.L14:
	movl	-456(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	cmpl	$2, %eax
	jle	.L13
	movl	$1, -448(%rbp)
.L13:
	addl	$1, -456(%rbp)
.L11:
	cmpl	$12, -456(%rbp)
	jle	.L15
	cmpl	$1, -448(%rbp)
	jne	.L16
	movl	$48, %edi
	call	putchar@PLT
	movl	$0, %eax
	jmp	.L33
.L16:
	movl	$1, -368(%rbp)
	movl	$1, -272(%rbp)
	movl	$0, -456(%rbp)
	jmp	.L17
.L32:
	movl	$1, -452(%rbp)
	jmp	.L18
.L19:
	movl	-452(%rbp), %eax
	cltq
	movl	$0, -368(%rbp,%rax,4)
	addl	$1, -452(%rbp)
.L18:
	cmpl	$23, -452(%rbp)
	jle	.L19
	movl	$0, -452(%rbp)
	jmp	.L20
.L25:
	movl	-452(%rbp), %eax
	movl	-456(%rbp), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L21
	movl	-452(%rbp), %eax
	cltq
	movl	-256(%rbp,%rax,4), %eax
	cltq
	movl	-368(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L22
	movl	-452(%rbp), %eax
	cltq
	movl	-256(%rbp,%rax,4), %eax
	cltq
	movl	$1, -368(%rbp,%rax,4)
	jmp	.L23
.L22:
	movl	-452(%rbp), %eax
	cltq
	movl	-256(%rbp,%rax,4), %edx
	movl	$24, %eax
	subl	%edx, %eax
	cltq
	movl	$1, -368(%rbp,%rax,4)
	jmp	.L23
.L21:
	movl	-452(%rbp), %eax
	cltq
	movl	-256(%rbp,%rax,4), %edx
	movl	$24, %eax
	subl	%edx, %eax
	cltq
	movl	-368(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L24
	movl	-452(%rbp), %eax
	cltq
	movl	-256(%rbp,%rax,4), %edx
	movl	$24, %eax
	subl	%edx, %eax
	cltq
	movl	$1, -368(%rbp,%rax,4)
	jmp	.L23
.L24:
	movl	-452(%rbp), %eax
	cltq
	movl	-256(%rbp,%rax,4), %eax
	cltq
	movl	$1, -368(%rbp,%rax,4)
.L23:
	addl	$1, -452(%rbp)
.L20:
	movl	-460(%rbp), %eax
	cmpl	%eax, -452(%rbp)
	jl	.L25
	movl	$1, -444(%rbp)
	movl	$100, -440(%rbp)
	movl	$1, -452(%rbp)
	jmp	.L26
.L30:
	movl	-452(%rbp), %eax
	cltq
	movl	-368(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	jne	.L27
	movl	-444(%rbp), %eax
	cmpl	-440(%rbp), %eax
	jge	.L28
	movl	-444(%rbp), %eax
	movl	%eax, -440(%rbp)
.L28:
	movl	$1, -444(%rbp)
	jmp	.L29
.L27:
	addl	$1, -444(%rbp)
.L29:
	addl	$1, -452(%rbp)
.L26:
	cmpl	$24, -452(%rbp)
	jle	.L30
	movl	-436(%rbp), %eax
	cmpl	-440(%rbp), %eax
	jge	.L31
	movl	-440(%rbp), %eax
	movl	%eax, -436(%rbp)
.L31:
	addl	$1, -456(%rbp)
.L17:
	movl	-460(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	cmpl	%eax, -456(%rbp)
	jl	.L32
	movl	-436(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L33
.L10:
	movl	$0, -456(%rbp)
	jmp	.L34
.L38:
	cmpl	$0, -456(%rbp)
	jne	.L35
	movl	-456(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jle	.L36
	movl	$1, -448(%rbp)
	jmp	.L36
.L35:
	cmpl	$12, -456(%rbp)
	jne	.L37
	movl	-456(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	jle	.L36
	movl	$1, -448(%rbp)
	jmp	.L36
.L37:
	movl	-456(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	cmpl	$2, %eax
	jle	.L36
	movl	$1, -448(%rbp)
.L36:
	addl	$1, -456(%rbp)
.L34:
	cmpl	$12, -456(%rbp)
	jle	.L38
	cmpl	$1, -448(%rbp)
	jne	.L39
	movl	$48, %edi
	call	putchar@PLT
	jmp	.L40
.L39:
	movl	$49, %edi
	call	putchar@PLT
.L40:
	movl	$0, %eax
.L33:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L41
	call	__stack_chk_fail@PLT
.L41:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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:
