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, x[8], y[8], i, j; double s = 0;
	scanf("%d", &N);
	for (i = 0; i < N; i++) {scanf("%d %d", &x[i], &y[i]);}
	for (i = 0; i < N; i++) {
		for (j = i + 1; j < N; j++) {
			s += sqrt(pow((x[i]-x[j]), 2.0)+pow((y[i]-y[j]), 2.0));
        }
	}
	printf("%.10lf", 2 * s / N);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC1:
	.string	"%d"
.LC2:
	.string	"%d %d"
.LC4:
	.string	"%.10lf"
	.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
	addq	$-128, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -88(%rbp)
	leaq	-100(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -96(%rbp)
	jmp	.L2
.L3:
	leaq	-48(%rbp), %rdx
	movl	-96(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-80(%rbp), %rcx
	movl	-96(%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, -96(%rbp)
.L2:
	movl	-100(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jl	.L3
	movl	$0, -96(%rbp)
	jmp	.L4
.L7:
	movl	-96(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -92(%rbp)
	jmp	.L5
.L6:
	movl	-96(%rbp), %eax
	cltq
	movl	-80(%rbp,%rax,4), %edx
	movl	-92(%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, -120(%rbp)
	movl	-96(%rbp), %eax
	cltq
	movl	-48(%rbp,%rax,4), %edx
	movl	-92(%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	-120(%rbp), %xmm2
	movq	%xmm2, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	movsd	-88(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -88(%rbp)
	addl	$1, -92(%rbp)
.L5:
	movl	-100(%rbp), %eax
	cmpl	%eax, -92(%rbp)
	jl	.L6
	addl	$1, -96(%rbp)
.L4:
	movl	-100(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jl	.L7
	movsd	-88(%rbp), %xmm0
	addsd	%xmm0, %xmm0
	movl	-100(%rbp), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	divsd	%xmm1, %xmm0
	movq	%xmm0, %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"
.LC3:
	.string	"%.10lf"
	.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	$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
	cmpl	$1, %r12d
	je	.L26
	pxor	%xmm2, %xmm2
	movl	$1, %r15d
	movapd	%xmm2, %xmm1
	jmp	.L4
	.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:
	leal	2(%r15), %edx
	addsd	%xmm0, %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:
	leal	3(%r15), %edx
	addsd	%xmm0, %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:
	leal	4(%r15), %edx
	addsd	%xmm0, %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:
	leal	5(%r15), %edx
	addsd	%xmm0, %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:
	addl	$6, %r15d
	addsd	%xmm0, %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:
	addsd	%xmm0, %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:
	leal	1(%r15), %eax
	addsd	%xmm0, %xmm1
	cmpl	%eax, %r12d
	jg	.L40
	addq	$4, %rbp
	addq	$4, %rbx
	cmpl	%eax, %r12d
	jne	.L23
.L2:
	pxor	%xmm0, %xmm0
	addsd	%xmm1, %xmm1
	movl	$1, %edi
	movl	$1, %eax
	cvtsi2sdl	%r12d, %xmm0
	leaq	.LC3(%rip), %rsi
	divsd	%xmm0, %xmm1
	movapd	%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:
	movsd	%xmm1, (%rsp)
	call	sqrt@PLT
	movsd	(%rsp), %xmm1
	pxor	%xmm2, %xmm2
	jmp	.L6
.L34:
	movl	%eax, (%rsp)
	movsd	%xmm1, 8(%rsp)
	call	sqrt@PLT
	movl	(%rsp), %eax
	movsd	8(%rsp), %xmm1
	pxor	%xmm2, %xmm2
	jmp	.L9
.L36:
	movl	%eax, (%rsp)
	movsd	%xmm1, 8(%rsp)
	call	sqrt@PLT
	movl	(%rsp), %eax
	movsd	8(%rsp), %xmm1
	pxor	%xmm2, %xmm2
	jmp	.L14
.L35:
	movl	%eax, (%rsp)
	movsd	%xmm1, 8(%rsp)
	call	sqrt@PLT
	movl	(%rsp), %eax
	movsd	8(%rsp), %xmm1
	pxor	%xmm2, %xmm2
	jmp	.L12
.L41:
	call	__stack_chk_fail@PLT
.L30:
	movl	%eax, (%rsp)
	movsd	%xmm1, 8(%rsp)
	call	sqrt@PLT
	movsd	8(%rsp), %xmm1
	movl	(%rsp), %eax
	pxor	%xmm2, %xmm2
	jmp	.L21
.L38:
	movl	%eax, (%rsp)
	movsd	%xmm1, 8(%rsp)
	call	sqrt@PLT
	movl	(%rsp), %eax
	movsd	8(%rsp), %xmm1
	pxor	%xmm2, %xmm2
	jmp	.L18
.L37:
	movl	%eax, (%rsp)
	movsd	%xmm1, 8(%rsp)
	call	sqrt@PLT
	movl	(%rsp), %eax
	movsd	8(%rsp), %xmm1
	pxor	%xmm2, %xmm2
	jmp	.L16
	.cfi_endproc
.LFE23:
	.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"
.LC3:
	.string	"%.10lf"
	.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	$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
	cmpl	$1, %r12d
	je	.L26
	pxor	%xmm2, %xmm2
	movl	$1, %r15d
	movapd	%xmm2, %xmm1
	jmp	.L4
	.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:
	leal	2(%r15), %edx
	addsd	%xmm0, %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:
	leal	3(%r15), %edx
	addsd	%xmm0, %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:
	leal	4(%r15), %edx
	addsd	%xmm0, %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:
	leal	5(%r15), %edx
	addsd	%xmm0, %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:
	addl	$6, %r15d
	addsd	%xmm0, %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:
	addsd	%xmm0, %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:
	leal	1(%r15), %eax
	addsd	%xmm0, %xmm1
	cmpl	%eax, %r12d
	jg	.L40
	addq	$4, %rbp
	addq	$4, %rbx
	cmpl	%eax, %r12d
	jne	.L23
.L2:
	pxor	%xmm0, %xmm0
	addsd	%xmm1, %xmm1
	movl	$1, %edi
	movl	$1, %eax
	cvtsi2sdl	%r12d, %xmm0
	leaq	.LC3(%rip), %rsi
	divsd	%xmm0, %xmm1
	movapd	%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:
	movsd	%xmm1, (%rsp)
	call	sqrt@PLT
	movsd	(%rsp), %xmm1
	pxor	%xmm2, %xmm2
	jmp	.L6
.L34:
	movl	%eax, (%rsp)
	movsd	%xmm1, 8(%rsp)
	call	sqrt@PLT
	movl	(%rsp), %eax
	movsd	8(%rsp), %xmm1
	pxor	%xmm2, %xmm2
	jmp	.L9
.L36:
	movl	%eax, (%rsp)
	movsd	%xmm1, 8(%rsp)
	call	sqrt@PLT
	movl	(%rsp), %eax
	movsd	8(%rsp), %xmm1
	pxor	%xmm2, %xmm2
	jmp	.L14
.L35:
	movl	%eax, (%rsp)
	movsd	%xmm1, 8(%rsp)
	call	sqrt@PLT
	movl	(%rsp), %eax
	movsd	8(%rsp), %xmm1
	pxor	%xmm2, %xmm2
	jmp	.L12
.L41:
	call	__stack_chk_fail@PLT
.L30:
	movl	%eax, (%rsp)
	movsd	%xmm1, 8(%rsp)
	call	sqrt@PLT
	movsd	8(%rsp), %xmm1
	movl	(%rsp), %eax
	pxor	%xmm2, %xmm2
	jmp	.L21
.L38:
	movl	%eax, (%rsp)
	movsd	%xmm1, 8(%rsp)
	call	sqrt@PLT
	movl	(%rsp), %eax
	movsd	8(%rsp), %xmm1
	pxor	%xmm2, %xmm2
	jmp	.L18
.L37:
	movl	%eax, (%rsp)
	movsd	%xmm1, 8(%rsp)
	call	sqrt@PLT
	movl	(%rsp), %eax
	movsd	8(%rsp), %xmm1
	pxor	%xmm2, %xmm2
	jmp	.L16
	.cfi_endproc
.LFE23:
	.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 <math.h>
int main(void) {
	int N, x[8], y[8], i, j; double s = 0;
	scanf("%d", &N);
	for (i = 0; i < N; i++) {scanf("%d %d", &x[i], &y[i]);}
	for (i = 0; i < N; i++) {
		for (j = i + 1; j < N; j++) {
			s += sqrt(pow((x[i]-x[j]), 2.0)+pow((y[i]-y[j]), 2.0));
        }
	}
	printf("%.10lf", 2 * s / N);
}
3
0 0
1 0
0 1

2.2761423749
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, x[8], y[8], i, j; double s = 0;
	scanf("%d", &N);
	for (i = 0; i < N; i++) {scanf("%d %d", &x[i], &y[i]);}
	for (i = 0; i < N; i++) {
		for (j = i + 1; j < N; j++) {
			s += sqrt(pow((x[i]-x[j]), 2.0)+pow((y[i]-y[j]), 2.0));
        }
	}
	printf("%.10lf", 2 * s / N);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC1:
	.string	"%d"
.LC2:
	.string	"%d %d"
.LC4:
	.string	"%.10lf"
	.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
	addq	$-128, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -88(%rbp)
	leaq	-100(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -96(%rbp)
	jmp	.L2
.L3:
	leaq	-48(%rbp), %rdx
	movl	-96(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-80(%rbp), %rcx
	movl	-96(%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, -96(%rbp)
.L2:
	movl	-100(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jl	.L3
	movl	$0, -96(%rbp)
	jmp	.L4
.L7:
	movl	-96(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -92(%rbp)
	jmp	.L5
.L6:
	movl	-96(%rbp), %eax
	cltq
	movl	-80(%rbp,%rax,4), %edx
	movl	-92(%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, -120(%rbp)
	movl	-96(%rbp), %eax
	cltq
	movl	-48(%rbp,%rax,4), %edx
	movl	-92(%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	-120(%rbp), %xmm2
	movq	%xmm2, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	movsd	-88(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -88(%rbp)
	addl	$1, -92(%rbp)
.L5:
	movl	-100(%rbp), %eax
	cmpl	%eax, -92(%rbp)
	jl	.L6
	addl	$1, -96(%rbp)
.L4:
	movl	-100(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jl	.L7
	movsd	-88(%rbp), %xmm0
	addsd	%xmm0, %xmm0
	movl	-100(%rbp), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	divsd	%xmm1, %xmm0
	movq	%xmm0, %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.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC1:
	.string	"%d"
.LC2:
	.string	"%d %d"
.LC4:
	.string	"%.10lf"
	.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
	addq	$-128, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -88(%rbp)
	leaq	-100(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -96(%rbp)
	jmp	.L2
.L3:
	leaq	-48(%rbp), %rdx
	movl	-96(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-80(%rbp), %rcx
	movl	-96(%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, -96(%rbp)
.L2:
	movl	-100(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jl	.L3
	movl	$0, -96(%rbp)
	jmp	.L4
.L7:
	movl	-96(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -92(%rbp)
	jmp	.L5
.L6:
	movl	-96(%rbp), %eax
	cltq
	movl	-80(%rbp,%rax,4), %edx
	movl	-92(%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, -120(%rbp)
	movl	-96(%rbp), %eax
	cltq
	movl	-48(%rbp,%rax,4), %edx
	movl	-92(%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	-120(%rbp), %xmm2
	movq	%xmm2, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	movsd	-88(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -88(%rbp)
	addl	$1, -92(%rbp)
.L5:
	movl	-100(%rbp), %eax
	cmpl	%eax, -92(%rbp)
	jl	.L6
	addl	$1, -96(%rbp)
.L4:
	movl	-100(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jl	.L7
	movsd	-88(%rbp), %xmm0
	addsd	%xmm0, %xmm0
	movl	-100(%rbp), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	divsd	%xmm1, %xmm0
	movq	%xmm0, %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:
