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>
#define PI 3.14159265358979323846264338327950L

int main(void){
    int A,B,H,M;
    long double rad,ans;
    scanf("%d %d %d %d",&A,&B,&H,&M);
    
    rad = ((((long double)H + ((long double)M/60))/12)-((long double)M/60))*2*PI;
   
    ans = sqrtl((long double)(A*A + B*B) -(long double)(2*A*B)*cosl(rad));
    printf("%20.20Lf\n",ans);

    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d %d %d"
.LC4:
	.string	"%20.20Lf\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	$96, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-52(%rbp), %rsi
	leaq	-56(%rbp), %rcx
	leaq	-60(%rbp), %rdx
	leaq	-64(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-56(%rbp), %eax
	movl	%eax, -80(%rbp)
	fildl	-80(%rbp)
	movl	-52(%rbp), %eax
	movl	%eax, -80(%rbp)
	fildl	-80(%rbp)
	fldt	.LC1(%rip)
	fdivrp	%st, %st(1)
	faddp	%st, %st(1)
	fldt	.LC2(%rip)
	fdivrp	%st, %st(1)
	movl	-52(%rbp), %eax
	movl	%eax, -80(%rbp)
	fildl	-80(%rbp)
	fldt	.LC1(%rip)
	fdivrp	%st, %st(1)
	fsubrp	%st, %st(1)
	fld	%st(0)
	faddp	%st, %st(1)
	fldpi
	fmulp	%st, %st(1)
	fstpt	-48(%rbp)
	movl	-64(%rbp), %edx
	movl	-64(%rbp), %eax
	movl	%edx, %ecx
	imull	%eax, %ecx
	movl	-60(%rbp), %edx
	movl	-60(%rbp), %eax
	imull	%edx, %eax
	addl	%ecx, %eax
	movl	%eax, -80(%rbp)
	fildl	-80(%rbp)
	fstpt	-80(%rbp)
	movl	-64(%rbp), %edx
	movl	-60(%rbp), %eax
	imull	%edx, %eax
	addl	%eax, %eax
	movl	%eax, -96(%rbp)
	fildl	-96(%rbp)
	fstpt	-96(%rbp)
	pushq	-40(%rbp)
	pushq	-48(%rbp)
	call	cosl@PLT
	addq	$16, %rsp
	fldt	-96(%rbp)
	fmulp	%st, %st(1)
	fldt	-80(%rbp)
	fsubp	%st, %st(1)
	leaq	-16(%rsp), %rsp
	fstpt	(%rsp)
	call	sqrtl@PLT
	addq	$16, %rsp
	fstpt	-32(%rbp)
	pushq	-24(%rbp)
	pushq	-32(%rbp)
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addq	$16, %rsp
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 16
.LC1:
	.long	0
	.long	-268435456
	.long	16388
	.long	0
	.align 16
.LC2:
	.long	0
	.long	-1073741824
	.long	16386
	.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
.LC0:
	.string	"%d %d %d %d"
.LC5:
	.string	"%20.20Lf\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
	leaq	.LC0(%rip), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$56, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rdx
	leaq	36(%rsp), %r8
	leaq	32(%rsp), %rcx
	leaq	24(%rsp), %rsi
	call	__isoc99_scanf@PLT
	fildl	36(%rsp)
	movl	24(%rsp), %ebx
	subq	$16, %rsp
	.cfi_def_cfa_offset 96
	movl	44(%rsp), %ebp
	fdivs	.LC1(%rip)
	fildl	48(%rsp)
	fadd	%st(1), %st
	fdivs	.LC2(%rip)
	fsubp	%st, %st(1)
	fadd	%st(0), %st
	fldpi
	fmulp	%st, %st(1)
	fstpt	(%rsp)
	call	cosl@PLT
	movl	%ebx, %eax
	movl	%ebp, %edx
	popq	%r8
	.cfi_def_cfa_offset 88
	imull	%ebx, %eax
	popq	%r9
	.cfi_def_cfa_offset 80
	imull	%ebp, %edx
	imull	%ebp, %ebx
	addl	%edx, %eax
	addl	%ebx, %ebx
	movl	%eax, 12(%rsp)
	fildl	12(%rsp)
	movl	%ebx, 12(%rsp)
	fildl	12(%rsp)
	fmulp	%st, %st(2)
	fsubp	%st, %st(1)
	fldz
	fucomip	%st(1), %st
	ja	.L7
	fsqrt
.L4:
	subq	$16, %rsp
	.cfi_def_cfa_offset 96
	leaq	.LC5(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	fstpt	(%rsp)
	call	__printf_chk@PLT
	popq	%rax
	.cfi_def_cfa_offset 88
	popq	%rdx
	.cfi_def_cfa_offset 80
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L10
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L7:
	.cfi_restore_state
	pushq	%rcx
	.cfi_def_cfa_offset 88
	pushq	%rcx
	.cfi_def_cfa_offset 96
	fstpt	(%rsp)
	call	sqrtl@PLT
	popq	%rsi
	.cfi_def_cfa_offset 88
	popq	%rdi
	.cfi_def_cfa_offset 80
	jmp	.L4
.L10:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC1:
	.long	1114636288
	.align 4
.LC2:
	.long	1094713344
	.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	"%d %d %d %d"
.LC5:
	.string	"%20.20Lf\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
	leaq	.LC0(%rip), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$56, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rdx
	leaq	36(%rsp), %r8
	leaq	32(%rsp), %rcx
	leaq	24(%rsp), %rsi
	call	__isoc99_scanf@PLT
	fildl	36(%rsp)
	movl	24(%rsp), %ebx
	subq	$16, %rsp
	.cfi_def_cfa_offset 96
	movl	44(%rsp), %ebp
	fdivs	.LC1(%rip)
	fildl	48(%rsp)
	fadd	%st(1), %st
	fdivs	.LC2(%rip)
	fsubp	%st, %st(1)
	fadd	%st(0), %st
	fldpi
	fmulp	%st, %st(1)
	fstpt	(%rsp)
	call	cosl@PLT
	movl	%ebx, %eax
	movl	%ebp, %edx
	popq	%r8
	.cfi_def_cfa_offset 88
	imull	%ebx, %eax
	popq	%r9
	.cfi_def_cfa_offset 80
	imull	%ebp, %edx
	imull	%ebp, %ebx
	addl	%edx, %eax
	addl	%ebx, %ebx
	movl	%eax, 12(%rsp)
	fildl	12(%rsp)
	movl	%ebx, 12(%rsp)
	fildl	12(%rsp)
	fmulp	%st, %st(2)
	fsubp	%st, %st(1)
	fldz
	fucomip	%st(1), %st
	ja	.L7
	fsqrt
.L4:
	subq	$16, %rsp
	.cfi_def_cfa_offset 96
	leaq	.LC5(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	fstpt	(%rsp)
	call	__printf_chk@PLT
	popq	%rax
	.cfi_def_cfa_offset 88
	popq	%rdx
	.cfi_def_cfa_offset 80
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L10
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L7:
	.cfi_restore_state
	pushq	%rcx
	.cfi_def_cfa_offset 88
	pushq	%rcx
	.cfi_def_cfa_offset 96
	fstpt	(%rsp)
	call	sqrtl@PLT
	popq	%rsi
	.cfi_def_cfa_offset 88
	popq	%rdi
	.cfi_def_cfa_offset 80
	jmp	.L4
.L10:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC1:
	.long	1114636288
	.align 4
.LC2:
	.long	1094713344
	.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>
#define PI 3.14159265358979323846264338327950L

int main(void){
    int A,B,H,M;
    long double rad,ans;
    scanf("%d %d %d %d",&A,&B,&H,&M);
    
    rad = ((((long double)H + ((long double)M/60))/12)-((long double)M/60))*2*PI;
   
    ans = sqrtl((long double)(A*A + B*B) -(long double)(2*A*B)*cosl(rad));
    printf("%20.20Lf\n",ans);

    return 0;
}
3 4 13 0
 3 1 10 40
 3 4 17 0
 3 1 10 59
 6 4 17 0
 3 2 10 59
 9 4 17 0
 3 2 10 89
 9 4 21 0
 3 2 1 89

2.05314157066030701930
 2.99301034645696103186
 6.76643256752230757949
 2.13078210400330252811
 9.67311838972588275854
 1.44238162407924536883
 12.62354265143028629343
 4.98351554812933004611
 9.84885780179610472243
 3.87047429526771715890

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>
#define PI 3.14159265358979323846264338327950L

int main(void){
    int A,B,H,M;
    long double rad,ans;
    scanf("%d %d %d %d",&A,&B,&H,&M);
    
    rad = ((((long double)H + ((long double)M/60))/12)-((long double)M/60))*2*PI;
   
    ans = sqrtl((long double)(A*A + B*B) -(long double)(2*A*B)*cosl(rad));
    printf("%20.20Lf\n",ans);

    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d %d %d"
.LC4:
	.string	"%20.20Lf\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	$96, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-52(%rbp), %rsi
	leaq	-56(%rbp), %rcx
	leaq	-60(%rbp), %rdx
	leaq	-64(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-56(%rbp), %eax
	movl	%eax, -80(%rbp)
	fildl	-80(%rbp)
	movl	-52(%rbp), %eax
	movl	%eax, -80(%rbp)
	fildl	-80(%rbp)
	fldt	.LC1(%rip)
	fdivrp	%st, %st(1)
	faddp	%st, %st(1)
	fldt	.LC2(%rip)
	fdivrp	%st, %st(1)
	movl	-52(%rbp), %eax
	movl	%eax, -80(%rbp)
	fildl	-80(%rbp)
	fldt	.LC1(%rip)
	fdivrp	%st, %st(1)
	fsubrp	%st, %st(1)
	fld	%st(0)
	faddp	%st, %st(1)
	fldpi
	fmulp	%st, %st(1)
	fstpt	-48(%rbp)
	movl	-64(%rbp), %edx
	movl	-64(%rbp), %eax
	movl	%edx, %ecx
	imull	%eax, %ecx
	movl	-60(%rbp), %edx
	movl	-60(%rbp), %eax
	imull	%edx, %eax
	addl	%ecx, %eax
	movl	%eax, -80(%rbp)
	fildl	-80(%rbp)
	fstpt	-80(%rbp)
	movl	-64(%rbp), %edx
	movl	-60(%rbp), %eax
	imull	%edx, %eax
	addl	%eax, %eax
	movl	%eax, -96(%rbp)
	fildl	-96(%rbp)
	fstpt	-96(%rbp)
	pushq	-40(%rbp)
	pushq	-48(%rbp)
	call	cosl@PLT
	addq	$16, %rsp
	fldt	-96(%rbp)
	fmulp	%st, %st(1)
	fldt	-80(%rbp)
	fsubp	%st, %st(1)
	leaq	-16(%rsp), %rsp
	fstpt	(%rsp)
	call	sqrtl@PLT
	addq	$16, %rsp
	fstpt	-32(%rbp)
	pushq	-24(%rbp)
	pushq	-32(%rbp)
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addq	$16, %rsp
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 16
.LC1:
	.long	0
	.long	-268435456
	.long	16388
	.long	0
	.align 16
.LC2:
	.long	0
	.long	-1073741824
	.long	16386
	.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
.LC0:
	.string	"%d %d %d %d"
.LC4:
	.string	"%20.20Lf\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	$96, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-52(%rbp), %rsi
	leaq	-56(%rbp), %rcx
	leaq	-60(%rbp), %rdx
	leaq	-64(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-56(%rbp), %eax
	movl	%eax, -80(%rbp)
	fildl	-80(%rbp)
	movl	-52(%rbp), %eax
	movl	%eax, -80(%rbp)
	fildl	-80(%rbp)
	fldt	.LC1(%rip)
	fdivrp	%st, %st(1)
	faddp	%st, %st(1)
	fldt	.LC2(%rip)
	fdivrp	%st, %st(1)
	movl	-52(%rbp), %eax
	movl	%eax, -80(%rbp)
	fildl	-80(%rbp)
	fldt	.LC1(%rip)
	fdivrp	%st, %st(1)
	fsubrp	%st, %st(1)
	fld	%st(0)
	faddp	%st, %st(1)
	fldpi
	fmulp	%st, %st(1)
	fstpt	-48(%rbp)
	movl	-64(%rbp), %edx
	movl	-64(%rbp), %eax
	movl	%edx, %ecx
	imull	%eax, %ecx
	movl	-60(%rbp), %edx
	movl	-60(%rbp), %eax
	imull	%edx, %eax
	addl	%ecx, %eax
	movl	%eax, -80(%rbp)
	fildl	-80(%rbp)
	fstpt	-80(%rbp)
	movl	-64(%rbp), %edx
	movl	-60(%rbp), %eax
	imull	%edx, %eax
	addl	%eax, %eax
	movl	%eax, -96(%rbp)
	fildl	-96(%rbp)
	fstpt	-96(%rbp)
	pushq	-40(%rbp)
	pushq	-48(%rbp)
	call	cosl@PLT
	addq	$16, %rsp
	fldt	-96(%rbp)
	fmulp	%st, %st(1)
	fldt	-80(%rbp)
	fsubp	%st, %st(1)
	leaq	-16(%rsp), %rsp
	fstpt	(%rsp)
	call	sqrtl@PLT
	addq	$16, %rsp
	fstpt	-32(%rbp)
	pushq	-24(%rbp)
	pushq	-32(%rbp)
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addq	$16, %rsp
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 16
.LC1:
	.long	0
	.long	-268435456
	.long	16388
	.long	0
	.align 16
.LC2:
	.long	0
	.long	-1073741824
	.long	16386
	.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:
