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>

int main(void)
{
	int price, a, b, c, t, i, j, k, temp, m, n;
	int sum[60]={0};

	while (scanf("%d", &price) != EOF)
	{
		if(price == 0)
			break;
		else
		{
			a = 0;
			b = 0;
			c = 0;
			n = 0;
			m = 0;
			price = price / 100;
			for (i = 0; i < price; i++)
				for (j = 0; j < price - i; j++)
					for (k = 0; k < price - j - i; k++)
					{
						if (price == i * 2 + j * 3 + k * 5)
						{
							a = ((i - i % 5) * 0.8 + (i % 5)) * 380;
							b = ((j - j % 4) * 0.85 + (j % 4)) * 550;
							c = ((k - k % 3) * 0.88 + (k % 3)) * 850;
							if(i == 0)
								a = 0;
							if(j == 0)
								b = 0;
							if(k == 0)
								c = 0;
							t = a + b + c;
							sum[n] = t;
							n++;
						}
					}
					while(sum[m+1] != 0)
					{
						if(sum[m] > sum[m+1])
						{
							temp = sum[m];
							sum[m] = sum[m+1];
							sum[m+1] = temp;
							m=0;
						}
						else
							m++;
					}
					printf("%d\n", sum[0]);
		}
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC6:
	.string	"%d\n"
.LC7:
	.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	$304, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-256(%rbp), %rdx
	movl	$0, %eax
	movl	$30, %ecx
	movq	%rdx, %rdi
	rep stosq
	jmp	.L2
.L18:
	movl	-300(%rbp), %eax
	testl	%eax, %eax
	je	.L21
	movl	$0, -296(%rbp)
	movl	$0, -292(%rbp)
	movl	$0, -288(%rbp)
	movl	$0, -268(%rbp)
	movl	$0, -272(%rbp)
	movl	-300(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1374389535, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$5, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -300(%rbp)
	movl	$0, -284(%rbp)
	jmp	.L5
.L14:
	movl	$0, -280(%rbp)
	jmp	.L6
.L13:
	movl	$0, -276(%rbp)
	jmp	.L7
.L12:
	movl	-284(%rbp), %eax
	leal	(%rax,%rax), %ecx
	movl	-280(%rbp), %edx
	movl	%edx, %eax
	addl	%eax, %eax
	addl	%edx, %eax
	addl	%eax, %ecx
	movl	-276(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	leal	(%rcx,%rax), %edx
	movl	-300(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	-284(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	%edx
	movl	%eax, %esi
	sarl	$31, %esi
	movl	%edx, %ecx
	subl	%esi, %ecx
	movl	%ecx, %edx
	sall	$2, %edx
	addl	%ecx, %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-284(%rbp), %eax
	subl	%ecx, %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	movsd	.LC0(%rip), %xmm0
	mulsd	%xmm0, %xmm1
	movl	-284(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	%edx
	movl	%eax, %esi
	sarl	$31, %esi
	movl	%edx, %ecx
	subl	%esi, %ecx
	movl	%ecx, %edx
	sall	$2, %edx
	addl	%ecx, %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%ecx, %xmm0
	addsd	%xmm0, %xmm1
	movsd	.LC1(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %eax
	movl	%eax, -296(%rbp)
	movl	-280(%rbp), %eax
	cltd
	shrl	$30, %edx
	addl	%edx, %eax
	andl	$3, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	movl	-280(%rbp), %eax
	subl	%edx, %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	movsd	.LC2(%rip), %xmm0
	mulsd	%xmm0, %xmm1
	movl	-280(%rbp), %eax
	cltd
	shrl	$30, %edx
	addl	%edx, %eax
	andl	$3, %eax
	subl	%edx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	addsd	%xmm0, %xmm1
	movsd	.LC3(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %eax
	movl	%eax, -292(%rbp)
	movl	-276(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	movl	%eax, %esi
	sarl	$31, %esi
	movl	%edx, %ecx
	subl	%esi, %ecx
	movl	%ecx, %edx
	addl	%edx, %edx
	addl	%ecx, %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-276(%rbp), %eax
	subl	%ecx, %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	movsd	.LC4(%rip), %xmm0
	mulsd	%xmm0, %xmm1
	movl	-276(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	movl	%eax, %esi
	sarl	$31, %esi
	movl	%edx, %ecx
	subl	%esi, %ecx
	movl	%ecx, %edx
	addl	%edx, %edx
	addl	%ecx, %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%ecx, %xmm0
	addsd	%xmm0, %xmm1
	movsd	.LC5(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %eax
	movl	%eax, -288(%rbp)
	cmpl	$0, -284(%rbp)
	jne	.L9
	movl	$0, -296(%rbp)
.L9:
	cmpl	$0, -280(%rbp)
	jne	.L10
	movl	$0, -292(%rbp)
.L10:
	cmpl	$0, -276(%rbp)
	jne	.L11
	movl	$0, -288(%rbp)
.L11:
	movl	-296(%rbp), %edx
	movl	-292(%rbp), %eax
	addl	%eax, %edx
	movl	-288(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -260(%rbp)
	movl	-268(%rbp), %eax
	cltq
	movl	-260(%rbp), %edx
	movl	%edx, -256(%rbp,%rax,4)
	addl	$1, -268(%rbp)
.L8:
	addl	$1, -276(%rbp)
.L7:
	movl	-300(%rbp), %eax
	subl	-280(%rbp), %eax
	subl	-284(%rbp), %eax
	cmpl	%eax, -276(%rbp)
	jl	.L12
	addl	$1, -280(%rbp)
.L6:
	movl	-300(%rbp), %eax
	subl	-284(%rbp), %eax
	cmpl	%eax, -280(%rbp)
	jl	.L13
	addl	$1, -284(%rbp)
.L5:
	movl	-300(%rbp), %eax
	cmpl	%eax, -284(%rbp)
	jl	.L14
	jmp	.L15
.L17:
	movl	-272(%rbp), %eax
	cltq
	movl	-256(%rbp,%rax,4), %edx
	movl	-272(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-256(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L16
	movl	-272(%rbp), %eax
	cltq
	movl	-256(%rbp,%rax,4), %eax
	movl	%eax, -264(%rbp)
	movl	-272(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-256(%rbp,%rax,4), %edx
	movl	-272(%rbp), %eax
	cltq
	movl	%edx, -256(%rbp,%rax,4)
	movl	-272(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-264(%rbp), %edx
	movl	%edx, -256(%rbp,%rax,4)
	movl	$0, -272(%rbp)
	jmp	.L15
.L16:
	addl	$1, -272(%rbp)
.L15:
	movl	-272(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-256(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L17
	movl	-256(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-300(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L18
	jmp	.L4
.L21:
	nop
.L4:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC0:
	.long	-1717986918
	.long	1072273817
	.align 8
.LC1:
	.long	0
	.long	1081589760
	.align 8
.LC2:
	.long	858993459
	.long	1072378675
	.align 8
.LC3:
	.long	0
	.long	1082208256
	.align 8
.LC4:
	.long	-1030792151
	.long	1072441589
	.align 8
.LC5:
	.long	0
	.long	1082822656
	.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
.LC6:
	.string	"%d\n"
.LC7:
	.string	"%d"
	.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
	movl	$30, %ecx
	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	$296, %rsp
	.cfi_def_cfa_offset 352
	movq	%fs:40, %rax
	movq	%rax, 280(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rdi
	rep stosq
	leaq	28(%rsp), %rax
	movq	%rax, 8(%rsp)
.L2:
	movq	8(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC7(%rip), %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L3
	movl	28(%rsp), %eax
	testl	%eax, %eax
	je	.L3
	movslq	%eax, %rcx
	cltd
	imulq	$1374389535, %rcx, %rcx
	sarq	$37, %rcx
	subl	%edx, %ecx
	movl	%ecx, 28(%rsp)
	cmpl	$99, %eax
	jle	.L4
	movl	%ecx, 4(%rsp)
	movsd	.LC0(%rip), %xmm6
	xorl	%esi, %esi
	xorl	%r12d, %r12d
	movsd	.LC1(%rip), %xmm5
	.p2align 4,,10
	.p2align 3
.L5:
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L24
	movl	%r12d, %ebx
	movl	$3435973837, %edi
	leal	(%r12,%r12), %r11d
	xorl	%r8d, %r8d
	imulq	%rdi, %rbx
	movsd	.LC4(%rip), %xmm4
	movsd	.LC5(%rip), %xmm3
	shrq	$34, %rbx
	leal	(%rbx,%rbx,4), %ebp
	movl	%r12d, %ebx
	subl	%ebp, %ebx
	.p2align 4,,10
	.p2align 3
.L26:
	testl	%eax, %eax
	jle	.L13
	movl	%r11d, %edi
	xorl	%edx, %edx
	testl	%r8d, %r8d
	je	.L6
	movl	%r8d, %r15d
	movl	%r8d, %r14d
	andl	$3, %r15d
	andl	$-4, %r14d
	testl	%r12d, %r12d
	je	.L32
	movsd	.LC3(%rip), %xmm7
	movsd	.LC4(%rip), %xmm2
	movsd	.LC2(%rip), %xmm8
	movsd	.LC5(%rip), %xmm1
	movsd	.LC0(%rip), %xmm10
	movsd	.LC1(%rip), %xmm9
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L9:
	addl	$1, %edx
	addl	$5, %edi
	cmpl	%edx, %eax
	je	.L13
.L12:
	cmpl	%edi, %ecx
	jne	.L9
	pxor	%xmm0, %xmm0
	pxor	%xmm11, %xmm11
	cvtsi2sdl	%r14d, %xmm0
	cvtsi2sdl	%r15d, %xmm11
	mulsd	%xmm8, %xmm0
	addsd	%xmm11, %xmm0
	pxor	%xmm11, %xmm11
	cvtsi2sdl	%ebx, %xmm11
	mulsd	%xmm7, %xmm0
	cvttsd2sil	%xmm0, %r9d
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%ebp, %xmm0
	mulsd	%xmm2, %xmm0
	addsd	%xmm11, %xmm0
	mulsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %r10d
	addl	%r10d, %r9d
	testl	%edx, %edx
	je	.L10
	movl	$2863311531, %r13d
	movl	%edx, %r10d
	pxor	%xmm0, %xmm0
	imulq	%r13, %r10
	pxor	%xmm11, %xmm11
	shrq	$33, %r10
	leal	(%r10,%r10,2), %r13d
	movl	%edx, %r10d
	cvtsi2sdl	%r13d, %xmm0
	subl	%r13d, %r10d
	cvtsi2sdl	%r10d, %xmm11
	mulsd	%xmm10, %xmm0
	addsd	%xmm11, %xmm0
	mulsd	%xmm9, %xmm0
	cvttsd2sil	%xmm0, %r10d
	addl	%r10d, %r9d
.L10:
	movslq	%esi, %r10
	addl	$1, %edx
	addl	$1, %esi
	addl	$5, %edi
	movl	%r9d, 32(%rsp,%r10,4)
	cmpl	%edx, %eax
	jne	.L12
	.p2align 4,,10
	.p2align 3
.L13:
	addl	$1, %r8d
	subl	$1, %eax
	addl	$3, %r11d
	cmpl	4(%rsp), %r8d
	jne	.L26
.L24:
	addl	$1, %r12d
	subl	$1, 4(%rsp)
	cmpl	%r12d, %ecx
	jg	.L5
.L4:
	leaq	36(%rsp), %r9
.L27:
	movl	32(%rsp), %r8d
	movq	%r9, %rcx
	xorl	%edx, %edx
	movl	%r8d, %eax
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L29:
	addq	$4, %rcx
	cmpl	%esi, %eax
	jl	.L51
.L28:
	movl	%eax, %esi
	movl	(%rcx), %eax
	movslq	%edx, %rdi
	addl	$1, %edx
	testl	%eax, %eax
	jne	.L29
	movl	%r8d, %edx
	leaq	.LC6(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L6:
	testl	%r12d, %r12d
	je	.L17
	movsd	.LC0(%rip), %xmm7
	movsd	.LC1(%rip), %xmm2
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L18:
	addl	$1, %edx
	addl	$5, %edi
	cmpl	%edx, %eax
	je	.L13
.L21:
	cmpl	%edi, %ecx
	jne	.L18
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%ebp, %xmm0
	cvtsi2sdl	%ebx, %xmm1
	mulsd	%xmm4, %xmm0
	addsd	%xmm1, %xmm0
	mulsd	%xmm3, %xmm0
	cvttsd2sil	%xmm0, %r10d
	testl	%edx, %edx
	je	.L20
	movl	%edx, %r9d
	movl	$2863311531, %r14d
	pxor	%xmm0, %xmm0
	imulq	%r14, %r9
	pxor	%xmm1, %xmm1
	shrq	$33, %r9
	leal	(%r9,%r9,2), %r13d
	movl	%edx, %r9d
	cvtsi2sdl	%r13d, %xmm0
	subl	%r13d, %r9d
	cvtsi2sdl	%r9d, %xmm1
	mulsd	%xmm7, %xmm0
	addsd	%xmm1, %xmm0
	mulsd	%xmm2, %xmm0
	cvttsd2sil	%xmm0, %r9d
	addl	%r9d, %r10d
.L20:
	movslq	%esi, %r9
	addl	$1, %esi
	movl	%r10d, 32(%rsp,%r9,4)
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L52:
	xorl	%r9d, %r9d
	testl	%edx, %edx
	je	.L23
	movl	%edx, %r9d
	movl	$2863311531, %r15d
	pxor	%xmm0, %xmm0
	imulq	%r15, %r9
	pxor	%xmm1, %xmm1
	shrq	$33, %r9
	leal	(%r9,%r9,2), %r10d
	movl	%edx, %r9d
	cvtsi2sdl	%r10d, %xmm0
	subl	%r10d, %r9d
	cvtsi2sdl	%r9d, %xmm1
	mulsd	%xmm6, %xmm0
	addsd	%xmm1, %xmm0
	mulsd	%xmm5, %xmm0
	cvttsd2sil	%xmm0, %r9d
.L23:
	movslq	%esi, %r10
	addl	$1, %esi
	movl	%r9d, 32(%rsp,%r10,4)
.L22:
	addl	$1, %edx
	addl	$5, %edi
	cmpl	%edx, %eax
	je	.L13
.L17:
	cmpl	%edi, %ecx
	jne	.L22
	jmp	.L52
	.p2align 4,,10
	.p2align 3
.L32:
	movsd	.LC2(%rip), %xmm2
	movsd	.LC3(%rip), %xmm1
	movsd	.LC0(%rip), %xmm8
	movsd	.LC1(%rip), %xmm7
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L14:
	addl	$1, %edx
	addl	$5, %edi
	cmpl	%edx, %eax
	je	.L13
.L7:
	cmpl	%edi, %ecx
	jne	.L14
	pxor	%xmm0, %xmm0
	pxor	%xmm9, %xmm9
	cvtsi2sdl	%r14d, %xmm0
	cvtsi2sdl	%r15d, %xmm9
	mulsd	%xmm2, %xmm0
	addsd	%xmm9, %xmm0
	mulsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %r10d
	testl	%edx, %edx
	je	.L16
	movl	$2863311531, %r13d
	movl	%edx, %r9d
	pxor	%xmm0, %xmm0
	imulq	%r13, %r9
	pxor	%xmm9, %xmm9
	shrq	$33, %r9
	leal	(%r9,%r9,2), %r13d
	movl	%edx, %r9d
	cvtsi2sdl	%r13d, %xmm0
	subl	%r13d, %r9d
	cvtsi2sdl	%r9d, %xmm9
	mulsd	%xmm8, %xmm0
	addsd	%xmm9, %xmm0
	mulsd	%xmm7, %xmm0
	cvttsd2sil	%xmm0, %r9d
	addl	%r9d, %r10d
.L16:
	movslq	%esi, %r9
	addl	$1, %esi
	movl	%r10d, 32(%rsp,%r9,4)
	jmp	.L14
.L51:
	movslq	%edx, %rdx
	movl	%eax, 32(%rsp,%rdi,4)
	movl	%esi, 32(%rsp,%rdx,4)
	jmp	.L27
.L3:
	movq	280(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L53
	addq	$296, %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
.L53:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	-1030792151
	.long	1072441589
	.align 8
.LC1:
	.long	0
	.long	1082822656
	.align 8
.LC2:
	.long	858993459
	.long	1072378675
	.align 8
.LC3:
	.long	0
	.long	1082208256
	.align 8
.LC4:
	.long	-1717986918
	.long	1072273817
	.align 8
.LC5:
	.long	0
	.long	1081589760
	.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
.LC6:
	.string	"%d\n"
.LC7:
	.string	"%d"
	.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
	movl	$30, %ecx
	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	$296, %rsp
	.cfi_def_cfa_offset 352
	movq	%fs:40, %rax
	movq	%rax, 280(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rdi
	rep stosq
	leaq	28(%rsp), %rax
	movq	%rax, 8(%rsp)
.L2:
	movq	8(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC7(%rip), %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L3
	movl	28(%rsp), %eax
	testl	%eax, %eax
	je	.L3
	movslq	%eax, %rcx
	cltd
	imulq	$1374389535, %rcx, %rcx
	sarq	$37, %rcx
	subl	%edx, %ecx
	movl	%ecx, 28(%rsp)
	cmpl	$99, %eax
	jle	.L4
	movl	%ecx, 4(%rsp)
	movsd	.LC0(%rip), %xmm6
	xorl	%esi, %esi
	xorl	%r12d, %r12d
	movsd	.LC1(%rip), %xmm5
	.p2align 4,,10
	.p2align 3
.L5:
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L24
	movl	%r12d, %ebx
	movl	$3435973837, %edi
	leal	(%r12,%r12), %r11d
	xorl	%r8d, %r8d
	imulq	%rdi, %rbx
	movsd	.LC4(%rip), %xmm4
	movsd	.LC5(%rip), %xmm3
	shrq	$34, %rbx
	leal	(%rbx,%rbx,4), %ebp
	movl	%r12d, %ebx
	subl	%ebp, %ebx
	.p2align 4,,10
	.p2align 3
.L26:
	testl	%eax, %eax
	jle	.L13
	movl	%r11d, %edi
	xorl	%edx, %edx
	testl	%r8d, %r8d
	je	.L6
	movl	%r8d, %r15d
	movl	%r8d, %r14d
	andl	$3, %r15d
	andl	$-4, %r14d
	testl	%r12d, %r12d
	je	.L32
	movsd	.LC3(%rip), %xmm7
	movsd	.LC4(%rip), %xmm2
	movsd	.LC2(%rip), %xmm8
	movsd	.LC5(%rip), %xmm1
	movsd	.LC0(%rip), %xmm10
	movsd	.LC1(%rip), %xmm9
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L9:
	addl	$1, %edx
	addl	$5, %edi
	cmpl	%edx, %eax
	je	.L13
.L12:
	cmpl	%edi, %ecx
	jne	.L9
	pxor	%xmm0, %xmm0
	pxor	%xmm11, %xmm11
	cvtsi2sdl	%r14d, %xmm0
	cvtsi2sdl	%r15d, %xmm11
	mulsd	%xmm8, %xmm0
	addsd	%xmm11, %xmm0
	pxor	%xmm11, %xmm11
	cvtsi2sdl	%ebx, %xmm11
	mulsd	%xmm7, %xmm0
	cvttsd2sil	%xmm0, %r9d
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%ebp, %xmm0
	mulsd	%xmm2, %xmm0
	addsd	%xmm11, %xmm0
	mulsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %r10d
	addl	%r10d, %r9d
	testl	%edx, %edx
	je	.L10
	movl	$2863311531, %r13d
	movl	%edx, %r10d
	pxor	%xmm0, %xmm0
	imulq	%r13, %r10
	pxor	%xmm11, %xmm11
	shrq	$33, %r10
	leal	(%r10,%r10,2), %r13d
	movl	%edx, %r10d
	cvtsi2sdl	%r13d, %xmm0
	subl	%r13d, %r10d
	cvtsi2sdl	%r10d, %xmm11
	mulsd	%xmm10, %xmm0
	addsd	%xmm11, %xmm0
	mulsd	%xmm9, %xmm0
	cvttsd2sil	%xmm0, %r10d
	addl	%r10d, %r9d
.L10:
	movslq	%esi, %r10
	addl	$1, %edx
	addl	$1, %esi
	addl	$5, %edi
	movl	%r9d, 32(%rsp,%r10,4)
	cmpl	%edx, %eax
	jne	.L12
	.p2align 4,,10
	.p2align 3
.L13:
	addl	$1, %r8d
	subl	$1, %eax
	addl	$3, %r11d
	cmpl	4(%rsp), %r8d
	jne	.L26
.L24:
	addl	$1, %r12d
	subl	$1, 4(%rsp)
	cmpl	%r12d, %ecx
	jg	.L5
.L4:
	leaq	36(%rsp), %r9
.L27:
	movl	32(%rsp), %r8d
	movq	%r9, %rcx
	xorl	%edx, %edx
	movl	%r8d, %eax
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L29:
	addq	$4, %rcx
	cmpl	%esi, %eax
	jl	.L51
.L28:
	movl	%eax, %esi
	movl	(%rcx), %eax
	movslq	%edx, %rdi
	addl	$1, %edx
	testl	%eax, %eax
	jne	.L29
	movl	%r8d, %edx
	leaq	.LC6(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L6:
	testl	%r12d, %r12d
	je	.L17
	movsd	.LC0(%rip), %xmm7
	movsd	.LC1(%rip), %xmm2
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L18:
	addl	$1, %edx
	addl	$5, %edi
	cmpl	%edx, %eax
	je	.L13
.L21:
	cmpl	%edi, %ecx
	jne	.L18
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%ebp, %xmm0
	cvtsi2sdl	%ebx, %xmm1
	mulsd	%xmm4, %xmm0
	addsd	%xmm1, %xmm0
	mulsd	%xmm3, %xmm0
	cvttsd2sil	%xmm0, %r10d
	testl	%edx, %edx
	je	.L20
	movl	%edx, %r9d
	movl	$2863311531, %r14d
	pxor	%xmm0, %xmm0
	imulq	%r14, %r9
	pxor	%xmm1, %xmm1
	shrq	$33, %r9
	leal	(%r9,%r9,2), %r13d
	movl	%edx, %r9d
	cvtsi2sdl	%r13d, %xmm0
	subl	%r13d, %r9d
	cvtsi2sdl	%r9d, %xmm1
	mulsd	%xmm7, %xmm0
	addsd	%xmm1, %xmm0
	mulsd	%xmm2, %xmm0
	cvttsd2sil	%xmm0, %r9d
	addl	%r9d, %r10d
.L20:
	movslq	%esi, %r9
	addl	$1, %esi
	movl	%r10d, 32(%rsp,%r9,4)
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L52:
	xorl	%r9d, %r9d
	testl	%edx, %edx
	je	.L23
	movl	%edx, %r9d
	movl	$2863311531, %r15d
	pxor	%xmm0, %xmm0
	imulq	%r15, %r9
	pxor	%xmm1, %xmm1
	shrq	$33, %r9
	leal	(%r9,%r9,2), %r10d
	movl	%edx, %r9d
	cvtsi2sdl	%r10d, %xmm0
	subl	%r10d, %r9d
	cvtsi2sdl	%r9d, %xmm1
	mulsd	%xmm6, %xmm0
	addsd	%xmm1, %xmm0
	mulsd	%xmm5, %xmm0
	cvttsd2sil	%xmm0, %r9d
.L23:
	movslq	%esi, %r10
	addl	$1, %esi
	movl	%r9d, 32(%rsp,%r10,4)
.L22:
	addl	$1, %edx
	addl	$5, %edi
	cmpl	%edx, %eax
	je	.L13
.L17:
	cmpl	%edi, %ecx
	jne	.L22
	jmp	.L52
	.p2align 4,,10
	.p2align 3
.L32:
	movsd	.LC2(%rip), %xmm2
	movsd	.LC3(%rip), %xmm1
	movsd	.LC0(%rip), %xmm8
	movsd	.LC1(%rip), %xmm7
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L14:
	addl	$1, %edx
	addl	$5, %edi
	cmpl	%edx, %eax
	je	.L13
.L7:
	cmpl	%edi, %ecx
	jne	.L14
	pxor	%xmm0, %xmm0
	pxor	%xmm9, %xmm9
	cvtsi2sdl	%r14d, %xmm0
	cvtsi2sdl	%r15d, %xmm9
	mulsd	%xmm2, %xmm0
	addsd	%xmm9, %xmm0
	mulsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %r10d
	testl	%edx, %edx
	je	.L16
	movl	$2863311531, %r13d
	movl	%edx, %r9d
	pxor	%xmm0, %xmm0
	imulq	%r13, %r9
	pxor	%xmm9, %xmm9
	shrq	$33, %r9
	leal	(%r9,%r9,2), %r13d
	movl	%edx, %r9d
	cvtsi2sdl	%r13d, %xmm0
	subl	%r13d, %r9d
	cvtsi2sdl	%r9d, %xmm9
	mulsd	%xmm8, %xmm0
	addsd	%xmm9, %xmm0
	mulsd	%xmm7, %xmm0
	cvttsd2sil	%xmm0, %r9d
	addl	%r9d, %r10d
.L16:
	movslq	%esi, %r9
	addl	$1, %esi
	movl	%r10d, 32(%rsp,%r9,4)
	jmp	.L14
.L51:
	movslq	%edx, %rdx
	movl	%eax, 32(%rsp,%rdi,4)
	movl	%esi, 32(%rsp,%rdx,4)
	jmp	.L27
.L3:
	movq	280(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L53
	addq	$296, %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
.L53:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	-1030792151
	.long	1072441589
	.align 8
.LC1:
	.long	0
	.long	1082822656
	.align 8
.LC2:
	.long	858993459
	.long	1072378675
	.align 8
.LC3:
	.long	0
	.long	1082208256
	.align 8
.LC4:
	.long	-1717986918
	.long	1072273817
	.align 8
.LC5:
	.long	0
	.long	1081589760
	.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>

int main(void)
{
	int price, a, b, c, t, i, j, k, temp, m, n;
	int sum[60]={0};

	while (scanf("%d", &price) != EOF)
	{
		if(price == 0)
			break;
		else
		{
			a = 0;
			b = 0;
			c = 0;
			n = 0;
			m = 0;
			price = price / 100;
			for (i = 0; i < price; i++)
				for (j = 0; j < price - i; j++)
					for (k = 0; k < price - j - i; k++)
					{
						if (price == i * 2 + j * 3 + k * 5)
						{
							a = ((i - i % 5) * 0.8 + (i % 5)) * 380;
							b = ((j - j % 4) * 0.85 + (j % 4)) * 550;
							c = ((k - k % 3) * 0.88 + (k % 3)) * 850;
							if(i == 0)
								a = 0;
							if(j == 0)
								b = 0;
							if(k == 0)
								c = 0;
							t = a + b + c;
							sum[n] = t;
							n++;
						}
					}
					while(sum[m+1] != 0)
					{
						if(sum[m] > sum[m+1])
						{
							temp = sum[m];
							sum[m] = sum[m+1];
							sum[m+1] = temp;
							m=0;
						}
						else
							m++;
					}
					printf("%d\n", sum[0]);
		}
	}
	return 0;
}
500
1000
0
 500
0000
0
 500
1100
0
 500
0000
1
 500
0000
2
 500
0000
-1
 500
0000
4
 500
0000
8
 500
0000
-2
 500
0000
3

850
1520
 850
 850
1950
 850
 850
 850
 850
 850
 850
 850

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>

int main(void)
{
	int price, a, b, c, t, i, j, k, temp, m, n;
	int sum[60]={0};

	while (scanf("%d", &price) != EOF)
	{
		if(price == 0)
			break;
		else
		{
			a = 0;
			b = 0;
			c = 0;
			n = 0;
			m = 0;
			price = price / 100;
			for (i = 0; i < price; i++)
				for (j = 0; j < price - i; j++)
					for (k = 0; k < price - j - i; k++)
					{
						if (price == i * 2 + j * 3 + k * 5)
						{
							a = ((i - i % 5) * 0.8 + (i % 5)) * 380;
							b = ((j - j % 4) * 0.85 + (j % 4)) * 550;
							c = ((k - k % 3) * 0.88 + (k % 3)) * 850;
							if(i == 0)
								a = 0;
							if(j == 0)
								b = 0;
							if(k == 0)
								c = 0;
							t = a + b + c;
							sum[n] = t;
							n++;
						}
					}
					while(sum[m+1] != 0)
					{
						if(sum[m] > sum[m+1])
						{
							temp = sum[m];
							sum[m] = sum[m+1];
							sum[m+1] = temp;
							m=0;
						}
						else
							m++;
					}
					printf("%d\n", sum[0]);
		}
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC6:
	.string	"%d\n"
.LC7:
	.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	$304, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-256(%rbp), %rdx
	movl	$0, %eax
	movl	$30, %ecx
	movq	%rdx, %rdi
	rep stosq
	jmp	.L2
.L18:
	movl	-300(%rbp), %eax
	testl	%eax, %eax
	je	.L21
	movl	$0, -296(%rbp)
	movl	$0, -292(%rbp)
	movl	$0, -288(%rbp)
	movl	$0, -268(%rbp)
	movl	$0, -272(%rbp)
	movl	-300(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1374389535, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$5, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -300(%rbp)
	movl	$0, -284(%rbp)
	jmp	.L5
.L14:
	movl	$0, -280(%rbp)
	jmp	.L6
.L13:
	movl	$0, -276(%rbp)
	jmp	.L7
.L12:
	movl	-284(%rbp), %eax
	leal	(%rax,%rax), %ecx
	movl	-280(%rbp), %edx
	movl	%edx, %eax
	addl	%eax, %eax
	addl	%edx, %eax
	addl	%eax, %ecx
	movl	-276(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	leal	(%rcx,%rax), %edx
	movl	-300(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	-284(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	%edx
	movl	%eax, %esi
	sarl	$31, %esi
	movl	%edx, %ecx
	subl	%esi, %ecx
	movl	%ecx, %edx
	sall	$2, %edx
	addl	%ecx, %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-284(%rbp), %eax
	subl	%ecx, %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	movsd	.LC0(%rip), %xmm0
	mulsd	%xmm0, %xmm1
	movl	-284(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	%edx
	movl	%eax, %esi
	sarl	$31, %esi
	movl	%edx, %ecx
	subl	%esi, %ecx
	movl	%ecx, %edx
	sall	$2, %edx
	addl	%ecx, %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%ecx, %xmm0
	addsd	%xmm0, %xmm1
	movsd	.LC1(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %eax
	movl	%eax, -296(%rbp)
	movl	-280(%rbp), %eax
	cltd
	shrl	$30, %edx
	addl	%edx, %eax
	andl	$3, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	movl	-280(%rbp), %eax
	subl	%edx, %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	movsd	.LC2(%rip), %xmm0
	mulsd	%xmm0, %xmm1
	movl	-280(%rbp), %eax
	cltd
	shrl	$30, %edx
	addl	%edx, %eax
	andl	$3, %eax
	subl	%edx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	addsd	%xmm0, %xmm1
	movsd	.LC3(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %eax
	movl	%eax, -292(%rbp)
	movl	-276(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	movl	%eax, %esi
	sarl	$31, %esi
	movl	%edx, %ecx
	subl	%esi, %ecx
	movl	%ecx, %edx
	addl	%edx, %edx
	addl	%ecx, %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-276(%rbp), %eax
	subl	%ecx, %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	movsd	.LC4(%rip), %xmm0
	mulsd	%xmm0, %xmm1
	movl	-276(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	movl	%eax, %esi
	sarl	$31, %esi
	movl	%edx, %ecx
	subl	%esi, %ecx
	movl	%ecx, %edx
	addl	%edx, %edx
	addl	%ecx, %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%ecx, %xmm0
	addsd	%xmm0, %xmm1
	movsd	.LC5(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %eax
	movl	%eax, -288(%rbp)
	cmpl	$0, -284(%rbp)
	jne	.L9
	movl	$0, -296(%rbp)
.L9:
	cmpl	$0, -280(%rbp)
	jne	.L10
	movl	$0, -292(%rbp)
.L10:
	cmpl	$0, -276(%rbp)
	jne	.L11
	movl	$0, -288(%rbp)
.L11:
	movl	-296(%rbp), %edx
	movl	-292(%rbp), %eax
	addl	%eax, %edx
	movl	-288(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -260(%rbp)
	movl	-268(%rbp), %eax
	cltq
	movl	-260(%rbp), %edx
	movl	%edx, -256(%rbp,%rax,4)
	addl	$1, -268(%rbp)
.L8:
	addl	$1, -276(%rbp)
.L7:
	movl	-300(%rbp), %eax
	subl	-280(%rbp), %eax
	subl	-284(%rbp), %eax
	cmpl	%eax, -276(%rbp)
	jl	.L12
	addl	$1, -280(%rbp)
.L6:
	movl	-300(%rbp), %eax
	subl	-284(%rbp), %eax
	cmpl	%eax, -280(%rbp)
	jl	.L13
	addl	$1, -284(%rbp)
.L5:
	movl	-300(%rbp), %eax
	cmpl	%eax, -284(%rbp)
	jl	.L14
	jmp	.L15
.L17:
	movl	-272(%rbp), %eax
	cltq
	movl	-256(%rbp,%rax,4), %edx
	movl	-272(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-256(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L16
	movl	-272(%rbp), %eax
	cltq
	movl	-256(%rbp,%rax,4), %eax
	movl	%eax, -264(%rbp)
	movl	-272(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-256(%rbp,%rax,4), %edx
	movl	-272(%rbp), %eax
	cltq
	movl	%edx, -256(%rbp,%rax,4)
	movl	-272(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-264(%rbp), %edx
	movl	%edx, -256(%rbp,%rax,4)
	movl	$0, -272(%rbp)
	jmp	.L15
.L16:
	addl	$1, -272(%rbp)
.L15:
	movl	-272(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-256(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L17
	movl	-256(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-300(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L18
	jmp	.L4
.L21:
	nop
.L4:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC0:
	.long	-1717986918
	.long	1072273817
	.align 8
.LC1:
	.long	0
	.long	1081589760
	.align 8
.LC2:
	.long	858993459
	.long	1072378675
	.align 8
.LC3:
	.long	0
	.long	1082208256
	.align 8
.LC4:
	.long	-1030792151
	.long	1072441589
	.align 8
.LC5:
	.long	0
	.long	1082822656
	.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
.LC6:
	.string	"%d\n"
.LC7:
	.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	$304, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-256(%rbp), %rdx
	movl	$0, %eax
	movl	$30, %ecx
	movq	%rdx, %rdi
	rep stosq
	jmp	.L2
.L18:
	movl	-300(%rbp), %eax
	testl	%eax, %eax
	je	.L21
	movl	$0, -296(%rbp)
	movl	$0, -292(%rbp)
	movl	$0, -288(%rbp)
	movl	$0, -268(%rbp)
	movl	$0, -272(%rbp)
	movl	-300(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1374389535, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$5, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -300(%rbp)
	movl	$0, -284(%rbp)
	jmp	.L5
.L14:
	movl	$0, -280(%rbp)
	jmp	.L6
.L13:
	movl	$0, -276(%rbp)
	jmp	.L7
.L12:
	movl	-284(%rbp), %eax
	leal	(%rax,%rax), %ecx
	movl	-280(%rbp), %edx
	movl	%edx, %eax
	addl	%eax, %eax
	addl	%edx, %eax
	addl	%eax, %ecx
	movl	-276(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	leal	(%rcx,%rax), %edx
	movl	-300(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	-284(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	%edx
	movl	%eax, %esi
	sarl	$31, %esi
	movl	%edx, %ecx
	subl	%esi, %ecx
	movl	%ecx, %edx
	sall	$2, %edx
	addl	%ecx, %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-284(%rbp), %eax
	subl	%ecx, %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	movsd	.LC0(%rip), %xmm0
	mulsd	%xmm0, %xmm1
	movl	-284(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	%edx
	movl	%eax, %esi
	sarl	$31, %esi
	movl	%edx, %ecx
	subl	%esi, %ecx
	movl	%ecx, %edx
	sall	$2, %edx
	addl	%ecx, %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%ecx, %xmm0
	addsd	%xmm0, %xmm1
	movsd	.LC1(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %eax
	movl	%eax, -296(%rbp)
	movl	-280(%rbp), %eax
	cltd
	shrl	$30, %edx
	addl	%edx, %eax
	andl	$3, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	movl	-280(%rbp), %eax
	subl	%edx, %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	movsd	.LC2(%rip), %xmm0
	mulsd	%xmm0, %xmm1
	movl	-280(%rbp), %eax
	cltd
	shrl	$30, %edx
	addl	%edx, %eax
	andl	$3, %eax
	subl	%edx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	addsd	%xmm0, %xmm1
	movsd	.LC3(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %eax
	movl	%eax, -292(%rbp)
	movl	-276(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	movl	%eax, %esi
	sarl	$31, %esi
	movl	%edx, %ecx
	subl	%esi, %ecx
	movl	%ecx, %edx
	addl	%edx, %edx
	addl	%ecx, %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-276(%rbp), %eax
	subl	%ecx, %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	movsd	.LC4(%rip), %xmm0
	mulsd	%xmm0, %xmm1
	movl	-276(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	movl	%eax, %esi
	sarl	$31, %esi
	movl	%edx, %ecx
	subl	%esi, %ecx
	movl	%ecx, %edx
	addl	%edx, %edx
	addl	%ecx, %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%ecx, %xmm0
	addsd	%xmm0, %xmm1
	movsd	.LC5(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	cvttsd2sil	%xmm0, %eax
	movl	%eax, -288(%rbp)
	cmpl	$0, -284(%rbp)
	jne	.L9
	movl	$0, -296(%rbp)
.L9:
	cmpl	$0, -280(%rbp)
	jne	.L10
	movl	$0, -292(%rbp)
.L10:
	cmpl	$0, -276(%rbp)
	jne	.L11
	movl	$0, -288(%rbp)
.L11:
	movl	-296(%rbp), %edx
	movl	-292(%rbp), %eax
	addl	%eax, %edx
	movl	-288(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -260(%rbp)
	movl	-268(%rbp), %eax
	cltq
	movl	-260(%rbp), %edx
	movl	%edx, -256(%rbp,%rax,4)
	addl	$1, -268(%rbp)
.L8:
	addl	$1, -276(%rbp)
.L7:
	movl	-300(%rbp), %eax
	subl	-280(%rbp), %eax
	subl	-284(%rbp), %eax
	cmpl	%eax, -276(%rbp)
	jl	.L12
	addl	$1, -280(%rbp)
.L6:
	movl	-300(%rbp), %eax
	subl	-284(%rbp), %eax
	cmpl	%eax, -280(%rbp)
	jl	.L13
	addl	$1, -284(%rbp)
.L5:
	movl	-300(%rbp), %eax
	cmpl	%eax, -284(%rbp)
	jl	.L14
	jmp	.L15
.L17:
	movl	-272(%rbp), %eax
	cltq
	movl	-256(%rbp,%rax,4), %edx
	movl	-272(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-256(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L16
	movl	-272(%rbp), %eax
	cltq
	movl	-256(%rbp,%rax,4), %eax
	movl	%eax, -264(%rbp)
	movl	-272(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-256(%rbp,%rax,4), %edx
	movl	-272(%rbp), %eax
	cltq
	movl	%edx, -256(%rbp,%rax,4)
	movl	-272(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-264(%rbp), %edx
	movl	%edx, -256(%rbp,%rax,4)
	movl	$0, -272(%rbp)
	jmp	.L15
.L16:
	addl	$1, -272(%rbp)
.L15:
	movl	-272(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-256(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L17
	movl	-256(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-300(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L18
	jmp	.L4
.L21:
	nop
.L4:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC0:
	.long	-1717986918
	.long	1072273817
	.align 8
.LC1:
	.long	0
	.long	1081589760
	.align 8
.LC2:
	.long	858993459
	.long	1072378675
	.align 8
.LC3:
	.long	0
	.long	1082208256
	.align 8
.LC4:
	.long	-1030792151
	.long	1072441589
	.align 8
.LC5:
	.long	0
	.long	1082822656
	.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:
