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

```c
#define Z(V) for(v=360,m=g();--m;V+=sin(x*z))v-=x=g();V+=sin(v*z)
a;g(){scanf("%d",&a);a?a:exit(0);}
main(m,v,x){
  for(;;){double s=0,t=0,z=.01745329,e=.000001;
    Z(s);Z(t);
    puts(s>t+e?"1":s+e<t?"2":"0");
  }
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.text
	.p2align 4
	.globl	g
	.type	g, @function
g:
.LFB0:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	leaq	a(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	a(%rip), %eax
	testl	%eax, %eax
	je	.L5
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	g, .-g
	.section	.rodata.str1.1
.LC2:
	.string	"1"
.LC3:
	.string	"0"
.LC4:
	.string	"2"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	$-1, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	a(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
.L13:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	a(%rip), %edx
	testl	%edx, %edx
	je	.L7
	xorl	%r14d, %r14d
	movl	%r13d, %r12d
	movq	%r14, (%rsp)
	testl	%r13d, %r13d
	je	.L9
.L8:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	a(%rip), %eax
	testl	%eax, %eax
	je	.L7
	xorl	%eax, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	mulsd	.LC5(%rip), %xmm0
	call	sin@PLT
	addsd	(%rsp), %xmm0
	movsd	%xmm0, (%rsp)
	subl	$1, %r12d
	jne	.L8
.L9:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	cmpl	$0, a(%rip)
	je	.L7
	movq	%r14, 8(%rsp)
.L10:
	subl	$1, %r15d
	je	.L19
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	cmpl	$0, a(%rip)
	je	.L7
	xorl	%eax, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	mulsd	.LC5(%rip), %xmm0
	call	sin@PLT
	addsd	8(%rsp), %xmm0
	movsd	%xmm0, 8(%rsp)
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L7:
	xorl	%edi, %edi
	call	exit@PLT
.L19:
	movsd	.LC6(%rip), %xmm2
	movsd	8(%rsp), %xmm1
	leaq	.LC2(%rip), %rdi
	movsd	(%rsp), %xmm0
	subsd	%xmm2, %xmm1
	subsd	%xmm2, %xmm0
	movsd	.LC7(%rip), %xmm2
	movapd	%xmm1, %xmm3
	addsd	%xmm2, %xmm3
	comisd	%xmm3, %xmm0
	ja	.L12
	addsd	%xmm2, %xmm0
	leaq	.LC4(%rip), %rdi
	leaq	.LC3(%rip), %rax
	comisd	%xmm0, %xmm1
	cmovbe	%rax, %rdi
.L12:
	call	puts@PLT
	jmp	.L13
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.globl	a
	.bss
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC5:
	.long	1996998989
	.long	1066524486
	.align 8
.LC6:
	.long	35866549
	.long	1051619485
	.align 8
.LC7:
	.long	-1598689907
	.long	1051772663
	.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
.LC0:
	.string	"%d"
	.text
	.p2align 4
	.globl	g
	.type	g, @function
g:
.LFB0:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	leaq	a(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	a(%rip), %eax
	testl	%eax, %eax
	je	.L5
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	g, .-g
	.section	.rodata.str1.1
.LC2:
	.string	"1"
.LC3:
	.string	"0"
.LC4:
	.string	"2"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	$-1, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	a(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
.L13:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	a(%rip), %edx
	testl	%edx, %edx
	je	.L7
	xorl	%r14d, %r14d
	movl	%r13d, %r12d
	movq	%r14, (%rsp)
	testl	%r13d, %r13d
	je	.L9
.L8:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	a(%rip), %eax
	testl	%eax, %eax
	je	.L7
	xorl	%eax, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	mulsd	.LC5(%rip), %xmm0
	call	sin@PLT
	addsd	(%rsp), %xmm0
	movsd	%xmm0, (%rsp)
	subl	$1, %r12d
	jne	.L8
.L9:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	cmpl	$0, a(%rip)
	je	.L7
	movq	%r14, 8(%rsp)
.L10:
	subl	$1, %r15d
	je	.L19
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	cmpl	$0, a(%rip)
	je	.L7
	xorl	%eax, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	mulsd	.LC5(%rip), %xmm0
	call	sin@PLT
	addsd	8(%rsp), %xmm0
	movsd	%xmm0, 8(%rsp)
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L7:
	xorl	%edi, %edi
	call	exit@PLT
.L19:
	movsd	.LC6(%rip), %xmm2
	movsd	8(%rsp), %xmm1
	leaq	.LC2(%rip), %rdi
	movsd	(%rsp), %xmm0
	subsd	%xmm2, %xmm1
	subsd	%xmm2, %xmm0
	movsd	.LC7(%rip), %xmm2
	movapd	%xmm1, %xmm3
	addsd	%xmm2, %xmm3
	comisd	%xmm3, %xmm0
	ja	.L12
	addsd	%xmm2, %xmm0
	leaq	.LC4(%rip), %rdi
	leaq	.LC3(%rip), %rax
	comisd	%xmm0, %xmm1
	cmovbe	%rax, %rdi
.L12:
	call	puts@PLT
	jmp	.L13
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.globl	a
	.bss
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC5:
	.long	1996998989
	.long	1066524486
	.align 8
.LC6:
	.long	35866549
	.long	1051619485
	.align 8
.LC7:
	.long	-1598689907
	.long	1051772663
	.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
.LC0:
	.string	"%d"
	.text
	.p2align 4
	.globl	g
	.type	g, @function
g:
.LFB0:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	leaq	a(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	a(%rip), %eax
	testl	%eax, %eax
	je	.L5
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	g, .-g
	.section	.rodata.str1.1
.LC2:
	.string	"1"
.LC3:
	.string	"0"
.LC4:
	.string	"2"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	$-1, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	a(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
.L13:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	a(%rip), %edx
	testl	%edx, %edx
	je	.L7
	xorl	%r14d, %r14d
	movl	%r13d, %r12d
	movq	%r14, (%rsp)
	testl	%r13d, %r13d
	je	.L9
.L8:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	a(%rip), %eax
	testl	%eax, %eax
	je	.L7
	xorl	%eax, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	mulsd	.LC5(%rip), %xmm0
	call	sin@PLT
	addsd	(%rsp), %xmm0
	movsd	%xmm0, (%rsp)
	subl	$1, %r12d
	jne	.L8
.L9:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	cmpl	$0, a(%rip)
	je	.L7
	movq	%r14, 8(%rsp)
.L10:
	subl	$1, %r15d
	je	.L19
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	cmpl	$0, a(%rip)
	je	.L7
	xorl	%eax, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	mulsd	.LC5(%rip), %xmm0
	call	sin@PLT
	addsd	8(%rsp), %xmm0
	movsd	%xmm0, 8(%rsp)
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L7:
	xorl	%edi, %edi
	call	exit@PLT
.L19:
	movsd	.LC6(%rip), %xmm2
	movsd	8(%rsp), %xmm1
	leaq	.LC2(%rip), %rdi
	movsd	(%rsp), %xmm0
	subsd	%xmm2, %xmm1
	subsd	%xmm2, %xmm0
	movsd	.LC7(%rip), %xmm2
	movapd	%xmm1, %xmm3
	addsd	%xmm2, %xmm3
	comisd	%xmm3, %xmm0
	ja	.L12
	addsd	%xmm2, %xmm0
	leaq	.LC4(%rip), %rdi
	leaq	.LC3(%rip), %rax
	comisd	%xmm0, %xmm1
	cmovbe	%rax, %rdi
.L12:
	call	puts@PLT
	jmp	.L13
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.globl	a
	.bss
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC5:
	.long	1996998989
	.long	1066524486
	.align 8
.LC6:
	.long	35866549
	.long	1051619485
	.align 8
.LC7:
	.long	-1598689907
	.long	1051772663
	.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
#define Z(V) for(v=360,m=g();--m;V+=sin(x*z))v-=x=g();V+=sin(v*z)
a;g(){scanf("%d",&a);a?a:exit(0);}
main(m,v,x){
  for(;;){double s=0,t=0,z=.01745329,e=.000001;
    Z(s);Z(t);
    puts(s>t+e?"1":s+e<t?"2":"0");
  }
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#define Z(V) for(v=360,m=g();--m;V+=sin(x*z))v-=x=g();V+=sin(v*z)
a;g(){scanf("%d",&a);a?a:exit(0);}
main(m,v,x){
  for(;;){double s=0,t=0,z=.01745329,e=.000001;
    Z(s);Z(t);
    puts(s>t+e?"1":s+e<t?"2":"0");
  }
}```

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:

4
30
125
75
4
30
125
75
5
30
125
75
65
4
30
125
75
4
30
125
75
6
30
50
50
29
75
0
 4
30
125
75
4
30
125
75
5
30
125
75
65
4
30
125
75
4
30
125
75
6
30
50
6
29
75
0
 4
30
84
75
4
30
125
75
5
30
125
75
65
4
30
125
75
4
30
125
75
6
52
50
50
25
75
0
 4
30
125
75
4
30
125
75
5
30
125
149
65
4
30
125
75
4
30
125
75
6
52
50
50
25
75
0
 4
30
125
75
4
21
125
75
5
30
125
75
65
4
30
125
75
4
30
125
75
6
30
50
6
29
75
0
 4
30
125
75
4
30
125
75
5
30
207
75
65
4
30
125
75
4
30
125
75
6
30
50
2
29
0
0
 4
30
125
75
4
30
125
30
5
30
125
75
65
4
30
125
75
4
30
211
75
6
30
50
50
29
35
0
 4
30
207
75
4
30
125
75
5
30
207
75
65
4
30
125
75
4
30
125
75
6
30
50
2
29
0
0
 4
30
84
75
4
30
125
75
5
30
7
14
65
4
30
125
75
4
30
125
75
6
52
50
50
7
75
0
 4
30
125
75
4
30
117
75
5
50
175
75
65
4
30
125
75
4
30
125
2
6
7
50
6
29
0
0

0
1
2
 0
1
1
 2
1
2
 0
2
2
 1
1
1
 0
2
 1
1
2
 2
2
 2
2
2
 1
2

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

```c
#define Z(V) for(v=360,m=g();--m;V+=sin(x*z))v-=x=g();V+=sin(v*z)
a;g(){scanf("%d",&a);a?a:exit(0);}
main(m,v,x){
  for(;;){double s=0,t=0,z=.01745329,e=.000001;
    Z(s);Z(t);
    puts(s>t+e?"1":s+e<t?"2":"0");
  }
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.text
	.p2align 4
	.globl	g
	.type	g, @function
g:
.LFB0:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	leaq	a(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	a(%rip), %eax
	testl	%eax, %eax
	je	.L5
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	g, .-g
	.section	.rodata.str1.1
.LC2:
	.string	"1"
.LC3:
	.string	"0"
.LC4:
	.string	"2"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	$-1, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	a(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
.L13:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	a(%rip), %edx
	testl	%edx, %edx
	je	.L7
	xorl	%r14d, %r14d
	movl	%r13d, %r12d
	movq	%r14, (%rsp)
	testl	%r13d, %r13d
	je	.L9
.L8:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	a(%rip), %eax
	testl	%eax, %eax
	je	.L7
	xorl	%eax, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	mulsd	.LC5(%rip), %xmm0
	call	sin@PLT
	addsd	(%rsp), %xmm0
	movsd	%xmm0, (%rsp)
	subl	$1, %r12d
	jne	.L8
.L9:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	cmpl	$0, a(%rip)
	je	.L7
	movq	%r14, 8(%rsp)
.L10:
	subl	$1, %r15d
	je	.L19
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	cmpl	$0, a(%rip)
	je	.L7
	xorl	%eax, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	mulsd	.LC5(%rip), %xmm0
	call	sin@PLT
	addsd	8(%rsp), %xmm0
	movsd	%xmm0, 8(%rsp)
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L7:
	xorl	%edi, %edi
	call	exit@PLT
.L19:
	movsd	.LC6(%rip), %xmm2
	movsd	8(%rsp), %xmm1
	leaq	.LC2(%rip), %rdi
	movsd	(%rsp), %xmm0
	subsd	%xmm2, %xmm1
	subsd	%xmm2, %xmm0
	movsd	.LC7(%rip), %xmm2
	movapd	%xmm1, %xmm3
	addsd	%xmm2, %xmm3
	comisd	%xmm3, %xmm0
	ja	.L12
	addsd	%xmm2, %xmm0
	leaq	.LC4(%rip), %rdi
	leaq	.LC3(%rip), %rax
	comisd	%xmm0, %xmm1
	cmovbe	%rax, %rdi
.L12:
	call	puts@PLT
	jmp	.L13
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.globl	a
	.bss
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC5:
	.long	1996998989
	.long	1066524486
	.align 8
.LC6:
	.long	35866549
	.long	1051619485
	.align 8
.LC7:
	.long	-1598689907
	.long	1051772663
	.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
.LC0:
	.string	"%d"
	.text
	.p2align 4
	.globl	g
	.type	g, @function
g:
.LFB0:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	leaq	a(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	a(%rip), %eax
	testl	%eax, %eax
	je	.L5
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	g, .-g
	.section	.rodata.str1.1
.LC2:
	.string	"1"
.LC3:
	.string	"0"
.LC4:
	.string	"2"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	$-1, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	a(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
.L13:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	a(%rip), %edx
	testl	%edx, %edx
	je	.L7
	xorl	%r14d, %r14d
	movl	%r13d, %r12d
	movq	%r14, (%rsp)
	testl	%r13d, %r13d
	je	.L9
.L8:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	a(%rip), %eax
	testl	%eax, %eax
	je	.L7
	xorl	%eax, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	mulsd	.LC5(%rip), %xmm0
	call	sin@PLT
	addsd	(%rsp), %xmm0
	movsd	%xmm0, (%rsp)
	subl	$1, %r12d
	jne	.L8
.L9:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	cmpl	$0, a(%rip)
	je	.L7
	movq	%r14, 8(%rsp)
.L10:
	subl	$1, %r15d
	je	.L19
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	cmpl	$0, a(%rip)
	je	.L7
	xorl	%eax, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	mulsd	.LC5(%rip), %xmm0
	call	sin@PLT
	addsd	8(%rsp), %xmm0
	movsd	%xmm0, 8(%rsp)
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L7:
	xorl	%edi, %edi
	call	exit@PLT
.L19:
	movsd	.LC6(%rip), %xmm2
	movsd	8(%rsp), %xmm1
	leaq	.LC2(%rip), %rdi
	movsd	(%rsp), %xmm0
	subsd	%xmm2, %xmm1
	subsd	%xmm2, %xmm0
	movsd	.LC7(%rip), %xmm2
	movapd	%xmm1, %xmm3
	addsd	%xmm2, %xmm3
	comisd	%xmm3, %xmm0
	ja	.L12
	addsd	%xmm2, %xmm0
	leaq	.LC4(%rip), %rdi
	leaq	.LC3(%rip), %rax
	comisd	%xmm0, %xmm1
	cmovbe	%rax, %rdi
.L12:
	call	puts@PLT
	jmp	.L13
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.globl	a
	.bss
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC5:
	.long	1996998989
	.long	1066524486
	.align 8
.LC6:
	.long	35866549
	.long	1051619485
	.align 8
.LC7:
	.long	-1598689907
	.long	1051772663
	.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:
```