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

```c
/*
 * 3000_The_Mean_of_Angle.c
 *
 *  Created on: 2019/05/25
 *      Author: nagashima
 */

#include <stdio.h>

int main(void){
	double s1,s2;
	double t;
	double res;

	scanf("%lf",&s1);
	scanf("%lf",&s2);
	if(s1>s2){
		t=s2;
		s2=s1;
		s1=t;
	}

	res = s1+(s2-s1)/2;
	if(s2-s1>180)res+=180;
	if(res>360)res-=360;

	printf("%f\n",res);

	return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lf"
.LC4:
	.string	"%f\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	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movsd	-40(%rbp), %xmm0
	movsd	-32(%rbp), %xmm1
	comisd	%xmm1, %xmm0
	jbe	.L2
	movsd	-32(%rbp), %xmm0
	movsd	%xmm0, -16(%rbp)
	movsd	-40(%rbp), %xmm0
	movsd	%xmm0, -32(%rbp)
	movsd	-16(%rbp), %xmm0
	movsd	%xmm0, -40(%rbp)
.L2:
	movsd	-32(%rbp), %xmm0
	movsd	-40(%rbp), %xmm1
	subsd	%xmm1, %xmm0
	movsd	.LC1(%rip), %xmm2
	movapd	%xmm0, %xmm1
	divsd	%xmm2, %xmm1
	movsd	-40(%rbp), %xmm0
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -24(%rbp)
	movsd	-32(%rbp), %xmm0
	movsd	-40(%rbp), %xmm1
	subsd	%xmm1, %xmm0
	comisd	.LC2(%rip), %xmm0
	jbe	.L4
	movsd	-24(%rbp), %xmm1
	movsd	.LC2(%rip), %xmm0
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -24(%rbp)
.L4:
	movsd	-24(%rbp), %xmm0
	comisd	.LC3(%rip), %xmm0
	jbe	.L6
	movsd	-24(%rbp), %xmm0
	movsd	.LC3(%rip), %xmm1
	subsd	%xmm1, %xmm0
	movsd	%xmm0, -24(%rbp)
.L6:
	movq	-24(%rbp), %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	.L9
	call	__stack_chk_fail@PLT
.L9:
	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	1080459264
	.align 8
.LC3:
	.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	"%lf"
.LC4:
	.string	"%f\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), %rbp
	movq	%rbp, %rdi
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	leaq	16(%rsp), %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	movsd	8(%rsp), %xmm2
	movsd	16(%rsp), %xmm0
	comisd	%xmm0, %xmm2
	jbe	.L2
	movapd	%xmm2, %xmm1
	movsd	%xmm2, 16(%rsp)
	movapd	%xmm0, %xmm2
	movsd	%xmm0, 8(%rsp)
	movapd	%xmm1, %xmm0
.L2:
	subsd	%xmm2, %xmm0
	movsd	.LC1(%rip), %xmm1
	mulsd	%xmm0, %xmm1
	addsd	%xmm2, %xmm1
	movsd	.LC2(%rip), %xmm2
	comisd	%xmm2, %xmm0
	jbe	.L4
	addsd	%xmm2, %xmm1
.L4:
	movsd	.LC3(%rip), %xmm0
	comisd	%xmm0, %xmm1
	jbe	.L6
	subsd	%xmm0, %xmm1
.L6:
	movapd	%xmm1, %xmm0
	movl	$1, %edi
	movl	$1, %eax
	leaq	.LC4(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore_state
	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	1080459264
	.align 8
.LC3:
	.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	"%lf"
.LC4:
	.string	"%f\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), %rbp
	movq	%rbp, %rdi
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	leaq	16(%rsp), %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	movsd	8(%rsp), %xmm2
	movsd	16(%rsp), %xmm0
	comisd	%xmm0, %xmm2
	jbe	.L2
	movapd	%xmm2, %xmm1
	movsd	%xmm2, 16(%rsp)
	movapd	%xmm0, %xmm2
	movsd	%xmm0, 8(%rsp)
	movapd	%xmm1, %xmm0
.L2:
	subsd	%xmm2, %xmm0
	movsd	.LC1(%rip), %xmm1
	mulsd	%xmm0, %xmm1
	addsd	%xmm2, %xmm1
	movsd	.LC2(%rip), %xmm2
	comisd	%xmm2, %xmm0
	jbe	.L4
	addsd	%xmm2, %xmm1
.L4:
	movsd	.LC3(%rip), %xmm0
	comisd	%xmm0, %xmm1
	jbe	.L6
	subsd	%xmm0, %xmm1
.L6:
	movapd	%xmm1, %xmm0
	movl	$1, %edi
	movl	$1, %eax
	leaq	.LC4(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore_state
	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	1080459264
	.align 8
.LC3:
	.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:

/*
 * 3000_The_Mean_of_Angle.c
 *
 *  Created on: 2019/05/25
 *      Author: nagashima
 */

#include <stdio.h>

int main(void){
	double s1,s2;
	double t;
	double res;

	scanf("%lf",&s1);
	scanf("%lf",&s2);
	if(s1>s2){
		t=s2;
		s2=s1;
		s1=t;
	}

	res = s1+(s2-s1)/2;
	if(s2-s1>180)res+=180;
	if(res>360)res-=360;

	printf("%f\n",res);

	return 0;
}


20
594
 10
26
 20
704
 10
27
 20
41
 10
15
 20
2
 10
29
 20
0
 10
52

127.000000
 18.000000
 182.000000
 18.500000
 30.500000
 12.500000
 11.000000
 19.500000
 10.000000
 31.000000

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

```c
/*
 * 3000_The_Mean_of_Angle.c
 *
 *  Created on: 2019/05/25
 *      Author: nagashima
 */

#include <stdio.h>

int main(void){
	double s1,s2;
	double t;
	double res;

	scanf("%lf",&s1);
	scanf("%lf",&s2);
	if(s1>s2){
		t=s2;
		s2=s1;
		s1=t;
	}

	res = s1+(s2-s1)/2;
	if(s2-s1>180)res+=180;
	if(res>360)res-=360;

	printf("%f\n",res);

	return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lf"
.LC4:
	.string	"%f\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	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movsd	-40(%rbp), %xmm0
	movsd	-32(%rbp), %xmm1
	comisd	%xmm1, %xmm0
	jbe	.L2
	movsd	-32(%rbp), %xmm0
	movsd	%xmm0, -16(%rbp)
	movsd	-40(%rbp), %xmm0
	movsd	%xmm0, -32(%rbp)
	movsd	-16(%rbp), %xmm0
	movsd	%xmm0, -40(%rbp)
.L2:
	movsd	-32(%rbp), %xmm0
	movsd	-40(%rbp), %xmm1
	subsd	%xmm1, %xmm0
	movsd	.LC1(%rip), %xmm2
	movapd	%xmm0, %xmm1
	divsd	%xmm2, %xmm1
	movsd	-40(%rbp), %xmm0
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -24(%rbp)
	movsd	-32(%rbp), %xmm0
	movsd	-40(%rbp), %xmm1
	subsd	%xmm1, %xmm0
	comisd	.LC2(%rip), %xmm0
	jbe	.L4
	movsd	-24(%rbp), %xmm1
	movsd	.LC2(%rip), %xmm0
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -24(%rbp)
.L4:
	movsd	-24(%rbp), %xmm0
	comisd	.LC3(%rip), %xmm0
	jbe	.L6
	movsd	-24(%rbp), %xmm0
	movsd	.LC3(%rip), %xmm1
	subsd	%xmm1, %xmm0
	movsd	%xmm0, -24(%rbp)
.L6:
	movq	-24(%rbp), %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	.L9
	call	__stack_chk_fail@PLT
.L9:
	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	1080459264
	.align 8
.LC3:
	.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	"%lf"
.LC4:
	.string	"%f\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	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movsd	-40(%rbp), %xmm0
	movsd	-32(%rbp), %xmm1
	comisd	%xmm1, %xmm0
	jbe	.L2
	movsd	-32(%rbp), %xmm0
	movsd	%xmm0, -16(%rbp)
	movsd	-40(%rbp), %xmm0
	movsd	%xmm0, -32(%rbp)
	movsd	-16(%rbp), %xmm0
	movsd	%xmm0, -40(%rbp)
.L2:
	movsd	-32(%rbp), %xmm0
	movsd	-40(%rbp), %xmm1
	subsd	%xmm1, %xmm0
	movsd	.LC1(%rip), %xmm2
	movapd	%xmm0, %xmm1
	divsd	%xmm2, %xmm1
	movsd	-40(%rbp), %xmm0
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -24(%rbp)
	movsd	-32(%rbp), %xmm0
	movsd	-40(%rbp), %xmm1
	subsd	%xmm1, %xmm0
	comisd	.LC2(%rip), %xmm0
	jbe	.L4
	movsd	-24(%rbp), %xmm1
	movsd	.LC2(%rip), %xmm0
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -24(%rbp)
.L4:
	movsd	-24(%rbp), %xmm0
	comisd	.LC3(%rip), %xmm0
	jbe	.L6
	movsd	-24(%rbp), %xmm0
	movsd	.LC3(%rip), %xmm1
	subsd	%xmm1, %xmm0
	movsd	%xmm0, -24(%rbp)
.L6:
	movq	-24(%rbp), %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	.L9
	call	__stack_chk_fail@PLT
.L9:
	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	1080459264
	.align 8
.LC3:
	.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:
