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

```c
#define L long long
m[31][50];main(n,p,d,x){L a[50],b;for(;scanf("%d",&n),n;){memset(m,0,6200);for(p=0;p<n;a[p]=1LL<<p,p++)for(scanf("%d",&x);x;x--)scanf("%d",&d),m[d][p]=1;for(d=1;d<31;d++){for(b=p=0;p<n;p++)if(m[d][p])b|=a[p];for(p=0;p<n;p++)if(m[d][p]&&(a[p]=b)==((L)1<<n)-1){printf("%d\n",d);goto s;}}puts("-1");s:;}exit(0);}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"-1"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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
	leaq	m(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$472, %rsp
	.cfi_def_cfa_offset 528
	movl	%edi, 44(%rsp)
	movl	%edx, 40(%rsp)
	movl	%ecx, 36(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 456(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rax
	movq	%rax, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	24(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	44(%rsp), %r8d
	testl	%r8d, %r8d
	je	.L31
	movl	$775, %ecx
	movl	$0, %eax
	movq	%r12, %rdi
	rep stosq
	jle	.L3
	leaq	36(%rsp), %rax
	xorl	%r14d, %r14d
	leaq	40(%rsp), %r13
	movq	%rax, 8(%rsp)
	leaq	48(%rsp), %rax
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L5:
	movq	8(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	movslq	%r14d, %rbp
	movq	%rbp, %r15
	call	scanf@PLT
	movl	36(%rsp), %eax
	testl	%eax, %eax
	je	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	movslq	40(%rsp), %rax
	subl	$1, 36(%rsp)
	leaq	(%rax,%rax,4), %rax
	leaq	(%rax,%rax,4), %rax
	leaq	0(%rbp,%rax,2), %rax
	movl	$1, (%r12,%rax,4)
	jne	.L4
.L6:
	movq	16(%rsp), %rdx
	movl	$1, %eax
	movl	%r15d, %ecx
	movl	44(%rsp), %r8d
	salq	%cl, %rax
	movq	%rax, (%rdx,%r14,8)
	addq	$1, %r14
	cmpl	%r14d, %r8d
	jg	.L5
.L3:
	movl	$1, %r9d
	movl	%r8d, %ecx
	xorl	%r11d, %r11d
	movslq	%r8d, %rsi
	movl	$1, 40(%rsp)
	salq	%cl, %r9
	leaq	48(%rsp), %rdi
	leaq	200+m(%rip), %rdx
	subq	$1, %r9
	movl	$1, %r10d
.L7:
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	testl	%r8d, %r8d
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L9:
	movl	(%rdx,%rax,4), %r13d
	testl	%r13d, %r13d
	je	.L8
	orq	(%rdi,%rax,8), %rcx
.L8:
	addq	$1, %rax
	cmpq	%rax, %rsi
	jne	.L9
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L13:
	movl	(%rdx,%rax,4), %ebp
	testl	%ebp, %ebp
	je	.L10
	movq	%rcx, (%rdi,%rax,8)
	cmpq	%rcx, %r9
	je	.L32
.L10:
	addq	$1, %rax
	cmpq	%rax, %rsi
	jne	.L13
.L16:
	addl	$1, %r10d
	addq	$200, %rdx
	movl	$1, %r11d
	cmpl	$31, %r10d
	je	.L14
	movl	%r10d, 32(%rsp)
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L32:
	testb	%r11b, %r11b
	je	.L11
	movl	32(%rsp), %eax
	movl	%eax, 40(%rsp)
.L11:
	movl	%r10d, %esi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L2
.L14:
	leaq	.LC2(%rip), %rdi
	movl	$31, 40(%rsp)
	call	puts@PLT
	jmp	.L2
.L31:
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	m
	.bss
	.align 32
	.type	m, @object
	.size	m, 6200
m:
	.zero	6200
	.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	"%d\n"
.LC2:
	.string	"-1"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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
	leaq	m(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$472, %rsp
	.cfi_def_cfa_offset 528
	movl	%edi, 44(%rsp)
	movl	%edx, 40(%rsp)
	movl	%ecx, 36(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 456(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rax
	movq	%rax, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	24(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	44(%rsp), %r8d
	testl	%r8d, %r8d
	je	.L31
	movl	$775, %ecx
	movl	$0, %eax
	movq	%r12, %rdi
	rep stosq
	jle	.L3
	leaq	36(%rsp), %rax
	xorl	%r14d, %r14d
	leaq	40(%rsp), %r13
	movq	%rax, 8(%rsp)
	leaq	48(%rsp), %rax
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L5:
	movq	8(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	movslq	%r14d, %rbp
	movq	%rbp, %r15
	call	scanf@PLT
	movl	36(%rsp), %eax
	testl	%eax, %eax
	je	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	movslq	40(%rsp), %rax
	subl	$1, 36(%rsp)
	leaq	(%rax,%rax,4), %rax
	leaq	(%rax,%rax,4), %rax
	leaq	0(%rbp,%rax,2), %rax
	movl	$1, (%r12,%rax,4)
	jne	.L4
.L6:
	movq	16(%rsp), %rdx
	movl	$1, %eax
	movl	%r15d, %ecx
	movl	44(%rsp), %r8d
	salq	%cl, %rax
	movq	%rax, (%rdx,%r14,8)
	addq	$1, %r14
	cmpl	%r14d, %r8d
	jg	.L5
.L3:
	movl	$1, %r9d
	movl	%r8d, %ecx
	xorl	%r11d, %r11d
	movslq	%r8d, %rsi
	movl	$1, 40(%rsp)
	salq	%cl, %r9
	leaq	48(%rsp), %rdi
	leaq	200+m(%rip), %rdx
	subq	$1, %r9
	movl	$1, %r10d
.L7:
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	testl	%r8d, %r8d
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L9:
	movl	(%rdx,%rax,4), %r13d
	testl	%r13d, %r13d
	je	.L8
	orq	(%rdi,%rax,8), %rcx
.L8:
	addq	$1, %rax
	cmpq	%rax, %rsi
	jne	.L9
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L13:
	movl	(%rdx,%rax,4), %ebp
	testl	%ebp, %ebp
	je	.L10
	movq	%rcx, (%rdi,%rax,8)
	cmpq	%rcx, %r9
	je	.L32
.L10:
	addq	$1, %rax
	cmpq	%rax, %rsi
	jne	.L13
.L16:
	addl	$1, %r10d
	addq	$200, %rdx
	movl	$1, %r11d
	cmpl	$31, %r10d
	je	.L14
	movl	%r10d, 32(%rsp)
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L32:
	testb	%r11b, %r11b
	je	.L11
	movl	32(%rsp), %eax
	movl	%eax, 40(%rsp)
.L11:
	movl	%r10d, %esi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L2
.L14:
	leaq	.LC2(%rip), %rdi
	movl	$31, 40(%rsp)
	call	puts@PLT
	jmp	.L2
.L31:
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	m
	.bss
	.align 32
	.type	m, @object
	.size	m, 6200
m:
	.zero	6200
	.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	"%d\n"
.LC2:
	.string	"-1"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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
	leaq	m(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$472, %rsp
	.cfi_def_cfa_offset 528
	movl	%edi, 44(%rsp)
	movl	%edx, 40(%rsp)
	movl	%ecx, 36(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 456(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rax
	movq	%rax, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	24(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	44(%rsp), %r8d
	testl	%r8d, %r8d
	je	.L31
	movl	$775, %ecx
	movl	$0, %eax
	movq	%r12, %rdi
	rep stosq
	jle	.L3
	leaq	36(%rsp), %rax
	xorl	%r14d, %r14d
	leaq	40(%rsp), %r13
	movq	%rax, 8(%rsp)
	leaq	48(%rsp), %rax
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L5:
	movq	8(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	movslq	%r14d, %rbp
	movq	%rbp, %r15
	call	scanf@PLT
	movl	36(%rsp), %eax
	testl	%eax, %eax
	je	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	movslq	40(%rsp), %rax
	subl	$1, 36(%rsp)
	leaq	(%rax,%rax,4), %rax
	leaq	(%rax,%rax,4), %rax
	leaq	0(%rbp,%rax,2), %rax
	movl	$1, (%r12,%rax,4)
	jne	.L4
.L6:
	movq	16(%rsp), %rdx
	movl	$1, %eax
	movl	%r15d, %ecx
	movl	44(%rsp), %r8d
	salq	%cl, %rax
	movq	%rax, (%rdx,%r14,8)
	addq	$1, %r14
	cmpl	%r14d, %r8d
	jg	.L5
.L3:
	movl	$1, %r9d
	movl	%r8d, %ecx
	xorl	%r11d, %r11d
	movslq	%r8d, %rsi
	movl	$1, 40(%rsp)
	salq	%cl, %r9
	leaq	48(%rsp), %rdi
	leaq	200+m(%rip), %rdx
	subq	$1, %r9
	movl	$1, %r10d
.L7:
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	testl	%r8d, %r8d
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L9:
	movl	(%rdx,%rax,4), %r13d
	testl	%r13d, %r13d
	je	.L8
	orq	(%rdi,%rax,8), %rcx
.L8:
	addq	$1, %rax
	cmpq	%rax, %rsi
	jne	.L9
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L13:
	movl	(%rdx,%rax,4), %ebp
	testl	%ebp, %ebp
	je	.L10
	movq	%rcx, (%rdi,%rax,8)
	cmpq	%rcx, %r9
	je	.L32
.L10:
	addq	$1, %rax
	cmpq	%rax, %rsi
	jne	.L13
.L16:
	addl	$1, %r10d
	addq	$200, %rdx
	movl	$1, %r11d
	cmpl	$31, %r10d
	je	.L14
	movl	%r10d, 32(%rsp)
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L32:
	testb	%r11b, %r11b
	je	.L11
	movl	32(%rsp), %eax
	movl	%eax, 40(%rsp)
.L11:
	movl	%r10d, %esi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L2
.L14:
	leaq	.LC2(%rip), %rdi
	movl	$31, 40(%rsp)
	call	puts@PLT
	jmp	.L2
.L31:
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	m
	.bss
	.align 32
	.type	m, @object
	.size	m, 6200
m:
	.zero	6200
	.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
#define L long long
m[31][50];main(n,p,d,x){L a[50],b;for(;scanf("%d",&n),n;){memset(m,0,6200);for(p=0;p<n;a[p]=1LL<<p,p++)for(scanf("%d",&x);x;x--)scanf("%d",&d),m[d][p]=1;for(d=1;d<31;d++){for(b=p=0;p<n;p++)if(m[d][p])b|=a[p];for(p=0;p<n;p++)if(m[d][p]&&(a[p]=b)==((L)1<<n)-1){printf("%d\n",d);goto s;}}puts("-1");s:;}exit(0);}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#define L long long
m[31][50];main(n,p,d,x){L a[50],b;for(;scanf("%d",&n),n;){memset(m,0,6200);for(p=0;p<n;a[p]=1LL<<p,p++)for(scanf("%d",&x);x;x--)scanf("%d",&d),m[d][p]=1;for(d=1;d<31;d++){for(b=p=0;p<n;p++)if(m[d][p])b|=a[p];for(p=0;p<n;p++)if(m[d][p]&&(a[p]=b)==((L)1<<n)-1){printf("%d\n",d);goto s;}}puts("-1");s:;}exit(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
1 1
2 2 3
2 1 2
3 4 4 5
0
 4
1 1
2 2 3
2 1 2
3 3 4 10
0
 4
1 1
2 2 5
2 0 2
3 1 4 5
0
 4
1 1
2 2 3
2 1 2
3 1 4 5
0
 4
1 1
2 1 3
2 0 1
3 1 4 5
0
 4
1 1
2 2 3
2 0 4
3 1 4 2
0
 4
1 1
2 2 3
2 1 2
3 4 4 0
0
 4
1 1
2 2 3
2 2 2
3 3 4 5
0
 4
1 1
1 2 3
2 1 2
3 4 4 0
0
 4
1 1
1 3 3
2 1 2
3 4 4 0
0

-1
 3
 5
 2
 1
 4
 -1
 -1
 -1
 -1

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

```c
#define L long long
m[31][50];main(n,p,d,x){L a[50],b;for(;scanf("%d",&n),n;){memset(m,0,6200);for(p=0;p<n;a[p]=1LL<<p,p++)for(scanf("%d",&x);x;x--)scanf("%d",&d),m[d][p]=1;for(d=1;d<31;d++){for(b=p=0;p<n;p++)if(m[d][p])b|=a[p];for(p=0;p<n;p++)if(m[d][p]&&(a[p]=b)==((L)1<<n)-1){printf("%d\n",d);goto s;}}puts("-1");s:;}exit(0);}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"-1"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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
	leaq	m(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$472, %rsp
	.cfi_def_cfa_offset 528
	movl	%edi, 44(%rsp)
	movl	%edx, 40(%rsp)
	movl	%ecx, 36(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 456(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rax
	movq	%rax, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	24(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	44(%rsp), %r8d
	testl	%r8d, %r8d
	je	.L31
	movl	$775, %ecx
	movl	$0, %eax
	movq	%r12, %rdi
	rep stosq
	jle	.L3
	leaq	36(%rsp), %rax
	xorl	%r14d, %r14d
	leaq	40(%rsp), %r13
	movq	%rax, 8(%rsp)
	leaq	48(%rsp), %rax
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L5:
	movq	8(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	movslq	%r14d, %rbp
	movq	%rbp, %r15
	call	scanf@PLT
	movl	36(%rsp), %eax
	testl	%eax, %eax
	je	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	movslq	40(%rsp), %rax
	subl	$1, 36(%rsp)
	leaq	(%rax,%rax,4), %rax
	leaq	(%rax,%rax,4), %rax
	leaq	0(%rbp,%rax,2), %rax
	movl	$1, (%r12,%rax,4)
	jne	.L4
.L6:
	movq	16(%rsp), %rdx
	movl	$1, %eax
	movl	%r15d, %ecx
	movl	44(%rsp), %r8d
	salq	%cl, %rax
	movq	%rax, (%rdx,%r14,8)
	addq	$1, %r14
	cmpl	%r14d, %r8d
	jg	.L5
.L3:
	movl	$1, %r9d
	movl	%r8d, %ecx
	xorl	%r11d, %r11d
	movslq	%r8d, %rsi
	movl	$1, 40(%rsp)
	salq	%cl, %r9
	leaq	48(%rsp), %rdi
	leaq	200+m(%rip), %rdx
	subq	$1, %r9
	movl	$1, %r10d
.L7:
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	testl	%r8d, %r8d
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L9:
	movl	(%rdx,%rax,4), %r13d
	testl	%r13d, %r13d
	je	.L8
	orq	(%rdi,%rax,8), %rcx
.L8:
	addq	$1, %rax
	cmpq	%rax, %rsi
	jne	.L9
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L13:
	movl	(%rdx,%rax,4), %ebp
	testl	%ebp, %ebp
	je	.L10
	movq	%rcx, (%rdi,%rax,8)
	cmpq	%rcx, %r9
	je	.L32
.L10:
	addq	$1, %rax
	cmpq	%rax, %rsi
	jne	.L13
.L16:
	addl	$1, %r10d
	addq	$200, %rdx
	movl	$1, %r11d
	cmpl	$31, %r10d
	je	.L14
	movl	%r10d, 32(%rsp)
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L32:
	testb	%r11b, %r11b
	je	.L11
	movl	32(%rsp), %eax
	movl	%eax, 40(%rsp)
.L11:
	movl	%r10d, %esi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L2
.L14:
	leaq	.LC2(%rip), %rdi
	movl	$31, 40(%rsp)
	call	puts@PLT
	jmp	.L2
.L31:
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	m
	.bss
	.align 32
	.type	m, @object
	.size	m, 6200
m:
	.zero	6200
	.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	"%d\n"
.LC2:
	.string	"-1"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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
	leaq	m(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$472, %rsp
	.cfi_def_cfa_offset 528
	movl	%edi, 44(%rsp)
	movl	%edx, 40(%rsp)
	movl	%ecx, 36(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 456(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rax
	movq	%rax, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	24(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	44(%rsp), %r8d
	testl	%r8d, %r8d
	je	.L31
	movl	$775, %ecx
	movl	$0, %eax
	movq	%r12, %rdi
	rep stosq
	jle	.L3
	leaq	36(%rsp), %rax
	xorl	%r14d, %r14d
	leaq	40(%rsp), %r13
	movq	%rax, 8(%rsp)
	leaq	48(%rsp), %rax
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L5:
	movq	8(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	movslq	%r14d, %rbp
	movq	%rbp, %r15
	call	scanf@PLT
	movl	36(%rsp), %eax
	testl	%eax, %eax
	je	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	movslq	40(%rsp), %rax
	subl	$1, 36(%rsp)
	leaq	(%rax,%rax,4), %rax
	leaq	(%rax,%rax,4), %rax
	leaq	0(%rbp,%rax,2), %rax
	movl	$1, (%r12,%rax,4)
	jne	.L4
.L6:
	movq	16(%rsp), %rdx
	movl	$1, %eax
	movl	%r15d, %ecx
	movl	44(%rsp), %r8d
	salq	%cl, %rax
	movq	%rax, (%rdx,%r14,8)
	addq	$1, %r14
	cmpl	%r14d, %r8d
	jg	.L5
.L3:
	movl	$1, %r9d
	movl	%r8d, %ecx
	xorl	%r11d, %r11d
	movslq	%r8d, %rsi
	movl	$1, 40(%rsp)
	salq	%cl, %r9
	leaq	48(%rsp), %rdi
	leaq	200+m(%rip), %rdx
	subq	$1, %r9
	movl	$1, %r10d
.L7:
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	testl	%r8d, %r8d
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L9:
	movl	(%rdx,%rax,4), %r13d
	testl	%r13d, %r13d
	je	.L8
	orq	(%rdi,%rax,8), %rcx
.L8:
	addq	$1, %rax
	cmpq	%rax, %rsi
	jne	.L9
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L13:
	movl	(%rdx,%rax,4), %ebp
	testl	%ebp, %ebp
	je	.L10
	movq	%rcx, (%rdi,%rax,8)
	cmpq	%rcx, %r9
	je	.L32
.L10:
	addq	$1, %rax
	cmpq	%rax, %rsi
	jne	.L13
.L16:
	addl	$1, %r10d
	addq	$200, %rdx
	movl	$1, %r11d
	cmpl	$31, %r10d
	je	.L14
	movl	%r10d, 32(%rsp)
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L32:
	testb	%r11b, %r11b
	je	.L11
	movl	32(%rsp), %eax
	movl	%eax, 40(%rsp)
.L11:
	movl	%r10d, %esi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L2
.L14:
	leaq	.LC2(%rip), %rdi
	movl	$31, 40(%rsp)
	call	puts@PLT
	jmp	.L2
.L31:
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	m
	.bss
	.align 32
	.type	m, @object
	.size	m, 6200
m:
	.zero	6200
	.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:
```