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(void)
{
    long n;
    scanf("%ld", &n);
    char a[100];

    int i=0, b;

    while(n!=0){
        n--;
        b = n%26;
        a[i] = 'a' + b;
        n = n/26;
        i++;
    }

    for(int j=i-1; j>=0; j--){
        printf("%c", a[j]);
    }


}```

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	$144, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -132(%rbp)
	jmp	.L2
.L3:
	movq	-120(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -120(%rbp)
	movq	-120(%rbp), %rcx
	movabsq	$5675921253449092805, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$3, %rax
	movq	%rcx, %rsi
	sarq	$63, %rsi
	subq	%rsi, %rax
	movq	%rax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	movl	%edx, -124(%rbp)
	movl	-124(%rbp), %eax
	addl	$97, %eax
	movl	%eax, %edx
	movl	-132(%rbp), %eax
	cltq
	movb	%dl, -112(%rbp,%rax)
	movq	-120(%rbp), %rcx
	movabsq	$5675921253449092805, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$3, %rax
	sarq	$63, %rcx
	movq	%rcx, %rdx
	subq	%rdx, %rax
	movq	%rax, -120(%rbp)
	addl	$1, -132(%rbp)
.L2:
	movq	-120(%rbp), %rax
	testq	%rax, %rax
	jne	.L3
	movl	-132(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -128(%rbp)
	jmp	.L4
.L5:
	movl	-128(%rbp), %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar@PLT
	subl	$1, -128(%rbp)
.L4:
	cmpl	$0, -128(%rbp)
	jns	.L5
	movl	$0, %eax
	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	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$136, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	leaq	16(%rsp), %rbx
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rdx
	xorl	%esi, %esi
	movabsq	$5675921253449092805, %r8
	testq	%rdx, %rdx
	je	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	leaq	-1(%rdx), %rcx
	movslq	%esi, %rdi
	movq	%rcx, %rax
	imulq	%r8
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$3, %rdx
	subq	%rax, %rdx
	leaq	(%rdx,%rdx,2), %rax
	leaq	(%rdx,%rax,4), %rax
	addq	%rax, %rax
	subq	%rax, %rcx
	movq	%rsi, %rax
	addl	$97, %ecx
	movb	%cl, (%rbx,%rsi)
	addq	$1, %rsi
	testq	%rdx, %rdx
	jne	.L2
	movq	$0, 8(%rsp)
	leaq	15(%rsp,%rdi), %rbp
	addq	%rdi, %rbx
	subq	%rax, %rbp
	.p2align 4,,10
	.p2align 3
.L4:
	movsbl	(%rbx), %edi
	subq	$1, %rbx
	call	putchar@PLT
	cmpq	%rbx, %rbp
	jne	.L4
.L5:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$136, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L16:
	.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	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$136, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	leaq	16(%rsp), %rbx
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rdx
	xorl	%esi, %esi
	movabsq	$5675921253449092805, %r8
	testq	%rdx, %rdx
	je	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	leaq	-1(%rdx), %rcx
	movslq	%esi, %rdi
	movq	%rcx, %rax
	imulq	%r8
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$3, %rdx
	subq	%rax, %rdx
	leaq	(%rdx,%rdx,2), %rax
	leaq	(%rdx,%rax,4), %rax
	addq	%rax, %rax
	subq	%rax, %rcx
	movq	%rsi, %rax
	addl	$97, %ecx
	movb	%cl, (%rbx,%rsi)
	addq	$1, %rsi
	testq	%rdx, %rdx
	jne	.L2
	movq	$0, 8(%rsp)
	leaq	15(%rsp,%rdi), %rbp
	addq	%rdi, %rbx
	subq	%rax, %rbp
	.p2align 4,,10
	.p2align 3
.L4:
	movsbl	(%rbx), %edi
	subq	$1, %rbx
	call	putchar@PLT
	cmpq	%rbx, %rbp
	jne	.L4
.L5:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$136, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L16:
	.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(void)
{
    long n;
    scanf("%ld", &n);
    char a[100];

    int i=0, b;

    while(n!=0){
        n--;
        b = n%26;
        a[i] = 'a' + b;
        n = n/26;
        i++;
    }

    for(int j=i-1; j>=0; j--){
        printf("%c", a[j]);
    }


}
40
 1
 71095103
 51
 50389265
 4
 56744729
 3
 61759127
 6

an a eynzga ay dffxhq d dtdmwo c eecuqa f
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(void)
{
    long n;
    scanf("%ld", &n);
    char a[100];

    int i=0, b;

    while(n!=0){
        n--;
        b = n%26;
        a[i] = 'a' + b;
        n = n/26;
        i++;
    }

    for(int j=i-1; j>=0; j--){
        printf("%c", a[j]);
    }


}```

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	$144, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -132(%rbp)
	jmp	.L2
.L3:
	movq	-120(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -120(%rbp)
	movq	-120(%rbp), %rcx
	movabsq	$5675921253449092805, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$3, %rax
	movq	%rcx, %rsi
	sarq	$63, %rsi
	subq	%rsi, %rax
	movq	%rax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	movl	%edx, -124(%rbp)
	movl	-124(%rbp), %eax
	addl	$97, %eax
	movl	%eax, %edx
	movl	-132(%rbp), %eax
	cltq
	movb	%dl, -112(%rbp,%rax)
	movq	-120(%rbp), %rcx
	movabsq	$5675921253449092805, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$3, %rax
	sarq	$63, %rcx
	movq	%rcx, %rdx
	subq	%rdx, %rax
	movq	%rax, -120(%rbp)
	addl	$1, -132(%rbp)
.L2:
	movq	-120(%rbp), %rax
	testq	%rax, %rax
	jne	.L3
	movl	-132(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -128(%rbp)
	jmp	.L4
.L5:
	movl	-128(%rbp), %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar@PLT
	subl	$1, -128(%rbp)
.L4:
	cmpl	$0, -128(%rbp)
	jns	.L5
	movl	$0, %eax
	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	"%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	$144, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -132(%rbp)
	jmp	.L2
.L3:
	movq	-120(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -120(%rbp)
	movq	-120(%rbp), %rcx
	movabsq	$5675921253449092805, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$3, %rax
	movq	%rcx, %rsi
	sarq	$63, %rsi
	subq	%rsi, %rax
	movq	%rax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	movl	%edx, -124(%rbp)
	movl	-124(%rbp), %eax
	addl	$97, %eax
	movl	%eax, %edx
	movl	-132(%rbp), %eax
	cltq
	movb	%dl, -112(%rbp,%rax)
	movq	-120(%rbp), %rcx
	movabsq	$5675921253449092805, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$3, %rax
	sarq	$63, %rcx
	movq	%rcx, %rdx
	subq	%rdx, %rax
	movq	%rax, -120(%rbp)
	addl	$1, -132(%rbp)
.L2:
	movq	-120(%rbp), %rax
	testq	%rax, %rax
	jne	.L3
	movl	-132(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -128(%rbp)
	jmp	.L4
.L5:
	movl	-128(%rbp), %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar@PLT
	subl	$1, -128(%rbp)
.L4:
	cmpl	$0, -128(%rbp)
	jns	.L5
	movl	$0, %eax
	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:
