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>          // printf(), scanf()
#include <stdbool.h>

#define MAX_N 100
#define MAX_S 17
#define MAX_T 10

typedef struct time_tbl
{
	int no;
	int time;
	bool used;
} time_t;

time_t t[MAX_T];

int
main(int argc, char **argv)
{
	int s[MAX_S];
	int w[MAX_N];

	for (int i = 0; i < MAX_S; ++i)
		s[i] = -1;

	int time = 0;
	int ix = 0;
	for (int sn = 0;;)
	{
		int stime = 5 * sn;
		int k = (sn % 5 == 1) ? 5 : 2;
		int c = 0;
		int p = -1;
		for (int i = 0; i < MAX_S; ++i)
		{
			if (s[i] == -1)
			{
				if (p == -1)
					p = i;

				c++;
				if (c >= k)
					break;
			}
			else
			{
				c = 0;
				p = -1;
			}
		}

		int min;
		if (c >= k)
		{
			w[sn] = time - stime;
			for (int i = 0; i < c; ++i)
				s[p + i] = sn;

			int u;
			for (u = 0; u < ix; ++u)
			{
				if (!t[u].used)
					break;
			}

			if (u >= ix)
				u = ix++;

			int etime = 17 * (sn % 2) + 3 * (sn % 3) + 19;
			t[u].time = time + etime;
			t[u].no = sn;
			t[u].used = true;

			sn++;
			if (sn >= MAX_N)
				break;

			stime = 5 * sn;
			min = stime;
		}
		else
			min = 1000000000;

		for (int i = 0; i < ix; ++i)
		{
			if (t[i].used && t[i].time < min)
				min = t[i].time;
		}

		while(true)
		{
			int u;
			for (u = 0; u < ix; ++u)
			{
				if (t[u].used && t[u].time == min)
					break;
			}

			if (u >= ix)
				break;

			t[u].used = false;
			for (int i = 0; i < MAX_S; ++i)
			{
				if (s[i] == t[u].no)
					s[i] = -1;
			}
		}

		if (time < min)
			time = min;

		if (time < stime)
			time = stime;
	}

	int n;
	while (scanf("%d", &n) != EOF)
		printf("%d\n", w[n]);

	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	t
	.bss
	.align 32
	.type	t, @object
	.size	t, 120
t:
	.zero	120
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d"
	.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	$592, %rsp
	movl	%edi, -580(%rbp)
	movq	%rsi, -592(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -560(%rbp)
	jmp	.L2
.L3:
	movl	-560(%rbp), %eax
	cltq
	movl	$-1, -496(%rbp,%rax,4)
	addl	$1, -560(%rbp)
.L2:
	cmpl	$16, -560(%rbp)
	jle	.L3
	movl	$0, -556(%rbp)
	movl	$0, -552(%rbp)
	movl	$0, -548(%rbp)
.L38:
	movl	-548(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	movl	%eax, -544(%rbp)
	movl	-548(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	%eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	sall	$2, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cmpl	$1, %eax
	jne	.L4
	movl	$5, %eax
	jmp	.L5
.L4:
	movl	$2, %eax
.L5:
	movl	%eax, -504(%rbp)
	movl	$0, -540(%rbp)
	movl	$-1, -536(%rbp)
	movl	$0, -532(%rbp)
	jmp	.L6
.L11:
	movl	-532(%rbp), %eax
	cltq
	movl	-496(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	jne	.L7
	cmpl	$-1, -536(%rbp)
	jne	.L8
	movl	-532(%rbp), %eax
	movl	%eax, -536(%rbp)
.L8:
	addl	$1, -540(%rbp)
	movl	-540(%rbp), %eax
	cmpl	-504(%rbp), %eax
	jl	.L9
	jmp	.L10
.L7:
	movl	$0, -540(%rbp)
	movl	$-1, -536(%rbp)
.L9:
	addl	$1, -532(%rbp)
.L6:
	cmpl	$16, -532(%rbp)
	jle	.L11
.L10:
	movl	-540(%rbp), %eax
	cmpl	-504(%rbp), %eax
	jl	.L12
	movl	-556(%rbp), %eax
	subl	-544(%rbp), %eax
	movl	%eax, %edx
	movl	-548(%rbp), %eax
	cltq
	movl	%edx, -416(%rbp,%rax,4)
	movl	$0, -524(%rbp)
	jmp	.L13
.L14:
	movl	-536(%rbp), %edx
	movl	-524(%rbp), %eax
	addl	%edx, %eax
	cltq
	movl	-548(%rbp), %edx
	movl	%edx, -496(%rbp,%rax,4)
	addl	$1, -524(%rbp)
.L13:
	movl	-524(%rbp), %eax
	cmpl	-540(%rbp), %eax
	jl	.L14
	movl	$0, -520(%rbp)
	jmp	.L15
.L18:
	movl	-520(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+t(%rip), %rax
	movzbl	(%rdx,%rax), %eax
	xorl	$1, %eax
	testb	%al, %al
	jne	.L45
	addl	$1, -520(%rbp)
.L15:
	movl	-520(%rbp), %eax
	cmpl	-552(%rbp), %eax
	jl	.L18
	jmp	.L17
.L45:
	nop
.L17:
	movl	-520(%rbp), %eax
	cmpl	-552(%rbp), %eax
	jl	.L19
	movl	-552(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -552(%rbp)
	movl	%eax, -520(%rbp)
.L19:
	movl	-548(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	sall	$4, %eax
	leal	(%rax,%rdx), %esi
	movl	-548(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	addl	%edx, %edx
	addl	%edx, %eax
	addl	%esi, %eax
	addl	$19, %eax
	movl	%eax, -500(%rbp)
	movl	-556(%rbp), %edx
	movl	-500(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-520(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+t(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-520(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	t(%rip), %rdx
	movl	-548(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-520(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+t(%rip), %rax
	movb	$1, (%rdx,%rax)
	addl	$1, -548(%rbp)
	cmpl	$99, -548(%rbp)
	jg	.L46
	movl	-548(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	movl	%eax, -544(%rbp)
	movl	-544(%rbp), %eax
	movl	%eax, -528(%rbp)
	jmp	.L22
.L12:
	movl	$1000000000, -528(%rbp)
.L22:
	movl	$0, -516(%rbp)
	jmp	.L23
.L25:
	movl	-516(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+t(%rip), %rax
	movzbl	(%rdx,%rax), %eax
	testb	%al, %al
	je	.L24
	movl	-516(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+t(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -528(%rbp)
	jle	.L24
	movl	-516(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+t(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -528(%rbp)
.L24:
	addl	$1, -516(%rbp)
.L23:
	movl	-516(%rbp), %eax
	cmpl	-552(%rbp), %eax
	jl	.L25
.L35:
	movl	$0, -512(%rbp)
	jmp	.L26
.L29:
	movl	-512(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+t(%rip), %rax
	movzbl	(%rdx,%rax), %eax
	testb	%al, %al
	je	.L27
	movl	-512(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+t(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -528(%rbp)
	je	.L47
.L27:
	addl	$1, -512(%rbp)
.L26:
	movl	-512(%rbp), %eax
	cmpl	-552(%rbp), %eax
	jl	.L29
	jmp	.L28
.L47:
	nop
.L28:
	movl	-512(%rbp), %eax
	cmpl	-552(%rbp), %eax
	jge	.L48
	movl	-512(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+t(%rip), %rax
	movb	$0, (%rdx,%rax)
	movl	$0, -508(%rbp)
	jmp	.L32
.L34:
	movl	-508(%rbp), %eax
	cltq
	movl	-496(%rbp,%rax,4), %ecx
	movl	-512(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jne	.L33
	movl	-508(%rbp), %eax
	cltq
	movl	$-1, -496(%rbp,%rax,4)
.L33:
	addl	$1, -508(%rbp)
.L32:
	cmpl	$16, -508(%rbp)
	jle	.L34
	jmp	.L35
.L48:
	nop
	movl	-556(%rbp), %eax
	cmpl	-528(%rbp), %eax
	jge	.L36
	movl	-528(%rbp), %eax
	movl	%eax, -556(%rbp)
.L36:
	movl	-556(%rbp), %eax
	cmpl	-544(%rbp), %eax
	jge	.L38
	movl	-544(%rbp), %eax
	movl	%eax, -556(%rbp)
	jmp	.L38
.L46:
	nop
	jmp	.L39
.L40:
	movl	-564(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L39:
	leaq	-564(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L40
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L42
	call	__stack_chk_fail@PLT
.L42:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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\n"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pcmpeqd	%xmm0, %xmm0
	leaq	t(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	xorl	%r14d, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	xorl	%r13d, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$552, %rsp
	.cfi_def_cfa_offset 608
	movq	%fs:40, %rax
	movq	%rax, 536(%rsp)
	xorl	%eax, %eax
	movl	$-1, 112(%rsp)
	movq	$0, 24(%rsp)
	movaps	%xmm0, 48(%rsp)
	movaps	%xmm0, 64(%rsp)
	movaps	%xmm0, 80(%rsp)
	movaps	%xmm0, 96(%rsp)
	jmp	.L145
.L2:
	cmpl	$-1, 48(%rsp)
	je	.L422
	cmpl	$-1, 52(%rsp)
	je	.L8
.L411:
	cmpl	$-1, 56(%rsp)
	movl	$2, %ecx
	je	.L423
.L11:
	cmpl	$-1, 60(%rsp)
	je	.L424
.L13:
	cmpl	$-1, 64(%rsp)
	je	.L425
.L18:
	cmpl	$-1, 68(%rsp)
	je	.L426
.L22:
	cmpl	$-1, 72(%rsp)
	je	.L427
.L26:
	cmpl	$-1, 76(%rsp)
	je	.L428
.L30:
	cmpl	$-1, 80(%rsp)
	je	.L429
.L34:
	cmpl	$-1, 84(%rsp)
	je	.L430
.L38:
	cmpl	$-1, 88(%rsp)
	je	.L431
.L42:
	cmpl	$-1, 92(%rsp)
	je	.L432
.L46:
	cmpl	$-1, 96(%rsp)
	je	.L433
.L50:
	cmpl	$-1, 100(%rsp)
	je	.L434
.L54:
	cmpl	$-1, 104(%rsp)
	je	.L435
.L58:
	cmpl	$-1, 108(%rsp)
	je	.L436
.L62:
	movl	$1000000000, %edi
	testl	%r13d, %r13d
	je	.L73
.L72:
	cmpb	$0, 8+t(%rip)
	je	.L74
	movl	4+t(%rip), %eax
	cmpl	%eax, %edi
	cmovg	%eax, %edi
.L74:
	cmpl	$1, %r13d
	je	.L73
	cmpb	$0, 20+t(%rip)
	je	.L76
	movl	16+t(%rip), %eax
	cmpl	%eax, %edi
	cmovg	%eax, %edi
.L76:
	cmpl	$2, %r13d
	je	.L73
	cmpb	$0, 32+t(%rip)
	je	.L77
	movl	28+t(%rip), %eax
	cmpl	%eax, %edi
	cmovg	%eax, %edi
.L77:
	cmpl	$3, %r13d
	je	.L73
	cmpb	$0, 44+t(%rip)
	je	.L78
	movl	40+t(%rip), %eax
	cmpl	%eax, %edi
	cmovg	%eax, %edi
.L78:
	cmpl	$4, %r13d
	je	.L73
	cmpb	$0, 56+t(%rip)
	je	.L79
	movl	52+t(%rip), %eax
	cmpl	%eax, %edi
	cmovg	%eax, %edi
.L79:
	cmpl	$5, %r13d
	je	.L73
	cmpb	$0, 68+t(%rip)
	je	.L80
	movl	64+t(%rip), %eax
	cmpl	%eax, %edi
	cmovg	%eax, %edi
.L80:
	cmpl	$6, %r13d
	je	.L73
	cmpb	$0, 80+t(%rip)
	je	.L81
	movl	76+t(%rip), %eax
	cmpl	%eax, %edi
	cmovg	%eax, %edi
.L81:
	cmpl	$7, %r13d
	je	.L73
	cmpb	$0, 92+t(%rip)
	je	.L82
	movl	88+t(%rip), %eax
	cmpl	%eax, %edi
	cmovg	%eax, %edi
.L82:
	cmpl	$8, %r13d
	je	.L73
	cmpb	$0, 104+t(%rip)
	je	.L83
	movl	100+t(%rip), %eax
	cmpl	%eax, %edi
	cmovg	%eax, %edi
.L83:
	cmpl	$9, %r13d
	je	.L73
	cmpb	$0, 116+t(%rip)
	je	.L73
	movl	112+t(%rip), %eax
	cmpl	%eax, %edi
	cmovg	%eax, %edi
.L73:
	movl	76+t(%rip), %eax
	movl	4+t(%rip), %r8d
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	16+t(%rip), %r9d
	movl	28+t(%rip), %r10d
	xorl	%esi, %esi
	movl	52+t(%rip), %ebx
	movl	64+t(%rip), %ebp
	movl	%eax, 4(%rsp)
	movl	88+t(%rip), %eax
	movl	40+t(%rip), %r11d
	movdqa	48(%rsp), %xmm4
	movdqa	64(%rsp), %xmm3
	movdqa	80(%rsp), %xmm2
	movdqa	96(%rsp), %xmm1
	movl	%eax, 8(%rsp)
	movl	100+t(%rip), %eax
	movl	%eax, 12(%rsp)
	movl	112+t(%rip), %eax
	movl	%eax, 16(%rsp)
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L144:
	testl	%r13d, %r13d
	je	.L418
	cmpb	$0, 8+t(%rip)
	je	.L91
	cmpl	%r8d, %edi
	je	.L178
.L91:
	cmpl	$1, %r13d
	je	.L418
	cmpb	$0, 20+t(%rip)
	je	.L97
	cmpl	%r9d, %edi
	je	.L179
.L97:
	cmpl	$2, %r13d
	je	.L418
	cmpb	$0, 32+t(%rip)
	je	.L102
	cmpl	%r10d, %edi
	je	.L180
.L102:
	cmpl	$3, %r13d
	je	.L418
	cmpb	$0, 44+t(%rip)
	je	.L107
	cmpl	%r11d, %edi
	je	.L181
.L107:
	cmpl	$4, %r13d
	je	.L418
	cmpb	$0, 56+t(%rip)
	je	.L112
	cmpl	%ebx, %edi
	je	.L182
.L112:
	cmpl	$5, %r13d
	je	.L418
	cmpb	$0, 68+t(%rip)
	je	.L117
	cmpl	%ebp, %edi
	je	.L183
.L117:
	cmpl	$6, %r13d
	je	.L418
	cmpb	$0, 80+t(%rip)
	je	.L122
	cmpl	4(%rsp), %edi
	je	.L184
.L122:
	cmpl	$7, %r13d
	je	.L418
	cmpb	$0, 92+t(%rip)
	je	.L127
	cmpl	8(%rsp), %edi
	je	.L185
.L127:
	cmpl	$8, %r13d
	je	.L418
	cmpb	$0, 104+t(%rip)
	je	.L132
	cmpl	12(%rsp), %edi
	je	.L186
.L132:
	cmpl	$9, %r13d
	je	.L418
	cmpb	$0, 116+t(%rip)
	je	.L418
	cmpl	%edi, 16(%rsp)
	je	.L187
.L418:
	testb	%al, %al
	je	.L141
	movaps	%xmm1, 96(%rsp)
.L141:
	testb	%dl, %dl
	je	.L142
	movaps	%xmm2, 80(%rsp)
.L142:
	testb	%cl, %cl
	je	.L143
	movaps	%xmm3, 64(%rsp)
.L143:
	testb	%sil, %sil
	je	.L90
	movaps	%xmm4, 48(%rsp)
.L90:
	movl	20(%rsp), %eax
	cmpl	%eax, %edi
	cmovl	%eax, %edi
	cmpl	%edi, %r14d
	cmovl	%edi, %r14d
.L145:
	movl	$3435973837, %eax
	leal	(%r12,%r12,4), %edi
	imulq	24(%rsp), %rax
	movl	%edi, 20(%rsp)
	shrq	$34, %rax
	leal	(%rax,%rax,4), %edx
	movl	%r12d, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L2
	cmpl	$-1, 48(%rsp)
	je	.L437
	cmpl	$-1, 52(%rsp)
	je	.L9
.L412:
	cmpl	$-1, 56(%rsp)
	movl	$5, %ecx
	jne	.L11
.L423:
	cmpl	$-1, 60(%rsp)
	jne	.L13
	movl	$1, %edx
	movl	$2, %eax
.L12:
	addl	$1, %edx
	cmpl	%ecx, %edx
	jge	.L15
	cmpl	$-1, 64(%rsp)
	jne	.L18
.L17:
	addl	$1, %edx
	cmpl	%ecx, %edx
	jge	.L15
	cmpl	$-1, 68(%rsp)
	jne	.L22
.L21:
	addl	$1, %edx
	cmpl	%ecx, %edx
	jge	.L15
	cmpl	$-1, 72(%rsp)
	jne	.L26
.L25:
	addl	$1, %edx
	cmpl	%ecx, %edx
	jge	.L15
	cmpl	$-1, 76(%rsp)
	je	.L29
	cmpl	$-1, 80(%rsp)
	jne	.L34
.L429:
	cmpl	$-1, 84(%rsp)
	jne	.L38
	movl	$1, %edx
	movl	$8, %eax
.L37:
	addl	$1, %edx
	cmpl	%ecx, %edx
	jge	.L15
	cmpl	$-1, 88(%rsp)
	jne	.L42
.L41:
	addl	$1, %edx
	cmpl	%ecx, %edx
	jge	.L15
	cmpl	$-1, 92(%rsp)
	jne	.L46
.L45:
	addl	$1, %edx
	cmpl	%ecx, %edx
	jge	.L15
	cmpl	$-1, 96(%rsp)
	jne	.L50
.L49:
	addl	$1, %edx
	cmpl	%ecx, %edx
	jge	.L15
	cmpl	$-1, 100(%rsp)
	jne	.L54
.L53:
	addl	$1, %edx
	cmpl	%ecx, %edx
	jge	.L15
	cmpl	$-1, 104(%rsp)
	jne	.L58
.L57:
	addl	$1, %edx
	cmpl	%ecx, %edx
	jge	.L15
	cmpl	$-1, 108(%rsp)
	jne	.L62
.L61:
	addl	$1, %edx
	cmpl	%ecx, %edx
	jge	.L15
	cmpl	$-1, 112(%rsp)
	jne	.L62
.L65:
	addl	$1, %edx
	cmpl	%ecx, %edx
	jl	.L62
.L15:
	movl	%r14d, %esi
	movslq	%r12d, %rcx
	subl	%edi, %esi
	testl	%edx, %edx
	movl	%esi, 128(%rsp,%rcx,4)
	movl	$1, %ecx
	cmovg	%edx, %ecx
	cmpl	$3, %edx
	jle	.L66
	movd	%r12d, %xmm7
	movslq	%eax, %rdx
	pshufd	$0, %xmm7, %xmm0
	movups	%xmm0, 48(%rsp,%rdx,4)
	cmpl	$4, %ecx
	je	.L67
	addl	$4, %eax
	cltq
	movl	%r12d, 48(%rsp,%rax,4)
	jmp	.L67
.L178:
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L92:
	leaq	(%rax,%rax,2), %rax
	movl	$1, %ecx
	movl	$1, %esi
	leaq	(%r15,%rax,4), %rax
	movl	(%rax), %edx
	movb	$0, 8(%rax)
	movl	112(%rsp), %eax
	movd	%edx, %xmm6
	pshufd	$0, %xmm6, %xmm0
	cmpl	%eax, %edx
	movl	$-1, %edx
	movdqa	%xmm0, %xmm5
	cmove	%edx, %eax
	movl	$1, %edx
	pcmpeqd	%xmm4, %xmm5
	movl	%eax, 112(%rsp)
	movl	$1, %eax
	por	%xmm5, %xmm4
	movdqa	%xmm0, %xmm5
	pcmpeqd	%xmm3, %xmm5
	por	%xmm5, %xmm3
	movdqa	%xmm0, %xmm5
	pcmpeqd	%xmm2, %xmm5
	pcmpeqd	%xmm1, %xmm0
	por	%xmm5, %xmm2
	por	%xmm0, %xmm1
	jmp	.L144
.L179:
	movl	$1, %eax
	jmp	.L92
.L180:
	movl	$2, %eax
	jmp	.L92
.L422:
	cmpl	$-1, 52(%rsp)
	jne	.L411
	xorl	%eax, %eax
.L6:
	movl	%r14d, %ecx
	movslq	%r12d, %rdx
	subl	%edi, %ecx
	movl	%ecx, 128(%rsp,%rdx,4)
	movl	$2, %edx
.L66:
	movslq	%eax, %rcx
	movl	%r12d, 48(%rsp,%rcx,4)
	leal	1(%rax), %ecx
	movslq	%ecx, %rcx
	movl	%r12d, 48(%rsp,%rcx,4)
	cmpl	$3, %edx
	jne	.L67
	addl	$2, %eax
	cltq
	movl	%r12d, 48(%rsp,%rax,4)
.L67:
	testl	%r13d, %r13d
	je	.L69
	cmpb	$0, 8+t(%rip)
	je	.L168
	cmpl	$1, %r13d
	je	.L69
	cmpb	$0, 20+t(%rip)
	je	.L169
	cmpl	$2, %r13d
	je	.L69
	cmpb	$0, 32+t(%rip)
	je	.L170
	cmpl	$3, %r13d
	je	.L69
	cmpb	$0, 44+t(%rip)
	je	.L171
	cmpl	$4, %r13d
	je	.L69
	cmpb	$0, 56+t(%rip)
	je	.L172
	cmpl	$5, %r13d
	je	.L69
	cmpb	$0, 68+t(%rip)
	je	.L173
	cmpl	$6, %r13d
	je	.L69
	cmpb	$0, 80+t(%rip)
	je	.L174
	cmpl	$7, %r13d
	je	.L69
	cmpb	$0, 92+t(%rip)
	je	.L175
	cmpl	$8, %r13d
	je	.L69
	cmpb	$0, 104+t(%rip)
	je	.L176
	cmpl	$9, %r13d
	je	.L69
	cmpb	$0, 116+t(%rip)
	movl	$9, %eax
	je	.L147
.L69:
	movslq	%r13d, %rax
	addl	$1, %r13d
.L147:
	movl	%r12d, %edx
	movd	%r12d, %xmm0
	leaq	(%rax,%rax,2), %rax
	andl	$1, %edx
	movb	$1, 8(%r15,%rax,4)
	movl	%edx, %ecx
	sall	$4, %ecx
	addl	%edx, %ecx
	movl	$2863311531, %edx
	imulq	24(%rsp), %rdx
	shrq	$33, %rdx
	leal	(%rdx,%rdx,2), %esi
	movl	%r12d, %edx
	addl	$1, %r12d
	subl	%esi, %edx
	leal	(%rdx,%rdx,2), %edx
	leal	19(%rcx,%rdx), %edx
	addl	%r14d, %edx
	movd	%edx, %xmm7
	punpckldq	%xmm7, %xmm0
	movq	%xmm0, (%r15,%rax,4)
	cmpl	$99, %r12d
	jg	.L438
	addl	$5, %edi
	movl	%r12d, %eax
	movl	%edi, 20(%rsp)
	movq	%rax, 24(%rsp)
	jmp	.L72
.L181:
	movl	$3, %eax
	jmp	.L92
.L182:
	movl	$4, %eax
	jmp	.L92
.L183:
	movl	$5, %eax
	jmp	.L92
.L184:
	movl	$6, %eax
	jmp	.L92
.L185:
	movl	$7, %eax
	jmp	.L92
.L187:
	movl	$9, %eax
	jmp	.L92
.L437:
	cmpl	$-1, 52(%rsp)
	jne	.L412
	cmpl	$-1, 56(%rsp)
	je	.L188
.L413:
	cmpl	$-1, 60(%rsp)
	movl	$5, %ecx
	jne	.L13
.L424:
	cmpl	$-1, 64(%rsp)
	jne	.L18
	movl	$1, %edx
	movl	$3, %eax
	jmp	.L17
.L427:
	cmpl	$-1, 76(%rsp)
	jne	.L30
	movl	$1, %edx
	movl	$6, %eax
.L29:
	addl	$1, %edx
	cmpl	%ecx, %edx
	jge	.L15
	cmpl	$-1, 80(%rsp)
	jne	.L34
.L33:
	addl	$1, %edx
	cmpl	%ecx, %edx
	jge	.L15
	cmpl	$-1, 84(%rsp)
	je	.L37
	cmpl	$-1, 88(%rsp)
	jne	.L42
.L431:
	cmpl	$-1, 92(%rsp)
	jne	.L46
	movl	$1, %edx
	movl	$10, %eax
	jmp	.L45
.L186:
	movl	$8, %eax
	jmp	.L92
.L425:
	cmpl	$-1, 68(%rsp)
	jne	.L22
	movl	$1, %edx
	movl	$4, %eax
	jmp	.L21
.L426:
	cmpl	$-1, 72(%rsp)
	jne	.L26
	movl	$1, %edx
	movl	$5, %eax
	jmp	.L25
.L434:
	cmpl	$-1, 104(%rsp)
	jne	.L58
	movl	$1, %edx
	movl	$13, %eax
	jmp	.L57
.L433:
	cmpl	$-1, 100(%rsp)
	jne	.L54
	movl	$1, %edx
	movl	$12, %eax
	jmp	.L53
.L432:
	cmpl	$-1, 96(%rsp)
	jne	.L50
	movl	$1, %edx
	movl	$11, %eax
	jmp	.L49
.L430:
	cmpl	$-1, 88(%rsp)
	jne	.L42
	movl	$1, %edx
	movl	$9, %eax
	jmp	.L41
.L428:
	cmpl	$-1, 80(%rsp)
	jne	.L34
	movl	$1, %edx
	movl	$7, %eax
	jmp	.L33
.L435:
	cmpl	$-1, 108(%rsp)
	jne	.L62
	movl	$1, %edx
	movl	$14, %eax
	jmp	.L61
.L436:
	cmpl	$-1, 112(%rsp)
	jne	.L62
	movl	$1, %edx
	movl	$15, %eax
	jmp	.L65
.L9:
	cmpl	$-1, 56(%rsp)
	jne	.L413
	movl	$2, %edx
.L149:
	cmpl	$-1, 60(%rsp)
	movl	$5, %ecx
	jne	.L13
	jmp	.L12
.L188:
	movl	$3, %edx
	xorl	%eax, %eax
	jmp	.L149
.L438:
	leaq	44(%rsp), %r12
	leaq	.LC1(%rip), %rbp
	leaq	.LC0(%rip), %rbx
	jmp	.L71
.L146:
	movslq	44(%rsp), %rax
	movq	%rbx, %rsi
	movl	$1, %edi
	movl	128(%rsp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L71:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L146
	movq	536(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L439
	addq	$552, %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
.L8:
	.cfi_restore_state
	cmpl	$-1, 56(%rsp)
	je	.L189
	movl	$2, %ecx
	jmp	.L11
.L168:
	xorl	%eax, %eax
	jmp	.L147
.L170:
	movl	$2, %eax
	jmp	.L147
.L169:
	movl	$1, %eax
	jmp	.L147
.L172:
	movl	$4, %eax
	jmp	.L147
.L171:
	movl	$3, %eax
	jmp	.L147
.L175:
	movl	$7, %eax
	jmp	.L147
.L174:
	movl	$6, %eax
	jmp	.L147
.L173:
	movl	$5, %eax
	jmp	.L147
.L176:
	movl	$8, %eax
	jmp	.L147
.L439:
	call	__stack_chk_fail@PLT
.L189:
	movl	$1, %eax
	jmp	.L6
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	t
	.bss
	.align 32
	.type	t, @object
	.size	t, 120
t:
	.zero	120
	.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\n"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pcmpeqd	%xmm0, %xmm0
	leaq	t(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	xorl	%r14d, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	xorl	%r13d, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$552, %rsp
	.cfi_def_cfa_offset 608
	movq	%fs:40, %rax
	movq	%rax, 536(%rsp)
	xorl	%eax, %eax
	movl	$-1, 112(%rsp)
	movq	$0, 24(%rsp)
	movaps	%xmm0, 48(%rsp)
	movaps	%xmm0, 64(%rsp)
	movaps	%xmm0, 80(%rsp)
	movaps	%xmm0, 96(%rsp)
	jmp	.L145
.L2:
	cmpl	$-1, 48(%rsp)
	je	.L422
	cmpl	$-1, 52(%rsp)
	je	.L8
.L411:
	cmpl	$-1, 56(%rsp)
	movl	$2, %ecx
	je	.L423
.L11:
	cmpl	$-1, 60(%rsp)
	je	.L424
.L13:
	cmpl	$-1, 64(%rsp)
	je	.L425
.L18:
	cmpl	$-1, 68(%rsp)
	je	.L426
.L22:
	cmpl	$-1, 72(%rsp)
	je	.L427
.L26:
	cmpl	$-1, 76(%rsp)
	je	.L428
.L30:
	cmpl	$-1, 80(%rsp)
	je	.L429
.L34:
	cmpl	$-1, 84(%rsp)
	je	.L430
.L38:
	cmpl	$-1, 88(%rsp)
	je	.L431
.L42:
	cmpl	$-1, 92(%rsp)
	je	.L432
.L46:
	cmpl	$-1, 96(%rsp)
	je	.L433
.L50:
	cmpl	$-1, 100(%rsp)
	je	.L434
.L54:
	cmpl	$-1, 104(%rsp)
	je	.L435
.L58:
	cmpl	$-1, 108(%rsp)
	je	.L436
.L62:
	movl	$1000000000, %edi
	testl	%r13d, %r13d
	je	.L73
.L72:
	cmpb	$0, 8+t(%rip)
	je	.L74
	movl	4+t(%rip), %eax
	cmpl	%eax, %edi
	cmovg	%eax, %edi
.L74:
	cmpl	$1, %r13d
	je	.L73
	cmpb	$0, 20+t(%rip)
	je	.L76
	movl	16+t(%rip), %eax
	cmpl	%eax, %edi
	cmovg	%eax, %edi
.L76:
	cmpl	$2, %r13d
	je	.L73
	cmpb	$0, 32+t(%rip)
	je	.L77
	movl	28+t(%rip), %eax
	cmpl	%eax, %edi
	cmovg	%eax, %edi
.L77:
	cmpl	$3, %r13d
	je	.L73
	cmpb	$0, 44+t(%rip)
	je	.L78
	movl	40+t(%rip), %eax
	cmpl	%eax, %edi
	cmovg	%eax, %edi
.L78:
	cmpl	$4, %r13d
	je	.L73
	cmpb	$0, 56+t(%rip)
	je	.L79
	movl	52+t(%rip), %eax
	cmpl	%eax, %edi
	cmovg	%eax, %edi
.L79:
	cmpl	$5, %r13d
	je	.L73
	cmpb	$0, 68+t(%rip)
	je	.L80
	movl	64+t(%rip), %eax
	cmpl	%eax, %edi
	cmovg	%eax, %edi
.L80:
	cmpl	$6, %r13d
	je	.L73
	cmpb	$0, 80+t(%rip)
	je	.L81
	movl	76+t(%rip), %eax
	cmpl	%eax, %edi
	cmovg	%eax, %edi
.L81:
	cmpl	$7, %r13d
	je	.L73
	cmpb	$0, 92+t(%rip)
	je	.L82
	movl	88+t(%rip), %eax
	cmpl	%eax, %edi
	cmovg	%eax, %edi
.L82:
	cmpl	$8, %r13d
	je	.L73
	cmpb	$0, 104+t(%rip)
	je	.L83
	movl	100+t(%rip), %eax
	cmpl	%eax, %edi
	cmovg	%eax, %edi
.L83:
	cmpl	$9, %r13d
	je	.L73
	cmpb	$0, 116+t(%rip)
	je	.L73
	movl	112+t(%rip), %eax
	cmpl	%eax, %edi
	cmovg	%eax, %edi
.L73:
	movl	76+t(%rip), %eax
	movl	4+t(%rip), %r8d
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	16+t(%rip), %r9d
	movl	28+t(%rip), %r10d
	xorl	%esi, %esi
	movl	52+t(%rip), %ebx
	movl	64+t(%rip), %ebp
	movl	%eax, 4(%rsp)
	movl	88+t(%rip), %eax
	movl	40+t(%rip), %r11d
	movdqa	48(%rsp), %xmm4
	movdqa	64(%rsp), %xmm3
	movdqa	80(%rsp), %xmm2
	movdqa	96(%rsp), %xmm1
	movl	%eax, 8(%rsp)
	movl	100+t(%rip), %eax
	movl	%eax, 12(%rsp)
	movl	112+t(%rip), %eax
	movl	%eax, 16(%rsp)
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L144:
	testl	%r13d, %r13d
	je	.L418
	cmpb	$0, 8+t(%rip)
	je	.L91
	cmpl	%r8d, %edi
	je	.L178
.L91:
	cmpl	$1, %r13d
	je	.L418
	cmpb	$0, 20+t(%rip)
	je	.L97
	cmpl	%r9d, %edi
	je	.L179
.L97:
	cmpl	$2, %r13d
	je	.L418
	cmpb	$0, 32+t(%rip)
	je	.L102
	cmpl	%r10d, %edi
	je	.L180
.L102:
	cmpl	$3, %r13d
	je	.L418
	cmpb	$0, 44+t(%rip)
	je	.L107
	cmpl	%r11d, %edi
	je	.L181
.L107:
	cmpl	$4, %r13d
	je	.L418
	cmpb	$0, 56+t(%rip)
	je	.L112
	cmpl	%ebx, %edi
	je	.L182
.L112:
	cmpl	$5, %r13d
	je	.L418
	cmpb	$0, 68+t(%rip)
	je	.L117
	cmpl	%ebp, %edi
	je	.L183
.L117:
	cmpl	$6, %r13d
	je	.L418
	cmpb	$0, 80+t(%rip)
	je	.L122
	cmpl	4(%rsp), %edi
	je	.L184
.L122:
	cmpl	$7, %r13d
	je	.L418
	cmpb	$0, 92+t(%rip)
	je	.L127
	cmpl	8(%rsp), %edi
	je	.L185
.L127:
	cmpl	$8, %r13d
	je	.L418
	cmpb	$0, 104+t(%rip)
	je	.L132
	cmpl	12(%rsp), %edi
	je	.L186
.L132:
	cmpl	$9, %r13d
	je	.L418
	cmpb	$0, 116+t(%rip)
	je	.L418
	cmpl	%edi, 16(%rsp)
	je	.L187
.L418:
	testb	%al, %al
	je	.L141
	movaps	%xmm1, 96(%rsp)
.L141:
	testb	%dl, %dl
	je	.L142
	movaps	%xmm2, 80(%rsp)
.L142:
	testb	%cl, %cl
	je	.L143
	movaps	%xmm3, 64(%rsp)
.L143:
	testb	%sil, %sil
	je	.L90
	movaps	%xmm4, 48(%rsp)
.L90:
	movl	20(%rsp), %eax
	cmpl	%eax, %edi
	cmovl	%eax, %edi
	cmpl	%edi, %r14d
	cmovl	%edi, %r14d
.L145:
	movl	$3435973837, %eax
	leal	(%r12,%r12,4), %edi
	imulq	24(%rsp), %rax
	movl	%edi, 20(%rsp)
	shrq	$34, %rax
	leal	(%rax,%rax,4), %edx
	movl	%r12d, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L2
	cmpl	$-1, 48(%rsp)
	je	.L437
	cmpl	$-1, 52(%rsp)
	je	.L9
.L412:
	cmpl	$-1, 56(%rsp)
	movl	$5, %ecx
	jne	.L11
.L423:
	cmpl	$-1, 60(%rsp)
	jne	.L13
	movl	$1, %edx
	movl	$2, %eax
.L12:
	addl	$1, %edx
	cmpl	%ecx, %edx
	jge	.L15
	cmpl	$-1, 64(%rsp)
	jne	.L18
.L17:
	addl	$1, %edx
	cmpl	%ecx, %edx
	jge	.L15
	cmpl	$-1, 68(%rsp)
	jne	.L22
.L21:
	addl	$1, %edx
	cmpl	%ecx, %edx
	jge	.L15
	cmpl	$-1, 72(%rsp)
	jne	.L26
.L25:
	addl	$1, %edx
	cmpl	%ecx, %edx
	jge	.L15
	cmpl	$-1, 76(%rsp)
	je	.L29
	cmpl	$-1, 80(%rsp)
	jne	.L34
.L429:
	cmpl	$-1, 84(%rsp)
	jne	.L38
	movl	$1, %edx
	movl	$8, %eax
.L37:
	addl	$1, %edx
	cmpl	%ecx, %edx
	jge	.L15
	cmpl	$-1, 88(%rsp)
	jne	.L42
.L41:
	addl	$1, %edx
	cmpl	%ecx, %edx
	jge	.L15
	cmpl	$-1, 92(%rsp)
	jne	.L46
.L45:
	addl	$1, %edx
	cmpl	%ecx, %edx
	jge	.L15
	cmpl	$-1, 96(%rsp)
	jne	.L50
.L49:
	addl	$1, %edx
	cmpl	%ecx, %edx
	jge	.L15
	cmpl	$-1, 100(%rsp)
	jne	.L54
.L53:
	addl	$1, %edx
	cmpl	%ecx, %edx
	jge	.L15
	cmpl	$-1, 104(%rsp)
	jne	.L58
.L57:
	addl	$1, %edx
	cmpl	%ecx, %edx
	jge	.L15
	cmpl	$-1, 108(%rsp)
	jne	.L62
.L61:
	addl	$1, %edx
	cmpl	%ecx, %edx
	jge	.L15
	cmpl	$-1, 112(%rsp)
	jne	.L62
.L65:
	addl	$1, %edx
	cmpl	%ecx, %edx
	jl	.L62
.L15:
	movl	%r14d, %esi
	movslq	%r12d, %rcx
	subl	%edi, %esi
	testl	%edx, %edx
	movl	%esi, 128(%rsp,%rcx,4)
	movl	$1, %ecx
	cmovg	%edx, %ecx
	cmpl	$3, %edx
	jle	.L66
	movd	%r12d, %xmm7
	movslq	%eax, %rdx
	pshufd	$0, %xmm7, %xmm0
	movups	%xmm0, 48(%rsp,%rdx,4)
	cmpl	$4, %ecx
	je	.L67
	addl	$4, %eax
	cltq
	movl	%r12d, 48(%rsp,%rax,4)
	jmp	.L67
.L178:
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L92:
	leaq	(%rax,%rax,2), %rax
	movl	$1, %ecx
	movl	$1, %esi
	leaq	(%r15,%rax,4), %rax
	movl	(%rax), %edx
	movb	$0, 8(%rax)
	movl	112(%rsp), %eax
	movd	%edx, %xmm6
	pshufd	$0, %xmm6, %xmm0
	cmpl	%eax, %edx
	movl	$-1, %edx
	movdqa	%xmm0, %xmm5
	cmove	%edx, %eax
	movl	$1, %edx
	pcmpeqd	%xmm4, %xmm5
	movl	%eax, 112(%rsp)
	movl	$1, %eax
	por	%xmm5, %xmm4
	movdqa	%xmm0, %xmm5
	pcmpeqd	%xmm3, %xmm5
	por	%xmm5, %xmm3
	movdqa	%xmm0, %xmm5
	pcmpeqd	%xmm2, %xmm5
	pcmpeqd	%xmm1, %xmm0
	por	%xmm5, %xmm2
	por	%xmm0, %xmm1
	jmp	.L144
.L179:
	movl	$1, %eax
	jmp	.L92
.L180:
	movl	$2, %eax
	jmp	.L92
.L422:
	cmpl	$-1, 52(%rsp)
	jne	.L411
	xorl	%eax, %eax
.L6:
	movl	%r14d, %ecx
	movslq	%r12d, %rdx
	subl	%edi, %ecx
	movl	%ecx, 128(%rsp,%rdx,4)
	movl	$2, %edx
.L66:
	movslq	%eax, %rcx
	movl	%r12d, 48(%rsp,%rcx,4)
	leal	1(%rax), %ecx
	movslq	%ecx, %rcx
	movl	%r12d, 48(%rsp,%rcx,4)
	cmpl	$3, %edx
	jne	.L67
	addl	$2, %eax
	cltq
	movl	%r12d, 48(%rsp,%rax,4)
.L67:
	testl	%r13d, %r13d
	je	.L69
	cmpb	$0, 8+t(%rip)
	je	.L168
	cmpl	$1, %r13d
	je	.L69
	cmpb	$0, 20+t(%rip)
	je	.L169
	cmpl	$2, %r13d
	je	.L69
	cmpb	$0, 32+t(%rip)
	je	.L170
	cmpl	$3, %r13d
	je	.L69
	cmpb	$0, 44+t(%rip)
	je	.L171
	cmpl	$4, %r13d
	je	.L69
	cmpb	$0, 56+t(%rip)
	je	.L172
	cmpl	$5, %r13d
	je	.L69
	cmpb	$0, 68+t(%rip)
	je	.L173
	cmpl	$6, %r13d
	je	.L69
	cmpb	$0, 80+t(%rip)
	je	.L174
	cmpl	$7, %r13d
	je	.L69
	cmpb	$0, 92+t(%rip)
	je	.L175
	cmpl	$8, %r13d
	je	.L69
	cmpb	$0, 104+t(%rip)
	je	.L176
	cmpl	$9, %r13d
	je	.L69
	cmpb	$0, 116+t(%rip)
	movl	$9, %eax
	je	.L147
.L69:
	movslq	%r13d, %rax
	addl	$1, %r13d
.L147:
	movl	%r12d, %edx
	movd	%r12d, %xmm0
	leaq	(%rax,%rax,2), %rax
	andl	$1, %edx
	movb	$1, 8(%r15,%rax,4)
	movl	%edx, %ecx
	sall	$4, %ecx
	addl	%edx, %ecx
	movl	$2863311531, %edx
	imulq	24(%rsp), %rdx
	shrq	$33, %rdx
	leal	(%rdx,%rdx,2), %esi
	movl	%r12d, %edx
	addl	$1, %r12d
	subl	%esi, %edx
	leal	(%rdx,%rdx,2), %edx
	leal	19(%rcx,%rdx), %edx
	addl	%r14d, %edx
	movd	%edx, %xmm7
	punpckldq	%xmm7, %xmm0
	movq	%xmm0, (%r15,%rax,4)
	cmpl	$99, %r12d
	jg	.L438
	addl	$5, %edi
	movl	%r12d, %eax
	movl	%edi, 20(%rsp)
	movq	%rax, 24(%rsp)
	jmp	.L72
.L181:
	movl	$3, %eax
	jmp	.L92
.L182:
	movl	$4, %eax
	jmp	.L92
.L183:
	movl	$5, %eax
	jmp	.L92
.L184:
	movl	$6, %eax
	jmp	.L92
.L185:
	movl	$7, %eax
	jmp	.L92
.L187:
	movl	$9, %eax
	jmp	.L92
.L437:
	cmpl	$-1, 52(%rsp)
	jne	.L412
	cmpl	$-1, 56(%rsp)
	je	.L188
.L413:
	cmpl	$-1, 60(%rsp)
	movl	$5, %ecx
	jne	.L13
.L424:
	cmpl	$-1, 64(%rsp)
	jne	.L18
	movl	$1, %edx
	movl	$3, %eax
	jmp	.L17
.L427:
	cmpl	$-1, 76(%rsp)
	jne	.L30
	movl	$1, %edx
	movl	$6, %eax
.L29:
	addl	$1, %edx
	cmpl	%ecx, %edx
	jge	.L15
	cmpl	$-1, 80(%rsp)
	jne	.L34
.L33:
	addl	$1, %edx
	cmpl	%ecx, %edx
	jge	.L15
	cmpl	$-1, 84(%rsp)
	je	.L37
	cmpl	$-1, 88(%rsp)
	jne	.L42
.L431:
	cmpl	$-1, 92(%rsp)
	jne	.L46
	movl	$1, %edx
	movl	$10, %eax
	jmp	.L45
.L186:
	movl	$8, %eax
	jmp	.L92
.L425:
	cmpl	$-1, 68(%rsp)
	jne	.L22
	movl	$1, %edx
	movl	$4, %eax
	jmp	.L21
.L426:
	cmpl	$-1, 72(%rsp)
	jne	.L26
	movl	$1, %edx
	movl	$5, %eax
	jmp	.L25
.L434:
	cmpl	$-1, 104(%rsp)
	jne	.L58
	movl	$1, %edx
	movl	$13, %eax
	jmp	.L57
.L433:
	cmpl	$-1, 100(%rsp)
	jne	.L54
	movl	$1, %edx
	movl	$12, %eax
	jmp	.L53
.L432:
	cmpl	$-1, 96(%rsp)
	jne	.L50
	movl	$1, %edx
	movl	$11, %eax
	jmp	.L49
.L430:
	cmpl	$-1, 88(%rsp)
	jne	.L42
	movl	$1, %edx
	movl	$9, %eax
	jmp	.L41
.L428:
	cmpl	$-1, 80(%rsp)
	jne	.L34
	movl	$1, %edx
	movl	$7, %eax
	jmp	.L33
.L435:
	cmpl	$-1, 108(%rsp)
	jne	.L62
	movl	$1, %edx
	movl	$14, %eax
	jmp	.L61
.L436:
	cmpl	$-1, 112(%rsp)
	jne	.L62
	movl	$1, %edx
	movl	$15, %eax
	jmp	.L65
.L9:
	cmpl	$-1, 56(%rsp)
	jne	.L413
	movl	$2, %edx
.L149:
	cmpl	$-1, 60(%rsp)
	movl	$5, %ecx
	jne	.L13
	jmp	.L12
.L188:
	movl	$3, %edx
	xorl	%eax, %eax
	jmp	.L149
.L438:
	leaq	44(%rsp), %r12
	leaq	.LC1(%rip), %rbp
	leaq	.LC0(%rip), %rbx
	jmp	.L71
.L146:
	movslq	44(%rsp), %rax
	movq	%rbx, %rsi
	movl	$1, %edi
	movl	128(%rsp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L71:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L146
	movq	536(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L439
	addq	$552, %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
.L8:
	.cfi_restore_state
	cmpl	$-1, 56(%rsp)
	je	.L189
	movl	$2, %ecx
	jmp	.L11
.L168:
	xorl	%eax, %eax
	jmp	.L147
.L170:
	movl	$2, %eax
	jmp	.L147
.L169:
	movl	$1, %eax
	jmp	.L147
.L172:
	movl	$4, %eax
	jmp	.L147
.L171:
	movl	$3, %eax
	jmp	.L147
.L175:
	movl	$7, %eax
	jmp	.L147
.L174:
	movl	$6, %eax
	jmp	.L147
.L173:
	movl	$5, %eax
	jmp	.L147
.L176:
	movl	$8, %eax
	jmp	.L147
.L439:
	call	__stack_chk_fail@PLT
.L189:
	movl	$1, %eax
	jmp	.L6
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	t
	.bss
	.align 32
	.type	t, @object
	.size	t, 120
t:
	.zero	120
	.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>          // printf(), scanf()
#include <stdbool.h>

#define MAX_N 100
#define MAX_S 17
#define MAX_T 10

typedef struct time_tbl
{
	int no;
	int time;
	bool used;
} time_t;

time_t t[MAX_T];

int
main(int argc, char **argv)
{
	int s[MAX_S];
	int w[MAX_N];

	for (int i = 0; i < MAX_S; ++i)
		s[i] = -1;

	int time = 0;
	int ix = 0;
	for (int sn = 0;;)
	{
		int stime = 5 * sn;
		int k = (sn % 5 == 1) ? 5 : 2;
		int c = 0;
		int p = -1;
		for (int i = 0; i < MAX_S; ++i)
		{
			if (s[i] == -1)
			{
				if (p == -1)
					p = i;

				c++;
				if (c >= k)
					break;
			}
			else
			{
				c = 0;
				p = -1;
			}
		}

		int min;
		if (c >= k)
		{
			w[sn] = time - stime;
			for (int i = 0; i < c; ++i)
				s[p + i] = sn;

			int u;
			for (u = 0; u < ix; ++u)
			{
				if (!t[u].used)
					break;
			}

			if (u >= ix)
				u = ix++;

			int etime = 17 * (sn % 2) + 3 * (sn % 3) + 19;
			t[u].time = time + etime;
			t[u].no = sn;
			t[u].used = true;

			sn++;
			if (sn >= MAX_N)
				break;

			stime = 5 * sn;
			min = stime;
		}
		else
			min = 1000000000;

		for (int i = 0; i < ix; ++i)
		{
			if (t[i].used && t[i].time < min)
				min = t[i].time;
		}

		while(true)
		{
			int u;
			for (u = 0; u < ix; ++u)
			{
				if (t[u].used && t[u].time == min)
					break;
			}

			if (u >= ix)
				break;

			t[u].used = false;
			for (int i = 0; i < MAX_S; ++i)
			{
				if (s[i] == t[u].no)
					s[i] = -1;
			}
		}

		if (time < min)
			time = min;

		if (time < stime)
			time = stime;
	}

	int n;
	while (scanf("%d", &n) != EOF)
		printf("%d\n", w[n]);

	return 0;
}
5
12
7
8
 5
12
12
8
 5
12
12
13
 5
24
12
13
 5
24
18
13
 5
24
34
13
 5
25
34
13
 5
25
23
13
 5
25
27
13
 5
24
27
13

0
3
9
4
 0
3
3
4
 0
3
3
2
 0
11
3
2
 0
11
15
2
 0
11
8
2
 0
6
8
2
 0
6
9
2
 0
6
18
2
 0
11
18
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>          // printf(), scanf()
#include <stdbool.h>

#define MAX_N 100
#define MAX_S 17
#define MAX_T 10

typedef struct time_tbl
{
	int no;
	int time;
	bool used;
} time_t;

time_t t[MAX_T];

int
main(int argc, char **argv)
{
	int s[MAX_S];
	int w[MAX_N];

	for (int i = 0; i < MAX_S; ++i)
		s[i] = -1;

	int time = 0;
	int ix = 0;
	for (int sn = 0;;)
	{
		int stime = 5 * sn;
		int k = (sn % 5 == 1) ? 5 : 2;
		int c = 0;
		int p = -1;
		for (int i = 0; i < MAX_S; ++i)
		{
			if (s[i] == -1)
			{
				if (p == -1)
					p = i;

				c++;
				if (c >= k)
					break;
			}
			else
			{
				c = 0;
				p = -1;
			}
		}

		int min;
		if (c >= k)
		{
			w[sn] = time - stime;
			for (int i = 0; i < c; ++i)
				s[p + i] = sn;

			int u;
			for (u = 0; u < ix; ++u)
			{
				if (!t[u].used)
					break;
			}

			if (u >= ix)
				u = ix++;

			int etime = 17 * (sn % 2) + 3 * (sn % 3) + 19;
			t[u].time = time + etime;
			t[u].no = sn;
			t[u].used = true;

			sn++;
			if (sn >= MAX_N)
				break;

			stime = 5 * sn;
			min = stime;
		}
		else
			min = 1000000000;

		for (int i = 0; i < ix; ++i)
		{
			if (t[i].used && t[i].time < min)
				min = t[i].time;
		}

		while(true)
		{
			int u;
			for (u = 0; u < ix; ++u)
			{
				if (t[u].used && t[u].time == min)
					break;
			}

			if (u >= ix)
				break;

			t[u].used = false;
			for (int i = 0; i < MAX_S; ++i)
			{
				if (s[i] == t[u].no)
					s[i] = -1;
			}
		}

		if (time < min)
			time = min;

		if (time < stime)
			time = stime;
	}

	int n;
	while (scanf("%d", &n) != EOF)
		printf("%d\n", w[n]);

	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	t
	.bss
	.align 32
	.type	t, @object
	.size	t, 120
t:
	.zero	120
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d"
	.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	$592, %rsp
	movl	%edi, -580(%rbp)
	movq	%rsi, -592(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -560(%rbp)
	jmp	.L2
.L3:
	movl	-560(%rbp), %eax
	cltq
	movl	$-1, -496(%rbp,%rax,4)
	addl	$1, -560(%rbp)
.L2:
	cmpl	$16, -560(%rbp)
	jle	.L3
	movl	$0, -556(%rbp)
	movl	$0, -552(%rbp)
	movl	$0, -548(%rbp)
.L38:
	movl	-548(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	movl	%eax, -544(%rbp)
	movl	-548(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	%eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	sall	$2, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cmpl	$1, %eax
	jne	.L4
	movl	$5, %eax
	jmp	.L5
.L4:
	movl	$2, %eax
.L5:
	movl	%eax, -504(%rbp)
	movl	$0, -540(%rbp)
	movl	$-1, -536(%rbp)
	movl	$0, -532(%rbp)
	jmp	.L6
.L11:
	movl	-532(%rbp), %eax
	cltq
	movl	-496(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	jne	.L7
	cmpl	$-1, -536(%rbp)
	jne	.L8
	movl	-532(%rbp), %eax
	movl	%eax, -536(%rbp)
.L8:
	addl	$1, -540(%rbp)
	movl	-540(%rbp), %eax
	cmpl	-504(%rbp), %eax
	jl	.L9
	jmp	.L10
.L7:
	movl	$0, -540(%rbp)
	movl	$-1, -536(%rbp)
.L9:
	addl	$1, -532(%rbp)
.L6:
	cmpl	$16, -532(%rbp)
	jle	.L11
.L10:
	movl	-540(%rbp), %eax
	cmpl	-504(%rbp), %eax
	jl	.L12
	movl	-556(%rbp), %eax
	subl	-544(%rbp), %eax
	movl	%eax, %edx
	movl	-548(%rbp), %eax
	cltq
	movl	%edx, -416(%rbp,%rax,4)
	movl	$0, -524(%rbp)
	jmp	.L13
.L14:
	movl	-536(%rbp), %edx
	movl	-524(%rbp), %eax
	addl	%edx, %eax
	cltq
	movl	-548(%rbp), %edx
	movl	%edx, -496(%rbp,%rax,4)
	addl	$1, -524(%rbp)
.L13:
	movl	-524(%rbp), %eax
	cmpl	-540(%rbp), %eax
	jl	.L14
	movl	$0, -520(%rbp)
	jmp	.L15
.L18:
	movl	-520(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+t(%rip), %rax
	movzbl	(%rdx,%rax), %eax
	xorl	$1, %eax
	testb	%al, %al
	jne	.L45
	addl	$1, -520(%rbp)
.L15:
	movl	-520(%rbp), %eax
	cmpl	-552(%rbp), %eax
	jl	.L18
	jmp	.L17
.L45:
	nop
.L17:
	movl	-520(%rbp), %eax
	cmpl	-552(%rbp), %eax
	jl	.L19
	movl	-552(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -552(%rbp)
	movl	%eax, -520(%rbp)
.L19:
	movl	-548(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	sall	$4, %eax
	leal	(%rax,%rdx), %esi
	movl	-548(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	addl	%edx, %edx
	addl	%edx, %eax
	addl	%esi, %eax
	addl	$19, %eax
	movl	%eax, -500(%rbp)
	movl	-556(%rbp), %edx
	movl	-500(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-520(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+t(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-520(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	t(%rip), %rdx
	movl	-548(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-520(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+t(%rip), %rax
	movb	$1, (%rdx,%rax)
	addl	$1, -548(%rbp)
	cmpl	$99, -548(%rbp)
	jg	.L46
	movl	-548(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	movl	%eax, -544(%rbp)
	movl	-544(%rbp), %eax
	movl	%eax, -528(%rbp)
	jmp	.L22
.L12:
	movl	$1000000000, -528(%rbp)
.L22:
	movl	$0, -516(%rbp)
	jmp	.L23
.L25:
	movl	-516(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+t(%rip), %rax
	movzbl	(%rdx,%rax), %eax
	testb	%al, %al
	je	.L24
	movl	-516(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+t(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -528(%rbp)
	jle	.L24
	movl	-516(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+t(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -528(%rbp)
.L24:
	addl	$1, -516(%rbp)
.L23:
	movl	-516(%rbp), %eax
	cmpl	-552(%rbp), %eax
	jl	.L25
.L35:
	movl	$0, -512(%rbp)
	jmp	.L26
.L29:
	movl	-512(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+t(%rip), %rax
	movzbl	(%rdx,%rax), %eax
	testb	%al, %al
	je	.L27
	movl	-512(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+t(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -528(%rbp)
	je	.L47
.L27:
	addl	$1, -512(%rbp)
.L26:
	movl	-512(%rbp), %eax
	cmpl	-552(%rbp), %eax
	jl	.L29
	jmp	.L28
.L47:
	nop
.L28:
	movl	-512(%rbp), %eax
	cmpl	-552(%rbp), %eax
	jge	.L48
	movl	-512(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+t(%rip), %rax
	movb	$0, (%rdx,%rax)
	movl	$0, -508(%rbp)
	jmp	.L32
.L34:
	movl	-508(%rbp), %eax
	cltq
	movl	-496(%rbp,%rax,4), %ecx
	movl	-512(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jne	.L33
	movl	-508(%rbp), %eax
	cltq
	movl	$-1, -496(%rbp,%rax,4)
.L33:
	addl	$1, -508(%rbp)
.L32:
	cmpl	$16, -508(%rbp)
	jle	.L34
	jmp	.L35
.L48:
	nop
	movl	-556(%rbp), %eax
	cmpl	-528(%rbp), %eax
	jge	.L36
	movl	-528(%rbp), %eax
	movl	%eax, -556(%rbp)
.L36:
	movl	-556(%rbp), %eax
	cmpl	-544(%rbp), %eax
	jge	.L38
	movl	-544(%rbp), %eax
	movl	%eax, -556(%rbp)
	jmp	.L38
.L46:
	nop
	jmp	.L39
.L40:
	movl	-564(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L39:
	leaq	-564(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L40
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L42
	call	__stack_chk_fail@PLT
.L42:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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	t
	.bss
	.align 32
	.type	t, @object
	.size	t, 120
t:
	.zero	120
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d"
	.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	$592, %rsp
	movl	%edi, -580(%rbp)
	movq	%rsi, -592(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -560(%rbp)
	jmp	.L2
.L3:
	movl	-560(%rbp), %eax
	cltq
	movl	$-1, -496(%rbp,%rax,4)
	addl	$1, -560(%rbp)
.L2:
	cmpl	$16, -560(%rbp)
	jle	.L3
	movl	$0, -556(%rbp)
	movl	$0, -552(%rbp)
	movl	$0, -548(%rbp)
.L38:
	movl	-548(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	movl	%eax, -544(%rbp)
	movl	-548(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	%eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	sall	$2, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cmpl	$1, %eax
	jne	.L4
	movl	$5, %eax
	jmp	.L5
.L4:
	movl	$2, %eax
.L5:
	movl	%eax, -504(%rbp)
	movl	$0, -540(%rbp)
	movl	$-1, -536(%rbp)
	movl	$0, -532(%rbp)
	jmp	.L6
.L11:
	movl	-532(%rbp), %eax
	cltq
	movl	-496(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	jne	.L7
	cmpl	$-1, -536(%rbp)
	jne	.L8
	movl	-532(%rbp), %eax
	movl	%eax, -536(%rbp)
.L8:
	addl	$1, -540(%rbp)
	movl	-540(%rbp), %eax
	cmpl	-504(%rbp), %eax
	jl	.L9
	jmp	.L10
.L7:
	movl	$0, -540(%rbp)
	movl	$-1, -536(%rbp)
.L9:
	addl	$1, -532(%rbp)
.L6:
	cmpl	$16, -532(%rbp)
	jle	.L11
.L10:
	movl	-540(%rbp), %eax
	cmpl	-504(%rbp), %eax
	jl	.L12
	movl	-556(%rbp), %eax
	subl	-544(%rbp), %eax
	movl	%eax, %edx
	movl	-548(%rbp), %eax
	cltq
	movl	%edx, -416(%rbp,%rax,4)
	movl	$0, -524(%rbp)
	jmp	.L13
.L14:
	movl	-536(%rbp), %edx
	movl	-524(%rbp), %eax
	addl	%edx, %eax
	cltq
	movl	-548(%rbp), %edx
	movl	%edx, -496(%rbp,%rax,4)
	addl	$1, -524(%rbp)
.L13:
	movl	-524(%rbp), %eax
	cmpl	-540(%rbp), %eax
	jl	.L14
	movl	$0, -520(%rbp)
	jmp	.L15
.L18:
	movl	-520(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+t(%rip), %rax
	movzbl	(%rdx,%rax), %eax
	xorl	$1, %eax
	testb	%al, %al
	jne	.L45
	addl	$1, -520(%rbp)
.L15:
	movl	-520(%rbp), %eax
	cmpl	-552(%rbp), %eax
	jl	.L18
	jmp	.L17
.L45:
	nop
.L17:
	movl	-520(%rbp), %eax
	cmpl	-552(%rbp), %eax
	jl	.L19
	movl	-552(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -552(%rbp)
	movl	%eax, -520(%rbp)
.L19:
	movl	-548(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	sall	$4, %eax
	leal	(%rax,%rdx), %esi
	movl	-548(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	addl	%edx, %edx
	addl	%edx, %eax
	addl	%esi, %eax
	addl	$19, %eax
	movl	%eax, -500(%rbp)
	movl	-556(%rbp), %edx
	movl	-500(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-520(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+t(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-520(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	t(%rip), %rdx
	movl	-548(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-520(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+t(%rip), %rax
	movb	$1, (%rdx,%rax)
	addl	$1, -548(%rbp)
	cmpl	$99, -548(%rbp)
	jg	.L46
	movl	-548(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	movl	%eax, -544(%rbp)
	movl	-544(%rbp), %eax
	movl	%eax, -528(%rbp)
	jmp	.L22
.L12:
	movl	$1000000000, -528(%rbp)
.L22:
	movl	$0, -516(%rbp)
	jmp	.L23
.L25:
	movl	-516(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+t(%rip), %rax
	movzbl	(%rdx,%rax), %eax
	testb	%al, %al
	je	.L24
	movl	-516(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+t(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -528(%rbp)
	jle	.L24
	movl	-516(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+t(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -528(%rbp)
.L24:
	addl	$1, -516(%rbp)
.L23:
	movl	-516(%rbp), %eax
	cmpl	-552(%rbp), %eax
	jl	.L25
.L35:
	movl	$0, -512(%rbp)
	jmp	.L26
.L29:
	movl	-512(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+t(%rip), %rax
	movzbl	(%rdx,%rax), %eax
	testb	%al, %al
	je	.L27
	movl	-512(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+t(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -528(%rbp)
	je	.L47
.L27:
	addl	$1, -512(%rbp)
.L26:
	movl	-512(%rbp), %eax
	cmpl	-552(%rbp), %eax
	jl	.L29
	jmp	.L28
.L47:
	nop
.L28:
	movl	-512(%rbp), %eax
	cmpl	-552(%rbp), %eax
	jge	.L48
	movl	-512(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+t(%rip), %rax
	movb	$0, (%rdx,%rax)
	movl	$0, -508(%rbp)
	jmp	.L32
.L34:
	movl	-508(%rbp), %eax
	cltq
	movl	-496(%rbp,%rax,4), %ecx
	movl	-512(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jne	.L33
	movl	-508(%rbp), %eax
	cltq
	movl	$-1, -496(%rbp,%rax,4)
.L33:
	addl	$1, -508(%rbp)
.L32:
	cmpl	$16, -508(%rbp)
	jle	.L34
	jmp	.L35
.L48:
	nop
	movl	-556(%rbp), %eax
	cmpl	-528(%rbp), %eax
	jge	.L36
	movl	-528(%rbp), %eax
	movl	%eax, -556(%rbp)
.L36:
	movl	-556(%rbp), %eax
	cmpl	-544(%rbp), %eax
	jge	.L38
	movl	-544(%rbp), %eax
	movl	%eax, -556(%rbp)
	jmp	.L38
.L46:
	nop
	jmp	.L39
.L40:
	movl	-564(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L39:
	leaq	-564(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L40
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L42
	call	__stack_chk_fail@PLT
.L42:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
