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>
#define ll long long
#define rep(i,l,r)for(ll i=(l);i<(r);i++)
 
int prime[100000+310];
void makep(ll n){prime[0]=prime[1]=1;for(int i=2;i*i<=n;i++)if(!prime[i])for(int j=i*i;j<=n;j+=i)prime[j]=1;}
 
int main(){
	makep(100300);
	ll n,p;
	while(scanf("%lld%lld",&n,&p),~n){
		n++;
		ll crr=0;
		while(p>0){
			rep(i,0,crr/2+1)if(!prime[n+i]&&!prime[n+crr-i])p--;
			if(p>0)crr++;
		}
		printf("%lld\n",n+n+crr);
	}
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	prime
	.bss
	.align 32
	.type	prime, @object
	.size	prime, 401240
prime:
	.zero	401240
	.text
	.globl	makep
	.type	makep, @function
makep:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movl	$1, 4+prime(%rip)
	movl	4+prime(%rip), %eax
	movl	%eax, prime(%rip)
	movl	$2, -8(%rbp)
	jmp	.L2
.L6:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	prime(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L3
	movl	-8(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, -4(%rbp)
	jmp	.L4
.L5:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	prime(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	-8(%rbp), %eax
	addl	%eax, -4(%rbp)
.L4:
	movl	-4(%rbp), %eax
	cltq
	cmpq	%rax, -24(%rbp)
	jge	.L5
.L3:
	addl	$1, -8(%rbp)
.L2:
	movl	-8(%rbp), %eax
	imull	%eax, %eax
	cltq
	cmpq	%rax, -24(%rbp)
	jge	.L6
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	makep, .-makep
	.section	.rodata
.LC0:
	.string	"%lld\n"
.LC1:
	.string	"%lld%lld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$100300, %edi
	call	makep
	jmp	.L8
.L14:
	movq	-40(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -40(%rbp)
	movq	$0, -24(%rbp)
	jmp	.L9
.L13:
	movq	$0, -16(%rbp)
	jmp	.L10
.L12:
	movq	-40(%rbp), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	prime(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L11
	movq	-40(%rbp), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	subq	-16(%rbp), %rax
	leaq	0(,%rax,4), %rdx
	leaq	prime(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L11
	movq	-32(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -32(%rbp)
.L11:
	addq	$1, -16(%rbp)
.L10:
	movq	-24(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	cmpq	%rax, -16(%rbp)
	jle	.L12
	movq	-32(%rbp), %rax
	testq	%rax, %rax
	jle	.L9
	addq	$1, -24(%rbp)
.L9:
	movq	-32(%rbp), %rax
	testq	%rax, %rax
	jg	.L13
	movq	-40(%rbp), %rax
	leaq	(%rax,%rax), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	leaq	-32(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-40(%rbp), %rax
	cmpq	$-1, %rax
	jne	.L14
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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
	.p2align 4
	.globl	makep
	.type	makep, @function
makep:
.LFB23:
	.cfi_startproc
	endbr64
	movq	.LC0(%rip), %rax
	movq	%rax, prime(%rip)
	cmpq	$3, %rdi
	jle	.L1
	leaq	8+prime(%rip), %rsi
	movl	$2, %ecx
	movl	$4, %eax
	leaq	-8(%rsi), %r8
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	addl	$1, %ecx
	addq	$4, %rsi
	movl	%ecx, %eax
	imull	%ecx, %eax
	movslq	%eax, %rdx
	cmpq	%rdi, %rdx
	jg	.L1
.L5:
	movl	(%rsi), %edx
	testl	%edx, %edx
	jne	.L3
	movslq	%eax, %rdx
	cmpq	%rdx, %rdi
	jl	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	addl	%ecx, %eax
	movl	$1, (%r8,%rdx,4)
	movslq	%eax, %rdx
	cmpq	%rdi, %rdx
	jle	.L4
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L1:
	ret
	.cfi_endproc
.LFE23:
	.size	makep, .-makep
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%lld\n"
.LC2:
	.string	"%lld%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$2, %edx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	prime(%rip), %r13
	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
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	movq	.LC0(%rip), %rax
	movq	%rax, prime(%rip)
	movl	$4, %eax
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L14:
	leal	1(%rcx), %eax
	addq	$1, %rdx
	imull	%eax, %eax
	cmpl	$100300, %eax
	jg	.L31
.L11:
	movl	0(%r13,%rdx,4), %esi
	movl	%edx, %ecx
	testl	%esi, %esi
	jne	.L14
	cltq
	.p2align 4,,10
	.p2align 3
.L13:
	movl	$1, 0(%r13,%rax,4)
	addq	%rdx, %rax
	cmpl	$100300, %eax
	jle	.L13
	jmp	.L14
.L31:
	leaq	16(%rsp), %rbp
	leaq	8(%rsp), %rbx
	leaq	4+prime(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L12:
	movq	%rbp, %rdx
	movq	%rbx, %rsi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %r11
	cmpq	$-1, %r11
	je	.L32
	movq	16(%rsp), %rsi
	leaq	1(%r11), %r15
	movq	%r15, 8(%rsp)
	testq	%rsi, %rsi
	jle	.L23
	leaq	0(,%r15,4), %rax
	movq	%r15, %r9
	xorl	%r10d, %r10d
	leaq	0(%r13,%rax), %r8
	leaq	-4(%r13,%rax), %r14
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%r9, %rdi
	movq	%r8, %rdx
	subq	%r11, %rdi
	subq	$1, %rdi
	movq	%rdi, %rax
	sarq	%rax
	addq	%r11, %rax
	leaq	(%r12,%rax,4), %rcx
	movq	%r14, %rax
	.p2align 4,,10
	.p2align 3
.L18:
	cmpl	$0, 4(%rax)
	jne	.L17
	cmpl	$0, (%rdx)
	jne	.L17
	subq	$1, %rsi
	movl	$1, %r10d
.L17:
	addq	$4, %rax
	subq	$4, %rdx
	cmpq	%rcx, %rax
	jne	.L18
	addq	$1, %r9
	addq	$4, %r8
	testq	%rsi, %rsi
	jg	.L16
	testb	%r10b, %r10b
	je	.L15
	movq	%rsi, 16(%rsp)
.L15:
	leaq	(%rdi,%r15,2), %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L12
.L32:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L33
	addq	$40, %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
.L23:
	.cfi_restore_state
	xorl	%edi, %edi
	jmp	.L15
.L33:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	prime
	.bss
	.align 32
	.type	prime, @object
	.size	prime, 401240
prime:
	.zero	401240
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	1
	.long	1
	.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
	.p2align 4
	.globl	makep
	.type	makep, @function
makep:
.LFB23:
	.cfi_startproc
	endbr64
	movq	.LC0(%rip), %rax
	movq	%rax, prime(%rip)
	cmpq	$3, %rdi
	jle	.L1
	leaq	8+prime(%rip), %rsi
	movl	$2, %ecx
	movl	$4, %eax
	leaq	-8(%rsi), %r8
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	addl	$1, %ecx
	addq	$4, %rsi
	movl	%ecx, %eax
	imull	%ecx, %eax
	movslq	%eax, %rdx
	cmpq	%rdi, %rdx
	jg	.L1
.L5:
	movl	(%rsi), %edx
	testl	%edx, %edx
	jne	.L3
	movslq	%eax, %rdx
	cmpq	%rdx, %rdi
	jl	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	addl	%ecx, %eax
	movl	$1, (%r8,%rdx,4)
	movslq	%eax, %rdx
	cmpq	%rdi, %rdx
	jle	.L4
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L1:
	ret
	.cfi_endproc
.LFE23:
	.size	makep, .-makep
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%lld\n"
.LC2:
	.string	"%lld%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$2, %edx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	prime(%rip), %r13
	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
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	movq	.LC0(%rip), %rax
	movq	%rax, prime(%rip)
	movl	$4, %eax
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L14:
	leal	1(%rcx), %eax
	addq	$1, %rdx
	imull	%eax, %eax
	cmpl	$100300, %eax
	jg	.L31
.L11:
	movl	0(%r13,%rdx,4), %esi
	movl	%edx, %ecx
	testl	%esi, %esi
	jne	.L14
	cltq
	.p2align 4,,10
	.p2align 3
.L13:
	movl	$1, 0(%r13,%rax,4)
	addq	%rdx, %rax
	cmpl	$100300, %eax
	jle	.L13
	jmp	.L14
.L31:
	leaq	16(%rsp), %rbp
	leaq	8(%rsp), %rbx
	leaq	4+prime(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L12:
	movq	%rbp, %rdx
	movq	%rbx, %rsi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %r11
	cmpq	$-1, %r11
	je	.L32
	movq	16(%rsp), %rsi
	leaq	1(%r11), %r15
	movq	%r15, 8(%rsp)
	testq	%rsi, %rsi
	jle	.L23
	leaq	0(,%r15,4), %rax
	movq	%r15, %r9
	xorl	%r10d, %r10d
	leaq	0(%r13,%rax), %r8
	leaq	-4(%r13,%rax), %r14
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%r9, %rdi
	movq	%r8, %rdx
	subq	%r11, %rdi
	subq	$1, %rdi
	movq	%rdi, %rax
	sarq	%rax
	addq	%r11, %rax
	leaq	(%r12,%rax,4), %rcx
	movq	%r14, %rax
	.p2align 4,,10
	.p2align 3
.L18:
	cmpl	$0, 4(%rax)
	jne	.L17
	cmpl	$0, (%rdx)
	jne	.L17
	subq	$1, %rsi
	movl	$1, %r10d
.L17:
	addq	$4, %rax
	subq	$4, %rdx
	cmpq	%rcx, %rax
	jne	.L18
	addq	$1, %r9
	addq	$4, %r8
	testq	%rsi, %rsi
	jg	.L16
	testb	%r10b, %r10b
	je	.L15
	movq	%rsi, 16(%rsp)
.L15:
	leaq	(%rdi,%r15,2), %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L12
.L32:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L33
	addq	$40, %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
.L23:
	.cfi_restore_state
	xorl	%edi, %edi
	jmp	.L15
.L33:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	prime
	.bss
	.align 32
	.type	prime, @object
	.size	prime, 401240
prime:
	.zero	401240
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	1
	.long	1
	.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>
#define ll long long
#define rep(i,l,r)for(ll i=(l);i<(r);i++)
 
int prime[100000+310];
void makep(ll n){prime[0]=prime[1]=1;for(int i=2;i*i<=n;i++)if(!prime[i])for(int j=i*i;j<=n;j+=i)prime[j]=1;}
 
int main(){
	makep(100300);
	ll n,p;
	while(scanf("%lld%lld",&n,&p),~n){
		n++;
		ll crr=0;
		while(p>0){
			rep(i,0,crr/2+1)if(!prime[n+i]&&!prime[n+crr-i])p--;
			if(p>0)crr++;
		}
		printf("%lld\n",n+n+crr);
	}
}

0 55
0 1
0 2
0 3
10 1
10 2
10 3
10 4
10 5
10 6
11 1
11 2
11 3
100001 100
-1 -1
 0 55
0 1
0 2
0 3
10 1
10 2
10 3
10 4
10 5
10 1
11 1
11 2
11 3
100001 100
-1 -1
 0 55
0 1
0 2
0 3
10 1
10 2
10 3
10 4
10 5
19 6
11 1
11 2
11 3
100000 100
-1 -1
 0 55
0 1
0 2
0 3
10 1
10 2
10 3
10 4
10 5
10 1
10 1
11 2
11 3
100001 100
-1 -1
 0 55
0 1
0 2
0 3
10 1
10 2
10 3
10 4
10 5
10 1
10 1
18 2
11 3
100001 100
-1 -1
 0 55
0 1
0 2
0 3
10 1
10 2
10 3
10 4
10 1
10 1
10 1
18 2
11 3
100001 100
-1 -1
 0 55
0 1
0 2
0 3
10 1
10 2
19 3
10 4
10 1
10 1
10 1
18 2
11 3
100001 100
-1 -1
 0 55
0 1
0 2
0 3
10 1
10 1
10 3
10 4
10 5
10 6
11 1
11 2
11 3
100000 100
-1 -1
 0 55
0 1
0 2
0 3
10 1
13 2
10 3
10 4
10 5
10 6
11 1
11 2
11 3
100001 100
-1 -1
 0 19
0 1
0 2
0 3
10 1
10 2
10 3
10 4
10 5
19 6
11 1
11 2
11 3
100000 100
-1 -1

42
4
5
6
22
24
26
28
30
30
26
30
32
200274
 42
4
5
6
22
24
26
28
30
22
26
30
32
200274
 42
4
5
6
22
24
26
28
30
60
26
30
32
200274
 42
4
5
6
22
24
26
28
30
22
22
30
32
200274
 42
4
5
6
22
24
26
28
30
22
22
42
32
200274
 42
4
5
6
22
24
26
28
22
22
22
42
32
200274
 42
4
5
6
22
24
54
28
22
22
22
42
32
200274
 42
4
5
6
22
22
26
28
30
30
26
30
32
200274
 42
4
5
6
22
36
26
28
30
30
26
30
32
200274
 20
4
5
6
22
24
26
28
30
60
26
30
32
200274

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>
#define ll long long
#define rep(i,l,r)for(ll i=(l);i<(r);i++)
 
int prime[100000+310];
void makep(ll n){prime[0]=prime[1]=1;for(int i=2;i*i<=n;i++)if(!prime[i])for(int j=i*i;j<=n;j+=i)prime[j]=1;}
 
int main(){
	makep(100300);
	ll n,p;
	while(scanf("%lld%lld",&n,&p),~n){
		n++;
		ll crr=0;
		while(p>0){
			rep(i,0,crr/2+1)if(!prime[n+i]&&!prime[n+crr-i])p--;
			if(p>0)crr++;
		}
		printf("%lld\n",n+n+crr);
	}
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	prime
	.bss
	.align 32
	.type	prime, @object
	.size	prime, 401240
prime:
	.zero	401240
	.text
	.globl	makep
	.type	makep, @function
makep:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movl	$1, 4+prime(%rip)
	movl	4+prime(%rip), %eax
	movl	%eax, prime(%rip)
	movl	$2, -8(%rbp)
	jmp	.L2
.L6:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	prime(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L3
	movl	-8(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, -4(%rbp)
	jmp	.L4
.L5:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	prime(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	-8(%rbp), %eax
	addl	%eax, -4(%rbp)
.L4:
	movl	-4(%rbp), %eax
	cltq
	cmpq	%rax, -24(%rbp)
	jge	.L5
.L3:
	addl	$1, -8(%rbp)
.L2:
	movl	-8(%rbp), %eax
	imull	%eax, %eax
	cltq
	cmpq	%rax, -24(%rbp)
	jge	.L6
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	makep, .-makep
	.section	.rodata
.LC0:
	.string	"%lld\n"
.LC1:
	.string	"%lld%lld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$100300, %edi
	call	makep
	jmp	.L8
.L14:
	movq	-40(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -40(%rbp)
	movq	$0, -24(%rbp)
	jmp	.L9
.L13:
	movq	$0, -16(%rbp)
	jmp	.L10
.L12:
	movq	-40(%rbp), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	prime(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L11
	movq	-40(%rbp), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	subq	-16(%rbp), %rax
	leaq	0(,%rax,4), %rdx
	leaq	prime(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L11
	movq	-32(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -32(%rbp)
.L11:
	addq	$1, -16(%rbp)
.L10:
	movq	-24(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	cmpq	%rax, -16(%rbp)
	jle	.L12
	movq	-32(%rbp), %rax
	testq	%rax, %rax
	jle	.L9
	addq	$1, -24(%rbp)
.L9:
	movq	-32(%rbp), %rax
	testq	%rax, %rax
	jg	.L13
	movq	-40(%rbp), %rax
	leaq	(%rax,%rax), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	leaq	-32(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-40(%rbp), %rax
	cmpq	$-1, %rax
	jne	.L14
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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
	.globl	prime
	.bss
	.align 32
	.type	prime, @object
	.size	prime, 401240
prime:
	.zero	401240
	.text
	.globl	makep
	.type	makep, @function
makep:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movl	$1, 4+prime(%rip)
	movl	4+prime(%rip), %eax
	movl	%eax, prime(%rip)
	movl	$2, -8(%rbp)
	jmp	.L2
.L6:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	prime(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L3
	movl	-8(%rbp), %eax
	imull	%eax, %eax
	movl	%eax, -4(%rbp)
	jmp	.L4
.L5:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	prime(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	-8(%rbp), %eax
	addl	%eax, -4(%rbp)
.L4:
	movl	-4(%rbp), %eax
	cltq
	cmpq	%rax, -24(%rbp)
	jge	.L5
.L3:
	addl	$1, -8(%rbp)
.L2:
	movl	-8(%rbp), %eax
	imull	%eax, %eax
	cltq
	cmpq	%rax, -24(%rbp)
	jge	.L6
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	makep, .-makep
	.section	.rodata
.LC0:
	.string	"%lld\n"
.LC1:
	.string	"%lld%lld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$100300, %edi
	call	makep
	jmp	.L8
.L14:
	movq	-40(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -40(%rbp)
	movq	$0, -24(%rbp)
	jmp	.L9
.L13:
	movq	$0, -16(%rbp)
	jmp	.L10
.L12:
	movq	-40(%rbp), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	prime(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L11
	movq	-40(%rbp), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	subq	-16(%rbp), %rax
	leaq	0(,%rax,4), %rdx
	leaq	prime(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L11
	movq	-32(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -32(%rbp)
.L11:
	addq	$1, -16(%rbp)
.L10:
	movq	-24(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	cmpq	%rax, -16(%rbp)
	jle	.L12
	movq	-32(%rbp), %rax
	testq	%rax, %rax
	jle	.L9
	addq	$1, -24(%rbp)
.L9:
	movq	-32(%rbp), %rax
	testq	%rax, %rax
	jg	.L13
	movq	-40(%rbp), %rax
	leaq	(%rax,%rax), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	leaq	-32(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-40(%rbp), %rax
	cmpq	$-1, %rax
	jne	.L14
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
