Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#define cross(a1, b1, a2, b2) ((a1)*(b2)-(a2)*(b1))
int main(){
    double a[100],b[100],s,t,x;
    int n,c=1,i;
    for(;~scanf("%d",&n);printf("%.1lf\n",fabs(s-t)),c++){
        for(i=0;i<n;i++)scanf("%lf%lf",a+i,b+i);
        for(i=s=t=0;i<n-1;i++){
            if((x=cross(a[i],b[i],a[i+1],b[i+1]))>0)s+=fabs(x)/2.0;
            else t+=fabs(x)/2;
        }
        if((x=cross(a[i],b[i],a[0],b[0]))>0)s+=fabs(x)/2;
        else t+=fabs(x)/2;
    }
exit(0);}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lf%lf"
.LC4:
	.string	"%.1lf\n"
.LC5:
	.string	"%d"
	.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	$1664, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1, -1648(%rbp)
	jmp	.L2
.L13:
	movl	$0, -1644(%rbp)
	jmp	.L3
.L4:
	movl	-1644(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	-816(%rbp), %rax
	addq	%rax, %rdx
	movl	-1644(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	-1616(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	addl	$1, -1644(%rbp)
.L3:
	movl	-1652(%rbp), %eax
	cmpl	%eax, -1644(%rbp)
	jl	.L4
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -1632(%rbp)
	movsd	-1632(%rbp), %xmm0
	movsd	%xmm0, -1640(%rbp)
	movsd	-1640(%rbp), %xmm0
	cvttsd2sil	%xmm0, %eax
	movl	%eax, -1644(%rbp)
	jmp	.L5
.L9:
	movl	-1644(%rbp), %eax
	cltq
	movsd	-1616(%rbp,%rax,8), %xmm1
	movl	-1644(%rbp), %eax
	addl	$1, %eax
	cltq
	movsd	-816(%rbp,%rax,8), %xmm0
	mulsd	%xmm1, %xmm0
	movl	-1644(%rbp), %eax
	addl	$1, %eax
	cltq
	movsd	-1616(%rbp,%rax,8), %xmm2
	movl	-1644(%rbp), %eax
	cltq
	movsd	-816(%rbp,%rax,8), %xmm1
	mulsd	%xmm2, %xmm1
	subsd	%xmm1, %xmm0
	movsd	%xmm0, -1624(%rbp)
	movsd	-1624(%rbp), %xmm0
	pxor	%xmm1, %xmm1
	comisd	%xmm1, %xmm0
	jbe	.L17
	movsd	-1624(%rbp), %xmm0
	movq	.LC2(%rip), %xmm1
	andpd	%xmm1, %xmm0
	movsd	.LC3(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movsd	-1640(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -1640(%rbp)
	jmp	.L8
.L17:
	movsd	-1624(%rbp), %xmm0
	movq	.LC2(%rip), %xmm1
	andpd	%xmm1, %xmm0
	movsd	.LC3(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movsd	-1632(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -1632(%rbp)
.L8:
	addl	$1, -1644(%rbp)
.L5:
	movl	-1652(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -1644(%rbp)
	jl	.L9
	movl	-1644(%rbp), %eax
	cltq
	movsd	-1616(%rbp,%rax,8), %xmm1
	movsd	-816(%rbp), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	-1616(%rbp), %xmm2
	movl	-1644(%rbp), %eax
	cltq
	movsd	-816(%rbp,%rax,8), %xmm1
	mulsd	%xmm2, %xmm1
	subsd	%xmm1, %xmm0
	movsd	%xmm0, -1624(%rbp)
	movsd	-1624(%rbp), %xmm0
	pxor	%xmm1, %xmm1
	comisd	%xmm1, %xmm0
	jbe	.L18
	movsd	-1624(%rbp), %xmm0
	movq	.LC2(%rip), %xmm1
	andpd	%xmm1, %xmm0
	movsd	.LC3(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movsd	-1640(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -1640(%rbp)
	jmp	.L12
.L18:
	movsd	-1624(%rbp), %xmm0
	movq	.LC2(%rip), %xmm1
	andpd	%xmm1, %xmm0
	movsd	.LC3(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movsd	-1632(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -1632(%rbp)
.L12:
	movsd	-1640(%rbp), %xmm0
	subsd	-1632(%rbp), %xmm0
	movq	.LC2(%rip), %xmm1
	andpd	%xmm1, %xmm0
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	addl	$1, -1648(%rbp)
.L2:
	leaq	-1652(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L13
	movl	$0, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 16
.LC2:
	.long	-1
	.long	2147483647
	.long	0
	.long	0
	.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	"%lf%lf"
.LC4:
	.string	"%.1lf\n"
.LC5:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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
	leaq	.LC5(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC1(%rip), %rbx
	subq	$1640, %rsp
	.cfi_def_cfa_offset 1696
	movq	%fs:40, %rax
	movq	%rax, 1624(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L19
	movl	12(%rsp), %eax
	leaq	16(%rsp), %r15
	xorl	%r13d, %r13d
	leaq	816(%rsp), %r14
	testl	%eax, %eax
	jle	.L21
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%r14,%r13,8), %rdx
	movq	%r15, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	12(%rsp), %eax
	addq	$1, %r13
	addq	$8, %r15
	cmpl	%r13d, %eax
	jg	.L3
.L21:
	leal	-1(%rax), %ecx
	movsd	16(%rsp), %xmm9
	movsd	816(%rsp), %xmm10
	testl	%ecx, %ecx
	jle	.L23
	cmpl	$3, %eax
	jle	.L24
	subl	$4, %eax
	pxor	%xmm5, %xmm5
	movq	.LC2(%rip), %xmm7
	movsd	.LC3(%rip), %xmm6
	shrl	%eax
	movapd	%xmm9, %xmm1
	movapd	%xmm5, %xmm0
	movl	$2, %esi
	leal	2(%rax), %edi
	movapd	%xmm10, %xmm3
	movapd	%xmm5, %xmm8
	addq	%rdi, %rdi
	leaq	16(%rsp), %rdx
	leaq	816(%rsp), %r14
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L37:
	addsd	%xmm3, %xmm0
.L8:
	movsd	(%r14,%rsi,8), %xmm3
	movsd	(%rdx,%rsi,8), %xmm1
	movslq	%esi, %rax
	mulsd	%xmm1, %xmm4
	mulsd	%xmm3, %xmm2
	subsd	%xmm4, %xmm2
	comisd	%xmm5, %xmm2
	movapd	%xmm2, %xmm4
	andpd	.LC2(%rip), %xmm4
	mulsd	%xmm6, %xmm4
	jbe	.L36
	addsd	%xmm4, %xmm0
.L10:
	addq	$2, %rsi
	cmpq	%rdi, %rsi
	je	.L15
.L11:
	movsd	-8(%r14,%rsi,8), %xmm4
	movsd	-8(%rdx,%rsi,8), %xmm2
	mulsd	%xmm4, %xmm1
	mulsd	%xmm2, %xmm3
	subsd	%xmm3, %xmm1
	comisd	%xmm5, %xmm1
	movapd	%xmm1, %xmm3
	andpd	.LC2(%rip), %xmm3
	mulsd	%xmm6, %xmm3
	ja	.L37
	addsd	%xmm3, %xmm8
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L38:
	addq	$1, %rax
	addsd	%xmm2, %xmm0
	cmpl	%eax, %ecx
	jle	.L4
.L15:
	movsd	8(%r14,%rax,8), %xmm4
	movsd	8(%rdx,%rax,8), %xmm3
	movsd	(%rdx,%rax,8), %xmm1
	movsd	(%r14,%rax,8), %xmm2
	mulsd	%xmm4, %xmm1
	mulsd	%xmm3, %xmm2
	subsd	%xmm2, %xmm1
	comisd	%xmm5, %xmm1
	movapd	%xmm1, %xmm2
	andpd	%xmm7, %xmm2
	mulsd	%xmm6, %xmm2
	ja	.L38
	addq	$1, %rax
	addsd	%xmm2, %xmm8
	cmpl	%eax, %ecx
	jg	.L15
.L4:
	mulsd	%xmm10, %xmm3
	mulsd	%xmm9, %xmm4
	subsd	%xmm4, %xmm3
	comisd	%xmm5, %xmm3
	movapd	%xmm3, %xmm1
	andpd	%xmm7, %xmm1
	mulsd	%xmm6, %xmm1
	jbe	.L33
	addsd	%xmm1, %xmm0
.L18:
	subsd	%xmm8, %xmm0
	leaq	.LC4(%rip), %rdi
	movl	$1, %eax
	andpd	%xmm7, %xmm0
	call	printf@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L33:
	addsd	%xmm1, %xmm8
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L36:
	addsd	%xmm4, %xmm8
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L19:
	xorl	%edi, %edi
	call	exit@PLT
	.p2align 4,,10
	.p2align 3
.L23:
	pxor	%xmm5, %xmm5
	movapd	%xmm10, %xmm4
	movapd	%xmm9, %xmm3
	movq	.LC2(%rip), %xmm7
	movsd	.LC3(%rip), %xmm6
	movapd	%xmm5, %xmm8
	movapd	%xmm5, %xmm0
	jmp	.L4
.L24:
	pxor	%xmm5, %xmm5
	movq	.LC2(%rip), %xmm7
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	movsd	.LC3(%rip), %xmm6
	movapd	%xmm5, %xmm8
	movapd	%xmm5, %xmm0
	leaq	816(%rsp), %r14
	jmp	.L15
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	-1
	.long	2147483647
	.long	0
	.long	0
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC3:
	.long	0
	.long	1071644672
	.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	"%lf%lf"
.LC4:
	.string	"%.1lf\n"
.LC5:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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
	leaq	.LC5(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC1(%rip), %rbx
	subq	$1640, %rsp
	.cfi_def_cfa_offset 1696
	movq	%fs:40, %rax
	movq	%rax, 1624(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L19
	movl	12(%rsp), %eax
	leaq	16(%rsp), %r15
	xorl	%r13d, %r13d
	leaq	816(%rsp), %r14
	testl	%eax, %eax
	jle	.L21
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%r14,%r13,8), %rdx
	movq	%r15, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	12(%rsp), %eax
	addq	$1, %r13
	addq	$8, %r15
	cmpl	%r13d, %eax
	jg	.L3
.L21:
	leal	-1(%rax), %ecx
	movsd	16(%rsp), %xmm9
	movsd	816(%rsp), %xmm10
	testl	%ecx, %ecx
	jle	.L23
	cmpl	$3, %eax
	jle	.L24
	subl	$4, %eax
	pxor	%xmm5, %xmm5
	movq	.LC2(%rip), %xmm7
	movsd	.LC3(%rip), %xmm6
	shrl	%eax
	movapd	%xmm9, %xmm1
	movapd	%xmm5, %xmm0
	movl	$2, %esi
	leal	2(%rax), %edi
	movapd	%xmm10, %xmm3
	movapd	%xmm5, %xmm8
	addq	%rdi, %rdi
	leaq	16(%rsp), %rdx
	leaq	816(%rsp), %r14
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L37:
	addsd	%xmm3, %xmm0
.L8:
	movsd	(%r14,%rsi,8), %xmm3
	movsd	(%rdx,%rsi,8), %xmm1
	movslq	%esi, %rax
	mulsd	%xmm1, %xmm4
	mulsd	%xmm3, %xmm2
	subsd	%xmm4, %xmm2
	comisd	%xmm5, %xmm2
	movapd	%xmm2, %xmm4
	andpd	.LC2(%rip), %xmm4
	mulsd	%xmm6, %xmm4
	jbe	.L36
	addsd	%xmm4, %xmm0
.L10:
	addq	$2, %rsi
	cmpq	%rdi, %rsi
	je	.L15
.L11:
	movsd	-8(%r14,%rsi,8), %xmm4
	movsd	-8(%rdx,%rsi,8), %xmm2
	mulsd	%xmm4, %xmm1
	mulsd	%xmm2, %xmm3
	subsd	%xmm3, %xmm1
	comisd	%xmm5, %xmm1
	movapd	%xmm1, %xmm3
	andpd	.LC2(%rip), %xmm3
	mulsd	%xmm6, %xmm3
	ja	.L37
	addsd	%xmm3, %xmm8
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L38:
	addq	$1, %rax
	addsd	%xmm2, %xmm0
	cmpl	%eax, %ecx
	jle	.L4
.L15:
	movsd	8(%r14,%rax,8), %xmm4
	movsd	8(%rdx,%rax,8), %xmm3
	movsd	(%rdx,%rax,8), %xmm1
	movsd	(%r14,%rax,8), %xmm2
	mulsd	%xmm4, %xmm1
	mulsd	%xmm3, %xmm2
	subsd	%xmm2, %xmm1
	comisd	%xmm5, %xmm1
	movapd	%xmm1, %xmm2
	andpd	%xmm7, %xmm2
	mulsd	%xmm6, %xmm2
	ja	.L38
	addq	$1, %rax
	addsd	%xmm2, %xmm8
	cmpl	%eax, %ecx
	jg	.L15
.L4:
	mulsd	%xmm10, %xmm3
	mulsd	%xmm9, %xmm4
	subsd	%xmm4, %xmm3
	comisd	%xmm5, %xmm3
	movapd	%xmm3, %xmm1
	andpd	%xmm7, %xmm1
	mulsd	%xmm6, %xmm1
	jbe	.L33
	addsd	%xmm1, %xmm0
.L18:
	subsd	%xmm8, %xmm0
	leaq	.LC4(%rip), %rdi
	movl	$1, %eax
	andpd	%xmm7, %xmm0
	call	printf@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L33:
	addsd	%xmm1, %xmm8
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L36:
	addsd	%xmm4, %xmm8
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L19:
	xorl	%edi, %edi
	call	exit@PLT
	.p2align 4,,10
	.p2align 3
.L23:
	pxor	%xmm5, %xmm5
	movapd	%xmm10, %xmm4
	movapd	%xmm9, %xmm3
	movq	.LC2(%rip), %xmm7
	movsd	.LC3(%rip), %xmm6
	movapd	%xmm5, %xmm8
	movapd	%xmm5, %xmm0
	jmp	.L4
.L24:
	pxor	%xmm5, %xmm5
	movq	.LC2(%rip), %xmm7
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	movsd	.LC3(%rip), %xmm6
	movapd	%xmm5, %xmm8
	movapd	%xmm5, %xmm0
	leaq	816(%rsp), %r14
	jmp	.L15
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	-1
	.long	2147483647
	.long	0
	.long	0
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC3:
	.long	0
	.long	1071644672
	.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:

#define cross(a1, b1, a2, b2) ((a1)*(b2)-(a2)*(b1))
int main(){
    double a[100],b[100],s,t,x;
    int n,c=1,i;
    for(;~scanf("%d",&n);printf("%.1lf\n",fabs(s-t)),c++){
        for(i=0;i<n;i++)scanf("%lf%lf",a+i,b+i);
        for(i=s=t=0;i<n-1;i++){
            if((x=cross(a[i],b[i],a[i+1],b[i+1]))>0)s+=fabs(x)/2.0;
            else t+=fabs(x)/2;
        }
        if((x=cross(a[i],b[i],a[0],b[0]))>0)s+=fabs(x)/2;
        else t+=fabs(x)/2;
    }
exit(0);}
4
0 0
1 1
1 2
-1 2
 4
0 0
1 1
1 2
-1 4
 3
1 0
2 4
-1 1
 4
0 0
1 1
2 2
-1 4
 3
2 0
2 2
-1 1
 3
3 0
2 2
-1 0
 4
0 -1
0 1
1 2
-1 1
 3
3 0
2 2
-2 -1
 3
3 0
2 2
-2 -2
 4
0 -1
0 1
0 3
-1 1

2.5
 3.5
 4.5
 5.0
 3.0
 4.0
 1.5
 5.5
 6.0
 2.0

Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#define cross(a1, b1, a2, b2) ((a1)*(b2)-(a2)*(b1))
int main(){
    double a[100],b[100],s,t,x;
    int n,c=1,i;
    for(;~scanf("%d",&n);printf("%.1lf\n",fabs(s-t)),c++){
        for(i=0;i<n;i++)scanf("%lf%lf",a+i,b+i);
        for(i=s=t=0;i<n-1;i++){
            if((x=cross(a[i],b[i],a[i+1],b[i+1]))>0)s+=fabs(x)/2.0;
            else t+=fabs(x)/2;
        }
        if((x=cross(a[i],b[i],a[0],b[0]))>0)s+=fabs(x)/2;
        else t+=fabs(x)/2;
    }
exit(0);}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lf%lf"
.LC4:
	.string	"%.1lf\n"
.LC5:
	.string	"%d"
	.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	$1664, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1, -1648(%rbp)
	jmp	.L2
.L13:
	movl	$0, -1644(%rbp)
	jmp	.L3
.L4:
	movl	-1644(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	-816(%rbp), %rax
	addq	%rax, %rdx
	movl	-1644(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	-1616(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	addl	$1, -1644(%rbp)
.L3:
	movl	-1652(%rbp), %eax
	cmpl	%eax, -1644(%rbp)
	jl	.L4
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -1632(%rbp)
	movsd	-1632(%rbp), %xmm0
	movsd	%xmm0, -1640(%rbp)
	movsd	-1640(%rbp), %xmm0
	cvttsd2sil	%xmm0, %eax
	movl	%eax, -1644(%rbp)
	jmp	.L5
.L9:
	movl	-1644(%rbp), %eax
	cltq
	movsd	-1616(%rbp,%rax,8), %xmm1
	movl	-1644(%rbp), %eax
	addl	$1, %eax
	cltq
	movsd	-816(%rbp,%rax,8), %xmm0
	mulsd	%xmm1, %xmm0
	movl	-1644(%rbp), %eax
	addl	$1, %eax
	cltq
	movsd	-1616(%rbp,%rax,8), %xmm2
	movl	-1644(%rbp), %eax
	cltq
	movsd	-816(%rbp,%rax,8), %xmm1
	mulsd	%xmm2, %xmm1
	subsd	%xmm1, %xmm0
	movsd	%xmm0, -1624(%rbp)
	movsd	-1624(%rbp), %xmm0
	pxor	%xmm1, %xmm1
	comisd	%xmm1, %xmm0
	jbe	.L17
	movsd	-1624(%rbp), %xmm0
	movq	.LC2(%rip), %xmm1
	andpd	%xmm1, %xmm0
	movsd	.LC3(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movsd	-1640(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -1640(%rbp)
	jmp	.L8
.L17:
	movsd	-1624(%rbp), %xmm0
	movq	.LC2(%rip), %xmm1
	andpd	%xmm1, %xmm0
	movsd	.LC3(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movsd	-1632(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -1632(%rbp)
.L8:
	addl	$1, -1644(%rbp)
.L5:
	movl	-1652(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -1644(%rbp)
	jl	.L9
	movl	-1644(%rbp), %eax
	cltq
	movsd	-1616(%rbp,%rax,8), %xmm1
	movsd	-816(%rbp), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	-1616(%rbp), %xmm2
	movl	-1644(%rbp), %eax
	cltq
	movsd	-816(%rbp,%rax,8), %xmm1
	mulsd	%xmm2, %xmm1
	subsd	%xmm1, %xmm0
	movsd	%xmm0, -1624(%rbp)
	movsd	-1624(%rbp), %xmm0
	pxor	%xmm1, %xmm1
	comisd	%xmm1, %xmm0
	jbe	.L18
	movsd	-1624(%rbp), %xmm0
	movq	.LC2(%rip), %xmm1
	andpd	%xmm1, %xmm0
	movsd	.LC3(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movsd	-1640(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -1640(%rbp)
	jmp	.L12
.L18:
	movsd	-1624(%rbp), %xmm0
	movq	.LC2(%rip), %xmm1
	andpd	%xmm1, %xmm0
	movsd	.LC3(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movsd	-1632(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -1632(%rbp)
.L12:
	movsd	-1640(%rbp), %xmm0
	subsd	-1632(%rbp), %xmm0
	movq	.LC2(%rip), %xmm1
	andpd	%xmm1, %xmm0
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	addl	$1, -1648(%rbp)
.L2:
	leaq	-1652(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L13
	movl	$0, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 16
.LC2:
	.long	-1
	.long	2147483647
	.long	0
	.long	0
	.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
.LC0:
	.string	"%lf%lf"
.LC4:
	.string	"%.1lf\n"
.LC5:
	.string	"%d"
	.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	$1664, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1, -1648(%rbp)
	jmp	.L2
.L13:
	movl	$0, -1644(%rbp)
	jmp	.L3
.L4:
	movl	-1644(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	-816(%rbp), %rax
	addq	%rax, %rdx
	movl	-1644(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	-1616(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	addl	$1, -1644(%rbp)
.L3:
	movl	-1652(%rbp), %eax
	cmpl	%eax, -1644(%rbp)
	jl	.L4
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -1632(%rbp)
	movsd	-1632(%rbp), %xmm0
	movsd	%xmm0, -1640(%rbp)
	movsd	-1640(%rbp), %xmm0
	cvttsd2sil	%xmm0, %eax
	movl	%eax, -1644(%rbp)
	jmp	.L5
.L9:
	movl	-1644(%rbp), %eax
	cltq
	movsd	-1616(%rbp,%rax,8), %xmm1
	movl	-1644(%rbp), %eax
	addl	$1, %eax
	cltq
	movsd	-816(%rbp,%rax,8), %xmm0
	mulsd	%xmm1, %xmm0
	movl	-1644(%rbp), %eax
	addl	$1, %eax
	cltq
	movsd	-1616(%rbp,%rax,8), %xmm2
	movl	-1644(%rbp), %eax
	cltq
	movsd	-816(%rbp,%rax,8), %xmm1
	mulsd	%xmm2, %xmm1
	subsd	%xmm1, %xmm0
	movsd	%xmm0, -1624(%rbp)
	movsd	-1624(%rbp), %xmm0
	pxor	%xmm1, %xmm1
	comisd	%xmm1, %xmm0
	jbe	.L17
	movsd	-1624(%rbp), %xmm0
	movq	.LC2(%rip), %xmm1
	andpd	%xmm1, %xmm0
	movsd	.LC3(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movsd	-1640(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -1640(%rbp)
	jmp	.L8
.L17:
	movsd	-1624(%rbp), %xmm0
	movq	.LC2(%rip), %xmm1
	andpd	%xmm1, %xmm0
	movsd	.LC3(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movsd	-1632(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -1632(%rbp)
.L8:
	addl	$1, -1644(%rbp)
.L5:
	movl	-1652(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -1644(%rbp)
	jl	.L9
	movl	-1644(%rbp), %eax
	cltq
	movsd	-1616(%rbp,%rax,8), %xmm1
	movsd	-816(%rbp), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	-1616(%rbp), %xmm2
	movl	-1644(%rbp), %eax
	cltq
	movsd	-816(%rbp,%rax,8), %xmm1
	mulsd	%xmm2, %xmm1
	subsd	%xmm1, %xmm0
	movsd	%xmm0, -1624(%rbp)
	movsd	-1624(%rbp), %xmm0
	pxor	%xmm1, %xmm1
	comisd	%xmm1, %xmm0
	jbe	.L18
	movsd	-1624(%rbp), %xmm0
	movq	.LC2(%rip), %xmm1
	andpd	%xmm1, %xmm0
	movsd	.LC3(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movsd	-1640(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -1640(%rbp)
	jmp	.L12
.L18:
	movsd	-1624(%rbp), %xmm0
	movq	.LC2(%rip), %xmm1
	andpd	%xmm1, %xmm0
	movsd	.LC3(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movsd	-1632(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -1632(%rbp)
.L12:
	movsd	-1640(%rbp), %xmm0
	subsd	-1632(%rbp), %xmm0
	movq	.LC2(%rip), %xmm1
	andpd	%xmm1, %xmm0
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	addl	$1, -1648(%rbp)
.L2:
	leaq	-1652(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L13
	movl	$0, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 16
.LC2:
	.long	-1
	.long	2147483647
	.long	0
	.long	0
	.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:
