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

```c
#include <float.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>

int main (void) {
    int     i;
    int     n, t, a;
    int     h;
    float   temp, diff, min_diff=FLT_MAX;
    int     ans;

    scanf("%d%d%d", &n, &t, &a);

    for ( i=0; i<n; i++ ) {
        scanf("%d", &h);
        temp = t - h * 0.006;
        diff = fabs(a-temp);
        if ( diff < min_diff ) {
            min_diff = diff;
            ans = i;
        }
    }

    printf("%d\n", ans+1);
    return EXIT_SUCCESS;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC1:
	.string	"%d%d%d"
.LC2:
	.string	"%d"
.LC5:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movss	.LC0(%rip), %xmm0
	movss	%xmm0, -24(%rbp)
	leaq	-36(%rbp), %rcx
	leaq	-40(%rbp), %rdx
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -28(%rbp)
	jmp	.L2
.L5:
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-40(%rbp), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movl	-32(%rbp), %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	movsd	.LC3(%rip), %xmm1
	mulsd	%xmm2, %xmm1
	subsd	%xmm1, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, -16(%rbp)
	movl	-36(%rbp), %eax
	pxor	%xmm0, %xmm0
	cvtsi2ssl	%eax, %xmm0
	subss	-16(%rbp), %xmm0
	movss	.LC4(%rip), %xmm1
	andps	%xmm1, %xmm0
	movss	%xmm0, -12(%rbp)
	movss	-24(%rbp), %xmm0
	comiss	-12(%rbp), %xmm0
	jbe	.L3
	movss	-12(%rbp), %xmm0
	movss	%xmm0, -24(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -20(%rbp)
.L3:
	addl	$1, -28(%rbp)
.L2:
	movl	-44(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L5
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.align 4
.LC0:
	.long	2139095039
	.align 8
.LC3:
	.long	-1133871366
	.long	1064866676
	.align 16
.LC4:
	.long	2147483647
	.long	0
	.long	0
	.long	0
	.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%d%d"
.LC2:
	.string	"%d"
.LC5:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC1(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$56, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rcx
	leaq	28(%rsp), %rdx
	leaq	24(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	movss	.LC0(%rip), %xmm3
	xorl	%r13d, %r13d
	leaq	36(%rsp), %r12
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L5:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	movss	%xmm3, 12(%rsp)
	call	__isoc99_scanf@PLT
	pxor	%xmm2, %xmm2
	pxor	%xmm1, %xmm1
	pxor	%xmm0, %xmm0
	cvtsi2sdl	36(%rsp), %xmm2
	mulsd	.LC3(%rip), %xmm2
	movss	12(%rsp), %xmm3
	cvtsi2sdl	28(%rsp), %xmm1
	cvtsi2ssl	32(%rsp), %xmm0
	subsd	%xmm2, %xmm1
	cvtsd2ss	%xmm1, %xmm1
	subss	%xmm1, %xmm0
	andps	.LC4(%rip), %xmm0
	comiss	%xmm0, %xmm3
	minss	%xmm3, %xmm0
	cmova	%r13d, %ebx
	movaps	%xmm0, %xmm3
	addl	$1, %r13d
	cmpl	%r13d, 24(%rsp)
	jg	.L5
.L2:
	xorl	%eax, %eax
	leal	1(%rbx), %edx
	movl	$1, %edi
	leaq	.LC5(%rip), %rsi
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L11
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L11:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC0:
	.long	2139095039
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC3:
	.long	-1133871366
	.long	1064866676
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC4:
	.long	2147483647
	.long	0
	.long	0
	.long	0
	.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%d%d"
.LC2:
	.string	"%d"
.LC5:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC1(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$56, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rcx
	leaq	28(%rsp), %rdx
	leaq	24(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	movss	.LC0(%rip), %xmm3
	xorl	%r13d, %r13d
	leaq	36(%rsp), %r12
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L5:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	movss	%xmm3, 12(%rsp)
	call	__isoc99_scanf@PLT
	pxor	%xmm2, %xmm2
	pxor	%xmm1, %xmm1
	pxor	%xmm0, %xmm0
	cvtsi2sdl	36(%rsp), %xmm2
	mulsd	.LC3(%rip), %xmm2
	movss	12(%rsp), %xmm3
	cvtsi2sdl	28(%rsp), %xmm1
	cvtsi2ssl	32(%rsp), %xmm0
	subsd	%xmm2, %xmm1
	cvtsd2ss	%xmm1, %xmm1
	subss	%xmm1, %xmm0
	andps	.LC4(%rip), %xmm0
	comiss	%xmm0, %xmm3
	minss	%xmm3, %xmm0
	cmova	%r13d, %ebx
	movaps	%xmm0, %xmm3
	addl	$1, %r13d
	cmpl	%r13d, 24(%rsp)
	jg	.L5
.L2:
	xorl	%eax, %eax
	leal	1(%rbx), %edx
	movl	$1, %edi
	leaq	.LC5(%rip), %rsi
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L11
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L11:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC0:
	.long	2139095039
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC3:
	.long	-1133871366
	.long	1064866676
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC4:
	.long	2147483647
	.long	0
	.long	0
	.long	0
	.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 <float.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>

int main (void) {
    int     i;
    int     n, t, a;
    int     h;
    float   temp, diff, min_diff=FLT_MAX;
    int     ans;

    scanf("%d%d%d", &n, &t, &a);

    for ( i=0; i<n; i++ ) {
        scanf("%d", &h);
        temp = t - h * 0.006;
        diff = fabs(a-temp);
        if ( diff < min_diff ) {
            min_diff = diff;
            ans = i;
        }
    }

    printf("%d\n", ans+1);
    return EXIT_SUCCESS;
}

2
12 5
1000 2000

1

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

```c
#include <float.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>

int main (void) {
    int     i;
    int     n, t, a;
    int     h;
    float   temp, diff, min_diff=FLT_MAX;
    int     ans;

    scanf("%d%d%d", &n, &t, &a);

    for ( i=0; i<n; i++ ) {
        scanf("%d", &h);
        temp = t - h * 0.006;
        diff = fabs(a-temp);
        if ( diff < min_diff ) {
            min_diff = diff;
            ans = i;
        }
    }

    printf("%d\n", ans+1);
    return EXIT_SUCCESS;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC1:
	.string	"%d%d%d"
.LC2:
	.string	"%d"
.LC5:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movss	.LC0(%rip), %xmm0
	movss	%xmm0, -24(%rbp)
	leaq	-36(%rbp), %rcx
	leaq	-40(%rbp), %rdx
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -28(%rbp)
	jmp	.L2
.L5:
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-40(%rbp), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movl	-32(%rbp), %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	movsd	.LC3(%rip), %xmm1
	mulsd	%xmm2, %xmm1
	subsd	%xmm1, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, -16(%rbp)
	movl	-36(%rbp), %eax
	pxor	%xmm0, %xmm0
	cvtsi2ssl	%eax, %xmm0
	subss	-16(%rbp), %xmm0
	movss	.LC4(%rip), %xmm1
	andps	%xmm1, %xmm0
	movss	%xmm0, -12(%rbp)
	movss	-24(%rbp), %xmm0
	comiss	-12(%rbp), %xmm0
	jbe	.L3
	movss	-12(%rbp), %xmm0
	movss	%xmm0, -24(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -20(%rbp)
.L3:
	addl	$1, -28(%rbp)
.L2:
	movl	-44(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L5
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.align 4
.LC0:
	.long	2139095039
	.align 8
.LC3:
	.long	-1133871366
	.long	1064866676
	.align 16
.LC4:
	.long	2147483647
	.long	0
	.long	0
	.long	0
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC1:
	.string	"%d%d%d"
.LC2:
	.string	"%d"
.LC5:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movss	.LC0(%rip), %xmm0
	movss	%xmm0, -24(%rbp)
	leaq	-36(%rbp), %rcx
	leaq	-40(%rbp), %rdx
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -28(%rbp)
	jmp	.L2
.L5:
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-40(%rbp), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movl	-32(%rbp), %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	movsd	.LC3(%rip), %xmm1
	mulsd	%xmm2, %xmm1
	subsd	%xmm1, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, -16(%rbp)
	movl	-36(%rbp), %eax
	pxor	%xmm0, %xmm0
	cvtsi2ssl	%eax, %xmm0
	subss	-16(%rbp), %xmm0
	movss	.LC4(%rip), %xmm1
	andps	%xmm1, %xmm0
	movss	%xmm0, -12(%rbp)
	movss	-24(%rbp), %xmm0
	comiss	-12(%rbp), %xmm0
	jbe	.L3
	movss	-12(%rbp), %xmm0
	movss	%xmm0, -24(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -20(%rbp)
.L3:
	addl	$1, -28(%rbp)
.L2:
	movl	-44(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L5
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.align 4
.LC0:
	.long	2139095039
	.align 8
.LC3:
	.long	-1133871366
	.long	1064866676
	.align 16
.LC4:
	.long	2147483647
	.long	0
	.long	0
	.long	0
	.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:
