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

```c
// AOJ Volume 1 Problem 0159 The Best Body

#include <stdio.h>

#define ABS(x)  ((x) < 0.0 ? ((x) * -1.0) : (x))


double cal_bmi(int h, int w)
{
    double bmi;
    
    bmi = (double)w / ((h / 100.0) * (h / 100.0));
    
    return (bmi);
}

int main(void)
{
    int n;
    int i, h, w;
    double bmi;
    int ideal_no;
    double ideal_bmi;
    int j;

    while (1){
        scanf("%d", &n);
        if (n == 0){
            break;
        }
        scanf("%d%d%d", &i, &h, &w);

        ideal_no = i;
        ideal_bmi = cal_bmi(h, w);
        
        for (j = 1; j < n; j++){
            scanf("%d%d%d", &i, &h, &w);
            bmi = cal_bmi(h, w);
            if (ABS(22.0 - bmi) < ABS(22.0 - ideal_bmi)){
                ideal_no = i;
                ideal_bmi = bmi;
            }
        }
        printf("%d\n", ideal_no);
    }

    return (0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cal_bmi
	.type	cal_bmi, @function
cal_bmi:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	pxor	%xmm0, %xmm0
	cvtsi2sdl	-24(%rbp), %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdl	-20(%rbp), %xmm1
	movsd	.LC0(%rip), %xmm3
	movapd	%xmm1, %xmm2
	divsd	%xmm3, %xmm2
	pxor	%xmm1, %xmm1
	cvtsi2sdl	-20(%rbp), %xmm1
	movsd	.LC0(%rip), %xmm3
	divsd	%xmm3, %xmm1
	mulsd	%xmm2, %xmm1
	divsd	%xmm1, %xmm0
	movsd	%xmm0, -8(%rbp)
	movsd	-8(%rbp), %xmm0
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	cal_bmi, .-cal_bmi
	.section	.rodata
.LC1:
	.string	"%d"
.LC2:
	.string	"%d%d%d"
.LC6:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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
.L16:
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-48(%rbp), %eax
	testl	%eax, %eax
	je	.L25
	leaq	-36(%rbp), %rcx
	leaq	-40(%rbp), %rdx
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %eax
	movl	%eax, -32(%rbp)
	movl	-36(%rbp), %edx
	movl	-40(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	cal_bmi
	movq	%xmm0, %rax
	movq	%rax, -24(%rbp)
	movl	$1, -28(%rbp)
	jmp	.L6
.L15:
	leaq	-36(%rbp), %rcx
	leaq	-40(%rbp), %rdx
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-36(%rbp), %edx
	movl	-40(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	cal_bmi
	movq	%xmm0, %rax
	movq	%rax, -16(%rbp)
	movsd	.LC3(%rip), %xmm0
	movapd	%xmm0, %xmm1
	subsd	-16(%rbp), %xmm1
	pxor	%xmm0, %xmm0
	comisd	%xmm1, %xmm0
	jbe	.L23
	movsd	.LC3(%rip), %xmm0
	subsd	-16(%rbp), %xmm0
	movq	.LC5(%rip), %xmm1
	xorpd	%xmm0, %xmm1
	jmp	.L9
.L23:
	movsd	.LC3(%rip), %xmm0
	movapd	%xmm0, %xmm1
	subsd	-16(%rbp), %xmm1
.L9:
	movsd	.LC3(%rip), %xmm0
	movapd	%xmm0, %xmm2
	subsd	-24(%rbp), %xmm2
	pxor	%xmm0, %xmm0
	comisd	%xmm2, %xmm0
	jbe	.L24
	movsd	.LC3(%rip), %xmm0
	subsd	-24(%rbp), %xmm0
	movq	.LC5(%rip), %xmm2
	xorpd	%xmm2, %xmm0
	jmp	.L12
.L24:
	movsd	.LC3(%rip), %xmm0
	subsd	-24(%rbp), %xmm0
.L12:
	comisd	%xmm1, %xmm0
	jbe	.L13
	movl	-44(%rbp), %eax
	movl	%eax, -32(%rbp)
	movsd	-16(%rbp), %xmm0
	movsd	%xmm0, -24(%rbp)
.L13:
	addl	$1, -28(%rbp)
.L6:
	movl	-48(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L15
	movl	-32(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L16
.L25:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC0:
	.long	0
	.long	1079574528
	.align 8
.LC3:
	.long	0
	.long	1077280768
	.align 16
.LC5:
	.long	0
	.long	-2147483648
	.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
	.p2align 4
	.globl	cal_bmi
	.type	cal_bmi, @function
cal_bmi:
.LFB23:
	.cfi_startproc
	endbr64
	pxor	%xmm1, %xmm1
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%edi, %xmm1
	divsd	.LC0(%rip), %xmm1
	mulsd	%xmm1, %xmm1
	cvtsi2sdl	%esi, %xmm0
	divsd	%xmm1, %xmm0
	ret
	.cfi_endproc
.LFE23:
	.size	cal_bmi, .-cal_bmi
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%d%d%d"
.LC6:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC2(%rip), %r13
	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	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L13:
	movq	8(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	testl	%eax, %eax
	je	.L4
	leaq	36(%rsp), %r12
	leaq	32(%rsp), %rbp
	xorl	%eax, %eax
	movq	%r13, %rdi
	leaq	28(%rsp), %rbx
	movq	%r12, %rcx
	movq	%rbp, %rdx
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	cmpl	$1, 24(%rsp)
	cvtsi2sdl	32(%rsp), %xmm0
	divsd	.LC0(%rip), %xmm0
	mulsd	%xmm0, %xmm0
	movl	28(%rsp), %r14d
	cvtsi2sdl	36(%rsp), %xmm1
	divsd	%xmm0, %xmm1
	movsd	%xmm1, (%rsp)
	jle	.L5
	movl	$1, %r15d
	.p2align 4,,10
	.p2align 3
.L12:
	xorl	%eax, %eax
	movq	%r12, %rcx
	movq	%rbp, %rdx
	movq	%rbx, %rsi
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	pxor	%xmm3, %xmm3
	cvtsi2sdl	32(%rsp), %xmm0
	divsd	.LC0(%rip), %xmm0
	mulsd	%xmm0, %xmm0
	cvtsi2sdl	36(%rsp), %xmm1
	divsd	%xmm0, %xmm1
	movsd	.LC3(%rip), %xmm0
	subsd	%xmm1, %xmm0
	comisd	%xmm0, %xmm3
	jbe	.L6
	xorpd	.LC5(%rip), %xmm0
.L6:
	movsd	.LC3(%rip), %xmm2
	subsd	(%rsp), %xmm2
	pxor	%xmm5, %xmm5
	comisd	%xmm2, %xmm5
	jbe	.L8
	xorpd	.LC5(%rip), %xmm2
.L8:
	comisd	%xmm0, %xmm2
	jbe	.L10
	movl	28(%rsp), %r14d
	movsd	%xmm1, (%rsp)
.L10:
	addl	$1, %r15d
	cmpl	%r15d, 24(%rsp)
	jg	.L12
.L5:
	movl	%r14d, %edx
	leaq	.LC6(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L4:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$56, %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
.LFE24:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	0
	.long	1079574528
	.align 8
.LC3:
	.long	0
	.long	1077280768
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC5:
	.long	0
	.long	-2147483648
	.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
	.p2align 4
	.globl	cal_bmi
	.type	cal_bmi, @function
cal_bmi:
.LFB23:
	.cfi_startproc
	endbr64
	pxor	%xmm1, %xmm1
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%edi, %xmm1
	divsd	.LC0(%rip), %xmm1
	mulsd	%xmm1, %xmm1
	cvtsi2sdl	%esi, %xmm0
	divsd	%xmm1, %xmm0
	ret
	.cfi_endproc
.LFE23:
	.size	cal_bmi, .-cal_bmi
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%d%d%d"
.LC6:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC2(%rip), %r13
	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	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L13:
	movq	8(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	testl	%eax, %eax
	je	.L4
	leaq	36(%rsp), %r12
	leaq	32(%rsp), %rbp
	xorl	%eax, %eax
	movq	%r13, %rdi
	leaq	28(%rsp), %rbx
	movq	%r12, %rcx
	movq	%rbp, %rdx
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	cmpl	$1, 24(%rsp)
	cvtsi2sdl	32(%rsp), %xmm0
	divsd	.LC0(%rip), %xmm0
	mulsd	%xmm0, %xmm0
	movl	28(%rsp), %r14d
	cvtsi2sdl	36(%rsp), %xmm1
	divsd	%xmm0, %xmm1
	movsd	%xmm1, (%rsp)
	jle	.L5
	movl	$1, %r15d
	.p2align 4,,10
	.p2align 3
.L12:
	xorl	%eax, %eax
	movq	%r12, %rcx
	movq	%rbp, %rdx
	movq	%rbx, %rsi
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	pxor	%xmm3, %xmm3
	cvtsi2sdl	32(%rsp), %xmm0
	divsd	.LC0(%rip), %xmm0
	mulsd	%xmm0, %xmm0
	cvtsi2sdl	36(%rsp), %xmm1
	divsd	%xmm0, %xmm1
	movsd	.LC3(%rip), %xmm0
	subsd	%xmm1, %xmm0
	comisd	%xmm0, %xmm3
	jbe	.L6
	xorpd	.LC5(%rip), %xmm0
.L6:
	movsd	.LC3(%rip), %xmm2
	subsd	(%rsp), %xmm2
	pxor	%xmm5, %xmm5
	comisd	%xmm2, %xmm5
	jbe	.L8
	xorpd	.LC5(%rip), %xmm2
.L8:
	comisd	%xmm0, %xmm2
	jbe	.L10
	movl	28(%rsp), %r14d
	movsd	%xmm1, (%rsp)
.L10:
	addl	$1, %r15d
	cmpl	%r15d, 24(%rsp)
	jg	.L12
.L5:
	movl	%r14d, %edx
	leaq	.LC6(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L4:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$56, %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
.LFE24:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	0
	.long	1079574528
	.align 8
.LC3:
	.long	0
	.long	1077280768
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC5:
	.long	0
	.long	-2147483648
	.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:

// AOJ Volume 1 Problem 0159 The Best Body

#include <stdio.h>

#define ABS(x)  ((x) < 0.0 ? ((x) * -1.0) : (x))


double cal_bmi(int h, int w)
{
    double bmi;
    
    bmi = (double)w / ((h / 100.0) * (h / 100.0));
    
    return (bmi);
}

int main(void)
{
    int n;
    int i, h, w;
    double bmi;
    int ideal_no;
    double ideal_bmi;
    int j;

    while (1){
        scanf("%d", &n);
        if (n == 0){
            break;
        }
        scanf("%d%d%d", &i, &h, &w);

        ideal_no = i;
        ideal_bmi = cal_bmi(h, w);
        
        for (j = 1; j < n; j++){
            scanf("%d%d%d", &i, &h, &w);
            bmi = cal_bmi(h, w);
            if (ABS(22.0 - bmi) < ABS(22.0 - ideal_bmi)){
                ideal_no = i;
                ideal_bmi = bmi;
            }
        }
        printf("%d\n", ideal_no);
    }

    return (0);
}
6
1 165 66
2 178 60
3 180 72
4 160 65
5 185 62
6 182 62
3
3 160 65
2 180 32
1 170 75
0
 6
1 165 66
2 178 60
3 180 72
4 160 65
5 185 62
6 182 62
3
3 160 65
2 180 70
1 170 103
0
 6
1 165 93
0 178 60
3 180 72
4 160 65
5 185 62
6 182 62
3
3 160 94
2 180 32
1 170 75
0
 6
1 165 93
0 178 60
3 115 72
4 160 65
5 185 62
6 182 62
3
3 160 94
2 180 32
1 170 75
0
 6
1 151 28
0 178 60
3 115 72
4 160 65
7 185 62
11 182 62
3
3 37 94
2 180 32
1 140 75
0
 6
2 95 40
-1 178 60
3 68 72
4 160 65
7 185 62
11 182 62
3
3 37 94
0 180 4
1 140 75
0
 6
2 95 40
-1 317 60
1 68 72
4 160 65
7 185 62
11 182 115
3
3 37 94
0 180 6
1 204 75
0
 6
2 95 40
-1 317 60
1 68 72
8 160 65
7 185 62
11 182 115
3
3 37 94
0 180 6
1 204 75
0
 6
2 95 40
-1 317 60
1 68 72
8 160 65
7 185 62
11 182 115
3
3 37 94
0 180 6
2 204 75
0
 6
2 32 66
1 178 118
3 180 72
4 116 65
5 101 62
6 47 50
3
0 147 129
1 3 14
0 80 24
0

3
3
 3
2
 3
1
 0
1
 0
2
 -1
1
 4
1
 8
1
 8
2
 3
0

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

```c
// AOJ Volume 1 Problem 0159 The Best Body

#include <stdio.h>

#define ABS(x)  ((x) < 0.0 ? ((x) * -1.0) : (x))


double cal_bmi(int h, int w)
{
    double bmi;
    
    bmi = (double)w / ((h / 100.0) * (h / 100.0));
    
    return (bmi);
}

int main(void)
{
    int n;
    int i, h, w;
    double bmi;
    int ideal_no;
    double ideal_bmi;
    int j;

    while (1){
        scanf("%d", &n);
        if (n == 0){
            break;
        }
        scanf("%d%d%d", &i, &h, &w);

        ideal_no = i;
        ideal_bmi = cal_bmi(h, w);
        
        for (j = 1; j < n; j++){
            scanf("%d%d%d", &i, &h, &w);
            bmi = cal_bmi(h, w);
            if (ABS(22.0 - bmi) < ABS(22.0 - ideal_bmi)){
                ideal_no = i;
                ideal_bmi = bmi;
            }
        }
        printf("%d\n", ideal_no);
    }

    return (0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cal_bmi
	.type	cal_bmi, @function
cal_bmi:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	pxor	%xmm0, %xmm0
	cvtsi2sdl	-24(%rbp), %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdl	-20(%rbp), %xmm1
	movsd	.LC0(%rip), %xmm3
	movapd	%xmm1, %xmm2
	divsd	%xmm3, %xmm2
	pxor	%xmm1, %xmm1
	cvtsi2sdl	-20(%rbp), %xmm1
	movsd	.LC0(%rip), %xmm3
	divsd	%xmm3, %xmm1
	mulsd	%xmm2, %xmm1
	divsd	%xmm1, %xmm0
	movsd	%xmm0, -8(%rbp)
	movsd	-8(%rbp), %xmm0
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	cal_bmi, .-cal_bmi
	.section	.rodata
.LC1:
	.string	"%d"
.LC2:
	.string	"%d%d%d"
.LC6:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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
.L16:
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-48(%rbp), %eax
	testl	%eax, %eax
	je	.L25
	leaq	-36(%rbp), %rcx
	leaq	-40(%rbp), %rdx
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %eax
	movl	%eax, -32(%rbp)
	movl	-36(%rbp), %edx
	movl	-40(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	cal_bmi
	movq	%xmm0, %rax
	movq	%rax, -24(%rbp)
	movl	$1, -28(%rbp)
	jmp	.L6
.L15:
	leaq	-36(%rbp), %rcx
	leaq	-40(%rbp), %rdx
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-36(%rbp), %edx
	movl	-40(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	cal_bmi
	movq	%xmm0, %rax
	movq	%rax, -16(%rbp)
	movsd	.LC3(%rip), %xmm0
	movapd	%xmm0, %xmm1
	subsd	-16(%rbp), %xmm1
	pxor	%xmm0, %xmm0
	comisd	%xmm1, %xmm0
	jbe	.L23
	movsd	.LC3(%rip), %xmm0
	subsd	-16(%rbp), %xmm0
	movq	.LC5(%rip), %xmm1
	xorpd	%xmm0, %xmm1
	jmp	.L9
.L23:
	movsd	.LC3(%rip), %xmm0
	movapd	%xmm0, %xmm1
	subsd	-16(%rbp), %xmm1
.L9:
	movsd	.LC3(%rip), %xmm0
	movapd	%xmm0, %xmm2
	subsd	-24(%rbp), %xmm2
	pxor	%xmm0, %xmm0
	comisd	%xmm2, %xmm0
	jbe	.L24
	movsd	.LC3(%rip), %xmm0
	subsd	-24(%rbp), %xmm0
	movq	.LC5(%rip), %xmm2
	xorpd	%xmm2, %xmm0
	jmp	.L12
.L24:
	movsd	.LC3(%rip), %xmm0
	subsd	-24(%rbp), %xmm0
.L12:
	comisd	%xmm1, %xmm0
	jbe	.L13
	movl	-44(%rbp), %eax
	movl	%eax, -32(%rbp)
	movsd	-16(%rbp), %xmm0
	movsd	%xmm0, -24(%rbp)
.L13:
	addl	$1, -28(%rbp)
.L6:
	movl	-48(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L15
	movl	-32(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L16
.L25:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC0:
	.long	0
	.long	1079574528
	.align 8
.LC3:
	.long	0
	.long	1077280768
	.align 16
.LC5:
	.long	0
	.long	-2147483648
	.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
	.globl	cal_bmi
	.type	cal_bmi, @function
cal_bmi:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	pxor	%xmm0, %xmm0
	cvtsi2sdl	-24(%rbp), %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdl	-20(%rbp), %xmm1
	movsd	.LC0(%rip), %xmm3
	movapd	%xmm1, %xmm2
	divsd	%xmm3, %xmm2
	pxor	%xmm1, %xmm1
	cvtsi2sdl	-20(%rbp), %xmm1
	movsd	.LC0(%rip), %xmm3
	divsd	%xmm3, %xmm1
	mulsd	%xmm2, %xmm1
	divsd	%xmm1, %xmm0
	movsd	%xmm0, -8(%rbp)
	movsd	-8(%rbp), %xmm0
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	cal_bmi, .-cal_bmi
	.section	.rodata
.LC1:
	.string	"%d"
.LC2:
	.string	"%d%d%d"
.LC6:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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
.L16:
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-48(%rbp), %eax
	testl	%eax, %eax
	je	.L25
	leaq	-36(%rbp), %rcx
	leaq	-40(%rbp), %rdx
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %eax
	movl	%eax, -32(%rbp)
	movl	-36(%rbp), %edx
	movl	-40(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	cal_bmi
	movq	%xmm0, %rax
	movq	%rax, -24(%rbp)
	movl	$1, -28(%rbp)
	jmp	.L6
.L15:
	leaq	-36(%rbp), %rcx
	leaq	-40(%rbp), %rdx
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-36(%rbp), %edx
	movl	-40(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	cal_bmi
	movq	%xmm0, %rax
	movq	%rax, -16(%rbp)
	movsd	.LC3(%rip), %xmm0
	movapd	%xmm0, %xmm1
	subsd	-16(%rbp), %xmm1
	pxor	%xmm0, %xmm0
	comisd	%xmm1, %xmm0
	jbe	.L23
	movsd	.LC3(%rip), %xmm0
	subsd	-16(%rbp), %xmm0
	movq	.LC5(%rip), %xmm1
	xorpd	%xmm0, %xmm1
	jmp	.L9
.L23:
	movsd	.LC3(%rip), %xmm0
	movapd	%xmm0, %xmm1
	subsd	-16(%rbp), %xmm1
.L9:
	movsd	.LC3(%rip), %xmm0
	movapd	%xmm0, %xmm2
	subsd	-24(%rbp), %xmm2
	pxor	%xmm0, %xmm0
	comisd	%xmm2, %xmm0
	jbe	.L24
	movsd	.LC3(%rip), %xmm0
	subsd	-24(%rbp), %xmm0
	movq	.LC5(%rip), %xmm2
	xorpd	%xmm2, %xmm0
	jmp	.L12
.L24:
	movsd	.LC3(%rip), %xmm0
	subsd	-24(%rbp), %xmm0
.L12:
	comisd	%xmm1, %xmm0
	jbe	.L13
	movl	-44(%rbp), %eax
	movl	%eax, -32(%rbp)
	movsd	-16(%rbp), %xmm0
	movsd	%xmm0, -24(%rbp)
.L13:
	addl	$1, -28(%rbp)
.L6:
	movl	-48(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L15
	movl	-32(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L16
.L25:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC0:
	.long	0
	.long	1079574528
	.align 8
.LC3:
	.long	0
	.long	1077280768
	.align 16
.LC5:
	.long	0
	.long	-2147483648
	.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:
