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)
{
double x[100], y, max = 0.0, D1 = 0.0, D2 = 0.0, D3 = 0.0;
int n, i;
  
scanf("%d", &n);
  
for (i = 0; i < n; i++) {
scanf("%lf", &x[i]);
}
  
for (i = 0; i < n; i++) {
scanf("%lf", &y);
x[i] = x[i] - y;
if (x[i] < 0) x[i] = -x[i];
if (x[i] > max) max = x[i];
}
  
for (i = 0; i < n; i++) {
D1 += y = x[i];
D2 += y *= y;
D3 += x[i] * y;
}
printf("%20.8lf\n", D1);
printf("%20.8lf\n", sqrt(D2));
printf("%20.8lf\n", cbrt(D3));
printf("%20.8lf\n", max);
  
return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC1:
	.string	"%d"
.LC2:
	.string	"%lf"
.LC4:
	.string	"%20.8lf\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	$864, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -848(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -840(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -832(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -824(%rbp)
	leaq	-864(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -860(%rbp)
	jmp	.L2
.L3:
	leaq	-816(%rbp), %rdx
	movl	-860(%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, -860(%rbp)
.L2:
	movl	-864(%rbp), %eax
	cmpl	%eax, -860(%rbp)
	jl	.L3
	movl	$0, -860(%rbp)
	jmp	.L4
.L9:
	leaq	-856(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-860(%rbp), %eax
	cltq
	movsd	-816(%rbp,%rax,8), %xmm0
	movsd	-856(%rbp), %xmm1
	subsd	%xmm1, %xmm0
	movl	-860(%rbp), %eax
	cltq
	movsd	%xmm0, -816(%rbp,%rax,8)
	movl	-860(%rbp), %eax
	cltq
	movsd	-816(%rbp,%rax,8), %xmm1
	pxor	%xmm0, %xmm0
	comisd	%xmm1, %xmm0
	jbe	.L5
	movl	-860(%rbp), %eax
	cltq
	movsd	-816(%rbp,%rax,8), %xmm0
	movq	.LC3(%rip), %xmm1
	xorpd	%xmm1, %xmm0
	movl	-860(%rbp), %eax
	cltq
	movsd	%xmm0, -816(%rbp,%rax,8)
.L5:
	movl	-860(%rbp), %eax
	cltq
	movsd	-816(%rbp,%rax,8), %xmm0
	comisd	-848(%rbp), %xmm0
	jbe	.L7
	movl	-860(%rbp), %eax
	cltq
	movsd	-816(%rbp,%rax,8), %xmm0
	movsd	%xmm0, -848(%rbp)
.L7:
	addl	$1, -860(%rbp)
.L4:
	movl	-864(%rbp), %eax
	cmpl	%eax, -860(%rbp)
	jl	.L9
	movl	$0, -860(%rbp)
	jmp	.L10
.L11:
	movl	-860(%rbp), %eax
	cltq
	movsd	-816(%rbp,%rax,8), %xmm0
	movsd	%xmm0, -856(%rbp)
	movsd	-856(%rbp), %xmm0
	movsd	-840(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -840(%rbp)
	movsd	-856(%rbp), %xmm1
	movsd	-856(%rbp), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	%xmm0, -856(%rbp)
	movsd	-856(%rbp), %xmm0
	movsd	-832(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -832(%rbp)
	movl	-860(%rbp), %eax
	cltq
	movsd	-816(%rbp,%rax,8), %xmm1
	movsd	-856(%rbp), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	-824(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -824(%rbp)
	addl	$1, -860(%rbp)
.L10:
	movl	-864(%rbp), %eax
	cmpl	%eax, -860(%rbp)
	jl	.L11
	movq	-840(%rbp), %rax
	movq	%rax, %xmm0
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	movq	-832(%rbp), %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	movq	-824(%rbp), %rax
	movq	%rax, %xmm0
	call	cbrt@PLT
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	movq	-848(%rbp), %rax
	movq	%rax, %xmm0
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %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 16
.LC3:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.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"
.LC4:
	.string	"%20.8lf\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
	leaq	.LC1(%rip), %rdi
	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	$872, %rsp
	.cfi_def_cfa_offset 928
	movq	%fs:40, %rax
	movq	%rax, 856(%rsp)
	xorl	%eax, %eax
	leaq	36(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	48(%rsp), %r13
	xorl	%ebx, %ebx
	leaq	.LC2(%rip), %r12
	movq	%r13, %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %eax
	addq	$8, %rbp
	cmpl	%ebx, %eax
	jg	.L3
	testl	%eax, %eax
	jle	.L2
	pxor	%xmm4, %xmm4
	movq	%r13, %rbx
	leaq	40(%rsp), %r14
	xorl	%ebp, %ebp
	movq	%xmm4, %r15
	movsd	%xmm4, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L8:
	xorl	%eax, %eax
	movq	%r14, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	movsd	(%rbx), %xmm0
	subsd	40(%rsp), %xmm0
	movq	%r15, %xmm6
	comisd	%xmm0, %xmm6
	jbe	.L27
	xorpd	.LC3(%rip), %xmm0
.L27:
	movsd	%xmm0, (%rbx)
	movl	36(%rsp), %eax
	addl	$1, %ebp
	addq	$8, %rbx
	maxsd	8(%rsp), %xmm0
	movsd	%xmm0, 8(%rsp)
	cmpl	%ebp, %eax
	jg	.L8
	testl	%eax, %eax
	jle	.L9
	cmpl	$1, %eax
	je	.L18
	movl	%eax, %edx
	movq	%r15, %xmm4
	movq	%r15, %xmm3
	shrl	%edx
	movq	%r15, %xmm0
	leal	-1(%rdx), %ecx
	leaq	16(%r13), %rdx
	salq	$4, %rcx
	addq	%rdx, %rcx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L29:
	addq	$16, %rdx
.L11:
	movapd	0(%r13), %xmm1
	movq	%rdx, %r13
	movapd	%xmm1, %xmm5
	addsd	%xmm1, %xmm0
	movapd	%xmm1, %xmm6
	mulpd	%xmm1, %xmm5
	unpckhpd	%xmm6, %xmm6
	addsd	%xmm6, %xmm0
	mulpd	%xmm5, %xmm1
	addsd	%xmm5, %xmm3
	movapd	%xmm5, %xmm7
	unpckhpd	%xmm7, %xmm7
	movapd	%xmm7, %xmm2
	addsd	%xmm7, %xmm3
	addsd	%xmm1, %xmm4
	unpckhpd	%xmm1, %xmm1
	addsd	%xmm1, %xmm4
	cmpq	%rdx, %rcx
	jne	.L29
	movl	%eax, %edx
	andl	$-2, %edx
	testb	$1, %al
	je	.L12
.L10:
	movslq	%edx, %rax
	movsd	48(%rsp,%rax,8), %xmm1
	movapd	%xmm1, %xmm2
	addsd	%xmm1, %xmm0
	mulsd	%xmm1, %xmm2
	mulsd	%xmm2, %xmm1
	addsd	%xmm2, %xmm3
	addsd	%xmm1, %xmm4
.L12:
	movl	$1, %edi
	leaq	.LC4(%rip), %rbp
	movl	$1, %eax
	movsd	%xmm4, 24(%rsp)
	movq	%rbp, %rsi
	movsd	%xmm3, 16(%rsp)
	movsd	%xmm2, 40(%rsp)
	call	__printf_chk@PLT
	movsd	16(%rsp), %xmm3
	movq	%r15, %xmm6
	movsd	24(%rsp), %xmm4
	ucomisd	%xmm3, %xmm6
	ja	.L24
.L16:
	sqrtsd	%xmm3, %xmm3
	movapd	%xmm3, %xmm0
.L15:
	movq	%rbp, %rsi
	movl	$1, %edi
	movl	$1, %eax
	movsd	%xmm4, 16(%rsp)
	call	__printf_chk@PLT
	movsd	16(%rsp), %xmm4
	movapd	%xmm4, %xmm0
	call	cbrt@PLT
	movq	%rbp, %rsi
	movl	$1, %edi
	movl	$1, %eax
	call	__printf_chk@PLT
	movsd	8(%rsp), %xmm0
	movq	%rbp, %rsi
	movl	$1, %edi
	movl	$1, %eax
	call	__printf_chk@PLT
	movq	856(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$872, %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	%xmm3, %xmm3
	movq	%xmm3, %r15
	movsd	%xmm3, 8(%rsp)
.L9:
	movq	%r15, %xmm0
	movl	$1, %edi
	movl	$1, %eax
	leaq	.LC4(%rip), %rbp
	movq	%rbp, %rsi
	call	__printf_chk@PLT
	movq	%r15, %xmm4
	movq	%r15, %xmm3
	jmp	.L16
.L18:
	xorl	%edx, %edx
	movq	%r15, %xmm4
	movq	%r15, %xmm3
	movq	%r15, %xmm0
	jmp	.L10
.L24:
	movapd	%xmm3, %xmm0
	movsd	%xmm4, 16(%rsp)
	call	sqrt@PLT
	movsd	16(%rsp), %xmm4
	jmp	.L15
.L30:
	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
	.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"
.LC4:
	.string	"%20.8lf\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
	leaq	.LC1(%rip), %rdi
	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	$872, %rsp
	.cfi_def_cfa_offset 928
	movq	%fs:40, %rax
	movq	%rax, 856(%rsp)
	xorl	%eax, %eax
	leaq	36(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	48(%rsp), %r13
	xorl	%ebx, %ebx
	leaq	.LC2(%rip), %r12
	movq	%r13, %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %eax
	addq	$8, %rbp
	cmpl	%ebx, %eax
	jg	.L3
	testl	%eax, %eax
	jle	.L2
	pxor	%xmm4, %xmm4
	movq	%r13, %rbx
	leaq	40(%rsp), %r14
	xorl	%ebp, %ebp
	movq	%xmm4, %r15
	movsd	%xmm4, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L8:
	xorl	%eax, %eax
	movq	%r14, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	movsd	(%rbx), %xmm0
	subsd	40(%rsp), %xmm0
	movq	%r15, %xmm6
	comisd	%xmm0, %xmm6
	jbe	.L27
	xorpd	.LC3(%rip), %xmm0
.L27:
	movsd	%xmm0, (%rbx)
	movl	36(%rsp), %eax
	addl	$1, %ebp
	addq	$8, %rbx
	maxsd	8(%rsp), %xmm0
	movsd	%xmm0, 8(%rsp)
	cmpl	%ebp, %eax
	jg	.L8
	testl	%eax, %eax
	jle	.L9
	cmpl	$1, %eax
	je	.L18
	movl	%eax, %edx
	movq	%r15, %xmm4
	movq	%r15, %xmm3
	shrl	%edx
	movq	%r15, %xmm0
	leal	-1(%rdx), %ecx
	leaq	16(%r13), %rdx
	salq	$4, %rcx
	addq	%rdx, %rcx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L29:
	addq	$16, %rdx
.L11:
	movapd	0(%r13), %xmm1
	movq	%rdx, %r13
	movapd	%xmm1, %xmm5
	addsd	%xmm1, %xmm0
	movapd	%xmm1, %xmm6
	mulpd	%xmm1, %xmm5
	unpckhpd	%xmm6, %xmm6
	addsd	%xmm6, %xmm0
	mulpd	%xmm5, %xmm1
	addsd	%xmm5, %xmm3
	movapd	%xmm5, %xmm7
	unpckhpd	%xmm7, %xmm7
	movapd	%xmm7, %xmm2
	addsd	%xmm7, %xmm3
	addsd	%xmm1, %xmm4
	unpckhpd	%xmm1, %xmm1
	addsd	%xmm1, %xmm4
	cmpq	%rdx, %rcx
	jne	.L29
	movl	%eax, %edx
	andl	$-2, %edx
	testb	$1, %al
	je	.L12
.L10:
	movslq	%edx, %rax
	movsd	48(%rsp,%rax,8), %xmm1
	movapd	%xmm1, %xmm2
	addsd	%xmm1, %xmm0
	mulsd	%xmm1, %xmm2
	mulsd	%xmm2, %xmm1
	addsd	%xmm2, %xmm3
	addsd	%xmm1, %xmm4
.L12:
	movl	$1, %edi
	leaq	.LC4(%rip), %rbp
	movl	$1, %eax
	movsd	%xmm4, 24(%rsp)
	movq	%rbp, %rsi
	movsd	%xmm3, 16(%rsp)
	movsd	%xmm2, 40(%rsp)
	call	__printf_chk@PLT
	movsd	16(%rsp), %xmm3
	movq	%r15, %xmm6
	movsd	24(%rsp), %xmm4
	ucomisd	%xmm3, %xmm6
	ja	.L24
.L16:
	sqrtsd	%xmm3, %xmm3
	movapd	%xmm3, %xmm0
.L15:
	movq	%rbp, %rsi
	movl	$1, %edi
	movl	$1, %eax
	movsd	%xmm4, 16(%rsp)
	call	__printf_chk@PLT
	movsd	16(%rsp), %xmm4
	movapd	%xmm4, %xmm0
	call	cbrt@PLT
	movq	%rbp, %rsi
	movl	$1, %edi
	movl	$1, %eax
	call	__printf_chk@PLT
	movsd	8(%rsp), %xmm0
	movq	%rbp, %rsi
	movl	$1, %edi
	movl	$1, %eax
	call	__printf_chk@PLT
	movq	856(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$872, %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	%xmm3, %xmm3
	movq	%xmm3, %r15
	movsd	%xmm3, 8(%rsp)
.L9:
	movq	%r15, %xmm0
	movl	$1, %edi
	movl	$1, %eax
	leaq	.LC4(%rip), %rbp
	movq	%rbp, %rsi
	call	__printf_chk@PLT
	movq	%r15, %xmm4
	movq	%r15, %xmm3
	jmp	.L16
.L18:
	xorl	%edx, %edx
	movq	%r15, %xmm4
	movq	%r15, %xmm3
	movq	%r15, %xmm0
	jmp	.L10
.L24:
	movapd	%xmm3, %xmm0
	movsd	%xmm4, 16(%rsp)
	call	sqrt@PLT
	movsd	16(%rsp), %xmm4
	jmp	.L15
.L30:
	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
	.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)
{
double x[100], y, max = 0.0, D1 = 0.0, D2 = 0.0, D3 = 0.0;
int n, i;
  
scanf("%d", &n);
  
for (i = 0; i < n; i++) {
scanf("%lf", &x[i]);
}
  
for (i = 0; i < n; i++) {
scanf("%lf", &y);
x[i] = x[i] - y;
if (x[i] < 0) x[i] = -x[i];
if (x[i] > max) max = x[i];
}
  
for (i = 0; i < n; i++) {
D1 += y = x[i];
D2 += y *= y;
D3 += x[i] * y;
}
printf("%20.8lf\n", D1);
printf("%20.8lf\n", sqrt(D2));
printf("%20.8lf\n", cbrt(D3));
printf("%20.8lf\n", 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.00000000
          2.23606798
          2.08008382
          2.00000000
           4.00000000
          3.16227766
          3.03658897
          3.00000000
           6.00000000
          5.09901951
          5.01329793
          5.00000000
           7.00000000
          5.19615242
          5.02652570
          5.00000000
          10.00000000
          6.48074070
          5.74889708
          5.00000000
          11.00000000
          7.28010989
          6.54991162
          6.00000000
          12.00000000
          7.48331477
          6.60385450
          6.00000000
          15.00000000
          8.77496439
          7.39863622
          6.00000000
          14.00000000
          8.36660027
          7.16609574
          6.00000000
          16.00000000
          9.89949494
          8.72414134
          8.00000000

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)
{
double x[100], y, max = 0.0, D1 = 0.0, D2 = 0.0, D3 = 0.0;
int n, i;
  
scanf("%d", &n);
  
for (i = 0; i < n; i++) {
scanf("%lf", &x[i]);
}
  
for (i = 0; i < n; i++) {
scanf("%lf", &y);
x[i] = x[i] - y;
if (x[i] < 0) x[i] = -x[i];
if (x[i] > max) max = x[i];
}
  
for (i = 0; i < n; i++) {
D1 += y = x[i];
D2 += y *= y;
D3 += x[i] * y;
}
printf("%20.8lf\n", D1);
printf("%20.8lf\n", sqrt(D2));
printf("%20.8lf\n", cbrt(D3));
printf("%20.8lf\n", max);
  
return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC1:
	.string	"%d"
.LC2:
	.string	"%lf"
.LC4:
	.string	"%20.8lf\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	$864, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -848(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -840(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -832(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -824(%rbp)
	leaq	-864(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -860(%rbp)
	jmp	.L2
.L3:
	leaq	-816(%rbp), %rdx
	movl	-860(%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, -860(%rbp)
.L2:
	movl	-864(%rbp), %eax
	cmpl	%eax, -860(%rbp)
	jl	.L3
	movl	$0, -860(%rbp)
	jmp	.L4
.L9:
	leaq	-856(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-860(%rbp), %eax
	cltq
	movsd	-816(%rbp,%rax,8), %xmm0
	movsd	-856(%rbp), %xmm1
	subsd	%xmm1, %xmm0
	movl	-860(%rbp), %eax
	cltq
	movsd	%xmm0, -816(%rbp,%rax,8)
	movl	-860(%rbp), %eax
	cltq
	movsd	-816(%rbp,%rax,8), %xmm1
	pxor	%xmm0, %xmm0
	comisd	%xmm1, %xmm0
	jbe	.L5
	movl	-860(%rbp), %eax
	cltq
	movsd	-816(%rbp,%rax,8), %xmm0
	movq	.LC3(%rip), %xmm1
	xorpd	%xmm1, %xmm0
	movl	-860(%rbp), %eax
	cltq
	movsd	%xmm0, -816(%rbp,%rax,8)
.L5:
	movl	-860(%rbp), %eax
	cltq
	movsd	-816(%rbp,%rax,8), %xmm0
	comisd	-848(%rbp), %xmm0
	jbe	.L7
	movl	-860(%rbp), %eax
	cltq
	movsd	-816(%rbp,%rax,8), %xmm0
	movsd	%xmm0, -848(%rbp)
.L7:
	addl	$1, -860(%rbp)
.L4:
	movl	-864(%rbp), %eax
	cmpl	%eax, -860(%rbp)
	jl	.L9
	movl	$0, -860(%rbp)
	jmp	.L10
.L11:
	movl	-860(%rbp), %eax
	cltq
	movsd	-816(%rbp,%rax,8), %xmm0
	movsd	%xmm0, -856(%rbp)
	movsd	-856(%rbp), %xmm0
	movsd	-840(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -840(%rbp)
	movsd	-856(%rbp), %xmm1
	movsd	-856(%rbp), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	%xmm0, -856(%rbp)
	movsd	-856(%rbp), %xmm0
	movsd	-832(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -832(%rbp)
	movl	-860(%rbp), %eax
	cltq
	movsd	-816(%rbp,%rax,8), %xmm1
	movsd	-856(%rbp), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	-824(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -824(%rbp)
	addl	$1, -860(%rbp)
.L10:
	movl	-864(%rbp), %eax
	cmpl	%eax, -860(%rbp)
	jl	.L11
	movq	-840(%rbp), %rax
	movq	%rax, %xmm0
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	movq	-832(%rbp), %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	movq	-824(%rbp), %rax
	movq	%rax, %xmm0
	call	cbrt@PLT
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	movq	-848(%rbp), %rax
	movq	%rax, %xmm0
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %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 16
.LC3:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.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.
val
	.file	"temp.c"
	.text
	.section	.rodata
.LC1:
	.string	"%d"
.LC2:
	.string	"%lf"
.LC4:
	.string	"%20.8lf\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	$864, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -848(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -840(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -832(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -824(%rbp)
	leaq	-864(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -860(%rbp)
	jmp	.L2
.L3:
	leaq	-816(%rbp), %rdx
	movl	-860(%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, -860(%rbp)
.L2:
	movl	-864(%rbp), %eax
	cmpl	%eax, -860(%rbp)
	jl	.L3
	movl	$0, -860(%rbp)
	jmp	.L4
.L9:
	leaq	-856(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-860(%rbp), %eax
	cltq
	movsd	-816(%rbp,%rax,8), %xmm0
	movsd	-856(%rbp), %xmm1
	subsd	%xmm1, %xmm0
	movl	-860(%rbp), %eax
	cltq
	movsd	%xmm0, -816(%rbp,%rax,8)
	movl	-860(%rbp), %eax
	cltq
	movsd	-816(%rbp,%rax,8), %xmm1
	pxor	%xmm0, %xmm0
	comisd	%xmm1, %xmm0
	jbe	.L5
	movl	-860(%rbp), %eax
	cltq
	movsd	-816(%rbp,%rax,8), %xmm0
	movq	.LC3(%rip), %xmm1
	xorpd	%xmm1, %xmm0
	movl	-860(%rbp), %eax
	cltq
	movsd	%xmm0, -816(%rbp,%rax,8)
.L5:
	movl	-860(%rbp), %eax
	cltq
	movsd	-816(%rbp,%rax,8), %xmm0
	comisd	-848(%rbp), %xmm0
	jbe	.L7
	movl	-860(%rbp), %eax
	cltq
	movsd	-816(%rbp,%rax,8), %xmm0
	movsd	%xmm0, -848(%rbp)
.L7:
	addl	$1, -860(%rbp)
.L4:
	movl	-864(%rbp), %eax
	cmpl	%eax, -860(%rbp)
	jl	.L9
	movl	$0, -860(%rbp)
	jmp	.L10
.L11:
	movl	-860(%rbp), %eax
	cltq
	movsd	-816(%rbp,%rax,8), %xmm0
	movsd	%xmm0, -856(%rbp)
	movsd	-856(%rbp), %xmm0
	movsd	-840(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -840(%rbp)
	movsd	-856(%rbp), %xmm1
	movsd	-856(%rbp), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	%xmm0, -856(%rbp)
	movsd	-856(%rbp), %xmm0
	movsd	-832(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -832(%rbp)
	movl	-860(%rbp), %eax
	cltq
	movsd	-816(%rbp,%rax,8), %xmm1
	movsd	-856(%rbp), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	-824(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -824(%rbp)
	addl	$1, -860(%rbp)
.L10:
	movl	-864(%rbp), %eax
	cmpl	%eax, -860(%rbp)
	jl	.L11
	movq	-840(%rbp), %rax
	movq	%rax, %xmm0
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	movq	-832(%rbp), %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	movq	-824(%rbp), %rax
	movq	%rax, %xmm0
	call	cbrt@PLT
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	movq	-848(%rbp), %rax
	movq	%rax, %xmm0
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %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 16
.LC3:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.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:
