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

```c
#include<string.h>
 
 
int main(){
   
  char u[256][20], t[256][20];
  int n, m, i, j, cnt=0;
 
  scanf("%d", &n);
  for(i=0;i<n;i++) scanf("%s", u[i]);
  scanf("%d", &m);
  for(i=0;i<m;i++) scanf("%s", t[i]);
 
  for(i=0;i<m;i++){
    for(j=0;j<n;j++){
      if(strcmp(t[i],u[j])==0){
        if(cnt%2==0){
          printf("Opened by %s\n", t[i]);
          cnt++;
          break;
       }else{
          printf("Closed by %s\n", t[i]);
          cnt++;
          break;
       }
     }
      if(j==n-1) printf("Unknown %s\n", t[i]);
    }
  }
   
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"Opened by %s\n"
.LC3:
	.string	"Closed by %s\n"
.LC4:
	.string	"Unknown %s\n"
	.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	$4096, %rsp
	orq	$0, (%rsp)
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$2096, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -10260(%rbp)
	leaq	-10276(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	$0, -10268(%rbp)
	jmp	.L2
.L3:
	leaq	-10256(%rbp), %rcx
	movl	-10268(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	addl	$1, -10268(%rbp)
.L2:
	movl	-10276(%rbp), %eax
	cmpl	%eax, -10268(%rbp)
	jl	.L3
	leaq	-10272(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	$0, -10268(%rbp)
	jmp	.L4
.L5:
	leaq	-5136(%rbp), %rcx
	movl	-10268(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	addl	$1, -10268(%rbp)
.L4:
	movl	-10272(%rbp), %eax
	cmpl	%eax, -10268(%rbp)
	jl	.L5
	movl	$0, -10268(%rbp)
	jmp	.L6
.L13:
	movl	$0, -10264(%rbp)
	jmp	.L7
.L12:
	leaq	-10256(%rbp), %rcx
	movl	-10264(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rcx,%rax), %rdx
	leaq	-5136(%rbp), %rsi
	movl	-10268(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L8
	movl	-10260(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L9
	leaq	-5136(%rbp), %rcx
	movl	-10268(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -10260(%rbp)
	jmp	.L10
.L9:
	leaq	-5136(%rbp), %rcx
	movl	-10268(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -10260(%rbp)
	jmp	.L10
.L8:
	movl	-10276(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -10264(%rbp)
	jne	.L11
	leaq	-5136(%rbp), %rcx
	movl	-10268(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L11:
	addl	$1, -10264(%rbp)
.L7:
	movl	-10276(%rbp), %eax
	cmpl	%eax, -10264(%rbp)
	jl	.L12
.L10:
	addl	$1, -10268(%rbp)
.L6:
	movl	-10272(%rbp), %eax
	cmpl	%eax, -10268(%rbp)
	jl	.L13
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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"
.LC1:
	.string	"%s"
.LC2:
	.string	"Opened by %s\n"
.LC3:
	.string	"Closed by %s\n"
.LC4:
	.string	"Unknown %s\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB12:
	.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
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 8248
	orq	$0, (%rsp)
	subq	$2104, %rsp
	.cfi_def_cfa_offset 10352
	leaq	.LC0(%rip), %r12
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 10280(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rsi
	leaq	32(%rsp), %rbp
	call	scanf@PLT
	movl	24(%rsp), %edx
	testl	%edx, %edx
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	scanf@PLT
	addq	$20, %rbp
	cmpl	%ebx, 24(%rsp)
	jg	.L5
.L6:
	leaq	28(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	jle	.L4
	leaq	5152(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	movq	%rbp, %r12
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	scanf@PLT
	movl	28(%rsp), %eax
	addq	$20, %r12
	cmpl	%ebx, %eax
	jg	.L7
	testl	%eax, %eax
	jle	.L4
	movl	24(%rsp), %ebx
	movl	$0, 12(%rsp)
	xorl	%r12d, %r12d
	leaq	.LC4(%rip), %r13
	testl	%ebx, %ebx
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L15:
	leaq	32(%rsp), %r14
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%r14, %rsi
	movq	%rbp, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L27
.L9:
	leal	-1(%rbx), %eax
	cmpl	%r15d, %eax
	je	.L28
	addl	$1, %r15d
	addq	$20, %r14
	cmpl	%r15d, %ebx
	jg	.L14
.L11:
	addl	$1, %r12d
	cmpl	28(%rsp), %r12d
	jge	.L4
	movl	24(%rsp), %ebx
	addq	$20, %rbp
	testl	%ebx, %ebx
	jg	.L15
.L4:
	movq	10280(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$10296, %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
	.p2align 4,,10
	.p2align 3
.L28:
	.cfi_restore_state
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	movl	%ebx, %r15d
	call	printf@PLT
	movl	24(%rsp), %ebx
	addq	$20, %r14
	cmpl	%ebx, %r15d
	jge	.L11
	movq	%r14, %rsi
	movq	%rbp, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L9
	.p2align 4,,10
	.p2align 3
.L27:
	movl	12(%rsp), %edx
	movq	%rbp, %rsi
	movl	%edx, %eax
	addl	$1, %edx
	andl	$1, %eax
	movl	%edx, 12(%rsp)
	testl	%eax, %eax
	jne	.L10
	leaq	.LC2(%rip), %rdi
	call	printf@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L10:
	leaq	.LC3(%rip), %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L11
.L29:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE12:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"Opened by %s\n"
.LC3:
	.string	"Closed by %s\n"
.LC4:
	.string	"Unknown %s\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB12:
	.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
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 8248
	orq	$0, (%rsp)
	subq	$2104, %rsp
	.cfi_def_cfa_offset 10352
	leaq	.LC0(%rip), %r12
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 10280(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rsi
	leaq	32(%rsp), %rbp
	call	scanf@PLT
	movl	24(%rsp), %edx
	testl	%edx, %edx
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	scanf@PLT
	addq	$20, %rbp
	cmpl	%ebx, 24(%rsp)
	jg	.L5
.L6:
	leaq	28(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	jle	.L4
	leaq	5152(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	movq	%rbp, %r12
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	scanf@PLT
	movl	28(%rsp), %eax
	addq	$20, %r12
	cmpl	%ebx, %eax
	jg	.L7
	testl	%eax, %eax
	jle	.L4
	movl	24(%rsp), %ebx
	movl	$0, 12(%rsp)
	xorl	%r12d, %r12d
	leaq	.LC4(%rip), %r13
	testl	%ebx, %ebx
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L15:
	leaq	32(%rsp), %r14
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%r14, %rsi
	movq	%rbp, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L27
.L9:
	leal	-1(%rbx), %eax
	cmpl	%r15d, %eax
	je	.L28
	addl	$1, %r15d
	addq	$20, %r14
	cmpl	%r15d, %ebx
	jg	.L14
.L11:
	addl	$1, %r12d
	cmpl	28(%rsp), %r12d
	jge	.L4
	movl	24(%rsp), %ebx
	addq	$20, %rbp
	testl	%ebx, %ebx
	jg	.L15
.L4:
	movq	10280(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$10296, %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
	.p2align 4,,10
	.p2align 3
.L28:
	.cfi_restore_state
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	movl	%ebx, %r15d
	call	printf@PLT
	movl	24(%rsp), %ebx
	addq	$20, %r14
	cmpl	%ebx, %r15d
	jge	.L11
	movq	%r14, %rsi
	movq	%rbp, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L9
	.p2align 4,,10
	.p2align 3
.L27:
	movl	12(%rsp), %edx
	movq	%rbp, %rsi
	movl	%edx, %eax
	addl	$1, %edx
	andl	$1, %eax
	movl	%edx, 12(%rsp)
	testl	%eax, %eax
	jne	.L10
	leaq	.LC2(%rip), %rdi
	call	printf@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L10:
	leaq	.LC3(%rip), %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L11
.L29:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE12:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include<string.h>
 
 
int main(){
   
  char u[256][20], t[256][20];
  int n, m, i, j, cnt=0;
 
  scanf("%d", &n);
  for(i=0;i<n;i++) scanf("%s", u[i]);
  scanf("%d", &m);
  for(i=0;i<m;i++) scanf("%s", t[i]);
 
  for(i=0;i<m;i++){
    for(j=0;j<n;j++){
      if(strcmp(t[i],u[j])==0){
        if(cnt%2==0){
          printf("Opened by %s\n", t[i]);
          cnt++;
          break;
       }else{
          printf("Closed by %s\n", t[i]);
          cnt++;
          break;
       }
     }
      if(j==n-1) printf("Unknown %s\n", t[i]);
    }
  }
   
  return 0;
}
4
abcd
efgh
ijkl
mnop
5
abcd
abcc
efgh
abcd
mnop

Opened by abcd
Unknown abcc
Closed by efgh
Opened by abcd
Closed by mnop

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

```c
#include<string.h>
 
 
int main(){
   
  char u[256][20], t[256][20];
  int n, m, i, j, cnt=0;
 
  scanf("%d", &n);
  for(i=0;i<n;i++) scanf("%s", u[i]);
  scanf("%d", &m);
  for(i=0;i<m;i++) scanf("%s", t[i]);
 
  for(i=0;i<m;i++){
    for(j=0;j<n;j++){
      if(strcmp(t[i],u[j])==0){
        if(cnt%2==0){
          printf("Opened by %s\n", t[i]);
          cnt++;
          break;
       }else{
          printf("Closed by %s\n", t[i]);
          cnt++;
          break;
       }
     }
      if(j==n-1) printf("Unknown %s\n", t[i]);
    }
  }
   
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"Opened by %s\n"
.LC3:
	.string	"Closed by %s\n"
.LC4:
	.string	"Unknown %s\n"
	.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	$4096, %rsp
	orq	$0, (%rsp)
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$2096, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -10260(%rbp)
	leaq	-10276(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	$0, -10268(%rbp)
	jmp	.L2
.L3:
	leaq	-10256(%rbp), %rcx
	movl	-10268(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	addl	$1, -10268(%rbp)
.L2:
	movl	-10276(%rbp), %eax
	cmpl	%eax, -10268(%rbp)
	jl	.L3
	leaq	-10272(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	$0, -10268(%rbp)
	jmp	.L4
.L5:
	leaq	-5136(%rbp), %rcx
	movl	-10268(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	addl	$1, -10268(%rbp)
.L4:
	movl	-10272(%rbp), %eax
	cmpl	%eax, -10268(%rbp)
	jl	.L5
	movl	$0, -10268(%rbp)
	jmp	.L6
.L13:
	movl	$0, -10264(%rbp)
	jmp	.L7
.L12:
	leaq	-10256(%rbp), %rcx
	movl	-10264(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rcx,%rax), %rdx
	leaq	-5136(%rbp), %rsi
	movl	-10268(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L8
	movl	-10260(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L9
	leaq	-5136(%rbp), %rcx
	movl	-10268(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -10260(%rbp)
	jmp	.L10
.L9:
	leaq	-5136(%rbp), %rcx
	movl	-10268(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -10260(%rbp)
	jmp	.L10
.L8:
	movl	-10276(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -10264(%rbp)
	jne	.L11
	leaq	-5136(%rbp), %rcx
	movl	-10268(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L11:
	addl	$1, -10264(%rbp)
.L7:
	movl	-10276(%rbp), %eax
	cmpl	%eax, -10264(%rbp)
	jl	.L12
.L10:
	addl	$1, -10268(%rbp)
.L6:
	movl	-10272(%rbp), %eax
	cmpl	%eax, -10268(%rbp)
	jl	.L13
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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"
.LC1:
	.string	"%s"
.LC2:
	.string	"Opened by %s\n"
.LC3:
	.string	"Closed by %s\n"
.LC4:
	.string	"Unknown %s\n"
	.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	$4096, %rsp
	orq	$0, (%rsp)
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$2096, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -10260(%rbp)
	leaq	-10276(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	$0, -10268(%rbp)
	jmp	.L2
.L3:
	leaq	-10256(%rbp), %rcx
	movl	-10268(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	addl	$1, -10268(%rbp)
.L2:
	movl	-10276(%rbp), %eax
	cmpl	%eax, -10268(%rbp)
	jl	.L3
	leaq	-10272(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	$0, -10268(%rbp)
	jmp	.L4
.L5:
	leaq	-5136(%rbp), %rcx
	movl	-10268(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	addl	$1, -10268(%rbp)
.L4:
	movl	-10272(%rbp), %eax
	cmpl	%eax, -10268(%rbp)
	jl	.L5
	movl	$0, -10268(%rbp)
	jmp	.L6
.L13:
	movl	$0, -10264(%rbp)
	jmp	.L7
.L12:
	leaq	-10256(%rbp), %rcx
	movl	-10264(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rcx,%rax), %rdx
	leaq	-5136(%rbp), %rsi
	movl	-10268(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L8
	movl	-10260(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L9
	leaq	-5136(%rbp), %rcx
	movl	-10268(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -10260(%rbp)
	jmp	.L10
.L9:
	leaq	-5136(%rbp), %rcx
	movl	-10268(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -10260(%rbp)
	jmp	.L10
.L8:
	movl	-10276(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -10264(%rbp)
	jne	.L11
	leaq	-5136(%rbp), %rcx
	movl	-10268(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L11:
	addl	$1, -10264(%rbp)
.L7:
	movl	-10276(%rbp), %eax
	cmpl	%eax, -10264(%rbp)
	jl	.L12
.L10:
	addl	$1, -10268(%rbp)
.L6:
	movl	-10272(%rbp), %eax
	cmpl	%eax, -10268(%rbp)
	jl	.L13
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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:
