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 F[44]={};

int fibonacci(int);


int main(){

  int n;

  scanf("%44d",&n);

  printf("%d\n",fibonacci(n));


  return 0;
}

int fibonacci(int n){
  if( (n==0)||(n==1) ){
    return F[n] = 1;
  }
  if( F[n] != 0){
    return F[n];
  }
  return F[n] = fibonacci(n-2) + fibonacci(n-1);
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	F
	.bss
	.align 32
	.type	F, @object
	.size	F, 176
F:
	.zero	176
	.section	.rodata
.LC0:
	.string	"%44d"
.LC1:
	.string	"%d\n"
	.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	$16, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-12(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-12(%rbp), %eax
	movl	%eax, %edi
	call	fibonacci
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	fibonacci
	.type	fibonacci, @function
fibonacci:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 3, -24
	movl	%edi, -20(%rbp)
	cmpl	$0, -20(%rbp)
	je	.L5
	cmpl	$1, -20(%rbp)
	jne	.L6
.L5:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	F(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	F(%rip), %rax
	movl	(%rdx,%rax), %eax
	jmp	.L7
.L6:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	F(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L8
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	F(%rip), %rax
	movl	(%rdx,%rax), %eax
	jmp	.L7
.L8:
	movl	-20(%rbp), %eax
	subl	$2, %eax
	movl	%eax, %edi
	call	fibonacci
	movl	%eax, %ebx
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %edi
	call	fibonacci
	leal	(%rbx,%rax), %ecx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	F(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	F(%rip), %rax
	movl	(%rdx,%rax), %eax
.L7:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	fibonacci, .-fibonacci
	.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
	.p2align 4
	.globl	fibonacci
	.type	fibonacci, @function
fibonacci:
.LFB24:
	.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
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movslq	%edi, %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	cmpl	$1, %ebx
	jbe	.L18
	leaq	F(%rip), %rbp
	movslq	%ebx, %r14
	movl	0(%rbp,%r14,4), %eax
	testl	%eax, %eax
	je	.L19
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L19:
	.cfi_restore_state
	leal	-2(%rbx), %edx
	movslq	%edx, %rcx
	cmpl	$1, %edx
	jbe	.L20
	movl	0(%rbp,%rcx,4), %r13d
	testl	%r13d, %r13d
	je	.L21
.L5:
	leal	-1(%rbx), %eax
	cmpl	$1, %eax
	jbe	.L22
	movslq	%eax, %r12
	movl	0(%rbp,%r12,4), %eax
	testl	%eax, %eax
	je	.L23
.L11:
	addl	%r13d, %eax
	movl	%eax, 0(%rbp,%r14,4)
.L28:
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L18:
	.cfi_restore_state
	leaq	F(%rip), %rax
	movl	$1, (%rax,%rbx,4)
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	$1, %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
.L23:
	.cfi_restore_state
	leal	-3(%rbx), %r8d
	cmpl	$1, %r8d
	jbe	.L24
	movslq	%r8d, %rsi
	movl	0(%rbp,%rsi,4), %r15d
	movq	%rsi, (%rsp)
	testl	%r15d, %r15d
	je	.L25
.L13:
	cmpl	$1, %edx
	jbe	.L26
	movl	0(%rbp,%rcx,4), %eax
	movl	%r8d, 12(%rsp)
	movq	%rcx, (%rsp)
	testl	%eax, %eax
	je	.L27
.L15:
	addl	%r15d, %eax
	movl	%eax, 0(%rbp,%r12,4)
	addl	%r13d, %eax
	movl	%eax, 0(%rbp,%r14,4)
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L21:
	leal	-4(%rbx), %r8d
	cmpl	$1, %r8d
	jbe	.L29
	movslq	%r8d, %r13
	movl	0(%rbp,%r13,4), %r15d
	testl	%r15d, %r15d
	je	.L30
.L7:
	leal	-3(%rbx), %eax
	cmpl	$1, %eax
	jbe	.L31
	movslq	%eax, %r12
	movl	%r8d, (%rsp)
	movl	0(%rbp,%r12,4), %r13d
	testl	%r13d, %r13d
	je	.L32
.L9:
	addl	%r15d, %r13d
	movl	%r13d, 0(%rbp,%rcx,4)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L22:
	cltq
	movl	$1, 0(%rbp,%rax,4)
	movl	$1, %eax
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L20:
	movl	$1, 0(%rbp,%rcx,4)
	movl	$1, %r13d
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L27:
	leal	-4(%rbx), %edi
	call	fibonacci
	movl	12(%rsp), %edi
	movl	%eax, %ebx
	call	fibonacci
	movq	(%rsp), %rcx
	addl	%ebx, %eax
	movl	%eax, 0(%rbp,%rcx,4)
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L32:
	leal	-5(%rbx), %edi
	movq	%rcx, 16(%rsp)
	movl	%edx, 12(%rsp)
	call	fibonacci
	movl	(%rsp), %edi
	movl	%eax, %r13d
	call	fibonacci
	movq	16(%rsp), %rcx
	movl	12(%rsp), %edx
	addl	%eax, %r13d
	movl	%r13d, 0(%rbp,%r12,4)
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L30:
	leal	-6(%rbx), %edi
	movq	%rcx, 16(%rsp)
	movl	%r8d, 12(%rsp)
	movl	%edx, (%rsp)
	call	fibonacci
	leal	-5(%rbx), %edi
	movl	%eax, %r15d
	call	fibonacci
	movq	16(%rsp), %rcx
	movl	12(%rsp), %r8d
	addl	%eax, %r15d
	movl	(%rsp), %edx
	movl	%r15d, 0(%rbp,%r13,4)
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L25:
	leal	-5(%rbx), %edi
	movq	%rcx, 24(%rsp)
	movl	%r8d, 16(%rsp)
	movl	%edx, 12(%rsp)
	call	fibonacci
	leal	-4(%rbx), %edi
	movl	%eax, %r15d
	call	fibonacci
	movq	(%rsp), %rsi
	movq	24(%rsp), %rcx
	addl	%eax, %r15d
	movl	16(%rsp), %r8d
	movl	12(%rsp), %edx
	movl	%r15d, 0(%rbp,%rsi,4)
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L29:
	movslq	%r8d, %rax
	movl	$1, %r15d
	movl	$1, 0(%rbp,%rax,4)
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L24:
	movslq	%r8d, %rax
	movl	$1, %r15d
	movl	$1, 0(%rbp,%rax,4)
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L26:
	movl	$1, 0(%rbp,%rcx,4)
	movl	$1, %eax
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L31:
	cltq
	movl	$1, %r13d
	movl	$1, 0(%rbp,%rax,4)
	jmp	.L9
	.cfi_endproc
.LFE24:
	.size	fibonacci, .-fibonacci
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%44d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %edi
	call	fibonacci
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L36
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L36:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	F
	.bss
	.align 32
	.type	F, @object
	.size	F, 176
F:
	.zero	176
	.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
	.p2align 4
	.globl	fibonacci
	.type	fibonacci, @function
fibonacci:
.LFB24:
	.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
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movslq	%edi, %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	cmpl	$1, %ebx
	jbe	.L18
	leaq	F(%rip), %rbp
	movslq	%ebx, %r14
	movl	0(%rbp,%r14,4), %eax
	testl	%eax, %eax
	je	.L19
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L19:
	.cfi_restore_state
	leal	-2(%rbx), %edx
	movslq	%edx, %rcx
	cmpl	$1, %edx
	jbe	.L20
	movl	0(%rbp,%rcx,4), %r13d
	testl	%r13d, %r13d
	je	.L21
.L5:
	leal	-1(%rbx), %eax
	cmpl	$1, %eax
	jbe	.L22
	movslq	%eax, %r12
	movl	0(%rbp,%r12,4), %eax
	testl	%eax, %eax
	je	.L23
.L11:
	addl	%r13d, %eax
	movl	%eax, 0(%rbp,%r14,4)
.L28:
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L18:
	.cfi_restore_state
	leaq	F(%rip), %rax
	movl	$1, (%rax,%rbx,4)
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	$1, %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
.L23:
	.cfi_restore_state
	leal	-3(%rbx), %r8d
	cmpl	$1, %r8d
	jbe	.L24
	movslq	%r8d, %rsi
	movl	0(%rbp,%rsi,4), %r15d
	movq	%rsi, (%rsp)
	testl	%r15d, %r15d
	je	.L25
.L13:
	cmpl	$1, %edx
	jbe	.L26
	movl	0(%rbp,%rcx,4), %eax
	movl	%r8d, 12(%rsp)
	movq	%rcx, (%rsp)
	testl	%eax, %eax
	je	.L27
.L15:
	addl	%r15d, %eax
	movl	%eax, 0(%rbp,%r12,4)
	addl	%r13d, %eax
	movl	%eax, 0(%rbp,%r14,4)
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L21:
	leal	-4(%rbx), %r8d
	cmpl	$1, %r8d
	jbe	.L29
	movslq	%r8d, %r13
	movl	0(%rbp,%r13,4), %r15d
	testl	%r15d, %r15d
	je	.L30
.L7:
	leal	-3(%rbx), %eax
	cmpl	$1, %eax
	jbe	.L31
	movslq	%eax, %r12
	movl	%r8d, (%rsp)
	movl	0(%rbp,%r12,4), %r13d
	testl	%r13d, %r13d
	je	.L32
.L9:
	addl	%r15d, %r13d
	movl	%r13d, 0(%rbp,%rcx,4)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L22:
	cltq
	movl	$1, 0(%rbp,%rax,4)
	movl	$1, %eax
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L20:
	movl	$1, 0(%rbp,%rcx,4)
	movl	$1, %r13d
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L27:
	leal	-4(%rbx), %edi
	call	fibonacci
	movl	12(%rsp), %edi
	movl	%eax, %ebx
	call	fibonacci
	movq	(%rsp), %rcx
	addl	%ebx, %eax
	movl	%eax, 0(%rbp,%rcx,4)
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L32:
	leal	-5(%rbx), %edi
	movq	%rcx, 16(%rsp)
	movl	%edx, 12(%rsp)
	call	fibonacci
	movl	(%rsp), %edi
	movl	%eax, %r13d
	call	fibonacci
	movq	16(%rsp), %rcx
	movl	12(%rsp), %edx
	addl	%eax, %r13d
	movl	%r13d, 0(%rbp,%r12,4)
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L30:
	leal	-6(%rbx), %edi
	movq	%rcx, 16(%rsp)
	movl	%r8d, 12(%rsp)
	movl	%edx, (%rsp)
	call	fibonacci
	leal	-5(%rbx), %edi
	movl	%eax, %r15d
	call	fibonacci
	movq	16(%rsp), %rcx
	movl	12(%rsp), %r8d
	addl	%eax, %r15d
	movl	(%rsp), %edx
	movl	%r15d, 0(%rbp,%r13,4)
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L25:
	leal	-5(%rbx), %edi
	movq	%rcx, 24(%rsp)
	movl	%r8d, 16(%rsp)
	movl	%edx, 12(%rsp)
	call	fibonacci
	leal	-4(%rbx), %edi
	movl	%eax, %r15d
	call	fibonacci
	movq	(%rsp), %rsi
	movq	24(%rsp), %rcx
	addl	%eax, %r15d
	movl	16(%rsp), %r8d
	movl	12(%rsp), %edx
	movl	%r15d, 0(%rbp,%rsi,4)
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L29:
	movslq	%r8d, %rax
	movl	$1, %r15d
	movl	$1, 0(%rbp,%rax,4)
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L24:
	movslq	%r8d, %rax
	movl	$1, %r15d
	movl	$1, 0(%rbp,%rax,4)
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L26:
	movl	$1, 0(%rbp,%rcx,4)
	movl	$1, %eax
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L31:
	cltq
	movl	$1, %r13d
	movl	$1, 0(%rbp,%rax,4)
	jmp	.L9
	.cfi_endproc
.LFE24:
	.size	fibonacci, .-fibonacci
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%44d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %edi
	call	fibonacci
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L36
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L36:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	F
	.bss
	.align 32
	.type	F, @object
	.size	F, 176
F:
	.zero	176
	.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 F[44]={};

int fibonacci(int);


int main(){

  int n;

  scanf("%44d",&n);

  printf("%d\n",fibonacci(n));


  return 0;
}

int fibonacci(int n){
  if( (n==0)||(n==1) ){
    return F[n] = 1;
  }
  if( F[n] != 0){
    return F[n];
  }
  return F[n] = fibonacci(n-2) + fibonacci(n-1);
}


1
 2
 4
 8
 6
 15
 7
 24
 14
 5

1
 2
 5
 34
 13
 987
 21
 75025
 610
 8

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 F[44]={};

int fibonacci(int);


int main(){

  int n;

  scanf("%44d",&n);

  printf("%d\n",fibonacci(n));


  return 0;
}

int fibonacci(int n){
  if( (n==0)||(n==1) ){
    return F[n] = 1;
  }
  if( F[n] != 0){
    return F[n];
  }
  return F[n] = fibonacci(n-2) + fibonacci(n-1);
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	F
	.bss
	.align 32
	.type	F, @object
	.size	F, 176
F:
	.zero	176
	.section	.rodata
.LC0:
	.string	"%44d"
.LC1:
	.string	"%d\n"
	.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	$16, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-12(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-12(%rbp), %eax
	movl	%eax, %edi
	call	fibonacci
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	fibonacci
	.type	fibonacci, @function
fibonacci:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 3, -24
	movl	%edi, -20(%rbp)
	cmpl	$0, -20(%rbp)
	je	.L5
	cmpl	$1, -20(%rbp)
	jne	.L6
.L5:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	F(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	F(%rip), %rax
	movl	(%rdx,%rax), %eax
	jmp	.L7
.L6:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	F(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L8
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	F(%rip), %rax
	movl	(%rdx,%rax), %eax
	jmp	.L7
.L8:
	movl	-20(%rbp), %eax
	subl	$2, %eax
	movl	%eax, %edi
	call	fibonacci
	movl	%eax, %ebx
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %edi
	call	fibonacci
	leal	(%rbx,%rax), %ecx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	F(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	F(%rip), %rax
	movl	(%rdx,%rax), %eax
.L7:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	fibonacci, .-fibonacci
	.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	F
	.bss
	.align 32
	.type	F, @object
	.size	F, 176
F:
	.zero	176
	.section	.rodata
.LC0:
	.string	"%44d"
.LC1:
	.string	"%d\n"
	.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	$16, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-12(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-12(%rbp), %eax
	movl	%eax, %edi
	call	fibonacci
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	fibonacci
	.type	fibonacci, @function
fibonacci:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 3, -24
	movl	%edi, -20(%rbp)
	cmpl	$0, -20(%rbp)
	je	.L5
	cmpl	$1, -20(%rbp)
	jne	.L6
.L5:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	F(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	F(%rip), %rax
	movl	(%rdx,%rax), %eax
	jmp	.L7
.L6:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	F(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L8
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	F(%rip), %rax
	movl	(%rdx,%rax), %eax
	jmp	.L7
.L8:
	movl	-20(%rbp), %eax
	subl	$2, %eax
	movl	%eax, %edi
	call	fibonacci
	movl	%eax, %ebx
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %edi
	call	fibonacci
	leal	(%rbx,%rax), %ecx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	F(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	F(%rip), %rax
	movl	(%rdx,%rax), %eax
.L7:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	fibonacci, .-fibonacci
	.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:
