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

```c
#include<stdio.h>

int p[55]={2,7,17,37,47,67,97,107,127,137,157,167,197,227,257,277,307,317,337,347,367,397,457,467,487,547,557,577,587,607,617,647,677,727,757,787,797,827,857,877,887,907,937,947,967,977,997,1087,1097,1117,1187,1217,1237,1277,1297};

int main(){
	int N,i;
	scanf("%d",&N);
	for(i=0;i<N-1;i++)printf("%d ",p[i]);
	printf("%d\n",p[N-1]);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	p
	.data
	.align 32
	.type	p, @object
	.size	p, 220
p:
	.long	2
	.long	7
	.long	17
	.long	37
	.long	47
	.long	67
	.long	97
	.long	107
	.long	127
	.long	137
	.long	157
	.long	167
	.long	197
	.long	227
	.long	257
	.long	277
	.long	307
	.long	317
	.long	337
	.long	347
	.long	367
	.long	397
	.long	457
	.long	467
	.long	487
	.long	547
	.long	557
	.long	577
	.long	587
	.long	607
	.long	617
	.long	647
	.long	677
	.long	727
	.long	757
	.long	787
	.long	797
	.long	827
	.long	857
	.long	877
	.long	887
	.long	907
	.long	937
	.long	947
	.long	967
	.long	977
	.long	997
	.long	1087
	.long	1097
	.long	1117
	.long	1187
	.long	1217
	.long	1237
	.long	1277
	.long	1297
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d "
.LC2:
	.string	"%d\n"
	.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
	subq	$16, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L2
.L3:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -12(%rbp)
.L2:
	movl	-16(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -12(%rbp)
	jl	.L3
	movl	-16(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	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
.LC0:
	.string	"%d"
.LC1:
	.string	"%d "
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	p(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	subl	$1, %eax
	testl	%eax, %eax
	jle	.L2
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movl	0(%rbp,%rbx,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	movl	4(%rsp), %eax
	subl	$1, %eax
	cmpl	%ebx, %eax
	jg	.L3
.L2:
	cltq
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	movl	0(%rbp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L9
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	p
	.data
	.align 32
	.type	p, @object
	.size	p, 220
p:
	.long	2
	.long	7
	.long	17
	.long	37
	.long	47
	.long	67
	.long	97
	.long	107
	.long	127
	.long	137
	.long	157
	.long	167
	.long	197
	.long	227
	.long	257
	.long	277
	.long	307
	.long	317
	.long	337
	.long	347
	.long	367
	.long	397
	.long	457
	.long	467
	.long	487
	.long	547
	.long	557
	.long	577
	.long	587
	.long	607
	.long	617
	.long	647
	.long	677
	.long	727
	.long	757
	.long	787
	.long	797
	.long	827
	.long	857
	.long	877
	.long	887
	.long	907
	.long	937
	.long	947
	.long	967
	.long	977
	.long	997
	.long	1087
	.long	1097
	.long	1117
	.long	1187
	.long	1217
	.long	1237
	.long	1277
	.long	1297
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d "
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	p(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	subl	$1, %eax
	testl	%eax, %eax
	jle	.L2
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movl	0(%rbp,%rbx,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	movl	4(%rsp), %eax
	subl	$1, %eax
	cmpl	%ebx, %eax
	jg	.L3
.L2:
	cltq
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	movl	0(%rbp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L9
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	p
	.data
	.align 32
	.type	p, @object
	.size	p, 220
p:
	.long	2
	.long	7
	.long	17
	.long	37
	.long	47
	.long	67
	.long	97
	.long	107
	.long	127
	.long	137
	.long	157
	.long	167
	.long	197
	.long	227
	.long	257
	.long	277
	.long	307
	.long	317
	.long	337
	.long	347
	.long	367
	.long	397
	.long	457
	.long	467
	.long	487
	.long	547
	.long	557
	.long	577
	.long	587
	.long	607
	.long	617
	.long	647
	.long	677
	.long	727
	.long	757
	.long	787
	.long	797
	.long	827
	.long	857
	.long	877
	.long	887
	.long	907
	.long	937
	.long	947
	.long	967
	.long	977
	.long	997
	.long	1087
	.long	1097
	.long	1117
	.long	1187
	.long	1217
	.long	1237
	.long	1277
	.long	1297
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include<stdio.h>

int p[55]={2,7,17,37,47,67,97,107,127,137,157,167,197,227,257,277,307,317,337,347,367,397,457,467,487,547,557,577,587,607,617,647,677,727,757,787,797,827,857,877,887,907,937,947,967,977,997,1087,1097,1117,1187,1217,1237,1277,1297};

int main(){
	int N,i;
	scanf("%d",&N);
	for(i=0;i<N-1;i++)printf("%d ",p[i]);
	printf("%d\n",p[N-1]);
	return 0;
}
10
 14
 12
 20
 27
 13
 50
 17
 1
 2

2 7 17 37 47 67 97 107 127 137
 2 7 17 37 47 67 97 107 127 137 157 167 197 227
 2 7 17 37 47 67 97 107 127 137 157 167
 2 7 17 37 47 67 97 107 127 137 157 167 197 227 257 277 307 317 337 347
 2 7 17 37 47 67 97 107 127 137 157 167 197 227 257 277 307 317 337 347 367 397 457 467 487 547 557
 2 7 17 37 47 67 97 107 127 137 157 167 197
 2 7 17 37 47 67 97 107 127 137 157 167 197 227 257 277 307 317 337 347 367 397 457 467 487 547 557 577 587 607 617 647 677 727 757 787 797 827 857 877 887 907 937 947 967 977 997 1087 1097 1117
 2 7 17 37 47 67 97 107 127 137 157 167 197 227 257 277 307
 2
 2 7

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

```c
#include<stdio.h>

int p[55]={2,7,17,37,47,67,97,107,127,137,157,167,197,227,257,277,307,317,337,347,367,397,457,467,487,547,557,577,587,607,617,647,677,727,757,787,797,827,857,877,887,907,937,947,967,977,997,1087,1097,1117,1187,1217,1237,1277,1297};

int main(){
	int N,i;
	scanf("%d",&N);
	for(i=0;i<N-1;i++)printf("%d ",p[i]);
	printf("%d\n",p[N-1]);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	p
	.data
	.align 32
	.type	p, @object
	.size	p, 220
p:
	.long	2
	.long	7
	.long	17
	.long	37
	.long	47
	.long	67
	.long	97
	.long	107
	.long	127
	.long	137
	.long	157
	.long	167
	.long	197
	.long	227
	.long	257
	.long	277
	.long	307
	.long	317
	.long	337
	.long	347
	.long	367
	.long	397
	.long	457
	.long	467
	.long	487
	.long	547
	.long	557
	.long	577
	.long	587
	.long	607
	.long	617
	.long	647
	.long	677
	.long	727
	.long	757
	.long	787
	.long	797
	.long	827
	.long	857
	.long	877
	.long	887
	.long	907
	.long	937
	.long	947
	.long	967
	.long	977
	.long	997
	.long	1087
	.long	1097
	.long	1117
	.long	1187
	.long	1217
	.long	1237
	.long	1277
	.long	1297
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d "
.LC2:
	.string	"%d\n"
	.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
	subq	$16, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L2
.L3:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -12(%rbp)
.L2:
	movl	-16(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -12(%rbp)
	jl	.L3
	movl	-16(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	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	p
	.data
	.align 32
	.type	p, @object
	.size	p, 220
p:
	.long	2
	.long	7
	.long	17
	.long	37
	.long	47
	.long	67
	.long	97
	.long	107
	.long	127
	.long	137
	.long	157
	.long	167
	.long	197
	.long	227
	.long	257
	.long	277
	.long	307
	.long	317
	.long	337
	.long	347
	.long	367
	.long	397
	.long	457
	.long	467
	.long	487
	.long	547
	.long	557
	.long	577
	.long	587
	.long	607
	.long	617
	.long	647
	.long	677
	.long	727
	.long	757
	.long	787
	.long	797
	.long	827
	.long	857
	.long	877
	.long	887
	.long	907
	.long	937
	.long	947
	.long	967
	.long	977
	.long	997
	.long	1087
	.long	1097
	.long	1117
	.long	1187
	.long	1217
	.long	1237
	.long	1277
	.long	1297
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d "
.LC2:
	.string	"%d\n"
	.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
	subq	$16, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L2
.L3:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -12(%rbp)
.L2:
	movl	-16(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -12(%rbp)
	jl	.L3
	movl	-16(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	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:
