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>
#include<string.h>

int main(){
  int i,j;
  int N,M;
  char U[260][12];
  char T[260][12];
  int flag1=0,flag2=0;
  
  scanf("%d",&N);
  
  for(i=0;i<N;i++) scanf("%s",U[i]);
  
  scanf("%d",&M);
  
  for(j=0;j<M;j++){
    scanf("%s",T[j]);
    for(i=0;i<N;i++){
      if(strcmp(U[i],T[j])==0){
	flag1=1;
      }
    }
    if(flag1==1){
      if(flag2==1){
	printf("Closed by %s\n",T[j]);
	flag2=0;
      }else if(flag2==0){
	printf("Opened by %s\n",T[j]);
	flag2=1;
      }
    }else if(flag1==0){
      printf("Unknown %s\n",T[j]);
    }
    flag1=0;
  }

  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"Closed by %s\n"
.LC3:
	.string	"Opened by %s\n"
.LC4:
	.string	"Unknown %s\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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	$2216, %rsp
	.cfi_def_cfa_offset 6368
	leaq	.LC0(%rip), %r12
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 6296(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %edx
	testl	%edx, %edx
	jle	.L2
	leaq	.LC1(%rip), %rax
	leaq	48(%rsp), %rbp
	xorl	%ebx, %ebx
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L3:
	movq	(%rsp), %rdi
	movq	%rbp, %rsi
	xorl	%eax, %eax
	addl	$1, %ebx
	addq	$12, %rbp
	call	__isoc99_scanf@PLT
	cmpl	%ebx, 40(%rsp)
	jg	.L3
.L2:
	leaq	44(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	testl	%eax, %eax
	jle	.L4
	leaq	.LC1(%rip), %rax
	movl	$0, 28(%rsp)
	xorl	%r12d, %r12d
	movq	%rax, (%rsp)
	leaq	3168(%rsp), %rax
	movq	%rax, 8(%rsp)
	leaq	60(%rsp), %rax
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L10:
	movq	8(%rsp), %rcx
	leaq	(%r12,%r12,2), %rax
	movq	(%rsp), %rdi
	leaq	(%rcx,%rax,4), %r15
	xorl	%eax, %eax
	movq	%r15, %rsi
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %eax
	testl	%eax, %eax
	jle	.L5
	movq	16(%rsp), %rdx
	subl	$1, %eax
	leaq	48(%rsp), %r13
	xorl	%r14d, %r14d
	leaq	(%rax,%rax,2), %rax
	movl	$1, %ebx
	leaq	(%rdx,%rax,4), %rbp
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r13, %rdi
	movq	%r15, %rsi
	call	strcmp@PLT
	testl	%eax, %eax
	cmove	%ebx, %r14d
	addq	$12, %r13
	cmpq	%r13, %rbp
	jne	.L7
	cmpl	$1, %r14d
	je	.L17
.L5:
	movq	%r15, %rdx
	leaq	.LC4(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L9:
	addq	$1, %r12
	cmpl	%r12d, 44(%rsp)
	jg	.L10
.L4:
	movq	6296(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$6312, %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
.L17:
	.cfi_restore_state
	cmpl	$1, 28(%rsp)
	movq	%r15, %rdx
	je	.L19
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$1, 28(%rsp)
	jmp	.L9
.L19:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$0, 28(%rsp)
	jmp	.L9
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"Closed by %s\n"
.LC3:
	.string	"Opened by %s\n"
.LC4:
	.string	"Unknown %s\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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	$2216, %rsp
	.cfi_def_cfa_offset 6368
	leaq	.LC0(%rip), %r12
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 6296(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %edx
	testl	%edx, %edx
	jle	.L2
	leaq	.LC1(%rip), %rax
	leaq	48(%rsp), %rbp
	xorl	%ebx, %ebx
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L3:
	movq	(%rsp), %rdi
	movq	%rbp, %rsi
	xorl	%eax, %eax
	addl	$1, %ebx
	addq	$12, %rbp
	call	__isoc99_scanf@PLT
	cmpl	%ebx, 40(%rsp)
	jg	.L3
.L2:
	leaq	44(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	testl	%eax, %eax
	jle	.L4
	leaq	.LC1(%rip), %rax
	movl	$0, 28(%rsp)
	xorl	%r12d, %r12d
	movq	%rax, (%rsp)
	leaq	3168(%rsp), %rax
	movq	%rax, 8(%rsp)
	leaq	60(%rsp), %rax
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L10:
	movq	8(%rsp), %rcx
	leaq	(%r12,%r12,2), %rax
	movq	(%rsp), %rdi
	leaq	(%rcx,%rax,4), %r15
	xorl	%eax, %eax
	movq	%r15, %rsi
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %eax
	testl	%eax, %eax
	jle	.L5
	movq	16(%rsp), %rdx
	subl	$1, %eax
	leaq	48(%rsp), %r13
	xorl	%r14d, %r14d
	leaq	(%rax,%rax,2), %rax
	movl	$1, %ebx
	leaq	(%rdx,%rax,4), %rbp
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r13, %rdi
	movq	%r15, %rsi
	call	strcmp@PLT
	testl	%eax, %eax
	cmove	%ebx, %r14d
	addq	$12, %r13
	cmpq	%r13, %rbp
	jne	.L7
	cmpl	$1, %r14d
	je	.L17
.L5:
	movq	%r15, %rdx
	leaq	.LC4(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L9:
	addq	$1, %r12
	cmpl	%r12d, 44(%rsp)
	jg	.L10
.L4:
	movq	6296(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$6312, %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
.L17:
	.cfi_restore_state
	cmpl	$1, 28(%rsp)
	movq	%r15, %rdx
	je	.L19
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$1, 28(%rsp)
	jmp	.L9
.L19:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$0, 28(%rsp)
	jmp	.L9
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"Closed by %s\n"
.LC3:
	.string	"Opened by %s\n"
.LC4:
	.string	"Unknown %s\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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	$2216, %rsp
	.cfi_def_cfa_offset 6368
	leaq	.LC0(%rip), %r12
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 6296(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %edx
	testl	%edx, %edx
	jle	.L2
	leaq	.LC1(%rip), %rax
	leaq	48(%rsp), %rbp
	xorl	%ebx, %ebx
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L3:
	movq	(%rsp), %rdi
	movq	%rbp, %rsi
	xorl	%eax, %eax
	addl	$1, %ebx
	addq	$12, %rbp
	call	__isoc99_scanf@PLT
	cmpl	%ebx, 40(%rsp)
	jg	.L3
.L2:
	leaq	44(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	testl	%eax, %eax
	jle	.L4
	leaq	.LC1(%rip), %rax
	movl	$0, 28(%rsp)
	xorl	%r12d, %r12d
	movq	%rax, (%rsp)
	leaq	3168(%rsp), %rax
	movq	%rax, 8(%rsp)
	leaq	60(%rsp), %rax
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L10:
	movq	8(%rsp), %rcx
	leaq	(%r12,%r12,2), %rax
	movq	(%rsp), %rdi
	leaq	(%rcx,%rax,4), %r15
	xorl	%eax, %eax
	movq	%r15, %rsi
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %eax
	testl	%eax, %eax
	jle	.L5
	movq	16(%rsp), %rdx
	subl	$1, %eax
	leaq	48(%rsp), %r13
	xorl	%r14d, %r14d
	leaq	(%rax,%rax,2), %rax
	movl	$1, %ebx
	leaq	(%rdx,%rax,4), %rbp
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r13, %rdi
	movq	%r15, %rsi
	call	strcmp@PLT
	testl	%eax, %eax
	cmove	%ebx, %r14d
	addq	$12, %r13
	cmpq	%r13, %rbp
	jne	.L7
	cmpl	$1, %r14d
	je	.L17
.L5:
	movq	%r15, %rdx
	leaq	.LC4(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L9:
	addq	$1, %r12
	cmpl	%r12d, 44(%rsp)
	jg	.L10
.L4:
	movq	6296(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$6312, %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
.L17:
	.cfi_restore_state
	cmpl	$1, 28(%rsp)
	movq	%r15, %rdx
	je	.L19
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$1, 28(%rsp)
	jmp	.L9
.L19:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$0, 28(%rsp)
	jmp	.L9
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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>
#include<string.h>

int main(){
  int i,j;
  int N,M;
  char U[260][12];
  char T[260][12];
  int flag1=0,flag2=0;
  
  scanf("%d",&N);
  
  for(i=0;i<N;i++) scanf("%s",U[i]);
  
  scanf("%d",&M);
  
  for(j=0;j<M;j++){
    scanf("%s",T[j]);
    for(i=0;i<N;i++){
      if(strcmp(U[i],T[j])==0){
	flag1=1;
      }
    }
    if(flag1==1){
      if(flag2==1){
	printf("Closed by %s\n",T[j]);
	flag2=0;
      }else if(flag2==0){
	printf("Opened by %s\n",T[j]);
	flag2=1;
      }
    }else if(flag1==0){
      printf("Unknown %s\n",T[j]);
    }
    flag1=0;
  }

  return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
#include<string.h>

int main(){
  int i,j;
  int N,M;
  char U[260][12];
  char T[260][12];
  int flag1=0,flag2=0;
  
  scanf("%d",&N);
  
  for(i=0;i<N;i++) scanf("%s",U[i]);
  
  scanf("%d",&M);
  
  for(j=0;j<M;j++){
    scanf("%s",T[j]);
    for(i=0;i<N;i++){
      if(strcmp(U[i],T[j])==0){
	flag1=1;
      }
    }
    if(flag1==1){
      if(flag2==1){
	printf("Closed by %s\n",T[j]);
	flag2=0;
      }else if(flag2==0){
	printf("Opened by %s\n",T[j]);
	flag2=1;
      }
    }else if(flag1==0){
      printf("Unknown %s\n",T[j]);
    }
    flag1=0;
  }

  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
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 assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
#include<string.h>

int main(){
  int i,j;
  int N,M;
  char U[260][12];
  char T[260][12];
  int flag1=0,flag2=0;
  
  scanf("%d",&N);
  
  for(i=0;i<N;i++) scanf("%s",U[i]);
  
  scanf("%d",&M);
  
  for(j=0;j<M;j++){
    scanf("%s",T[j]);
    for(i=0;i<N;i++){
      if(strcmp(U[i],T[j])==0){
	flag1=1;
      }
    }
    if(flag1==1){
      if(flag2==1){
	printf("Closed by %s\n",T[j]);
	flag2=0;
      }else if(flag2==0){
	printf("Opened by %s\n",T[j]);
	flag2=1;
      }
    }else if(flag1==0){
      printf("Unknown %s\n",T[j]);
    }
    flag1=0;
  }

  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"Closed by %s\n"
.LC3:
	.string	"Opened by %s\n"
.LC4:
	.string	"Unknown %s\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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	$2216, %rsp
	.cfi_def_cfa_offset 6368
	leaq	.LC0(%rip), %r12
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 6296(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %edx
	testl	%edx, %edx
	jle	.L2
	leaq	.LC1(%rip), %rax
	leaq	48(%rsp), %rbp
	xorl	%ebx, %ebx
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L3:
	movq	(%rsp), %rdi
	movq	%rbp, %rsi
	xorl	%eax, %eax
	addl	$1, %ebx
	addq	$12, %rbp
	call	__isoc99_scanf@PLT
	cmpl	%ebx, 40(%rsp)
	jg	.L3
.L2:
	leaq	44(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	testl	%eax, %eax
	jle	.L4
	leaq	.LC1(%rip), %rax
	movl	$0, 28(%rsp)
	xorl	%r12d, %r12d
	movq	%rax, (%rsp)
	leaq	3168(%rsp), %rax
	movq	%rax, 8(%rsp)
	leaq	60(%rsp), %rax
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L10:
	movq	8(%rsp), %rcx
	leaq	(%r12,%r12,2), %rax
	movq	(%rsp), %rdi
	leaq	(%rcx,%rax,4), %r15
	xorl	%eax, %eax
	movq	%r15, %rsi
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %eax
	testl	%eax, %eax
	jle	.L5
	movq	16(%rsp), %rdx
	subl	$1, %eax
	leaq	48(%rsp), %r13
	xorl	%r14d, %r14d
	leaq	(%rax,%rax,2), %rax
	movl	$1, %ebx
	leaq	(%rdx,%rax,4), %rbp
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r13, %rdi
	movq	%r15, %rsi
	call	strcmp@PLT
	testl	%eax, %eax
	cmove	%ebx, %r14d
	addq	$12, %r13
	cmpq	%r13, %rbp
	jne	.L7
	cmpl	$1, %r14d
	je	.L17
.L5:
	movq	%r15, %rdx
	leaq	.LC4(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L9:
	addq	$1, %r12
	cmpl	%r12d, 44(%rsp)
	jg	.L10
.L4:
	movq	6296(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$6312, %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
.L17:
	.cfi_restore_state
	cmpl	$1, 28(%rsp)
	movq	%r15, %rdx
	je	.L19
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$1, 28(%rsp)
	jmp	.L9
.L19:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$0, 28(%rsp)
	jmp	.L9
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"Closed by %s\n"
.LC3:
	.string	"Opened by %s\n"
.LC4:
	.string	"Unknown %s\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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	$2216, %rsp
	.cfi_def_cfa_offset 6368
	leaq	.LC0(%rip), %r12
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 6296(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %edx
	testl	%edx, %edx
	jle	.L2
	leaq	.LC1(%rip), %rax
	leaq	48(%rsp), %rbp
	xorl	%ebx, %ebx
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L3:
	movq	(%rsp), %rdi
	movq	%rbp, %rsi
	xorl	%eax, %eax
	addl	$1, %ebx
	addq	$12, %rbp
	call	__isoc99_scanf@PLT
	cmpl	%ebx, 40(%rsp)
	jg	.L3
.L2:
	leaq	44(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	testl	%eax, %eax
	jle	.L4
	leaq	.LC1(%rip), %rax
	movl	$0, 28(%rsp)
	xorl	%r12d, %r12d
	movq	%rax, (%rsp)
	leaq	3168(%rsp), %rax
	movq	%rax, 8(%rsp)
	leaq	60(%rsp), %rax
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L10:
	movq	8(%rsp), %rcx
	leaq	(%r12,%r12,2), %rax
	movq	(%rsp), %rdi
	leaq	(%rcx,%rax,4), %r15
	xorl	%eax, %eax
	movq	%r15, %rsi
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %eax
	testl	%eax, %eax
	jle	.L5
	movq	16(%rsp), %rdx
	subl	$1, %eax
	leaq	48(%rsp), %r13
	xorl	%r14d, %r14d
	leaq	(%rax,%rax,2), %rax
	movl	$1, %ebx
	leaq	(%rdx,%rax,4), %rbp
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r13, %rdi
	movq	%r15, %rsi
	call	strcmp@PLT
	testl	%eax, %eax
	cmove	%ebx, %r14d
	addq	$12, %r13
	cmpq	%r13, %rbp
	jne	.L7
	cmpl	$1, %r14d
	je	.L17
.L5:
	movq	%r15, %rdx
	leaq	.LC4(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L9:
	addq	$1, %r12
	cmpl	%r12d, 44(%rsp)
	jg	.L10
.L4:
	movq	6296(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$6312, %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
.L17:
	.cfi_restore_state
	cmpl	$1, 28(%rsp)
	movq	%r15, %rdx
	je	.L19
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$1, 28(%rsp)
	jmp	.L9
.L19:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$0, 28(%rsp)
	jmp	.L9
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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:
```