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

```c
// AOJ 2039: Space Coconut Crab II
// 2017.11.6 bal4u@uu

#include <stdio.h>
#define TM 0
#if TM
#include <time.h>
#endif

#define MAX  30000
char tbl[MAX+1] = {1,1,0,0};		// zero: if prime
int p[3250] = {						// p[39] = 173 = sqrt(MAX), max sz = 3245
 2,   3,  5,  7, 11, 13, 17, 19, 23, 29, 
 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 
 73, 79, 83, 89, 97,101,103,107,109,113, 
127,131,137,139,149,151,157,163,167,173 }; int sz;

int T;

void mkprime()
{
	int i, j, k;
	for (i = 0; i <= 39; i++) {
		k = p[i];
		for (j = k<<1; j < MAX; j += k) tbl[j] = 1;
	}
	for (sz = 39, i = 173; i <= MAX; i += 2) if (!tbl[i]) p[sz++] = i;
}

int bsch(int x)
{
	int m, l = 0, r = sz;

    while (l < r) {
        m = (l + r) >> 1;
//		if (p[m] == x) return m;
        if (p[m] <= x) l = m + 1; else r = m;
    }
	return l-1;
}

int main()
{
	int i, j, k, m, ans;
#if TM
	clock_t start, end;
	start = clock();
#endif
	mkprime();
	while (scanf("%d", &T) && T > 0) {
		if (!(T & 1)) {
			k = (T>>1)-1;
			if (k > 2 && !(k & 1)) putchar('0');
			else                   putchar('1' - tbl[k]);
			putchar('\n');
		} else {
			ans = 0;
			for (i = 0; ; i++) {
				m = bsch((T-p[i]) >> 1);
				if (m < i) break;
				for (j = i; j <= m; j++) {
					k = p[i] + p[j];
					if (T-k < p[j]) break;
					if (k < T && (k<<1) > T && !tbl[T-k]) ans++;
				}
			}
			printf("%d\n", ans);
		}
	}
#if TM
	end = clock();
	printf("time %lf\n", (double)(end-start)/CLOCKS_PER_SEC);
#endif
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	tbl
	.data
	.align 32
	.type	tbl, @object
	.size	tbl, 30001
tbl:
	.string	"\001\001"
	.string	""
	.string	""
	.zero	29996
	.globl	p
	.align 32
	.type	p, @object
	.size	p, 13000
p:
	.long	2
	.long	3
	.long	5
	.long	7
	.long	11
	.long	13
	.long	17
	.long	19
	.long	23
	.long	29
	.long	31
	.long	37
	.long	41
	.long	43
	.long	47
	.long	53
	.long	59
	.long	61
	.long	67
	.long	71
	.long	73
	.long	79
	.long	83
	.long	89
	.long	97
	.long	101
	.long	103
	.long	107
	.long	109
	.long	113
	.long	127
	.long	131
	.long	137
	.long	139
	.long	149
	.long	151
	.long	157
	.long	163
	.long	167
	.long	173
	.zero	12840
	.globl	sz
	.bss
	.align 4
	.type	sz, @object
	.size	sz, 4
sz:
	.zero	4
	.globl	T
	.align 4
	.type	T, @object
	.size	T, 4
T:
	.zero	4
	.text
	.globl	mkprime
	.type	mkprime, @function
mkprime:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, -12(%rbp)
	jmp	.L2
.L5:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	addl	%eax, %eax
	movl	%eax, -8(%rbp)
	jmp	.L3
.L4:
	movl	-8(%rbp), %eax
	cltq
	leaq	tbl(%rip), %rdx
	movb	$1, (%rax,%rdx)
	movl	-4(%rbp), %eax
	addl	%eax, -8(%rbp)
.L3:
	cmpl	$29999, -8(%rbp)
	jle	.L4
	addl	$1, -12(%rbp)
.L2:
	cmpl	$39, -12(%rbp)
	jle	.L5
	movl	$39, sz(%rip)
	movl	$173, -12(%rbp)
	jmp	.L6
.L8:
	movl	-12(%rbp), %eax
	cltq
	leaq	tbl(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L7
	movl	sz(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, sz(%rip)
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	p(%rip), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L7:
	addl	$2, -12(%rbp)
.L6:
	cmpl	$30000, -12(%rbp)
	jle	.L8
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	mkprime, .-mkprime
	.globl	bsch
	.type	bsch, @function
bsch:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	$0, -12(%rbp)
	movl	sz(%rip), %eax
	movl	%eax, -8(%rbp)
	jmp	.L10
.L12:
	movl	-12(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L11
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
	jmp	.L10
.L11:
	movl	-4(%rbp), %eax
	movl	%eax, -8(%rbp)
.L10:
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jl	.L12
	movl	-12(%rbp), %eax
	subl	$1, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	bsch, .-bsch
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	$0, %eax
	call	mkprime
	jmp	.L15
.L28:
	movl	T(%rip), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L16
	movl	T(%rip), %eax
	sarl	%eax
	subl	$1, %eax
	movl	%eax, -4(%rbp)
	cmpl	$2, -4(%rbp)
	jle	.L17
	movl	-4(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L17
	movl	$48, %edi
	call	putchar@PLT
	jmp	.L18
.L17:
	movl	-4(%rbp), %eax
	cltq
	leaq	tbl(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %edx
	movl	$49, %eax
	subl	%edx, %eax
	movl	%eax, %edi
	call	putchar@PLT
.L18:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L15
.L16:
	movl	$0, -12(%rbp)
	movl	$0, -20(%rbp)
.L26:
	movl	T(%rip), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	p(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	sarl	%eax
	movl	%eax, %edi
	call	bsch
	movl	%eax, -8(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L31
	movl	-20(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L21
.L25:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	movl	%eax, -4(%rbp)
	movl	T(%rip), %eax
	subl	-4(%rbp), %eax
	movl	%eax, %edx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	p(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jl	.L32
	movl	T(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jge	.L24
	movl	-4(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	T(%rip), %eax
	cmpl	%eax, %edx
	jle	.L24
	movl	T(%rip), %eax
	subl	-4(%rbp), %eax
	cltq
	leaq	tbl(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L24
	addl	$1, -12(%rbp)
.L24:
	addl	$1, -16(%rbp)
.L21:
	movl	-16(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jle	.L25
	jmp	.L23
.L32:
	nop
.L23:
	addl	$1, -20(%rbp)
	jmp	.L26
.L31:
	nop
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L15:
	leaq	T(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L27
	movl	T(%rip), %eax
	testl	%eax, %eax
	jg	.L28
.L27:
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	mkprime
	.type	mkprime, @function
mkprime:
.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
	leaq	tbl(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	2(%r12), %rcx
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	p(%rip), %rbx
	movq	%rbx, %r13
	leaq	160(%rbx), %rbp
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rcx, %rdi
	movl	$29998, %edx
	movl	$1, %esi
	call	memset@PLT
	movq	%rax, %rcx
.L7:
	addq	$4, %r13
	cmpq	%rbp, %r13
	je	.L21
.L3:
	movslq	0(%r13), %rdx
	leal	(%rdx,%rdx), %eax
	cmpl	$29999, %eax
	jg	.L7
	cmpl	$1, %edx
	je	.L5
	cltq
	.p2align 4,,10
	.p2align 3
.L6:
	movb	$1, (%r12,%rax)
	addq	%rdx, %rax
	cmpl	$29999, %eax
	jle	.L6
	addq	$4, %r13
	cmpq	%rbp, %r13
	jne	.L3
.L21:
	movl	$173, %eax
	xorl	%ecx, %ecx
	movl	$39, %edx
	movl	$39, sz(%rip)
	.p2align 4,,10
	.p2align 3
.L10:
	cmpb	$0, (%r12,%rax)
	jne	.L9
	movslq	%edx, %rcx
	addl	$1, %edx
	movl	%eax, (%rbx,%rcx,4)
	movl	$1, %ecx
.L9:
	addq	$2, %rax
	cmpq	$30001, %rax
	jne	.L10
	testb	%cl, %cl
	je	.L1
	movl	%edx, sz(%rip)
.L1:
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	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
	.cfi_endproc
.LFE23:
	.size	mkprime, .-mkprime
	.p2align 4
	.globl	bsch
	.type	bsch, @function
bsch:
.LFB24:
	.cfi_startproc
	endbr64
	movl	sz(%rip), %ecx
	xorl	%eax, %eax
	leaq	p(%rip), %r8
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L25:
	leal	(%rcx,%rax), %edx
	sarl	%edx
	movslq	%edx, %rsi
	cmpl	%edi, (%r8,%rsi,4)
	jle	.L27
	movl	%edx, %ecx
.L24:
	cmpl	%eax, %ecx
	jg	.L25
	subl	$1, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L27:
	leal	1(%rdx), %eax
	jmp	.L24
	.cfi_endproc
.LFE24:
	.size	bsch, .-bsch
	.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:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%eax, %eax
	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
	leaq	p(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	4(%r12), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	tbl(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	call	mkprime
	.p2align 4,,10
	.p2align 3
.L29:
	xorl	%eax, %eax
	leaq	T(%rip), %rsi
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L42
	movl	T(%rip), %esi
	testl	%esi, %esi
	jle	.L42
	testb	$1, %sil
	jne	.L50
	sarl	%esi
	movq	stdout(%rip), %r8
	subl	$1, %esi
	cmpl	$2, %esi
	jle	.L32
	testb	$1, %sil
	je	.L51
.L32:
	movslq	%esi, %rsi
	movl	$49, %edi
	movsbl	(%rbx,%rsi), %eax
	movq	%r8, %rsi
	subl	%eax, %edi
	call	putc@PLT
.L33:
	movq	stdout(%rip), %rsi
	movl	$10, %edi
	call	putc@PLT
	jmp	.L29
.L50:
	movl	sz(%rip), %r13d
	leaq	p(%rip), %r10
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	.p2align 4,,10
	.p2align 3
.L31:
	movl	(%r10), %edi
	movl	%esi, %r14d
	movl	%r8d, %r11d
	movl	%r13d, %edx
	xorl	%ecx, %ecx
	subl	%edi, %r14d
	sarl	%r14d
	jmp	.L36
	.p2align 4,,10
	.p2align 3
.L37:
	leal	(%rdx,%rcx), %eax
	sarl	%eax
	movslq	%eax, %r15
	cmpl	(%r12,%r15,4), %r14d
	jge	.L52
	movl	%eax, %edx
.L36:
	cmpl	%ecx, %edx
	jg	.L37
	cmpl	%r8d, %ecx
	jle	.L38
	subl	%r11d, %ecx
	movq	%r10, %rdx
	leal	-1(%rcx), %eax
	addq	%r8, %rax
	leaq	0(%rbp,%rax,4), %r14
	.p2align 4,,10
	.p2align 3
.L41:
	movl	(%rdx), %ecx
	movl	%esi, %r11d
	leal	(%rdi,%rcx), %eax
	subl	%eax, %r11d
	cmpl	%r11d, %ecx
	jg	.L39
	cmpl	%eax, %esi
	jle	.L40
	addl	%eax, %eax
	cmpl	%esi, %eax
	jle	.L40
	movslq	%r11d, %r11
	cmpb	$1, (%rbx,%r11)
	adcl	$0, %r9d
.L40:
	addq	$4, %rdx
	cmpq	%r14, %rdx
	jne	.L41
.L39:
	addq	$1, %r8
	addq	$4, %r10
	jmp	.L31
	.p2align 4,,10
	.p2align 3
.L52:
	leal	1(%rax), %ecx
	jmp	.L36
.L38:
	movl	%r9d, %edx
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L29
.L51:
	movq	%r8, %rsi
	movl	$48, %edi
	call	putc@PLT
	jmp	.L33
.L42:
	addq	$8, %rsp
	.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
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	T
	.bss
	.align 4
	.type	T, @object
	.size	T, 4
T:
	.zero	4
	.globl	sz
	.align 4
	.type	sz, @object
	.size	sz, 4
sz:
	.zero	4
	.globl	p
	.data
	.align 32
	.type	p, @object
	.size	p, 13000
p:
	.long	2
	.long	3
	.long	5
	.long	7
	.long	11
	.long	13
	.long	17
	.long	19
	.long	23
	.long	29
	.long	31
	.long	37
	.long	41
	.long	43
	.long	47
	.long	53
	.long	59
	.long	61
	.long	67
	.long	71
	.long	73
	.long	79
	.long	83
	.long	89
	.long	97
	.long	101
	.long	103
	.long	107
	.long	109
	.long	113
	.long	127
	.long	131
	.long	137
	.long	139
	.long	149
	.long	151
	.long	157
	.long	163
	.long	167
	.long	173
	.zero	12840
	.globl	tbl
	.align 32
	.type	tbl, @object
	.size	tbl, 30001
tbl:
	.string	"\001\001"
	.string	""
	.string	""
	.zero	29996
	.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	mkprime
	.type	mkprime, @function
mkprime:
.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
	leaq	tbl(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	2(%r12), %rcx
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	p(%rip), %rbx
	movq	%rbx, %r13
	leaq	160(%rbx), %rbp
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rcx, %rdi
	movl	$29998, %edx
	movl	$1, %esi
	call	memset@PLT
	movq	%rax, %rcx
.L7:
	addq	$4, %r13
	cmpq	%rbp, %r13
	je	.L21
.L3:
	movslq	0(%r13), %rdx
	leal	(%rdx,%rdx), %eax
	cmpl	$29999, %eax
	jg	.L7
	cmpl	$1, %edx
	je	.L5
	cltq
	.p2align 4,,10
	.p2align 3
.L6:
	movb	$1, (%r12,%rax)
	addq	%rdx, %rax
	cmpl	$29999, %eax
	jle	.L6
	addq	$4, %r13
	cmpq	%rbp, %r13
	jne	.L3
.L21:
	movl	$173, %eax
	xorl	%ecx, %ecx
	movl	$39, %edx
	movl	$39, sz(%rip)
	.p2align 4,,10
	.p2align 3
.L10:
	cmpb	$0, (%r12,%rax)
	jne	.L9
	movslq	%edx, %rcx
	addl	$1, %edx
	movl	%eax, (%rbx,%rcx,4)
	movl	$1, %ecx
.L9:
	addq	$2, %rax
	cmpq	$30001, %rax
	jne	.L10
	testb	%cl, %cl
	je	.L1
	movl	%edx, sz(%rip)
.L1:
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	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
	.cfi_endproc
.LFE23:
	.size	mkprime, .-mkprime
	.p2align 4
	.globl	bsch
	.type	bsch, @function
bsch:
.LFB24:
	.cfi_startproc
	endbr64
	movl	sz(%rip), %ecx
	xorl	%eax, %eax
	leaq	p(%rip), %r8
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L25:
	leal	(%rcx,%rax), %edx
	sarl	%edx
	movslq	%edx, %rsi
	cmpl	%edi, (%r8,%rsi,4)
	jle	.L27
	movl	%edx, %ecx
.L24:
	cmpl	%eax, %ecx
	jg	.L25
	subl	$1, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L27:
	leal	1(%rdx), %eax
	jmp	.L24
	.cfi_endproc
.LFE24:
	.size	bsch, .-bsch
	.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:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%eax, %eax
	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
	leaq	p(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	4(%r12), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	tbl(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	call	mkprime
	.p2align 4,,10
	.p2align 3
.L29:
	xorl	%eax, %eax
	leaq	T(%rip), %rsi
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L42
	movl	T(%rip), %esi
	testl	%esi, %esi
	jle	.L42
	testb	$1, %sil
	jne	.L50
	sarl	%esi
	movq	stdout(%rip), %r8
	subl	$1, %esi
	cmpl	$2, %esi
	jle	.L32
	testb	$1, %sil
	je	.L51
.L32:
	movslq	%esi, %rsi
	movl	$49, %edi
	movsbl	(%rbx,%rsi), %eax
	movq	%r8, %rsi
	subl	%eax, %edi
	call	putc@PLT
.L33:
	movq	stdout(%rip), %rsi
	movl	$10, %edi
	call	putc@PLT
	jmp	.L29
.L50:
	movl	sz(%rip), %r13d
	leaq	p(%rip), %r10
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	.p2align 4,,10
	.p2align 3
.L31:
	movl	(%r10), %edi
	movl	%esi, %r14d
	movl	%r8d, %r11d
	movl	%r13d, %edx
	xorl	%ecx, %ecx
	subl	%edi, %r14d
	sarl	%r14d
	jmp	.L36
	.p2align 4,,10
	.p2align 3
.L37:
	leal	(%rdx,%rcx), %eax
	sarl	%eax
	movslq	%eax, %r15
	cmpl	(%r12,%r15,4), %r14d
	jge	.L52
	movl	%eax, %edx
.L36:
	cmpl	%ecx, %edx
	jg	.L37
	cmpl	%r8d, %ecx
	jle	.L38
	subl	%r11d, %ecx
	movq	%r10, %rdx
	leal	-1(%rcx), %eax
	addq	%r8, %rax
	leaq	0(%rbp,%rax,4), %r14
	.p2align 4,,10
	.p2align 3
.L41:
	movl	(%rdx), %ecx
	movl	%esi, %r11d
	leal	(%rdi,%rcx), %eax
	subl	%eax, %r11d
	cmpl	%r11d, %ecx
	jg	.L39
	cmpl	%eax, %esi
	jle	.L40
	addl	%eax, %eax
	cmpl	%esi, %eax
	jle	.L40
	movslq	%r11d, %r11
	cmpb	$1, (%rbx,%r11)
	adcl	$0, %r9d
.L40:
	addq	$4, %rdx
	cmpq	%r14, %rdx
	jne	.L41
.L39:
	addq	$1, %r8
	addq	$4, %r10
	jmp	.L31
	.p2align 4,,10
	.p2align 3
.L52:
	leal	1(%rax), %ecx
	jmp	.L36
.L38:
	movl	%r9d, %edx
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L29
.L51:
	movq	%r8, %rsi
	movl	$48, %edi
	call	putc@PLT
	jmp	.L33
.L42:
	addq	$8, %rsp
	.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
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	T
	.bss
	.align 4
	.type	T, @object
	.size	T, 4
T:
	.zero	4
	.globl	sz
	.align 4
	.type	sz, @object
	.size	sz, 4
sz:
	.zero	4
	.globl	p
	.data
	.align 32
	.type	p, @object
	.size	p, 13000
p:
	.long	2
	.long	3
	.long	5
	.long	7
	.long	11
	.long	13
	.long	17
	.long	19
	.long	23
	.long	29
	.long	31
	.long	37
	.long	41
	.long	43
	.long	47
	.long	53
	.long	59
	.long	61
	.long	67
	.long	71
	.long	73
	.long	79
	.long	83
	.long	89
	.long	97
	.long	101
	.long	103
	.long	107
	.long	109
	.long	113
	.long	127
	.long	131
	.long	137
	.long	139
	.long	149
	.long	151
	.long	157
	.long	163
	.long	167
	.long	173
	.zero	12840
	.globl	tbl
	.align 32
	.type	tbl, @object
	.size	tbl, 30001
tbl:
	.string	"\001\001"
	.string	""
	.string	""
	.zero	29996
	.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:

// AOJ 2039: Space Coconut Crab II
// 2017.11.6 bal4u@uu

#include <stdio.h>
#define TM 0
#if TM
#include <time.h>
#endif

#define MAX  30000
char tbl[MAX+1] = {1,1,0,0};		// zero: if prime
int p[3250] = {						// p[39] = 173 = sqrt(MAX), max sz = 3245
 2,   3,  5,  7, 11, 13, 17, 19, 23, 29, 
 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 
 73, 79, 83, 89, 97,101,103,107,109,113, 
127,131,137,139,149,151,157,163,167,173 }; int sz;

int T;

void mkprime()
{
	int i, j, k;
	for (i = 0; i <= 39; i++) {
		k = p[i];
		for (j = k<<1; j < MAX; j += k) tbl[j] = 1;
	}
	for (sz = 39, i = 173; i <= MAX; i += 2) if (!tbl[i]) p[sz++] = i;
}

int bsch(int x)
{
	int m, l = 0, r = sz;

    while (l < r) {
        m = (l + r) >> 1;
//		if (p[m] == x) return m;
        if (p[m] <= x) l = m + 1; else r = m;
    }
	return l-1;
}

int main()
{
	int i, j, k, m, ans;
#if TM
	clock_t start, end;
	start = clock();
#endif
	mkprime();
	while (scanf("%d", &T) && T > 0) {
		if (!(T & 1)) {
			k = (T>>1)-1;
			if (k > 2 && !(k & 1)) putchar('0');
			else                   putchar('1' - tbl[k]);
			putchar('\n');
		} else {
			ans = 0;
			for (i = 0; ; i++) {
				m = bsch((T-p[i]) >> 1);
				if (m < i) break;
				for (j = i; j <= m; j++) {
					k = p[i] + p[j];
					if (T-k < p[j]) break;
					if (k < T && (k<<1) > T && !tbl[T-k]) ans++;
				}
			}
			printf("%d\n", ans);
		}
	}
#if TM
	end = clock();
	printf("time %lf\n", (double)(end-start)/CLOCKS_PER_SEC);
#endif
	return 0;
}
10
12
15
777
7180
5000
0
 10
2
15
777
7180
5000
0
 10
1
15
149
7180
5000
0
 10
1
15
149
7180
2901
0
 10
1
15
149
7180
6275
0
 10
1
15
149
7180
10757
0
 10
1
42
149
7180
2924
0
 10
1
42
149
635
3334
0
 10
12
15
777
4999
232
0
 10
12
15
1177
7180
5000
0

0
1
2
110
0
0
 0
0
2
110
0
0
 0
0
2
20
0
0
 0
0
2
20
0
791
 0
0
2
20
0
4041
 0
0
2
20
0
9902
 0
0
0
20
0
0
 0
0
0
20
133
0
 0
1
2
110
2780
0
 0
1
2
277
0
0

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

```c
// AOJ 2039: Space Coconut Crab II
// 2017.11.6 bal4u@uu

#include <stdio.h>
#define TM 0
#if TM
#include <time.h>
#endif

#define MAX  30000
char tbl[MAX+1] = {1,1,0,0};		// zero: if prime
int p[3250] = {						// p[39] = 173 = sqrt(MAX), max sz = 3245
 2,   3,  5,  7, 11, 13, 17, 19, 23, 29, 
 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 
 73, 79, 83, 89, 97,101,103,107,109,113, 
127,131,137,139,149,151,157,163,167,173 }; int sz;

int T;

void mkprime()
{
	int i, j, k;
	for (i = 0; i <= 39; i++) {
		k = p[i];
		for (j = k<<1; j < MAX; j += k) tbl[j] = 1;
	}
	for (sz = 39, i = 173; i <= MAX; i += 2) if (!tbl[i]) p[sz++] = i;
}

int bsch(int x)
{
	int m, l = 0, r = sz;

    while (l < r) {
        m = (l + r) >> 1;
//		if (p[m] == x) return m;
        if (p[m] <= x) l = m + 1; else r = m;
    }
	return l-1;
}

int main()
{
	int i, j, k, m, ans;
#if TM
	clock_t start, end;
	start = clock();
#endif
	mkprime();
	while (scanf("%d", &T) && T > 0) {
		if (!(T & 1)) {
			k = (T>>1)-1;
			if (k > 2 && !(k & 1)) putchar('0');
			else                   putchar('1' - tbl[k]);
			putchar('\n');
		} else {
			ans = 0;
			for (i = 0; ; i++) {
				m = bsch((T-p[i]) >> 1);
				if (m < i) break;
				for (j = i; j <= m; j++) {
					k = p[i] + p[j];
					if (T-k < p[j]) break;
					if (k < T && (k<<1) > T && !tbl[T-k]) ans++;
				}
			}
			printf("%d\n", ans);
		}
	}
#if TM
	end = clock();
	printf("time %lf\n", (double)(end-start)/CLOCKS_PER_SEC);
#endif
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	tbl
	.data
	.align 32
	.type	tbl, @object
	.size	tbl, 30001
tbl:
	.string	"\001\001"
	.string	""
	.string	""
	.zero	29996
	.globl	p
	.align 32
	.type	p, @object
	.size	p, 13000
p:
	.long	2
	.long	3
	.long	5
	.long	7
	.long	11
	.long	13
	.long	17
	.long	19
	.long	23
	.long	29
	.long	31
	.long	37
	.long	41
	.long	43
	.long	47
	.long	53
	.long	59
	.long	61
	.long	67
	.long	71
	.long	73
	.long	79
	.long	83
	.long	89
	.long	97
	.long	101
	.long	103
	.long	107
	.long	109
	.long	113
	.long	127
	.long	131
	.long	137
	.long	139
	.long	149
	.long	151
	.long	157
	.long	163
	.long	167
	.long	173
	.zero	12840
	.globl	sz
	.bss
	.align 4
	.type	sz, @object
	.size	sz, 4
sz:
	.zero	4
	.globl	T
	.align 4
	.type	T, @object
	.size	T, 4
T:
	.zero	4
	.text
	.globl	mkprime
	.type	mkprime, @function
mkprime:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, -12(%rbp)
	jmp	.L2
.L5:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	addl	%eax, %eax
	movl	%eax, -8(%rbp)
	jmp	.L3
.L4:
	movl	-8(%rbp), %eax
	cltq
	leaq	tbl(%rip), %rdx
	movb	$1, (%rax,%rdx)
	movl	-4(%rbp), %eax
	addl	%eax, -8(%rbp)
.L3:
	cmpl	$29999, -8(%rbp)
	jle	.L4
	addl	$1, -12(%rbp)
.L2:
	cmpl	$39, -12(%rbp)
	jle	.L5
	movl	$39, sz(%rip)
	movl	$173, -12(%rbp)
	jmp	.L6
.L8:
	movl	-12(%rbp), %eax
	cltq
	leaq	tbl(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L7
	movl	sz(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, sz(%rip)
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	p(%rip), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L7:
	addl	$2, -12(%rbp)
.L6:
	cmpl	$30000, -12(%rbp)
	jle	.L8
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	mkprime, .-mkprime
	.globl	bsch
	.type	bsch, @function
bsch:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	$0, -12(%rbp)
	movl	sz(%rip), %eax
	movl	%eax, -8(%rbp)
	jmp	.L10
.L12:
	movl	-12(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L11
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
	jmp	.L10
.L11:
	movl	-4(%rbp), %eax
	movl	%eax, -8(%rbp)
.L10:
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jl	.L12
	movl	-12(%rbp), %eax
	subl	$1, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	bsch, .-bsch
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	$0, %eax
	call	mkprime
	jmp	.L15
.L28:
	movl	T(%rip), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L16
	movl	T(%rip), %eax
	sarl	%eax
	subl	$1, %eax
	movl	%eax, -4(%rbp)
	cmpl	$2, -4(%rbp)
	jle	.L17
	movl	-4(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L17
	movl	$48, %edi
	call	putchar@PLT
	jmp	.L18
.L17:
	movl	-4(%rbp), %eax
	cltq
	leaq	tbl(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %edx
	movl	$49, %eax
	subl	%edx, %eax
	movl	%eax, %edi
	call	putchar@PLT
.L18:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L15
.L16:
	movl	$0, -12(%rbp)
	movl	$0, -20(%rbp)
.L26:
	movl	T(%rip), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	p(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	sarl	%eax
	movl	%eax, %edi
	call	bsch
	movl	%eax, -8(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L31
	movl	-20(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L21
.L25:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	movl	%eax, -4(%rbp)
	movl	T(%rip), %eax
	subl	-4(%rbp), %eax
	movl	%eax, %edx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	p(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jl	.L32
	movl	T(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jge	.L24
	movl	-4(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	T(%rip), %eax
	cmpl	%eax, %edx
	jle	.L24
	movl	T(%rip), %eax
	subl	-4(%rbp), %eax
	cltq
	leaq	tbl(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L24
	addl	$1, -12(%rbp)
.L24:
	addl	$1, -16(%rbp)
.L21:
	movl	-16(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jle	.L25
	jmp	.L23
.L32:
	nop
.L23:
	addl	$1, -20(%rbp)
	jmp	.L26
.L31:
	nop
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L15:
	leaq	T(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L27
	movl	T(%rip), %eax
	testl	%eax, %eax
	jg	.L28
.L27:
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	tbl
	.data
	.align 32
	.type	tbl, @object
	.size	tbl, 30001
tbl:
	.string	"\001\001"
	.string	""
	.string	""
	.zero	29996
	.globl	p
	.align 32
	.type	p, @object
	.size	p, 13000
p:
	.long	2
	.long	3
	.long	5
	.long	7
	.long	11
	.long	13
	.long	17
	.long	19
	.long	23
	.long	29
	.long	31
	.long	37
	.long	41
	.long	43
	.long	47
	.long	53
	.long	59
	.long	61
	.long	67
	.long	71
	.long	73
	.long	79
	.long	83
	.long	89
	.long	97
	.long	101
	.long	103
	.long	107
	.long	109
	.long	113
	.long	127
	.long	131
	.long	137
	.long	139
	.long	149
	.long	151
	.long	157
	.long	163
	.long	167
	.long	173
	.zero	12840
	.globl	sz
	.bss
	.align 4
	.type	sz, @object
	.size	sz, 4
sz:
	.zero	4
	.globl	T
	.align 4
	.type	T, @object
	.size	T, 4
T:
	.zero	4
	.text
	.globl	mkprime
	.type	mkprime, @function
mkprime:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, -12(%rbp)
	jmp	.L2
.L5:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	addl	%eax, %eax
	movl	%eax, -8(%rbp)
	jmp	.L3
.L4:
	movl	-8(%rbp), %eax
	cltq
	leaq	tbl(%rip), %rdx
	movb	$1, (%rax,%rdx)
	movl	-4(%rbp), %eax
	addl	%eax, -8(%rbp)
.L3:
	cmpl	$29999, -8(%rbp)
	jle	.L4
	addl	$1, -12(%rbp)
.L2:
	cmpl	$39, -12(%rbp)
	jle	.L5
	movl	$39, sz(%rip)
	movl	$173, -12(%rbp)
	jmp	.L6
.L8:
	movl	-12(%rbp), %eax
	cltq
	leaq	tbl(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L7
	movl	sz(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, sz(%rip)
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	p(%rip), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L7:
	addl	$2, -12(%rbp)
.L6:
	cmpl	$30000, -12(%rbp)
	jle	.L8
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	mkprime, .-mkprime
	.globl	bsch
	.type	bsch, @function
bsch:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	$0, -12(%rbp)
	movl	sz(%rip), %eax
	movl	%eax, -8(%rbp)
	jmp	.L10
.L12:
	movl	-12(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L11
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
	jmp	.L10
.L11:
	movl	-4(%rbp), %eax
	movl	%eax, -8(%rbp)
.L10:
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jl	.L12
	movl	-12(%rbp), %eax
	subl	$1, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	bsch, .-bsch
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	$0, %eax
	call	mkprime
	jmp	.L15
.L28:
	movl	T(%rip), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L16
	movl	T(%rip), %eax
	sarl	%eax
	subl	$1, %eax
	movl	%eax, -4(%rbp)
	cmpl	$2, -4(%rbp)
	jle	.L17
	movl	-4(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L17
	movl	$48, %edi
	call	putchar@PLT
	jmp	.L18
.L17:
	movl	-4(%rbp), %eax
	cltq
	leaq	tbl(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %edx
	movl	$49, %eax
	subl	%edx, %eax
	movl	%eax, %edi
	call	putchar@PLT
.L18:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L15
.L16:
	movl	$0, -12(%rbp)
	movl	$0, -20(%rbp)
.L26:
	movl	T(%rip), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	p(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	sarl	%eax
	movl	%eax, %edi
	call	bsch
	movl	%eax, -8(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L31
	movl	-20(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L21
.L25:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	movl	%eax, -4(%rbp)
	movl	T(%rip), %eax
	subl	-4(%rbp), %eax
	movl	%eax, %edx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	p(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jl	.L32
	movl	T(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jge	.L24
	movl	-4(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	T(%rip), %eax
	cmpl	%eax, %edx
	jle	.L24
	movl	T(%rip), %eax
	subl	-4(%rbp), %eax
	cltq
	leaq	tbl(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L24
	addl	$1, -12(%rbp)
.L24:
	addl	$1, -16(%rbp)
.L21:
	movl	-16(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jle	.L25
	jmp	.L23
.L32:
	nop
.L23:
	addl	$1, -20(%rbp)
	jmp	.L26
.L31:
	nop
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L15:
	leaq	T(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L27
	movl	T(%rip), %eax
	testl	%eax, %eax
	jg	.L28
.L27:
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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:
