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) {
	while(1){
		long long int n;
		scanf("%lld",&n);
		if(n==0) break;
		long long int y;
		scanf("%lld",&y);
		long long int i,b[n],r[n],t[n];
		for(i=0;i<n;i++){
			scanf("%lld %lld %lld",&b[i],&r[i],&t[i]);
		}
		double a[n];
		for(i=0;i<n;i++){
			if(t[i]==1){
				a[i]=1.0+(y*(r[i]/100.0));
			}
			else{
				a[i]=pow(1.0+(r[i]/100.0),y);
			}
		}
		long long int j,tmp;
		for(j=n-1;j>0;j--){
			for(i=0;i<j;i++){
				if(a[i]<a[i+1]){
				    tmp=a[i];
				    a[i]=a[i+1];
				    a[i+1]=tmp;
					tmp=b[i];
					b[i]=b[i+1];
					b[i+1]=tmp;
				}
			}
		}
		printf("%lld\n",b[0]);
	}
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld %lld %lld"
.LC4:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$216, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
.L28:
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-160(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-160(%rbp), %rax
	testq	%rax, %rax
	jne	.L2
	movq	%rbx, %rsp
	movl	$0, %eax
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L29
	jmp	.L31
.L2:
	leaq	-152(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-160(%rbp), %rdx
	leaq	-1(%rdx), %rax
	movq	%rax, -128(%rbp)
	movq	%rdx, %rax
	movq	%rax, -176(%rbp)
	movq	$0, -168(%rbp)
	movq	%rdx, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L4:
	cmpq	%rcx, %rsp
	je	.L5
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L4
.L5:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L6
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L6:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -120(%rbp)
	movq	-160(%rbp), %rdx
	leaq	-1(%rdx), %rax
	movq	%rax, -112(%rbp)
	movq	%rdx, %rax
	movq	%rax, -192(%rbp)
	movq	$0, -184(%rbp)
	movq	%rdx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L7:
	cmpq	%rcx, %rsp
	je	.L8
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L7
.L8:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L9
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L9:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -104(%rbp)
	movq	-160(%rbp), %rdx
	leaq	-1(%rdx), %rax
	movq	%rax, -96(%rbp)
	movq	%rdx, %rax
	movq	%rax, -208(%rbp)
	movq	$0, -200(%rbp)
	movq	%rdx, %rax
	movq	%rax, -224(%rbp)
	movq	$0, -216(%rbp)
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L10:
	cmpq	%rcx, %rsp
	je	.L11
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L10
.L11:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L12
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L12:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -88(%rbp)
	movq	$0, -144(%rbp)
	jmp	.L13
.L14:
	movq	-144(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-88(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movq	-144(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-104(%rbp), %rax
	leaq	(%rdx,%rax), %rsi
	movq	-144(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-120(%rbp), %rax
	addq	%rdx, %rax
	movq	%rsi, %rdx
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -144(%rbp)
.L13:
	movq	-160(%rbp), %rax
	cmpq	%rax, -144(%rbp)
	jl	.L14
	movq	-160(%rbp), %rdx
	leaq	-1(%rdx), %rax
	movq	%rax, -80(%rbp)
	movq	%rdx, %rax
	movq	%rax, -240(%rbp)
	movq	$0, -232(%rbp)
	movq	%rdx, %rax
	movq	%rax, -256(%rbp)
	movq	$0, -248(%rbp)
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L15:
	cmpq	%rcx, %rsp
	je	.L16
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L15
.L16:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L17
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L17:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -72(%rbp)
	movq	$0, -144(%rbp)
	jmp	.L18
.L21:
	movq	-88(%rbp), %rdx
	movq	-144(%rbp), %rax
	movq	(%rdx,%rax,8), %rax
	cmpq	$1, %rax
	jne	.L19
	movq	-152(%rbp), %rax
	pxor	%xmm1, %xmm1
	cvtsi2sdq	%rax, %xmm1
	movq	-104(%rbp), %rdx
	movq	-144(%rbp), %rax
	movq	(%rdx,%rax,8), %rax
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rax, %xmm0
	movsd	.LC2(%rip), %xmm2
	divsd	%xmm2, %xmm0
	mulsd	%xmm0, %xmm1
	movsd	.LC3(%rip), %xmm0
	addsd	%xmm1, %xmm0
	movq	-72(%rbp), %rdx
	movq	-144(%rbp), %rax
	movsd	%xmm0, (%rdx,%rax,8)
	jmp	.L20
.L19:
	movq	-152(%rbp), %rax
	pxor	%xmm3, %xmm3
	cvtsi2sdq	%rax, %xmm3
	movq	-104(%rbp), %rdx
	movq	-144(%rbp), %rax
	movq	(%rdx,%rax,8), %rax
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rax, %xmm0
	movsd	.LC2(%rip), %xmm2
	movapd	%xmm0, %xmm1
	divsd	%xmm2, %xmm1
	movsd	.LC3(%rip), %xmm0
	addsd	%xmm0, %xmm1
	movq	%xmm1, %rax
	movapd	%xmm3, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movq	%xmm0, %rcx
	movq	-72(%rbp), %rdx
	movq	-144(%rbp), %rax
	movq	%rcx, (%rdx,%rax,8)
.L20:
	addq	$1, -144(%rbp)
.L18:
	movq	-160(%rbp), %rax
	cmpq	%rax, -144(%rbp)
	jl	.L21
	movq	-160(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -136(%rbp)
	jmp	.L22
.L27:
	movq	$0, -144(%rbp)
	jmp	.L23
.L26:
	movq	-72(%rbp), %rdx
	movq	-144(%rbp), %rax
	movsd	(%rdx,%rax,8), %xmm1
	movq	-144(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	-72(%rbp), %rax
	movsd	(%rax,%rdx,8), %xmm0
	comisd	%xmm1, %xmm0
	jbe	.L24
	movq	-72(%rbp), %rdx
	movq	-144(%rbp), %rax
	movsd	(%rdx,%rax,8), %xmm0
	cvttsd2siq	%xmm0, %rax
	movq	%rax, -64(%rbp)
	movq	-144(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	-72(%rbp), %rax
	movsd	(%rax,%rdx,8), %xmm0
	movq	-72(%rbp), %rdx
	movq	-144(%rbp), %rax
	movsd	%xmm0, (%rdx,%rax,8)
	movq	-144(%rbp), %rax
	leaq	1(%rax), %rdx
	pxor	%xmm0, %xmm0
	cvtsi2sdq	-64(%rbp), %xmm0
	movq	-72(%rbp), %rax
	movsd	%xmm0, (%rax,%rdx,8)
	movq	-120(%rbp), %rdx
	movq	-144(%rbp), %rax
	movq	(%rdx,%rax,8), %rax
	movq	%rax, -64(%rbp)
	movq	-144(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	-120(%rbp), %rax
	movq	(%rax,%rdx,8), %rcx
	movq	-120(%rbp), %rdx
	movq	-144(%rbp), %rax
	movq	%rcx, (%rdx,%rax,8)
	movq	-144(%rbp), %rax
	leaq	1(%rax), %rcx
	movq	-120(%rbp), %rdx
	movq	-64(%rbp), %rax
	movq	%rax, (%rdx,%rcx,8)
.L24:
	addq	$1, -144(%rbp)
.L23:
	movq	-144(%rbp), %rax
	cmpq	-136(%rbp), %rax
	jl	.L26
	subq	$1, -136(%rbp)
.L22:
	cmpq	$0, -136(%rbp)
	jg	.L27
	movq	-120(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	%rbx, %rsp
	jmp	.L28
.L31:
	call	__stack_chk_fail@PLT
.L29:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC2:
	.long	0
	.long	1079574528
	.align 8
.LC3:
	.long	0
	.long	1072693248
	.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
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld %lld %lld"
.LC4:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	leaq	-72(%rbp), %rax
	movq	%rax, -128(%rbp)
	.p2align 4,,10
	.p2align 3
.L22:
	movq	-128(%rbp), %rsi
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	movq	%rsp, -112(%rbp)
	call	__isoc99_scanf@PLT
	cmpq	$0, -72(%rbp)
	je	.L2
	leaq	-64(%rbp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	-72(%rbp), %rcx
	movq	%rsp, %rsi
	leaq	15(,%rcx,8), %rax
	movq	%rax, %rdi
	movq	%rax, %rdx
	andq	$-4096, %rdi
	andq	$-16, %rdx
	subq	%rdi, %rsi
	cmpq	%rsi, %rsp
	je	.L4
.L47:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L47
.L4:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	je	.L5
	orq	$0, -8(%rsp,%rdx)
.L5:
	leaq	7(%rsp), %r8
	movq	%rsp, %rsi
	movq	%rax, %rdx
	movq	%r8, %rdi
	andq	$-8, %r8
	andq	$-16, %rdx
	shrq	$3, %rdi
	movq	%r8, %r14
	movq	%rdi, -120(%rbp)
	movq	%rax, %rdi
	andq	$-4096, %rdi
	subq	%rdi, %rsi
	cmpq	%rsi, %rsp
	je	.L7
.L48:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L48
.L7:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L49
.L8:
	movq	%rsp, -88(%rbp)
	movq	%rax, %rdx
	movq	%rsp, %rsi
	andq	$-4096, %rax
	andq	$-16, %rdx
	subq	%rax, %rsi
.L9:
	cmpq	%rsi, %rsp
	je	.L10
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L9
.L2:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L50
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L49:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rdx)
	jmp	.L8
.L10:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L51
.L11:
	movq	%rsp, %r13
	movq	%r13, -96(%rbp)
	testq	%rcx, %rcx
	jle	.L12
	movq	-88(%rbp), %rbx
	movq	%r14, %r15
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%r13, %rcx
	movq	%rbx, %rdx
	movq	%r15, %rsi
	xorl	%eax, %eax
	addq	$1, %r12
	addq	$8, %r15
	addq	$8, %rbx
	addq	$8, %r13
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movq	-72(%rbp), %rax
	cmpq	%r12, %rax
	jg	.L13
	leaq	15(,%rax,8), %rdx
	movq	%rsp, %rdi
	leaq	-1(%rax), %r13
	movq	%rdx, %rsi
	andq	$-4096, %rdx
	subq	%rdx, %rdi
	andq	$-16, %rsi
	cmpq	%rdi, %rsp
	je	.L15
.L52:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L52
.L15:
	andl	$4095, %esi
	subq	%rsi, %rsp
	testq	%rsi, %rsi
	je	.L16
	orq	$0, -8(%rsp,%rsi)
.L16:
	movq	%rsp, %r12
	testq	%rax, %rax
	jle	.L17
	pxor	%xmm1, %xmm1
	xorl	%esi, %esi
	movq	%rax, %r15
	cvtsi2sdq	-64(%rbp), %xmm1
	movq	%rsi, %rbx
	.p2align 4,,10
	.p2align 3
.L20:
	movq	-88(%rbp), %rax
	pxor	%xmm0, %xmm0
	cvtsi2sdq	(%rax,%rbx,8), %xmm0
	movq	-96(%rbp), %rax
	divsd	.LC2(%rip), %xmm0
	cmpq	$1, (%rax,%rbx,8)
	jne	.L18
	mulsd	%xmm1, %xmm0
	addsd	.LC3(%rip), %xmm0
	movsd	%xmm0, (%r12,%rbx,8)
	addq	$1, %rbx
	cmpq	%rbx, %r15
	jne	.L20
.L17:
	testq	%r13, %r13
	jle	.L12
	.p2align 4,,10
	.p2align 3
.L21:
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L25:
	movsd	(%r12,%rax,8), %xmm1
	addq	$1, %rax
	movsd	(%r12,%rax,8), %xmm0
	comisd	%xmm1, %xmm0
	jbe	.L23
	cvttsd2siq	%xmm1, %rdx
	pxor	%xmm1, %xmm1
	cvtsi2sdq	%rdx, %xmm1
	unpcklpd	%xmm1, %xmm0
	movups	%xmm0, -8(%r12,%rax,8)
	movdqu	-8(%r14,%rax,8), %xmm0
	shufpd	$1, %xmm0, %xmm0
	movups	%xmm0, -8(%r14,%rax,8)
.L23:
	cmpq	%r13, %rax
	jl	.L25
	subq	$1, %r13
	jne	.L21
.L12:
	movq	-120(%rbp), %rax
	leaq	.LC4(%rip), %rsi
	movl	$1, %edi
	movq	0(,%rax,8), %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	-112(%rbp), %rsp
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L18:
	addsd	.LC3(%rip), %xmm0
	movsd	%xmm1, -104(%rbp)
	call	pow@PLT
	movsd	-104(%rbp), %xmm1
	movsd	%xmm0, (%r12,%rbx,8)
	addq	$1, %rbx
	cmpq	%rbx, %r15
	jne	.L20
	testq	%r13, %r13
	jg	.L21
	jmp	.L12
.L51:
	orq	$0, -8(%rsp,%rax)
	jmp	.L11
.L50:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1079574528
	.align 8
.LC3:
	.long	0
	.long	1072693248
	.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
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld %lld %lld"
.LC4:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	leaq	-72(%rbp), %rax
	movq	%rax, -128(%rbp)
	.p2align 4,,10
	.p2align 3
.L22:
	movq	-128(%rbp), %rsi
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	movq	%rsp, -112(%rbp)
	call	__isoc99_scanf@PLT
	cmpq	$0, -72(%rbp)
	je	.L2
	leaq	-64(%rbp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	-72(%rbp), %rcx
	movq	%rsp, %rsi
	leaq	15(,%rcx,8), %rax
	movq	%rax, %rdi
	movq	%rax, %rdx
	andq	$-4096, %rdi
	andq	$-16, %rdx
	subq	%rdi, %rsi
	cmpq	%rsi, %rsp
	je	.L4
.L47:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L47
.L4:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	je	.L5
	orq	$0, -8(%rsp,%rdx)
.L5:
	leaq	7(%rsp), %r8
	movq	%rsp, %rsi
	movq	%rax, %rdx
	movq	%r8, %rdi
	andq	$-8, %r8
	andq	$-16, %rdx
	shrq	$3, %rdi
	movq	%r8, %r14
	movq	%rdi, -120(%rbp)
	movq	%rax, %rdi
	andq	$-4096, %rdi
	subq	%rdi, %rsi
	cmpq	%rsi, %rsp
	je	.L7
.L48:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L48
.L7:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L49
.L8:
	movq	%rsp, -88(%rbp)
	movq	%rax, %rdx
	movq	%rsp, %rsi
	andq	$-4096, %rax
	andq	$-16, %rdx
	subq	%rax, %rsi
.L9:
	cmpq	%rsi, %rsp
	je	.L10
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L9
.L2:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L50
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L49:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rdx)
	jmp	.L8
.L10:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L51
.L11:
	movq	%rsp, %r13
	movq	%r13, -96(%rbp)
	testq	%rcx, %rcx
	jle	.L12
	movq	-88(%rbp), %rbx
	movq	%r14, %r15
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%r13, %rcx
	movq	%rbx, %rdx
	movq	%r15, %rsi
	xorl	%eax, %eax
	addq	$1, %r12
	addq	$8, %r15
	addq	$8, %rbx
	addq	$8, %r13
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movq	-72(%rbp), %rax
	cmpq	%r12, %rax
	jg	.L13
	leaq	15(,%rax,8), %rdx
	movq	%rsp, %rdi
	leaq	-1(%rax), %r13
	movq	%rdx, %rsi
	andq	$-4096, %rdx
	subq	%rdx, %rdi
	andq	$-16, %rsi
	cmpq	%rdi, %rsp
	je	.L15
.L52:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L52
.L15:
	andl	$4095, %esi
	subq	%rsi, %rsp
	testq	%rsi, %rsi
	je	.L16
	orq	$0, -8(%rsp,%rsi)
.L16:
	movq	%rsp, %r12
	testq	%rax, %rax
	jle	.L17
	pxor	%xmm1, %xmm1
	xorl	%esi, %esi
	movq	%rax, %r15
	cvtsi2sdq	-64(%rbp), %xmm1
	movq	%rsi, %rbx
	.p2align 4,,10
	.p2align 3
.L20:
	movq	-88(%rbp), %rax
	pxor	%xmm0, %xmm0
	cvtsi2sdq	(%rax,%rbx,8), %xmm0
	movq	-96(%rbp), %rax
	divsd	.LC2(%rip), %xmm0
	cmpq	$1, (%rax,%rbx,8)
	jne	.L18
	mulsd	%xmm1, %xmm0
	addsd	.LC3(%rip), %xmm0
	movsd	%xmm0, (%r12,%rbx,8)
	addq	$1, %rbx
	cmpq	%rbx, %r15
	jne	.L20
.L17:
	testq	%r13, %r13
	jle	.L12
	.p2align 4,,10
	.p2align 3
.L21:
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L25:
	movsd	(%r12,%rax,8), %xmm1
	addq	$1, %rax
	movsd	(%r12,%rax,8), %xmm0
	comisd	%xmm1, %xmm0
	jbe	.L23
	cvttsd2siq	%xmm1, %rdx
	pxor	%xmm1, %xmm1
	cvtsi2sdq	%rdx, %xmm1
	unpcklpd	%xmm1, %xmm0
	movups	%xmm0, -8(%r12,%rax,8)
	movdqu	-8(%r14,%rax,8), %xmm0
	shufpd	$1, %xmm0, %xmm0
	movups	%xmm0, -8(%r14,%rax,8)
.L23:
	cmpq	%r13, %rax
	jl	.L25
	subq	$1, %r13
	jne	.L21
.L12:
	movq	-120(%rbp), %rax
	leaq	.LC4(%rip), %rsi
	movl	$1, %edi
	movq	0(,%rax,8), %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	-112(%rbp), %rsp
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L18:
	addsd	.LC3(%rip), %xmm0
	movsd	%xmm1, -104(%rbp)
	call	pow@PLT
	movsd	-104(%rbp), %xmm1
	movsd	%xmm0, (%r12,%rbx,8)
	addq	$1, %rbx
	cmpq	%rbx, %r15
	jne	.L20
	testq	%r13, %r13
	jg	.L21
	jmp	.L12
.L51:
	orq	$0, -8(%rsp,%rax)
	jmp	.L11
.L50:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1079574528
	.align 8
.LC3:
	.long	0
	.long	1072693248
	.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) {
	while(1){
		long long int n;
		scanf("%lld",&n);
		if(n==0) break;
		long long int y;
		scanf("%lld",&y);
		long long int i,b[n],r[n],t[n];
		for(i=0;i<n;i++){
			scanf("%lld %lld %lld",&b[i],&r[i],&t[i]);
		}
		double a[n];
		for(i=0;i<n;i++){
			if(t[i]==1){
				a[i]=1.0+(y*(r[i]/100.0));
			}
			else{
				a[i]=pow(1.0+(r[i]/100.0),y);
			}
		}
		long long int j,tmp;
		for(j=n-1;j>0;j--){
			for(i=0;i<j;i++){
				if(a[i]<a[i+1]){
				    tmp=a[i];
				    a[i]=a[i+1];
				    a[i+1]=tmp;
					tmp=b[i];
					b[i]=b[i+1];
					b[i+1]=tmp;
				}
			}
		}
		printf("%lld\n",b[0]);
	}
	return 0;
}

2
8
1 5 2
2 6 1
2
9
1 3 2
2 6 1
0
 2
8
1 5 2
3 6 1
2
7
1 5 2
2 6 1
0
 2
8
1 5 2
2 6 1
0
9
0 3 2
2 6 1
0
 2
14
1 5 2
3 6 1
2
7
1 5 2
2 6 1
0
 2
8
1 5 2
2 6 1
2
7
1 8 2
2 6 1
0
 2
14
1 5 2
3 6 1
2
7
1 5 2
1 6 1
0
 2
8
1 5 2
0 6 1
2
9
1 5 2
2 10 1
0
 2
14
1 5 2
2 6 1
2
9
0 5 2
2 6 1
0
 2
14
1 5 2
3 6 2
2
7
1 5 2
1 6 1
0
 2
8
1 5 2
2 6 1
2
7
0 8 2
2 6 1
0

2
2
 3
2
 2
 1
2
 2
1
 1
1
 0
2
 1
0
 3
1
 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
#include <stdio.h>
#include <math.h>
int main(void) {
	while(1){
		long long int n;
		scanf("%lld",&n);
		if(n==0) break;
		long long int y;
		scanf("%lld",&y);
		long long int i,b[n],r[n],t[n];
		for(i=0;i<n;i++){
			scanf("%lld %lld %lld",&b[i],&r[i],&t[i]);
		}
		double a[n];
		for(i=0;i<n;i++){
			if(t[i]==1){
				a[i]=1.0+(y*(r[i]/100.0));
			}
			else{
				a[i]=pow(1.0+(r[i]/100.0),y);
			}
		}
		long long int j,tmp;
		for(j=n-1;j>0;j--){
			for(i=0;i<j;i++){
				if(a[i]<a[i+1]){
				    tmp=a[i];
				    a[i]=a[i+1];
				    a[i+1]=tmp;
					tmp=b[i];
					b[i]=b[i+1];
					b[i+1]=tmp;
				}
			}
		}
		printf("%lld\n",b[0]);
	}
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld %lld %lld"
.LC4:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$216, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
.L28:
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-160(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-160(%rbp), %rax
	testq	%rax, %rax
	jne	.L2
	movq	%rbx, %rsp
	movl	$0, %eax
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L29
	jmp	.L31
.L2:
	leaq	-152(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-160(%rbp), %rdx
	leaq	-1(%rdx), %rax
	movq	%rax, -128(%rbp)
	movq	%rdx, %rax
	movq	%rax, -176(%rbp)
	movq	$0, -168(%rbp)
	movq	%rdx, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L4:
	cmpq	%rcx, %rsp
	je	.L5
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L4
.L5:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L6
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L6:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -120(%rbp)
	movq	-160(%rbp), %rdx
	leaq	-1(%rdx), %rax
	movq	%rax, -112(%rbp)
	movq	%rdx, %rax
	movq	%rax, -192(%rbp)
	movq	$0, -184(%rbp)
	movq	%rdx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L7:
	cmpq	%rcx, %rsp
	je	.L8
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L7
.L8:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L9
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L9:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -104(%rbp)
	movq	-160(%rbp), %rdx
	leaq	-1(%rdx), %rax
	movq	%rax, -96(%rbp)
	movq	%rdx, %rax
	movq	%rax, -208(%rbp)
	movq	$0, -200(%rbp)
	movq	%rdx, %rax
	movq	%rax, -224(%rbp)
	movq	$0, -216(%rbp)
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L10:
	cmpq	%rcx, %rsp
	je	.L11
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L10
.L11:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L12
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L12:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -88(%rbp)
	movq	$0, -144(%rbp)
	jmp	.L13
.L14:
	movq	-144(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-88(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movq	-144(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-104(%rbp), %rax
	leaq	(%rdx,%rax), %rsi
	movq	-144(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-120(%rbp), %rax
	addq	%rdx, %rax
	movq	%rsi, %rdx
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -144(%rbp)
.L13:
	movq	-160(%rbp), %rax
	cmpq	%rax, -144(%rbp)
	jl	.L14
	movq	-160(%rbp), %rdx
	leaq	-1(%rdx), %rax
	movq	%rax, -80(%rbp)
	movq	%rdx, %rax
	movq	%rax, -240(%rbp)
	movq	$0, -232(%rbp)
	movq	%rdx, %rax
	movq	%rax, -256(%rbp)
	movq	$0, -248(%rbp)
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L15:
	cmpq	%rcx, %rsp
	je	.L16
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L15
.L16:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L17
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L17:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -72(%rbp)
	movq	$0, -144(%rbp)
	jmp	.L18
.L21:
	movq	-88(%rbp), %rdx
	movq	-144(%rbp), %rax
	movq	(%rdx,%rax,8), %rax
	cmpq	$1, %rax
	jne	.L19
	movq	-152(%rbp), %rax
	pxor	%xmm1, %xmm1
	cvtsi2sdq	%rax, %xmm1
	movq	-104(%rbp), %rdx
	movq	-144(%rbp), %rax
	movq	(%rdx,%rax,8), %rax
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rax, %xmm0
	movsd	.LC2(%rip), %xmm2
	divsd	%xmm2, %xmm0
	mulsd	%xmm0, %xmm1
	movsd	.LC3(%rip), %xmm0
	addsd	%xmm1, %xmm0
	movq	-72(%rbp), %rdx
	movq	-144(%rbp), %rax
	movsd	%xmm0, (%rdx,%rax,8)
	jmp	.L20
.L19:
	movq	-152(%rbp), %rax
	pxor	%xmm3, %xmm3
	cvtsi2sdq	%rax, %xmm3
	movq	-104(%rbp), %rdx
	movq	-144(%rbp), %rax
	movq	(%rdx,%rax,8), %rax
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rax, %xmm0
	movsd	.LC2(%rip), %xmm2
	movapd	%xmm0, %xmm1
	divsd	%xmm2, %xmm1
	movsd	.LC3(%rip), %xmm0
	addsd	%xmm0, %xmm1
	movq	%xmm1, %rax
	movapd	%xmm3, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movq	%xmm0, %rcx
	movq	-72(%rbp), %rdx
	movq	-144(%rbp), %rax
	movq	%rcx, (%rdx,%rax,8)
.L20:
	addq	$1, -144(%rbp)
.L18:
	movq	-160(%rbp), %rax
	cmpq	%rax, -144(%rbp)
	jl	.L21
	movq	-160(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -136(%rbp)
	jmp	.L22
.L27:
	movq	$0, -144(%rbp)
	jmp	.L23
.L26:
	movq	-72(%rbp), %rdx
	movq	-144(%rbp), %rax
	movsd	(%rdx,%rax,8), %xmm1
	movq	-144(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	-72(%rbp), %rax
	movsd	(%rax,%rdx,8), %xmm0
	comisd	%xmm1, %xmm0
	jbe	.L24
	movq	-72(%rbp), %rdx
	movq	-144(%rbp), %rax
	movsd	(%rdx,%rax,8), %xmm0
	cvttsd2siq	%xmm0, %rax
	movq	%rax, -64(%rbp)
	movq	-144(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	-72(%rbp), %rax
	movsd	(%rax,%rdx,8), %xmm0
	movq	-72(%rbp), %rdx
	movq	-144(%rbp), %rax
	movsd	%xmm0, (%rdx,%rax,8)
	movq	-144(%rbp), %rax
	leaq	1(%rax), %rdx
	pxor	%xmm0, %xmm0
	cvtsi2sdq	-64(%rbp), %xmm0
	movq	-72(%rbp), %rax
	movsd	%xmm0, (%rax,%rdx,8)
	movq	-120(%rbp), %rdx
	movq	-144(%rbp), %rax
	movq	(%rdx,%rax,8), %rax
	movq	%rax, -64(%rbp)
	movq	-144(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	-120(%rbp), %rax
	movq	(%rax,%rdx,8), %rcx
	movq	-120(%rbp), %rdx
	movq	-144(%rbp), %rax
	movq	%rcx, (%rdx,%rax,8)
	movq	-144(%rbp), %rax
	leaq	1(%rax), %rcx
	movq	-120(%rbp), %rdx
	movq	-64(%rbp), %rax
	movq	%rax, (%rdx,%rcx,8)
.L24:
	addq	$1, -144(%rbp)
.L23:
	movq	-144(%rbp), %rax
	cmpq	-136(%rbp), %rax
	jl	.L26
	subq	$1, -136(%rbp)
.L22:
	cmpq	$0, -136(%rbp)
	jg	.L27
	movq	-120(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	%rbx, %rsp
	jmp	.L28
.L31:
	call	__stack_chk_fail@PLT
.L29:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC2:
	.long	0
	.long	1079574528
	.align 8
.LC3:
	.long	0
	.long	1072693248
	.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	"%lld"
.LC1:
	.string	"%lld %lld %lld"
.LC4:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$216, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
.L28:
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-160(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-160(%rbp), %rax
	testq	%rax, %rax
	jne	.L2
	movq	%rbx, %rsp
	movl	$0, %eax
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L29
	jmp	.L31
.L2:
	leaq	-152(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-160(%rbp), %rdx
	leaq	-1(%rdx), %rax
	movq	%rax, -128(%rbp)
	movq	%rdx, %rax
	movq	%rax, -176(%rbp)
	movq	$0, -168(%rbp)
	movq	%rdx, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L4:
	cmpq	%rcx, %rsp
	je	.L5
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L4
.L5:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L6
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L6:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -120(%rbp)
	movq	-160(%rbp), %rdx
	leaq	-1(%rdx), %rax
	movq	%rax, -112(%rbp)
	movq	%rdx, %rax
	movq	%rax, -192(%rbp)
	movq	$0, -184(%rbp)
	movq	%rdx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L7:
	cmpq	%rcx, %rsp
	je	.L8
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L7
.L8:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L9
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L9:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -104(%rbp)
	movq	-160(%rbp), %rdx
	leaq	-1(%rdx), %rax
	movq	%rax, -96(%rbp)
	movq	%rdx, %rax
	movq	%rax, -208(%rbp)
	movq	$0, -200(%rbp)
	movq	%rdx, %rax
	movq	%rax, -224(%rbp)
	movq	$0, -216(%rbp)
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L10:
	cmpq	%rcx, %rsp
	je	.L11
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L10
.L11:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L12
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L12:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -88(%rbp)
	movq	$0, -144(%rbp)
	jmp	.L13
.L14:
	movq	-144(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-88(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movq	-144(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-104(%rbp), %rax
	leaq	(%rdx,%rax), %rsi
	movq	-144(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-120(%rbp), %rax
	addq	%rdx, %rax
	movq	%rsi, %rdx
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -144(%rbp)
.L13:
	movq	-160(%rbp), %rax
	cmpq	%rax, -144(%rbp)
	jl	.L14
	movq	-160(%rbp), %rdx
	leaq	-1(%rdx), %rax
	movq	%rax, -80(%rbp)
	movq	%rdx, %rax
	movq	%rax, -240(%rbp)
	movq	$0, -232(%rbp)
	movq	%rdx, %rax
	movq	%rax, -256(%rbp)
	movq	$0, -248(%rbp)
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L15:
	cmpq	%rcx, %rsp
	je	.L16
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L15
.L16:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L17
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L17:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -72(%rbp)
	movq	$0, -144(%rbp)
	jmp	.L18
.L21:
	movq	-88(%rbp), %rdx
	movq	-144(%rbp), %rax
	movq	(%rdx,%rax,8), %rax
	cmpq	$1, %rax
	jne	.L19
	movq	-152(%rbp), %rax
	pxor	%xmm1, %xmm1
	cvtsi2sdq	%rax, %xmm1
	movq	-104(%rbp), %rdx
	movq	-144(%rbp), %rax
	movq	(%rdx,%rax,8), %rax
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rax, %xmm0
	movsd	.LC2(%rip), %xmm2
	divsd	%xmm2, %xmm0
	mulsd	%xmm0, %xmm1
	movsd	.LC3(%rip), %xmm0
	addsd	%xmm1, %xmm0
	movq	-72(%rbp), %rdx
	movq	-144(%rbp), %rax
	movsd	%xmm0, (%rdx,%rax,8)
	jmp	.L20
.L19:
	movq	-152(%rbp), %rax
	pxor	%xmm3, %xmm3
	cvtsi2sdq	%rax, %xmm3
	movq	-104(%rbp), %rdx
	movq	-144(%rbp), %rax
	movq	(%rdx,%rax,8), %rax
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rax, %xmm0
	movsd	.LC2(%rip), %xmm2
	movapd	%xmm0, %xmm1
	divsd	%xmm2, %xmm1
	movsd	.LC3(%rip), %xmm0
	addsd	%xmm0, %xmm1
	movq	%xmm1, %rax
	movapd	%xmm3, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movq	%xmm0, %rcx
	movq	-72(%rbp), %rdx
	movq	-144(%rbp), %rax
	movq	%rcx, (%rdx,%rax,8)
.L20:
	addq	$1, -144(%rbp)
.L18:
	movq	-160(%rbp), %rax
	cmpq	%rax, -144(%rbp)
	jl	.L21
	movq	-160(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -136(%rbp)
	jmp	.L22
.L27:
	movq	$0, -144(%rbp)
	jmp	.L23
.L26:
	movq	-72(%rbp), %rdx
	movq	-144(%rbp), %rax
	movsd	(%rdx,%rax,8), %xmm1
	movq	-144(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	-72(%rbp), %rax
	movsd	(%rax,%rdx,8), %xmm0
	comisd	%xmm1, %xmm0
	jbe	.L24
	movq	-72(%rbp), %rdx
	movq	-144(%rbp), %rax
	movsd	(%rdx,%rax,8), %xmm0
	cvttsd2siq	%xmm0, %rax
	movq	%rax, -64(%rbp)
	movq	-144(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	-72(%rbp), %rax
	movsd	(%rax,%rdx,8), %xmm0
	movq	-72(%rbp), %rdx
	movq	-144(%rbp), %rax
	movsd	%xmm0, (%rdx,%rax,8)
	movq	-144(%rbp), %rax
	leaq	1(%rax), %rdx
	pxor	%xmm0, %xmm0
	cvtsi2sdq	-64(%rbp), %xmm0
	movq	-72(%rbp), %rax
	movsd	%xmm0, (%rax,%rdx,8)
	movq	-120(%rbp), %rdx
	movq	-144(%rbp), %rax
	movq	(%rdx,%rax,8), %rax
	movq	%rax, -64(%rbp)
	movq	-144(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	-120(%rbp), %rax
	movq	(%rax,%rdx,8), %rcx
	movq	-120(%rbp), %rdx
	movq	-144(%rbp), %rax
	movq	%rcx, (%rdx,%rax,8)
	movq	-144(%rbp), %rax
	leaq	1(%rax), %rcx
	movq	-120(%rbp), %rdx
	movq	-64(%rbp), %rax
	movq	%rax, (%rdx,%rcx,8)
.L24:
	addq	$1, -144(%rbp)
.L23:
	movq	-144(%rbp), %rax
	cmpq	-136(%rbp), %rax
	jl	.L26
	subq	$1, -136(%rbp)
.L22:
	cmpq	$0, -136(%rbp)
	jg	.L27
	movq	-120(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	%rbx, %rsp
	jmp	.L28
.L31:
	call	__stack_chk_fail@PLT
.L29:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC2:
	.long	0
	.long	1079574528
	.align 8
.LC3:
	.long	0
	.long	1072693248
	.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:
