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>

char ok[256][11];
int n, m;

int main(void)
{
    int i, j, now = 0, fl;
    char input[11];
    scanf("%d",&n);
    for (i = 0; i < n; i++) {
        scanf("%s",ok[i]);
    }
    scanf("%d",&m);
    for (i = 0; i < m; i++) {
        scanf("%s",input);
        fl = 0;
        for (j = 0; j < n; j++) {
            if (strcmp(input, ok[j]) == 0) {
                fl = 1;
                break;
            }
        }
        if (fl) {
            if (now) {
                printf("Closed by %s\n",input);
                now = 0;
            } else {
                printf("Opened by %s\n",input);
                now = 1;
            }
        } else {
            printf("Unknown %s\n",input);
        }
    }
    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
	leaq	n(%rip), %rsi
	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
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %edx
	testl	%edx, %edx
	jle	.L2
	leaq	ok(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$11, %rbp
	cmpl	%ebx, n(%rip)
	jg	.L3
.L2:
	leaq	m(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	m(%rip), %eax
	testl	%eax, %eax
	jle	.L4
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	leaq	13(%rsp), %rbp
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L5
	subl	$1, %eax
	leaq	ok(%rip), %r15
	leaq	(%rax,%rax,4), %rcx
	leaq	(%rax,%rcx,2), %rbx
	leaq	11(%r15), %rax
	addq	%rax, %rbx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L20:
	addq	$11, %r15
	cmpq	%r15, %rbx
	je	.L5
.L7:
	movq	%r15, %rsi
	movq	%rbp, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L20
	testl	%r14d, %r14d
	je	.L21
	movq	%rbp, %rdx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	xorl	%r14d, %r14d
	movl	$1, %edi
	call	__printf_chk@PLT
.L8:
	addl	$1, %r12d
	cmpl	%r12d, m(%rip)
	jg	.L9
.L4:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$40, %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
.L21:
	.cfi_restore_state
	movq	%rbp, %rdx
	movl	$1, %edi
	xorl	%eax, %eax
	movl	$1, %r14d
	leaq	.LC3(%rip), %rsi
	call	__printf_chk@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rdx
	leaq	.LC4(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L8
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	m
	.bss
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	ok
	.align 32
	.type	ok, @object
	.size	ok, 2816
ok:
	.zero	2816
	.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
	leaq	n(%rip), %rsi
	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
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %edx
	testl	%edx, %edx
	jle	.L2
	leaq	ok(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$11, %rbp
	cmpl	%ebx, n(%rip)
	jg	.L3
.L2:
	leaq	m(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	m(%rip), %eax
	testl	%eax, %eax
	jle	.L4
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	leaq	13(%rsp), %rbp
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L5
	subl	$1, %eax
	leaq	ok(%rip), %r15
	leaq	(%rax,%rax,4), %rcx
	leaq	(%rax,%rcx,2), %rbx
	leaq	11(%r15), %rax
	addq	%rax, %rbx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L20:
	addq	$11, %r15
	cmpq	%r15, %rbx
	je	.L5
.L7:
	movq	%r15, %rsi
	movq	%rbp, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L20
	testl	%r14d, %r14d
	je	.L21
	movq	%rbp, %rdx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	xorl	%r14d, %r14d
	movl	$1, %edi
	call	__printf_chk@PLT
.L8:
	addl	$1, %r12d
	cmpl	%r12d, m(%rip)
	jg	.L9
.L4:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$40, %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
.L21:
	.cfi_restore_state
	movq	%rbp, %rdx
	movl	$1, %edi
	xorl	%eax, %eax
	movl	$1, %r14d
	leaq	.LC3(%rip), %rsi
	call	__printf_chk@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rdx
	leaq	.LC4(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L8
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	m
	.bss
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	ok
	.align 32
	.type	ok, @object
	.size	ok, 2816
ok:
	.zero	2816
	.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
	leaq	n(%rip), %rsi
	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
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %edx
	testl	%edx, %edx
	jle	.L2
	leaq	ok(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$11, %rbp
	cmpl	%ebx, n(%rip)
	jg	.L3
.L2:
	leaq	m(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	m(%rip), %eax
	testl	%eax, %eax
	jle	.L4
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	leaq	13(%rsp), %rbp
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L5
	subl	$1, %eax
	leaq	ok(%rip), %r15
	leaq	(%rax,%rax,4), %rcx
	leaq	(%rax,%rcx,2), %rbx
	leaq	11(%r15), %rax
	addq	%rax, %rbx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L20:
	addq	$11, %r15
	cmpq	%r15, %rbx
	je	.L5
.L7:
	movq	%r15, %rsi
	movq	%rbp, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L20
	testl	%r14d, %r14d
	je	.L21
	movq	%rbp, %rdx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	xorl	%r14d, %r14d
	movl	$1, %edi
	call	__printf_chk@PLT
.L8:
	addl	$1, %r12d
	cmpl	%r12d, m(%rip)
	jg	.L9
.L4:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$40, %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
.L21:
	.cfi_restore_state
	movq	%rbp, %rdx
	movl	$1, %edi
	xorl	%eax, %eax
	movl	$1, %r14d
	leaq	.LC3(%rip), %rsi
	call	__printf_chk@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rdx
	leaq	.LC4(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L8
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	m
	.bss
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	ok
	.align 32
	.type	ok, @object
	.size	ok, 2816
ok:
	.zero	2816
	.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>

char ok[256][11];
int n, m;

int main(void)
{
    int i, j, now = 0, fl;
    char input[11];
    scanf("%d",&n);
    for (i = 0; i < n; i++) {
        scanf("%s",ok[i]);
    }
    scanf("%d",&m);
    for (i = 0; i < m; i++) {
        scanf("%s",input);
        fl = 0;
        for (j = 0; j < n; j++) {
            if (strcmp(input, ok[j]) == 0) {
                fl = 1;
                break;
            }
        }
        if (fl) {
            if (now) {
                printf("Closed by %s\n",input);
                now = 0;
            } else {
                printf("Opened by %s\n",input);
                now = 1;
            }
        } else {
            printf("Unknown %s\n",input);
        }
    }
    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>

char ok[256][11];
int n, m;

int main(void)
{
    int i, j, now = 0, fl;
    char input[11];
    scanf("%d",&n);
    for (i = 0; i < n; i++) {
        scanf("%s",ok[i]);
    }
    scanf("%d",&m);
    for (i = 0; i < m; i++) {
        scanf("%s",input);
        fl = 0;
        for (j = 0; j < n; j++) {
            if (strcmp(input, ok[j]) == 0) {
                fl = 1;
                break;
            }
        }
        if (fl) {
            if (now) {
                printf("Closed by %s\n",input);
                now = 0;
            } else {
                printf("Opened by %s\n",input);
                now = 1;
            }
        } else {
            printf("Unknown %s\n",input);
        }
    }
    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>

char ok[256][11];
int n, m;

int main(void)
{
    int i, j, now = 0, fl;
    char input[11];
    scanf("%d",&n);
    for (i = 0; i < n; i++) {
        scanf("%s",ok[i]);
    }
    scanf("%d",&m);
    for (i = 0; i < m; i++) {
        scanf("%s",input);
        fl = 0;
        for (j = 0; j < n; j++) {
            if (strcmp(input, ok[j]) == 0) {
                fl = 1;
                break;
            }
        }
        if (fl) {
            if (now) {
                printf("Closed by %s\n",input);
                now = 0;
            } else {
                printf("Opened by %s\n",input);
                now = 1;
            }
        } else {
            printf("Unknown %s\n",input);
        }
    }
    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
	leaq	n(%rip), %rsi
	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
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %edx
	testl	%edx, %edx
	jle	.L2
	leaq	ok(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$11, %rbp
	cmpl	%ebx, n(%rip)
	jg	.L3
.L2:
	leaq	m(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	m(%rip), %eax
	testl	%eax, %eax
	jle	.L4
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	leaq	13(%rsp), %rbp
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L5
	subl	$1, %eax
	leaq	ok(%rip), %r15
	leaq	(%rax,%rax,4), %rcx
	leaq	(%rax,%rcx,2), %rbx
	leaq	11(%r15), %rax
	addq	%rax, %rbx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L20:
	addq	$11, %r15
	cmpq	%r15, %rbx
	je	.L5
.L7:
	movq	%r15, %rsi
	movq	%rbp, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L20
	testl	%r14d, %r14d
	je	.L21
	movq	%rbp, %rdx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	xorl	%r14d, %r14d
	movl	$1, %edi
	call	__printf_chk@PLT
.L8:
	addl	$1, %r12d
	cmpl	%r12d, m(%rip)
	jg	.L9
.L4:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$40, %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
.L21:
	.cfi_restore_state
	movq	%rbp, %rdx
	movl	$1, %edi
	xorl	%eax, %eax
	movl	$1, %r14d
	leaq	.LC3(%rip), %rsi
	call	__printf_chk@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rdx
	leaq	.LC4(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L8
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	m
	.bss
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	ok
	.align 32
	.type	ok, @object
	.size	ok, 2816
ok:
	.zero	2816
	.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
	leaq	n(%rip), %rsi
	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
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %edx
	testl	%edx, %edx
	jle	.L2
	leaq	ok(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$11, %rbp
	cmpl	%ebx, n(%rip)
	jg	.L3
.L2:
	leaq	m(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	m(%rip), %eax
	testl	%eax, %eax
	jle	.L4
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	leaq	13(%rsp), %rbp
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L5
	subl	$1, %eax
	leaq	ok(%rip), %r15
	leaq	(%rax,%rax,4), %rcx
	leaq	(%rax,%rcx,2), %rbx
	leaq	11(%r15), %rax
	addq	%rax, %rbx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L20:
	addq	$11, %r15
	cmpq	%r15, %rbx
	je	.L5
.L7:
	movq	%r15, %rsi
	movq	%rbp, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L20
	testl	%r14d, %r14d
	je	.L21
	movq	%rbp, %rdx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	xorl	%r14d, %r14d
	movl	$1, %edi
	call	__printf_chk@PLT
.L8:
	addl	$1, %r12d
	cmpl	%r12d, m(%rip)
	jg	.L9
.L4:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$40, %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
.L21:
	.cfi_restore_state
	movq	%rbp, %rdx
	movl	$1, %edi
	xorl	%eax, %eax
	movl	$1, %r14d
	leaq	.LC3(%rip), %rsi
	call	__printf_chk@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rdx
	leaq	.LC4(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L8
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	m
	.bss
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	ok
	.align 32
	.type	ok, @object
	.size	ok, 2816
ok:
	.zero	2816
	.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:
```