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

```c
/*
  AOJ 1276
  Title:Prime Gap
  @kankichi573
*/
#include <stdio.h>
#include <string.h>

char prime_flag[65536];

int prime256[]={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,179,181,191,193,197,199,211,223,227,229,233,239,
241,251};

make_furui()
{
        int i,j,num;
        memset(prime_flag,-1,65536);
        
        prime_flag[0]=prime_flag[1]=0;

        for(i=0;prime256[i];i++)
                for(j=2;(num=prime256[i]*j)<65536;j++)
                        prime_flag[num]=0;
}
int isprime32(unsigned int n)
{
        int i;
        for(i=2;i<65536;i++)
                if(prime_flag[i] && 0==(n % i) && (n > i))
                        return(0);
        return(1);
}

main()
{
  int n,m;
  make_furui();
  while(scanf("%d",&n) && n)
    {
      if(isprime32(n))
	{
	  printf("0\n");
	  continue;
	}
      m=n;
      while(!isprime32(n))
	n++;
      while(!isprime32(m))
	m--;
      printf("%d\n",n-m);
    }
  return(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	prime_flag
	.bss
	.align 32
	.type	prime_flag, @object
	.size	prime_flag, 65536
prime_flag:
	.zero	65536
	.globl	prime256
	.data
	.align 32
	.type	prime256, @object
	.size	prime256, 216
prime256:
	.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
	.long	179
	.long	181
	.long	191
	.long	193
	.long	197
	.long	199
	.long	211
	.long	223
	.long	227
	.long	229
	.long	233
	.long	239
	.long	241
	.long	251
	.text
	.globl	make_furui
	.type	make_furui, @function
make_furui:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$65536, %edx
	movl	$-1, %esi
	leaq	prime_flag(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movb	$0, 1+prime_flag(%rip)
	movzbl	1+prime_flag(%rip), %eax
	movb	%al, prime_flag(%rip)
	movl	$0, -12(%rbp)
	jmp	.L2
.L5:
	movl	$2, -8(%rbp)
	jmp	.L3
.L4:
	movl	-4(%rbp), %eax
	cltq
	leaq	prime_flag(%rip), %rdx
	movb	$0, (%rax,%rdx)
	addl	$1, -8(%rbp)
.L3:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	prime256(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	imull	%edx, %eax
	movl	%eax, -4(%rbp)
	cmpl	$65535, -4(%rbp)
	jle	.L4
	addl	$1, -12(%rbp)
.L2:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	prime256(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L5
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	make_furui, .-make_furui
	.globl	isprime32
	.type	isprime32, @function
isprime32:
.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	$2, -4(%rbp)
	jmp	.L7
.L10:
	movl	-4(%rbp), %eax
	cltq
	leaq	prime_flag(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	je	.L8
	movl	-4(%rbp), %ecx
	movl	-20(%rbp), %eax
	movl	$0, %edx
	divl	%ecx
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L8
	movl	-4(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jbe	.L8
	movl	$0, %eax
	jmp	.L9
.L8:
	addl	$1, -4(%rbp)
.L7:
	cmpl	$65535, -4(%rbp)
	jle	.L10
	movl	$1, %eax
.L9:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	isprime32, .-isprime32
	.section	.rodata
.LC0:
	.string	"0"
.LC1:
	.string	"%d\n"
.LC2:
	.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	$16, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, %eax
	call	make_furui
	jmp	.L12
.L19:
	movl	-16(%rbp), %eax
	movl	%eax, %edi
	call	isprime32
	testl	%eax, %eax
	je	.L13
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L12
.L13:
	movl	-16(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L14
.L15:
	movl	-16(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -16(%rbp)
.L14:
	movl	-16(%rbp), %eax
	movl	%eax, %edi
	call	isprime32
	testl	%eax, %eax
	je	.L15
	jmp	.L16
.L17:
	subl	$1, -12(%rbp)
.L16:
	movl	-12(%rbp), %eax
	movl	%eax, %edi
	call	isprime32
	testl	%eax, %eax
	je	.L17
	movl	-16(%rbp), %eax
	subl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L12:
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L18
	movl	-16(%rbp), %eax
	testl	%eax, %eax
	jne	.L19
.L18:
	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
.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	make_furui
	.type	make_furui, @function
make_furui:
.LFB35:
	.cfi_startproc
	endbr64
	movl	$65536, %edx
	movl	$-1, %esi
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	leaq	prime_flag(%rip), %rdi
	call	memset@PLT
	movslq	prime256(%rip), %rsi
	xorl	%edx, %edx
	movw	%dx, prime_flag(%rip)
	testl	%esi, %esi
	je	.L2
	movq	%rax, %rdi
	leaq	4+prime256(%rip), %r8
	.p2align 4,,10
	.p2align 3
.L3:
	leal	(%rsi,%rsi), %ecx
	cmpl	$65535, %ecx
	jg	.L6
	movl	$2, %edx
	movl	$2, %eax
	cmpl	$1, %esi
	je	.L4
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L9:
	movslq	%eax, %rdx
.L4:
	addl	$1, %eax
	movb	$0, (%rdi,%rdx)
	cmpl	$65536, %eax
	jne	.L9
.L6:
	movslq	(%r8), %rsi
	addq	$4, %r8
	testl	%esi, %esi
	jne	.L3
.L2:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_restore_state
	movslq	%ecx, %rax
	.p2align 4,,10
	.p2align 3
.L5:
	movb	$0, (%rdi,%rax)
	addq	%rsi, %rax
	cmpl	$65535, %eax
	jle	.L5
	movslq	(%r8), %rsi
	addq	$4, %r8
	testl	%esi, %esi
	jne	.L3
	jmp	.L2
	.cfi_endproc
.LFE35:
	.size	make_furui, .-make_furui
	.p2align 4
	.globl	isprime32
	.type	isprime32, @function
isprime32:
.LFB36:
	.cfi_startproc
	endbr64
	movl	$2, %ecx
	leaq	prime_flag(%rip), %rsi
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L23:
	addq	$1, %rcx
	cmpq	$65536, %rcx
	je	.L32
.L26:
	cmpb	$0, (%rsi,%rcx)
	je	.L23
	movl	%edi, %eax
	xorl	%edx, %edx
	divl	%ecx
	testl	%edx, %edx
	jne	.L23
	cmpl	%ecx, %edi
	jbe	.L23
	xorl	%eax, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L32:
	movl	$1, %eax
	ret
	.cfi_endproc
.LFE36:
	.size	isprime32, .-isprime32
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"0"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB37:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	prime_flag(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	.LC2(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	.LC0(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rbp
	call	make_furui
.L34:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L49
	movl	4(%rsp), %edi
	testl	%edi, %edi
	je	.L49
	movl	%edi, %esi
	movl	$2, %ecx
	jmp	.L38
	.p2align 4,,10
	.p2align 3
.L35:
	addq	$1, %rcx
	cmpq	$65536, %rcx
	je	.L74
.L38:
	cmpb	$0, (%r14,%rcx)
	je	.L35
	movl	%edi, %eax
	xorl	%edx, %edx
	divl	%ecx
	testl	%edx, %edx
	jne	.L35
	cmpl	%ecx, %edi
	jbe	.L35
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L36:
	movl	$2, %ecx
	jmp	.L42
	.p2align 4,,10
	.p2align 3
.L40:
	addq	$1, %rcx
	cmpq	$65536, %rcx
	je	.L75
.L42:
	cmpb	$0, (%r14,%rcx)
	je	.L40
	xorl	%edx, %edx
	movl	%esi, %eax
	divl	%ecx
	testl	%edx, %edx
	sete	%al
	cmpl	%esi, %ecx
	setb	%dl
	andb	%dl, %al
	je	.L40
	addl	$1, %esi
	movl	%eax, %r8d
	jmp	.L36
.L75:
	testb	%r8b, %r8b
	je	.L51
	movl	%esi, 4(%rsp)
.L51:
	movl	$2, %ecx
	jmp	.L47
	.p2align 4,,10
	.p2align 3
.L44:
	addq	$1, %rcx
	cmpq	$65536, %rcx
	je	.L76
.L47:
	cmpb	$0, (%r14,%rcx)
	je	.L44
	movl	%edi, %eax
	xorl	%edx, %edx
	divl	%ecx
	testl	%edx, %edx
	jne	.L44
	cmpl	%ecx, %edi
	jbe	.L44
	subl	$1, %edi
	jmp	.L51
	.p2align 4,,10
	.p2align 3
.L76:
	subl	%edi, %esi
	xorl	%eax, %eax
	movl	$1, %edi
	movl	%esi, %edx
	movq	%r12, %rsi
	call	__printf_chk@PLT
	jmp	.L34
.L74:
	movq	%r13, %rdi
	call	puts@PLT
	jmp	.L34
.L49:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L77
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L77:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE37:
	.size	main, .-main
	.globl	prime256
	.data
	.align 32
	.type	prime256, @object
	.size	prime256, 216
prime256:
	.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
	.long	179
	.long	181
	.long	191
	.long	193
	.long	197
	.long	199
	.long	211
	.long	223
	.long	227
	.long	229
	.long	233
	.long	239
	.long	241
	.long	251
	.globl	prime_flag
	.bss
	.align 32
	.type	prime_flag, @object
	.size	prime_flag, 65536
prime_flag:
	.zero	65536
	.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	make_furui
	.type	make_furui, @function
make_furui:
.LFB35:
	.cfi_startproc
	endbr64
	movl	$65536, %edx
	movl	$-1, %esi
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	leaq	prime_flag(%rip), %rdi
	call	memset@PLT
	movslq	prime256(%rip), %rsi
	xorl	%edx, %edx
	movw	%dx, prime_flag(%rip)
	testl	%esi, %esi
	je	.L2
	movq	%rax, %rdi
	leaq	4+prime256(%rip), %r8
	.p2align 4,,10
	.p2align 3
.L3:
	leal	(%rsi,%rsi), %ecx
	cmpl	$65535, %ecx
	jg	.L6
	movl	$2, %edx
	movl	$2, %eax
	cmpl	$1, %esi
	je	.L4
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L9:
	movslq	%eax, %rdx
.L4:
	addl	$1, %eax
	movb	$0, (%rdi,%rdx)
	cmpl	$65536, %eax
	jne	.L9
.L6:
	movslq	(%r8), %rsi
	addq	$4, %r8
	testl	%esi, %esi
	jne	.L3
.L2:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_restore_state
	movslq	%ecx, %rax
	.p2align 4,,10
	.p2align 3
.L5:
	movb	$0, (%rdi,%rax)
	addq	%rsi, %rax
	cmpl	$65535, %eax
	jle	.L5
	movslq	(%r8), %rsi
	addq	$4, %r8
	testl	%esi, %esi
	jne	.L3
	jmp	.L2
	.cfi_endproc
.LFE35:
	.size	make_furui, .-make_furui
	.p2align 4
	.globl	isprime32
	.type	isprime32, @function
isprime32:
.LFB36:
	.cfi_startproc
	endbr64
	movl	$2, %ecx
	leaq	prime_flag(%rip), %rsi
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L23:
	addq	$1, %rcx
	cmpq	$65536, %rcx
	je	.L32
.L26:
	cmpb	$0, (%rsi,%rcx)
	je	.L23
	movl	%edi, %eax
	xorl	%edx, %edx
	divl	%ecx
	testl	%edx, %edx
	jne	.L23
	cmpl	%ecx, %edi
	jbe	.L23
	xorl	%eax, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L32:
	movl	$1, %eax
	ret
	.cfi_endproc
.LFE36:
	.size	isprime32, .-isprime32
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"0"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB37:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	prime_flag(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	.LC2(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	.LC0(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rbp
	call	make_furui
.L34:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L49
	movl	4(%rsp), %edi
	testl	%edi, %edi
	je	.L49
	movl	%edi, %esi
	movl	$2, %ecx
	jmp	.L38
	.p2align 4,,10
	.p2align 3
.L35:
	addq	$1, %rcx
	cmpq	$65536, %rcx
	je	.L74
.L38:
	cmpb	$0, (%r14,%rcx)
	je	.L35
	movl	%edi, %eax
	xorl	%edx, %edx
	divl	%ecx
	testl	%edx, %edx
	jne	.L35
	cmpl	%ecx, %edi
	jbe	.L35
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L36:
	movl	$2, %ecx
	jmp	.L42
	.p2align 4,,10
	.p2align 3
.L40:
	addq	$1, %rcx
	cmpq	$65536, %rcx
	je	.L75
.L42:
	cmpb	$0, (%r14,%rcx)
	je	.L40
	xorl	%edx, %edx
	movl	%esi, %eax
	divl	%ecx
	testl	%edx, %edx
	sete	%al
	cmpl	%esi, %ecx
	setb	%dl
	andb	%dl, %al
	je	.L40
	addl	$1, %esi
	movl	%eax, %r8d
	jmp	.L36
.L75:
	testb	%r8b, %r8b
	je	.L51
	movl	%esi, 4(%rsp)
.L51:
	movl	$2, %ecx
	jmp	.L47
	.p2align 4,,10
	.p2align 3
.L44:
	addq	$1, %rcx
	cmpq	$65536, %rcx
	je	.L76
.L47:
	cmpb	$0, (%r14,%rcx)
	je	.L44
	movl	%edi, %eax
	xorl	%edx, %edx
	divl	%ecx
	testl	%edx, %edx
	jne	.L44
	cmpl	%ecx, %edi
	jbe	.L44
	subl	$1, %edi
	jmp	.L51
	.p2align 4,,10
	.p2align 3
.L76:
	subl	%edi, %esi
	xorl	%eax, %eax
	movl	$1, %edi
	movl	%esi, %edx
	movq	%r12, %rsi
	call	__printf_chk@PLT
	jmp	.L34
.L74:
	movq	%r13, %rdi
	call	puts@PLT
	jmp	.L34
.L49:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L77
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L77:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE37:
	.size	main, .-main
	.globl	prime256
	.data
	.align 32
	.type	prime256, @object
	.size	prime256, 216
prime256:
	.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
	.long	179
	.long	181
	.long	191
	.long	193
	.long	197
	.long	199
	.long	211
	.long	223
	.long	227
	.long	229
	.long	233
	.long	239
	.long	241
	.long	251
	.globl	prime_flag
	.bss
	.align 32
	.type	prime_flag, @object
	.size	prime_flag, 65536
prime_flag:
	.zero	65536
	.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 1276
  Title:Prime Gap
  @kankichi573
*/
#include <stdio.h>
#include <string.h>

char prime_flag[65536];

int prime256[]={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,179,181,191,193,197,199,211,223,227,229,233,239,
241,251};

make_furui()
{
        int i,j,num;
        memset(prime_flag,-1,65536);
        
        prime_flag[0]=prime_flag[1]=0;

        for(i=0;prime256[i];i++)
                for(j=2;(num=prime256[i]*j)<65536;j++)
                        prime_flag[num]=0;
}
int isprime32(unsigned int n)
{
        int i;
        for(i=2;i<65536;i++)
                if(prime_flag[i] && 0==(n % i) && (n > i))
                        return(0);
        return(1);
}

main()
{
  int n,m;
  make_furui();
  while(scanf("%d",&n) && n)
    {
      if(isprime32(n))
	{
	  printf("0\n");
	  continue;
	}
      m=n;
      while(!isprime32(n))
	n++;
      while(!isprime32(m))
	m--;
      printf("%d\n",n-m);
    }
  return(0);
}
10
11
27
2
296421
0
 10
11
27
2
338424
0
 10
11
27
2
525306
0
 10
11
27
2
245198
0
 10
11
27
2
199792
0
 10
11
47
2
199792
0
 10
15
55
2
199792
0
 10
15
55
2
76071
0
 10
11
53
2
338424
0
 10
0
27
2
199792
0

4
0
6
0
60
 4
0
6
0
8
 4
0
6
0
14
 4
0
6
0
26
 4
0
6
0
16
 4
0
0
0
16
 4
4
6
0
16
 4
4
6
0
40
 4
0
0
0
8
 4

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

```c
/*
  AOJ 1276
  Title:Prime Gap
  @kankichi573
*/
#include <stdio.h>
#include <string.h>

