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>
#include<string.h>
int n;
int array[300000];
int main(void){
    int p[300000]={0};
    int size=0;
    array[0]=6;
    for(int i=1;;i++){
        array[i*2-1]=7*i+1;
        array[i*2]=7*i+6;
        size=2*i;
        if(array[i*2]>300000) break;
    }
    for(int i=0;i<=size;i++){
        if(p[array[i]]==1) continue;
        for(int j=2*array[i];j<300000;j+=array[i]){
            p[j]=1;
        }
    }
    while(1){
        int i;
        scanf("%d",&n);
        if(n==1) break;
        int judge[300000]={0};
        for(i=0;array[i]<=n;i++){
            if(!p[array[i]]&&n%array[i]==0){
                judge[i]=1;
            }
        }
        printf("%d:",n);
        for(int j=0;j<=i;j++)
            if(judge[j]==1)
                printf(" %d",array[j]);
        puts("");
    }
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	array
	.align 32
	.type	array, @object
	.size	array, 1200000
array:
	.zero	1200000
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d:"
.LC2:
	.string	" %d"
.LC3:
	.string	""
	.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	-2396160(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3888, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-2400016(%rbp), %rax
	movl	$1200000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -2400020(%rbp)
	movl	$6, array(%rip)
	movl	$1, -2400040(%rbp)
.L4:
	movl	-2400040(%rbp), %edx
	movl	%edx, %eax
	sall	$3, %eax
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-2400040(%rbp), %eax
	addl	%eax, %eax
	subl	$1, %eax
	addl	$1, %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	array(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-2400040(%rbp), %edx
	movl	%edx, %eax
	sall	$3, %eax
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-2400040(%rbp), %eax
	addl	%eax, %eax
	addl	$6, %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	array(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-2400040(%rbp), %eax
	addl	%eax, %eax
	movl	%eax, -2400020(%rbp)
	movl	-2400040(%rbp), %eax
	addl	%eax, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	array(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$300000, %eax
	jg	.L23
	addl	$1, -2400040(%rbp)
	jmp	.L4
.L23:
	nop
	movl	$0, -2400036(%rbp)
	jmp	.L5
.L10:
	movl	-2400036(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	array(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	movl	-2400016(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	je	.L24
	movl	-2400036(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	array(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, %eax
	movl	%eax, -2400032(%rbp)
	jmp	.L8
.L9:
	movl	-2400032(%rbp), %eax
	cltq
	movl	$1, -2400016(%rbp,%rax,4)
	movl	-2400036(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	array(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, -2400032(%rbp)
.L8:
	cmpl	$299999, -2400032(%rbp)
	jle	.L9
	jmp	.L7
.L24:
	nop
.L7:
	addl	$1, -2400036(%rbp)
.L5:
	movl	-2400036(%rbp), %eax
	cmpl	-2400020(%rbp), %eax
	jle	.L10
.L19:
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	cmpl	$1, %eax
	jne	.L11
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	jmp	.L22
.L11:
	leaq	-1200016(%rbp), %rax
	movl	$1200000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -2400028(%rbp)
	jmp	.L13
.L15:
	movl	-2400028(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	array(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	movl	-2400016(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L14
	movl	n(%rip), %eax
	movl	-2400028(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	array(%rip), %rdx
	movl	(%rcx,%rdx), %ecx
	cltd
	idivl	%ecx
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L14
	movl	-2400028(%rbp), %eax
	cltq
	movl	$1, -1200016(%rbp,%rax,4)
.L14:
	addl	$1, -2400028(%rbp)
.L13:
	movl	-2400028(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	array(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jle	.L15
	movl	n(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -2400024(%rbp)
	jmp	.L16
.L18:
	movl	-2400024(%rbp), %eax
	cltq
	movl	-1200016(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	jne	.L17
	movl	-2400024(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	array(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L17:
	addl	$1, -2400024(%rbp)
.L16:
	movl	-2400024(%rbp), %eax
	cmpl	-2400028(%rbp), %eax
	jle	.L18
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L19
.L22:
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC5:
	.string	"%d"
.LC6:
	.string	"%d:"
.LC7:
	.string	" %d"
.LC8:
	.string	""
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-2396160(%rsp), %r11
	.cfi_def_cfa 11, 2396216
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3864, %rsp
	.cfi_def_cfa_offset 2400080
	movl	$1200000, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 2400008(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %r9
	movq	%r9, %rdi
	call	memset@PLT
	movdqa	.LC0(%rip), %xmm1
	movl	$13, 8+array(%rip)
	movq	%rax, %r9
	movq	.LC1(%rip), %rax
	movdqa	.LC2(%rip), %xmm3
	movdqa	.LC3(%rip), %xmm5
	movdqa	.LC4(%rip), %xmm4
	movq	%rax, array(%rip)
	leaq	12+array(%rip), %rax
	leaq	-12(%rax), %rbp
	leaq	342848(%rax), %rdx
	movq	%rbp, %rsi
	.p2align 4,,10
	.p2align 3
.L2:
	movdqa	%xmm1, %xmm2
	addq	$16, %rax
	paddd	%xmm4, %xmm1
	paddd	%xmm3, %xmm2
	movdqa	%xmm2, %xmm0
	pslld	$3, %xmm0
	psubd	%xmm2, %xmm0
	paddd	%xmm5, %xmm0
	movups	%xmm0, -16(%rax)
	cmpq	%rdx, %rax
	jne	.L2
	xorl	%eax, %eax
	leaq	1199992(%rsp), %r8
	movabsq	$4294967297, %r10
	.p2align 4,,10
	.p2align 3
.L10:
	cmpl	$1, %eax
	je	.L6
	movslq	(%rsi), %rdi
	leal	(%rdi,%rdi), %ecx
	cmpl	$299999, %ecx
	jg	.L6
	leaq	8(%rsp), %rax
	cmpl	$1, %edi
	jne	.L28
	.p2align 4,,10
	.p2align 3
.L9:
	movups	%xmm3, (%rax)
	addq	$16, %rax
	cmpq	%r8, %rax
	jne	.L9
	movq	%r10, 1199992(%rsp)
.L6:
	addq	$4, %rsi
	cmpq	%rdx, %rsi
	je	.L29
	movslq	(%rsi), %rax
	movl	(%rsp,%rax,4), %eax
	jmp	.L10
.L29:
	leaq	-4+array(%rip), %rbx
	leaq	.LC7(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	n(%rip), %rsi
	leaq	.LC5(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %r15d
	cmpl	$1, %r15d
	je	.L11
	leaq	1200000(%rsp), %r14
	xorl	%esi, %esi
	movl	$1200000, %edx
	movq	%r14, %rdi
	call	memset@PLT
	movl	0(%rbp), %esi
	cmpl	%esi, %r15d
	jl	.L18
	movl	$1, %ecx
	.p2align 4,,10
	.p2align 3
.L14:
	movslq	%esi, %rax
	movl	(%rsp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L13
	movl	%r15d, %eax
	cltd
	idivl	%esi
	testl	%edx, %edx
	jne	.L13
	movl	$1, -4(%r14,%rcx,4)
.L13:
	movl	%ecx, %r13d
	addq	$1, %rcx
	movl	(%rbx,%rcx,4), %esi
	cmpl	%esi, %r15d
	jge	.L14
.L12:
	movl	%r15d, %edx
	leaq	.LC6(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leal	1(%r13), %r8d
	xorl	%r15d, %r15d
	movslq	%r8d, %r8
	leaq	0(,%r8,4), %r13
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L15:
	addq	$4, %r15
	cmpq	%r13, %r15
	je	.L30
.L16:
	cmpl	$1, (%r14,%r15)
	jne	.L15
	movl	0(%rbp,%r15), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %r15
	call	__printf_chk@PLT
	cmpq	%r13, %r15
	jne	.L16
.L30:
	leaq	.LC8(%rip), %rdi
	call	puts@PLT
	jmp	.L5
.L11:
	movq	2400008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$2400024, %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
.L18:
	.cfi_restore_state
	xorl	%r13d, %r13d
	jmp	.L12
.L28:
	movslq	%ecx, %rax
	.p2align 4,,10
	.p2align 3
.L8:
	movl	$1, (%r9,%rax,4)
	addq	%rdi, %rax
	cmpl	$299999, %eax
	jle	.L8
	jmp	.L6
.L31:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	array
	.bss
	.align 32
	.type	array, @object
	.size	array, 1200000
array:
	.zero	1200000
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	1
	.long	2
	.long	2
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	6
	.long	8
	.section	.rodata.cst16
	.align 16
.LC2:
	.long	1
	.long	1
	.long	1
	.long	1
	.align 16
.LC3:
	.long	1
	.long	6
	.long	1
	.long	6
	.align 16
.LC4:
	.long	2
	.long	2
	.long	2
	.long	2
	.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
.LC5:
	.string	"%d"
.LC6:
	.string	"%d:"
.LC7:
	.string	" %d"
.LC8:
	.string	""
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-2396160(%rsp), %r11
	.cfi_def_cfa 11, 2396216
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3864, %rsp
	.cfi_def_cfa_offset 2400080
	movl	$1200000, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 2400008(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %r9
	movq	%r9, %rdi
	call	memset@PLT
	movdqa	.LC0(%rip), %xmm1
	movl	$13, 8+array(%rip)
	movq	%rax, %r9
	movq	.LC1(%rip), %rax
	movdqa	.LC2(%rip), %xmm3
	movdqa	.LC3(%rip), %xmm5
	movdqa	.LC4(%rip), %xmm4
	movq	%rax, array(%rip)
	leaq	12+array(%rip), %rax
	leaq	-12(%rax), %rbp
	leaq	342848(%rax), %rdx
	movq	%rbp, %rsi
	.p2align 4,,10
	.p2align 3
.L2:
	movdqa	%xmm1, %xmm2
	addq	$16, %rax
	paddd	%xmm4, %xmm1
	paddd	%xmm3, %xmm2
	movdqa	%xmm2, %xmm0
	pslld	$3, %xmm0
	psubd	%xmm2, %xmm0
	paddd	%xmm5, %xmm0
	movups	%xmm0, -16(%rax)
	cmpq	%rdx, %rax
	jne	.L2
	xorl	%eax, %eax
	leaq	1199992(%rsp), %r8
	movabsq	$4294967297, %r10
	.p2align 4,,10
	.p2align 3
.L10:
	cmpl	$1, %eax
	je	.L6
	movslq	(%rsi), %rdi
	leal	(%rdi,%rdi), %ecx
	cmpl	$299999, %ecx
	jg	.L6
	leaq	8(%rsp), %rax
	cmpl	$1, %edi
	jne	.L28
	.p2align 4,,10
	.p2align 3
.L9:
	movups	%xmm3, (%rax)
	addq	$16, %rax
	cmpq	%r8, %rax
	jne	.L9
	movq	%r10, 1199992(%rsp)
.L6:
	addq	$4, %rsi
	cmpq	%rdx, %rsi
	je	.L29
	movslq	(%rsi), %rax
	movl	(%rsp,%rax,4), %eax
	jmp	.L10
.L29:
	leaq	-4+array(%rip), %rbx
	leaq	.LC7(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	n(%rip), %rsi
	leaq	.LC5(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %r15d
	cmpl	$1, %r15d
	je	.L11
	leaq	1200000(%rsp), %r14
	xorl	%esi, %esi
	movl	$1200000, %edx
	movq	%r14, %rdi
	call	memset@PLT
	movl	0(%rbp), %esi
	cmpl	%esi, %r15d
	jl	.L18
	movl	$1, %ecx
	.p2align 4,,10
	.p2align 3
.L14:
	movslq	%esi, %rax
	movl	(%rsp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L13
	movl	%r15d, %eax
	cltd
	idivl	%esi
	testl	%edx, %edx
	jne	.L13
	movl	$1, -4(%r14,%rcx,4)
.L13:
	movl	%ecx, %r13d
	addq	$1, %rcx
	movl	(%rbx,%rcx,4), %esi
	cmpl	%esi, %r15d
	jge	.L14
.L12:
	movl	%r15d, %edx
	leaq	.LC6(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leal	1(%r13), %r8d
	xorl	%r15d, %r15d
	movslq	%r8d, %r8
	leaq	0(,%r8,4), %r13
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L15:
	addq	$4, %r15
	cmpq	%r13, %r15
	je	.L30
.L16:
	cmpl	$1, (%r14,%r15)
	jne	.L15
	movl	0(%rbp,%r15), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %r15
	call	__printf_chk@PLT
	cmpq	%r13, %r15
	jne	.L16
.L30:
	leaq	.LC8(%rip), %rdi
	call	puts@PLT
	jmp	.L5
.L11:
	movq	2400008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$2400024, %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
.L18:
	.cfi_restore_state
	xorl	%r13d, %r13d
	jmp	.L12
.L28:
	movslq	%ecx, %rax
	.p2align 4,,10
	.p2align 3
.L8:
	movl	$1, (%r9,%rax,4)
	addq	%rdi, %rax
	cmpl	$299999, %eax
	jle	.L8
	jmp	.L6
.L31:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	array
	.bss
	.align 32
	.type	array, @object
	.size	array, 1200000
array:
	.zero	1200000
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	1
	.long	2
	.long	2
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	6
	.long	8
	.section	.rodata.cst16
	.align 16
.LC2:
	.long	1
	.long	1
	.long	1
	.long	1
	.align 16
.LC3:
	.long	1
	.long	6
	.long	1
	.long	6
	.align 16
.LC4:
	.long	2
	.long	2
	.long	2
	.long	2
	.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>
#include<string.h>
int n;
int array[300000];
int main(void){
    int p[300000]={0};
    int size=0;
    array[0]=6;
    for(int i=1;;i++){
        array[i*2-1]=7*i+1;
        array[i*2]=7*i+6;
        size=2*i;
        if(array[i*2]>300000) break;
    }
    for(int i=0;i<=size;i++){
        if(p[array[i]]==1) continue;
        for(int j=2*array[i];j<300000;j+=array[i]){
            p[j]=1;
        }
    }
    while(1){
        int i;
        scanf("%d",&n);
        if(n==1) break;
        int judge[300000]={0};
        for(i=0;array[i]<=n;i++){
            if(!p[array[i]]&&n%array[i]==0){
                judge[i]=1;
            }
        }
        printf("%d:",n);
        for(int j=0;j<=i;j++)
            if(judge[j]==1)
                printf(" %d",array[j]);
        puts("");
    }
}


205920
262144
262200
279936
152244
1
 205920
262144
299662
279936
152244
1
 205920
262144
262200
259214
152244
1
 205920
262144
299662
279936
101746
1
 205920
262144
299662
279936
112663
1
 205920
52578
299662
279936
112663
1
 205920
52578
299662
83962
112663
1
 205920
52578
299662
83962
69749
1
 205920
27226
299662
279936
112663
1
 205920
262144
194758
279936
299998
1

205920: 6 8 13 15 20 22 55 99
262144: 8
262200: 6 8 15 20 50 57 69 76 92 190 230 475 575 874 2185
279936: 6 8 27
152244: 6 4229
 205920: 6 8 13 15 20 22 55 99
262144: 8
299662: 22 106 2827 13621
279936: 6 8 27
152244: 6 4229
 205920: 6 8 13 15 20 22 55 99
262144: 8
262200: 6 8 15 20 50 57 69 76 92 190 230 475 575 874 2185
259214:
152244: 6 4229
 205920: 6 8 13 15 20 22 55 99
262144: 8
299662: 22 106 2827 13621
279936: 6 8 27
101746: 101746
 205920: 6 8 13 15 20 22 55 99
262144: 8
299662: 22 106 2827 13621
279936: 6 8 27
112663:
 205920: 6 8 13 15 20 22 55 99
52578: 6 69 127
299662: 22 106 2827 13621
279936: 6 8 27
112663:
 205920: 6 8 13 15 20 22 55 99
52578: 6 69 127
299662: 22 106 2827 13621
83962:
112663:
 205920: 6 8 13 15 20 22 55 99
52578: 6 69 127
299662: 22 106 2827 13621
83962:
69749: 69749
 205920: 6 8 13 15 20 22 55 99
27226:
299662: 22 106 2827 13621
279936: 6 8 27
112663:
 205920: 6 8 13 15 20 22 55 99
262144: 8
194758:
279936: 6 8 27
299998: 299998

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>
#include<string.h>
int n;
int array[300000];
int main(void){
    int p[300000]={0};
    int size=0;
    array[0]=6;
    for(int i=1;;i++){
        array[i*2-1]=7*i+1;
        array[i*2]=7*i+6;
        size=2*i;
        if(array[i*2]>300000) break;
    }
    for(int i=0;i<=size;i++){
        if(p[array[i]]==1) continue;
        for(int j=2*array[i];j<300000;j+=array[i]){
            p[j]=1;
        }
    }
    while(1){
        int i;
        scanf("%d",&n);
        if(n==1) break;
        int judge[300000]={0};
        for(i=0;array[i]<=n;i++){
            if(!p[array[i]]&&n%array[i]==0){
                judge[i]=1;
            }
        }
        printf("%d:",n);
        for(int j=0;j<=i;j++)
            if(judge[j]==1)
                printf(" %d",array[j]);
        puts("");
    }
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	array
	.align 32
	.type	array, @object
	.size	array, 1200000
array:
	.zero	1200000
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d:"
.LC2:
	.string	" %d"
.LC3:
	.string	""
	.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	-2396160(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3888, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-2400016(%rbp), %rax
	movl	$1200000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -2400020(%rbp)
	movl	$6, array(%rip)
	movl	$1, -2400040(%rbp)
.L4:
	movl	-2400040(%rbp), %edx
	movl	%edx, %eax
	sall	$3, %eax
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-2400040(%rbp), %eax
	addl	%eax, %eax
	subl	$1, %eax
	addl	$1, %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	array(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-2400040(%rbp), %edx
	movl	%edx, %eax
	sall	$3, %eax
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-2400040(%rbp), %eax
	addl	%eax, %eax
	addl	$6, %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	array(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-2400040(%rbp), %eax
	addl	%eax, %eax
	movl	%eax, -2400020(%rbp)
	movl	-2400040(%rbp), %eax
	addl	%eax, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	array(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$300000, %eax
	jg	.L23
	addl	$1, -2400040(%rbp)
	jmp	.L4
.L23:
	nop
	movl	$0, -2400036(%rbp)
	jmp	.L5
.L10:
	movl	-2400036(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	array(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	movl	-2400016(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	je	.L24
	movl	-2400036(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	array(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, %eax
	movl	%eax, -2400032(%rbp)
	jmp	.L8
.L9:
	movl	-2400032(%rbp), %eax
	cltq
	movl	$1, -2400016(%rbp,%rax,4)
	movl	-2400036(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	array(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, -2400032(%rbp)
.L8:
	cmpl	$299999, -2400032(%rbp)
	jle	.L9
	jmp	.L7
.L24:
	nop
.L7:
	addl	$1, -2400036(%rbp)
.L5:
	movl	-2400036(%rbp), %eax
	cmpl	-2400020(%rbp), %eax
	jle	.L10
.L19:
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	cmpl	$1, %eax
	jne	.L11
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	jmp	.L22
.L11:
	leaq	-1200016(%rbp), %rax
	movl	$1200000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -2400028(%rbp)
	jmp	.L13
.L15:
	movl	-2400028(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	array(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	movl	-2400016(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L14
	movl	n(%rip), %eax
	movl	-2400028(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	array(%rip), %rdx
	movl	(%rcx,%rdx), %ecx
	cltd
	idivl	%ecx
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L14
	movl	-2400028(%rbp), %eax
	cltq
	movl	$1, -1200016(%rbp,%rax,4)
.L14:
	addl	$1, -2400028(%rbp)
.L13:
	movl	-2400028(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	array(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jle	.L15
	movl	n(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -2400024(%rbp)
	jmp	.L16
.L18:
	movl	-2400024(%rbp), %eax
	cltq
	movl	-1200016(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	jne	.L17
	movl	-2400024(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	array(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L17:
	addl	$1, -2400024(%rbp)
.L16:
	movl	-2400024(%rbp), %eax
	cmpl	-2400028(%rbp), %eax
	jle	.L18
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L19
.L22:
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	array
	.align 32
	.type	array, @object
	.size	array, 1200000
array:
	.zero	1200000
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d:"
.LC2:
	.string	" %d"
.LC3:
	.string	""
	.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	-2396160(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3888, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-2400016(%rbp), %rax
	movl	$1200000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -2400020(%rbp)
	movl	$6, array(%rip)
	movl	$1, -2400040(%rbp)
.L4:
	movl	-2400040(%rbp), %edx
	movl	%edx, %eax
	sall	$3, %eax
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-2400040(%rbp), %eax
	addl	%eax, %eax
	subl	$1, %eax
	addl	$1, %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	array(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-2400040(%rbp), %edx
	movl	%edx, %eax
	sall	$3, %eax
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-2400040(%rbp), %eax
	addl	%eax, %eax
	addl	$6, %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	array(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-2400040(%rbp), %eax
	addl	%eax, %eax
	movl	%eax, -2400020(%rbp)
	movl	-2400040(%rbp), %eax
	addl	%eax, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	array(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$300000, %eax
	jg	.L23
	addl	$1, -2400040(%rbp)
	jmp	.L4
.L23:
	nop
	movl	$0, -2400036(%rbp)
	jmp	.L5
.L10:
	movl	-2400036(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	array(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	movl	-2400016(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	je	.L24
	movl	-2400036(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	array(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, %eax
	movl	%eax, -2400032(%rbp)
	jmp	.L8
.L9:
	movl	-2400032(%rbp), %eax
	cltq
	movl	$1, -2400016(%rbp,%rax,4)
	movl	-2400036(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	array(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, -2400032(%rbp)
.L8:
	cmpl	$299999, -2400032(%rbp)
	jle	.L9
	jmp	.L7
.L24:
	nop
.L7:
	addl	$1, -2400036(%rbp)
.L5:
	movl	-2400036(%rbp), %eax
	cmpl	-2400020(%rbp), %eax
	jle	.L10
.L19:
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	cmpl	$1, %eax
	jne	.L11
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	jmp	.L22
.L11:
	leaq	-1200016(%rbp), %rax
	movl	$1200000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -2400028(%rbp)
	jmp	.L13
.L15:
	movl	-2400028(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	array(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	movl	-2400016(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L14
	movl	n(%rip), %eax
	movl	-2400028(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	array(%rip), %rdx
	movl	(%rcx,%rdx), %ecx
	cltd
	idivl	%ecx
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L14
	movl	-2400028(%rbp), %eax
	cltq
	movl	$1, -1200016(%rbp,%rax,4)
.L14:
	addl	$1, -2400028(%rbp)
.L13:
	movl	-2400028(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	array(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jle	.L15
	movl	n(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -2400024(%rbp)
	jmp	.L16
.L18:
	movl	-2400024(%rbp), %eax
	cltq
	movl	-1200016(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	jne	.L17
	movl	-2400024(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	array(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L17:
	addl	$1, -2400024(%rbp)
.L16:
	movl	-2400024(%rbp), %eax
	cmpl	-2400028(%rbp), %eax
	jle	.L18
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L19
.L22:
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
