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 i,i_min,pas_min;
  long n,time=0;
  long trans[5];
  
  scanf("%ld",&n);
  for(i=0;i<5;i++){
    scanf("%ld",&trans[i]);
    if(i==0){
      pas_min=trans[0];
      i_min=0;
    } else if(trans[i]<=pas_min){
      pas_min=trans[i];
      i_min=i;
    }
  }
  
  if(n%trans[i_min]==0){
	time=n/trans[i_min]+4;
  } else {
    time=n/trans[i_min]+5;
  }
  
  printf("%ld",time);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%ld"
	.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	$96, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -56(%rbp)
	leaq	-88(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -80(%rbp)
	jmp	.L2
.L5:
	leaq	-48(%rbp), %rdx
	movq	-80(%rbp), %rax
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpq	$0, -80(%rbp)
	jne	.L3
	movq	-48(%rbp), %rax
	movq	%rax, -64(%rbp)
	movq	$0, -72(%rbp)
	jmp	.L4
.L3:
	movq	-80(%rbp), %rax
	movq	-48(%rbp,%rax,8), %rax
	cmpq	%rax, -64(%rbp)
	jl	.L4
	movq	-80(%rbp), %rax
	movq	-48(%rbp,%rax,8), %rax
	movq	%rax, -64(%rbp)
	movq	-80(%rbp), %rax
	movq	%rax, -72(%rbp)
.L4:
	addq	$1, -80(%rbp)
.L2:
	cmpq	$4, -80(%rbp)
	jle	.L5
	movq	-88(%rbp), %rax
	movq	-72(%rbp), %rdx
	movq	-48(%rbp,%rdx,8), %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	testq	%rax, %rax
	jne	.L6
	movq	-88(%rbp), %rax
	movq	-72(%rbp), %rdx
	movq	-48(%rbp,%rdx,8), %rcx
	cqto
	idivq	%rcx
	addq	$4, %rax
	movq	%rax, -56(%rbp)
	jmp	.L7
.L6:
	movq	-88(%rbp), %rax
	movq	-72(%rbp), %rdx
	movq	-48(%rbp,%rdx,8), %rsi
	cqto
	idivq	%rsi
	addq	$5, %rax
	movq	%rax, -56(%rbp)
.L7:
	movq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	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	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movq	%r14, %rdi
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$64, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	leaq	16(%rsp), %rbx
	call	__isoc99_scanf@PLT
.L6:
	movq	%rbx, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	1(%rbp), %rax
	testq	%rbp, %rbp
	je	.L12
	movq	(%rbx), %rdx
	cmpq	%r12, %rdx
	jg	.L4
	movq	%rdx, %r12
	movq	%rbp, %r13
.L4:
	cmpq	$5, %rax
	je	.L5
.L3:
	addq	$8, %rbx
	movq	%rax, %rbp
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L12:
	movq	16(%rsp), %r12
	xorl	%r13d, %r13d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L5:
	movq	8(%rsp), %rax
	movq	%r14, %rsi
	movl	$1, %edi
	cqto
	idivq	16(%rsp,%r13,8)
	cmpq	$1, %rdx
	sbbq	$-5, %rax
	movq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L13
	addq	$64, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L13:
	.cfi_restore_state
	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	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movq	%r14, %rdi
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$64, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	leaq	16(%rsp), %rbx
	call	__isoc99_scanf@PLT
.L6:
	movq	%rbx, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	1(%rbp), %rax
	testq	%rbp, %rbp
	je	.L12
	movq	(%rbx), %rdx
	cmpq	%r12, %rdx
	jg	.L4
	movq	%rdx, %r12
	movq	%rbp, %r13
.L4:
	cmpq	$5, %rax
	je	.L5
.L3:
	addq	$8, %rbx
	movq	%rax, %rbp
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L12:
	movq	16(%rsp), %r12
	xorl	%r13d, %r13d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L5:
	movq	8(%rsp), %rax
	movq	%r14, %rsi
	movl	$1, %edi
	cqto
	idivq	16(%rsp,%r13,8)
	cmpq	$1, %rdx
	sbbq	$-5, %rax
	movq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L13
	addq	$64, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L13:
	.cfi_restore_state
	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 i,i_min,pas_min;
  long n,time=0;
  long trans[5];
  
  scanf("%ld",&n);
  for(i=0;i<5;i++){
    scanf("%ld",&trans[i]);
    if(i==0){
      pas_min=trans[0];
      i_min=0;
    } else if(trans[i]<=pas_min){
      pas_min=trans[i];
      i_min=i;
    }
  }
  
  if(n%trans[i_min]==0){
	time=n/trans[i_min]+4;
  } else {
    time=n/trans[i_min]+5;
  }
  
  printf("%ld",time);
}
5
3
2
4
3
6
 10
123
219
123
123
123
 10000000007
2
3
5
3
11
 10000000007
2
3
1
3
11
 10
123
633
27
9
123
 5
3
2
4
1
6
 10
31
457
1
123
48
 10
110
1017
3
9
29
 10000000007
4
3
9
14
3
 10
123
219
27
123
123

7 5 5000000008 10000000011 6 9 14 8 3333333340 5
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 i,i_min,pas_min;
  long n,time=0;
  long trans[5];
  
  scanf("%ld",&n);
  for(i=0;i<5;i++){
    scanf("%ld",&trans[i]);
    if(i==0){
      pas_min=trans[0];
      i_min=0;
    } else if(trans[i]<=pas_min){
      pas_min=trans[i];
      i_min=i;
    }
  }
  
  if(n%trans[i_min]==0){
	time=n/trans[i_min]+4;
  } else {
    time=n/trans[i_min]+5;
  }
  
  printf("%ld",time);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%ld"
	.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	$96, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -56(%rbp)
	leaq	-88(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -80(%rbp)
	jmp	.L2
.L5:
	leaq	-48(%rbp), %rdx
	movq	-80(%rbp), %rax
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpq	$0, -80(%rbp)
	jne	.L3
	movq	-48(%rbp), %rax
	movq	%rax, -64(%rbp)
	movq	$0, -72(%rbp)
	jmp	.L4
.L3:
	movq	-80(%rbp), %rax
	movq	-48(%rbp,%rax,8), %rax
	cmpq	%rax, -64(%rbp)
	jl	.L4
	movq	-80(%rbp), %rax
	movq	-48(%rbp,%rax,8), %rax
	movq	%rax, -64(%rbp)
	movq	-80(%rbp), %rax
	movq	%rax, -72(%rbp)
.L4:
	addq	$1, -80(%rbp)
.L2:
	cmpq	$4, -80(%rbp)
	jle	.L5
	movq	-88(%rbp), %rax
	movq	-72(%rbp), %rdx
	movq	-48(%rbp,%rdx,8), %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	testq	%rax, %rax
	jne	.L6
	movq	-88(%rbp), %rax
	movq	-72(%rbp), %rdx
	movq	-48(%rbp,%rdx,8), %rcx
	cqto
	idivq	%rcx
	addq	$4, %rax
	movq	%rax, -56(%rbp)
	jmp	.L7
.L6:
	movq	-88(%rbp), %rax
	movq	-72(%rbp), %rdx
	movq	-48(%rbp,%rdx,8), %rsi
	cqto
	idivq	%rsi
	addq	$5, %rax
	movq	%rax, -56(%rbp)
.L7:
	movq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	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	"%ld"
	.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	$96, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -56(%rbp)
	leaq	-88(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -80(%rbp)
	jmp	.L2
.L5:
	leaq	-48(%rbp), %rdx
	movq	-80(%rbp), %rax
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpq	$0, -80(%rbp)
	jne	.L3
	movq	-48(%rbp), %rax
	movq	%rax, -64(%rbp)
	movq	$0, -72(%rbp)
	jmp	.L4
.L3:
	movq	-80(%rbp), %rax
	movq	-48(%rbp,%rax,8), %rax
	cmpq	%rax, -64(%rbp)
	jl	.L4
	movq	-80(%rbp), %rax
	movq	-48(%rbp,%rax,8), %rax
	movq	%rax, -64(%rbp)
	movq	-80(%rbp), %rax
	movq	%rax, -72(%rbp)
.L4:
	addq	$1, -80(%rbp)
.L2:
	cmpq	$4, -80(%rbp)
	jle	.L5
	movq	-88(%rbp), %rax
	movq	-72(%rbp), %rdx
	movq	-48(%rbp,%rdx,8), %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	testq	%rax, %rax
	jne	.L6
	movq	-88(%rbp), %rax
	movq	-72(%rbp), %rdx
	movq	-48(%rbp,%rdx,8), %rcx
	cqto
	idivq	%rcx
	addq	$4, %rax
	movq	%rax, -56(%rbp)
	jmp	.L7
.L6:
	movq	-88(%rbp), %rax
	movq	-72(%rbp), %rdx
	movq	-48(%rbp,%rdx,8), %rsi
	cqto
	idivq	%rsi
	addq	$5, %rax
	movq	%rax, -56(%rbp)
.L7:
	movq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	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:
