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

```c
// AOJ 2149: Luck Manipulator
// 2017.11.9 bal4u@uu

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

int y[102];

int main()
{
	int n, a, b, c, x, i, j, ans;
	
	while (scanf("%d%d%d%d%d", &n, &a, &b, &c, &x) && n > 0) {
		for (i = 0; i < n; i++) scanf("%d", y+i);
		ans = -1, j = 0;
		i = 10001; while (i--) {
			if (y[j] == x) if (++j == n) { ans = 10000-i; break; }
			x = (a*x+b) % c;
		}
		printf("%d\n", ans);
	}
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d%d%d%d"
	.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	y(%rip), %r15
	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
	leaq	.LC0(%rip), %rbx
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rax
	leaq	52(%rsp), %r14
	movq	%rax, 24(%rsp)
	leaq	40(%rsp), %rax
	leaq	48(%rsp), %r13
	movq	%rax, 16(%rsp)
	leaq	36(%rsp), %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	24(%rsp), %rcx
	movq	16(%rsp), %rdx
	xorl	%eax, %eax
	movq	%r14, %r9
	movq	8(%rsp), %rsi
	movq	%r13, %r8
	leaq	.LC2(%rip), %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L8
	movl	36(%rsp), %eax
	testl	%eax, %eax
	jle	.L8
	leaq	y(%rip), %r12
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %r10d
	addq	$4, %r12
	cmpl	%ebp, %r10d
	jg	.L3
	movl	52(%rsp), %edx
	movl	40(%rsp), %r9d
	xorl	%r11d, %r11d
	xorl	%ecx, %ecx
	movl	44(%rsp), %edi
	movl	48(%rsp), %esi
	movl	$10000, %r8d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	imull	%r9d, %edx
	subl	$1, %r8d
	movl	$1, %r11d
	leal	(%rdx,%rdi), %eax
	cltd
	idivl	%esi
	cmpl	$-1, %r8d
	je	.L21
.L7:
	movslq	%ecx, %rax
	cmpl	%edx, (%r15,%rax,4)
	jne	.L4
	addl	$1, %ecx
	cmpl	%ecx, %r10d
	jne	.L4
	testb	%r11b, %r11b
	je	.L5
	movl	%edx, 52(%rsp)
.L5:
	movl	$10000, %eax
	subl	%r8d, %eax
	movl	%eax, %r8d
.L6:
	movl	%r8d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L21:
	movl	%edx, 52(%rsp)
	jmp	.L6
.L8:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$72, %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
.L22:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	y
	.bss
	.align 32
	.type	y, @object
	.size	y, 408
y:
	.zero	408
	.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	"%d%d%d%d%d"
	.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	y(%rip), %r15
	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
	leaq	.LC0(%rip), %rbx
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rax
	leaq	52(%rsp), %r14
	movq	%rax, 24(%rsp)
	leaq	40(%rsp), %rax
	leaq	48(%rsp), %r13
	movq	%rax, 16(%rsp)
	leaq	36(%rsp), %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	24(%rsp), %rcx
	movq	16(%rsp), %rdx
	xorl	%eax, %eax
	movq	%r14, %r9
	movq	8(%rsp), %rsi
	movq	%r13, %r8
	leaq	.LC2(%rip), %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L8
	movl	36(%rsp), %eax
	testl	%eax, %eax
	jle	.L8
	leaq	y(%rip), %r12
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %r10d
	addq	$4, %r12
	cmpl	%ebp, %r10d
	jg	.L3
	movl	52(%rsp), %edx
	movl	40(%rsp), %r9d
	xorl	%r11d, %r11d
	xorl	%ecx, %ecx
	movl	44(%rsp), %edi
	movl	48(%rsp), %esi
	movl	$10000, %r8d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	imull	%r9d, %edx
	subl	$1, %r8d
	movl	$1, %r11d
	leal	(%rdx,%rdi), %eax
	cltd
	idivl	%esi
	cmpl	$-1, %r8d
	je	.L21
.L7:
	movslq	%ecx, %rax
	cmpl	%edx, (%r15,%rax,4)
	jne	.L4
	addl	$1, %ecx
	cmpl	%ecx, %r10d
	jne	.L4
	testb	%r11b, %r11b
	je	.L5
	movl	%edx, 52(%rsp)
.L5:
	movl	$10000, %eax
	subl	%r8d, %eax
	movl	%eax, %r8d
.L6:
	movl	%r8d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L21:
	movl	%edx, 52(%rsp)
	jmp	.L6
.L8:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$72, %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
.L22:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	y
	.bss
	.align 32
	.type	y, @object
	.size	y, 408
y:
	.zero	408
	.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	"%d%d%d%d%d"
	.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	y(%rip), %r15
	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
	leaq	.LC0(%rip), %rbx
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rax
	leaq	52(%rsp), %r14
	movq	%rax, 24(%rsp)
	leaq	40(%rsp), %rax
	leaq	48(%rsp), %r13
	movq	%rax, 16(%rsp)
	leaq	36(%rsp), %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	24(%rsp), %rcx
	movq	16(%rsp), %rdx
	xorl	%eax, %eax
	movq	%r14, %r9
	movq	8(%rsp), %rsi
	movq	%r13, %r8
	leaq	.LC2(%rip), %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L8
	movl	36(%rsp), %eax
	testl	%eax, %eax
	jle	.L8
	leaq	y(%rip), %r12
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %r10d
	addq	$4, %r12
	cmpl	%ebp, %r10d
	jg	.L3
	movl	52(%rsp), %edx
	movl	40(%rsp), %r9d
	xorl	%r11d, %r11d
	xorl	%ecx, %ecx
	movl	44(%rsp), %edi
	movl	48(%rsp), %esi
	movl	$10000, %r8d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	imull	%r9d, %edx
	subl	$1, %r8d
	movl	$1, %r11d
	leal	(%rdx,%rdi), %eax
	cltd
	idivl	%esi
	cmpl	$-1, %r8d
	je	.L21
.L7:
	movslq	%ecx, %rax
	cmpl	%edx, (%r15,%rax,4)
	jne	.L4
	addl	$1, %ecx
	cmpl	%ecx, %r10d
	jne	.L4
	testb	%r11b, %r11b
	je	.L5
	movl	%edx, 52(%rsp)
.L5:
	movl	$10000, %eax
	subl	%r8d, %eax
	movl	%eax, %r8d
.L6:
	movl	%r8d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L21:
	movl	%edx, 52(%rsp)
	jmp	.L6
.L8:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$72, %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
.L22:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	y
	.bss
	.align 32
	.type	y, @object
	.size	y, 408
y:
	.zero	408
	.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
// AOJ 2149: Luck Manipulator
// 2017.11.9 bal4u@uu

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

int y[102];

int main()
{
	int n, a, b, c, x, i, j, ans;
	
	while (scanf("%d%d%d%d%d", &n, &a, &b, &c, &x) && n > 0) {
		for (i = 0; i < n; i++) scanf("%d", y+i);
		ans = -1, j = 0;
		i = 10001; while (i--) {
			if (y[j] == x) if (++j == n) { ans = 10000-i; break; }
			x = (a*x+b) % c;
		}
		printf("%d\n", ans);
	}
	return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
// AOJ 2149: Luck Manipulator
// 2017.11.9 bal4u@uu

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

int y[102];

int main()
{
	int n, a, b, c, x, i, j, ans;
	
	while (scanf("%d%d%d%d%d", &n, &a, &b, &c, &x) && n > 0) {
		for (i = 0; i < n; i++) scanf("%d", y+i);
		ans = -1, j = 0;
		i = 10001; while (i--) {
			if (y[j] == x) if (++j == n) { ans = 10000-i; break; }
			x = (a*x+b) % c;
		}
		printf("%d\n", ans);
	}
	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:

1 5 7 11 10
10
2 5 7 11 10
2 4
2 1 1 256 0
128 255
2 0 0 1 0
1234 5678
2 1 1 100 0
99 98
2 1 1 100 0
99 99
2 1 1 10000 0
1 0
2 1 2 10000 0
2 1
0 0 0 0 0
 1 5 7 11 10
10
2 5 5 11 10
2 4
2 1 1 256 0
128 255
2 0 0 1 0
1234 5678
2 1 1 100 0
99 98
2 1 1 100 0
99 99
2 1 1 10000 0
1 0
3 1 2 10000 0
2 1
0 0 0 0 0
 1 5 7 11 10
10
2 5 5 11 10
2 4
2 1 0 256 0
128 255
2 0 0 1 0
1234 5678
2 1 1 100 0
99 98
2 1 1 100 0
99 99
2 1 1 10000 0
1 0
3 1 2 10000 0
2 1
0 0 0 0 0
 1 5 7 11 10
10
2 5 5 11 20
2 4
2 1 0 256 0
128 255
2 0 0 1 0
1751 5678
2 1 1 100 0
99 98
2 1 1 100 0
99 99
2 1 1 10000 0
1 0
3 1 1 10000 0
2 1
0 0 0 0 0
 1 5 7 11 10
10
2 5 7 11 10
2 4
2 1 1 256 0
128 255
2 0 0 1 0
1234 5678
2 1 1 100 0
99 98
2 1 1 100 0
99 99
2 1 2 10000 0
1 0
2 1 1 10000 0
2 1
0 0 0 0 0
 1 5 7 11 10
11
2 5 5 11 10
2 4
2 1 1 256 0
128 255
2 0 0 1 0
1234 5678
2 1 1 100 0
99 98
2 1 1 100 0
99 99
2 1 1 10000 0
1 0
3 1 2 10000 0
2 1
0 0 0 0 0
 1 5 7 11 10
20
2 5 5 11 10
2 4
2 1 0 256 0
128 255
2 0 0 1 0
1264 5678
2 1 1 100 0
99 98
2 1 1 100 0
99 99
2 1 1 10000 0
1 0
3 1 2 10000 0
2 1
0 0 0 0 0
 1 5 7 11 10
10
2 5 5 11 10
2 4
2 1 0 256 0
128 255
2 0 0 1 0
1751 5678
2 1 1 100 0
99 98
2 1 1 100 0
99 99
2 1 0 10000 0
1 0
3 1 1 10000 0
2 1
0 0 0 0 0
 1 5 7 11 10
10
2 5 3 11 10
2 4
2 1 1 256 0
128 255
2 0 0 1 0
1234 5678
2 1 1 100 0
99 98
2 1 1 100 0
99 99
2 1 2 10000 0
1 0
2 1 1 10000 0
2 1
0 0 0 0 0
 1 5 7 5 10
10
2 1 5 11 10
2 4
2 1 0 256 0
128 255
2 0 0 1 0
1234 5678
2 1 1 100 0
99 98
2 1 1 100 0
99 99
2 1 1 10000 0
1 0
3 1 2 10000 0
2 1
0 0 0 0 0

0
3
255
-1
198
199
10000
-1
 0
-1
255
-1
198
199
10000
-1
 0
-1
-1
-1
198
199
10000
-1
 0
3
-1
-1
198
199
10000
-1
 0
3
255
-1
198
199
-1
-1
 -1
-1
255
-1
198
199
10000
-1
 -1
-1
-1
-1
198
199
10000
-1
 0
-1
-1
-1
198
199
-1
-1
 0
-1
255
-1
198
199
-1
-1
 0
12
-1
-1
198
199
10000
-1

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

```c
// AOJ 2149: Luck Manipulator
// 2017.11.9 bal4u@uu

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

int y[102];

int main()
{
	int n, a, b, c, x, i, j, ans;
	
	while (scanf("%d%d%d%d%d", &n, &a, &b, &c, &x) && n > 0) {
		for (i = 0; i < n; i++) scanf("%d", y+i);
		ans = -1, j = 0;
		i = 10001; while (i--) {
			if (y[j] == x) if (++j == n) { ans = 10000-i; break; }
			x = (a*x+b) % c;
		}
		printf("%d\n", ans);
	}
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d%d%d%d"
	.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	y(%rip), %r15
	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
	leaq	.LC0(%rip), %rbx
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rax
	leaq	52(%rsp), %r14
	movq	%rax, 24(%rsp)
	leaq	40(%rsp), %rax
	leaq	48(%rsp), %r13
	movq	%rax, 16(%rsp)
	leaq	36(%rsp), %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	24(%rsp), %rcx
	movq	16(%rsp), %rdx
	xorl	%eax, %eax
	movq	%r14, %r9
	movq	8(%rsp), %rsi
	movq	%r13, %r8
	leaq	.LC2(%rip), %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L8
	movl	36(%rsp), %eax
	testl	%eax, %eax
	jle	.L8
	leaq	y(%rip), %r12
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %r10d
	addq	$4, %r12
	cmpl	%ebp, %r10d
	jg	.L3
	movl	52(%rsp), %edx
	movl	40(%rsp), %r9d
	xorl	%r11d, %r11d
	xorl	%ecx, %ecx
	movl	44(%rsp), %edi
	movl	48(%rsp), %esi
	movl	$10000, %r8d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	imull	%r9d, %edx
	subl	$1, %r8d
	movl	$1, %r11d
	leal	(%rdx,%rdi), %eax
	cltd
	idivl	%esi
	cmpl	$-1, %r8d
	je	.L21
.L7:
	movslq	%ecx, %rax
	cmpl	%edx, (%r15,%rax,4)
	jne	.L4
	addl	$1, %ecx
	cmpl	%ecx, %r10d
	jne	.L4
	testb	%r11b, %r11b
	je	.L5
	movl	%edx, 52(%rsp)
.L5:
	movl	$10000, %eax
	subl	%r8d, %eax
	movl	%eax, %r8d
.L6:
	movl	%r8d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L21:
	movl	%edx, 52(%rsp)
	jmp	.L6
.L8:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$72, %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
.L22:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	y
	.bss
	.align 32
	.type	y, @object
	.size	y, 408
y:
	.zero	408
	.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	"%d%d%d%d%d"
	.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	y(%rip), %r15
	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
	leaq	.LC0(%rip), %rbx
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rax
	leaq	52(%rsp), %r14
	movq	%rax, 24(%rsp)
	leaq	40(%rsp), %rax
	leaq	48(%rsp), %r13
	movq	%rax, 16(%rsp)
	leaq	36(%rsp), %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	24(%rsp), %rcx
	movq	16(%rsp), %rdx
	xorl	%eax, %eax
	movq	%r14, %r9
	movq	8(%rsp), %rsi
	movq	%r13, %r8
	leaq	.LC2(%rip), %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L8
	movl	36(%rsp), %eax
	testl	%eax, %eax
	jle	.L8
	leaq	y(%rip), %r12
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %r10d
	addq	$4, %r12
	cmpl	%ebp, %r10d
	jg	.L3
	movl	52(%rsp), %edx
	movl	40(%rsp), %r9d
	xorl	%r11d, %r11d
	xorl	%ecx, %ecx
	movl	44(%rsp), %edi
	movl	48(%rsp), %esi
	movl	$10000, %r8d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	imull	%r9d, %edx
	subl	$1, %r8d
	movl	$1, %r11d
	leal	(%rdx,%rdi), %eax
	cltd
	idivl	%esi
	cmpl	$-1, %r8d
	je	.L21
.L7:
	movslq	%ecx, %rax
	cmpl	%edx, (%r15,%rax,4)
	jne	.L4
	addl	$1, %ecx
	cmpl	%ecx, %r10d
	jne	.L4
	testb	%r11b, %r11b
	je	.L5
	movl	%edx, 52(%rsp)
.L5:
	movl	$10000, %eax
	subl	%r8d, %eax
	movl	%eax, %r8d
.L6:
	movl	%r8d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L21:
	movl	%edx, 52(%rsp)
	jmp	.L6
.L8:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$72, %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
.L22:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	y
	.bss
	.align 32
	.type	y, @object
	.size	y, 408
y:
	.zero	408
	.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:
```