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>
int main()
{
	long long int n, a, b, c, d;
	scanf("%lld %lld %lld %lld %lld", &n, &a, &b, &c, &d);
	long long int max, min;
	long long int i;
	for (i = 0; i < n; i++)
	{
		max = min = a;
		max += i * d;
		min += i * c;
		max -= (n - i - 1) * c;
		min -= (n - i - 1) * d;
		if (min <= b && b <= max)
		{
			printf("YES\n");
			return 0;
		}
	}
	printf("NO\n");
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lld %lld %lld %lld %lld"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.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	$80, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-40(%rbp), %rdi
	leaq	-48(%rbp), %rsi
	leaq	-56(%rbp), %rcx
	leaq	-64(%rbp), %rdx
	leaq	-72(%rbp), %rax
	movq	%rdi, %r9
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -32(%rbp)
	jmp	.L2
.L5:
	movq	-64(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-40(%rbp), %rax
	imulq	-32(%rbp), %rax
	addq	%rax, -16(%rbp)
	movq	-48(%rbp), %rax
	imulq	-32(%rbp), %rax
	addq	%rax, -24(%rbp)
	movq	-72(%rbp), %rax
	subq	-32(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-48(%rbp), %rax
	imulq	%rdx, %rax
	subq	%rax, -16(%rbp)
	movq	-72(%rbp), %rax
	subq	-32(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-40(%rbp), %rax
	imulq	%rdx, %rax
	subq	%rax, -24(%rbp)
	movq	-56(%rbp), %rax
	cmpq	%rax, -24(%rbp)
	jg	.L3
	movq	-56(%rbp), %rax
	cmpq	%rax, -16(%rbp)
	jl	.L3
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L6
.L3:
	addq	$1, -32(%rbp)
.L2:
	movq	-72(%rbp), %rax
	cmpq	%rax, -32(%rbp)
	jl	.L5
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L6:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.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	"%lld %lld %lld %lld %lld"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$56, %rsp
	.cfi_def_cfa_offset 64
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %r8
	leaq	16(%rsp), %rcx
	movq	%rsp, %rsi
	leaq	8(%rsp), %rdx
	leaq	32(%rsp), %r9
	call	__isoc99_scanf@PLT
	movq	(%rsp), %r8
	testq	%r8, %r8
	jle	.L2
	movq	32(%rsp), %rdx
	movq	24(%rsp), %rdi
	leaq	-1(%r8), %rcx
	movq	8(%rsp), %rax
	movq	16(%rsp), %rsi
	leaq	(%rdx,%rdi), %r9
	imulq	%rcx, %rdi
	imulq	%rcx, %rdx
	subq	%rdi, %rax
	subq	%rdx, %rdi
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	(%rdi,%rax), %rcx
	cmpq	%rcx, %rsi
	jl	.L3
	cmpq	%rax, %rsi
	jle	.L16
.L3:
	addq	$1, %rdx
	addq	%r9, %rax
	cmpq	%r8, %rdx
	jne	.L5
.L2:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L4:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	xorl	%eax, %eax
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L16:
	.cfi_restore_state
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L4
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.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	"%lld %lld %lld %lld %lld"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$56, %rsp
	.cfi_def_cfa_offset 64
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %r8
	leaq	16(%rsp), %rcx
	movq	%rsp, %rsi
	leaq	8(%rsp), %rdx
	leaq	32(%rsp), %r9
	call	__isoc99_scanf@PLT
	movq	(%rsp), %r8
	testq	%r8, %r8
	jle	.L2
	movq	32(%rsp), %rdx
	movq	24(%rsp), %rdi
	leaq	-1(%r8), %rcx
	movq	8(%rsp), %rax
	movq	16(%rsp), %rsi
	leaq	(%rdx,%rdi), %r9
	imulq	%rcx, %rdi
	imulq	%rcx, %rdx
	subq	%rdi, %rax
	subq	%rdx, %rdi
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	(%rdi,%rax), %rcx
	cmpq	%rcx, %rsi
	jl	.L3
	cmpq	%rax, %rsi
	jle	.L16
.L3:
	addq	$1, %rdx
	addq	%r9, %rax
	cmpq	%r8, %rdx
	jne	.L5
.L2:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L4:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	xorl	%eax, %eax
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L16:
	.cfi_restore_state
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L4
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.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>
int main()
{
	long long int n, a, b, c, d;
	scanf("%lld %lld %lld %lld %lld", &n, &a, &b, &c, &d);
	long long int max, min;
	long long int i;
	for (i = 0; i < n; i++)
	{
		max = min = a;
		max += i * d;
		min += i * c;
		max -= (n - i - 1) * c;
		min -= (n - i - 1) * d;
		if (min <= b && b <= max)
		{
			printf("YES\n");
			return 0;
		}
	}
	printf("NO\n");
	return 0;
}
1788 105960835 681218449 90629745 90632170
 4 7 11 4 5
 491995 412925347 465710940 59999126 59999339
 1788 122437383 681218449 90629745 90632170
 491995 412925347 465710940 59999126 4650906
 4 7 11 4 6
 1788 122437383 681218449 90629745 148553464
 801386 412925347 465710940 59999126 4650906
 4 7 9 4 6
 1788 122437383 541607279 90629745 148553464

NO
 YES
 NO
 NO
 NO
 YES
 YES
 NO
 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
#include<stdio.h>
int main()
{
	long long int n, a, b, c, d;
	scanf("%lld %lld %lld %lld %lld", &n, &a, &b, &c, &d);
	long long int max, min;
	long long int i;
	for (i = 0; i < n; i++)
	{
		max = min = a;
		max += i * d;
		min += i * c;
		max -= (n - i - 1) * c;
		min -= (n - i - 1) * d;
		if (min <= b && b <= max)
		{
			printf("YES\n");
			return 0;
		}
	}
	printf("NO\n");
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lld %lld %lld %lld %lld"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.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	$80, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-40(%rbp), %rdi
	leaq	-48(%rbp), %rsi
	leaq	-56(%rbp), %rcx
	leaq	-64(%rbp), %rdx
	leaq	-72(%rbp), %rax
	movq	%rdi, %r9
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -32(%rbp)
	jmp	.L2
.L5:
	movq	-64(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-40(%rbp), %rax
	imulq	-32(%rbp), %rax
	addq	%rax, -16(%rbp)
	movq	-48(%rbp), %rax
	imulq	-32(%rbp), %rax
	addq	%rax, -24(%rbp)
	movq	-72(%rbp), %rax
	subq	-32(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-48(%rbp), %rax
	imulq	%rdx, %rax
	subq	%rax, -16(%rbp)
	movq	-72(%rbp), %rax
	subq	-32(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-40(%rbp), %rax
	imulq	%rdx, %rax
	subq	%rax, -24(%rbp)
	movq	-56(%rbp), %rax
	cmpq	%rax, -24(%rbp)
	jg	.L3
	movq	-56(%rbp), %rax
	cmpq	%rax, -16(%rbp)
	jl	.L3
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L6
.L3:
	addq	$1, -32(%rbp)
.L2:
	movq	-72(%rbp), %rax
	cmpq	%rax, -32(%rbp)
	jl	.L5
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L6:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.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	"%lld %lld %lld %lld %lld"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.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	$80, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-40(%rbp), %rdi
	leaq	-48(%rbp), %rsi
	leaq	-56(%rbp), %rcx
	leaq	-64(%rbp), %rdx
	leaq	-72(%rbp), %rax
	movq	%rdi, %r9
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -32(%rbp)
	jmp	.L2
.L5:
	movq	-64(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-40(%rbp), %rax
	imulq	-32(%rbp), %rax
	addq	%rax, -16(%rbp)
	movq	-48(%rbp), %rax
	imulq	-32(%rbp), %rax
	addq	%rax, -24(%rbp)
	movq	-72(%rbp), %rax
	subq	-32(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-48(%rbp), %rax
	imulq	%rdx, %rax
	subq	%rax, -16(%rbp)
	movq	-72(%rbp), %rax
	subq	-32(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-40(%rbp), %rax
	imulq	%rdx, %rax
	subq	%rax, -24(%rbp)
	movq	-56(%rbp), %rax
	cmpq	%rax, -24(%rbp)
	jg	.L3
	movq	-56(%rbp), %rax
	cmpq	%rax, -16(%rbp)
	jl	.L3
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L6
.L3:
	addq	$1, -32(%rbp)
.L2:
	movq	-72(%rbp), %rax
	cmpq	%rax, -32(%rbp)
	jl	.L5
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L6:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.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:
