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 <math.h>

int main(void)
{
	int n, i, x[1000], y[1000];
	double p2, p3, max = 0;
	double dp1, dp2, dp3;

	dp1 = dp2 = dp3 = 0;
	p2 = p3 = 0;

	scanf("%d", &n);

	for (i = 0;i < n;i++)
	{
		scanf("%d", &x[i]);
	}
	for (i = 0;i < n;i++)
	{
		scanf("%d", &y[i]);
	}
	for (i = 0;i < n;i++)
	{
		dp1 += abs(x[i] - y[i]);
		p2 += pow((x[i] - y[i]), 2);
		p3 += pow(abs(x[i] - y[i]), 3);
	}
	dp2 = sqrt(p2);
	dp3 = cbrt(p3);
	for (i = 0;i < n;i++)
	{
		if (max < abs(x[i] - y[i]))
		{
			max = abs(x[i] - y[i]);
		}
	}
	printf("%.6f\n%.6f\n%.6f\n%.6f\n", dp1, dp2, dp3, max);

	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC1:
	.string	"%d"
.LC4:
	.string	"%.6f\n%.6f\n%.6f\n%.6f\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	$4096, %rsp
	orq	$0, (%rsp)
	subq	$3984, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -8048(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -8032(%rbp)
	movsd	-8032(%rbp), %xmm0
	movsd	%xmm0, -8024(%rbp)
	movsd	-8024(%rbp), %xmm0
	movsd	%xmm0, -8040(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -8056(%rbp)
	movsd	-8056(%rbp), %xmm0
	movsd	%xmm0, -8064(%rbp)
	leaq	-8072(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -8068(%rbp)
	jmp	.L2
.L3:
	leaq	-8016(%rbp), %rdx
	movl	-8068(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -8068(%rbp)
.L2:
	movl	-8072(%rbp), %eax
	cmpl	%eax, -8068(%rbp)
	jl	.L3
	movl	$0, -8068(%rbp)
	jmp	.L4
.L5:
	leaq	-4016(%rbp), %rdx
	movl	-8068(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -8068(%rbp)
.L4:
	movl	-8072(%rbp), %eax
	cmpl	%eax, -8068(%rbp)
	jl	.L5
	movl	$0, -8068(%rbp)
	jmp	.L6
.L7:
	movl	-8068(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8068(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movsd	-8040(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -8040(%rbp)
	movl	-8068(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8068(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	subl	%eax, %edx
	pxor	%xmm4, %xmm4
	cvtsi2sdl	%edx, %xmm4
	movq	%xmm4, %rax
	movsd	.LC2(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movsd	-8064(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -8064(%rbp)
	movl	-8068(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8068(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	pxor	%xmm5, %xmm5
	cvtsi2sdl	%eax, %xmm5
	movq	%xmm5, %rax
	movsd	.LC3(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movsd	-8056(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -8056(%rbp)
	addl	$1, -8068(%rbp)
.L6:
	movl	-8072(%rbp), %eax
	cmpl	%eax, -8068(%rbp)
	jl	.L7
	movq	-8064(%rbp), %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	movq	%xmm0, %rax
	movq	%rax, -8024(%rbp)
	movq	-8056(%rbp), %rax
	movq	%rax, %xmm0
	call	cbrt@PLT
	movq	%xmm0, %rax
	movq	%rax, -8032(%rbp)
	movl	$0, -8068(%rbp)
	jmp	.L8
.L11:
	movl	-8068(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8068(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	comisd	-8048(%rbp), %xmm0
	jbe	.L9
	movl	-8068(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8068(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movsd	%xmm0, -8048(%rbp)
.L9:
	addl	$1, -8068(%rbp)
.L8:
	movl	-8072(%rbp), %eax
	cmpl	%eax, -8068(%rbp)
	jl	.L11
	movsd	-8048(%rbp), %xmm2
	movsd	-8032(%rbp), %xmm1
	movsd	-8024(%rbp), %xmm0
	movq	-8040(%rbp), %rax
	movapd	%xmm2, %xmm3
	movapd	%xmm1, %xmm2
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$4, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC2:
	.long	0
	.long	1073741824
	.align 8
.LC3:
	.long	0
	.long	1074266112
	.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
.LC1:
	.string	"%d"
.LC3:
	.string	"%.6f\n%.6f\n%.6f\n%.6f\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$3976, %rsp
	.cfi_def_cfa_offset 8128
	leaq	.LC1(%rip), %r15
	movq	%r15, %rdi
	movq	%fs:40, %rax
	movq	%rax, 8056(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	testl	%eax, %eax
	jle	.L5
	leaq	48(%rsp), %r12
	xorl	%ebx, %ebx
	movq	%r12, %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	addq	$4, %rbp
	cmpl	%ebx, %eax
	jg	.L3
	testl	%eax, %eax
	jle	.L5
	leaq	4048(%rsp), %rbp
	xorl	%r13d, %r13d
	movq	%rbp, %r14
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r14, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	movslq	44(%rsp), %rbx
	addq	$4, %r14
	cmpl	%r13d, %ebx
	jg	.L4
	testl	%ebx, %ebx
	jle	.L5
	pxor	%xmm4, %xmm4
	xorl	%r13d, %r13d
	movapd	%xmm4, %xmm5
	movapd	%xmm4, %xmm3
	.p2align 4,,10
	.p2align 3
.L6:
	movl	(%r12,%r13,4), %eax
	pxor	%xmm0, %xmm0
	pxor	%xmm2, %xmm2
	subl	0(%rbp,%r13,4), %eax
	cvtsi2sdl	%eax, %xmm0
	movl	%eax, %edx
	movsd	%xmm5, 24(%rsp)
	negl	%edx
	cmovs	%eax, %edx
	movq	.LC2(%rip), %rax
	addq	$1, %r13
	mulsd	%xmm0, %xmm0
	cvtsi2sdl	%edx, %xmm2
	movq	%rax, %xmm1
	addsd	%xmm2, %xmm4
	addsd	%xmm0, %xmm3
	movapd	%xmm2, %xmm0
	movsd	%xmm4, 16(%rsp)
	movsd	%xmm3, 8(%rsp)
	call	pow@PLT
	movsd	24(%rsp), %xmm5
	cmpq	%rbx, %r13
	movsd	8(%rsp), %xmm3
	movsd	16(%rsp), %xmm4
	addsd	%xmm0, %xmm5
	jne	.L6
	pxor	%xmm6, %xmm6
	ucomisd	%xmm3, %xmm6
	ja	.L21
	movapd	%xmm3, %xmm1
	movapd	%xmm5, %xmm0
	movsd	%xmm4, 16(%rsp)
	sqrtsd	%xmm1, %xmm1
	movsd	%xmm1, 8(%rsp)
	call	cbrt@PLT
	movsd	8(%rsp), %xmm1
	movsd	16(%rsp), %xmm4
	movapd	%xmm0, %xmm2
.L11:
	xorl	%edx, %edx
	pxor	%xmm3, %xmm3
	.p2align 4,,10
	.p2align 3
.L9:
	movl	(%r12,%rdx,4), %eax
	subl	0(%rbp,%rdx,4), %eax
	pxor	%xmm5, %xmm5
	movl	%eax, %ecx
	negl	%ecx
	cmovns	%ecx, %eax
	addq	$1, %rdx
	cvtsi2sdl	%eax, %xmm5
	maxsd	%xmm3, %xmm5
	movapd	%xmm5, %xmm3
	cmpq	%rdx, %rbx
	jne	.L9
.L10:
	movapd	%xmm4, %xmm0
	movl	$1, %edi
	movl	$4, %eax
	leaq	.LC3(%rip), %rsi
	call	__printf_chk@PLT
	movq	8056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$8072, %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
.L5:
	.cfi_restore_state
	pxor	%xmm1, %xmm1
	movapd	%xmm1, %xmm2
	movapd	%xmm1, %xmm4
	movapd	%xmm1, %xmm3
	jmp	.L10
.L21:
	movapd	%xmm3, %xmm0
	movsd	%xmm5, 24(%rsp)
	call	sqrt@PLT
	movsd	24(%rsp), %xmm5
	movsd	%xmm0, 8(%rsp)
	movapd	%xmm5, %xmm0
	call	cbrt@PLT
	movsd	16(%rsp), %xmm4
	movsd	8(%rsp), %xmm1
	movapd	%xmm0, %xmm2
	jmp	.L11
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1074266112
	.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
.LC1:
	.string	"%d"
.LC3:
	.string	"%.6f\n%.6f\n%.6f\n%.6f\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$3976, %rsp
	.cfi_def_cfa_offset 8128
	leaq	.LC1(%rip), %r15
	movq	%r15, %rdi
	movq	%fs:40, %rax
	movq	%rax, 8056(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	testl	%eax, %eax
	jle	.L5
	leaq	48(%rsp), %r12
	xorl	%ebx, %ebx
	movq	%r12, %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	addq	$4, %rbp
	cmpl	%ebx, %eax
	jg	.L3
	testl	%eax, %eax
	jle	.L5
	leaq	4048(%rsp), %rbp
	xorl	%r13d, %r13d
	movq	%rbp, %r14
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r14, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	movslq	44(%rsp), %rbx
	addq	$4, %r14
	cmpl	%r13d, %ebx
	jg	.L4
	testl	%ebx, %ebx
	jle	.L5
	pxor	%xmm4, %xmm4
	xorl	%r13d, %r13d
	movapd	%xmm4, %xmm5
	movapd	%xmm4, %xmm3
	.p2align 4,,10
	.p2align 3
.L6:
	movl	(%r12,%r13,4), %eax
	pxor	%xmm0, %xmm0
	pxor	%xmm2, %xmm2
	subl	0(%rbp,%r13,4), %eax
	cvtsi2sdl	%eax, %xmm0
	movl	%eax, %edx
	movsd	%xmm5, 24(%rsp)
	negl	%edx
	cmovs	%eax, %edx
	movq	.LC2(%rip), %rax
	addq	$1, %r13
	mulsd	%xmm0, %xmm0
	cvtsi2sdl	%edx, %xmm2
	movq	%rax, %xmm1
	addsd	%xmm2, %xmm4
	addsd	%xmm0, %xmm3
	movapd	%xmm2, %xmm0
	movsd	%xmm4, 16(%rsp)
	movsd	%xmm3, 8(%rsp)
	call	pow@PLT
	movsd	24(%rsp), %xmm5
	cmpq	%rbx, %r13
	movsd	8(%rsp), %xmm3
	movsd	16(%rsp), %xmm4
	addsd	%xmm0, %xmm5
	jne	.L6
	pxor	%xmm6, %xmm6
	ucomisd	%xmm3, %xmm6
	ja	.L21
	movapd	%xmm3, %xmm1
	movapd	%xmm5, %xmm0
	movsd	%xmm4, 16(%rsp)
	sqrtsd	%xmm1, %xmm1
	movsd	%xmm1, 8(%rsp)
	call	cbrt@PLT
	movsd	8(%rsp), %xmm1
	movsd	16(%rsp), %xmm4
	movapd	%xmm0, %xmm2
.L11:
	xorl	%edx, %edx
	pxor	%xmm3, %xmm3
	.p2align 4,,10
	.p2align 3
.L9:
	movl	(%r12,%rdx,4), %eax
	subl	0(%rbp,%rdx,4), %eax
	pxor	%xmm5, %xmm5
	movl	%eax, %ecx
	negl	%ecx
	cmovns	%ecx, %eax
	addq	$1, %rdx
	cvtsi2sdl	%eax, %xmm5
	maxsd	%xmm3, %xmm5
	movapd	%xmm5, %xmm3
	cmpq	%rdx, %rbx
	jne	.L9
.L10:
	movapd	%xmm4, %xmm0
	movl	$1, %edi
	movl	$4, %eax
	leaq	.LC3(%rip), %rsi
	call	__printf_chk@PLT
	movq	8056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$8072, %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
.L5:
	.cfi_restore_state
	pxor	%xmm1, %xmm1
	movapd	%xmm1, %xmm2
	movapd	%xmm1, %xmm4
	movapd	%xmm1, %xmm3
	jmp	.L10
.L21:
	movapd	%xmm3, %xmm0
	movsd	%xmm5, 24(%rsp)
	call	sqrt@PLT
	movsd	24(%rsp), %xmm5
	movsd	%xmm0, 8(%rsp)
	movapd	%xmm5, %xmm0
	call	cbrt@PLT
	movsd	16(%rsp), %xmm4
	movsd	8(%rsp), %xmm1
	movapd	%xmm0, %xmm2
	jmp	.L11
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1074266112
	.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 <math.h>

int main(void)
{
	int n, i, x[1000], y[1000];
	double p2, p3, max = 0;
	double dp1, dp2, dp3;

	dp1 = dp2 = dp3 = 0;
	p2 = p3 = 0;

	scanf("%d", &n);

	for (i = 0;i < n;i++)
	{
		scanf("%d", &x[i]);
	}
	for (i = 0;i < n;i++)
	{
		scanf("%d", &y[i]);
	}
	for (i = 0;i < n;i++)
	{
		dp1 += abs(x[i] - y[i]);
		p2 += pow((x[i] - y[i]), 2);
		p3 += pow(abs(x[i] - y[i]), 3);
	}
	dp2 = sqrt(p2);
	dp3 = cbrt(p3);
	for (i = 0;i < n;i++)
	{
		if (max < abs(x[i] - y[i]))
		{
			max = abs(x[i] - y[i]);
		}
	}
	printf("%.6f\n%.6f\n%.6f\n%.6f\n", dp1, dp2, dp3, max);

	return 0;
}

3
2 2 3
2 0 4
 3
2 2 3
2 -1 4
 3
2 4 5
2 -1 4
 3
3 4 5
2 -1 4
 3
6 4 5
2 -1 4
 3
6 5 5
2 -1 4
 3
6 5 5
2 -1 3
 3
6 5 8
2 -1 3
 3
6 5 8
3 -1 3
 3
6 7 8
3 -1 3

3.000000
2.236068
2.080084
2.000000
 4.000000
3.162278
3.036589
3.000000
 6.000000
5.099020
5.013298
5.000000
 7.000000
5.196152
5.026526
5.000000
 10.000000
6.480741
5.748897
5.000000
 11.000000
7.280110
6.549912
6.000000
 12.000000
7.483315
6.603854
6.000000
 15.000000
8.774964
7.398636
6.000000
 14.000000
8.366600
7.166096
6.000000
 16.000000
9.899495
8.724141
8.000000

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 <math.h>

int main(void)
{
	int n, i, x[1000], y[1000];
	double p2, p3, max = 0;
	double dp1, dp2, dp3;

	dp1 = dp2 = dp3 = 0;
	p2 = p3 = 0;

	scanf("%d", &n);

	for (i = 0;i < n;i++)
	{
		scanf("%d", &x[i]);
	}
	for (i = 0;i < n;i++)
	{
		scanf("%d", &y[i]);
	}
	for (i = 0;i < n;i++)
	{
		dp1 += abs(x[i] - y[i]);
		p2 += pow((x[i] - y[i]), 2);
		p3 += pow(abs(x[i] - y[i]), 3);
	}
	dp2 = sqrt(p2);
	dp3 = cbrt(p3);
	for (i = 0;i < n;i++)
	{
		if (max < abs(x[i] - y[i]))
		{
			max = abs(x[i] - y[i]);
		}
	}
	printf("%.6f\n%.6f\n%.6f\n%.6f\n", dp1, dp2, dp3, max);

	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC1:
	.string	"%d"
.LC4:
	.string	"%.6f\n%.6f\n%.6f\n%.6f\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	$4096, %rsp
	orq	$0, (%rsp)
	subq	$3984, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -8048(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -8032(%rbp)
	movsd	-8032(%rbp), %xmm0
	movsd	%xmm0, -8024(%rbp)
	movsd	-8024(%rbp), %xmm0
	movsd	%xmm0, -8040(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -8056(%rbp)
	movsd	-8056(%rbp), %xmm0
	movsd	%xmm0, -8064(%rbp)
	leaq	-8072(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -8068(%rbp)
	jmp	.L2
.L3:
	leaq	-8016(%rbp), %rdx
	movl	-8068(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -8068(%rbp)
.L2:
	movl	-8072(%rbp), %eax
	cmpl	%eax, -8068(%rbp)
	jl	.L3
	movl	$0, -8068(%rbp)
	jmp	.L4
.L5:
	leaq	-4016(%rbp), %rdx
	movl	-8068(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -8068(%rbp)
.L4:
	movl	-8072(%rbp), %eax
	cmpl	%eax, -8068(%rbp)
	jl	.L5
	movl	$0, -8068(%rbp)
	jmp	.L6
.L7:
	movl	-8068(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8068(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movsd	-8040(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -8040(%rbp)
	movl	-8068(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8068(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	subl	%eax, %edx
	pxor	%xmm4, %xmm4
	cvtsi2sdl	%edx, %xmm4
	movq	%xmm4, %rax
	movsd	.LC2(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movsd	-8064(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -8064(%rbp)
	movl	-8068(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8068(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	pxor	%xmm5, %xmm5
	cvtsi2sdl	%eax, %xmm5
	movq	%xmm5, %rax
	movsd	.LC3(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movsd	-8056(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -8056(%rbp)
	addl	$1, -8068(%rbp)
.L6:
	movl	-8072(%rbp), %eax
	cmpl	%eax, -8068(%rbp)
	jl	.L7
	movq	-8064(%rbp), %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	movq	%xmm0, %rax
	movq	%rax, -8024(%rbp)
	movq	-8056(%rbp), %rax
	movq	%rax, %xmm0
	call	cbrt@PLT
	movq	%xmm0, %rax
	movq	%rax, -8032(%rbp)
	movl	$0, -8068(%rbp)
	jmp	.L8
.L11:
	movl	-8068(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8068(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	comisd	-8048(%rbp), %xmm0
	jbe	.L9
	movl	-8068(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8068(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movsd	%xmm0, -8048(%rbp)
.L9:
	addl	$1, -8068(%rbp)
.L8:
	movl	-8072(%rbp), %eax
	cmpl	%eax, -8068(%rbp)
	jl	.L11
	movsd	-8048(%rbp), %xmm2
	movsd	-8032(%rbp), %xmm1
	movsd	-8024(%rbp), %xmm0
	movq	-8040(%rbp), %rax
	movapd	%xmm2, %xmm3
	movapd	%xmm1, %xmm2
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$4, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC2:
	.long	0
	.long	1073741824
	.align 8
.LC3:
	.long	0
	.long	1074266112
	.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
	.section	.rodata
.LC1:
	.string	"%d"
.LC4:
	.string	"%.6f\n%.6f\n%.6f\n%.6f\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	$4096, %rsp
	orq	$0, (%rsp)
	subq	$3984, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -8048(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -8032(%rbp)
	movsd	-8032(%rbp), %xmm0
	movsd	%xmm0, -8024(%rbp)
	movsd	-8024(%rbp), %xmm0
	movsd	%xmm0, -8040(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -8056(%rbp)
	movsd	-8056(%rbp), %xmm0
	movsd	%xmm0, -8064(%rbp)
	leaq	-8072(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -8068(%rbp)
	jmp	.L2
.L3:
	leaq	-8016(%rbp), %rdx
	movl	-8068(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -8068(%rbp)
.L2:
	movl	-8072(%rbp), %eax
	cmpl	%eax, -8068(%rbp)
	jl	.L3
	movl	$0, -8068(%rbp)
	jmp	.L4
.L5:
	leaq	-4016(%rbp), %rdx
	movl	-8068(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -8068(%rbp)
.L4:
	movl	-8072(%rbp), %eax
	cmpl	%eax, -8068(%rbp)
	jl	.L5
	movl	$0, -8068(%rbp)
	jmp	.L6
.L7:
	movl	-8068(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8068(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movsd	-8040(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -8040(%rbp)
	movl	-8068(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8068(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	subl	%eax, %edx
	pxor	%xmm4, %xmm4
	cvtsi2sdl	%edx, %xmm4
	movq	%xmm4, %rax
	movsd	.LC2(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movsd	-8064(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -8064(%rbp)
	movl	-8068(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8068(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	pxor	%xmm5, %xmm5
	cvtsi2sdl	%eax, %xmm5
	movq	%xmm5, %rax
	movsd	.LC3(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movsd	-8056(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -8056(%rbp)
	addl	$1, -8068(%rbp)
.L6:
	movl	-8072(%rbp), %eax
	cmpl	%eax, -8068(%rbp)
	jl	.L7
	movq	-8064(%rbp), %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	movq	%xmm0, %rax
	movq	%rax, -8024(%rbp)
	movq	-8056(%rbp), %rax
	movq	%rax, %xmm0
	call	cbrt@PLT
	movq	%xmm0, %rax
	movq	%rax, -8032(%rbp)
	movl	$0, -8068(%rbp)
	jmp	.L8
.L11:
	movl	-8068(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8068(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	comisd	-8048(%rbp), %xmm0
	jbe	.L9
	movl	-8068(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8068(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movsd	%xmm0, -8048(%rbp)
.L9:
	addl	$1, -8068(%rbp)
.L8:
	movl	-8072(%rbp), %eax
	cmpl	%eax, -8068(%rbp)
	jl	.L11
	movsd	-8048(%rbp), %xmm2
	movsd	-8032(%rbp), %xmm1
	movsd	-8024(%rbp), %xmm0
	movq	-8040(%rbp), %rax
	movapd	%xmm2, %xmm3
	movapd	%xmm1, %xmm2
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$4, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC2:
	.long	0
	.long	1073741824
	.align 8
.LC3:
	.long	0
	.long	1074266112
	.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:
