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

```c
#include <math.h>
#include <stdio.h>
int main(void){
    int i,n,y,p,b[51]={},t[51]={},r[51]={};
    double max,a[51]={};
    
    while(1){
        scanf("%d",&n);
        if(n==0)break;
        
        scanf("%d",&y);
        for(i=1;i<=n;i++){
            scanf("%d %d %d",&b[i],&r[i],&t[i]);
            switch(t[i]){
                case 1 :a[i]=1+(double)y*(double)r[i]/100;break;
                case 2 :a[i]=pow(1+(double)r[i]/100,(double)y);break;
            }
        }
        
        max=0;
        for(i=1;i<=n;i++){
            if(max<a[i]){
                max=a[i];
                p=b[i];
            }
        }
        
        printf("%d\n",p);
    }
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d %d"
.LC5:
	.string	"%d\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
	subq	$1072, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-1040(%rbp), %rdx
	movl	$0, %eax
	movl	$25, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rdi, %rdx
	movl	%eax, (%rdx)
	addq	$4, %rdx
	leaq	-832(%rbp), %rdx
	movl	$0, %eax
	movl	$25, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rdi, %rdx
	movl	%eax, (%rdx)
	addq	$4, %rdx
	leaq	-624(%rbp), %rdx
	movl	$0, %eax
	movl	$25, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rdi, %rdx
	movl	%eax, (%rdx)
	addq	$4, %rdx
	leaq	-416(%rbp), %rdx
	movl	$0, %eax
	movl	$51, %ecx
	movq	%rdx, %rdi
	rep stosq
.L13:
	leaq	-1064(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1064(%rbp), %eax
	testl	%eax, %eax
	je	.L18
	leaq	-1060(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -1056(%rbp)
	jmp	.L4
.L8:
	leaq	-832(%rbp), %rdx
	movl	-1056(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-624(%rbp), %rdx
	movl	-1056(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-1040(%rbp), %rsi
	movl	-1056(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rsi, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1056(%rbp), %eax
	cltq
	movl	-832(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	je	.L5
	cmpl	$2, %eax
	je	.L6
	jmp	.L7
.L5:
	movl	-1060(%rbp), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	movl	-1056(%rbp), %eax
	cltq
	movl	-624(%rbp,%rax,4), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	mulsd	%xmm1, %xmm0
	movsd	.LC2(%rip), %xmm2
	movapd	%xmm0, %xmm1
	divsd	%xmm2, %xmm1
	movsd	.LC3(%rip), %xmm0
	addsd	%xmm1, %xmm0
	movl	-1056(%rbp), %eax
	cltq
	movsd	%xmm0, -416(%rbp,%rax,8)
	jmp	.L7
.L6:
	movl	-1060(%rbp), %eax
	pxor	%xmm3, %xmm3
	cvtsi2sdl	%eax, %xmm3
	movl	-1056(%rbp), %eax
	cltq
	movl	-624(%rbp,%rax,4), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %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, %rax
	movl	-1056(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rax, -416(%rbp,%rdx,8)
	nop
.L7:
	addl	$1, -1056(%rbp)
.L4:
	movl	-1064(%rbp), %eax
	cmpl	%eax, -1056(%rbp)
	jle	.L8
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -1048(%rbp)
	movl	$1, -1056(%rbp)
	jmp	.L9
.L12:
	movl	-1056(%rbp), %eax
	cltq
	movsd	-416(%rbp,%rax,8), %xmm0
	comisd	-1048(%rbp), %xmm0
	jbe	.L10
	movl	-1056(%rbp), %eax
	cltq
	movsd	-416(%rbp,%rax,8), %xmm0
	movsd	%xmm0, -1048(%rbp)
	movl	-1056(%rbp), %eax
	cltq
	movl	-1040(%rbp,%rax,4), %eax
	movl	%eax, -1052(%rbp)
.L10:
	addl	$1, -1056(%rbp)
.L9:
	movl	-1064(%rbp), %eax
	cmpl	%eax, -1056(%rbp)
	jle	.L12
	movl	-1052(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L18:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.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
.LC1:
	.string	"%d"
.LC2:
	.string	"%d %d %d"
.LC5:
	.string	"%d\n"
	.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	$25, %ecx
	leaq	.LC2(%rip), %r15
	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	$1096, %rsp
	.cfi_def_cfa_offset 1152
	movq	%fs:40, %rax
	movq	%rax, 1080(%rsp)
	xorl	%eax, %eax
	leaq	48(%rsp), %rdi
	leaq	256(%rsp), %rbp
	movq	%rdi, 8(%rsp)
	leaq	464(%rsp), %r13
	leaq	672(%rsp), %r12
	rep stosq
	movl	$25, %ecx
	movl	$0, (%rdi)
	movq	%rbp, %rdi
	rep stosq
	movl	$25, %ecx
	movl	$0, (%rdi)
	movq	%r13, %rdi
	rep stosq
	movl	$51, %ecx
	movl	$0, (%rdi)
	movq	%r12, %rdi
	rep stosq
	leaq	40(%rsp), %rax
	movq	%rax, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L11:
	movq	24(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %edx
	testl	%edx, %edx
	je	.L2
	leaq	44(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %eax
	testl	%eax, %eax
	jle	.L3
	movl	$4, %r14d
	movl	$1, %ebx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L19:
	cmpl	$2, %eax
	jne	.L6
	pxor	%xmm1, %xmm1
	pxor	%xmm0, %xmm0
	cvtsi2sdl	44(%rsp), %xmm1
	cvtsi2sdl	0(%r13,%r14), %xmm0
	divsd	.LC3(%rip), %xmm0
	addsd	.LC4(%rip), %xmm0
	call	pow@PLT
	movsd	%xmm0, (%r12,%r14,2)
.L6:
	movl	40(%rsp), %eax
	addl	$1, %ebx
	addq	$4, %r14
	cmpl	%ebx, %eax
	jl	.L18
.L7:
	movq	8(%rsp), %rax
	leaq	0(%rbp,%r14), %rcx
	leaq	0(%r13,%r14), %rdx
	movq	%r15, %rdi
	leaq	(%rax,%r14), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	0(%rbp,%r14), %eax
	cmpl	$1, %eax
	jne	.L19
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	movl	40(%rsp), %eax
	addl	$1, %ebx
	cvtsi2sdl	0(%r13,%r14), %xmm1
	cvtsi2sdl	44(%rsp), %xmm0
	mulsd	%xmm1, %xmm0
	divsd	.LC3(%rip), %xmm0
	addsd	.LC4(%rip), %xmm0
	movsd	%xmm0, (%r12,%r14,2)
	addq	$4, %r14
	cmpl	%ebx, %eax
	jge	.L7
.L18:
	testl	%eax, %eax
	jle	.L3
	leal	1(%rax), %edx
	pxor	%xmm1, %xmm1
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L10:
	movsd	(%r12,%rax,8), %xmm0
	comisd	%xmm1, %xmm0
	jbe	.L8
	movq	8(%rsp), %rdi
	movapd	%xmm0, %xmm1
	movl	(%rdi,%rax,4), %ebx
	movl	%ebx, 20(%rsp)
.L8:
	addq	$1, %rax
	cmpq	%rax, %rdx
	jne	.L10
.L3:
	movl	20(%rsp), %edx
	leaq	.LC5(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L2:
	movq	1080(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$1096, %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
.L20:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC3:
	.long	0
	.long	1079574528
	.align 8
.LC4:
	.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
.LC1:
	.string	"%d"
.LC2:
	.string	"%d %d %d"
.LC5:
	.string	"%d\n"
	.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	$25, %ecx
	leaq	.LC2(%rip), %r15
	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	$1096, %rsp
	.cfi_def_cfa_offset 1152
	movq	%fs:40, %rax
	movq	%rax, 1080(%rsp)
	xorl	%eax, %eax
	leaq	48(%rsp), %rdi
	leaq	256(%rsp), %rbp
	movq	%rdi, 8(%rsp)
	leaq	464(%rsp), %r13
	leaq	672(%rsp), %r12
	rep stosq
	movl	$25, %ecx
	movl	$0, (%rdi)
	movq	%rbp, %rdi
	rep stosq
	movl	$25, %ecx
	movl	$0, (%rdi)
	movq	%r13, %rdi
	rep stosq
	movl	$51, %ecx
	movl	$0, (%rdi)
	movq	%r12, %rdi
	rep stosq
	leaq	40(%rsp), %rax
	movq	%rax, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L11:
	movq	24(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %edx
	testl	%edx, %edx
	je	.L2
	leaq	44(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %eax
	testl	%eax, %eax
	jle	.L3
	movl	$4, %r14d
	movl	$1, %ebx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L19:
	cmpl	$2, %eax
	jne	.L6
	pxor	%xmm1, %xmm1
	pxor	%xmm0, %xmm0
	cvtsi2sdl	44(%rsp), %xmm1
	cvtsi2sdl	0(%r13,%r14), %xmm0
	divsd	.LC3(%rip), %xmm0
	addsd	.LC4(%rip), %xmm0
	call	pow@PLT
	movsd	%xmm0, (%r12,%r14,2)
.L6:
	movl	40(%rsp), %eax
	addl	$1, %ebx
	addq	$4, %r14
	cmpl	%ebx, %eax
	jl	.L18
.L7:
	movq	8(%rsp), %rax
	leaq	0(%rbp,%r14), %rcx
	leaq	0(%r13,%r14), %rdx
	movq	%r15, %rdi
	leaq	(%rax,%r14), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	0(%rbp,%r14), %eax
	cmpl	$1, %eax
	jne	.L19
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	movl	40(%rsp), %eax
	addl	$1, %ebx
	cvtsi2sdl	0(%r13,%r14), %xmm1
	cvtsi2sdl	44(%rsp), %xmm0
	mulsd	%xmm1, %xmm0
	divsd	.LC3(%rip), %xmm0
	addsd	.LC4(%rip), %xmm0
	movsd	%xmm0, (%r12,%r14,2)
	addq	$4, %r14
	cmpl	%ebx, %eax
	jge	.L7
.L18:
	testl	%eax, %eax
	jle	.L3
	leal	1(%rax), %edx
	pxor	%xmm1, %xmm1
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L10:
	movsd	(%r12,%rax,8), %xmm0
	comisd	%xmm1, %xmm0
	jbe	.L8
	movq	8(%rsp), %rdi
	movapd	%xmm0, %xmm1
	movl	(%rdi,%rax,4), %ebx
	movl	%ebx, 20(%rsp)
.L8:
	addq	$1, %rax
	cmpq	%rax, %rdx
	jne	.L10
.L3:
	movl	20(%rsp), %edx
	leaq	.LC5(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L2:
	movq	1080(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$1096, %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
.L20:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC3:
	.long	0
	.long	1079574528
	.align 8
.LC4:
	.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 <math.h>
#include <stdio.h>
int main(void){
    int i,n,y,p,b[51]={},t[51]={},r[51]={};
    double max,a[51]={};
    
    while(1){
        scanf("%d",&n);
        if(n==0)break;
        
        scanf("%d",&y);
        for(i=1;i<=n;i++){
            scanf("%d %d %d",&b[i],&r[i],&t[i]);
            switch(t[i]){
                case 1 :a[i]=1+(double)y*(double)r[i]/100;break;
                case 2 :a[i]=pow(1+(double)r[i]/100,(double)y);break;
            }
        }
        
        max=0;
        for(i=1;i<=n;i++){
            if(max<a[i]){
                max=a[i];
                p=b[i];
            }
        }
        
        printf("%d\n",p);
    }
    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 <math.h>
#include <stdio.h>
int main(void){
    int i,n,y,p,b[51]={},t[51]={},r[51]={};
    double max,a[51]={};
    
    while(1){
        scanf("%d",&n);
        if(n==0)break;
        
        scanf("%d",&y);
        for(i=1;i<=n;i++){
            scanf("%d %d %d",&b[i],&r[i],&t[i]);
            switch(t[i]){
                case 1 :a[i]=1+(double)y*(double)r[i]/100;break;
                case 2 :a[i]=pow(1+(double)r[i]/100,(double)y);break;
            }
        }
        
        max=0;
        for(i=1;i<=n;i++){
            if(max<a[i]){
                max=a[i];
                p=b[i];
            }
        }
        
        printf("%d\n",p);
    }
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d %d"
.LC5:
	.string	"%d\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
	subq	$1072, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-1040(%rbp), %rdx
	movl	$0, %eax
	movl	$25, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rdi, %rdx
	movl	%eax, (%rdx)
	addq	$4, %rdx
	leaq	-832(%rbp), %rdx
	movl	$0, %eax
	movl	$25, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rdi, %rdx
	movl	%eax, (%rdx)
	addq	$4, %rdx
	leaq	-624(%rbp), %rdx
	movl	$0, %eax
	movl	$25, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rdi, %rdx
	movl	%eax, (%rdx)
	addq	$4, %rdx
	leaq	-416(%rbp), %rdx
	movl	$0, %eax
	movl	$51, %ecx
	movq	%rdx, %rdi
	rep stosq
.L13:
	leaq	-1064(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1064(%rbp), %eax
	testl	%eax, %eax
	je	.L18
	leaq	-1060(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -1056(%rbp)
	jmp	.L4
.L8:
	leaq	-832(%rbp), %rdx
	movl	-1056(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-624(%rbp), %rdx
	movl	-1056(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-1040(%rbp), %rsi
	movl	-1056(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rsi, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1056(%rbp), %eax
	cltq
	movl	-832(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	je	.L5
	cmpl	$2, %eax
	je	.L6
	jmp	.L7
.L5:
	movl	-1060(%rbp), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	movl	-1056(%rbp), %eax
	cltq
	movl	-624(%rbp,%rax,4), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	mulsd	%xmm1, %xmm0
	movsd	.LC2(%rip), %xmm2
	movapd	%xmm0, %xmm1
	divsd	%xmm2, %xmm1
	movsd	.LC3(%rip), %xmm0
	addsd	%xmm1, %xmm0
	movl	-1056(%rbp), %eax
	cltq
	movsd	%xmm0, -416(%rbp,%rax,8)
	jmp	.L7
.L6:
	movl	-1060(%rbp), %eax
	pxor	%xmm3, %xmm3
	cvtsi2sdl	%eax, %xmm3
	movl	-1056(%rbp), %eax
	cltq
	movl	-624(%rbp,%rax,4), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %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, %rax
	movl	-1056(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rax, -416(%rbp,%rdx,8)
	nop
.L7:
	addl	$1, -1056(%rbp)
.L4:
	movl	-1064(%rbp), %eax
	cmpl	%eax, -1056(%rbp)
	jle	.L8
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -1048(%rbp)
	movl	$1, -1056(%rbp)
	jmp	.L9
.L12:
	movl	-1056(%rbp), %eax
	cltq
	movsd	-416(%rbp,%rax,8), %xmm0
	comisd	-1048(%rbp), %xmm0
	jbe	.L10
	movl	-1056(%rbp), %eax
	cltq
	movsd	-416(%rbp,%rax,8), %xmm0
	movsd	%xmm0, -1048(%rbp)
	movl	-1056(%rbp), %eax
	cltq
	movl	-1040(%rbp,%rax,4), %eax
	movl	%eax, -1052(%rbp)
.L10:
	addl	$1, -1056(%rbp)
.L9:
	movl	-1064(%rbp), %eax
	cmpl	%eax, -1056(%rbp)
	jle	.L12
	movl	-1052(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L18:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.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	"%d"
.LC1:
	.string	"%d %d %d"
.LC5:
	.string	"%d\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
	subq	$1072, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-1040(%rbp), %rdx
	movl	$0, %eax
	movl	$25, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rdi, %rdx
	movl	%eax, (%rdx)
	addq	$4, %rdx
	leaq	-832(%rbp), %rdx
	movl	$0, %eax
	movl	$25, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rdi, %rdx
	movl	%eax, (%rdx)
	addq	$4, %rdx
	leaq	-624(%rbp), %rdx
	movl	$0, %eax
	movl	$25, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rdi, %rdx
	movl	%eax, (%rdx)
	addq	$4, %rdx
	leaq	-416(%rbp), %rdx
	movl	$0, %eax
	movl	$51, %ecx
	movq	%rdx, %rdi
	rep stosq
.L13:
	leaq	-1064(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1064(%rbp), %eax
	testl	%eax, %eax
	je	.L18
	leaq	-1060(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -1056(%rbp)
	jmp	.L4
.L8:
	leaq	-832(%rbp), %rdx
	movl	-1056(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-624(%rbp), %rdx
	movl	-1056(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-1040(%rbp), %rsi
	movl	-1056(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rsi, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1056(%rbp), %eax
	cltq
	movl	-832(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	je	.L5
	cmpl	$2, %eax
	je	.L6
	jmp	.L7
.L5:
	movl	-1060(%rbp), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	movl	-1056(%rbp), %eax
	cltq
	movl	-624(%rbp,%rax,4), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	mulsd	%xmm1, %xmm0
	movsd	.LC2(%rip), %xmm2
	movapd	%xmm0, %xmm1
	divsd	%xmm2, %xmm1
	movsd	.LC3(%rip), %xmm0
	addsd	%xmm1, %xmm0
	movl	-1056(%rbp), %eax
	cltq
	movsd	%xmm0, -416(%rbp,%rax,8)
	jmp	.L7
.L6:
	movl	-1060(%rbp), %eax
	pxor	%xmm3, %xmm3
	cvtsi2sdl	%eax, %xmm3
	movl	-1056(%rbp), %eax
	cltq
	movl	-624(%rbp,%rax,4), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %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, %rax
	movl	-1056(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rax, -416(%rbp,%rdx,8)
	nop
.L7:
	addl	$1, -1056(%rbp)
.L4:
	movl	-1064(%rbp), %eax
	cmpl	%eax, -1056(%rbp)
	jle	.L8
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -1048(%rbp)
	movl	$1, -1056(%rbp)
	jmp	.L9
.L12:
	movl	-1056(%rbp), %eax
	cltq
	movsd	-416(%rbp,%rax,8), %xmm0
	comisd	-1048(%rbp), %xmm0
	jbe	.L10
	movl	-1056(%rbp), %eax
	cltq
	movsd	-416(%rbp,%rax,8), %xmm0
	movsd	%xmm0, -1048(%rbp)
	movl	-1056(%rbp), %eax
	cltq
	movl	-1040(%rbp,%rax,4), %eax
	movl	%eax, -1052(%rbp)
.L10:
	addl	$1, -1056(%rbp)
.L9:
	movl	-1064(%rbp), %eax
	cmpl	%eax, -1056(%rbp)
	jle	.L12
	movl	-1052(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L18:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.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:
