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, a, b, c, x, y[128];
  int i, j;

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

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d%d%d%d"
	.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	$560, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L11:
	movl	$0, -536(%rbp)
	jmp	.L3
.L4:
	leaq	-528(%rbp), %rdx
	movl	-536(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -536(%rbp)
.L3:
	movl	-556(%rbp), %eax
	cmpl	%eax, -536(%rbp)
	jl	.L4
	movl	$0, -532(%rbp)
	movl	$0, -536(%rbp)
	jmp	.L5
.L9:
	movl	-532(%rbp), %eax
	cltq
	movl	-528(%rbp,%rax,4), %edx
	movl	-540(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L6
	movl	-556(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -532(%rbp)
	je	.L14
	addl	$1, -532(%rbp)
.L6:
	movl	-552(%rbp), %edx
	movl	-540(%rbp), %eax
	imull	%eax, %edx
	movl	-548(%rbp), %eax
	addl	%edx, %eax
	movl	-544(%rbp), %ecx
	cltd
	idivl	%ecx
	movl	%edx, %eax
	movl	%eax, -540(%rbp)
	addl	$1, -536(%rbp)
.L5:
	cmpl	$10001, -536(%rbp)
	jle	.L9
	jmp	.L8
.L14:
	nop
.L8:
	cmpl	$10000, -536(%rbp)
	jle	.L10
	movl	$-1, -536(%rbp)
.L10:
	movl	-536(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-540(%rbp), %rdi
	leaq	-544(%rbp), %rsi
	leaq	-548(%rbp), %rcx
	leaq	-552(%rbp), %rdx
	leaq	-556(%rbp), %rax
	movq	%rdi, %r9
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-556(%rbp), %eax
	testl	%eax, %eax
	jne	.L11
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	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	"%d\n"
.LC2:
	.string	"%d%d%d%d%d"
	.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
	leaq	.LC0(%rip), %rbx
	subq	$584, %rsp
	.cfi_def_cfa_offset 640
	movq	%fs:40, %rax
	movq	%rax, 568(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rax
	leaq	44(%rsp), %r15
	movq	%rax, 8(%rsp)
	leaq	28(%rsp), %rax
	leaq	40(%rsp), %r14
	movq	%rax, (%rsp)
	leaq	36(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rdx
	movq	(%rsp), %rsi
	movq	%r15, %r9
	movq	%r14, %r8
	movq	%r13, %rcx
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %r10d
	testl	%r10d, %r10d
	je	.L9
	leaq	48(%rsp), %r12
	movl	$0, %ebp
	jle	.L11
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %r10d
	addq	$4, %r12
	cmpl	%ebp, %r10d
	jg	.L3
.L11:
	movl	44(%rsp), %edx
	movl	32(%rsp), %r9d
	xorl	%r11d, %r11d
	xorl	%ecx, %ecx
	movl	36(%rsp), %edi
	movl	40(%rsp), %esi
	xorl	%r8d, %r8d
	subl	$1, %r10d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	imull	%r9d, %edx
	addl	$1, %r8d
	movl	$1, %r11d
	leal	(%rdx,%rdi), %eax
	cltd
	idivl	%esi
	cmpl	$10002, %r8d
	je	.L23
.L6:
	movslq	%ecx, %rax
	cmpl	%edx, 48(%rsp,%rax,4)
	jne	.L4
	cmpl	%ecx, %r10d
	je	.L5
	addl	$1, %ecx
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	testb	%r11b, %r11b
	je	.L8
	movl	%edx, 44(%rsp)
.L8:
	cmpl	$10001, %r8d
	movl	$-1, %eax
	cmove	%eax, %r8d
.L7:
	movl	%r8d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L23:
	movl	%edx, 44(%rsp)
	movl	$-1, %r8d
	jmp	.L7
.L9:
	movq	568(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L24
	addq	$584, %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
.L24:
	.cfi_restore_state
	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	"%d\n"
.LC2:
	.string	"%d%d%d%d%d"
	.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
	leaq	.LC0(%rip), %rbx
	subq	$584, %rsp
	.cfi_def_cfa_offset 640
	movq	%fs:40, %rax
	movq	%rax, 568(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rax
	leaq	44(%rsp), %r15
	movq	%rax, 8(%rsp)
	leaq	28(%rsp), %rax
	leaq	40(%rsp), %r14
	movq	%rax, (%rsp)
	leaq	36(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rdx
	movq	(%rsp), %rsi
	movq	%r15, %r9
	movq	%r14, %r8
	movq	%r13, %rcx
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %r10d
	testl	%r10d, %r10d
	je	.L9
	leaq	48(%rsp), %r12
	movl	$0, %ebp
	jle	.L11
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %r10d
	addq	$4, %r12
	cmpl	%ebp, %r10d
	jg	.L3
.L11:
	movl	44(%rsp), %edx
	movl	32(%rsp), %r9d
	xorl	%r11d, %r11d
	xorl	%ecx, %ecx
	movl	36(%rsp), %edi
	movl	40(%rsp), %esi
	xorl	%r8d, %r8d
	subl	$1, %r10d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	imull	%r9d, %edx
	addl	$1, %r8d
	movl	$1, %r11d
	leal	(%rdx,%rdi), %eax
	cltd
	idivl	%esi
	cmpl	$10002, %r8d
	je	.L23
.L6:
	movslq	%ecx, %rax
	cmpl	%edx, 48(%rsp,%rax,4)
	jne	.L4
	cmpl	%ecx, %r10d
	je	.L5
	addl	$1, %ecx
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	testb	%r11b, %r11b
	je	.L8
	movl	%edx, 44(%rsp)
.L8:
	cmpl	$10001, %r8d
	movl	$-1, %eax
	cmove	%eax, %r8d
.L7:
	movl	%r8d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L23:
	movl	%edx, 44(%rsp)
	movl	$-1, %r8d
	jmp	.L7
.L9:
	movq	568(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L24
	addq	$584, %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
.L24:
	.cfi_restore_state
	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, a, b, c, x, y[128];
  int i, j;

  while(scanf("%d%d%d%d%d", &n, &a, &b, &c, &x), n){
    for(i=0; i<n; i++){
      scanf("%d", &y[i]);
    }
    j=0;
    for(i=0; i<10002; i++){
      if(x==y[j]){
	if(j==n-1){
	  break;
	}else{
	  j++;
	}
      }
      x=(a*x+b)%c;
    }
    if(i>10000) i=-1;
    printf("%d\n", i);
  }
  
  return 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 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 unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>

int main(){
  int n, a, b, c, x, y[128];
  int i, j;

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

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d%d%d%d"
	.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	$560, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L11:
	movl	$0, -536(%rbp)
	jmp	.L3
.L4:
	leaq	-528(%rbp), %rdx
	movl	-536(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -536(%rbp)
.L3:
	movl	-556(%rbp), %eax
	cmpl	%eax, -536(%rbp)
	jl	.L4
	movl	$0, -532(%rbp)
	movl	$0, -536(%rbp)
	jmp	.L5
.L9:
	movl	-532(%rbp), %eax
	cltq
	movl	-528(%rbp,%rax,4), %edx
	movl	-540(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L6
	movl	-556(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -532(%rbp)
	je	.L14
	addl	$1, -532(%rbp)
.L6:
	movl	-552(%rbp), %edx
	movl	-540(%rbp), %eax
	imull	%eax, %edx
	movl	-548(%rbp), %eax
	addl	%edx, %eax
	movl	-544(%rbp), %ecx
	cltd
	idivl	%ecx
	movl	%edx, %eax
	movl	%eax, -540(%rbp)
	addl	$1, -536(%rbp)
.L5:
	cmpl	$10001, -536(%rbp)
	jle	.L9
	jmp	.L8
.L14:
	nop
.L8:
	cmpl	$10000, -536(%rbp)
	jle	.L10
	movl	$-1, -536(%rbp)
.L10:
	movl	-536(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-540(%rbp), %rdi
	leaq	-544(%rbp), %rsi
	leaq	-548(%rbp), %rcx
	leaq	-552(%rbp), %rdx
	leaq	-556(%rbp), %rax
	movq	%rdi, %r9
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-556(%rbp), %eax
	testl	%eax, %eax
	jne	.L11
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	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.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d%d%d%d"
	.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	$560, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L11:
	movl	$0, -536(%rbp)
	jmp	.L3
.L4:
	leaq	-528(%rbp), %rdx
	movl	-536(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -536(%rbp)
.L3:
	movl	-556(%rbp), %eax
	cmpl	%eax, -536(%rbp)
	jl	.L4
	movl	$0, -532(%rbp)
	movl	$0, -536(%rbp)
	jmp	.L5
.L9:
	movl	-532(%rbp), %eax
	cltq
	movl	-528(%rbp,%rax,4), %edx
	movl	-540(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L6
	movl	-556(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -532(%rbp)
	je	.L14
	addl	$1, -532(%rbp)
.L6:
	movl	-552(%rbp), %edx
	movl	-540(%rbp), %eax
	imull	%eax, %edx
	movl	-548(%rbp), %eax
	addl	%edx, %eax
	movl	-544(%rbp), %ecx
	cltd
	idivl	%ecx
	movl	%edx, %eax
	movl	%eax, -540(%rbp)
	addl	$1, -536(%rbp)
.L5:
	cmpl	$10001, -536(%rbp)
	jle	.L9
	jmp	.L8
.L14:
	nop
.L8:
	cmpl	$10000, -536(%rbp)
	jle	.L10
	movl	$-1, -536(%rbp)
.L10:
	movl	-536(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-540(%rbp), %rdi
	leaq	-544(%rbp), %rsi
	leaq	-548(%rbp), %rcx
	leaq	-552(%rbp), %rdx
	leaq	-556(%rbp), %rax
	movq	%rdi, %r9
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-556(%rbp), %eax
	testl	%eax, %eax
	jne	.L11
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	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:
