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 acos(-1)

int main(void)
{
    double a, b, x;
    double s, ans;

    scanf("%lf%lf%lf", &a, &b, &x);
    s = x / a;
    
    if (s >= a * b / 2)
        ans = atan2((a * b - s) * 2 / a, a);
    else
        ans = atan2(b, 2 * s / b);

    printf("%.10f\n", ans * 360 / 2 / pi);

    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lf%lf%lf"
.LC4:
	.string	"%.10f\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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rcx
	leaq	-40(%rbp), %rdx
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movsd	-32(%rbp), %xmm0
	movsd	-48(%rbp), %xmm1
	divsd	%xmm1, %xmm0
	movsd	%xmm0, -16(%rbp)
	movsd	-48(%rbp), %xmm1
	movsd	-40(%rbp), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	.LC1(%rip), %xmm2
	movapd	%xmm0, %xmm1
	divsd	%xmm2, %xmm1
	movsd	-16(%rbp), %xmm0
	comisd	%xmm1, %xmm0
	jb	.L8
	movsd	-48(%rbp), %xmm2
	movsd	-48(%rbp), %xmm1
	movsd	-40(%rbp), %xmm0
	mulsd	%xmm1, %xmm0
	subsd	-16(%rbp), %xmm0
	addsd	%xmm0, %xmm0
	movsd	-48(%rbp), %xmm1
	divsd	%xmm1, %xmm0
	movq	%xmm0, %rax
	movapd	%xmm2, %xmm1
	movq	%rax, %xmm0
	call	atan2@PLT
	movq	%xmm0, %rax
	movq	%rax, -24(%rbp)
	jmp	.L4
.L8:
	movsd	-16(%rbp), %xmm0
	addsd	%xmm0, %xmm0
	movsd	-40(%rbp), %xmm1
	divsd	%xmm1, %xmm0
	movq	-40(%rbp), %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	atan2@PLT
	movq	%xmm0, %rax
	movq	%rax, -24(%rbp)
.L4:
	movsd	-24(%rbp), %xmm1
	movsd	.LC2(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	.LC1(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movsd	.LC3(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC1:
	.long	0
	.long	1073741824
	.align 8
.LC2:
	.long	0
	.long	1081507840
	.align 8
.LC3:
	.long	1413754136
	.long	1074340347
	.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	"%lf%lf%lf"
.LC4:
	.string	"%.10f\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rcx
	leaq	8(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movsd	(%rsp), %xmm2
	movsd	16(%rsp), %xmm1
	movsd	8(%rsp), %xmm3
	movsd	.LC1(%rip), %xmm4
	divsd	%xmm2, %xmm1
	movapd	%xmm2, %xmm0
	mulsd	%xmm3, %xmm0
	mulsd	%xmm0, %xmm4
	comisd	%xmm4, %xmm1
	jb	.L7
	subsd	%xmm1, %xmm0
	movapd	%xmm2, %xmm1
	addsd	%xmm0, %xmm0
	divsd	%xmm2, %xmm0
	call	atan2@PLT
.L4:
	mulsd	.LC2(%rip), %xmm0
	movl	$1, %edi
	movl	$1, %eax
	mulsd	.LC1(%rip), %xmm0
	leaq	.LC4(%rip), %rsi
	divsd	.LC3(%rip), %xmm0
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L10
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L7:
	.cfi_restore_state
	addsd	%xmm1, %xmm1
	movapd	%xmm3, %xmm0
	divsd	%xmm3, %xmm1
	call	atan2@PLT
	jmp	.L4
.L10:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1071644672
	.align 8
.LC2:
	.long	0
	.long	1081507840
	.align 8
.LC3:
	.long	1413754136
	.long	1074340347
	.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	"%lf%lf%lf"
.LC4:
	.string	"%.10f\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rcx
	leaq	8(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movsd	(%rsp), %xmm2
	movsd	16(%rsp), %xmm1
	movsd	8(%rsp), %xmm3
	movsd	.LC1(%rip), %xmm4
	divsd	%xmm2, %xmm1
	movapd	%xmm2, %xmm0
	mulsd	%xmm3, %xmm0
	mulsd	%xmm0, %xmm4
	comisd	%xmm4, %xmm1
	jb	.L7
	subsd	%xmm1, %xmm0
	movapd	%xmm2, %xmm1
	addsd	%xmm0, %xmm0
	divsd	%xmm2, %xmm0
	call	atan2@PLT
.L4:
	mulsd	.LC2(%rip), %xmm0
	movl	$1, %edi
	movl	$1, %eax
	mulsd	.LC1(%rip), %xmm0
	leaq	.LC4(%rip), %rsi
	divsd	.LC3(%rip), %xmm0
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L10
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L7:
	.cfi_restore_state
	addsd	%xmm1, %xmm1
	movapd	%xmm3, %xmm0
	divsd	%xmm3, %xmm1
	call	atan2@PLT
	jmp	.L4
.L10:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1071644672
	.align 8
.LC2:
	.long	0
	.long	1081507840
	.align 8
.LC3:
	.long	1413754136
	.long	1074340347
	.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 acos(-1)

int main(void)
{
    double a, b, x;
    double s, ans;

    scanf("%lf%lf%lf", &a, &b, &x);
    s = x / a;
    
    if (s >= a * b / 2)
        ans = atan2((a * b - s) * 2 / a, a);
    else
        ans = atan2(b, 2 * s / b);

    printf("%.10f\n", ans * 360 / 2 / pi);

    return 0;
}
2 4 4
 12 30 10
 3 2 8
 5 30 10
 3 4 8
 2 30 10
 3 4 3
 2 18 10
 2 18 18
 2 18 26

75.9637565321
 89.8938968259
 36.8698976458
 89.7453537677
 71.5650511771
 89.3634064240
 82.8749836511
 88.2321729441
 86.8201698801
 85.4120218759

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 acos(-1)

int main(void)
{
    double a, b, x;
    double s, ans;

    scanf("%lf%lf%lf", &a, &b, &x);
    s = x / a;
    
    if (s >= a * b / 2)
        ans = atan2((a * b - s) * 2 / a, a);
    else
        ans = atan2(b, 2 * s / b);

    printf("%.10f\n", ans * 360 / 2 / pi);

    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lf%lf%lf"
.LC4:
	.string	"%.10f\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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rcx
	leaq	-40(%rbp), %rdx
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movsd	-32(%rbp), %xmm0
	movsd	-48(%rbp), %xmm1
	divsd	%xmm1, %xmm0
	movsd	%xmm0, -16(%rbp)
	movsd	-48(%rbp), %xmm1
	movsd	-40(%rbp), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	.LC1(%rip), %xmm2
	movapd	%xmm0, %xmm1
	divsd	%xmm2, %xmm1
	movsd	-16(%rbp), %xmm0
	comisd	%xmm1, %xmm0
	jb	.L8
	movsd	-48(%rbp), %xmm2
	movsd	-48(%rbp), %xmm1
	movsd	-40(%rbp), %xmm0
	mulsd	%xmm1, %xmm0
	subsd	-16(%rbp), %xmm0
	addsd	%xmm0, %xmm0
	movsd	-48(%rbp), %xmm1
	divsd	%xmm1, %xmm0
	movq	%xmm0, %rax
	movapd	%xmm2, %xmm1
	movq	%rax, %xmm0
	call	atan2@PLT
	movq	%xmm0, %rax
	movq	%rax, -24(%rbp)
	jmp	.L4
.L8:
	movsd	-16(%rbp), %xmm0
	addsd	%xmm0, %xmm0
	movsd	-40(%rbp), %xmm1
	divsd	%xmm1, %xmm0
	movq	-40(%rbp), %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	atan2@PLT
	movq	%xmm0, %rax
	movq	%rax, -24(%rbp)
.L4:
	movsd	-24(%rbp), %xmm1
	movsd	.LC2(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	.LC1(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movsd	.LC3(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC1:
	.long	0
	.long	1073741824
	.align 8
.LC2:
	.long	0
	.long	1081507840
	.align 8
.LC3:
	.long	1413754136
	.long	1074340347
	.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	"%lf%lf%lf"
.LC4:
	.string	"%.10f\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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rcx
	leaq	-40(%rbp), %rdx
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movsd	-32(%rbp), %xmm0
	movsd	-48(%rbp), %xmm1
	divsd	%xmm1, %xmm0
	movsd	%xmm0, -16(%rbp)
	movsd	-48(%rbp), %xmm1
	movsd	-40(%rbp), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	.LC1(%rip), %xmm2
	movapd	%xmm0, %xmm1
	divsd	%xmm2, %xmm1
	movsd	-16(%rbp), %xmm0
	comisd	%xmm1, %xmm0
	jb	.L8
	movsd	-48(%rbp), %xmm2
	movsd	-48(%rbp), %xmm1
	movsd	-40(%rbp), %xmm0
	mulsd	%xmm1, %xmm0
	subsd	-16(%rbp), %xmm0
	addsd	%xmm0, %xmm0
	movsd	-48(%rbp), %xmm1
	divsd	%xmm1, %xmm0
	movq	%xmm0, %rax
	movapd	%xmm2, %xmm1
	movq	%rax, %xmm0
	call	atan2@PLT
	movq	%xmm0, %rax
	movq	%rax, -24(%rbp)
	jmp	.L4
.L8:
	movsd	-16(%rbp), %xmm0
	addsd	%xmm0, %xmm0
	movsd	-40(%rbp), %xmm1
	divsd	%xmm1, %xmm0
	movq	-40(%rbp), %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	atan2@PLT
	movq	%xmm0, %rax
	movq	%rax, -24(%rbp)
.L4:
	movsd	-24(%rbp), %xmm1
	movsd	.LC2(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	.LC1(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movsd	.LC3(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC1:
	.long	0
	.long	1073741824
	.align 8
.LC2:
	.long	0
	.long	1081507840
	.align 8
.LC3:
	.long	1413754136
	.long	1074340347
	.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:
