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,a;
	double x[1000], y[1000], sum=0, sum2=0, sum3=0, sum4=0;
	scanf("%d", &n);
	for (a = 0; a < n; a++)
	{
		scanf("%lf", &x[a]);
	}
	for (a = 0; a < n; a++)
	{
		scanf("%lf", &y[a]);
		if (x[a] < y[a])
		{
			x[a] = -1 * x[a];
			y[a] = -1 * y[a];
			sum4 = x[a] - y[a];
		}

	}
	for (a = 0; a < n; a++)
	{
		sum =1.0*( sum + (x[a] - y[a]));
		sum2 = 1.0*(sum2 + ((x[a] - y[a])*(x[a] - y[a])));
		sum3 = 1.0*(sum3 + ((x[a] - y[a])*(x[a] - y[a])*(x[a] - y[a])));
		if ((x[a] - y[a]) > sum4)
		{
			sum4 = x[a] - y[a];
		}
	}
	printf("%f\n%f\n%f\n%f\n", sum, sqrt(sum2), pow(sum3, 1.0 / 3.0),sum4);
	
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC1:
	.string	"%d"
.LC2:
	.string	"%lf"
.LC5:
	.string	"%f\n%f\n%f\n%f\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
	pushq	%rbx
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$3784, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -16064(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -16056(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -16048(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -16040(%rbp)
	leaq	-16072(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16068(%rbp)
	jmp	.L2
.L3:
	leaq	-16032(%rbp), %rdx
	movl	-16068(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -16068(%rbp)
.L2:
	movl	-16072(%rbp), %eax
	cmpl	%eax, -16068(%rbp)
	jl	.L3
	movl	$0, -16068(%rbp)
	jmp	.L4
.L7:
	leaq	-8032(%rbp), %rdx
	movl	-16068(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-16068(%rbp), %eax
	cltq
	movsd	-16032(%rbp,%rax,8), %xmm1
	movl	-16068(%rbp), %eax
	cltq
	movsd	-8032(%rbp,%rax,8), %xmm0
	comisd	%xmm1, %xmm0
	jbe	.L5
	movl	-16068(%rbp), %eax
	cltq
	movsd	-16032(%rbp,%rax,8), %xmm0
	movq	.LC3(%rip), %xmm1
	xorpd	%xmm1, %xmm0
	movl	-16068(%rbp), %eax
	cltq
	movsd	%xmm0, -16032(%rbp,%rax,8)
	movl	-16068(%rbp), %eax
	cltq
	movsd	-8032(%rbp,%rax,8), %xmm0
	movq	.LC3(%rip), %xmm1
	xorpd	%xmm1, %xmm0
	movl	-16068(%rbp), %eax
	cltq
	movsd	%xmm0, -8032(%rbp,%rax,8)
	movl	-16068(%rbp), %eax
	cltq
	movsd	-16032(%rbp,%rax,8), %xmm0
	movl	-16068(%rbp), %eax
	cltq
	movsd	-8032(%rbp,%rax,8), %xmm1
	subsd	%xmm1, %xmm0
	movsd	%xmm0, -16040(%rbp)
.L5:
	addl	$1, -16068(%rbp)
.L4:
	movl	-16072(%rbp), %eax
	cmpl	%eax, -16068(%rbp)
	jl	.L7
	movl	$0, -16068(%rbp)
	jmp	.L8
.L11:
	movl	-16068(%rbp), %eax
	cltq
	movsd	-16032(%rbp,%rax,8), %xmm0
	movl	-16068(%rbp), %eax
	cltq
	movsd	-8032(%rbp,%rax,8), %xmm1
	subsd	%xmm1, %xmm0
	movsd	-16064(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -16064(%rbp)
	movl	-16068(%rbp), %eax
	cltq
	movsd	-16032(%rbp,%rax,8), %xmm0
	movl	-16068(%rbp), %eax
	cltq
	movsd	-8032(%rbp,%rax,8), %xmm2
	movapd	%xmm0, %xmm1
	subsd	%xmm2, %xmm1
	movl	-16068(%rbp), %eax
	cltq
	movsd	-16032(%rbp,%rax,8), %xmm0
	movl	-16068(%rbp), %eax
	cltq
	movsd	-8032(%rbp,%rax,8), %xmm2
	subsd	%xmm2, %xmm0
	mulsd	%xmm1, %xmm0
	movsd	-16056(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -16056(%rbp)
	movl	-16068(%rbp), %eax
	cltq
	movsd	-16032(%rbp,%rax,8), %xmm0
	movl	-16068(%rbp), %eax
	cltq
	movsd	-8032(%rbp,%rax,8), %xmm2
	movapd	%xmm0, %xmm1
	subsd	%xmm2, %xmm1
	movl	-16068(%rbp), %eax
	cltq
	movsd	-16032(%rbp,%rax,8), %xmm0
	movl	-16068(%rbp), %eax
	cltq
	movsd	-8032(%rbp,%rax,8), %xmm2
	subsd	%xmm2, %xmm0
	mulsd	%xmm0, %xmm1
	movl	-16068(%rbp), %eax
	cltq
	movsd	-16032(%rbp,%rax,8), %xmm0
	movl	-16068(%rbp), %eax
	cltq
	movsd	-8032(%rbp,%rax,8), %xmm2
	subsd	%xmm2, %xmm0
	mulsd	%xmm1, %xmm0
	movsd	-16048(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -16048(%rbp)
	movl	-16068(%rbp), %eax
	cltq
	movsd	-16032(%rbp,%rax,8), %xmm0
	movl	-16068(%rbp), %eax
	cltq
	movsd	-8032(%rbp,%rax,8), %xmm1
	subsd	%xmm1, %xmm0
	comisd	-16040(%rbp), %xmm0
	jbe	.L9
	movl	-16068(%rbp), %eax
	cltq
	movsd	-16032(%rbp,%rax,8), %xmm0
	movl	-16068(%rbp), %eax
	cltq
	movsd	-8032(%rbp,%rax,8), %xmm1
	subsd	%xmm1, %xmm0
	movsd	%xmm0, -16040(%rbp)
.L9:
	addl	$1, -16068(%rbp)
.L8:
	movl	-16072(%rbp), %eax
	cmpl	%eax, -16068(%rbp)
	jl	.L11
	movsd	.LC4(%rip), %xmm0
	movq	-16048(%rbp), %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movq	%xmm0, %rbx
	movq	-16056(%rbp), %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	movq	%xmm0, %rdx
	movsd	-16040(%rbp), %xmm0
	movq	-16064(%rbp), %rax
	movapd	%xmm0, %xmm3
	movq	%rbx, %xmm2
	movq	%rdx, %xmm1
	movq	%rax, %xmm0
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$4, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 16
.LC3:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.align 8
.LC4:
	.long	1431655765
	.long	1070945621
	.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"
.LC2:
	.string	"%lf"
.LC5:
	.string	"%f\n%f\n%f\n%f\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	$4096, %rsp
	.cfi_def_cfa_offset 8248
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 12344
	orq	$0, (%rsp)
	subq	$3784, %rsp
	.cfi_def_cfa_offset 16128
	leaq	.LC1(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 16056(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	48(%rsp), %r12
	xorl	%ebx, %ebx
	leaq	.LC2(%rip), %r14
	movq	%r12, %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	addq	$8, %rbp
	cmpl	%ebx, %eax
	jg	.L3
	testl	%eax, %eax
	jle	.L2
	pxor	%xmm7, %xmm7
	leaq	8048(%rsp), %r13
	xorl	%ebx, %ebx
	movq	%r13, %rbp
	movq	%xmm7, %r15
	movapd	%xmm7, %xmm3
	.p2align 4,,10
	.p2align 3
.L8:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%r14, %rdi
	movsd	%xmm3, 8(%rsp)
	call	__isoc99_scanf@PLT
	movsd	(%r12,%rbx,8), %xmm0
	movsd	0(%rbp), %xmm1
	movsd	8(%rsp), %xmm3
	comisd	%xmm0, %xmm1
	jbe	.L21
	movapd	%xmm0, %xmm2
	xorpd	.LC3(%rip), %xmm2
	movsd	%xmm2, (%r12,%rbx,8)
	movapd	%xmm1, %xmm2
	subsd	%xmm0, %xmm1
	xorpd	.LC3(%rip), %xmm2
	movsd	%xmm2, 0(%rbp)
	movapd	%xmm1, %xmm3
.L21:
	movl	44(%rsp), %eax
	addq	$1, %rbx
	addq	$8, %rbp
	cmpl	%ebx, %eax
	jg	.L8
	testl	%eax, %eax
	jle	.L9
	movslq	%eax, %rdx
	movq	%r15, %xmm6
	movq	%r15, %xmm4
	xorl	%eax, %eax
	movq	%r15, %xmm5
	.p2align 4,,10
	.p2align 3
.L11:
	movsd	(%r12,%rax,8), %xmm0
	subsd	0(%r13,%rax,8), %xmm0
	addq	$1, %rax
	movapd	%xmm0, %xmm2
	addsd	%xmm0, %xmm5
	mulsd	%xmm0, %xmm2
	addsd	%xmm2, %xmm4
	mulsd	%xmm0, %xmm2
	maxsd	%xmm3, %xmm0
	movapd	%xmm0, %xmm3
	addsd	%xmm2, %xmm6
	cmpq	%rax, %rdx
	jne	.L11
	movsd	.LC4(%rip), %xmm1
	movsd	%xmm0, 8(%rsp)
	movapd	%xmm6, %xmm0
	movsd	%xmm5, 24(%rsp)
	movsd	%xmm4, 16(%rsp)
	call	pow@PLT
	movsd	16(%rsp), %xmm4
	movq	%r15, %xmm7
	movsd	8(%rsp), %xmm3
	movsd	24(%rsp), %xmm5
	movapd	%xmm0, %xmm2
	ucomisd	%xmm4, %xmm7
	ja	.L22
.L15:
	sqrtsd	%xmm4, %xmm4
	movapd	%xmm4, %xmm1
.L14:
	movapd	%xmm5, %xmm0
	movl	$1, %edi
	movl	$4, %eax
	leaq	.LC5(%rip), %rsi
	call	__printf_chk@PLT
	movq	16056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$16072, %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
.L2:
	.cfi_restore_state
	pxor	%xmm7, %xmm7
	movq	%xmm7, %r15
	movapd	%xmm7, %xmm3
.L9:
	movq	%r15, %xmm4
	movq	%r15, %xmm5
	movq	%r15, %xmm2
	jmp	.L15
.L22:
	movsd	%xmm0, 8(%rsp)
	movapd	%xmm4, %xmm0
	movsd	%xmm5, 24(%rsp)
	movsd	%xmm3, 16(%rsp)
	call	sqrt@PLT
	movsd	24(%rsp), %xmm5
	movsd	16(%rsp), %xmm3
	movsd	8(%rsp), %xmm2
	movapd	%xmm0, %xmm1
	jmp	.L14
.L26:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC3:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC4:
	.long	1431655765
	.long	1070945621
	.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"
.LC2:
	.string	"%lf"
.LC5:
	.string	"%f\n%f\n%f\n%f\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	$4096, %rsp
	.cfi_def_cfa_offset 8248
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 12344
	orq	$0, (%rsp)
	subq	$3784, %rsp
	.cfi_def_cfa_offset 16128
	leaq	.LC1(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 16056(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	48(%rsp), %r12
	xorl	%ebx, %ebx
	leaq	.LC2(%rip), %r14
	movq	%r12, %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	addq	$8, %rbp
	cmpl	%ebx, %eax
	jg	.L3
	testl	%eax, %eax
	jle	.L2
	pxor	%xmm7, %xmm7
	leaq	8048(%rsp), %r13
	xorl	%ebx, %ebx
	movq	%r13, %rbp
	movq	%xmm7, %r15
	movapd	%xmm7, %xmm3
	.p2align 4,,10
	.p2align 3
.L8:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%r14, %rdi
	movsd	%xmm3, 8(%rsp)
	call	__isoc99_scanf@PLT
	movsd	(%r12,%rbx,8), %xmm0
	movsd	0(%rbp), %xmm1
	movsd	8(%rsp), %xmm3
	comisd	%xmm0, %xmm1
	jbe	.L21
	movapd	%xmm0, %xmm2
	xorpd	.LC3(%rip), %xmm2
	movsd	%xmm2, (%r12,%rbx,8)
	movapd	%xmm1, %xmm2
	subsd	%xmm0, %xmm1
	xorpd	.LC3(%rip), %xmm2
	movsd	%xmm2, 0(%rbp)
	movapd	%xmm1, %xmm3
.L21:
	movl	44(%rsp), %eax
	addq	$1, %rbx
	addq	$8, %rbp
	cmpl	%ebx, %eax
	jg	.L8
	testl	%eax, %eax
	jle	.L9
	movslq	%eax, %rdx
	movq	%r15, %xmm6
	movq	%r15, %xmm4
	xorl	%eax, %eax
	movq	%r15, %xmm5
	.p2align 4,,10
	.p2align 3
.L11:
	movsd	(%r12,%rax,8), %xmm0
	subsd	0(%r13,%rax,8), %xmm0
	addq	$1, %rax
	movapd	%xmm0, %xmm2
	addsd	%xmm0, %xmm5
	mulsd	%xmm0, %xmm2
	addsd	%xmm2, %xmm4
	mulsd	%xmm0, %xmm2
	maxsd	%xmm3, %xmm0
	movapd	%xmm0, %xmm3
	addsd	%xmm2, %xmm6
	cmpq	%rax, %rdx
	jne	.L11
	movsd	.LC4(%rip), %xmm1
	movsd	%xmm0, 8(%rsp)
	movapd	%xmm6, %xmm0
	movsd	%xmm5, 24(%rsp)
	movsd	%xmm4, 16(%rsp)
	call	pow@PLT
	movsd	16(%rsp), %xmm4
	movq	%r15, %xmm7
	movsd	8(%rsp), %xmm3
	movsd	24(%rsp), %xmm5
	movapd	%xmm0, %xmm2
	ucomisd	%xmm4, %xmm7
	ja	.L22
.L15:
	sqrtsd	%xmm4, %xmm4
	movapd	%xmm4, %xmm1
.L14:
	movapd	%xmm5, %xmm0
	movl	$1, %edi
	movl	$4, %eax
	leaq	.LC5(%rip), %rsi
	call	__printf_chk@PLT
	movq	16056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$16072, %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
.L2:
	.cfi_restore_state
	pxor	%xmm7, %xmm7
	movq	%xmm7, %r15
	movapd	%xmm7, %xmm3
.L9:
	movq	%r15, %xmm4
	movq	%r15, %xmm5
	movq	%r15, %xmm2
	jmp	.L15
.L22:
	movsd	%xmm0, 8(%rsp)
	movapd	%xmm4, %xmm0
	movsd	%xmm5, 24(%rsp)
	movsd	%xmm3, 16(%rsp)
	call	sqrt@PLT
	movsd	24(%rsp), %xmm5
	movsd	16(%rsp), %xmm3
	movsd	8(%rsp), %xmm2
	movapd	%xmm0, %xmm1
	jmp	.L14
.L26:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC3:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC4:
	.long	1431655765
	.long	1070945621
	.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,a;
	double x[1000], y[1000], sum=0, sum2=0, sum3=0, sum4=0;
	scanf("%d", &n);
	for (a = 0; a < n; a++)
	{
		scanf("%lf", &x[a]);
	}
	for (a = 0; a < n; a++)
	{
		scanf("%lf", &y[a]);
		if (x[a] < y[a])
		{
			x[a] = -1 * x[a];
			y[a] = -1 * y[a];
			sum4 = x[a] - y[a];
		}

	}
	for (a = 0; a < n; a++)
	{
		sum =1.0*( sum + (x[a] - y[a]));
		sum2 = 1.0*(sum2 + ((x[a] - y[a])*(x[a] - y[a])));
		sum3 = 1.0*(sum3 + ((x[a] - y[a])*(x[a] - y[a])*(x[a] - y[a])));
		if ((x[a] - y[a]) > sum4)
		{
			sum4 = x[a] - y[a];
		}
	}
	printf("%f\n%f\n%f\n%f\n", sum, sqrt(sum2), pow(sum3, 1.0 / 3.0),sum4);
	
	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,a;
	double x[1000], y[1000], sum=0, sum2=0, sum3=0, sum4=0;
	scanf("%d", &n);
	for (a = 0; a < n; a++)
	{
		scanf("%lf", &x[a]);
	}
	for (a = 0; a < n; a++)
	{
		scanf("%lf", &y[a]);
		if (x[a] < y[a])
		{
			x[a] = -1 * x[a];
			y[a] = -1 * y[a];
			sum4 = x[a] - y[a];
		}

	}
	for (a = 0; a < n; a++)
	{
		sum =1.0*( sum + (x[a] - y[a]));
		sum2 = 1.0*(sum2 + ((x[a] - y[a])*(x[a] - y[a])));
		sum3 = 1.0*(sum3 + ((x[a] - y[a])*(x[a] - y[a])*(x[a] - y[a])));
		if ((x[a] - y[a]) > sum4)
		{
			sum4 = x[a] - y[a];
		}
	}
	printf("%f\n%f\n%f\n%f\n", sum, sqrt(sum2), pow(sum3, 1.0 / 3.0),sum4);
	
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC1:
	.string	"%d"
.LC2:
	.string	"%lf"
.LC5:
	.string	"%f\n%f\n%f\n%f\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
	pushq	%rbx
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$3784, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -16064(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -16056(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -16048(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -16040(%rbp)
	leaq	-16072(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16068(%rbp)
	jmp	.L2
.L3:
	leaq	-16032(%rbp), %rdx
	movl	-16068(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -16068(%rbp)
.L2:
	movl	-16072(%rbp), %eax
	cmpl	%eax, -16068(%rbp)
	jl	.L3
	movl	$0, -16068(%rbp)
	jmp	.L4
.L7:
	leaq	-8032(%rbp), %rdx
	movl	-16068(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-16068(%rbp), %eax
	cltq
	movsd	-16032(%rbp,%rax,8), %xmm1
	movl	-16068(%rbp), %eax
	cltq
	movsd	-8032(%rbp,%rax,8), %xmm0
	comisd	%xmm1, %xmm0
	jbe	.L5
	movl	-16068(%rbp), %eax
	cltq
	movsd	-16032(%rbp,%rax,8), %xmm0
	movq	.LC3(%rip), %xmm1
	xorpd	%xmm1, %xmm0
	movl	-16068(%rbp), %eax
	cltq
	movsd	%xmm0, -16032(%rbp,%rax,8)
	movl	-16068(%rbp), %eax
	cltq
	movsd	-8032(%rbp,%rax,8), %xmm0
	movq	.LC3(%rip), %xmm1
	xorpd	%xmm1, %xmm0
	movl	-16068(%rbp), %eax
	cltq
	movsd	%xmm0, -8032(%rbp,%rax,8)
	movl	-16068(%rbp), %eax
	cltq
	movsd	-16032(%rbp,%rax,8), %xmm0
	movl	-16068(%rbp), %eax
	cltq
	movsd	-8032(%rbp,%rax,8), %xmm1
	subsd	%xmm1, %xmm0
	movsd	%xmm0, -16040(%rbp)
.L5:
	addl	$1, -16068(%rbp)
.L4:
	movl	-16072(%rbp), %eax
	cmpl	%eax, -16068(%rbp)
	jl	.L7
	movl	$0, -16068(%rbp)
	jmp	.L8
.L11:
	movl	-16068(%rbp), %eax
	cltq
	movsd	-16032(%rbp,%rax,8), %xmm0
	movl	-16068(%rbp), %eax
	cltq
	movsd	-8032(%rbp,%rax,8), %xmm1
	subsd	%xmm1, %xmm0
	movsd	-16064(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -16064(%rbp)
	movl	-16068(%rbp), %eax
	cltq
	movsd	-16032(%rbp,%rax,8), %xmm0
	movl	-16068(%rbp), %eax
	cltq
	movsd	-8032(%rbp,%rax,8), %xmm2
	movapd	%xmm0, %xmm1
	subsd	%xmm2, %xmm1
	movl	-16068(%rbp), %eax
	cltq
	movsd	-16032(%rbp,%rax,8), %xmm0
	movl	-16068(%rbp), %eax
	cltq
	movsd	-8032(%rbp,%rax,8), %xmm2
	subsd	%xmm2, %xmm0
	mulsd	%xmm1, %xmm0
	movsd	-16056(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -16056(%rbp)
	movl	-16068(%rbp), %eax
	cltq
	movsd	-16032(%rbp,%rax,8), %xmm0
	movl	-16068(%rbp), %eax
	cltq
	movsd	-8032(%rbp,%rax,8), %xmm2
	movapd	%xmm0, %xmm1
	subsd	%xmm2, %xmm1
	movl	-16068(%rbp), %eax
	cltq
	movsd	-16032(%rbp,%rax,8), %xmm0
	movl	-16068(%rbp), %eax
	cltq
	movsd	-8032(%rbp,%rax,8), %xmm2
	subsd	%xmm2, %xmm0
	mulsd	%xmm0, %xmm1
	movl	-16068(%rbp), %eax
	cltq
	movsd	-16032(%rbp,%rax,8), %xmm0
	movl	-16068(%rbp), %eax
	cltq
	movsd	-8032(%rbp,%rax,8), %xmm2
	subsd	%xmm2, %xmm0
	mulsd	%xmm1, %xmm0
	movsd	-16048(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -16048(%rbp)
	movl	-16068(%rbp), %eax
	cltq
	movsd	-16032(%rbp,%rax,8), %xmm0
	movl	-16068(%rbp), %eax
	cltq
	movsd	-8032(%rbp,%rax,8), %xmm1
	subsd	%xmm1, %xmm0
	comisd	-16040(%rbp), %xmm0
	jbe	.L9
	movl	-16068(%rbp), %eax
	cltq
	movsd	-16032(%rbp,%rax,8), %xmm0
	movl	-16068(%rbp), %eax
	cltq
	movsd	-8032(%rbp,%rax,8), %xmm1
	subsd	%xmm1, %xmm0
	movsd	%xmm0, -16040(%rbp)
.L9:
	addl	$1, -16068(%rbp)
.L8:
	movl	-16072(%rbp), %eax
	cmpl	%eax, -16068(%rbp)
	jl	.L11
	movsd	.LC4(%rip), %xmm0
	movq	-16048(%rbp), %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movq	%xmm0, %rbx
	movq	-16056(%rbp), %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	movq	%xmm0, %rdx
	movsd	-16040(%rbp), %xmm0
	movq	-16064(%rbp), %rax
	movapd	%xmm0, %xmm3
	movq	%rbx, %xmm2
	movq	%rdx, %xmm1
	movq	%rax, %xmm0
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$4, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 16
.LC3:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.align 8
.LC4:
	.long	1431655765
	.long	1070945621
	.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"
.LC2:
	.string	"%lf"
.LC5:
	.string	"%f\n%f\n%f\n%f\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
	pushq	%rbx
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$3784, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -16064(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -16056(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -16048(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -16040(%rbp)
	leaq	-16072(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16068(%rbp)
	jmp	.L2
.L3:
	leaq	-16032(%rbp), %rdx
	movl	-16068(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -16068(%rbp)
.L2:
	movl	-16072(%rbp), %eax
	cmpl	%eax, -16068(%rbp)
	jl	.L3
	movl	$0, -16068(%rbp)
	jmp	.L4
.L7:
	leaq	-8032(%rbp), %rdx
	movl	-16068(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-16068(%rbp), %eax
	cltq
	movsd	-16032(%rbp,%rax,8), %xmm1
	movl	-16068(%rbp), %eax
	cltq
	movsd	-8032(%rbp,%rax,8), %xmm0
	comisd	%xmm1, %xmm0
	jbe	.L5
	movl	-16068(%rbp), %eax
	cltq
	movsd	-16032(%rbp,%rax,8), %xmm0
	movq	.LC3(%rip), %xmm1
	xorpd	%xmm1, %xmm0
	movl	-16068(%rbp), %eax
	cltq
	movsd	%xmm0, -16032(%rbp,%rax,8)
	movl	-16068(%rbp), %eax
	cltq
	movsd	-8032(%rbp,%rax,8), %xmm0
	movq	.LC3(%rip), %xmm1
	xorpd	%xmm1, %xmm0
	movl	-16068(%rbp), %eax
	cltq
	movsd	%xmm0, -8032(%rbp,%rax,8)
	movl	-16068(%rbp), %eax
	cltq
	movsd	-16032(%rbp,%rax,8), %xmm0
	movl	-16068(%rbp), %eax
	cltq
	movsd	-8032(%rbp,%rax,8), %xmm1
	subsd	%xmm1, %xmm0
	movsd	%xmm0, -16040(%rbp)
.L5:
	addl	$1, -16068(%rbp)
.L4:
	movl	-16072(%rbp), %eax
	cmpl	%eax, -16068(%rbp)
	jl	.L7
	movl	$0, -16068(%rbp)
	jmp	.L8
.L11:
	movl	-16068(%rbp), %eax
	cltq
	movsd	-16032(%rbp,%rax,8), %xmm0
	movl	-16068(%rbp), %eax
	cltq
	movsd	-8032(%rbp,%rax,8), %xmm1
	subsd	%xmm1, %xmm0
	movsd	-16064(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -16064(%rbp)
	movl	-16068(%rbp), %eax
	cltq
	movsd	-16032(%rbp,%rax,8), %xmm0
	movl	-16068(%rbp), %eax
	cltq
	movsd	-8032(%rbp,%rax,8), %xmm2
	movapd	%xmm0, %xmm1
	subsd	%xmm2, %xmm1
	movl	-16068(%rbp), %eax
	cltq
	movsd	-16032(%rbp,%rax,8), %xmm0
	movl	-16068(%rbp), %eax
	cltq
	movsd	-8032(%rbp,%rax,8), %xmm2
	subsd	%xmm2, %xmm0
	mulsd	%xmm1, %xmm0
	movsd	-16056(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -16056(%rbp)
	movl	-16068(%rbp), %eax
	cltq
	movsd	-16032(%rbp,%rax,8), %xmm0
	movl	-16068(%rbp), %eax
	cltq
	movsd	-8032(%rbp,%rax,8), %xmm2
	movapd	%xmm0, %xmm1
	subsd	%xmm2, %xmm1
	movl	-16068(%rbp), %eax
	cltq
	movsd	-16032(%rbp,%rax,8), %xmm0
	movl	-16068(%rbp), %eax
	cltq
	movsd	-8032(%rbp,%rax,8), %xmm2
	subsd	%xmm2, %xmm0
	mulsd	%xmm0, %xmm1
	movl	-16068(%rbp), %eax
	cltq
	movsd	-16032(%rbp,%rax,8), %xmm0
	movl	-16068(%rbp), %eax
	cltq
	movsd	-8032(%rbp,%rax,8), %xmm2
	subsd	%xmm2, %xmm0
	mulsd	%xmm1, %xmm0
	movsd	-16048(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -16048(%rbp)
	movl	-16068(%rbp), %eax
	cltq
	movsd	-16032(%rbp,%rax,8), %xmm0
	movl	-16068(%rbp), %eax
	cltq
	movsd	-8032(%rbp,%rax,8), %xmm1
	subsd	%xmm1, %xmm0
	comisd	-16040(%rbp), %xmm0
	jbe	.L9
	movl	-16068(%rbp), %eax
	cltq
	movsd	-16032(%rbp,%rax,8), %xmm0
	movl	-16068(%rbp), %eax
	cltq
	movsd	-8032(%rbp,%rax,8), %xmm1
	subsd	%xmm1, %xmm0
	movsd	%xmm0, -16040(%rbp)
.L9:
	addl	$1, -16068(%rbp)
.L8:
	movl	-16072(%rbp), %eax
	cmpl	%eax, -16068(%rbp)
	jl	.L11
	movsd	.LC4(%rip), %xmm0
	movq	-16048(%rbp), %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movq	%xmm0, %rbx
	movq	-16056(%rbp), %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	movq	%xmm0, %rdx
	movsd	-16040(%rbp), %xmm0
	movq	-16064(%rbp), %rax
	movapd	%xmm0, %xmm3
	movq	%rbx, %xmm2
	movq	%rdx, %xmm1
	movq	%rax, %xmm0
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$4, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 16
.LC3:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.align 8
.LC4:
	.long	1431655765
	.long	1070945621
	.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:
