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){
  int a,b,h,m,theta1;
  double theta2,d,l;
  scanf("%d %d %d %d",&a,&b,&h,&m);
  theta1=6*m;
  theta2=30*h+0.5*m;
  d=fabs(theta1-theta2);
  if(d<=180) l=sqrt(a*a+b*b-2*a*b*cos(2*M_PI*d/360));
  if(d>180) l=sqrt(a*a+b*b-2*a*b*cos(2*M_PI*(360-d)/360));
  printf("%.20f",l);

  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d %d %d"
.LC6:
	.string	"%.20f"
	.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	$80, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-40(%rbp), %rsi
	leaq	-44(%rbp), %rcx
	leaq	-48(%rbp), %rdx
	leaq	-52(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-40(%rbp), %edx
	movl	%edx, %eax
	addl	%eax, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, -36(%rbp)
	movl	-44(%rbp), %eax
	imull	$30, %eax, %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	movl	-40(%rbp), %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	movsd	.LC1(%rip), %xmm0
	mulsd	%xmm2, %xmm0
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -24(%rbp)
	pxor	%xmm0, %xmm0
	cvtsi2sdl	-36(%rbp), %xmm0
	subsd	-24(%rbp), %xmm0
	movq	.LC2(%rip), %xmm1
	andpd	%xmm1, %xmm0
	movsd	%xmm0, -16(%rbp)
	movsd	.LC3(%rip), %xmm0
	comisd	-16(%rbp), %xmm0
	jb	.L2
	movl	-52(%rbp), %edx
	movl	-52(%rbp), %eax
	movl	%edx, %ecx
	imull	%eax, %ecx
	movl	-48(%rbp), %edx
	movl	-48(%rbp), %eax
	imull	%edx, %eax
	addl	%ecx, %eax
	pxor	%xmm3, %xmm3
	cvtsi2sdl	%eax, %xmm3
	movsd	%xmm3, -72(%rbp)
	movl	-52(%rbp), %edx
	movl	-48(%rbp), %eax
	imull	%edx, %eax
	addl	%eax, %eax
	pxor	%xmm5, %xmm5
	cvtsi2sdl	%eax, %xmm5
	movsd	%xmm5, -80(%rbp)
	movsd	-16(%rbp), %xmm1
	movsd	.LC4(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	.LC5(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	call	cos@PLT
	mulsd	-80(%rbp), %xmm0
	movsd	-72(%rbp), %xmm3
	subsd	%xmm0, %xmm3
	movq	%xmm3, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	movq	%xmm0, %rax
	movq	%rax, -32(%rbp)
.L2:
	movsd	-16(%rbp), %xmm0
	comisd	.LC3(%rip), %xmm0
	jbe	.L4
	movl	-52(%rbp), %edx
	movl	-52(%rbp), %eax
	movl	%edx, %ecx
	imull	%eax, %ecx
	movl	-48(%rbp), %edx
	movl	-48(%rbp), %eax
	imull	%edx, %eax
	addl	%ecx, %eax
	pxor	%xmm4, %xmm4
	cvtsi2sdl	%eax, %xmm4
	movsd	%xmm4, -72(%rbp)
	movl	-52(%rbp), %edx
	movl	-48(%rbp), %eax
	imull	%edx, %eax
	addl	%eax, %eax
	pxor	%xmm6, %xmm6
	cvtsi2sdl	%eax, %xmm6
	movsd	%xmm6, -80(%rbp)
	movsd	.LC5(%rip), %xmm0
	movapd	%xmm0, %xmm1
	subsd	-16(%rbp), %xmm1
	movsd	.LC4(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	.LC5(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	call	cos@PLT
	mulsd	-80(%rbp), %xmm0
	movsd	-72(%rbp), %xmm4
	subsd	%xmm0, %xmm4
	movq	%xmm4, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	movq	%xmm0, %rax
	movq	%rax, -32(%rbp)
.L4:
	movq	-32(%rbp), %rax
	movq	%rax, %xmm0
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %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
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC1:
	.long	0
	.long	1071644672
	.align 16
.LC2:
	.long	-1
	.long	2147483647
	.long	0
	.long	0
	.align 8
.LC3:
	.long	0
	.long	1080459264
	.align 8
.LC4:
	.long	1413754136
	.long	1075388923
	.align 8
.LC5:
	.long	0
	.long	1081507840
	.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"
.LC6:
	.string	"%.20f"
	.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
	movsd	%xmm0, 8(%rsp)
	leaq	28(%rsp), %rdx
	leaq	32(%rsp), %rcx
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rsi
	leaq	36(%rsp), %r8
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %eax
	pxor	%xmm1, %xmm1
	pxor	%xmm3, %xmm3
	pxor	%xmm2, %xmm2
	movsd	8(%rsp), %xmm0
	cvtsi2sdl	%eax, %xmm3
	leal	(%rax,%rax,2), %edx
	mulsd	.LC1(%rip), %xmm3
	addl	%edx, %edx
	cvtsi2sdl	%edx, %xmm1
	imull	$30, 32(%rsp), %edx
	cvtsi2sdl	%edx, %xmm2
	addsd	%xmm3, %xmm2
	movsd	.LC3(%rip), %xmm3
	subsd	%xmm2, %xmm1
	movapd	%xmm1, %xmm2
	andpd	.LC2(%rip), %xmm2
	comisd	%xmm2, %xmm3
	jnb	.L11
.L2:
	comisd	%xmm3, %xmm2
	ja	.L12
.L4:
	leaq	.LC6(%rip), %rsi
	movl	$1, %edi
	movl	$1, %eax
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L13
	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
.L11:
	.cfi_restore_state
	movl	24(%rsp), %ebx
	movl	28(%rsp), %ebp
	movsd	%xmm2, 8(%rsp)
	mulsd	.LC4(%rip), %xmm1
	divsd	.LC5(%rip), %xmm1
	movapd	%xmm1, %xmm0
	call	cos@PLT
	movl	%ebx, %eax
	pxor	%xmm1, %xmm1
	movl	%ebp, %edx
	imull	%ebx, %eax
	movapd	%xmm0, %xmm4
	pxor	%xmm0, %xmm0
	imull	%ebp, %ebx
	imull	%ebp, %edx
	addl	%ebx, %ebx
	cvtsi2sdl	%ebx, %xmm1
	addl	%edx, %eax
	cvtsi2sdl	%eax, %xmm0
	mulsd	%xmm4, %xmm1
	subsd	%xmm1, %xmm0
	call	sqrt@PLT
	movq	.LC3(%rip), %rax
	movsd	8(%rsp), %xmm2
	movq	%rax, %xmm3
	jmp	.L2
.L12:
	movsd	.LC5(%rip), %xmm1
	movl	24(%rsp), %ebx
	movl	28(%rsp), %ebp
	movapd	%xmm1, %xmm0
	subsd	%xmm2, %xmm0
	mulsd	.LC4(%rip), %xmm0
	divsd	%xmm1, %xmm0
	call	cos@PLT
	movl	%ebx, %eax
	pxor	%xmm1, %xmm1
	movl	%ebp, %edx
	imull	%ebx, %eax
	movapd	%xmm0, %xmm2
	pxor	%xmm0, %xmm0
	imull	%ebp, %ebx
	imull	%ebp, %edx
	addl	%ebx, %ebx
	cvtsi2sdl	%ebx, %xmm1
	addl	%edx, %eax
	cvtsi2sdl	%eax, %xmm0
	mulsd	%xmm2, %xmm1
	subsd	%xmm1, %xmm0
	call	sqrt@PLT
	jmp	.L4
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1071644672
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	-1
	.long	2147483647
	.long	0
	.long	0
	.section	.rodata.cst8
	.align 8
.LC3:
	.long	0
	.long	1080459264
	.align 8
.LC4:
	.long	1413754136
	.long	1075388923
	.align 8
.LC5:
	.long	0
	.long	1081507840
	.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"
.LC6:
	.string	"%.20f"
	.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
	movsd	%xmm0, 8(%rsp)
	leaq	28(%rsp), %rdx
	leaq	32(%rsp), %rcx
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rsi
	leaq	36(%rsp), %r8
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %eax
	pxor	%xmm1, %xmm1
	pxor	%xmm3, %xmm3
	pxor	%xmm2, %xmm2
	movsd	8(%rsp), %xmm0
	cvtsi2sdl	%eax, %xmm3
	leal	(%rax,%rax,2), %edx
	mulsd	.LC1(%rip), %xmm3
	addl	%edx, %edx
	cvtsi2sdl	%edx, %xmm1
	imull	$30, 32(%rsp), %edx
	cvtsi2sdl	%edx, %xmm2
	addsd	%xmm3, %xmm2
	movsd	.LC3(%rip), %xmm3
	subsd	%xmm2, %xmm1
	movapd	%xmm1, %xmm2
	andpd	.LC2(%rip), %xmm2
	comisd	%xmm2, %xmm3
	jnb	.L11
.L2:
	comisd	%xmm3, %xmm2
	ja	.L12
.L4:
	leaq	.LC6(%rip), %rsi
	movl	$1, %edi
	movl	$1, %eax
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L13
	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
.L11:
	.cfi_restore_state
	movl	24(%rsp), %ebx
	movl	28(%rsp), %ebp
	movsd	%xmm2, 8(%rsp)
	mulsd	.LC4(%rip), %xmm1
	divsd	.LC5(%rip), %xmm1
	movapd	%xmm1, %xmm0
	call	cos@PLT
	movl	%ebx, %eax
	pxor	%xmm1, %xmm1
	movl	%ebp, %edx
	imull	%ebx, %eax
	movapd	%xmm0, %xmm4
	pxor	%xmm0, %xmm0
	imull	%ebp, %ebx
	imull	%ebp, %edx
	addl	%ebx, %ebx
	cvtsi2sdl	%ebx, %xmm1
	addl	%edx, %eax
	cvtsi2sdl	%eax, %xmm0
	mulsd	%xmm4, %xmm1
	subsd	%xmm1, %xmm0
	call	sqrt@PLT
	movq	.LC3(%rip), %rax
	movsd	8(%rsp), %xmm2
	movq	%rax, %xmm3
	jmp	.L2
.L12:
	movsd	.LC5(%rip), %xmm1
	movl	24(%rsp), %ebx
	movl	28(%rsp), %ebp
	movapd	%xmm1, %xmm0
	subsd	%xmm2, %xmm0
	mulsd	.LC4(%rip), %xmm0
	divsd	%xmm1, %xmm0
	call	cos@PLT
	movl	%ebx, %eax
	pxor	%xmm1, %xmm1
	movl	%ebp, %edx
	imull	%ebx, %eax
	movapd	%xmm0, %xmm2
	pxor	%xmm0, %xmm0
	imull	%ebp, %ebx
	imull	%ebp, %edx
	addl	%ebx, %ebx
	cvtsi2sdl	%ebx, %xmm1
	addl	%edx, %eax
	cvtsi2sdl	%eax, %xmm0
	mulsd	%xmm2, %xmm1
	subsd	%xmm1, %xmm0
	call	sqrt@PLT
	jmp	.L4
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1071644672
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	-1
	.long	2147483647
	.long	0
	.long	0
	.section	.rodata.cst8
	.align 8
.LC3:
	.long	0
	.long	1080459264
	.align 8
.LC4:
	.long	1413754136
	.long	1075388923
	.align 8
.LC5:
	.long	0
	.long	1081507840
	.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){
  int a,b,h,m,theta1;
  double theta2,d,l;
  scanf("%d %d %d %d",&a,&b,&h,&m);
  theta1=6*m;
  theta2=30*h+0.5*m;
  d=fabs(theta1-theta2);
  if(d<=180) l=sqrt(a*a+b*b-2*a*b*cos(2*M_PI*d/360));
  if(d>180) l=sqrt(a*a+b*b-2*a*b*cos(2*M_PI*(360-d)/360));
  printf("%.20f",l);

  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.05314157066030666954 2.99301034645696084624 6.76643256752230737305 2.13078210400330281260 9.67311838972588233787 1.44238162407924574993 12.62354265143028619889 4.98351554812933006389 9.84885780179610570428 3.87047429526771713526
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){
  int a,b,h,m,theta1;
  double theta2,d,l;
  scanf("%d %d %d %d",&a,&b,&h,&m);
  theta1=6*m;
  theta2=30*h+0.5*m;
  d=fabs(theta1-theta2);
  if(d<=180) l=sqrt(a*a+b*b-2*a*b*cos(2*M_PI*d/360));
  if(d>180) l=sqrt(a*a+b*b-2*a*b*cos(2*M_PI*(360-d)/360));
  printf("%.20f",l);

  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d %d %d"
.LC6:
	.string	"%.20f"
	.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	$80, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-40(%rbp), %rsi
	leaq	-44(%rbp), %rcx
	leaq	-48(%rbp), %rdx
	leaq	-52(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-40(%rbp), %edx
	movl	%edx, %eax
	addl	%eax, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, -36(%rbp)
	movl	-44(%rbp), %eax
	imull	$30, %eax, %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	movl	-40(%rbp), %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	movsd	.LC1(%rip), %xmm0
	mulsd	%xmm2, %xmm0
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -24(%rbp)
	pxor	%xmm0, %xmm0
	cvtsi2sdl	-36(%rbp), %xmm0
	subsd	-24(%rbp), %xmm0
	movq	.LC2(%rip), %xmm1
	andpd	%xmm1, %xmm0
	movsd	%xmm0, -16(%rbp)
	movsd	.LC3(%rip), %xmm0
	comisd	-16(%rbp), %xmm0
	jb	.L2
	movl	-52(%rbp), %edx
	movl	-52(%rbp), %eax
	movl	%edx, %ecx
	imull	%eax, %ecx
	movl	-48(%rbp), %edx
	movl	-48(%rbp), %eax
	imull	%edx, %eax
	addl	%ecx, %eax
	pxor	%xmm3, %xmm3
	cvtsi2sdl	%eax, %xmm3
	movsd	%xmm3, -72(%rbp)
	movl	-52(%rbp), %edx
	movl	-48(%rbp), %eax
	imull	%edx, %eax
	addl	%eax, %eax
	pxor	%xmm5, %xmm5
	cvtsi2sdl	%eax, %xmm5
	movsd	%xmm5, -80(%rbp)
	movsd	-16(%rbp), %xmm1
	movsd	.LC4(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	.LC5(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	call	cos@PLT
	mulsd	-80(%rbp), %xmm0
	movsd	-72(%rbp), %xmm3
	subsd	%xmm0, %xmm3
	movq	%xmm3, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	movq	%xmm0, %rax
	movq	%rax, -32(%rbp)
.L2:
	movsd	-16(%rbp), %xmm0
	comisd	.LC3(%rip), %xmm0
	jbe	.L4
	movl	-52(%rbp), %edx
	movl	-52(%rbp), %eax
	movl	%edx, %ecx
	imull	%eax, %ecx
	movl	-48(%rbp), %edx
	movl	-48(%rbp), %eax
	imull	%edx, %eax
	addl	%ecx, %eax
	pxor	%xmm4, %xmm4
	cvtsi2sdl	%eax, %xmm4
	movsd	%xmm4, -72(%rbp)
	movl	-52(%rbp), %edx
	movl	-48(%rbp), %eax
	imull	%edx, %eax
	addl	%eax, %eax
	pxor	%xmm6, %xmm6
	cvtsi2sdl	%eax, %xmm6
	movsd	%xmm6, -80(%rbp)
	movsd	.LC5(%rip), %xmm0
	movapd	%xmm0, %xmm1
	subsd	-16(%rbp), %xmm1
	movsd	.LC4(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	.LC5(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	call	cos@PLT
	mulsd	-80(%rbp), %xmm0
	movsd	-72(%rbp), %xmm4
	subsd	%xmm0, %xmm4
	movq	%xmm4, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	movq	%xmm0, %rax
	movq	%rax, -32(%rbp)
.L4:
	movq	-32(%rbp), %rax
	movq	%rax, %xmm0
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %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
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC1:
	.long	0
	.long	1071644672
	.align 16
.LC2:
	.long	-1
	.long	2147483647
	.long	0
	.long	0
	.align 8
.LC3:
	.long	0
	.long	1080459264
	.align 8
.LC4:
	.long	1413754136
	.long	1075388923
	.align 8
.LC5:
	.long	0
	.long	1081507840
	.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"
.LC6:
	.string	"%.20f"
	.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	$80, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-40(%rbp), %rsi
	leaq	-44(%rbp), %rcx
	leaq	-48(%rbp), %rdx
	leaq	-52(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-40(%rbp), %edx
	movl	%edx, %eax
	addl	%eax, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, -36(%rbp)
	movl	-44(%rbp), %eax
	imull	$30, %eax, %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	movl	-40(%rbp), %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	movsd	.LC1(%rip), %xmm0
	mulsd	%xmm2, %xmm0
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -24(%rbp)
	pxor	%xmm0, %xmm0
	cvtsi2sdl	-36(%rbp), %xmm0
	subsd	-24(%rbp), %xmm0
	movq	.LC2(%rip), %xmm1
	andpd	%xmm1, %xmm0
	movsd	%xmm0, -16(%rbp)
	movsd	.LC3(%rip), %xmm0
	comisd	-16(%rbp), %xmm0
	jb	.L2
	movl	-52(%rbp), %edx
	movl	-52(%rbp), %eax
	movl	%edx, %ecx
	imull	%eax, %ecx
	movl	-48(%rbp), %edx
	movl	-48(%rbp), %eax
	imull	%edx, %eax
	addl	%ecx, %eax
	pxor	%xmm3, %xmm3
	cvtsi2sdl	%eax, %xmm3
	movsd	%xmm3, -72(%rbp)
	movl	-52(%rbp), %edx
	movl	-48(%rbp), %eax
	imull	%edx, %eax
	addl	%eax, %eax
	pxor	%xmm5, %xmm5
	cvtsi2sdl	%eax, %xmm5
	movsd	%xmm5, -80(%rbp)
	movsd	-16(%rbp), %xmm1
	movsd	.LC4(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	.LC5(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	call	cos@PLT
	mulsd	-80(%rbp), %xmm0
	movsd	-72(%rbp), %xmm3
	subsd	%xmm0, %xmm3
	movq	%xmm3, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	movq	%xmm0, %rax
	movq	%rax, -32(%rbp)
.L2:
	movsd	-16(%rbp), %xmm0
	comisd	.LC3(%rip), %xmm0
	jbe	.L4
	movl	-52(%rbp), %edx
	movl	-52(%rbp), %eax
	movl	%edx, %ecx
	imull	%eax, %ecx
	movl	-48(%rbp), %edx
	movl	-48(%rbp), %eax
	imull	%edx, %eax
	addl	%ecx, %eax
	pxor	%xmm4, %xmm4
	cvtsi2sdl	%eax, %xmm4
	movsd	%xmm4, -72(%rbp)
	movl	-52(%rbp), %edx
	movl	-48(%rbp), %eax
	imull	%edx, %eax
	addl	%eax, %eax
	pxor	%xmm6, %xmm6
	cvtsi2sdl	%eax, %xmm6
	movsd	%xmm6, -80(%rbp)
	movsd	.LC5(%rip), %xmm0
	movapd	%xmm0, %xmm1
	subsd	-16(%rbp), %xmm1
	movsd	.LC4(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	.LC5(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	call	cos@PLT
	mulsd	-80(%rbp), %xmm0
	movsd	-72(%rbp), %xmm4
	subsd	%xmm0, %xmm4
	movq	%xmm4, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	movq	%xmm0, %rax
	movq	%rax, -32(%rbp)
.L4:
	movq	-32(%rbp), %rax
	movq	%rax, %xmm0
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %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
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC1:
	.long	0
	.long	1071644672
	.align 16
.LC2:
	.long	-1
	.long	2147483647
	.long	0
	.long	0
	.align 8
.LC3:
	.long	0
	.long	1080459264
	.align 8
.LC4:
	.long	1413754136
	.long	1075388923
	.align 8
.LC5:
	.long	0
	.long	1081507840
	.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:
