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(){

  int n,m,i,j,c=0;

  char a[300][12];
  char b[300][12];

  scanf("%d",&n);

  for(i=1;i<=n;i++){
    scanf("%s",a[i]);
  }


  scanf("%d",&m);

  for(j=1;j<=m;j++){
    scanf("%s",b[j]);
  }



  // for(i=1;i<=n;i++){
  // printf("%s\n",a[i]);
  //  }
  

  for(i=1;i<=m;i++){
    for(j=1;j<=n;j++){

      if(strcmp(a[j],b[i])==0){
	c++;
	break;
      }
    }
    if(strcmp(a[j],b[i])!=0){
      printf("Unknown %s\n",b[i]);
    }
    else{
      if(c%2!=0&&c!=0){
	printf("Opened by %s\n",a[j]);
      }
      if(c%2==0&&c!=0){
	printf("Closed by %s\n",a[j]);
      }
    }
  }





  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"Unknown %s\n"
.LC3:
	.string	"Opened by %s\n"
.LC4:
	.string	"Closed by %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	$3152, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -7220(%rbp)
	leaq	-7236(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -7228(%rbp)
	jmp	.L2
.L3:
	leaq	-7216(%rbp), %rcx
	movl	-7228(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -7228(%rbp)
.L2:
	movl	-7236(%rbp), %eax
	cmpl	%eax, -7228(%rbp)
	jle	.L3
	leaq	-7232(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -7224(%rbp)
	jmp	.L4
.L5:
	leaq	-3616(%rbp), %rcx
	movl	-7224(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -7224(%rbp)
.L4:
	movl	-7232(%rbp), %eax
	cmpl	%eax, -7224(%rbp)
	jle	.L5
	movl	$1, -7228(%rbp)
	jmp	.L6
.L14:
	movl	$1, -7224(%rbp)
	jmp	.L7
.L10:
	leaq	-3616(%rbp), %rcx
	movl	-7228(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rcx,%rax), %rdx
	leaq	-7216(%rbp), %rsi
	movl	-7224(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L8
	addl	$1, -7220(%rbp)
	jmp	.L9
.L8:
	addl	$1, -7224(%rbp)
.L7:
	movl	-7236(%rbp), %eax
	cmpl	%eax, -7224(%rbp)
	jle	.L10
.L9:
	leaq	-3616(%rbp), %rcx
	movl	-7228(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rcx,%rax), %rdx
	leaq	-7216(%rbp), %rsi
	movl	-7224(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L11
	leaq	-3616(%rbp), %rcx
	movl	-7228(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %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
	jmp	.L12
.L11:
	movl	-7220(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L13
	cmpl	$0, -7220(%rbp)
	je	.L13
	leaq	-7216(%rbp), %rcx
	movl	-7224(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %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
.L13:
	movl	-7220(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L12
	cmpl	$0, -7220(%rbp)
	je	.L12
	leaq	-7216(%rbp), %rcx
	movl	-7224(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %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
.L12:
	addl	$1, -7228(%rbp)
.L6:
	movl	-7232(%rbp), %eax
	cmpl	%eax, -7228(%rbp)
	jle	.L14
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	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	"Unknown %s\n"
.LC3:
	.string	"Opened by %s\n"
.LC4:
	.string	"Closed by %s\n"
	.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
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$3160, %rsp
	.cfi_def_cfa_offset 7312
	leaq	.LC0(%rip), %r12
	movl	$1, %ebx
	leaq	.LC1(%rip), %r13
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 7240(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rsi
	leaq	44(%rsp), %rbp
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$12, %rbp
	cmpl	%ebx, 24(%rsp)
	jge	.L5
.L6:
	leaq	28(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %edx
	testl	%edx, %edx
	jle	.L4
	leaq	3644(%rsp), %rbx
	movl	$1, %ebp
	leaq	.LC1(%rip), %r13
	movq	%rbx, %r14
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %r12d
	addq	$12, %r14
	cmpl	%ebp, %r12d
	jge	.L7
	testl	%r12d, %r12d
	jle	.L4
	leaq	32(%rsp), %rax
	movl	$0, 4(%rsp)
	movl	$1, (%rsp)
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L8:
	movl	24(%rsp), %ebp
	leaq	44(%rsp), %r13
	movl	$1, %r14d
	testl	%ebp, %ebp
	jg	.L12
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L9:
	addl	$1, %r14d
	addq	$12, %r13
	cmpl	%ebp, %r14d
	jg	.L17
.L12:
	movq	%rbx, %rsi
	movq	%r13, %rdi
	movq	%r13, %r15
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L9
	addl	$1, 4(%rsp)
	movl	4(%rsp), %eax
	testb	$1, %al
	je	.L11
.L10:
	movq	%r15, %rdx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	28(%rsp), %r12d
.L14:
	addl	$1, (%rsp)
	movl	(%rsp), %eax
	addq	$12, %rbx
	cmpl	%r12d, %eax
	jle	.L8
.L4:
	movq	7240(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$7256, %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
	movq	8(%rsp), %rcx
	movslq	%r14d, %rdx
	movq	%rbx, %rsi
	leaq	(%rdx,%rdx,2), %rax
	leaq	(%rcx,%rax,4), %r15
	movq	%r15, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L13
	movq	%rbx, %rdx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	28(%rsp), %r12d
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L13:
	testb	$1, 4(%rsp)
	jne	.L10
	movl	4(%rsp), %eax
	testl	%eax, %eax
	je	.L14
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r15, %rdx
	leaq	.LC4(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	28(%rsp), %r12d
	jmp	.L14
.L29:
	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
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"Unknown %s\n"
.LC3:
	.string	"Opened by %s\n"
.LC4:
	.string	"Closed by %s\n"
	.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
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$3160, %rsp
	.cfi_def_cfa_offset 7312
	leaq	.LC0(%rip), %r12
	movl	$1, %ebx
	leaq	.LC1(%rip), %r13
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 7240(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rsi
	leaq	44(%rsp), %rbp
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$12, %rbp
	cmpl	%ebx, 24(%rsp)
	jge	.L5
.L6:
	leaq	28(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %edx
	testl	%edx, %edx
	jle	.L4
	leaq	3644(%rsp), %rbx
	movl	$1, %ebp
	leaq	.LC1(%rip), %r13
	movq	%rbx, %r14
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %r12d
	addq	$12, %r14
	cmpl	%ebp, %r12d
	jge	.L7
	testl	%r12d, %r12d
	jle	.L4
	leaq	32(%rsp), %rax
	movl	$0, 4(%rsp)
	movl	$1, (%rsp)
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L8:
	movl	24(%rsp), %ebp
	leaq	44(%rsp), %r13
	movl	$1, %r14d
	testl	%ebp, %ebp
	jg	.L12
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L9:
	addl	$1, %r14d
	addq	$12, %r13
	cmpl	%ebp, %r14d
	jg	.L17
.L12:
	movq	%rbx, %rsi
	movq	%r13, %rdi
	movq	%r13, %r15
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L9
	addl	$1, 4(%rsp)
	movl	4(%rsp), %eax
	testb	$1, %al
	je	.L11
.L10:
	movq	%r15, %rdx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	28(%rsp), %r12d
.L14:
	addl	$1, (%rsp)
	movl	(%rsp), %eax
	addq	$12, %rbx
	cmpl	%r12d, %eax
	jle	.L8
.L4:
	movq	7240(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$7256, %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
	movq	8(%rsp), %rcx
	movslq	%r14d, %rdx
	movq	%rbx, %rsi
	leaq	(%rdx,%rdx,2), %rax
	leaq	(%rcx,%rax,4), %r15
	movq	%r15, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L13
	movq	%rbx, %rdx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	28(%rsp), %r12d
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L13:
	testb	$1, 4(%rsp)
	jne	.L10
	movl	4(%rsp), %eax
	testl	%eax, %eax
	je	.L14
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r15, %rdx
	leaq	.LC4(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	28(%rsp), %r12d
	jmp	.L14
.L29:
	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:

#include <stdio.h>
int main(){

  int n,m,i,j,c=0;

  char a[300][12];
  char b[300][12];

  scanf("%d",&n);

  for(i=1;i<=n;i++){
    scanf("%s",a[i]);
  }


  scanf("%d",&m);

  for(j=1;j<=m;j++){
    scanf("%s",b[j]);
  }



  // for(i=1;i<=n;i++){
  // printf("%s\n",a[i]);
  //  }
  

  for(i=1;i<=m;i++){
    for(j=1;j<=n;j++){

      if(strcmp(a[j],b[i])==0){
	c++;
	break;
      }
    }
    if(strcmp(a[j],b[i])!=0){
      printf("Unknown %s\n",b[i]);
    }
    else{
      if(c%2!=0&&c!=0){
	printf("Opened by %s\n",a[j]);
      }
      if(c%2==0&&c!=0){
	printf("Closed by %s\n",a[j]);
      }
    }
  }





  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 <stdio.h>
int main(){

  int n,m,i,j,c=0;

  char a[300][12];
  char b[300][12];

  scanf("%d",&n);

  for(i=1;i<=n;i++){
    scanf("%s",a[i]);
  }


  scanf("%d",&m);

  for(j=1;j<=m;j++){
    scanf("%s",b[j]);
  }



  // for(i=1;i<=n;i++){
  // printf("%s\n",a[i]);
  //  }
  

  for(i=1;i<=m;i++){
    for(j=1;j<=n;j++){

      if(strcmp(a[j],b[i])==0){
	c++;
	break;
      }
    }
    if(strcmp(a[j],b[i])!=0){
      printf("Unknown %s\n",b[i]);
    }
    else{
      if(c%2!=0&&c!=0){
	printf("Opened by %s\n",a[j]);
      }
      if(c%2==0&&c!=0){
	printf("Closed by %s\n",a[j]);
      }
    }
  }





  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"Unknown %s\n"
.LC3:
	.string	"Opened by %s\n"
.LC4:
	.string	"Closed by %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	$3152, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -7220(%rbp)
	leaq	-7236(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -7228(%rbp)
	jmp	.L2
.L3:
	leaq	-7216(%rbp), %rcx
	movl	-7228(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -7228(%rbp)
.L2:
	movl	-7236(%rbp), %eax
	cmpl	%eax, -7228(%rbp)
	jle	.L3
	leaq	-7232(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -7224(%rbp)
	jmp	.L4
.L5:
	leaq	-3616(%rbp), %rcx
	movl	-7224(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -7224(%rbp)
.L4:
	movl	-7232(%rbp), %eax
	cmpl	%eax, -7224(%rbp)
	jle	.L5
	movl	$1, -7228(%rbp)
	jmp	.L6
.L14:
	movl	$1, -7224(%rbp)
	jmp	.L7
.L10:
	leaq	-3616(%rbp), %rcx
	movl	-7228(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rcx,%rax), %rdx
	leaq	-7216(%rbp), %rsi
	movl	-7224(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L8
	addl	$1, -7220(%rbp)
	jmp	.L9
.L8:
	addl	$1, -7224(%rbp)
.L7:
	movl	-7236(%rbp), %eax
	cmpl	%eax, -7224(%rbp)
	jle	.L10
.L9:
	leaq	-3616(%rbp), %rcx
	movl	-7228(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rcx,%rax), %rdx
	leaq	-7216(%rbp), %rsi
	movl	-7224(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L11
	leaq	-3616(%rbp), %rcx
	movl	-7228(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %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
	jmp	.L12
.L11:
	movl	-7220(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L13
	cmpl	$0, -7220(%rbp)
	je	.L13
	leaq	-7216(%rbp), %rcx
	movl	-7224(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %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
.L13:
	movl	-7220(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L12
	cmpl	$0, -7220(%rbp)
	je	.L12
	leaq	-7216(%rbp), %rcx
	movl	-7224(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %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
.L12:
	addl	$1, -7228(%rbp)
.L6:
	movl	-7232(%rbp), %eax
	cmpl	%eax, -7228(%rbp)
	jle	.L14
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	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.
val
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"Unknown %s\n"
.LC3:
	.string	"Opened by %s\n"
.LC4:
	.string	"Closed by %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	$3152, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -7220(%rbp)
	leaq	-7236(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -7228(%rbp)
	jmp	.L2
.L3:
	leaq	-7216(%rbp), %rcx
	movl	-7228(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -7228(%rbp)
.L2:
	movl	-7236(%rbp), %eax
	cmpl	%eax, -7228(%rbp)
	jle	.L3
	leaq	-7232(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -7224(%rbp)
	jmp	.L4
.L5:
	leaq	-3616(%rbp), %rcx
	movl	-7224(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -7224(%rbp)
.L4:
	movl	-7232(%rbp), %eax
	cmpl	%eax, -7224(%rbp)
	jle	.L5
	movl	$1, -7228(%rbp)
	jmp	.L6
.L14:
	movl	$1, -7224(%rbp)
	jmp	.L7
.L10:
	leaq	-3616(%rbp), %rcx
	movl	-7228(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rcx,%rax), %rdx
	leaq	-7216(%rbp), %rsi
	movl	-7224(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L8
	addl	$1, -7220(%rbp)
	jmp	.L9
.L8:
	addl	$1, -7224(%rbp)
.L7:
	movl	-7236(%rbp), %eax
	cmpl	%eax, -7224(%rbp)
	jle	.L10
.L9:
	leaq	-3616(%rbp), %rcx
	movl	-7228(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rcx,%rax), %rdx
	leaq	-7216(%rbp), %rsi
	movl	-7224(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L11
	leaq	-3616(%rbp), %rcx
	movl	-7228(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %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
	jmp	.L12
.L11:
	movl	-7220(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L13
	cmpl	$0, -7220(%rbp)
	je	.L13
	leaq	-7216(%rbp), %rcx
	movl	-7224(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %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
.L13:
	movl	-7220(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L12
	cmpl	$0, -7220(%rbp)
	je	.L12
	leaq	-7216(%rbp), %rcx
	movl	-7224(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %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
.L12:
	addl	$1, -7228(%rbp)
.L6:
	movl	-7232(%rbp), %eax
	cmpl	%eax, -7228(%rbp)
	jle	.L14
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	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:
