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>

char input[100001];

int main(void)
{
    int a, b, i, j, k, length;

    scanf("%s %d", input, &k);

    length = strlen(input);

    for (i = 0; i < length; i++) {
        if (input[i] == 'a' || ('z' + 1) - input[i] > k) {
            continue;
        } else {
            k -= ('z' + 1) - input[i];
            input[i] = 'a';
        }
    }
    k %= 26;
    input[i-1] += k;
    if (input[i-1] > 'z') {
        input[i-1] = input[i-1] - 'z' + 'a';
    }

    printf("%s\n", input);

    return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s %d"
	.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
	leaq	input(%rip), %rbp
	leaq	.LC0(%rip), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rbp, %rsi
	subq	$24, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	testq	%rax, %rax
	je	.L20
	movl	4(%rsp), %r10d
	leal	-1(%rax), %ecx
	leaq	1(%rbp), %r9
	movq	%rbp, %rdx
	movq	%rcx, %rax
	addq	%rcx, %r9
	xorl	%ebx, %ebx
	movl	$123, %r11d
	movl	%r10d, %edi
	.p2align 4,,10
	.p2align 3
.L5:
	movzbl	(%rdx), %ecx
	cmpb	$97, %cl
	je	.L4
	movsbl	%cl, %r8d
	movl	%r11d, %esi
	subl	%r8d, %esi
	cmpl	%edi, %esi
	jg	.L4
	movb	$97, (%rdx)
	subl	%esi, %edi
	movl	$97, %ecx
	movl	$1, %ebx
.L4:
	addq	$1, %rdx
	cmpq	%rdx, %r9
	jne	.L5
	testb	%bl, %bl
	cmovne	%edi, %r10d
.L3:
	movslq	%r10d, %rdx
	movl	%r10d, %esi
	cltq
	imulq	$1321528399, %rdx, %rdx
	sarl	$31, %esi
	sarq	$35, %rdx
	subl	%esi, %edx
	imull	$26, %edx, %esi
	movl	%r10d, %edx
	subl	%esi, %edx
	addl	%edx, %ecx
	movl	%edx, 4(%rsp)
	cmpb	$122, %cl
	jle	.L18
	subl	$25, %ecx
.L18:
	movq	%rbp, %rdi
	movb	%cl, 0(%rbp,%rax)
	call	puts@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$24, %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
.L20:
	.cfi_restore_state
	movzbl	-1+input(%rip), %ecx
	movl	4(%rsp), %r10d
	orl	$-1, %eax
	jmp	.L3
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	input
	.bss
	.align 32
	.type	input, @object
	.size	input, 100001
input:
	.zero	100001
	.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	"%s %d"
	.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
	leaq	input(%rip), %rbp
	leaq	.LC0(%rip), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rbp, %rsi
	subq	$24, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	testq	%rax, %rax
	je	.L20
	movl	4(%rsp), %r10d
	leal	-1(%rax), %ecx
	leaq	1(%rbp), %r9
	movq	%rbp, %rdx
	movq	%rcx, %rax
	addq	%rcx, %r9
	xorl	%ebx, %ebx
	movl	$123, %r11d
	movl	%r10d, %edi
	.p2align 4,,10
	.p2align 3
.L5:
	movzbl	(%rdx), %ecx
	cmpb	$97, %cl
	je	.L4
	movsbl	%cl, %r8d
	movl	%r11d, %esi
	subl	%r8d, %esi
	cmpl	%edi, %esi
	jg	.L4
	movb	$97, (%rdx)
	subl	%esi, %edi
	movl	$97, %ecx
	movl	$1, %ebx
.L4:
	addq	$1, %rdx
	cmpq	%rdx, %r9
	jne	.L5
	testb	%bl, %bl
	cmovne	%edi, %r10d
.L3:
	movslq	%r10d, %rdx
	movl	%r10d, %esi
	cltq
	imulq	$1321528399, %rdx, %rdx
	sarl	$31, %esi
	sarq	$35, %rdx
	subl	%esi, %edx
	imull	$26, %edx, %esi
	movl	%r10d, %edx
	subl	%esi, %edx
	addl	%edx, %ecx
	movl	%edx, 4(%rsp)
	cmpb	$122, %cl
	jle	.L18
	subl	$25, %ecx
.L18:
	movq	%rbp, %rdi
	movb	%cl, 0(%rbp,%rax)
	call	puts@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$24, %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
.L20:
	.cfi_restore_state
	movzbl	-1+input(%rip), %ecx
	movl	4(%rsp), %r10d
	orl	$-1, %eax
	jmp	.L3
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	input
	.bss
	.align 32
	.type	input, @object
	.size	input, 100001
input:
	.zero	100001
	.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	"%s %d"
	.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
	leaq	input(%rip), %rbp
	leaq	.LC0(%rip), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rbp, %rsi
	subq	$24, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	testq	%rax, %rax
	je	.L20
	movl	4(%rsp), %r10d
	leal	-1(%rax), %ecx
	leaq	1(%rbp), %r9
	movq	%rbp, %rdx
	movq	%rcx, %rax
	addq	%rcx, %r9
	xorl	%ebx, %ebx
	movl	$123, %r11d
	movl	%r10d, %edi
	.p2align 4,,10
	.p2align 3
.L5:
	movzbl	(%rdx), %ecx
	cmpb	$97, %cl
	je	.L4
	movsbl	%cl, %r8d
	movl	%r11d, %esi
	subl	%r8d, %esi
	cmpl	%edi, %esi
	jg	.L4
	movb	$97, (%rdx)
	subl	%esi, %edi
	movl	$97, %ecx
	movl	$1, %ebx
.L4:
	addq	$1, %rdx
	cmpq	%rdx, %r9
	jne	.L5
	testb	%bl, %bl
	cmovne	%edi, %r10d
.L3:
	movslq	%r10d, %rdx
	movl	%r10d, %esi
	cltq
	imulq	$1321528399, %rdx, %rdx
	sarl	$31, %esi
	sarq	$35, %rdx
	subl	%esi, %edx
	imull	$26, %edx, %esi
	movl	%r10d, %edx
	subl	%esi, %edx
	addl	%edx, %ecx
	movl	%edx, 4(%rsp)
	cmpb	$122, %cl
	jle	.L18
	subl	$25, %ecx
.L18:
	movq	%rbp, %rdi
	movb	%cl, 0(%rbp,%rax)
	call	puts@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$24, %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
.L20:
	.cfi_restore_state
	movzbl	-1+input(%rip), %ecx
	movl	4(%rsp), %r10d
	orl	$-1, %eax
	jmp	.L3
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	input
	.bss
	.align 32
	.type	input, @object
	.size	input, 100001
input:
	.zero	100001
	.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>

char input[100001];

int main(void)
{
    int a, b, i, j, k, length;

    scanf("%s %d", input, &k);

    length = strlen(input);

    for (i = 0; i < length; i++) {
        if (input[i] == 'a' || ('z' + 1) - input[i] > k) {
            continue;
        } else {
            k -= ('z' + 1) - input[i];
            input[i] = 'a';
        }
    }
    k %= 26;
    input[i-1] += k;
    if (input[i-1] > 'z') {
        input[i-1] = input[i-1] - 'z' + 'a';
    }

    printf("%s\n", input);

    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>

char input[100001];

int main(void)
{
    int a, b, i, j, k, length;

    scanf("%s %d", input, &k);

    length = strlen(input);

    for (i = 0; i < length; i++) {
        if (input[i] == 'a' || ('z' + 1) - input[i] > k) {
            continue;
        } else {
            k -= ('z' + 1) - input[i];
            input[i] = 'a';
        }
    }
    k %= 26;
    input[i-1] += k;
    if (input[i-1] > 'z') {
        input[i-1] = input[i-1] - 'z' + 'a';
    }

    printf("%s\n", input);

    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:

codefestival
101
 xyz
1
 zyx
1
 cdoeffstival
101
 zyx
2
 cdoeffstival
111
 zyx
3
 lavitsffeodc
111
 xyz
2
 caoeffstivdl
111

aaaafeaaiaal
 xya
 ayx
 aaaaffaaiaal
 ayy
 aaaaafativam
 aax
 aaaaaaaaeadg
 xaz
 aaaaaaativdo

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>

char input[100001];

int main(void)
{
    int a, b, i, j, k, length;

    scanf("%s %d", input, &k);

    length = strlen(input);

    for (i = 0; i < length; i++) {
        if (input[i] == 'a' || ('z' + 1) - input[i] > k) {
            continue;
        } else {
            k -= ('z' + 1) - input[i];
            input[i] = 'a';
        }
    }
    k %= 26;
    input[i-1] += k;
    if (input[i-1] > 'z') {
        input[i-1] = input[i-1] - 'z' + 'a';
    }

    printf("%s\n", input);

    return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s %d"
	.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
	leaq	input(%rip), %rbp
	leaq	.LC0(%rip), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rbp, %rsi
	subq	$24, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	testq	%rax, %rax
	je	.L20
	movl	4(%rsp), %r10d
	leal	-1(%rax), %ecx
	leaq	1(%rbp), %r9
	movq	%rbp, %rdx
	movq	%rcx, %rax
	addq	%rcx, %r9
	xorl	%ebx, %ebx
	movl	$123, %r11d
	movl	%r10d, %edi
	.p2align 4,,10
	.p2align 3
.L5:
	movzbl	(%rdx), %ecx
	cmpb	$97, %cl
	je	.L4
	movsbl	%cl, %r8d
	movl	%r11d, %esi
	subl	%r8d, %esi
	cmpl	%edi, %esi
	jg	.L4
	movb	$97, (%rdx)
	subl	%esi, %edi
	movl	$97, %ecx
	movl	$1, %ebx
.L4:
	addq	$1, %rdx
	cmpq	%rdx, %r9
	jne	.L5
	testb	%bl, %bl
	cmovne	%edi, %r10d
.L3:
	movslq	%r10d, %rdx
	movl	%r10d, %esi
	cltq
	imulq	$1321528399, %rdx, %rdx
	sarl	$31, %esi
	sarq	$35, %rdx
	subl	%esi, %edx
	imull	$26, %edx, %esi
	movl	%r10d, %edx
	subl	%esi, %edx
	addl	%edx, %ecx
	movl	%edx, 4(%rsp)
	cmpb	$122, %cl
	jle	.L18
	subl	$25, %ecx
.L18:
	movq	%rbp, %rdi
	movb	%cl, 0(%rbp,%rax)
	call	puts@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$24, %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
.L20:
	.cfi_restore_state
	movzbl	-1+input(%rip), %ecx
	movl	4(%rsp), %r10d
	orl	$-1, %eax
	jmp	.L3
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	input
	.bss
	.align 32
	.type	input, @object
	.size	input, 100001
input:
	.zero	100001
	.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	"%s %d"
	.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
	leaq	input(%rip), %rbp
	leaq	.LC0(%rip), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rbp, %rsi
	subq	$24, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	testq	%rax, %rax
	je	.L20
	movl	4(%rsp), %r10d
	leal	-1(%rax), %ecx
	leaq	1(%rbp), %r9
	movq	%rbp, %rdx
	movq	%rcx, %rax
	addq	%rcx, %r9
	xorl	%ebx, %ebx
	movl	$123, %r11d
	movl	%r10d, %edi
	.p2align 4,,10
	.p2align 3
.L5:
	movzbl	(%rdx), %ecx
	cmpb	$97, %cl
	je	.L4
	movsbl	%cl, %r8d
	movl	%r11d, %esi
	subl	%r8d, %esi
	cmpl	%edi, %esi
	jg	.L4
	movb	$97, (%rdx)
	subl	%esi, %edi
	movl	$97, %ecx
	movl	$1, %ebx
.L4:
	addq	$1, %rdx
	cmpq	%rdx, %r9
	jne	.L5
	testb	%bl, %bl
	cmovne	%edi, %r10d
.L3:
	movslq	%r10d, %rdx
	movl	%r10d, %esi
	cltq
	imulq	$1321528399, %rdx, %rdx
	sarl	$31, %esi
	sarq	$35, %rdx
	subl	%esi, %edx
	imull	$26, %edx, %esi
	movl	%r10d, %edx
	subl	%esi, %edx
	addl	%edx, %ecx
	movl	%edx, 4(%rsp)
	cmpb	$122, %cl
	jle	.L18
	subl	$25, %ecx
.L18:
	movq	%rbp, %rdi
	movb	%cl, 0(%rbp,%rax)
	call	puts@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$24, %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
.L20:
	.cfi_restore_state
	movzbl	-1+input(%rip), %ecx
	movl	4(%rsp), %r10d
	orl	$-1, %eax
	jmp	.L3
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	input
	.bss
	.align 32
	.type	input, @object
	.size	input, 100001
input:
	.zero	100001
	.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:
```