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

int main() {
    unsigned long n;
    char s[1<<18];
    int t[1<<18];
    int i=0, j;
    scanf("%ld", &n);
    t[i]=(int)'\0';
    while(n){
        n--;
        t[i++]=(int)'a'+(int)(n%26);
        n/=26;
    }
    for(j=i-1;j>-1;j--) printf("%c", t[j]);
    printf("\n");
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%ld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-1310720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -1310752(%rbp)
	leaq	-1310744(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1310752(%rbp), %eax
	cltq
	movl	$0, -1310736(%rbp,%rax,4)
	jmp	.L2
.L3:
	movq	-1310744(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -1310744(%rbp)
	movq	-1310744(%rbp), %rcx
	movabsq	$5675921253449092805, %rdx
	movq	%rcx, %rax
	mulq	%rdx
	shrq	$3, %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, %ecx
	movl	-1310752(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -1310752(%rbp)
	leal	97(%rcx), %edx
	cltq
	movl	%edx, -1310736(%rbp,%rax,4)
	movq	-1310744(%rbp), %rax
	movabsq	$5675921253449092805, %rdx
	mulq	%rdx
	movq	%rdx, %rax
	shrq	$3, %rax
	movq	%rax, -1310744(%rbp)
.L2:
	movq	-1310744(%rbp), %rax
	testq	%rax, %rax
	jne	.L3
	movl	-1310752(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -1310748(%rbp)
	jmp	.L4
.L5:
	movl	-1310748(%rbp), %eax
	cltq
	movl	-1310736(%rbp,%rax,4), %eax
	movl	%eax, %edi
	call	putchar@PLT
	subl	$1, -1310748(%rbp)
.L4:
	cmpl	$0, -1310748(%rbp)
	jns	.L5
	movl	$10, %edi
	call	putchar@PLT
	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
.LFE6:
	.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:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	leaq	-1048576(%rsp), %r11
	.cfi_def_cfa 11, 1048600
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$40, %rsp
	.cfi_def_cfa_offset 1048640
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 1048600(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	leaq	16(%rsp), %rbx
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rdx
	movl	$0, 16(%rsp)
	xorl	%ecx, %ecx
	movabsq	$5675921253449092805, %r9
	testq	%rdx, %rdx
	je	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	leaq	-1(%rdx), %rsi
	movslq	%ecx, %r8
	movq	%rsi, %rax
	mulq	%r9
	shrq	$3, %rdx
	leaq	(%rdx,%rdx,2), %rax
	leaq	(%rdx,%rax,4), %rdi
	movq	%rsi, %rax
	addq	%rdi, %rdi
	subq	%rdi, %rax
	addl	$97, %eax
	movl	%eax, (%rbx,%rcx,4)
	movq	%rcx, %rax
	addq	$1, %rcx
	cmpq	$25, %rsi
	ja	.L2
	salq	$2, %r8
	movq	%rdx, 8(%rsp)
	salq	$2, %rax
	leaq	12(%rsp,%r8), %rbp
	addq	%r8, %rbx
	subq	%rax, %rbp
	.p2align 4,,10
	.p2align 3
.L4:
	movl	(%rbx), %edi
	subq	$4, %rbx
	call	putchar@PLT
	cmpq	%rbx, %rbp
	jne	.L4
.L5:
	movl	$10, %edi
	call	putchar@PLT
	movq	1048600(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$1048616, %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
.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
	.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:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	leaq	-1048576(%rsp), %r11
	.cfi_def_cfa 11, 1048600
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$40, %rsp
	.cfi_def_cfa_offset 1048640
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 1048600(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	leaq	16(%rsp), %rbx
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rdx
	movl	$0, 16(%rsp)
	xorl	%ecx, %ecx
	movabsq	$5675921253449092805, %r9
	testq	%rdx, %rdx
	je	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	leaq	-1(%rdx), %rsi
	movslq	%ecx, %r8
	movq	%rsi, %rax
	mulq	%r9
	shrq	$3, %rdx
	leaq	(%rdx,%rdx,2), %rax
	leaq	(%rdx,%rax,4), %rdi
	movq	%rsi, %rax
	addq	%rdi, %rdi
	subq	%rdi, %rax
	addl	$97, %eax
	movl	%eax, (%rbx,%rcx,4)
	movq	%rcx, %rax
	addq	$1, %rcx
	cmpq	$25, %rsi
	ja	.L2
	salq	$2, %r8
	movq	%rdx, 8(%rsp)
	salq	$2, %rax
	leaq	12(%rsp,%r8), %rbp
	addq	%r8, %rbx
	subq	%rax, %rbp
	.p2align 4,,10
	.p2align 3
.L4:
	movl	(%rbx), %edi
	subq	$4, %rbx
	call	putchar@PLT
	cmpq	%rbx, %rbp
	jne	.L4
.L5:
	movl	$10, %edi
	call	putchar@PLT
	movq	1048600(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$1048616, %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
.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:

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

int main() {
    unsigned long n;
    char s[1<<18];
    int t[1<<18];
    int i=0, j;
    scanf("%ld", &n);
    t[i]=(int)'\0';
    while(n){
        n--;
        t[i++]=(int)'a'+(int)(n%26);
        n/=26;
    }
    for(j=i-1;j>-1;j--) printf("%c", t[j]);
    printf("\n");
    return 0;
}
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>
#include <stdlib.h>
#include <math.h>
#include <string.h>

int main() {
    unsigned long n;
    char s[1<<18];
    int t[1<<18];
    int i=0, j;
    scanf("%ld", &n);
    t[i]=(int)'\0';
    while(n){
        n--;
        t[i++]=(int)'a'+(int)(n%26);
        n/=26;
    }
    for(j=i-1;j>-1;j--) printf("%c", t[j]);
    printf("\n");
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%ld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-1310720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -1310752(%rbp)
	leaq	-1310744(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1310752(%rbp), %eax
	cltq
	movl	$0, -1310736(%rbp,%rax,4)
	jmp	.L2
.L3:
	movq	-1310744(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -1310744(%rbp)
	movq	-1310744(%rbp), %rcx
	movabsq	$5675921253449092805, %rdx
	movq	%rcx, %rax
	mulq	%rdx
	shrq	$3, %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, %ecx
	movl	-1310752(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -1310752(%rbp)
	leal	97(%rcx), %edx
	cltq
	movl	%edx, -1310736(%rbp,%rax,4)
	movq	-1310744(%rbp), %rax
	movabsq	$5675921253449092805, %rdx
	mulq	%rdx
	movq	%rdx, %rax
	shrq	$3, %rax
	movq	%rax, -1310744(%rbp)
.L2:
	movq	-1310744(%rbp), %rax
	testq	%rax, %rax
	jne	.L3
	movl	-1310752(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -1310748(%rbp)
	jmp	.L4
.L5:
	movl	-1310748(%rbp), %eax
	cltq
	movl	-1310736(%rbp,%rax,4), %eax
	movl	%eax, %edi
	call	putchar@PLT
	subl	$1, -1310748(%rbp)
.L4:
	cmpl	$0, -1310748(%rbp)
	jns	.L5
	movl	$10, %edi
	call	putchar@PLT
	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
.LFE6:
	.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:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-1310720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -1310752(%rbp)
	leaq	-1310744(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1310752(%rbp), %eax
	cltq
	movl	$0, -1310736(%rbp,%rax,4)
	jmp	.L2
.L3:
	movq	-1310744(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -1310744(%rbp)
	movq	-1310744(%rbp), %rcx
	movabsq	$5675921253449092805, %rdx
	movq	%rcx, %rax
	mulq	%rdx
	shrq	$3, %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, %ecx
	movl	-1310752(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -1310752(%rbp)
	leal	97(%rcx), %edx
	cltq
	movl	%edx, -1310736(%rbp,%rax,4)
	movq	-1310744(%rbp), %rax
	movabsq	$5675921253449092805, %rdx
	mulq	%rdx
	movq	%rdx, %rax
	shrq	$3, %rax
	movq	%rax, -1310744(%rbp)
.L2:
	movq	-1310744(%rbp), %rax
	testq	%rax, %rax
	jne	.L3
	movl	-1310752(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -1310748(%rbp)
	jmp	.L4
.L5:
	movl	-1310748(%rbp), %eax
	cltq
	movl	-1310736(%rbp,%rax,4), %eax
	movl	%eax, %edi
	call	putchar@PLT
	subl	$1, -1310748(%rbp)
.L4:
	cmpl	$0, -1310748(%rbp)
	jns	.L5
	movl	$10, %edi
	call	putchar@PLT
	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
.LFE6:
	.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:
