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

```c
#include<stdio.h>
int main(){
  int n,m,a[1010],b[1010],y,i;
  char s[1010][1010];
  while(scanf("%d %d",&n,&m),n){
    for(i=0;i<n;i++)scanf("%s %d %d",s[i],&a[i],&b[i]);
    while(m--){
      scanf("%d",&y);
      for(i=0;i<n;i++){
	if(b[i]-a[i]<y&&y<=b[i])break;
      }
      i-n?printf("%s %d\n",s[i],y-b[i]+a[i]):printf("Unknown\n");
    }
  }
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s %d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%s %d\n"
.LC3:
	.string	"Unknown"
.LC4:
	.string	"%d %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
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-1028096(%rsp), %r11
	.cfi_def_cfa 11, 1028152
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$152, %rsp
	.cfi_def_cfa_offset 1028304
	leaq	.LC0(%rip), %r12
	leaq	.LC1(%rip), %rbp
	movq	%fs:40, %rax
	movq	%rax, 1028232(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movq	%rax, 8(%rsp)
	leaq	20(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rdx
	movq	(%rsp), %rsi
	leaq	.LC4(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	testl	%eax, %eax
	je	.L12
	jle	.L14
	leaq	8128(%rsp), %r15
	xorl	%r14d, %r14d
	leaq	32(%rsp), %rbx
	leaq	4080(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	0(,%r14,4), %rdx
	movq	%r15, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	leaq	0(%r13,%rdx), %rcx
	addq	%rbx, %rdx
	addq	$1, %r14
	addq	$1010, %r15
	call	__isoc99_scanf@PLT
	cmpl	%r14d, 20(%rsp)
	jg	.L3
.L14:
	movl	24(%rsp), %eax
	leaq	28(%rsp), %rbx
	leaq	8128(%rsp), %r13
	leaq	.LC3(%rip), %r14
	leal	-1(%rax), %edx
	movl	%edx, 24(%rsp)
	testl	%eax, %eax
	je	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %r11d
	testl	%r11d, %r11d
	jle	.L16
	movl	28(%rsp), %ecx
	movslq	%r11d, %r10
	xorl	%eax, %eax
	leaq	32(%rsp), %r8
	leaq	4080(%rsp), %r9
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%r9,%rax,4), %esi
	movl	(%r8,%rax,4), %edi
	movslq	%eax, %rdx
	movl	%esi, %r15d
	subl	%edi, %r15d
	cmpl	%ecx, %r15d
	jge	.L17
	cmpl	%ecx, %esi
	jge	.L6
.L17:
	addq	$1, %rax
	addl	$1, %edx
	cmpq	%rax, %r10
	jne	.L8
.L5:
	cmpl	%edx, %r11d
	je	.L9
	movslq	%edx, %rdx
	movl	28(%rsp), %ecx
	movl	4080(%rsp,%rdx,4), %esi
	movl	32(%rsp,%rdx,4), %edi
.L6:
	imulq	$1010, %rdx, %rdx
	subl	%esi, %ecx
	xorl	%eax, %eax
	addl	%edi, %ecx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	addq	%r13, %rdx
	call	__printf_chk@PLT
.L10:
	movl	24(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 24(%rsp)
	testl	%eax, %eax
	jne	.L4
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%r14, %rdi
	call	puts@PLT
	jmp	.L10
.L16:
	xorl	%edx, %edx
	jmp	.L5
.L12:
	movq	1028232(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$1028248, %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
.L29:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s %d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%s %d\n"
.LC3:
	.string	"Unknown"
.LC4:
	.string	"%d %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
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-1028096(%rsp), %r11
	.cfi_def_cfa 11, 1028152
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$152, %rsp
	.cfi_def_cfa_offset 1028304
	leaq	.LC0(%rip), %r12
	leaq	.LC1(%rip), %rbp
	movq	%fs:40, %rax
	movq	%rax, 1028232(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movq	%rax, 8(%rsp)
	leaq	20(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rdx
	movq	(%rsp), %rsi
	leaq	.LC4(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	testl	%eax, %eax
	je	.L12
	jle	.L14
	leaq	8128(%rsp), %r15
	xorl	%r14d, %r14d
	leaq	32(%rsp), %rbx
	leaq	4080(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	0(,%r14,4), %rdx
	movq	%r15, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	leaq	0(%r13,%rdx), %rcx
	addq	%rbx, %rdx
	addq	$1, %r14
	addq	$1010, %r15
	call	__isoc99_scanf@PLT
	cmpl	%r14d, 20(%rsp)
	jg	.L3
.L14:
	movl	24(%rsp), %eax
	leaq	28(%rsp), %rbx
	leaq	8128(%rsp), %r13
	leaq	.LC3(%rip), %r14
	leal	-1(%rax), %edx
	movl	%edx, 24(%rsp)
	testl	%eax, %eax
	je	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %r11d
	testl	%r11d, %r11d
	jle	.L16
	movl	28(%rsp), %ecx
	movslq	%r11d, %r10
	xorl	%eax, %eax
	leaq	32(%rsp), %r8
	leaq	4080(%rsp), %r9
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%r9,%rax,4), %esi
	movl	(%r8,%rax,4), %edi
	movslq	%eax, %rdx
	movl	%esi, %r15d
	subl	%edi, %r15d
	cmpl	%ecx, %r15d
	jge	.L17
	cmpl	%ecx, %esi
	jge	.L6
.L17:
	addq	$1, %rax
	addl	$1, %edx
	cmpq	%rax, %r10
	jne	.L8
.L5:
	cmpl	%edx, %r11d
	je	.L9
	movslq	%edx, %rdx
	movl	28(%rsp), %ecx
	movl	4080(%rsp,%rdx,4), %esi
	movl	32(%rsp,%rdx,4), %edi
.L6:
	imulq	$1010, %rdx, %rdx
	subl	%esi, %ecx
	xorl	%eax, %eax
	addl	%edi, %ecx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	addq	%r13, %rdx
	call	__printf_chk@PLT
.L10:
	movl	24(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 24(%rsp)
	testl	%eax, %eax
	jne	.L4
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%r14, %rdi
	call	puts@PLT
	jmp	.L10
.L16:
	xorl	%edx, %edx
	jmp	.L5
.L12:
	movq	1028232(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$1028248, %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
.L29:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s %d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%s %d\n"
.LC3:
	.string	"Unknown"
.LC4:
	.string	"%d %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
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-1028096(%rsp), %r11
	.cfi_def_cfa 11, 1028152
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$152, %rsp
	.cfi_def_cfa_offset 1028304
	leaq	.LC0(%rip), %r12
	leaq	.LC1(%rip), %rbp
	movq	%fs:40, %rax
	movq	%rax, 1028232(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movq	%rax, 8(%rsp)
	leaq	20(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rdx
	movq	(%rsp), %rsi
	leaq	.LC4(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	testl	%eax, %eax
	je	.L12
	jle	.L14
	leaq	8128(%rsp), %r15
	xorl	%r14d, %r14d
	leaq	32(%rsp), %rbx
	leaq	4080(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	0(,%r14,4), %rdx
	movq	%r15, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	leaq	0(%r13,%rdx), %rcx
	addq	%rbx, %rdx
	addq	$1, %r14
	addq	$1010, %r15
	call	__isoc99_scanf@PLT
	cmpl	%r14d, 20(%rsp)
	jg	.L3
.L14:
	movl	24(%rsp), %eax
	leaq	28(%rsp), %rbx
	leaq	8128(%rsp), %r13
	leaq	.LC3(%rip), %r14
	leal	-1(%rax), %edx
	movl	%edx, 24(%rsp)
	testl	%eax, %eax
	je	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %r11d
	testl	%r11d, %r11d
	jle	.L16
	movl	28(%rsp), %ecx
	movslq	%r11d, %r10
	xorl	%eax, %eax
	leaq	32(%rsp), %r8
	leaq	4080(%rsp), %r9
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%r9,%rax,4), %esi
	movl	(%r8,%rax,4), %edi
	movslq	%eax, %rdx
	movl	%esi, %r15d
	subl	%edi, %r15d
	cmpl	%ecx, %r15d
	jge	.L17
	cmpl	%ecx, %esi
	jge	.L6
.L17:
	addq	$1, %rax
	addl	$1, %edx
	cmpq	%rax, %r10
	jne	.L8
.L5:
	cmpl	%edx, %r11d
	je	.L9
	movslq	%edx, %rdx
	movl	28(%rsp), %ecx
	movl	4080(%rsp,%rdx,4), %esi
	movl	32(%rsp,%rdx,4), %edi
.L6:
	imulq	$1010, %rdx, %rdx
	subl	%esi, %ecx
	xorl	%eax, %eax
	addl	%edi, %ecx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	addq	%r13, %rdx
	call	__printf_chk@PLT
.L10:
	movl	24(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 24(%rsp)
	testl	%eax, %eax
	jne	.L4
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%r14, %rdi
	call	puts@PLT
	jmp	.L10
.L16:
	xorl	%edx, %edx
	jmp	.L5
.L12:
	movq	1028232(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$1028248, %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
.L29:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:
```
```c
#include<stdio.h>
int main(){
  int n,m,a[1010],b[1010],y,i;
  char s[1010][1010];
  while(scanf("%d %d",&n,&m),n){
    for(i=0;i<n;i++)scanf("%s %d %d",s[i],&a[i],&b[i]);
    while(m--){
      scanf("%d",&y);
      for(i=0;i<n;i++){
	if(b[i]-a[i]<y&&y<=b[i])break;
      }
      i-n?printf("%s %d\n",s[i],y-b[i]+a[i]):printf("Unknown\n");
    }
  }
  return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
int main(){
  int n,m,a[1010],b[1010],y,i;
  char s[1010][1010];
  while(scanf("%d %d",&n,&m),n){
    for(i=0;i<n;i++)scanf("%s %d %d",s[i],&a[i],&b[i]);
    while(m--){
      scanf("%d",&y);
      for(i=0;i<n;i++){
	if(b[i]-a[i]<y&&y<=b[i])break;
      }
      i-n?printf("%s %d\n",s[i],y-b[i]+a[i]):printf("Unknown\n");
    }
  }
  return 0;
}```

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.
Optimized Assembly Code:

4 3
meiji 10 1877
taisho 6 1917
showa 62 1987
heisei 22 2010
2046
1917
1988
1 1
universalcentury 123 2168
2010
0 0
 4 3
meiji 10 1877
taisho 6 1917
showa 62 1987
geisei 22 2010
1868
1917
1988
1 1
universalcentury 123 2168
2010
0 0
 4 3
meiji 10 1877
taisho 6 1917
showa 62 1987
heisei 25 2010
2046
1917
1988
1 1
universalcentury 123 2168
2010
0 0
 4 3
meiji 10 1877
taisho 6 1917
saowh 62 1987
heisei 33 2010
2046
1917
1988
1 1
universalcentury 123 2168
2010
0 0
 4 3
meiji 10 1877
taisho 6 1198
sgowa 62 1987
heisei 22 2010
1868
1917
1988
1 1
universalcentury 123 2168
2010
0 0
 4 3
meiji 20 1877
taisho 6 899
showa 62 1987
heisei 25 2010
1126
1917
1988
1 1
universalcemtury 123 2168
681
0 0
 4 3
meiji 10 1877
tahsho 6 1917
showa 62 1987
heisei 22 2010
1868
1917
1988
1 1
universalcentury 123 2168
2010
0 0
 4 3
meiji 10 1877
taisho 6 1917
saowh 62 1987
heisei 22 2010
2046
2671
1988
1 1
universalcentury 123 2168
2010
0 0
 4 3
meiji 10 1877
taisho 6 1917
sgowa 62 1987
heisei 33 2010
1868
1917
1988
1 1
universalcentury 123 2168
2010
0 0
 4 3
meiji 10 1877
taisho 7 1917
showa 62 1987
geisei 22 2010
1868
1917
1988
1 1
universalcentury 123 2168
2611
0 0

Unknown
taisho 6
Unknown
Unknown
 meiji 1
taisho 6
Unknown
Unknown
 Unknown
taisho 6
heisei 3
Unknown
 Unknown
taisho 6
heisei 11
Unknown
 meiji 1
Unknown
Unknown
Unknown
 Unknown
Unknown
heisei 3
Unknown
 meiji 1
tahsho 6
Unknown
Unknown
 Unknown
Unknown
Unknown
Unknown
 meiji 1
taisho 6
heisei 11
Unknown
 meiji 1
taisho 7
Unknown
Unknown

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

```c
#include<stdio.h>
int main(){
  int n,m,a[1010],b[1010],y,i;
  char s[1010][1010];
  while(scanf("%d %d",&n,&m),n){
    for(i=0;i<n;i++)scanf("%s %d %d",s[i],&a[i],&b[i]);
    while(m--){
      scanf("%d",&y);
      for(i=0;i<n;i++){
	if(b[i]-a[i]<y&&y<=b[i])break;
      }
      i-n?printf("%s %d\n",s[i],y-b[i]+a[i]):printf("Unknown\n");
    }
  }
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s %d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%s %d\n"
.LC3:
	.string	"Unknown"
.LC4:
	.string	"%d %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
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-1028096(%rsp), %r11
	.cfi_def_cfa 11, 1028152
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$152, %rsp
	.cfi_def_cfa_offset 1028304
	leaq	.LC0(%rip), %r12
	leaq	.LC1(%rip), %rbp
	movq	%fs:40, %rax
	movq	%rax, 1028232(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movq	%rax, 8(%rsp)
	leaq	20(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rdx
	movq	(%rsp), %rsi
	leaq	.LC4(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	testl	%eax, %eax
	je	.L12
	jle	.L14
	leaq	8128(%rsp), %r15
	xorl	%r14d, %r14d
	leaq	32(%rsp), %rbx
	leaq	4080(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	0(,%r14,4), %rdx
	movq	%r15, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	leaq	0(%r13,%rdx), %rcx
	addq	%rbx, %rdx
	addq	$1, %r14
	addq	$1010, %r15
	call	__isoc99_scanf@PLT
	cmpl	%r14d, 20(%rsp)
	jg	.L3
.L14:
	movl	24(%rsp), %eax
	leaq	28(%rsp), %rbx
	leaq	8128(%rsp), %r13
	leaq	.LC3(%rip), %r14
	leal	-1(%rax), %edx
	movl	%edx, 24(%rsp)
	testl	%eax, %eax
	je	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %r11d
	testl	%r11d, %r11d
	jle	.L16
	movl	28(%rsp), %ecx
	movslq	%r11d, %r10
	xorl	%eax, %eax
	leaq	32(%rsp), %r8
	leaq	4080(%rsp), %r9
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%r9,%rax,4), %esi
	movl	(%r8,%rax,4), %edi
	movslq	%eax, %rdx
	movl	%esi, %r15d
	subl	%edi, %r15d
	cmpl	%ecx, %r15d
	jge	.L17
	cmpl	%ecx, %esi
	jge	.L6
.L17:
	addq	$1, %rax
	addl	$1, %edx
	cmpq	%rax, %r10
	jne	.L8
.L5:
	cmpl	%edx, %r11d
	je	.L9
	movslq	%edx, %rdx
	movl	28(%rsp), %ecx
	movl	4080(%rsp,%rdx,4), %esi
	movl	32(%rsp,%rdx,4), %edi
.L6:
	imulq	$1010, %rdx, %rdx
	subl	%esi, %ecx
	xorl	%eax, %eax
	addl	%edi, %ecx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	addq	%r13, %rdx
	call	__printf_chk@PLT
.L10:
	movl	24(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 24(%rsp)
	testl	%eax, %eax
	jne	.L4
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%r14, %rdi
	call	puts@PLT
	jmp	.L10
.L16:
	xorl	%edx, %edx
	jmp	.L5
.L12:
	movq	1028232(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$1028248, %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
.L29:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s %d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%s %d\n"
.LC3:
	.string	"Unknown"
.LC4:
	.string	"%d %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
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-1028096(%rsp), %r11
	.cfi_def_cfa 11, 1028152
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$152, %rsp
	.cfi_def_cfa_offset 1028304
	leaq	.LC0(%rip), %r12
	leaq	.LC1(%rip), %rbp
	movq	%fs:40, %rax
	movq	%rax, 1028232(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movq	%rax, 8(%rsp)
	leaq	20(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rdx
	movq	(%rsp), %rsi
	leaq	.LC4(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	testl	%eax, %eax
	je	.L12
	jle	.L14
	leaq	8128(%rsp), %r15
	xorl	%r14d, %r14d
	leaq	32(%rsp), %rbx
	leaq	4080(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	0(,%r14,4), %rdx
	movq	%r15, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	leaq	0(%r13,%rdx), %rcx
	addq	%rbx, %rdx
	addq	$1, %r14
	addq	$1010, %r15
	call	__isoc99_scanf@PLT
	cmpl	%r14d, 20(%rsp)
	jg	.L3
.L14:
	movl	24(%rsp), %eax
	leaq	28(%rsp), %rbx
	leaq	8128(%rsp), %r13
	leaq	.LC3(%rip), %r14
	leal	-1(%rax), %edx
	movl	%edx, 24(%rsp)
	testl	%eax, %eax
	je	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %r11d
	testl	%r11d, %r11d
	jle	.L16
	movl	28(%rsp), %ecx
	movslq	%r11d, %r10
	xorl	%eax, %eax
	leaq	32(%rsp), %r8
	leaq	4080(%rsp), %r9
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%r9,%rax,4), %esi
	movl	(%r8,%rax,4), %edi
	movslq	%eax, %rdx
	movl	%esi, %r15d
	subl	%edi, %r15d
	cmpl	%ecx, %r15d
	jge	.L17
	cmpl	%ecx, %esi
	jge	.L6
.L17:
	addq	$1, %rax
	addl	$1, %edx
	cmpq	%rax, %r10
	jne	.L8
.L5:
	cmpl	%edx, %r11d
	je	.L9
	movslq	%edx, %rdx
	movl	28(%rsp), %ecx
	movl	4080(%rsp,%rdx,4), %esi
	movl	32(%rsp,%rdx,4), %edi
.L6:
	imulq	$1010, %rdx, %rdx
	subl	%esi, %ecx
	xorl	%eax, %eax
	addl	%edi, %ecx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	addq	%r13, %rdx
	call	__printf_chk@PLT
.L10:
	movl	24(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 24(%rsp)
	testl	%eax, %eax
	jne	.L4
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%r14, %rdi
	call	puts@PLT
	jmp	.L10
.L16:
	xorl	%edx, %edx
	jmp	.L5
.L12:
	movq	1028232(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$1028248, %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
.L29:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:
```