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

```c
main(n){double x=acos(.5);for(;scanf("%d",&n)*n;printf("%f\n",sin(x/n)/sin(x/n+x/2)/2*n))n/=n%3?1:3;}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC3:
	.string	"%f\n"
.LC4:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC3(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC4(%rip), %rbx
	subq	$32, %rsp
	.cfi_def_cfa_offset 64
	movl	%edi, 28(%rsp)
	leaq	28(%rsp), %rbp
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	imull	$-1431655765, %edx, %eax
	addl	$715827882, %eax
	cmpl	$1431655764, %eax
	ja	.L3
	movslq	%edx, %rax
	movl	%edx, %ecx
	imulq	$1431655766, %rax, %rax
	sarl	$31, %ecx
	shrq	$32, %rax
	movl	%eax, %edx
	subl	%ecx, %edx
.L3:
	pxor	%xmm3, %xmm3
	movsd	.LC0(%rip), %xmm2
	movl	%edx, 28(%rsp)
	cvtsi2sdl	%edx, %xmm3
	divsd	%xmm3, %xmm2
	movsd	%xmm3, 16(%rsp)
	movapd	%xmm2, %xmm0
	movsd	%xmm2, 8(%rsp)
	call	sin@PLT
	movsd	8(%rsp), %xmm2
	movsd	%xmm0, (%rsp)
	movsd	.LC1(%rip), %xmm0
	addsd	%xmm2, %xmm0
	call	sin@PLT
	movsd	(%rsp), %xmm1
	movsd	16(%rsp), %xmm3
	movq	%r12, %rdi
	movl	$1, %eax
	divsd	%xmm0, %xmm1
	movsd	.LC2(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	mulsd	%xmm3, %xmm0
	call	printf@PLT
.L2:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	28(%rsp), %edx
	imull	%edx, %eax
	testl	%eax, %eax
	jne	.L4
	addq	$32, %rsp
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	942502758
	.long	1072742738
	.align 8
.LC1:
	.long	942502758
	.long	1071694162
	.align 8
.LC2:
	.long	0
	.long	1071644672
	.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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC3:
	.string	"%f\n"
.LC4:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC3(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC4(%rip), %rbx
	subq	$32, %rsp
	.cfi_def_cfa_offset 64
	movl	%edi, 28(%rsp)
	leaq	28(%rsp), %rbp
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	imull	$-1431655765, %edx, %eax
	addl	$715827882, %eax
	cmpl	$1431655764, %eax
	ja	.L3
	movslq	%edx, %rax
	movl	%edx, %ecx
	imulq	$1431655766, %rax, %rax
	sarl	$31, %ecx
	shrq	$32, %rax
	movl	%eax, %edx
	subl	%ecx, %edx
.L3:
	pxor	%xmm3, %xmm3
	movsd	.LC0(%rip), %xmm2
	movl	%edx, 28(%rsp)
	cvtsi2sdl	%edx, %xmm3
	divsd	%xmm3, %xmm2
	movsd	%xmm3, 16(%rsp)
	movapd	%xmm2, %xmm0
	movsd	%xmm2, 8(%rsp)
	call	sin@PLT
	movsd	8(%rsp), %xmm2
	movsd	%xmm0, (%rsp)
	movsd	.LC1(%rip), %xmm0
	addsd	%xmm2, %xmm0
	call	sin@PLT
	movsd	(%rsp), %xmm1
	movsd	16(%rsp), %xmm3
	movq	%r12, %rdi
	movl	$1, %eax
	divsd	%xmm0, %xmm1
	movsd	.LC2(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	mulsd	%xmm3, %xmm0
	call	printf@PLT
.L2:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	28(%rsp), %edx
	imull	%edx, %eax
	testl	%eax, %eax
	jne	.L4
	addq	$32, %rsp
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	942502758
	.long	1072742738
	.align 8
.LC1:
	.long	942502758
	.long	1071694162
	.align 8
.LC2:
	.long	0
	.long	1071644672
	.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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC3:
	.string	"%f\n"
.LC4:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC3(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC4(%rip), %rbx
	subq	$32, %rsp
	.cfi_def_cfa_offset 64
	movl	%edi, 28(%rsp)
	leaq	28(%rsp), %rbp
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	imull	$-1431655765, %edx, %eax
	addl	$715827882, %eax
	cmpl	$1431655764, %eax
	ja	.L3
	movslq	%edx, %rax
	movl	%edx, %ecx
	imulq	$1431655766, %rax, %rax
	sarl	$31, %ecx
	shrq	$32, %rax
	movl	%eax, %edx
	subl	%ecx, %edx
.L3:
	pxor	%xmm3, %xmm3
	movsd	.LC0(%rip), %xmm2
	movl	%edx, 28(%rsp)
	cvtsi2sdl	%edx, %xmm3
	divsd	%xmm3, %xmm2
	movsd	%xmm3, 16(%rsp)
	movapd	%xmm2, %xmm0
	movsd	%xmm2, 8(%rsp)
	call	sin@PLT
	movsd	8(%rsp), %xmm2
	movsd	%xmm0, (%rsp)
	movsd	.LC1(%rip), %xmm0
	addsd	%xmm2, %xmm0
	call	sin@PLT
	movsd	(%rsp), %xmm1
	movsd	16(%rsp), %xmm3
	movq	%r12, %rdi
	movl	$1, %eax
	divsd	%xmm0, %xmm1
	movsd	.LC2(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	mulsd	%xmm3, %xmm0
	call	printf@PLT
.L2:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	28(%rsp), %edx
	imull	%edx, %eax
	testl	%eax, %eax
	jne	.L4
	addq	$32, %rsp
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	942502758
	.long	1072742738
	.align 8
.LC1:
	.long	942502758
	.long	1071694162
	.align 8
.LC2:
	.long	0
	.long	1071644672
	.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:
```
```c
main(n){double x=acos(.5);for(;scanf("%d",&n)*n;printf("%f\n",sin(x/n)/sin(x/n+x/2)/2*n))n/=n%3?1:3;}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
main(n){double x=acos(.5);for(;scanf("%d",&n)*n;printf("%f\n",sin(x/n)/sin(x/n+x/2)/2*n))n/=n%3?1:3;}```

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.
Optimized Assembly Code:

1
2
3
4
4
6
0
 1
2
3
4
2
6
0
 1
2
3
4
4
5
0
 1
2
3
4
1
5
0
 1
4
3
4
1
5
0
 1
4
3
4
1
8
0
 1
4
3
4
0
8
0
 1
6
3
4
0
8
0
 1
7
1
4
0
8
-1
 1
7
1
2
0
8
-1

0.433013
0.577350
0.433013
0.732051
0.732051
0.577350
 0.433013
0.577350
0.433013
0.732051
0.577350
0.577350
 0.433013
0.577350
0.433013
0.732051
0.732051
0.776798
 0.433013
0.577350
0.433013
0.732051
0.433013
0.776798
 0.433013
0.732051
0.433013
0.732051
0.433013
0.776798
 0.433013
0.732051
0.433013
0.732051
0.433013
0.857651
 0.433013
0.732051
0.433013
0.732051
 0.433013
0.577350
0.433013
0.732051
 0.433013
0.836658
0.433013
0.732051
 0.433013
0.836658
0.433013
0.577350

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

```c
main(n){double x=acos(.5);for(;scanf("%d",&n)*n;printf("%f\n",sin(x/n)/sin(x/n+x/2)/2*n))n/=n%3?1:3;}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC3:
	.string	"%f\n"
.LC4:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC3(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC4(%rip), %rbx
	subq	$32, %rsp
	.cfi_def_cfa_offset 64
	movl	%edi, 28(%rsp)
	leaq	28(%rsp), %rbp
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	imull	$-1431655765, %edx, %eax
	addl	$715827882, %eax
	cmpl	$1431655764, %eax
	ja	.L3
	movslq	%edx, %rax
	movl	%edx, %ecx
	imulq	$1431655766, %rax, %rax
	sarl	$31, %ecx
	shrq	$32, %rax
	movl	%eax, %edx
	subl	%ecx, %edx
.L3:
	pxor	%xmm3, %xmm3
	movsd	.LC0(%rip), %xmm2
	movl	%edx, 28(%rsp)
	cvtsi2sdl	%edx, %xmm3
	divsd	%xmm3, %xmm2
	movsd	%xmm3, 16(%rsp)
	movapd	%xmm2, %xmm0
	movsd	%xmm2, 8(%rsp)
	call	sin@PLT
	movsd	8(%rsp), %xmm2
	movsd	%xmm0, (%rsp)
	movsd	.LC1(%rip), %xmm0
	addsd	%xmm2, %xmm0
	call	sin@PLT
	movsd	(%rsp), %xmm1
	movsd	16(%rsp), %xmm3
	movq	%r12, %rdi
	movl	$1, %eax
	divsd	%xmm0, %xmm1
	movsd	.LC2(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	mulsd	%xmm3, %xmm0
	call	printf@PLT
.L2:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	28(%rsp), %edx
	imull	%edx, %eax
	testl	%eax, %eax
	jne	.L4
	addq	$32, %rsp
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	942502758
	.long	1072742738
	.align 8
.LC1:
	.long	942502758
	.long	1071694162
	.align 8
.LC2:
	.long	0
	.long	1071644672
	.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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC3:
	.string	"%f\n"
.LC4:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC3(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC4(%rip), %rbx
	subq	$32, %rsp
	.cfi_def_cfa_offset 64
	movl	%edi, 28(%rsp)
	leaq	28(%rsp), %rbp
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	imull	$-1431655765, %edx, %eax
	addl	$715827882, %eax
	cmpl	$1431655764, %eax
	ja	.L3
	movslq	%edx, %rax
	movl	%edx, %ecx
	imulq	$1431655766, %rax, %rax
	sarl	$31, %ecx
	shrq	$32, %rax
	movl	%eax, %edx
	subl	%ecx, %edx
.L3:
	pxor	%xmm3, %xmm3
	movsd	.LC0(%rip), %xmm2
	movl	%edx, 28(%rsp)
	cvtsi2sdl	%edx, %xmm3
	divsd	%xmm3, %xmm2
	movsd	%xmm3, 16(%rsp)
	movapd	%xmm2, %xmm0
	movsd	%xmm2, 8(%rsp)
	call	sin@PLT
	movsd	8(%rsp), %xmm2
	movsd	%xmm0, (%rsp)
	movsd	.LC1(%rip), %xmm0
	addsd	%xmm2, %xmm0
	call	sin@PLT
	movsd	(%rsp), %xmm1
	movsd	16(%rsp), %xmm3
	movq	%r12, %rdi
	movl	$1, %eax
	divsd	%xmm0, %xmm1
	movsd	.LC2(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	mulsd	%xmm3, %xmm0
	call	printf@PLT
.L2:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	28(%rsp), %edx
	imull	%edx, %eax
	testl	%eax, %eax
	jne	.L4
	addq	$32, %rsp
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	942502758
	.long	1072742738
	.align 8
.LC1:
	.long	942502758
	.long	1071694162
	.align 8
.LC2:
	.long	0
	.long	1071644672
	.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:
```