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>
#include <math.h>
#define lop(i, n) for(i=0; i<n; i++)

int main()
{
	int N, i, j;
	float sum=0;
	int x[8], y[8];
	
	scanf("%d", &N);
	lop(i, N){
		scanf("%d %d", &x[i], &y[i]);
	}
	
	for(i=0; i<N; i++){
		for(j=i+1; j<N; j++){
			sum+=sqrt(pow(x[i]-x[j],2.0)+pow(y[i]-y[j],2.0));
		}
	}
	
	printf("%f", sum/N*2);
	
return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC1:
	.string	"%d"
.LC2:
	.string	"%d %d"
.LC4:
	.string	"%f"
	.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	$112, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	pxor	%xmm0, %xmm0
	movss	%xmm0, -84(%rbp)
	leaq	-96(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -92(%rbp)
	jmp	.L2
.L3:
	leaq	-48(%rbp), %rdx
	movl	-92(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-80(%rbp), %rcx
	movl	-92(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -92(%rbp)
.L2:
	movl	-96(%rbp), %eax
	cmpl	%eax, -92(%rbp)
	jl	.L3
	movl	$0, -92(%rbp)
	jmp	.L4
.L7:
	movl	-92(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -88(%rbp)
	jmp	.L5
.L6:
	movl	-92(%rbp), %eax
	cltq
	movl	-80(%rbp,%rax,4), %edx
	movl	-88(%rbp), %eax
	cltq
	movl	-80(%rbp,%rax,4), %eax
	subl	%eax, %edx
	pxor	%xmm3, %xmm3
	cvtsi2sdl	%edx, %xmm3
	movq	%xmm3, %rax
	movsd	.LC3(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movsd	%xmm0, -104(%rbp)
	movl	-92(%rbp), %eax
	cltq
	movl	-48(%rbp,%rax,4), %edx
	movl	-88(%rbp), %eax
	cltq
	movl	-48(%rbp,%rax,4), %eax
	subl	%eax, %edx
	pxor	%xmm4, %xmm4
	cvtsi2sdl	%edx, %xmm4
	movq	%xmm4, %rax
	movsd	.LC3(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movapd	%xmm0, %xmm2
	addsd	-104(%rbp), %xmm2
	movq	%xmm2, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	pxor	%xmm1, %xmm1
	cvtss2sd	-84(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, -84(%rbp)
	addl	$1, -88(%rbp)
.L5:
	movl	-96(%rbp), %eax
	cmpl	%eax, -88(%rbp)
	jl	.L6
	addl	$1, -92(%rbp)
.L4:
	movl	-96(%rbp), %eax
	cmpl	%eax, -92(%rbp)
	jl	.L7
	movl	-96(%rbp), %eax
	pxor	%xmm1, %xmm1
	cvtsi2ssl	%eax, %xmm1
	movss	-84(%rbp), %xmm0
	divss	%xmm1, %xmm0
	addss	%xmm0, %xmm0
	pxor	%xmm6, %xmm6
	cvtss2sd	%xmm0, %xmm6
	movq	%xmm6, %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	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC3:
	.long	0
	.long	1073741824
	.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	"%d %d"
.LC4:
	.string	"%f"
	.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
	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	$120, %rsp
	.cfi_def_cfa_offset 176
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %r12d
	testl	%r12d, %r12d
	jle	.L26
	leaq	32(%rsp), %rbp
	xorl	%r13d, %r13d
	leaq	64(%rsp), %r14
	movq	%rbp, %r15
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%r14,%r13,4), %rdx
	movq	%r15, %rsi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$1, %r13
	movq	%r14, %rbx
	addq	$4, %r15
	movl	28(%rsp), %r12d
	cmpl	%r13d, %r12d
	jg	.L3
	testl	%r12d, %r12d
	jle	.L26
	pxor	%xmm1, %xmm1
	movl	$1, %r15d
	pxor	%xmm2, %xmm2
	cmpl	$1, %r12d
	jne	.L4
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L40:
	movl	%r14d, %edx
	pxor	%xmm3, %xmm3
	pxor	%xmm0, %xmm0
	subl	8(%rbp), %edx
	cvtsi2sdl	%edx, %xmm3
	movl	%r13d, %edx
	subl	8(%rbx), %edx
	cvtsi2sdl	%edx, %xmm0
	mulsd	%xmm3, %xmm3
	mulsd	%xmm0, %xmm0
	addsd	%xmm3, %xmm0
	ucomisd	%xmm0, %xmm2
	ja	.L34
	sqrtsd	%xmm0, %xmm0
.L9:
	cvtss2sd	%xmm1, %xmm1
	addsd	%xmm0, %xmm1
	leal	2(%r15), %edx
	cvtsd2ss	%xmm1, %xmm1
	cmpl	%edx, %r12d
	jle	.L10
	movl	%r14d, %edx
	pxor	%xmm0, %xmm0
	pxor	%xmm3, %xmm3
	subl	12(%rbp), %edx
	cvtsi2sdl	%edx, %xmm0
	movl	%r13d, %edx
	subl	12(%rbx), %edx
	cvtsi2sdl	%edx, %xmm3
	mulsd	%xmm0, %xmm0
	mulsd	%xmm3, %xmm3
	addsd	%xmm3, %xmm0
	ucomisd	%xmm0, %xmm2
	ja	.L35
	sqrtsd	%xmm0, %xmm0
.L12:
	cvtss2sd	%xmm1, %xmm1
	addsd	%xmm0, %xmm1
	leal	3(%r15), %edx
	cvtsd2ss	%xmm1, %xmm1
	cmpl	%edx, %r12d
	jle	.L10
	movl	%r14d, %edx
	pxor	%xmm0, %xmm0
	pxor	%xmm3, %xmm3
	subl	16(%rbp), %edx
	cvtsi2sdl	%edx, %xmm0
	movl	%r13d, %edx
	subl	16(%rbx), %edx
	cvtsi2sdl	%edx, %xmm3
	mulsd	%xmm0, %xmm0
	mulsd	%xmm3, %xmm3
	addsd	%xmm3, %xmm0
	ucomisd	%xmm0, %xmm2
	ja	.L36
	sqrtsd	%xmm0, %xmm0
.L14:
	cvtss2sd	%xmm1, %xmm1
	addsd	%xmm0, %xmm1
	leal	4(%r15), %edx
	cvtsd2ss	%xmm1, %xmm1
	cmpl	%edx, %r12d
	jle	.L10
	movl	%r14d, %edx
	pxor	%xmm0, %xmm0
	pxor	%xmm3, %xmm3
	subl	20(%rbp), %edx
	cvtsi2sdl	%edx, %xmm0
	movl	%r13d, %edx
	subl	20(%rbx), %edx
	cvtsi2sdl	%edx, %xmm3
	mulsd	%xmm0, %xmm0
	mulsd	%xmm3, %xmm3
	addsd	%xmm3, %xmm0
	ucomisd	%xmm0, %xmm2
	ja	.L37
	sqrtsd	%xmm0, %xmm0
.L16:
	cvtss2sd	%xmm1, %xmm1
	addsd	%xmm0, %xmm1
	leal	5(%r15), %edx
	cvtsd2ss	%xmm1, %xmm1
	cmpl	%edx, %r12d
	jle	.L10
	movl	%r14d, %edx
	pxor	%xmm0, %xmm0
	pxor	%xmm3, %xmm3
	subl	24(%rbp), %edx
	cvtsi2sdl	%edx, %xmm0
	movl	%r13d, %edx
	subl	24(%rbx), %edx
	cvtsi2sdl	%edx, %xmm3
	mulsd	%xmm0, %xmm0
	mulsd	%xmm3, %xmm3
	addsd	%xmm3, %xmm0
	ucomisd	%xmm0, %xmm2
	ja	.L38
	sqrtsd	%xmm0, %xmm0
.L18:
	cvtss2sd	%xmm1, %xmm1
	addsd	%xmm0, %xmm1
	addl	$6, %r15d
	cvtsd2ss	%xmm1, %xmm1
	cmpl	%r15d, %r12d
	jle	.L10
	subl	28(%rbp), %r14d
	pxor	%xmm3, %xmm3
	pxor	%xmm0, %xmm0
	subl	28(%rbx), %r13d
	cvtsi2sdl	%r14d, %xmm3
	cvtsi2sdl	%r13d, %xmm0
	mulsd	%xmm3, %xmm3
	mulsd	%xmm0, %xmm0
	addsd	%xmm3, %xmm0
	ucomisd	%xmm0, %xmm2
	ja	.L30
	sqrtsd	%xmm0, %xmm0
.L21:
	cvtss2sd	%xmm1, %xmm1
	addsd	%xmm0, %xmm1
	cvtsd2ss	%xmm1, %xmm1
.L10:
	addq	$4, %rbp
	addq	$4, %rbx
.L23:
	movl	%eax, %r15d
.L4:
	movl	0(%rbp), %r14d
	movl	(%rbx), %r13d
	pxor	%xmm3, %xmm3
	pxor	%xmm0, %xmm0
	movl	%r14d, %eax
	subl	4(%rbp), %eax
	cvtsi2sdl	%eax, %xmm3
	movl	%r13d, %eax
	subl	4(%rbx), %eax
	cvtsi2sdl	%eax, %xmm0
	mulsd	%xmm3, %xmm3
	mulsd	%xmm0, %xmm0
	addsd	%xmm3, %xmm0
	ucomisd	%xmm0, %xmm2
	ja	.L39
	sqrtsd	%xmm0, %xmm0
.L6:
	cvtss2sd	%xmm1, %xmm1
	addsd	%xmm0, %xmm1
	leal	1(%r15), %eax
	cvtsd2ss	%xmm1, %xmm1
	cmpl	%eax, %r12d
	jg	.L40
	addq	$4, %rbp
	addq	$4, %rbx
	cmpl	%eax, %r12d
	jne	.L23
.L2:
	pxor	%xmm0, %xmm0
	movl	$1, %edi
	movl	$1, %eax
	cvtsi2ssl	%r12d, %xmm0
	leaq	.LC4(%rip), %rsi
	divss	%xmm0, %xmm1
	pxor	%xmm0, %xmm0
	addss	%xmm1, %xmm1
	cvtss2sd	%xmm1, %xmm0
	call	__printf_chk@PLT
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L41
	addq	$120, %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
.L26:
	.cfi_restore_state
	pxor	%xmm1, %xmm1
	jmp	.L2
.L39:
	movss	%xmm1, 8(%rsp)
	call	sqrt@PLT
	movss	8(%rsp), %xmm1
	pxor	%xmm2, %xmm2
	jmp	.L6
.L41:
	call	__stack_chk_fail@PLT
.L30:
	movl	%eax, 8(%rsp)
	movss	%xmm1, 12(%rsp)
	call	sqrt@PLT
	movss	12(%rsp), %xmm1
	movl	8(%rsp), %eax
	pxor	%xmm2, %xmm2
	jmp	.L21
.L38:
	movl	%eax, 8(%rsp)
	movss	%xmm1, 12(%rsp)
	call	sqrt@PLT
	movl	8(%rsp), %eax
	movss	12(%rsp), %xmm1
	pxor	%xmm2, %xmm2
	jmp	.L18
.L37:
	movl	%eax, 8(%rsp)
	movss	%xmm1, 12(%rsp)
	call	sqrt@PLT
	movl	8(%rsp), %eax
	movss	12(%rsp), %xmm1
	pxor	%xmm2, %xmm2
	jmp	.L16
.L36:
	movl	%eax, 8(%rsp)
	movss	%xmm1, 12(%rsp)
	call	sqrt@PLT
	movl	8(%rsp), %eax
	movss	12(%rsp), %xmm1
	pxor	%xmm2, %xmm2
	jmp	.L14
.L35:
	movl	%eax, 8(%rsp)
	movss	%xmm1, 12(%rsp)
	call	sqrt@PLT
	movl	8(%rsp), %eax
	movss	12(%rsp), %xmm1
	pxor	%xmm2, %xmm2
	jmp	.L12
.L34:
	movl	%eax, 8(%rsp)
	movss	%xmm1, 12(%rsp)
	call	sqrt@PLT
	movl	8(%rsp), %eax
	movss	12(%rsp), %xmm1
	pxor	%xmm2, %xmm2
	jmp	.L9
	.cfi_endproc
.LFE35:
	.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:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%d %d"
.LC4:
	.string	"%f"
	.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
	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	$120, %rsp
	.cfi_def_cfa_offset 176
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %r12d
	testl	%r12d, %r12d
	jle	.L26
	leaq	32(%rsp), %rbp
	xorl	%r13d, %r13d
	leaq	64(%rsp), %r14
	movq	%rbp, %r15
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%r14,%r13,4), %rdx
	movq	%r15, %rsi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$1, %r13
	movq	%r14, %rbx
	addq	$4, %r15
	movl	28(%rsp), %r12d
	cmpl	%r13d, %r12d
	jg	.L3
	testl	%r12d, %r12d
	jle	.L26
	pxor	%xmm1, %xmm1
	movl	$1, %r15d
	pxor	%xmm2, %xmm2
	cmpl	$1, %r12d
	jne	.L4
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L40:
	movl	%r14d, %edx
	pxor	%xmm3, %xmm3
	pxor	%xmm0, %xmm0
	subl	8(%rbp), %edx
	cvtsi2sdl	%edx, %xmm3
	movl	%r13d, %edx
	subl	8(%rbx), %edx
	cvtsi2sdl	%edx, %xmm0
	mulsd	%xmm3, %xmm3
	mulsd	%xmm0, %xmm0
	addsd	%xmm3, %xmm0
	ucomisd	%xmm0, %xmm2
	ja	.L34
	sqrtsd	%xmm0, %xmm0
.L9:
	cvtss2sd	%xmm1, %xmm1
	addsd	%xmm0, %xmm1
	leal	2(%r15), %edx
	cvtsd2ss	%xmm1, %xmm1
	cmpl	%edx, %r12d
	jle	.L10
	movl	%r14d, %edx
	pxor	%xmm0, %xmm0
	pxor	%xmm3, %xmm3
	subl	12(%rbp), %edx
	cvtsi2sdl	%edx, %xmm0
	movl	%r13d, %edx
	subl	12(%rbx), %edx
	cvtsi2sdl	%edx, %xmm3
	mulsd	%xmm0, %xmm0
	mulsd	%xmm3, %xmm3
	addsd	%xmm3, %xmm0
	ucomisd	%xmm0, %xmm2
	ja	.L35
	sqrtsd	%xmm0, %xmm0
.L12:
	cvtss2sd	%xmm1, %xmm1
	addsd	%xmm0, %xmm1
	leal	3(%r15), %edx
	cvtsd2ss	%xmm1, %xmm1
	cmpl	%edx, %r12d
	jle	.L10
	movl	%r14d, %edx
	pxor	%xmm0, %xmm0
	pxor	%xmm3, %xmm3
	subl	16(%rbp), %edx
	cvtsi2sdl	%edx, %xmm0
	movl	%r13d, %edx
	subl	16(%rbx), %edx
	cvtsi2sdl	%edx, %xmm3
	mulsd	%xmm0, %xmm0
	mulsd	%xmm3, %xmm3
	addsd	%xmm3, %xmm0
	ucomisd	%xmm0, %xmm2
	ja	.L36
	sqrtsd	%xmm0, %xmm0
.L14:
	cvtss2sd	%xmm1, %xmm1
	addsd	%xmm0, %xmm1
	leal	4(%r15), %edx
	cvtsd2ss	%xmm1, %xmm1
	cmpl	%edx, %r12d
	jle	.L10
	movl	%r14d, %edx
	pxor	%xmm0, %xmm0
	pxor	%xmm3, %xmm3
	subl	20(%rbp), %edx
	cvtsi2sdl	%edx, %xmm0
	movl	%r13d, %edx
	subl	20(%rbx), %edx
	cvtsi2sdl	%edx, %xmm3
	mulsd	%xmm0, %xmm0
	mulsd	%xmm3, %xmm3
	addsd	%xmm3, %xmm0
	ucomisd	%xmm0, %xmm2
	ja	.L37
	sqrtsd	%xmm0, %xmm0
.L16:
	cvtss2sd	%xmm1, %xmm1
	addsd	%xmm0, %xmm1
	leal	5(%r15), %edx
	cvtsd2ss	%xmm1, %xmm1
	cmpl	%edx, %r12d
	jle	.L10
	movl	%r14d, %edx
	pxor	%xmm0, %xmm0
	pxor	%xmm3, %xmm3
	subl	24(%rbp), %edx
	cvtsi2sdl	%edx, %xmm0
	movl	%r13d, %edx
	subl	24(%rbx), %edx
	cvtsi2sdl	%edx, %xmm3
	mulsd	%xmm0, %xmm0
	mulsd	%xmm3, %xmm3
	addsd	%xmm3, %xmm0
	ucomisd	%xmm0, %xmm2
	ja	.L38
	sqrtsd	%xmm0, %xmm0
.L18:
	cvtss2sd	%xmm1, %xmm1
	addsd	%xmm0, %xmm1
	addl	$6, %r15d
	cvtsd2ss	%xmm1, %xmm1
	cmpl	%r15d, %r12d
	jle	.L10
	subl	28(%rbp), %r14d
	pxor	%xmm3, %xmm3
	pxor	%xmm0, %xmm0
	subl	28(%rbx), %r13d
	cvtsi2sdl	%r14d, %xmm3
	cvtsi2sdl	%r13d, %xmm0
	mulsd	%xmm3, %xmm3
	mulsd	%xmm0, %xmm0
	addsd	%xmm3, %xmm0
	ucomisd	%xmm0, %xmm2
	ja	.L30
	sqrtsd	%xmm0, %xmm0
.L21:
	cvtss2sd	%xmm1, %xmm1
	addsd	%xmm0, %xmm1
	cvtsd2ss	%xmm1, %xmm1
.L10:
	addq	$4, %rbp
	addq	$4, %rbx
.L23:
	movl	%eax, %r15d
.L4:
	movl	0(%rbp), %r14d
	movl	(%rbx), %r13d
	pxor	%xmm3, %xmm3
	pxor	%xmm0, %xmm0
	movl	%r14d, %eax
	subl	4(%rbp), %eax
	cvtsi2sdl	%eax, %xmm3
	movl	%r13d, %eax
	subl	4(%rbx), %eax
	cvtsi2sdl	%eax, %xmm0
	mulsd	%xmm3, %xmm3
	mulsd	%xmm0, %xmm0
	addsd	%xmm3, %xmm0
	ucomisd	%xmm0, %xmm2
	ja	.L39
	sqrtsd	%xmm0, %xmm0
.L6:
	cvtss2sd	%xmm1, %xmm1
	addsd	%xmm0, %xmm1
	leal	1(%r15), %eax
	cvtsd2ss	%xmm1, %xmm1
	cmpl	%eax, %r12d
	jg	.L40
	addq	$4, %rbp
	addq	$4, %rbx
	cmpl	%eax, %r12d
	jne	.L23
.L2:
	pxor	%xmm0, %xmm0
	movl	$1, %edi
	movl	$1, %eax
	cvtsi2ssl	%r12d, %xmm0
	leaq	.LC4(%rip), %rsi
	divss	%xmm0, %xmm1
	pxor	%xmm0, %xmm0
	addss	%xmm1, %xmm1
	cvtss2sd	%xmm1, %xmm0
	call	__printf_chk@PLT
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L41
	addq	$120, %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
.L26:
	.cfi_restore_state
	pxor	%xmm1, %xmm1
	jmp	.L2
.L39:
	movss	%xmm1, 8(%rsp)
	call	sqrt@PLT
	movss	8(%rsp), %xmm1
	pxor	%xmm2, %xmm2
	jmp	.L6
.L41:
	call	__stack_chk_fail@PLT
.L30:
	movl	%eax, 8(%rsp)
	movss	%xmm1, 12(%rsp)
	call	sqrt@PLT
	movss	12(%rsp), %xmm1
	movl	8(%rsp), %eax
	pxor	%xmm2, %xmm2
	jmp	.L21
.L38:
	movl	%eax, 8(%rsp)
	movss	%xmm1, 12(%rsp)
	call	sqrt@PLT
	movl	8(%rsp), %eax
	movss	12(%rsp), %xmm1
	pxor	%xmm2, %xmm2
	jmp	.L18
.L37:
	movl	%eax, 8(%rsp)
	movss	%xmm1, 12(%rsp)
	call	sqrt@PLT
	movl	8(%rsp), %eax
	movss	12(%rsp), %xmm1
	pxor	%xmm2, %xmm2
	jmp	.L16
.L36:
	movl	%eax, 8(%rsp)
	movss	%xmm1, 12(%rsp)
	call	sqrt@PLT
	movl	8(%rsp), %eax
	movss	12(%rsp), %xmm1
	pxor	%xmm2, %xmm2
	jmp	.L14
.L35:
	movl	%eax, 8(%rsp)
	movss	%xmm1, 12(%rsp)
	call	sqrt@PLT
	movl	8(%rsp), %eax
	movss	12(%rsp), %xmm1
	pxor	%xmm2, %xmm2
	jmp	.L12
.L34:
	movl	%eax, 8(%rsp)
	movss	%xmm1, 12(%rsp)
	call	sqrt@PLT
	movl	8(%rsp), %eax
	movss	12(%rsp), %xmm1
	pxor	%xmm2, %xmm2
	jmp	.L9
	.cfi_endproc
.LFE35:
	.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:

#include <stdio.h>
#include <string.h>
#include <math.h>
#define lop(i, n) for(i=0; i<n; i++)

int main()
{
	int N, i, j;
	float sum=0;
	int x[8], y[8];
	
	scanf("%d", &N);
	lop(i, N){
		scanf("%d %d", &x[i], &y[i]);
	}
	
	for(i=0; i<N; i++){
		for(j=i+1; j<N; j++){
			sum+=sqrt(pow(x[i]-x[j],2.0)+pow(y[i]-y[j],2.0));
		}
	}
	
	printf("%f", sum/N*2);
	
return 0;
}
3
0 0
1 0
0 1

2.276142
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>
#include <math.h>
#define lop(i, n) for(i=0; i<n; i++)

int main()
{
	int N, i, j;
	float sum=0;
	int x[8], y[8];
	
	scanf("%d", &N);
	lop(i, N){
		scanf("%d %d", &x[i], &y[i]);
	}
	
	for(i=0; i<N; i++){
		for(j=i+1; j<N; j++){
			sum+=sqrt(pow(x[i]-x[j],2.0)+pow(y[i]-y[j],2.0));
		}
	}
	
	printf("%f", sum/N*2);
	
return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC1:
	.string	"%d"
.LC2:
	.string	"%d %d"
.LC4:
	.string	"%f"
	.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	$112, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	pxor	%xmm0, %xmm0
	movss	%xmm0, -84(%rbp)
	leaq	-96(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -92(%rbp)
	jmp	.L2
.L3:
	leaq	-48(%rbp), %rdx
	movl	-92(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-80(%rbp), %rcx
	movl	-92(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -92(%rbp)
.L2:
	movl	-96(%rbp), %eax
	cmpl	%eax, -92(%rbp)
	jl	.L3
	movl	$0, -92(%rbp)
	jmp	.L4
.L7:
	movl	-92(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -88(%rbp)
	jmp	.L5
.L6:
	movl	-92(%rbp), %eax
	cltq
	movl	-80(%rbp,%rax,4), %edx
	movl	-88(%rbp), %eax
	cltq
	movl	-80(%rbp,%rax,4), %eax
	subl	%eax, %edx
	pxor	%xmm3, %xmm3
	cvtsi2sdl	%edx, %xmm3
	movq	%xmm3, %rax
	movsd	.LC3(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movsd	%xmm0, -104(%rbp)
	movl	-92(%rbp), %eax
	cltq
	movl	-48(%rbp,%rax,4), %edx
	movl	-88(%rbp), %eax
	cltq
	movl	-48(%rbp,%rax,4), %eax
	subl	%eax, %edx
	pxor	%xmm4, %xmm4
	cvtsi2sdl	%edx, %xmm4
	movq	%xmm4, %rax
	movsd	.LC3(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movapd	%xmm0, %xmm2
	addsd	-104(%rbp), %xmm2
	movq	%xmm2, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	pxor	%xmm1, %xmm1
	cvtss2sd	-84(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, -84(%rbp)
	addl	$1, -88(%rbp)
.L5:
	movl	-96(%rbp), %eax
	cmpl	%eax, -88(%rbp)
	jl	.L6
	addl	$1, -92(%rbp)
.L4:
	movl	-96(%rbp), %eax
	cmpl	%eax, -92(%rbp)
	jl	.L7
	movl	-96(%rbp), %eax
	pxor	%xmm1, %xmm1
	cvtsi2ssl	%eax, %xmm1
	movss	-84(%rbp), %xmm0
	divss	%xmm1, %xmm0
	addss	%xmm0, %xmm0
	pxor	%xmm6, %xmm6
	cvtss2sd	%xmm0, %xmm6
	movq	%xmm6, %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	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC3:
	.long	0
	.long	1073741824
	.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	"%d %d"
.LC4:
	.string	"%f"
	.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	$112, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	pxor	%xmm0, %xmm0
	movss	%xmm0, -84(%rbp)
	leaq	-96(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -92(%rbp)
	jmp	.L2
.L3:
	leaq	-48(%rbp), %rdx
	movl	-92(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-80(%rbp), %rcx
	movl	-92(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -92(%rbp)
.L2:
	movl	-96(%rbp), %eax
	cmpl	%eax, -92(%rbp)
	jl	.L3
	movl	$0, -92(%rbp)
	jmp	.L4
.L7:
	movl	-92(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -88(%rbp)
	jmp	.L5
.L6:
	movl	-92(%rbp), %eax
	cltq
	movl	-80(%rbp,%rax,4), %edx
	movl	-88(%rbp), %eax
	cltq
	movl	-80(%rbp,%rax,4), %eax
	subl	%eax, %edx
	pxor	%xmm3, %xmm3
	cvtsi2sdl	%edx, %xmm3
	movq	%xmm3, %rax
	movsd	.LC3(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movsd	%xmm0, -104(%rbp)
	movl	-92(%rbp), %eax
	cltq
	movl	-48(%rbp,%rax,4), %edx
	movl	-88(%rbp), %eax
	cltq
	movl	-48(%rbp,%rax,4), %eax
	subl	%eax, %edx
	pxor	%xmm4, %xmm4
	cvtsi2sdl	%edx, %xmm4
	movq	%xmm4, %rax
	movsd	.LC3(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movapd	%xmm0, %xmm2
	addsd	-104(%rbp), %xmm2
	movq	%xmm2, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	pxor	%xmm1, %xmm1
	cvtss2sd	-84(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, -84(%rbp)
	addl	$1, -88(%rbp)
.L5:
	movl	-96(%rbp), %eax
	cmpl	%eax, -88(%rbp)
	jl	.L6
	addl	$1, -92(%rbp)
.L4:
	movl	-96(%rbp), %eax
	cmpl	%eax, -92(%rbp)
	jl	.L7
	movl	-96(%rbp), %eax
	pxor	%xmm1, %xmm1
	cvtsi2ssl	%eax, %xmm1
	movss	-84(%rbp), %xmm0
	divss	%xmm1, %xmm0
	addss	%xmm0, %xmm0
	pxor	%xmm6, %xmm6
	cvtss2sd	%xmm0, %xmm6
	movq	%xmm6, %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	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC3:
	.long	0
	.long	1073741824
	.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:
