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

```c
double x,r,z,s,u;n,m,v;f(t){for(x=0;t--;x<s/u?x=s/u:x)for(u=s=!scanf("%d%d",&n,&m);m--;s+=v*r)scanf("%d%lf",&v,&r),u+=r;}main(t){scanf("%d",&t);f(t);z=x;f(1);m=!puts(z>x+1e-7?"YES":"NO");}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	x
	.bss
	.align 8
	.type	x, @object
	.size	x, 8
x:
	.zero	8
	.globl	r
	.align 8
	.type	r, @object
	.size	r, 8
r:
	.zero	8
	.globl	z
	.align 8
	.type	z, @object
	.size	z, 8
z:
	.zero	8
	.globl	s
	.align 8
	.type	s, @object
	.size	s, 8
s:
	.zero	8
	.globl	u
	.align 8
	.type	u, @object
	.size	u, 8
u:
	.zero	8
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	v
	.align 4
	.type	v, @object
	.size	v, 4
v:
	.zero	4
	.section	.rodata
.LC1:
	.string	"%d%d"
.LC3:
	.string	"%d%lf"
	.text
	.globl	f
	.type	f, @function
f:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, x(%rip)
	jmp	.L2
.L9:
	leaq	m(%rip), %rax
	movq	%rax, %rdx
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	testl	%eax, %eax
	jne	.L3
	movsd	.LC2(%rip), %xmm0
	jmp	.L4
.L3:
	pxor	%xmm0, %xmm0
.L4:
	movsd	%xmm0, s(%rip)
	movsd	s(%rip), %xmm0
	movsd	%xmm0, u(%rip)
	jmp	.L5
.L6:
	leaq	r(%rip), %rax
	movq	%rax, %rdx
	leaq	v(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movsd	u(%rip), %xmm1
	movsd	r(%rip), %xmm0
	addsd	%xmm1, %xmm0
	movsd	%xmm0, u(%rip)
	movl	v(%rip), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	movsd	r(%rip), %xmm0
	mulsd	%xmm0, %xmm1
	movsd	s(%rip), %xmm0
	addsd	%xmm1, %xmm0
	movsd	%xmm0, s(%rip)
.L5:
	movl	m(%rip), %eax
	leal	-1(%rax), %edx
	movl	%edx, m(%rip)
	testl	%eax, %eax
	jne	.L6
	movsd	s(%rip), %xmm0
	movsd	u(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movsd	x(%rip), %xmm1
	comisd	%xmm1, %xmm0
	jbe	.L2
	movsd	s(%rip), %xmm0
	movsd	u(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movsd	%xmm0, x(%rip)
.L2:
	movl	-4(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -4(%rbp)
	testl	%eax, %eax
	jne	.L9
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	f, .-f
	.section	.rodata
.LC4:
	.string	"%d"
.LC6:
	.string	"YES"
.LC7:
	.string	"NO"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	leaq	-4(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	movl	$0, %eax
	call	f
	movsd	x(%rip), %xmm0
	movsd	%xmm0, z(%rip)
	movl	$1, %edi
	movl	$0, %eax
	call	f
	movsd	x(%rip), %xmm1
	movsd	.LC5(%rip), %xmm0
	addsd	%xmm0, %xmm1
	movsd	z(%rip), %xmm0
	comisd	%xmm1, %xmm0
	jbe	.L18
	leaq	.LC6(%rip), %rax
	jmp	.L15
.L18:
	leaq	.LC7(%rip), %rax
.L15:
	movq	%rax, %rdi
	call	puts@PLT
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	movl	%eax, m(%rip)
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC2:
	.long	0
	.long	1072693248
	.align 8
.LC5:
	.long	-1698910392
	.long	1048238066
	.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
.LC2:
	.string	"%d%d"
.LC3:
	.string	"%d%lf"
	.text
	.p2align 4
	.globl	f
	.type	f, @function
f:
.LFB0:
	.cfi_startproc
	endbr64
	movq	$0x000000000, x(%rip)
	testl	%edi, %edi
	je	.L19
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	m(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	n(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%edi, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	r(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	v(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r15, %rdx
	movq	%r14, %rsi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movsd	.LC0(%rip), %xmm0
	testl	%eax, %eax
	je	.L3
	pxor	%xmm0, %xmm0
.L3:
	movl	m(%rip), %eax
	movsd	%xmm0, s(%rip)
	movsd	%xmm0, u(%rip)
	leal	-1(%rax), %edx
	movl	%edx, m(%rip)
	testl	%eax, %eax
	je	.L11
	leaq	.LC3(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	pxor	%xmm0, %xmm0
	movsd	r(%rip), %xmm1
	movsd	u(%rip), %xmm2
	cvtsi2sdl	v(%rip), %xmm0
	movl	m(%rip), %eax
	addsd	%xmm1, %xmm2
	leal	-1(%rax), %edx
	movl	%edx, m(%rip)
	mulsd	%xmm1, %xmm0
	movsd	%xmm2, u(%rip)
	addsd	s(%rip), %xmm0
	movsd	%xmm0, s(%rip)
	testl	%eax, %eax
	jne	.L5
.L4:
	divsd	%xmm2, %xmm0
	comisd	x(%rip), %xmm0
	jbe	.L6
	movsd	%xmm0, x(%rip)
.L6:
	subl	$1, %r13d
	jne	.L8
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	movapd	%xmm0, %xmm2
	jmp	.L4
.L19:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE0:
	.size	f, .-f
	.section	.rodata.str1.1
.LC4:
	.string	"YES"
.LC5:
	.string	"NO"
.LC6:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	movl	%edi, 12(%rsp)
	leaq	.LC6(%rip), %rdi
	call	scanf@PLT
	movl	12(%rsp), %edi
	xorl	%eax, %eax
	call	f
	movsd	x(%rip), %xmm0
	movl	$1, %edi
	xorl	%eax, %eax
	movsd	%xmm0, z(%rip)
	call	f
	movsd	.LC7(%rip), %xmm0
	addsd	x(%rip), %xmm0
	leaq	.LC5(%rip), %rax
	movsd	z(%rip), %xmm1
	leaq	.LC4(%rip), %rdi
	comisd	%xmm0, %xmm1
	cmovbe	%rax, %rdi
	call	puts@PLT
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	movl	%eax, m(%rip)
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.globl	v
	.bss
	.align 4
	.type	v, @object
	.size	v, 4
v:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	u
	.align 8
	.type	u, @object
	.size	u, 8
u:
	.zero	8
	.globl	s
	.align 8
	.type	s, @object
	.size	s, 8
s:
	.zero	8
	.globl	z
	.align 8
	.type	z, @object
	.size	z, 8
z:
	.zero	8
	.globl	r
	.align 8
	.type	r, @object
	.size	r, 8
r:
	.zero	8
	.globl	x
	.align 8
	.type	x, @object
	.size	x, 8
x:
	.zero	8
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	0
	.long	1072693248
	.align 8
.LC7:
	.long	-1698910392
	.long	1048238066
	.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
.LC2:
	.string	"%d%d"
.LC3:
	.string	"%d%lf"
	.text
	.p2align 4
	.globl	f
	.type	f, @function
f:
.LFB0:
	.cfi_startproc
	endbr64
	movq	$0x000000000, x(%rip)
	testl	%edi, %edi
	je	.L19
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	m(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	n(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%edi, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	r(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	v(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r15, %rdx
	movq	%r14, %rsi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movsd	.LC0(%rip), %xmm0
	testl	%eax, %eax
	je	.L3
	pxor	%xmm0, %xmm0
.L3:
	movl	m(%rip), %eax
	movsd	%xmm0, s(%rip)
	movsd	%xmm0, u(%rip)
	leal	-1(%rax), %edx
	movl	%edx, m(%rip)
	testl	%eax, %eax
	je	.L11
	leaq	.LC3(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	pxor	%xmm0, %xmm0
	movsd	r(%rip), %xmm1
	movsd	u(%rip), %xmm2
	cvtsi2sdl	v(%rip), %xmm0
	movl	m(%rip), %eax
	addsd	%xmm1, %xmm2
	leal	-1(%rax), %edx
	movl	%edx, m(%rip)
	mulsd	%xmm1, %xmm0
	movsd	%xmm2, u(%rip)
	addsd	s(%rip), %xmm0
	movsd	%xmm0, s(%rip)
	testl	%eax, %eax
	jne	.L5
.L4:
	divsd	%xmm2, %xmm0
	comisd	x(%rip), %xmm0
	jbe	.L6
	movsd	%xmm0, x(%rip)
.L6:
	subl	$1, %r13d
	jne	.L8
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	movapd	%xmm0, %xmm2
	jmp	.L4
.L19:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE0:
	.size	f, .-f
	.section	.rodata.str1.1
.LC4:
	.string	"YES"
.LC5:
	.string	"NO"
.LC6:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	movl	%edi, 12(%rsp)
	leaq	.LC6(%rip), %rdi
	call	scanf@PLT
	movl	12(%rsp), %edi
	xorl	%eax, %eax
	call	f
	movsd	x(%rip), %xmm0
	movl	$1, %edi
	xorl	%eax, %eax
	movsd	%xmm0, z(%rip)
	call	f
	movsd	.LC7(%rip), %xmm0
	addsd	x(%rip), %xmm0
	leaq	.LC5(%rip), %rax
	movsd	z(%rip), %xmm1
	leaq	.LC4(%rip), %rdi
	comisd	%xmm0, %xmm1
	cmovbe	%rax, %rdi
	call	puts@PLT
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	movl	%eax, m(%rip)
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.globl	v
	.bss
	.align 4
	.type	v, @object
	.size	v, 4
v:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	u
	.align 8
	.type	u, @object
	.size	u, 8
u:
	.zero	8
	.globl	s
	.align 8
	.type	s, @object
	.size	s, 8
s:
	.zero	8
	.globl	z
	.align 8
	.type	z, @object
	.size	z, 8
z:
	.zero	8
	.globl	r
	.align 8
	.type	r, @object
	.size	r, 8
r:
	.zero	8
	.globl	x
	.align 8
	.type	x, @object
	.size	x, 8
x:
	.zero	8
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	0
	.long	1072693248
	.align 8
.LC7:
	.long	-1698910392
	.long	1048238066
	.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:

double x,r,z,s,u;n,m,v;f(t){for(x=0;t--;x<s/u?x=s/u:x)for(u=s=!scanf("%d%d",&n,&m);m--;s+=v*r)scanf("%d%lf",&v,&r),u+=r;}main(t){scanf("%d",&t);f(t);z=x;f(1);m=!puts(z>x+1e-7?"YES":"NO");}
2
4 2
4 0.4000000
3 0.5000000
6 1
5 0.3333333
5 3
5 0.7777777
4 0.1111111
2 0.0001111
 2
4 2
6 0.4000000
3 1.1067689145211372
6 1
3 0.6669854595810203
5 3
5 0.7777777
4 0.1111111
2 0.0001111
 2
4 2
4 0.6237659087975918
3 0.5000000
4 1
5 0.3333333
5 3
5 0.7777777
4 0.1111111
2 0.0001111
 2
4 2
4 0.6237659087975918
3 0.5000000
4 1
5 0.3333333
5 3
5 0.7777777
0 0.1111111
2 0.0001111
 2
4 2
4 0.4000000
3 0.5000000
4 1
5 0.3333333
5 3
5 0.7777777
3 0.1111111
2 0.0001111
 2
4 2
6 0.4000000
3 0.5000000
6 1
5 0.3333333
5 3
5 0.7777777
4 0.1111111
2 0.0001111
 2
4 2
4 0.6237659087975918
3 0.5000000
4 1
5 0.3333333
5 3
4 0.7777777
4 0.1111111
2 0.0001111
 2
4 2
4 1.2798236713428306
3 0.5000000
4 1
5 0.3333333
5 3
5 0.7777777
0 0.1111111
2 0.0001111
 2
4 2
4 0.4000000
3 0.5000000
4 1
5 0.3333333
5 3
5 1.0077160303972583
4 0.1111111
2 0.0001111
 2
4 2
6 0.4000000
3 0.5000000
6 1
5 0.6669854595810203
5 3
5 0.7777777
4 0.1111111
2 0.0001111

YES
 NO
 YES
 YES
 YES
 YES
 YES
 YES
 YES
 YES

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

```c
double x,r,z,s,u;n,m,v;f(t){for(x=0;t--;x<s/u?x=s/u:x)for(u=s=!scanf("%d%d",&n,&m);m--;s+=v*r)scanf("%d%lf",&v,&r),u+=r;}main(t){scanf("%d",&t);f(t);z=x;f(1);m=!puts(z>x+1e-7?"YES":"NO");}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	x
	.bss
	.align 8
	.type	x, @object
	.size	x, 8
x:
	.zero	8
	.globl	r
	.align 8
	.type	r, @object
	.size	r, 8
r:
	.zero	8
	.globl	z
	.align 8
	.type	z, @object
	.size	z, 8
z:
	.zero	8
	.globl	s
	.align 8
	.type	s, @object
	.size	s, 8
s:
	.zero	8
	.globl	u
	.align 8
	.type	u, @object
	.size	u, 8
u:
	.zero	8
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	v
	.align 4
	.type	v, @object
	.size	v, 4
v:
	.zero	4
	.section	.rodata
.LC1:
	.string	"%d%d"
.LC3:
	.string	"%d%lf"
	.text
	.globl	f
	.type	f, @function
f:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, x(%rip)
	jmp	.L2
.L9:
	leaq	m(%rip), %rax
	movq	%rax, %rdx
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	testl	%eax, %eax
	jne	.L3
	movsd	.LC2(%rip), %xmm0
	jmp	.L4
.L3:
	pxor	%xmm0, %xmm0
.L4:
	movsd	%xmm0, s(%rip)
	movsd	s(%rip), %xmm0
	movsd	%xmm0, u(%rip)
	jmp	.L5
.L6:
	leaq	r(%rip), %rax
	movq	%rax, %rdx
	leaq	v(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movsd	u(%rip), %xmm1
	movsd	r(%rip), %xmm0
	addsd	%xmm1, %xmm0
	movsd	%xmm0, u(%rip)
	movl	v(%rip), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	movsd	r(%rip), %xmm0
	mulsd	%xmm0, %xmm1
	movsd	s(%rip), %xmm0
	addsd	%xmm1, %xmm0
	movsd	%xmm0, s(%rip)
.L5:
	movl	m(%rip), %eax
	leal	-1(%rax), %edx
	movl	%edx, m(%rip)
	testl	%eax, %eax
	jne	.L6
	movsd	s(%rip), %xmm0
	movsd	u(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movsd	x(%rip), %xmm1
	comisd	%xmm1, %xmm0
	jbe	.L2
	movsd	s(%rip), %xmm0
	movsd	u(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movsd	%xmm0, x(%rip)
.L2:
	movl	-4(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -4(%rbp)
	testl	%eax, %eax
	jne	.L9
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	f, .-f
	.section	.rodata
.LC4:
	.string	"%d"
.LC6:
	.string	"YES"
.LC7:
	.string	"NO"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	leaq	-4(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	movl	$0, %eax
	call	f
	movsd	x(%rip), %xmm0
	movsd	%xmm0, z(%rip)
	movl	$1, %edi
	movl	$0, %eax
	call	f
	movsd	x(%rip), %xmm1
	movsd	.LC5(%rip), %xmm0
	addsd	%xmm0, %xmm1
	movsd	z(%rip), %xmm0
	comisd	%xmm1, %xmm0
	jbe	.L18
	leaq	.LC6(%rip), %rax
	jmp	.L15
.L18:
	leaq	.LC7(%rip), %rax
.L15:
	movq	%rax, %rdi
	call	puts@PLT
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	movl	%eax, m(%rip)
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC2:
	.long	0
	.long	1072693248
	.align 8
.LC5:
	.long	-1698910392
	.long	1048238066
	.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
	.globl	x
	.bss
	.align 8
	.type	x, @object
	.size	x, 8
x:
	.zero	8
	.globl	r
	.align 8
	.type	r, @object
	.size	r, 8
r:
	.zero	8
	.globl	z
	.align 8
	.type	z, @object
	.size	z, 8
z:
	.zero	8
	.globl	s
	.align 8
	.type	s, @object
	.size	s, 8
s:
	.zero	8
	.globl	u
	.align 8
	.type	u, @object
	.size	u, 8
u:
	.zero	8
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	v
	.align 4
	.type	v, @object
	.size	v, 4
v:
	.zero	4
	.section	.rodata
.LC1:
	.string	"%d%d"
.LC3:
	.string	"%d%lf"
	.text
	.globl	f
	.type	f, @function
f:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	pxor	%xmm0, %xmm0
	movsd	%xmm0, x(%rip)
	jmp	.L2
.L9:
	leaq	m(%rip), %rax
	movq	%rax, %rdx
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	testl	%eax, %eax
	jne	.L3
	movsd	.LC2(%rip), %xmm0
	jmp	.L4
.L3:
	pxor	%xmm0, %xmm0
.L4:
	movsd	%xmm0, s(%rip)
	movsd	s(%rip), %xmm0
	movsd	%xmm0, u(%rip)
	jmp	.L5
.L6:
	leaq	r(%rip), %rax
	movq	%rax, %rdx
	leaq	v(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movsd	u(%rip), %xmm1
	movsd	r(%rip), %xmm0
	addsd	%xmm1, %xmm0
	movsd	%xmm0, u(%rip)
	movl	v(%rip), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	movsd	r(%rip), %xmm0
	mulsd	%xmm0, %xmm1
	movsd	s(%rip), %xmm0
	addsd	%xmm1, %xmm0
	movsd	%xmm0, s(%rip)
.L5:
	movl	m(%rip), %eax
	leal	-1(%rax), %edx
	movl	%edx, m(%rip)
	testl	%eax, %eax
	jne	.L6
	movsd	s(%rip), %xmm0
	movsd	u(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movsd	x(%rip), %xmm1
	comisd	%xmm1, %xmm0
	jbe	.L2
	movsd	s(%rip), %xmm0
	movsd	u(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movsd	%xmm0, x(%rip)
.L2:
	movl	-4(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -4(%rbp)
	testl	%eax, %eax
	jne	.L9
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	f, .-f
	.section	.rodata
.LC4:
	.string	"%d"
.LC6:
	.string	"YES"
.LC7:
	.string	"NO"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	leaq	-4(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	movl	$0, %eax
	call	f
	movsd	x(%rip), %xmm0
	movsd	%xmm0, z(%rip)
	movl	$1, %edi
	movl	$0, %eax
	call	f
	movsd	x(%rip), %xmm1
	movsd	.LC5(%rip), %xmm0
	addsd	%xmm0, %xmm1
	movsd	z(%rip), %xmm0
	comisd	%xmm1, %xmm0
	jbe	.L18
	leaq	.LC6(%rip), %rax
	jmp	.L15
.L18:
	leaq	.LC7(%rip), %rax
.L15:
	movq	%rax, %rdi
	call	puts@PLT
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	movl	%eax, m(%rip)
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC2:
	.long	0
	.long	1072693248
	.align 8
.LC5:
	.long	-1698910392
	.long	1048238066
	.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:
