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

```c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>

int main() {

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

    long l0 = 2;
    long l1 = 1;

    int cnt = 3;
    long temp;
    if (n == 1) {
        printf("%ld", l1);
    } else if (n == 2) {
        printf("%ld", (l0+l1));
    } else {

        while (cnt <= n) {

            temp = l0 + l1;
            l0 = l1;
            l1 = temp;

            cnt++;
        }
        printf("%ld", l0 + l1);
    }

    



    return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.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
	cmpl	$1, %edi
	je	.L12
	cmpl	$2, %edi
	je	.L4
	movl	$1, %eax
	movl	$2, %edx
	jle	.L6
	addl	$1, %edi
	movl	$3, %ecx
	movl	$1, %eax
	movl	$2, %esi
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rax, %rdx
	addl	$1, %ecx
	addq	%rsi, %rax
	movq	%rdx, %rsi
	cmpl	%ecx, %edi
	jne	.L7
.L6:
	addq	%rax, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L3:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L13
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L12:
	.cfi_restore_state
	movl	$1, %edx
	leaq	.LC1(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L4:
	movl	$3, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.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
	cmpl	$1, %edi
	je	.L12
	cmpl	$2, %edi
	je	.L4
	movl	$1, %eax
	movl	$2, %edx
	jle	.L6
	addl	$1, %edi
	movl	$3, %ecx
	movl	$1, %eax
	movl	$2, %esi
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rax, %rdx
	addl	$1, %ecx
	addq	%rsi, %rax
	movq	%rdx, %rsi
	cmpl	%ecx, %edi
	jne	.L7
.L6:
	addq	%rax, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L3:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L13
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L12:
	.cfi_restore_state
	movl	$1, %edx
	leaq	.LC1(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L4:
	movl	$3, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.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
	cmpl	$1, %edi
	je	.L12
	cmpl	$2, %edi
	je	.L4
	movl	$1, %eax
	movl	$2, %edx
	jle	.L6
	addl	$1, %edi
	movl	$3, %ecx
	movl	$1, %eax
	movl	$2, %esi
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rax, %rdx
	addl	$1, %ecx
	addq	%rsi, %rax
	movq	%rdx, %rsi
	cmpl	%ecx, %edi
	jne	.L7
.L6:
	addq	%rax, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L3:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L13
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L12:
	.cfi_restore_state
	movl	$1, %edx
	leaq	.LC1(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L4:
	movl	$3, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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:
```
```c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>

int main() {

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

    long l0 = 2;
    long l1 = 1;

    int cnt = 3;
    long temp;
    if (n == 1) {
        printf("%ld", l1);
    } else if (n == 2) {
        printf("%ld", (l0+l1));
    } else {

        while (cnt <= n) {

            temp = l0 + l1;
            l0 = l1;
            l1 = temp;

            cnt++;
        }
        printf("%ld", l0 + l1);
    }

    



    return 0;
}
```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>

int main() {

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

    long l0 = 2;
    long l1 = 1;

    int cnt = 3;
    long temp;
    if (n == 1) {
        printf("%ld", l1);
    } else if (n == 2) {
        printf("%ld", (l0+l1));
    } else {

        while (cnt <= n) {

            temp = l0 + l1;
            l0 = l1;
            l1 = temp;

            cnt++;
        }
        printf("%ld", l0 + l1);
    }

    



    return 0;
}
```

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.
Optimized Assembly Code:

1
 2
 4
 3
 30
 49
 6
 8
 7
 58

1 3 7 4 1860498 17393796001 18 47 29 1322157322203
Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>

int main() {

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

    long l0 = 2;
    long l1 = 1;

    int cnt = 3;
    long temp;
    if (n == 1) {
        printf("%ld", l1);
    } else if (n == 2) {
        printf("%ld", (l0+l1));
    } else {

        while (cnt <= n) {

            temp = l0 + l1;
            l0 = l1;
            l1 = temp;

            cnt++;
        }
        printf("%ld", l0 + l1);
    }

    



    return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.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
	cmpl	$1, %edi
	je	.L12
	cmpl	$2, %edi
	je	.L4
	movl	$1, %eax
	movl	$2, %edx
	jle	.L6
	addl	$1, %edi
	movl	$3, %ecx
	movl	$1, %eax
	movl	$2, %esi
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rax, %rdx
	addl	$1, %ecx
	addq	%rsi, %rax
	movq	%rdx, %rsi
	cmpl	%ecx, %edi
	jne	.L7
.L6:
	addq	%rax, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L3:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L13
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L12:
	.cfi_restore_state
	movl	$1, %edx
	leaq	.LC1(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L4:
	movl	$3, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.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
	cmpl	$1, %edi
	je	.L12
	cmpl	$2, %edi
	je	.L4
	movl	$1, %eax
	movl	$2, %edx
	jle	.L6
	addl	$1, %edi
	movl	$3, %ecx
	movl	$1, %eax
	movl	$2, %esi
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rax, %rdx
	addl	$1, %ecx
	addq	%rsi, %rax
	movq	%rdx, %rsi
	cmpl	%ecx, %edi
	jne	.L7
.L6:
	addq	%rax, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L3:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L13
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L12:
	.cfi_restore_state
	movl	$1, %edx
	leaq	.LC1(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L4:
	movl	$3, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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:
```