char prime_flag[65536];

int prime256[]={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,179,181,191,193,197,199,211,223,227,229,233,239,
241,251};

make_furui()
{
        int i,j,num;
        memset(prime_flag,-1,65536);
        
        prime_flag[0]=prime_flag[1]=0;

        for(i=0;prime256[i];i++)
                for(j=2;(num=prime256[i]*j)<65536;j++)
                        prime_flag[num]=0;
}
int isprime32(unsigned int n)
{
        int i;
        for(i=2;i<65536;i++)
                if(prime_flag[i] && 0==(n % i) && (n > i))
                        return(0);
        return(1);
}

main()
{
  int n,m;
  make_furui();
  while(scanf("%d",&n) && n)
    {
      if(isprime32(n))
	{
	  printf("0\n");
	  continue;
	}
      m=n;
      while(!isprime32(n))
	n++;
      while(!isprime32(m))
	m--;
      printf("%d\n",n-m);
    }
  return(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	prime_flag
	.bss
	.align 32
	.type	prime_flag, @object
	.size	prime_flag, 65536
prime_flag:
	.zero	65536
	.globl	prime256
	.data
	.align 32
	.type	prime256, @object
	.size	prime256, 216
prime256:
	.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
	.long	179
	.long	181
	.long	191
	.long	193
	.long	197
	.long	199
	.long	211
	.long	223
	.long	227
	.long	229
	.long	233
	.long	239
	.long	241
	.long	251
	.text
	.globl	make_furui
	.type	make_furui, @function
make_furui:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$65536, %edx
	movl	$-1, %esi
	leaq	prime_flag(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movb	$0, 1+prime_flag(%rip)
	movzbl	1+prime_flag(%rip), %eax
	movb	%al, prime_flag(%rip)
	movl	$0, -12(%rbp)
	jmp	.L2
.L5:
	movl	$2, -8(%rbp)
	jmp	.L3
.L4:
	movl	-4(%rbp), %eax
	cltq
	leaq	prime_flag(%rip), %rdx
	movb	$0, (%rax,%rdx)
	addl	$1, -8(%rbp)
.L3:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	prime256(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	imull	%edx, %eax
	movl	%eax, -4(%rbp)
	cmpl	$65535, -4(%rbp)
	jle	.L4
	addl	$1, -12(%rbp)
.L2:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	prime256(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L5
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	make_furui, .-make_furui
	.globl	isprime32
	.type	isprime32, @function
isprime32:
.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	$2, -4(%rbp)
	jmp	.L7
.L10:
	movl	-4(%rbp), %eax
	cltq
	leaq	prime_flag(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	je	.L8
	movl	-4(%rbp), %ecx
	movl	-20(%rbp), %eax
	movl	$0, %edx
	divl	%ecx
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L8
	movl	-4(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jbe	.L8
	movl	$0, %eax
	jmp	.L9
.L8:
	addl	$1, -4(%rbp)
.L7:
	cmpl	$65535, -4(%rbp)
	jle	.L10
	movl	$1, %eax
.L9:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	isprime32, .-isprime32
	.section	.rodata
.LC0:
	.string	"0"
.LC1:
	.string	"%d\n"
.LC2:
	.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	$16, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, %eax
	call	make_furui
	jmp	.L12
.L19:
	movl	-16(%rbp), %eax
	movl	%eax, %edi
	call	isprime32
	testl	%eax, %eax
	je	.L13
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L12
.L13:
	movl	-16(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L14
.L15:
	movl	-16(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -16(%rbp)
.L14:
	movl	-16(%rbp), %eax
	movl	%eax, %edi
	call	isprime32
	testl	%eax, %eax
	je	.L15
	jmp	.L16
.L17:
	subl	$1, -12(%rbp)
.L16:
	movl	-12(%rbp), %eax
	movl	%eax, %edi
	call	isprime32
	testl	%eax, %eax
	je	.L17
	movl	-16(%rbp), %eax
	subl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L12:
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L18
	movl	-16(%rbp), %eax
	testl	%eax, %eax
	jne	.L19
.L18:
	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
.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	prime_flag
	.bss
	.align 32
	.type	prime_flag, @object
	.size	prime_flag, 65536
prime_flag:
	.zero	65536
	.globl	prime256
	.data
	.align 32
	.type	prime256, @object
	.size	prime256, 216
prime256:
	.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
	.long	179
	.long	181
	.long	191
	.long	193
	.long	197
	.long	199
	.long	211
	.long	223
	.long	227
	.long	229
	.long	233
	.long	239
	.long	241
	.long	251
	.text
	.globl	make_furui
	.type	make_furui, @function
make_furui:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$65536, %edx
	movl	$-1, %esi
	leaq	prime_flag(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movb	$0, 1+prime_flag(%rip)
	movzbl	1+prime_flag(%rip), %eax
	movb	%al, prime_flag(%rip)
	movl	$0, -12(%rbp)
	jmp	.L2
.L5:
	movl	$2, -8(%rbp)
	jmp	.L3
.L4:
	movl	-4(%rbp), %eax
	cltq
	leaq	prime_flag(%rip), %rdx
	movb	$0, (%rax,%rdx)
	addl	$1, -8(%rbp)
.L3:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	prime256(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	imull	%edx, %eax
	movl	%eax, -4(%rbp)
	cmpl	$65535, -4(%rbp)
	jle	.L4
	addl	$1, -12(%rbp)
.L2:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	prime256(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L5
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	make_furui, .-make_furui
	.globl	isprime32
	.type	isprime32, @function
isprime32:
.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	$2, -4(%rbp)
	jmp	.L7
.L10:
	movl	-4(%rbp), %eax
	cltq
	leaq	prime_flag(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	je	.L8
	movl	-4(%rbp), %ecx
	movl	-20(%rbp), %eax
	movl	$0, %edx
	divl	%ecx
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L8
	movl	-4(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jbe	.L8
	movl	$0, %eax
	jmp	.L9
.L8:
	addl	$1, -4(%rbp)
.L7:
	cmpl	$65535, -4(%rbp)
	jle	.L10
	movl	$1, %eax
.L9:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	isprime32, .-isprime32
	.section	.rodata
.LC0:
	.string	"0"
.LC1:
	.string	"%d\n"
.LC2:
	.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	$16, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, %eax
	call	make_furui
	jmp	.L12
.L19:
	movl	-16(%rbp), %eax
	movl	%eax, %edi
	call	isprime32
	testl	%eax, %eax
	je	.L13
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L12
.L13:
	movl	-16(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L14
.L15:
	movl	-16(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -16(%rbp)
.L14:
	movl	-16(%rbp), %eax
	movl	%eax, %edi
	call	isprime32
	testl	%eax, %eax
	je	.L15
	jmp	.L16
.L17:
	subl	$1, -12(%rbp)
.L16:
	movl	-12(%rbp), %eax
	movl	%eax, %edi
	call	isprime32
	testl	%eax, %eax
	je	.L17
	movl	-16(%rbp), %eax
	subl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L12:
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L18
	movl	-16(%rbp), %eax
	testl	%eax, %eax
	jne	.L19
.L18:
	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
.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:
