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

```c
/*
  AOJ 2544
  Title:Older Research Bldg. No.7
  @kankichi573
*/
#include <stdio.h>
int N,Q;
int  year[50];
char name[50][31];
char *ans;
char h1name[]="kogakubu10gokan";
solve()
{
  int i;

  if(year[0]>Q)
    {
      ans=h1name;
      return;
    }
  for(i=0;i<N-1;i++)
    if(Q>=year[i] && Q<year[i+1])
      {
	ans=&name[i][0];
	return;
      }
  ans=&name[N-1][0];
}
main()
{
  int i;

  scanf("%d %d",&N,&Q);
  for(i=0;i<N;i++)
    scanf("%d %s",&year[i],&name[i][0]);
  solve();
  printf("%s\n",ans);
  return(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	Q
	.align 4
	.type	Q, @object
	.size	Q, 4
Q:
	.zero	4
	.globl	year
	.align 32
	.type	year, @object
	.size	year, 200
year:
	.zero	200
	.globl	name
	.align 32
	.type	name, @object
	.size	name, 1550
name:
	.zero	1550
	.globl	ans
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.zero	8
	.globl	h1name
	.data
	.align 16
	.type	h1name, @object
	.size	h1name, 16
h1name:
	.string	"kogakubu10gokan"
	.text
	.globl	solve
	.type	solve, @function
solve:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	year(%rip), %edx
	movl	Q(%rip), %eax
	cmpl	%eax, %edx
	jle	.L2
	leaq	h1name(%rip), %rax
	movq	%rax, ans(%rip)
	jmp	.L3
.L2:
	movl	$0, -4(%rbp)
	jmp	.L4
.L6:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	year(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	Q(%rip), %eax
	cmpl	%eax, %edx
	jg	.L5
	movl	-4(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	year(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	Q(%rip), %eax
	cmpl	%eax, %edx
	jle	.L5
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$5, %rax
	subq	%rdx, %rax
	leaq	name(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, ans(%rip)
	jmp	.L3
.L5:
	addl	$1, -4(%rbp)
.L4:
	movl	N(%rip), %eax
	subl	$1, %eax
	cmpl	%eax, -4(%rbp)
	jl	.L6
	movl	N(%rip), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$5, %rax
	subq	%rdx, %rax
	leaq	name(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, ans(%rip)
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	solve, .-solve
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d %s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	leaq	Q(%rip), %rax
	movq	%rax, %rdx
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -4(%rbp)
	jmp	.L8
.L9:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$5, %rax
	subq	%rdx, %rax
	leaq	name(%rip), %rdx
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	year(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -4(%rbp)
.L8:
	movl	N(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L9
	movl	$0, %eax
	call	solve
	movq	ans(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.p2align 4
	.globl	solve
	.type	solve, @function
solve:
.LFB23:
	.cfi_startproc
	endbr64
	movl	Q(%rip), %ecx
	cmpl	%ecx, year(%rip)
	leaq	h1name(%rip), %rax
	jg	.L2
	movl	N(%rip), %eax
	leal	-1(%rax), %r9d
	testl	%r9d, %r9d
	jle	.L3
	leaq	year(%rip), %rsi
	leal	-2(%rax), %edi
	xorl	%eax, %eax
	leaq	4(%rsi), %r8
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rdx, %rax
.L5:
	movslq	%eax, %rdx
	cmpl	(%rsi,%rax,4), %ecx
	jl	.L4
	cmpl	(%r8,%rax,4), %ecx
	jl	.L9
.L4:
	leaq	1(%rax), %rdx
	cmpq	%rdi, %rax
	jne	.L7
.L3:
	movslq	%r9d, %r9
	leaq	name(%rip), %rdx
	movq	%r9, %rax
	salq	$5, %rax
	subq	%r9, %rax
	addq	%rdx, %rax
.L2:
	movq	%rax, ans(%rip)
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rdx, %rax
	salq	$5, %rax
	subq	%rdx, %rax
	leaq	name(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, ans(%rip)
	ret
	.cfi_endproc
.LFE23:
	.size	solve, .-solve
	.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:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	Q(%rip), %rdx
	leaq	N(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	call	__isoc99_scanf@PLT
	movl	N(%rip), %eax
	testl	%eax, %eax
	jle	.L13
	leaq	name(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	year(%rip), %r13
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L12:
	leaq	0(%r13,%rbx,4), %rsi
	movq	%rbp, %rdx
	xorl	%eax, %eax
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	addq	$1, %rbx
	addq	$31, %rbp
	cmpl	%ebx, N(%rip)
	jg	.L12
.L13:
	xorl	%eax, %eax
	call	solve
	movq	ans(%rip), %rdi
	call	puts@PLT
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	h1name
	.data
	.align 16
	.type	h1name, @object
	.size	h1name, 16
h1name:
	.string	"kogakubu10gokan"
	.globl	ans
	.bss
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.zero	8
	.globl	name
	.align 32
	.type	name, @object
	.size	name, 1550
name:
	.zero	1550
	.globl	year
	.align 32
	.type	year, @object
	.size	year, 200
year:
	.zero	200
	.globl	Q
	.align 4
	.type	Q, @object
	.size	Q, 4
Q:
	.zero	4
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.p2align 4
	.globl	solve
	.type	solve, @function
solve:
.LFB23:
	.cfi_startproc
	endbr64
	movl	Q(%rip), %ecx
	cmpl	%ecx, year(%rip)
	leaq	h1name(%rip), %rax
	jg	.L2
	movl	N(%rip), %eax
	leal	-1(%rax), %r9d
	testl	%r9d, %r9d
	jle	.L3
	leaq	year(%rip), %rsi
	leal	-2(%rax), %edi
	xorl	%eax, %eax
	leaq	4(%rsi), %r8
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rdx, %rax
.L5:
	movslq	%eax, %rdx
	cmpl	(%rsi,%rax,4), %ecx
	jl	.L4
	cmpl	(%r8,%rax,4), %ecx
	jl	.L9
.L4:
	leaq	1(%rax), %rdx
	cmpq	%rdi, %rax
	jne	.L7
.L3:
	movslq	%r9d, %r9
	leaq	name(%rip), %rdx
	movq	%r9, %rax
	salq	$5, %rax
	subq	%r9, %rax
	addq	%rdx, %rax
.L2:
	movq	%rax, ans(%rip)
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rdx, %rax
	salq	$5, %rax
	subq	%rdx, %rax
	leaq	name(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, ans(%rip)
	ret
	.cfi_endproc
.LFE23:
	.size	solve, .-solve
	.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:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	Q(%rip), %rdx
	leaq	N(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	call	__isoc99_scanf@PLT
	movl	N(%rip), %eax
	testl	%eax, %eax
	jle	.L13
	leaq	name(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	year(%rip), %r13
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L12:
	leaq	0(%r13,%rbx,4), %rsi
	movq	%rbp, %rdx
	xorl	%eax, %eax
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	addq	$1, %rbx
	addq	$31, %rbp
	cmpl	%ebx, N(%rip)
	jg	.L12
.L13:
	xorl	%eax, %eax
	call	solve
	movq	ans(%rip), %rdi
	call	puts@PLT
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	h1name
	.data
	.align 16
	.type	h1name, @object
	.size	h1name, 16
h1name:
	.string	"kogakubu10gokan"
	.globl	ans
	.bss
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.zero	8
	.globl	name
	.align 32
	.type	name, @object
	.size	name, 1550
name:
	.zero	1550
	.globl	year
	.align 32
	.type	year, @object
	.size	year, 200
year:
	.zero	200
	.globl	Q
	.align 4
	.type	Q, @object
	.size	Q, 4
Q:
	.zero	4
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.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:

/*
  AOJ 2544
  Title:Older Research Bldg. No.7
  @kankichi573
*/
#include <stdio.h>
int N,Q;
int  year[50];
char name[50][31];
char *ans;
char h1name[]="kogakubu10gokan";
solve()
{
  int i;

  if(year[0]>Q)
    {
      ans=h1name;
      return;
    }
  for(i=0;i<N-1;i++)
    if(Q>=year[i] && Q<year[i+1])
      {
	ans=&name[i][0];
	return;
      }
  ans=&name[N-1][0];
}
main()
{
  int i;

  scanf("%d %d",&N,&Q);
  for(i=0;i<N;i++)
    scanf("%d %s",&year[i],&name[i][0]);
  solve();
  printf("%s\n",ans);
  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
/*
  AOJ 2544
  Title:Older Research Bldg. No.7
  @kankichi573
*/
#include <stdio.h>
int N,Q;
int  year[50];
char name[50][31];
char *ans;
char h1name[]="kogakubu10gokan";
solve()
{
  int i;

  if(year[0]>Q)
    {
      ans=h1name;
      return;
    }
  for(i=0;i<N-1;i++)
    if(Q>=year[i] && Q<year[i+1])
      {
	ans=&name[i][0];
	return;
      }
  ans=&name[N-1][0];
}
main()
{
  int i;

  scanf("%d %d",&N,&Q);
  for(i=0;i<N;i++)
    scanf("%d %s",&year[i],&name[i][0]);
  solve();
  printf("%s\n",ans);
  return(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	Q
	.align 4
	.type	Q, @object
	.size	Q, 4
Q:
	.zero	4
	.globl	year
	.align 32
	.type	year, @object
	.size	year, 200
year:
	.zero	200
	.globl	name
	.align 32
	.type	name, @object
	.size	name, 1550
name:
	.zero	1550
	.globl	ans
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.zero	8
	.globl	h1name
	.data
	.align 16
	.type	h1name, @object
	.size	h1name, 16
h1name:
	.string	"kogakubu10gokan"
	.text
	.globl	solve
	.type	solve, @function
solve:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	year(%rip), %edx
	movl	Q(%rip), %eax
	cmpl	%eax, %edx
	jle	.L2
	leaq	h1name(%rip), %rax
	movq	%rax, ans(%rip)
	jmp	.L3
.L2:
	movl	$0, -4(%rbp)
	jmp	.L4
.L6:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	year(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	Q(%rip), %eax
	cmpl	%eax, %edx
	jg	.L5
	movl	-4(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	year(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	Q(%rip), %eax
	cmpl	%eax, %edx
	jle	.L5
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$5, %rax
	subq	%rdx, %rax
	leaq	name(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, ans(%rip)
	jmp	.L3
.L5:
	addl	$1, -4(%rbp)
.L4:
	movl	N(%rip), %eax
	subl	$1, %eax
	cmpl	%eax, -4(%rbp)
	jl	.L6
	movl	N(%rip), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$5, %rax
	subq	%rdx, %rax
	leaq	name(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, ans(%rip)
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	solve, .-solve
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d %s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	leaq	Q(%rip), %rax
	movq	%rax, %rdx
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -4(%rbp)
	jmp	.L8
.L9:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$5, %rax
	subq	%rdx, %rax
	leaq	name(%rip), %rdx
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	year(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -4(%rbp)
.L8:
	movl	N(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L9
	movl	$0, %eax
	call	solve
	movq	ans(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	Q
	.align 4
	.type	Q, @object
	.size	Q, 4
Q:
	.zero	4
	.globl	year
	.align 32
	.type	year, @object
	.size	year, 200
year:
	.zero	200
	.globl	name
	.align 32
	.type	name, @object
	.size	name, 1550
name:
	.zero	1550
	.globl	ans
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.zero	8
	.globl	h1name
	.data
	.align 16
	.type	h1name, @object
	.size	h1name, 16
h1name:
	.string	"kogakubu10gokan"
	.text
	.globl	solve
	.type	solve, @function
solve:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	year(%rip), %edx
	movl	Q(%rip), %eax
	cmpl	%eax, %edx
	jle	.L2
	leaq	h1name(%rip), %rax
	movq	%rax, ans(%rip)
	jmp	.L3
.L2:
	movl	$0, -4(%rbp)
	jmp	.L4
.L6:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	year(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	Q(%rip), %eax
	cmpl	%eax, %edx
	jg	.L5
	movl	-4(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	year(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	Q(%rip), %eax
	cmpl	%eax, %edx
	jle	.L5
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$5, %rax
	subq	%rdx, %rax
	leaq	name(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, ans(%rip)
	jmp	.L3
.L5:
	addl	$1, -4(%rbp)
.L4:
	movl	N(%rip), %eax
	subl	$1, %eax
	cmpl	%eax, -4(%rbp)
	jl	.L6
	movl	N(%rip), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$5, %rax
	subq	%rdx, %rax
	leaq	name(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, ans(%rip)
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	solve, .-solve
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d %s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	leaq	Q(%rip), %rax
	movq	%rax, %rdx
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -4(%rbp)
	jmp	.L8
.L9:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$5, %rax
	subq	%rdx, %rax
	leaq	name(%rip), %rdx
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	year(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -4(%rbp)
.L8:
	movl	N(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L9
	movl	$0, %eax
	call	solve
	movq	ans(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
