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

int main()
{
	char str[5005];
	int k;
	int len;
	char dict[25005][6] = {};
	int cnt;
	int ans_indx;

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

	len = strlen(str);

	cnt = 0;
	for (int i = 0; i < k; i++) {
		for (int j = 0; j + i < len; j++) {

			for (int ii = j; ii <= j + i; ii++) {
				dict[cnt][ii - j] = str[ii];
			}
			cnt++;

		}
	}

	qsort(*dict, cnt, 6, (int (*)(const void *, const void *))strcmp);

	ans_indx = -1;
	int ccnt = 0;
	while (ccnt < k) {
		if (strcmp(dict[ans_indx], dict[ans_indx + 1])) { 
			ccnt++;
		}

		ans_indx++;
	}

	printf("%s\n", dict[ans_indx]);

	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d"
	.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	-151552(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3536, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-155056(%rbp), %rax
	movl	$150030, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-5024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-155088(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-5024(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -155060(%rbp)
	movl	$0, -155084(%rbp)
	movl	$0, -155076(%rbp)
	jmp	.L2
.L7:
	movl	$0, -155072(%rbp)
	jmp	.L3
.L6:
	movl	-155072(%rbp), %eax
	movl	%eax, -155068(%rbp)
	jmp	.L4
.L5:
	movl	-155068(%rbp), %eax
	subl	-155072(%rbp), %eax
	movl	%eax, %ecx
	movl	-155068(%rbp), %eax
	cltq
	movzbl	-5024(%rbp,%rax), %edx
	movslq	%ecx, %rsi
	movl	-155084(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rbp, %rax
	addq	%rsi, %rax
	subq	$155056, %rax
	movb	%dl, (%rax)
	addl	$1, -155068(%rbp)
.L4:
	movl	-155072(%rbp), %edx
	movl	-155076(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -155068(%rbp)
	jle	.L5
	addl	$1, -155084(%rbp)
	addl	$1, -155072(%rbp)
.L3:
	movl	-155072(%rbp), %edx
	movl	-155076(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -155060(%rbp)
	jg	.L6
	addl	$1, -155076(%rbp)
.L2:
	movl	-155088(%rbp), %eax
	cmpl	%eax, -155076(%rbp)
	jl	.L7
	movl	-155084(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-155056(%rbp), %rax
	movq	strcmp@GOTPCREL(%rip), %rdx
	movq	%rdx, %rcx
	movl	$6, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$-1, -155080(%rbp)
	movl	$0, -155064(%rbp)
	jmp	.L8
.L10:
	movl	-155080(%rbp), %eax
	addl	$1, %eax
	leaq	-155056(%rbp), %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	leaq	(%rcx,%rax), %rdx
	leaq	-155056(%rbp), %rsi
	movl	-155080(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L9
	addl	$1, -155064(%rbp)
.L9:
	addl	$1, -155080(%rbp)
.L8:
	movl	-155088(%rbp), %eax
	cmpl	%eax, -155064(%rbp)
	jl	.L10
	leaq	-155056(%rbp), %rcx
	movl	-155080(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	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	"%s"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.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
	leaq	-151552(%rsp), %r11
	.cfi_def_cfa 11, 151608
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3544, %rsp
	.cfi_def_cfa_offset 155152
	movl	$150030, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 155080(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %r14
	leaq	150064(%rsp), %rbx
	movq	%r14, %rdi
	call	memset@PLT
	movq	%rbx, %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	28(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	movq	%rax, %r15
	movl	%eax, %r10d
	movl	28(%rsp), %eax
	testl	%eax, %eax
	jle	.L20
	testq	%r15, %r15
	je	.L20
	cmpl	%r15d, %eax
	movl	%r15d, %edx
	movl	$1, %r9d
	cmovle	%eax, %edx
	xorl	%r12d, %r12d
	xorl	%ebp, %ebp
	movl	%edx, 12(%rsp)
	.p2align 4,,10
	.p2align 3
.L12:
	movslq	%ebp, %rax
	movl	%r9d, %r13d
	movl	%r12d, %edx
	xorl	%r8d, %r8d
	leaq	(%rax,%rax,2), %rax
	movl	%r9d, %r11d
	andl	$4, %r13d
	leaq	(%r14,%rax,2), %rax
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L36:
	testl	%r13d, %r13d
	jne	.L34
	testl	%ecx, %ecx
	je	.L11
	movzbl	(%rsi), %edi
	movb	%dil, (%rax)
	testb	$2, %cl
	jne	.L35
.L11:
	addl	$1, %edx
	addq	$1, %r8
	addq	$6, %rax
	cmpl	%edx, %r10d
	jle	.L9
.L15:
	cmpl	%r8d, %edx
	jl	.L11
	leaq	(%rbx,%r8), %rsi
	movl	%r9d, %ecx
	cmpl	$8, %r9d
	jb	.L36
	movq	(%rsi), %rcx
	leaq	8(%rax), %rdi
	addl	$1, %edx
	addq	$1, %r8
	andq	$-8, %rdi
	movq	%rcx, (%rax)
	movq	-8(%rsi,%r11), %rcx
	movq	%rcx, -8(%rax,%r11)
	movq	%rax, %rcx
	addq	$6, %rax
	subq	%rdi, %rcx
	subq	%rcx, %rsi
	addl	%r9d, %ecx
	shrl	$3, %ecx
	rep movsq
	cmpl	%edx, %r10d
	jg	.L15
.L9:
	addl	%r15d, %ebp
	addq	$1, %r9
	subl	%r12d, %ebp
	addl	$1, %r12d
	cmpl	12(%rsp), %r12d
	jl	.L12
.L2:
	movq	strcmp@GOTPCREL(%rip), %rcx
	movslq	%ebp, %rsi
	movl	$6, %edx
	movq	%r14, %rdi
	call	qsort@PLT
	movl	28(%rsp), %r12d
	testl	%r12d, %r12d
	jle	.L21
	leaq	26(%rsp), %rbx
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L18:
	movq	%rbx, %rdi
	addq	$6, %rbx
	movq	%rbx, %rsi
	movq	%rbx, %r13
	call	strcmp@PLT
	cmpl	$1, %eax
	sbbl	$-1, %ebp
	cmpl	%r12d, %ebp
	jl	.L18
.L16:
	movq	%r13, %rdi
	call	puts@PLT
	movq	155080(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L37
	addq	$155096, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %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
.L34:
	.cfi_restore_state
	movl	(%rsi), %edi
	movl	%edi, (%rax)
	movl	-4(%rsi,%rcx), %esi
	movl	%esi, -4(%rax,%rcx)
	jmp	.L11
.L35:
	movzwl	-2(%rsi,%rcx), %esi
	movw	%si, -2(%rax,%rcx)
	jmp	.L11
.L20:
	xorl	%ebp, %ebp
	jmp	.L2
.L21:
	leaq	26(%rsp), %r13
	jmp	.L16
.L37:
	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	"%s"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.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
	leaq	-151552(%rsp), %r11
	.cfi_def_cfa 11, 151608
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3544, %rsp
	.cfi_def_cfa_offset 155152
	movl	$150030, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 155080(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %r14
	leaq	150064(%rsp), %rbx
	movq	%r14, %rdi
	call	memset@PLT
	movq	%rbx, %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	28(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	movq	%rax, %r15
	movl	%eax, %r10d
	movl	28(%rsp), %eax
	testl	%eax, %eax
	jle	.L20
	testq	%r15, %r15
	je	.L20
	cmpl	%r15d, %eax
	movl	%r15d, %edx
	movl	$1, %r9d
	cmovle	%eax, %edx
	xorl	%r12d, %r12d
	xorl	%ebp, %ebp
	movl	%edx, 12(%rsp)
	.p2align 4,,10
	.p2align 3
.L12:
	movslq	%ebp, %rax
	movl	%r9d, %r13d
	movl	%r12d, %edx
	xorl	%r8d, %r8d
	leaq	(%rax,%rax,2), %rax
	movl	%r9d, %r11d
	andl	$4, %r13d
	leaq	(%r14,%rax,2), %rax
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L36:
	testl	%r13d, %r13d
	jne	.L34
	testl	%ecx, %ecx
	je	.L11
	movzbl	(%rsi), %edi
	movb	%dil, (%rax)
	testb	$2, %cl
	jne	.L35
.L11:
	addl	$1, %edx
	addq	$1, %r8
	addq	$6, %rax
	cmpl	%edx, %r10d
	jle	.L9
.L15:
	cmpl	%r8d, %edx
	jl	.L11
	leaq	(%rbx,%r8), %rsi
	movl	%r9d, %ecx
	cmpl	$8, %r9d
	jb	.L36
	movq	(%rsi), %rcx
	leaq	8(%rax), %rdi
	addl	$1, %edx
	addq	$1, %r8
	andq	$-8, %rdi
	movq	%rcx, (%rax)
	movq	-8(%rsi,%r11), %rcx
	movq	%rcx, -8(%rax,%r11)
	movq	%rax, %rcx
	addq	$6, %rax
	subq	%rdi, %rcx
	subq	%rcx, %rsi
	addl	%r9d, %ecx
	shrl	$3, %ecx
	rep movsq
	cmpl	%edx, %r10d
	jg	.L15
.L9:
	addl	%r15d, %ebp
	addq	$1, %r9
	subl	%r12d, %ebp
	addl	$1, %r12d
	cmpl	12(%rsp), %r12d
	jl	.L12
.L2:
	movq	strcmp@GOTPCREL(%rip), %rcx
	movslq	%ebp, %rsi
	movl	$6, %edx
	movq	%r14, %rdi
	call	qsort@PLT
	movl	28(%rsp), %r12d
	testl	%r12d, %r12d
	jle	.L21
	leaq	26(%rsp), %rbx
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L18:
	movq	%rbx, %rdi
	addq	$6, %rbx
	movq	%rbx, %rsi
	movq	%rbx, %r13
	call	strcmp@PLT
	cmpl	$1, %eax
	sbbl	$-1, %ebp
	cmpl	%r12d, %ebp
	jl	.L18
.L16:
	movq	%r13, %rdi
	call	puts@PLT
	movq	155080(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L37
	addq	$155096, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %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
.L34:
	.cfi_restore_state
	movl	(%rsi), %edi
	movl	%edi, (%rax)
	movl	-4(%rsi,%rcx), %esi
	movl	%esi, -4(%rax,%rcx)
	jmp	.L11
.L35:
	movzwl	-2(%rsi,%rcx), %esi
	movw	%si, -2(%rax,%rcx)
	jmp	.L11
.L20:
	xorl	%ebp, %ebp
	jmp	.L2
.L21:
	leaq	26(%rsp), %r13
	jmp	.L16
.L37:
	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 <string.h>
#include <stdlib.h>

int main()
{
	char str[5005];
	int k;
	int len;
	char dict[25005][6] = {};
	int cnt;
	int ans_indx;

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

	len = strlen(str);

	cnt = 0;
	for (int i = 0; i < k; i++) {
		for (int j = 0; j + i < len; j++) {

			for (int ii = j; ii <= j + i; ii++) {
				dict[cnt][ii - j] = str[ii];
			}
			cnt++;

		}
	}

	qsort(*dict, cnt, 6, (int (*)(const void *, const void *))strcmp);

	ans_indx = -1;
	int ccnt = 0;
	while (ccnt < k) {
		if (strcmp(dict[ans_indx], dict[ans_indx + 1])) { 
			ccnt++;
		}

		ans_indx++;
	}

	printf("%s\n", dict[ans_indx]);

	return 0;
}

aba
4

b

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

int main()
{
	char str[5005];
	int k;
	int len;
	char dict[25005][6] = {};
	int cnt;
	int ans_indx;

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

	len = strlen(str);

	cnt = 0;
	for (int i = 0; i < k; i++) {
		for (int j = 0; j + i < len; j++) {

			for (int ii = j; ii <= j + i; ii++) {
				dict[cnt][ii - j] = str[ii];
			}
			cnt++;

		}
	}

	qsort(*dict, cnt, 6, (int (*)(const void *, const void *))strcmp);

	ans_indx = -1;
	int ccnt = 0;
	while (ccnt < k) {
		if (strcmp(dict[ans_indx], dict[ans_indx + 1])) { 
			ccnt++;
		}

		ans_indx++;
	}

	printf("%s\n", dict[ans_indx]);

	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d"
	.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	-151552(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3536, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-155056(%rbp), %rax
	movl	$150030, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-5024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-155088(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-5024(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -155060(%rbp)
	movl	$0, -155084(%rbp)
	movl	$0, -155076(%rbp)
	jmp	.L2
.L7:
	movl	$0, -155072(%rbp)
	jmp	.L3
.L6:
	movl	-155072(%rbp), %eax
	movl	%eax, -155068(%rbp)
	jmp	.L4
.L5:
	movl	-155068(%rbp), %eax
	subl	-155072(%rbp), %eax
	movl	%eax, %ecx
	movl	-155068(%rbp), %eax
	cltq
	movzbl	-5024(%rbp,%rax), %edx
	movslq	%ecx, %rsi
	movl	-155084(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rbp, %rax
	addq	%rsi, %rax
	subq	$155056, %rax
	movb	%dl, (%rax)
	addl	$1, -155068(%rbp)
.L4:
	movl	-155072(%rbp), %edx
	movl	-155076(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -155068(%rbp)
	jle	.L5
	addl	$1, -155084(%rbp)
	addl	$1, -155072(%rbp)
.L3:
	movl	-155072(%rbp), %edx
	movl	-155076(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -155060(%rbp)
	jg	.L6
	addl	$1, -155076(%rbp)
.L2:
	movl	-155088(%rbp), %eax
	cmpl	%eax, -155076(%rbp)
	jl	.L7
	movl	-155084(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-155056(%rbp), %rax
	movq	strcmp@GOTPCREL(%rip), %rdx
	movq	%rdx, %rcx
	movl	$6, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$-1, -155080(%rbp)
	movl	$0, -155064(%rbp)
	jmp	.L8
.L10:
	movl	-155080(%rbp), %eax
	addl	$1, %eax
	leaq	-155056(%rbp), %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	leaq	(%rcx,%rax), %rdx
	leaq	-155056(%rbp), %rsi
	movl	-155080(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L9
	addl	$1, -155064(%rbp)
.L9:
	addl	$1, -155080(%rbp)
.L8:
	movl	-155088(%rbp), %eax
	cmpl	%eax, -155064(%rbp)
	jl	.L10
	leaq	-155056(%rbp), %rcx
	movl	-155080(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	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	"%s"
.LC1:
	.string	"%d"
	.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	-151552(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3536, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-155056(%rbp), %rax
	movl	$150030, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-5024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-155088(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-5024(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -155060(%rbp)
	movl	$0, -155084(%rbp)
	movl	$0, -155076(%rbp)
	jmp	.L2
.L7:
	movl	$0, -155072(%rbp)
	jmp	.L3
.L6:
	movl	-155072(%rbp), %eax
	movl	%eax, -155068(%rbp)
	jmp	.L4
.L5:
	movl	-155068(%rbp), %eax
	subl	-155072(%rbp), %eax
	movl	%eax, %ecx
	movl	-155068(%rbp), %eax
	cltq
	movzbl	-5024(%rbp,%rax), %edx
	movslq	%ecx, %rsi
	movl	-155084(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rbp, %rax
	addq	%rsi, %rax
	subq	$155056, %rax
	movb	%dl, (%rax)
	addl	$1, -155068(%rbp)
.L4:
	movl	-155072(%rbp), %edx
	movl	-155076(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -155068(%rbp)
	jle	.L5
	addl	$1, -155084(%rbp)
	addl	$1, -155072(%rbp)
.L3:
	movl	-155072(%rbp), %edx
	movl	-155076(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -155060(%rbp)
	jg	.L6
	addl	$1, -155076(%rbp)
.L2:
	movl	-155088(%rbp), %eax
	cmpl	%eax, -155076(%rbp)
	jl	.L7
	movl	-155084(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-155056(%rbp), %rax
	movq	strcmp@GOTPCREL(%rip), %rdx
	movq	%rdx, %rcx
	movl	$6, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$-1, -155080(%rbp)
	movl	$0, -155064(%rbp)
	jmp	.L8
.L10:
	movl	-155080(%rbp), %eax
	addl	$1, %eax
	leaq	-155056(%rbp), %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	leaq	(%rcx,%rax), %rdx
	leaq	-155056(%rbp), %rsi
	movl	-155080(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L9
	addl	$1, -155064(%rbp)
.L9:
	addl	$1, -155080(%rbp)
.L8:
	movl	-155088(%rbp), %eax
	cmpl	%eax, -155064(%rbp)
	jl	.L10
	leaq	-155056(%rbp), %rcx
	movl	-155080(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	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:
