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(void) {
	_Bool flag[50000];
	int prime[10000];
	int i, j;
	int n;
	int count;
	int max;
	for (i = 2; i <= 3 || i <= sqrt(50000); i++) {
		for (j = 2; i * j <= 50000; j++) {
			flag[i*j-1] = 1;
		}
	}
	j = 0;
	for (i = 2; i < 50000; i++) {
		if (!flag[i-1]) {
			prime[j++] = i;
		}
	}
	max = j - 1;
	while (scanf("%d", &n)) {
		if (!n)
			break;
		j = max;
		count = 0;
		for (i = 0; i <= j; i++) {
			while (1) {
				if (n - prime[i] > prime[j]) {
					break;
				}
				else if (n - prime[i] < prime[j]) {
					j--;
				}
				else {
					count++;
					break;
				}
				if (i > j)
					break;
			}
		}
		printf("%d\n", count);
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%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
	leaq	-86016(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$4032, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$2, -90032(%rbp)
	jmp	.L2
.L5:
	movl	$2, -90028(%rbp)
	jmp	.L3
.L4:
	movl	-90032(%rbp), %eax
	imull	-90028(%rbp), %eax
	subl	$1, %eax
	cltq
	movb	$1, -50016(%rbp,%rax)
	addl	$1, -90028(%rbp)
.L3:
	movl	-90032(%rbp), %eax
	imull	-90028(%rbp), %eax
	cmpl	$50000, %eax
	jle	.L4
	addl	$1, -90032(%rbp)
.L2:
	cmpl	$3, -90032(%rbp)
	jle	.L5
	cmpl	$223, -90032(%rbp)
	jle	.L5
	movl	$0, -90028(%rbp)
	movl	$2, -90032(%rbp)
	jmp	.L6
.L8:
	movl	-90032(%rbp), %eax
	subl	$1, %eax
	cltq
	movzbl	-50016(%rbp,%rax), %eax
	xorl	$1, %eax
	testb	%al, %al
	je	.L7
	movl	-90028(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -90028(%rbp)
	cltq
	movl	-90032(%rbp), %edx
	movl	%edx, -90016(%rbp,%rax,4)
.L7:
	addl	$1, -90032(%rbp)
.L6:
	cmpl	$49999, -90032(%rbp)
	jle	.L8
	movl	-90028(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -90020(%rbp)
	jmp	.L9
.L19:
	movl	-90036(%rbp), %eax
	testl	%eax, %eax
	je	.L22
	movl	-90020(%rbp), %eax
	movl	%eax, -90028(%rbp)
	movl	$0, -90024(%rbp)
	movl	$0, -90032(%rbp)
	jmp	.L12
.L18:
	movl	-90036(%rbp), %edx
	movl	-90032(%rbp), %eax
	cltq
	movl	-90016(%rbp,%rax,4), %eax
	subl	%eax, %edx
	movl	-90028(%rbp), %eax
	cltq
	movl	-90016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jg	.L23
	movl	-90036(%rbp), %edx
	movl	-90032(%rbp), %eax
	cltq
	movl	-90016(%rbp,%rax,4), %eax
	subl	%eax, %edx
	movl	-90028(%rbp), %eax
	cltq
	movl	-90016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L15
	subl	$1, -90028(%rbp)
	movl	-90032(%rbp), %eax
	cmpl	-90028(%rbp), %eax
	jle	.L18
	jmp	.L14
.L15:
	addl	$1, -90024(%rbp)
	jmp	.L14
.L23:
	nop
.L14:
	addl	$1, -90032(%rbp)
.L12:
	movl	-90032(%rbp), %eax
	cmpl	-90028(%rbp), %eax
	jle	.L18
	movl	-90024(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L9:
	leaq	-90036(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	jne	.L19
	jmp	.L11
.L22:
	nop
.L11:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	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\n"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-86016(%rsp), %r11
	.cfi_def_cfa 11, 86056
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$4024, %rsp
	.cfi_def_cfa_offset 90080
	movl	$2, %edx
	movl	$4, %esi
	movq	%fs:40, %rax
	movq	%rax, 90024(%rsp)
	xorl	%eax, %eax
	leaq	40015(%rsp), %rcx
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rsi, %rax
	.p2align 4,,10
	.p2align 3
.L3:
	movb	$1, (%rcx,%rax)
	addq	%rdx, %rax
	cmpl	$50000, %eax
	jle	.L3
	addq	$1, %rdx
	addq	$2, %rsi
	cmpq	$224, %rdx
	jne	.L2
	movl	$2, %eax
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L4:
	cmpb	$0, (%rcx,%rax)
	jne	.L5
	movslq	%ebx, %rdx
	addl	$1, %ebx
	movl	%eax, 16(%rsp,%rdx,4)
.L5:
	addq	$1, %rax
	cmpq	$50000, %rax
	jne	.L4
	subl	$1, %ebx
	leaq	12(%rsp), %r12
	leaq	.LC1(%rip), %rbp
	leaq	.LC0(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L6:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L7
	movl	12(%rsp), %r8d
	testl	%r8d, %r8d
	je	.L7
	cmpl	$-1, %ebx
	je	.L16
	movl	%ebx, %eax
	xorl	%ecx, %ecx
	leaq	16(%rsp), %rdi
	xorl	%r9d, %r9d
	.p2align 4,,10
	.p2align 3
.L12:
	movslq	%eax, %rdx
	movl	%r8d, %esi
	subl	(%rdi,%rcx,4), %esi
	leaq	(%rdi,%rdx,4), %rdx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L25:
	jge	.L10
	subl	$1, %eax
	subq	$4, %rdx
	cmpl	%ecx, %eax
	jl	.L9
.L11:
	cmpl	(%rdx), %esi
	jle	.L25
.L9:
	addq	$1, %rcx
	cmpl	%ecx, %eax
	jge	.L12
.L8:
	movl	%r9d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L10:
	addq	$1, %rcx
	addl	$1, %r9d
	cmpl	%ecx, %eax
	jge	.L12
	jmp	.L8
.L7:
	movq	90024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$90040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L16:
	.cfi_restore_state
	xorl	%r9d, %r9d
	jmp	.L8
.L26:
	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\n"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-86016(%rsp), %r11
	.cfi_def_cfa 11, 86056
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$4024, %rsp
	.cfi_def_cfa_offset 90080
	movl	$2, %edx
	movl	$4, %esi
	movq	%fs:40, %rax
	movq	%rax, 90024(%rsp)
	xorl	%eax, %eax
	leaq	40015(%rsp), %rcx
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rsi, %rax
	.p2align 4,,10
	.p2align 3
.L3:
	movb	$1, (%rcx,%rax)
	addq	%rdx, %rax
	cmpl	$50000, %eax
	jle	.L3
	addq	$1, %rdx
	addq	$2, %rsi
	cmpq	$224, %rdx
	jne	.L2
	movl	$2, %eax
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L4:
	cmpb	$0, (%rcx,%rax)
	jne	.L5
	movslq	%ebx, %rdx
	addl	$1, %ebx
	movl	%eax, 16(%rsp,%rdx,4)
.L5:
	addq	$1, %rax
	cmpq	$50000, %rax
	jne	.L4
	subl	$1, %ebx
	leaq	12(%rsp), %r12
	leaq	.LC1(%rip), %rbp
	leaq	.LC0(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L6:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L7
	movl	12(%rsp), %r8d
	testl	%r8d, %r8d
	je	.L7
	cmpl	$-1, %ebx
	je	.L16
	movl	%ebx, %eax
	xorl	%ecx, %ecx
	leaq	16(%rsp), %rdi
	xorl	%r9d, %r9d
	.p2align 4,,10
	.p2align 3
.L12:
	movslq	%eax, %rdx
	movl	%r8d, %esi
	subl	(%rdi,%rcx,4), %esi
	leaq	(%rdi,%rdx,4), %rdx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L25:
	jge	.L10
	subl	$1, %eax
	subq	$4, %rdx
	cmpl	%ecx, %eax
	jl	.L9
.L11:
	cmpl	(%rdx), %esi
	jle	.L25
.L9:
	addq	$1, %rcx
	cmpl	%ecx, %eax
	jge	.L12
.L8:
	movl	%r9d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L10:
	addq	$1, %rcx
	addl	$1, %r9d
	cmpl	%ecx, %eax
	jge	.L12
	jmp	.L8
.L7:
	movq	90024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$90040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L16:
	.cfi_restore_state
	xorl	%r9d, %r9d
	jmp	.L8
.L26:
	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(void) {
	_Bool flag[50000];
	int prime[10000];
	int i, j;
	int n;
	int count;
	int max;
	for (i = 2; i <= 3 || i <= sqrt(50000); i++) {
		for (j = 2; i * j <= 50000; j++) {
			flag[i*j-1] = 1;
		}
	}
	j = 0;
	for (i = 2; i < 50000; i++) {
		if (!flag[i-1]) {
			prime[j++] = i;
		}
	}
	max = j - 1;
	while (scanf("%d", &n)) {
		if (!n)
			break;
		j = max;
		count = 0;
		for (i = 0; i <= j; i++) {
			while (1) {
				if (n - prime[i] > prime[j]) {
					break;
				}
				else if (n - prime[i] < prime[j]) {
					j--;
				}
				else {
					count++;
					break;
				}
				if (i > j)
					break;
			}
		}
		printf("%d\n", count);
	}
	return 0;
}
10
22
0
 10
34
0
 10
28
0
 10
31
0
 10
3
0
 10
0
0
 10
48
0
 10
106
0
 10
140
0
 10
160
0

2
3
 2
4
 2
2
 2
1
 2
0
 2
 2
5
 2
6
 2
7
 2
8

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(void) {
	_Bool flag[50000];
	int prime[10000];
	int i, j;
	int n;
	int count;
	int max;
	for (i = 2; i <= 3 || i <= sqrt(50000); i++) {
		for (j = 2; i * j <= 50000; j++) {
			flag[i*j-1] = 1;
		}
	}
	j = 0;
	for (i = 2; i < 50000; i++) {
		if (!flag[i-1]) {
			prime[j++] = i;
		}
	}
	max = j - 1;
	while (scanf("%d", &n)) {
		if (!n)
			break;
		j = max;
		count = 0;
		for (i = 0; i <= j; i++) {
			while (1) {
				if (n - prime[i] > prime[j]) {
					break;
				}
				else if (n - prime[i] < prime[j]) {
					j--;
				}
				else {
					count++;
					break;
				}
				if (i > j)
					break;
			}
		}
		printf("%d\n", count);
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%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
	leaq	-86016(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$4032, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$2, -90032(%rbp)
	jmp	.L2
.L5:
	movl	$2, -90028(%rbp)
	jmp	.L3
.L4:
	movl	-90032(%rbp), %eax
	imull	-90028(%rbp), %eax
	subl	$1, %eax
	cltq
	movb	$1, -50016(%rbp,%rax)
	addl	$1, -90028(%rbp)
.L3:
	movl	-90032(%rbp), %eax
	imull	-90028(%rbp), %eax
	cmpl	$50000, %eax
	jle	.L4
	addl	$1, -90032(%rbp)
.L2:
	cmpl	$3, -90032(%rbp)
	jle	.L5
	cmpl	$223, -90032(%rbp)
	jle	.L5
	movl	$0, -90028(%rbp)
	movl	$2, -90032(%rbp)
	jmp	.L6
.L8:
	movl	-90032(%rbp), %eax
	subl	$1, %eax
	cltq
	movzbl	-50016(%rbp,%rax), %eax
	xorl	$1, %eax
	testb	%al, %al
	je	.L7
	movl	-90028(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -90028(%rbp)
	cltq
	movl	-90032(%rbp), %edx
	movl	%edx, -90016(%rbp,%rax,4)
.L7:
	addl	$1, -90032(%rbp)
.L6:
	cmpl	$49999, -90032(%rbp)
	jle	.L8
	movl	-90028(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -90020(%rbp)
	jmp	.L9
.L19:
	movl	-90036(%rbp), %eax
	testl	%eax, %eax
	je	.L22
	movl	-90020(%rbp), %eax
	movl	%eax, -90028(%rbp)
	movl	$0, -90024(%rbp)
	movl	$0, -90032(%rbp)
	jmp	.L12
.L18:
	movl	-90036(%rbp), %edx
	movl	-90032(%rbp), %eax
	cltq
	movl	-90016(%rbp,%rax,4), %eax
	subl	%eax, %edx
	movl	-90028(%rbp), %eax
	cltq
	movl	-90016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jg	.L23
	movl	-90036(%rbp), %edx
	movl	-90032(%rbp), %eax
	cltq
	movl	-90016(%rbp,%rax,4), %eax
	subl	%eax, %edx
	movl	-90028(%rbp), %eax
	cltq
	movl	-90016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L15
	subl	$1, -90028(%rbp)
	movl	-90032(%rbp), %eax
	cmpl	-90028(%rbp), %eax
	jle	.L18
	jmp	.L14
.L15:
	addl	$1, -90024(%rbp)
	jmp	.L14
.L23:
	nop
.L14:
	addl	$1, -90032(%rbp)
.L12:
	movl	-90032(%rbp), %eax
	cmpl	-90028(%rbp), %eax
	jle	.L18
	movl	-90024(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L9:
	leaq	-90036(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	jne	.L19
	jmp	.L11
.L22:
	nop
.L11:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	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\n"
.LC1:
	.string	"%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
	leaq	-86016(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$4032, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$2, -90032(%rbp)
	jmp	.L2
.L5:
	movl	$2, -90028(%rbp)
	jmp	.L3
.L4:
	movl	-90032(%rbp), %eax
	imull	-90028(%rbp), %eax
	subl	$1, %eax
	cltq
	movb	$1, -50016(%rbp,%rax)
	addl	$1, -90028(%rbp)
.L3:
	movl	-90032(%rbp), %eax
	imull	-90028(%rbp), %eax
	cmpl	$50000, %eax
	jle	.L4
	addl	$1, -90032(%rbp)
.L2:
	cmpl	$3, -90032(%rbp)
	jle	.L5
	cmpl	$223, -90032(%rbp)
	jle	.L5
	movl	$0, -90028(%rbp)
	movl	$2, -90032(%rbp)
	jmp	.L6
.L8:
	movl	-90032(%rbp), %eax
	subl	$1, %eax
	cltq
	movzbl	-50016(%rbp,%rax), %eax
	xorl	$1, %eax
	testb	%al, %al
	je	.L7
	movl	-90028(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -90028(%rbp)
	cltq
	movl	-90032(%rbp), %edx
	movl	%edx, -90016(%rbp,%rax,4)
.L7:
	addl	$1, -90032(%rbp)
.L6:
	cmpl	$49999, -90032(%rbp)
	jle	.L8
	movl	-90028(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -90020(%rbp)
	jmp	.L9
.L19:
	movl	-90036(%rbp), %eax
	testl	%eax, %eax
	je	.L22
	movl	-90020(%rbp), %eax
	movl	%eax, -90028(%rbp)
	movl	$0, -90024(%rbp)
	movl	$0, -90032(%rbp)
	jmp	.L12
.L18:
	movl	-90036(%rbp), %edx
	movl	-90032(%rbp), %eax
	cltq
	movl	-90016(%rbp,%rax,4), %eax
	subl	%eax, %edx
	movl	-90028(%rbp), %eax
	cltq
	movl	-90016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jg	.L23
	movl	-90036(%rbp), %edx
	movl	-90032(%rbp), %eax
	cltq
	movl	-90016(%rbp,%rax,4), %eax
	subl	%eax, %edx
	movl	-90028(%rbp), %eax
	cltq
	movl	-90016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L15
	subl	$1, -90028(%rbp)
	movl	-90032(%rbp), %eax
	cmpl	-90028(%rbp), %eax
	jle	.L18
	jmp	.L14
.L15:
	addl	$1, -90024(%rbp)
	jmp	.L14
.L23:
	nop
.L14:
	addl	$1, -90032(%rbp)
.L12:
	movl	-90032(%rbp), %eax
	cmpl	-90028(%rbp), %eax
	jle	.L18
	movl	-90024(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L9:
	leaq	-90036(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	jne	.L19
	jmp	.L11
.L22:
	nop
.L11:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	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:
