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>
#include<stdlib.h>

typedef long long int int64;

void run(void){
  int n,a,b,c,d;
  scanf("%d%d%d%d%d",&n,&a,&b,&c,&d);
  int i;
  for(i=0;i<n;i++){
    int64 max=a+(int64)(n-1-i)*d-(int64)i*c;
    int64 min=a+(int64)(n-1-i)*c-(int64)i*d;
    if(min<=b && b<=max){
      puts("YES");
      return;
    }
  }
  puts("NO");
}

int main(void){
  run();
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d%d%d%d"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.text
	.globl	run
	.type	run, @function
run:
.LFB6:
	.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	-32(%rbp), %rdi
	leaq	-36(%rbp), %rsi
	leaq	-40(%rbp), %rcx
	leaq	-44(%rbp), %rdx
	leaq	-48(%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
	movl	$0, -28(%rbp)
	jmp	.L2
.L5:
	movl	-44(%rbp), %eax
	movslq	%eax, %rcx
	movl	-48(%rbp), %eax
	subl	$1, %eax
	subl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movl	-32(%rbp), %eax
	cltq
	imulq	%rdx, %rax
	addq	%rax, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	imulq	%rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -24(%rbp)
	movl	-44(%rbp), %eax
	movslq	%eax, %rcx
	movl	-48(%rbp), %eax
	subl	$1, %eax
	subl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	imulq	%rdx, %rax
	addq	%rax, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movl	-32(%rbp), %eax
	cltq
	imulq	%rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -16(%rbp)
	movl	-40(%rbp), %eax
	cltq
	cmpq	%rax, -16(%rbp)
	jg	.L3
	movl	-40(%rbp), %eax
	cltq
	cmpq	%rax, -24(%rbp)
	jl	.L3
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L1
.L3:
	addl	$1, -28(%rbp)
.L2:
	movl	-48(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L5
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L1:
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	run, .-run
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	call	run
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"%d%d%d%d%d"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.text
	.p2align 4
	.globl	run
	.type	run, @function
run:
.LFB39:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rcx
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	leaq	20(%rsp), %r9
	leaq	16(%rsp), %r8
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %edi
	testl	%edi, %edi
	jle	.L2
	movslq	20(%rsp), %r10
	movslq	16(%rsp), %rdx
	leal	-1(%rdi), %ecx
	movslq	%ecx, %rcx
	movslq	8(%rsp), %r11
	movslq	12(%rsp), %rsi
	movq	%r10, %r9
	movq	%r10, %rax
	movq	%rdx, %r8
	negq	%r9
	imulq	%rcx, %rax
	negq	%r8
	subq	%rdx, %r9
	imulq	%rcx, %rdx
	subq	%r10, %r8
	xorl	%ecx, %ecx
	addq	%r11, %rax
	addq	%r11, %rdx
	.p2align 4,,10
	.p2align 3
.L5:
	cmpq	%rax, %rsi
	jg	.L3
	cmpq	%rdx, %rsi
	jge	.L16
.L3:
	addl	$1, %ecx
	addq	%r9, %rax
	addq	%r8, %rdx
	cmpl	%edi, %ecx
	jne	.L5
.L2:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L1:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L1
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	run, .-run
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	run
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE40:
	.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	"%d%d%d%d%d"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.text
	.p2align 4
	.globl	run
	.type	run, @function
run:
.LFB39:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rcx
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	leaq	20(%rsp), %r9
	leaq	16(%rsp), %r8
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %edi
	testl	%edi, %edi
	jle	.L2
	movslq	20(%rsp), %r10
	movslq	16(%rsp), %rdx
	leal	-1(%rdi), %ecx
	movslq	%ecx, %rcx
	movslq	8(%rsp), %r11
	movslq	12(%rsp), %rsi
	movq	%r10, %r9
	movq	%r10, %rax
	movq	%rdx, %r8
	negq	%r9
	imulq	%rcx, %rax
	negq	%r8
	subq	%rdx, %r9
	imulq	%rcx, %rdx
	subq	%r10, %r8
	xorl	%ecx, %ecx
	addq	%r11, %rax
	addq	%r11, %rdx
	.p2align 4,,10
	.p2align 3
.L5:
	cmpq	%rax, %rsi
	jg	.L3
	cmpq	%rdx, %rsi
	jge	.L16
.L3:
	addl	$1, %ecx
	addq	%r9, %rax
	addq	%r8, %rdx
	cmpl	%edi, %ecx
	jne	.L5
.L2:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L1:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L1
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	run, .-run
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	run
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE40:
	.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>
#include<stdlib.h>

typedef long long int int64;

void run(void){
  int n,a,b,c,d;
  scanf("%d%d%d%d%d",&n,&a,&b,&c,&d);
  int i;
  for(i=0;i<n;i++){
    int64 max=a+(int64)(n-1-i)*d-(int64)i*c;
    int64 min=a+(int64)(n-1-i)*c-(int64)i*d;
    if(min<=b && b<=max){
      puts("YES");
      return;
    }
  }
  puts("NO");
}

int main(void){
  run();
  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>
#include<stdlib.h>

typedef long long int int64;

void run(void){
  int n,a,b,c,d;
  scanf("%d%d%d%d%d",&n,&a,&b,&c,&d);
  int i;
  for(i=0;i<n;i++){
    int64 max=a+(int64)(n-1-i)*d-(int64)i*c;
    int64 min=a+(int64)(n-1-i)*c-(int64)i*d;
    if(min<=b && b<=max){
      puts("YES");
      return;
    }
  }
  puts("NO");
}

int main(void){
  run();
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d%d%d%d"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.text
	.globl	run
	.type	run, @function
run:
.LFB6:
	.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	-32(%rbp), %rdi
	leaq	-36(%rbp), %rsi
	leaq	-40(%rbp), %rcx
	leaq	-44(%rbp), %rdx
	leaq	-48(%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
	movl	$0, -28(%rbp)
	jmp	.L2
.L5:
	movl	-44(%rbp), %eax
	movslq	%eax, %rcx
	movl	-48(%rbp), %eax
	subl	$1, %eax
	subl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movl	-32(%rbp), %eax
	cltq
	imulq	%rdx, %rax
	addq	%rax, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	imulq	%rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -24(%rbp)
	movl	-44(%rbp), %eax
	movslq	%eax, %rcx
	movl	-48(%rbp), %eax
	subl	$1, %eax
	subl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	imulq	%rdx, %rax
	addq	%rax, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movl	-32(%rbp), %eax
	cltq
	imulq	%rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -16(%rbp)
	movl	-40(%rbp), %eax
	cltq
	cmpq	%rax, -16(%rbp)
	jg	.L3
	movl	-40(%rbp), %eax
	cltq
	cmpq	%rax, -24(%rbp)
	jl	.L3
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L1
.L3:
	addl	$1, -28(%rbp)
.L2:
	movl	-48(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L5
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L1:
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	run, .-run
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	call	run
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"%d%d%d%d%d"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.text
	.globl	run
	.type	run, @function
run:
.LFB6:
	.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	-32(%rbp), %rdi
	leaq	-36(%rbp), %rsi
	leaq	-40(%rbp), %rcx
	leaq	-44(%rbp), %rdx
	leaq	-48(%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
	movl	$0, -28(%rbp)
	jmp	.L2
.L5:
	movl	-44(%rbp), %eax
	movslq	%eax, %rcx
	movl	-48(%rbp), %eax
	subl	$1, %eax
	subl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movl	-32(%rbp), %eax
	cltq
	imulq	%rdx, %rax
	addq	%rax, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	imulq	%rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -24(%rbp)
	movl	-44(%rbp), %eax
	movslq	%eax, %rcx
	movl	-48(%rbp), %eax
	subl	$1, %eax
	subl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movl	-36(%rbp), %eax
	cltq
	imulq	%rdx, %rax
	addq	%rax, %rcx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movl	-32(%rbp), %eax
	cltq
	imulq	%rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -16(%rbp)
	movl	-40(%rbp), %eax
	cltq
	cmpq	%rax, -16(%rbp)
	jg	.L3
	movl	-40(%rbp), %eax
	cltq
	cmpq	%rax, -24(%rbp)
	jl	.L3
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L1
.L3:
	addl	$1, -28(%rbp)
.L2:
	movl	-48(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L5
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L1:
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	run, .-run
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	call	run
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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:
