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 i,j,n,count,num=0;
    static char prime[1000002];
    int p[80000]={0};

    for(i = 2;i < 1000001;i++) prime[i]=1;

    for(i = 2;i < 1000001;i++){
        if(prime[i]){
            p[num]=i;
            num++;
            for(j=i+i;j<=1000001;j+=i){
                prime[j]=0;
            }   
        }   
    }   

    while(scanf("%d",&n),n){

        count=0;

        if(n%2){
            for(i=0;p[i]<n;i++){
                if(p[i]==n-2) count++;
            }   
        } else {
            for(i=0;p[i]<=n/2;i++){
                if(prime[n-p[i]]){
                    count++;
                }   
            }   
        }   

        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	-319488(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$560, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -320020(%rbp)
	leaq	-320016(%rbp), %rax
	movl	$320000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$2, -320032(%rbp)
	jmp	.L2
.L3:
	movl	-320032(%rbp), %eax
	cltq
	leaq	prime.0(%rip), %rdx
	movb	$1, (%rax,%rdx)
	addl	$1, -320032(%rbp)
.L2:
	cmpl	$1000000, -320032(%rbp)
	jle	.L3
	movl	$2, -320032(%rbp)
	jmp	.L4
.L8:
	movl	-320032(%rbp), %eax
	cltq
	leaq	prime.0(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	je	.L5
	movl	-320020(%rbp), %eax
	cltq
	movl	-320032(%rbp), %edx
	movl	%edx, -320016(%rbp,%rax,4)
	addl	$1, -320020(%rbp)
	movl	-320032(%rbp), %eax
	addl	%eax, %eax
	movl	%eax, -320028(%rbp)
	jmp	.L6
.L7:
	movl	-320028(%rbp), %eax
	cltq
	leaq	prime.0(%rip), %rdx
	movb	$0, (%rax,%rdx)
	movl	-320032(%rbp), %eax
	addl	%eax, -320028(%rbp)
.L6:
	cmpl	$1000001, -320028(%rbp)
	jle	.L7
.L5:
	addl	$1, -320032(%rbp)
.L4:
	cmpl	$1000000, -320032(%rbp)
	jle	.L8
	jmp	.L9
.L18:
	movl	$0, -320024(%rbp)
	movl	-320036(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L10
	movl	$0, -320032(%rbp)
	jmp	.L11
.L13:
	movl	-320032(%rbp), %eax
	cltq
	movl	-320016(%rbp,%rax,4), %eax
	movl	-320036(%rbp), %edx
	subl	$2, %edx
	cmpl	%edx, %eax
	jne	.L12
	addl	$1, -320024(%rbp)
.L12:
	addl	$1, -320032(%rbp)
.L11:
	movl	-320032(%rbp), %eax
	cltq
	movl	-320016(%rbp,%rax,4), %edx
	movl	-320036(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L13
	jmp	.L14
.L10:
	movl	$0, -320032(%rbp)
	jmp	.L15
.L17:
	movl	-320036(%rbp), %edx
	movl	-320032(%rbp), %eax
	cltq
	movl	-320016(%rbp,%rax,4), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cltq
	leaq	prime.0(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	je	.L16
	addl	$1, -320024(%rbp)
.L16:
	addl	$1, -320032(%rbp)
.L15:
	movl	-320032(%rbp), %eax
	cltq
	movl	-320016(%rbp,%rax,4), %edx
	movl	-320036(%rbp), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	sarl	%eax
	cmpl	%eax, %edx
	jle	.L17
.L14:
	movl	-320024(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L9:
	leaq	-320036(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-320036(%rbp), %eax
	testl	%eax, %eax
	jne	.L18
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.local	prime.0
	.comm	prime.0,1000002,32
	.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	-319488(%rsp), %r11
	.cfi_def_cfa 11, 319528
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$552, %rsp
	.cfi_def_cfa_offset 320080
	movl	$320000, %edx
	xorl	%esi, %esi
	leaq	prime.0(%rip), %rbx
	movq	%fs:40, %rax
	movq	%rax, 320024(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdi
	call	memset@PLT
	movl	$999999, %edx
	movl	$1, %esi
	leaq	2+prime.0(%rip), %rdi
	call	memset@PLT
	movl	$4, %ecx
	movl	$2, %edx
	xorl	%esi, %esi
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	addq	$1, %rdx
	addq	$2, %rcx
	cmpq	$1000001, %rdx
	je	.L23
.L4:
	cmpb	$0, (%rbx,%rdx)
	je	.L2
	movslq	%esi, %rax
	addl	$1, %esi
	movl	%edx, 16(%rsp,%rax,4)
	cmpq	$1000001, %rcx
	ja	.L2
	movq	%rcx, %rax
	.p2align 4,,10
	.p2align 3
.L3:
	movb	$0, (%rbx,%rax)
	addq	%rdx, %rax
	cmpl	$1000001, %eax
	jle	.L3
	jmp	.L2
.L23:
	leaq	12(%rsp), %r12
	leaq	.LC1(%rip), %rbp
	leaq	.LC0(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	testl	%esi, %esi
	je	.L24
	movl	16(%rsp), %eax
	testb	$1, %sil
	jne	.L6
	movl	%esi, %r8d
	leaq	20(%rsp), %rdi
	xorl	%edx, %edx
	shrl	$31, %r8d
	addl	%esi, %r8d
	sarl	%r8d
	cmpl	%r8d, %eax
	jg	.L8
	.p2align 4,,10
	.p2align 3
.L12:
	movl	%esi, %ecx
	subl	%eax, %ecx
	movslq	%ecx, %rax
	cmpb	$1, (%rbx,%rax)
	sbbl	$-1, %edx
	movl	(%rdi), %eax
	addq	$4, %rdi
	cmpl	%eax, %r8d
	jge	.L12
.L8:
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	cmpl	%eax, %esi
	jle	.L15
	leal	-2(%rsi), %edi
	leaq	20(%rsp), %rcx
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L10:
	cmpl	%eax, %edi
	sete	%al
	addq	$4, %rcx
	movzbl	%al, %eax
	addl	%eax, %edx
	movl	-4(%rcx), %eax
	cmpl	%esi, %eax
	jl	.L10
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L5
.L24:
	movq	320024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$320040, %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
.L15:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L8
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.local	prime.0
	.comm	prime.0,1000002,32
	.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	-319488(%rsp), %r11
	.cfi_def_cfa 11, 319528
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$552, %rsp
	.cfi_def_cfa_offset 320080
	movl	$320000, %edx
	xorl	%esi, %esi
	leaq	prime.0(%rip), %rbx
	movq	%fs:40, %rax
	movq	%rax, 320024(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdi
	call	memset@PLT
	movl	$999999, %edx
	movl	$1, %esi
	leaq	2+prime.0(%rip), %rdi
	call	memset@PLT
	movl	$4, %ecx
	movl	$2, %edx
	xorl	%esi, %esi
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	addq	$1, %rdx
	addq	$2, %rcx
	cmpq	$1000001, %rdx
	je	.L23
.L4:
	cmpb	$0, (%rbx,%rdx)
	je	.L2
	movslq	%esi, %rax
	addl	$1, %esi
	movl	%edx, 16(%rsp,%rax,4)
	cmpq	$1000001, %rcx
	ja	.L2
	movq	%rcx, %rax
	.p2align 4,,10
	.p2align 3
.L3:
	movb	$0, (%rbx,%rax)
	addq	%rdx, %rax
	cmpl	$1000001, %eax
	jle	.L3
	jmp	.L2
.L23:
	leaq	12(%rsp), %r12
	leaq	.LC1(%rip), %rbp
	leaq	.LC0(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	testl	%esi, %esi
	je	.L24
	movl	16(%rsp), %eax
	testb	$1, %sil
	jne	.L6
	movl	%esi, %r8d
	leaq	20(%rsp), %rdi
	xorl	%edx, %edx
	shrl	$31, %r8d
	addl	%esi, %r8d
	sarl	%r8d
	cmpl	%r8d, %eax
	jg	.L8
	.p2align 4,,10
	.p2align 3
.L12:
	movl	%esi, %ecx
	subl	%eax, %ecx
	movslq	%ecx, %rax
	cmpb	$1, (%rbx,%rax)
	sbbl	$-1, %edx
	movl	(%rdi), %eax
	addq	$4, %rdi
	cmpl	%eax, %r8d
	jge	.L12
.L8:
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	cmpl	%eax, %esi
	jle	.L15
	leal	-2(%rsi), %edi
	leaq	20(%rsp), %rcx
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L10:
	cmpl	%eax, %edi
	sete	%al
	addq	$4, %rcx
	movzbl	%al, %eax
	addl	%eax, %edx
	movl	-4(%rcx), %eax
	cmpl	%esi, %eax
	jl	.L10
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L5
.L24:
	movq	320024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$320040, %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
.L15:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L8
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.local	prime.0
	.comm	prime.0,1000002,32
	.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 i,j,n,count,num=0;
    static char prime[1000002];
    int p[80000]={0};

    for(i = 2;i < 1000001;i++) prime[i]=1;

    for(i = 2;i < 1000001;i++){
        if(prime[i]){
            p[num]=i;
            num++;
            for(j=i+i;j<=1000001;j+=i){
                prime[j]=0;
            }   
        }   
    }   

    while(scanf("%d",&n),n){

        count=0;

        if(n%2){
            for(i=0;p[i]<n;i++){
                if(p[i]==n-2) count++;
            }   
        } else {
            for(i=0;p[i]<=n/2;i++){
                if(prime[n-p[i]]){
                    count++;
                }   
            }   
        }   

        printf("%d\n",count);
    }   

    return 0;} 
134
4330
34808
98792
0

6
72
274
607

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 i,j,n,count,num=0;
    static char prime[1000002];
    int p[80000]={0};

    for(i = 2;i < 1000001;i++) prime[i]=1;

    for(i = 2;i < 1000001;i++){
        if(prime[i]){
            p[num]=i;
            num++;
            for(j=i+i;j<=1000001;j+=i){
                prime[j]=0;
            }   
        }   
    }   

    while(scanf("%d",&n),n){

        count=0;

        if(n%2){
            for(i=0;p[i]<n;i++){
                if(p[i]==n-2) count++;
            }   
        } else {
            for(i=0;p[i]<=n/2;i++){
                if(prime[n-p[i]]){
                    count++;
                }   
            }   
        }   

        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	-319488(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$560, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -320020(%rbp)
	leaq	-320016(%rbp), %rax
	movl	$320000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$2, -320032(%rbp)
	jmp	.L2
.L3:
	movl	-320032(%rbp), %eax
	cltq
	leaq	prime.0(%rip), %rdx
	movb	$1, (%rax,%rdx)
	addl	$1, -320032(%rbp)
.L2:
	cmpl	$1000000, -320032(%rbp)
	jle	.L3
	movl	$2, -320032(%rbp)
	jmp	.L4
.L8:
	movl	-320032(%rbp), %eax
	cltq
	leaq	prime.0(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	je	.L5
	movl	-320020(%rbp), %eax
	cltq
	movl	-320032(%rbp), %edx
	movl	%edx, -320016(%rbp,%rax,4)
	addl	$1, -320020(%rbp)
	movl	-320032(%rbp), %eax
	addl	%eax, %eax
	movl	%eax, -320028(%rbp)
	jmp	.L6
.L7:
	movl	-320028(%rbp), %eax
	cltq
	leaq	prime.0(%rip), %rdx
	movb	$0, (%rax,%rdx)
	movl	-320032(%rbp), %eax
	addl	%eax, -320028(%rbp)
.L6:
	cmpl	$1000001, -320028(%rbp)
	jle	.L7
.L5:
	addl	$1, -320032(%rbp)
.L4:
	cmpl	$1000000, -320032(%rbp)
	jle	.L8
	jmp	.L9
.L18:
	movl	$0, -320024(%rbp)
	movl	-320036(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L10
	movl	$0, -320032(%rbp)
	jmp	.L11
.L13:
	movl	-320032(%rbp), %eax
	cltq
	movl	-320016(%rbp,%rax,4), %eax
	movl	-320036(%rbp), %edx
	subl	$2, %edx
	cmpl	%edx, %eax
	jne	.L12
	addl	$1, -320024(%rbp)
.L12:
	addl	$1, -320032(%rbp)
.L11:
	movl	-320032(%rbp), %eax
	cltq
	movl	-320016(%rbp,%rax,4), %edx
	movl	-320036(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L13
	jmp	.L14
.L10:
	movl	$0, -320032(%rbp)
	jmp	.L15
.L17:
	movl	-320036(%rbp), %edx
	movl	-320032(%rbp), %eax
	cltq
	movl	-320016(%rbp,%rax,4), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cltq
	leaq	prime.0(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	je	.L16
	addl	$1, -320024(%rbp)
.L16:
	addl	$1, -320032(%rbp)
.L15:
	movl	-320032(%rbp), %eax
	cltq
	movl	-320016(%rbp,%rax,4), %edx
	movl	-320036(%rbp), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	sarl	%eax
	cmpl	%eax, %edx
	jle	.L17
.L14:
	movl	-320024(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L9:
	leaq	-320036(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-320036(%rbp), %eax
	testl	%eax, %eax
	jne	.L18
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.local	prime.0
	.comm	prime.0,1000002,32
	.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	-319488(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$560, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -320020(%rbp)
	leaq	-320016(%rbp), %rax
	movl	$320000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$2, -320032(%rbp)
	jmp	.L2
.L3:
	movl	-320032(%rbp), %eax
	cltq
	leaq	prime.0(%rip), %rdx
	movb	$1, (%rax,%rdx)
	addl	$1, -320032(%rbp)
.L2:
	cmpl	$1000000, -320032(%rbp)
	jle	.L3
	movl	$2, -320032(%rbp)
	jmp	.L4
.L8:
	movl	-320032(%rbp), %eax
	cltq
	leaq	prime.0(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	je	.L5
	movl	-320020(%rbp), %eax
	cltq
	movl	-320032(%rbp), %edx
	movl	%edx, -320016(%rbp,%rax,4)
	addl	$1, -320020(%rbp)
	movl	-320032(%rbp), %eax
	addl	%eax, %eax
	movl	%eax, -320028(%rbp)
	jmp	.L6
.L7:
	movl	-320028(%rbp), %eax
	cltq
	leaq	prime.0(%rip), %rdx
	movb	$0, (%rax,%rdx)
	movl	-320032(%rbp), %eax
	addl	%eax, -320028(%rbp)
.L6:
	cmpl	$1000001, -320028(%rbp)
	jle	.L7
.L5:
	addl	$1, -320032(%rbp)
.L4:
	cmpl	$1000000, -320032(%rbp)
	jle	.L8
	jmp	.L9
.L18:
	movl	$0, -320024(%rbp)
	movl	-320036(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L10
	movl	$0, -320032(%rbp)
	jmp	.L11
.L13:
	movl	-320032(%rbp), %eax
	cltq
	movl	-320016(%rbp,%rax,4), %eax
	movl	-320036(%rbp), %edx
	subl	$2, %edx
	cmpl	%edx, %eax
	jne	.L12
	addl	$1, -320024(%rbp)
.L12:
	addl	$1, -320032(%rbp)
.L11:
	movl	-320032(%rbp), %eax
	cltq
	movl	-320016(%rbp,%rax,4), %edx
	movl	-320036(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L13
	jmp	.L14
.L10:
	movl	$0, -320032(%rbp)
	jmp	.L15
.L17:
	movl	-320036(%rbp), %edx
	movl	-320032(%rbp), %eax
	cltq
	movl	-320016(%rbp,%rax,4), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cltq
	leaq	prime.0(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	je	.L16
	addl	$1, -320024(%rbp)
.L16:
	addl	$1, -320032(%rbp)
.L15:
	movl	-320032(%rbp), %eax
	cltq
	movl	-320016(%rbp,%rax,4), %edx
	movl	-320036(%rbp), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	sarl	%eax
	cmpl	%eax, %edx
	jle	.L17
.L14:
	movl	-320024(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L9:
	leaq	-320036(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-320036(%rbp), %eax
	testl	%eax, %eax
	jne	.L18
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.local	prime.0
	.comm	prime.0,1000002,32
	.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:
