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 main(void) {
	int N,Q;
	int i;
	char names[50][32]={"kogakubu10gokan"};
	char* answer=names[0];
	scanf("%d%d",&N,&Q);
	for(i=1;i<=N;i++) {
		int year;
		scanf("%d%s",&year,names[i]);
		if(year<=Q)answer=names[i];
	}
	puts(answer);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d%s"
	.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	$1648, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-1616(%rbp), %rdx
	movl	$0, %eax
	movl	$200, %ecx
	movq	%rdx, %rdi
	rep stosq
	movabsq	$8458452154211331947, %rax
	movabsq	$31069361496600625, %rdx
	movq	%rax, -1616(%rbp)
	movq	%rdx, -1608(%rbp)
	movq	$0, -1600(%rbp)
	movq	$0, -1592(%rbp)
	leaq	-1616(%rbp), %rax
	movq	%rax, -1624(%rbp)
	leaq	-1636(%rbp), %rdx
	leaq	-1640(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -1628(%rbp)
	jmp	.L2
.L4:
	leaq	-1616(%rbp), %rdx
	movl	-1628(%rbp), %eax
	cltq
	salq	$5, %rax
	addq	%rax, %rdx
	leaq	-1632(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1632(%rbp), %edx
	movl	-1636(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L3
	leaq	-1616(%rbp), %rdx
	movl	-1628(%rbp), %eax
	cltq
	salq	$5, %rax
	addq	%rdx, %rax
	movq	%rax, -1624(%rbp)
.L3:
	addl	$1, -1628(%rbp)
.L2:
	movl	-1640(%rbp), %eax
	cmpl	%eax, -1628(%rbp)
	jle	.L4
	movq	-1624(%rbp), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	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%d"
.LC1:
	.string	"%d%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movl	$200, %ecx
	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
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$1632, %rsp
	.cfi_def_cfa_offset 1680
	movdqa	.LC2(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 1624(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r12
	leaq	8(%rsp), %rdx
	movq	%r12, %rdi
	leaq	4(%rsp), %rsi
	rep stosq
	leaq	.LC0(%rip), %rdi
	movaps	%xmm0, 16(%rsp)
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	48(%rsp), %rbx
	movl	$1, %ebp
	leaq	12(%rsp), %r14
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbx, %rdx
	xorl	%eax, %eax
	movq	%r14, %rsi
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	cmpl	%eax, 12(%rsp)
	cmovle	%rbx, %r12
	addl	$1, %ebp
	addq	$32, %rbx
	cmpl	%ebp, 4(%rsp)
	jge	.L4
.L2:
	movq	%r12, %rdi
	call	puts@PLT
	movq	1624(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L10
	addq	$1632, %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
.L10:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.quad	8458452154211331947
	.quad	31069361496600625
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movl	$200, %ecx
	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
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$1632, %rsp
	.cfi_def_cfa_offset 1680
	movdqa	.LC2(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 1624(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r12
	leaq	8(%rsp), %rdx
	movq	%r12, %rdi
	leaq	4(%rsp), %rsi
	rep stosq
	leaq	.LC0(%rip), %rdi
	movaps	%xmm0, 16(%rsp)
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	48(%rsp), %rbx
	movl	$1, %ebp
	leaq	12(%rsp), %r14
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbx, %rdx
	xorl	%eax, %eax
	movq	%r14, %rsi
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	cmpl	%eax, 12(%rsp)
	cmovle	%rbx, %r12
	addl	$1, %ebp
	addq	$32, %rbx
	cmpl	%ebp, 4(%rsp)
	jge	.L4
.L2:
	movq	%r12, %rdi
	call	puts@PLT
	movq	1624(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L10
	addq	$1632, %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
.L10:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.quad	8458452154211331947
	.quad	31069361496600625
	.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 main(void) {
	int N,Q;
	int i;
	char names[50][32]={"kogakubu10gokan"};
	char* answer=names[0];
	scanf("%d%d",&N,&Q);
	for(i=1;i<=N;i++) {
		int year;
		scanf("%d%s",&year,names[i]);
		if(year<=Q)answer=names[i];
	}
	puts(answer);
	return 0;
}
3 12
5 sogo5gokan
10 sogo10gokan
15 sogo15gokan

sogo10gokan

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 main(void) {
	int N,Q;
	int i;
	char names[50][32]={"kogakubu10gokan"};
	char* answer=names[0];
	scanf("%d%d",&N,&Q);
	for(i=1;i<=N;i++) {
		int year;
		scanf("%d%s",&year,names[i]);
		if(year<=Q)answer=names[i];
	}
	puts(answer);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d%s"
	.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	$1648, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-1616(%rbp), %rdx
	movl	$0, %eax
	movl	$200, %ecx
	movq	%rdx, %rdi
	rep stosq
	movabsq	$8458452154211331947, %rax
	movabsq	$31069361496600625, %rdx
	movq	%rax, -1616(%rbp)
	movq	%rdx, -1608(%rbp)
	movq	$0, -1600(%rbp)
	movq	$0, -1592(%rbp)
	leaq	-1616(%rbp), %rax
	movq	%rax, -1624(%rbp)
	leaq	-1636(%rbp), %rdx
	leaq	-1640(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -1628(%rbp)
	jmp	.L2
.L4:
	leaq	-1616(%rbp), %rdx
	movl	-1628(%rbp), %eax
	cltq
	salq	$5, %rax
	addq	%rax, %rdx
	leaq	-1632(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1632(%rbp), %edx
	movl	-1636(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L3
	leaq	-1616(%rbp), %rdx
	movl	-1628(%rbp), %eax
	cltq
	salq	$5, %rax
	addq	%rdx, %rax
	movq	%rax, -1624(%rbp)
.L3:
	addl	$1, -1628(%rbp)
.L2:
	movl	-1640(%rbp), %eax
	cmpl	%eax, -1628(%rbp)
	jle	.L4
	movq	-1624(%rbp), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	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
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d%s"
	.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	$1648, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-1616(%rbp), %rdx
	movl	$0, %eax
	movl	$200, %ecx
	movq	%rdx, %rdi
	rep stosq
	movabsq	$8458452154211331947, %rax
	movabsq	$31069361496600625, %rdx
	movq	%rax, -1616(%rbp)
	movq	%rdx, -1608(%rbp)
	movq	$0, -1600(%rbp)
	movq	$0, -1592(%rbp)
	leaq	-1616(%rbp), %rax
	movq	%rax, -1624(%rbp)
	leaq	-1636(%rbp), %rdx
	leaq	-1640(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -1628(%rbp)
	jmp	.L2
.L4:
	leaq	-1616(%rbp), %rdx
	movl	-1628(%rbp), %eax
	cltq
	salq	$5, %rax
	addq	%rax, %rdx
	leaq	-1632(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1632(%rbp), %edx
	movl	-1636(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L3
	leaq	-1616(%rbp), %rdx
	movl	-1628(%rbp), %eax
	cltq
	salq	$5, %rax
	addq	%rdx, %rax
	movq	%rax, -1624(%rbp)
.L3:
	addl	$1, -1628(%rbp)
.L2:
	movl	-1640(%rbp), %eax
	cmpl	%eax, -1628(%rbp)
	jle	.L4
	movq	-1624(%rbp), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	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:
