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>

typedef struct {
	char word[50];
	char page[1001];
} BOOK;

void bubble_sort(BOOK *ptr, int n)
{
	int i, j, k;
	char temp[50];
	for (i = 0; i < n - 1; i++){
		for (j = 0; j < n - i - 1; j++){
			if (strcmp(ptr[j].word, ptr[j + 1].word) > 0){
				strcpy(temp, ptr[j].word);
				strcpy(ptr[j].word, ptr[j + 1].word);
				strcpy(ptr[j + 1].word, temp);
				
				for (k = 0; k < 1001; k++){
					ptr[j].page[k] ^= ptr[j + 1].page[k];
					ptr[j + 1].page[k] ^= ptr[j].page[k];
					ptr[j].page[k] ^= ptr[j + 1].page[k];
				}
			}
		}
	}
}

int main(void)
{
	BOOK index[200];
	int i, j, s;
	int flag, temp;
	char str[31];
	
	i = 0;
	while (scanf("%s%d", str, &temp) != EOF){
		getchar();
		flag = 1;
		for (j = 0; j < i; j++){
			if (strcmp(str, index[j].word) == 0){
				flag = 0;
				break;
			}
		}
		
		if (flag == 1){
			memset(index[i].page, 0, sizeof(index[i].page));
			strcpy(index[i].word, str);
			index[i].page[temp] = 1;
			i++;
		}
		else {
			index[j].page[temp] = 1;
		}
	}
	s = i;
	
	bubble_sort(index, s);
	
	for (i = 0; i < s; i++){
		printf("%s\n", index[i].word);
		flag = 0;
		for (j = 1; j < 1001; j++){
			if (index[i].page[j] == 1){
				if (flag == 1){
					printf(" ");
				}
				printf("%d", j);
				flag = 1;
			}
		}
		printf("\n");
	}
	
	return (0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	bubble_sort
	.type	bubble_sort, @function
bubble_sort:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$96, %rsp
	movq	%rdi, -88(%rbp)
	movl	%esi, -92(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -76(%rbp)
	jmp	.L2
.L8:
	movl	$0, -72(%rbp)
	jmp	.L3
.L7:
	movl	-72(%rbp), %eax
	cltq
	addq	$1, %rax
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	movl	-72(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rcx
	movq	-88(%rbp), %rax
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jle	.L4
	movl	-72(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	leaq	-64(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcpy@PLT
	movl	-72(%rbp), %eax
	cltq
	addq	$1, %rax
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	movl	-72(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rcx
	movq	-88(%rbp), %rax
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcpy@PLT
	movl	-72(%rbp), %eax
	cltq
	addq	$1, %rax
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	leaq	-64(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	$0, -68(%rbp)
	jmp	.L5
.L6:
	movl	-72(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rax, %rdx
	movl	-68(%rbp), %eax
	cltq
	movzbl	50(%rdx,%rax), %esi
	movl	-72(%rbp), %eax
	cltq
	addq	$1, %rax
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rax, %rdx
	movl	-68(%rbp), %eax
	cltq
	movzbl	50(%rdx,%rax), %ecx
	movl	-72(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rax, %rdx
	xorl	%esi, %ecx
	movl	-68(%rbp), %eax
	cltq
	movb	%cl, 50(%rdx,%rax)
	movl	-72(%rbp), %eax
	cltq
	addq	$1, %rax
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rax, %rdx
	movl	-68(%rbp), %eax
	cltq
	movzbl	50(%rdx,%rax), %esi
	movl	-72(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rax, %rdx
	movl	-68(%rbp), %eax
	cltq
	movzbl	50(%rdx,%rax), %ecx
	movl	-72(%rbp), %eax
	cltq
	addq	$1, %rax
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rax, %rdx
	xorl	%esi, %ecx
	movl	-68(%rbp), %eax
	cltq
	movb	%cl, 50(%rdx,%rax)
	movl	-72(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rax, %rdx
	movl	-68(%rbp), %eax
	cltq
	movzbl	50(%rdx,%rax), %esi
	movl	-72(%rbp), %eax
	cltq
	addq	$1, %rax
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rax, %rdx
	movl	-68(%rbp), %eax
	cltq
	movzbl	50(%rdx,%rax), %ecx
	movl	-72(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rax, %rdx
	xorl	%esi, %ecx
	movl	-68(%rbp), %eax
	cltq
	movb	%cl, 50(%rdx,%rax)
	addl	$1, -68(%rbp)
.L5:
	cmpl	$1000, -68(%rbp)
	jle	.L6
.L4:
	addl	$1, -72(%rbp)
.L3:
	movl	-92(%rbp), %eax
	subl	-76(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -72(%rbp)
	jl	.L7
	addl	$1, -76(%rbp)
.L2:
	movl	-92(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -76(%rbp)
	jl	.L8
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	bubble_sort, .-bubble_sort
	.section	.rodata
.LC0:
	.string	"%s%d"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-208896(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1392, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -210272(%rbp)
	jmp	.L11
.L17:
	call	getchar@PLT
	movl	$1, -210264(%rbp)
	movl	$0, -210268(%rbp)
	jmp	.L12
.L15:
	leaq	-210256(%rbp), %rdx
	movl	-210268(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rax
	addq	%rax, %rdx
	leaq	-48(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L13
	movl	$0, -210264(%rbp)
	jmp	.L14
.L13:
	addl	$1, -210268(%rbp)
.L12:
	movl	-210268(%rbp), %eax
	cmpl	-210272(%rbp), %eax
	jl	.L15
.L14:
	cmpl	$1, -210264(%rbp)
	jne	.L16
	leaq	-210256(%rbp), %rdx
	movl	-210272(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rax
	addq	$48, %rax
	addq	%rdx, %rax
	addq	$2, %rax
	movl	$1001, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-210256(%rbp), %rdx
	movl	-210272(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rax
	addq	%rax, %rdx
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	-210276(%rbp), %eax
	movslq	%eax, %rdx
	movl	-210272(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rax
	addq	%rbp, %rax
	addq	%rdx, %rax
	subq	$210206, %rax
	movb	$1, (%rax)
	addl	$1, -210272(%rbp)
	jmp	.L11
.L16:
	movl	-210276(%rbp), %eax
	movslq	%eax, %rdx
	movl	-210268(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rax
	addq	%rbp, %rax
	addq	%rdx, %rax
	subq	$210206, %rax
	movb	$1, (%rax)
.L11:
	leaq	-210276(%rbp), %rdx
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L17
	movl	-210272(%rbp), %eax
	movl	%eax, -210260(%rbp)
	movl	-210260(%rbp), %edx
	leaq	-210256(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	bubble_sort
	movl	$0, -210272(%rbp)
	jmp	.L18
.L23:
	leaq	-210256(%rbp), %rdx
	movl	-210272(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, -210264(%rbp)
	movl	$1, -210268(%rbp)
	jmp	.L19
.L22:
	movl	-210268(%rbp), %eax
	movslq	%eax, %rdx
	movl	-210272(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rax
	addq	%rbp, %rax
	addq	%rdx, %rax
	subq	$210206, %rax
	movzbl	(%rax), %eax
	cmpb	$1, %al
	jne	.L20
	cmpl	$1, -210264(%rbp)
	jne	.L21
	movl	$32, %edi
	call	putchar@PLT
.L21:
	movl	-210268(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$1, -210264(%rbp)
.L20:
	addl	$1, -210268(%rbp)
.L19:
	cmpl	$1000, -210268(%rbp)
	jle	.L22
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -210272(%rbp)
.L18:
	movl	-210272(%rbp), %eax
	cmpl	-210260(%rbp), %eax
	jl	.L23
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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
	.p2align 4
	.globl	bubble_sort
	.type	bubble_sort, @function
bubble_sort:
.LFB35:
	.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
	leal	-1(%rsi), %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$104, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rdx
	movq	%rdx, 88(%rsp)
	xorl	%edx, %edx
	testl	%r12d, %r12d
	jle	.L1
	movq	%rdi, %rax
	leaq	50(%rdi), %rsi
	leaq	32(%rsp), %r13
	addq	$1101, %rax
	movq	%rsi, 16(%rsp)
	movq	%rax, 24(%rsp)
.L3:
	leal	-1(%r12), %ebp
	movq	16(%rsp), %r15
	movl	%ebp, 12(%rsp)
	imulq	$1051, %rbp, %rbp
	addq	24(%rsp), %rbp
	jmp	.L6
.L4:
	movq	%r14, %r15
	cmpq	%rbp, %r14
	je	.L16
	.p2align 4,,10
	.p2align 3
.L6:
	leaq	1001(%r15), %r12
	leaq	-50(%r15), %rbx
	movq	%r12, %rsi
	movq	%rbx, %rdi
	leaq	1051(%r15), %r14
	call	strcmp@PLT
	testl	%eax, %eax
	jle	.L4
	movq	%rbx, %rsi
	movl	$50, %edx
	movq	%r13, %rdi
	call	__stpcpy_chk@PLT
	movq	%rbx, %rdi
	movl	$50, %edx
	movq	%r12, %rsi
	movq	%rax, (%rsp)
	call	__strcpy_chk@PLT
	movq	(%rsp), %rbx
	movq	%r13, %rsi
	movq	%r12, %rdi
	movl	$50, %ecx
	subq	%r13, %rbx
	leaq	1(%rbx), %rdx
	call	__memcpy_chk@PLT
	movq	%r14, %rdx
	movq	%r15, %rax
	leaq	992(%r15), %rcx
	.p2align 4,,10
	.p2align 3
.L5:
	movdqu	(%rax), %xmm0
	movdqu	(%rdx), %xmm1
	addq	$16, %rax
	addq	$16, %rdx
	pxor	%xmm1, %xmm0
	movups	%xmm0, -16(%rax)
	movdqu	-16(%rdx), %xmm2
	pxor	%xmm2, %xmm0
	movups	%xmm0, -16(%rdx)
	movdqu	-16(%rax), %xmm3
	pxor	%xmm3, %xmm0
	movups	%xmm0, -16(%rax)
	cmpq	%rcx, %rax
	jne	.L5
	movq	2043(%r15), %rax
	movq	992(%r15), %rdx
	movq	%rax, 992(%r15)
	movzbl	2051(%r15), %eax
	movq	%rdx, 2043(%r15)
	movzbl	1000(%r15), %edx
	movb	%al, 1000(%r15)
	movb	%dl, 2051(%r15)
	movq	%r14, %r15
	cmpq	%rbp, %r14
	jne	.L6
.L16:
	movl	12(%rsp), %r12d
	testl	%r12d, %r12d
	jne	.L3
.L1:
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$104, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L17:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	bubble_sort, .-bubble_sort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s%d"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB36:
	.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	-208896(%rsp), %r11
	.cfi_def_cfa 11, 208952
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1400, %rsp
	.cfi_def_cfa_offset 210352
	xorl	%r12d, %r12d
	leaq	.LC0(%rip), %rbp
	movq	%fs:40, %rax
	movq	%rax, 210280(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rax
	leaq	210240(%rsp), %rbx
	movq	%rax, 8(%rsp)
	leaq	28(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L19:
	xorl	%eax, %eax
	movq	%r14, %rdx
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L45
	movq	stdin(%rip), %rdi
	call	getc@PLT
	testl	%r12d, %r12d
	je	.L20
	movq	8(%rsp), %r13
	xorl	%r15d, %r15d
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L46:
	addl	$1, %r15d
	addq	$1051, %r13
	cmpl	%r15d, %r12d
	je	.L20
.L22:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L46
	movslq	%r15d, %rax
	movslq	28(%rsp), %rcx
	imulq	$1051, %rax, %rax
	addq	$210288, %rax
	addq	%rsp, %rax
	movb	$1, -210206(%rcx,%rax)
	jmp	.L19
.L20:
	movslq	%r12d, %r8
	movq	8(%rsp), %rsi
	movl	$50, %edx
	addl	$1, %r12d
	imulq	$1051, %r8, %r15
	leaq	50(%rsi,%r15), %rax
	leaq	8(%rax), %rdi
	movq	$0, (%rax)
	movq	$0, 993(%rax)
	andq	$-8, %rdi
	subq	%rdi, %rax
	leal	1001(%rax), %ecx
	xorl	%eax, %eax
	shrl	$3, %ecx
	rep stosq
	leaq	(%rsi,%r15), %rdi
	movq	%rbx, %rsi
	call	__strcpy_chk@PLT
	movslq	28(%rsp), %rax
	leaq	210288(%r15), %rcx
	leaq	(%rsp,%rcx), %r8
	movb	$1, -210206(%rax,%r8)
	jmp	.L19
.L45:
	movq	8(%rsp), %r13
	movl	%r12d, %esi
	xorl	%r14d, %r14d
	leaq	.LC1(%rip), %rbp
	movq	%r13, %rdi
	call	bubble_sort
	testl	%r12d, %r12d
	je	.L29
.L28:
	movslq	%r14d, %r15
	movq	%r13, %rdi
	movl	$1, %ebx
	call	puts@PLT
	imulq	$1051, %r15, %r15
	xorl	%edx, %edx
	leaq	210288(%r15), %rax
	leaq	(%rsp,%rax), %r15
	jmp	.L31
	.p2align 4,,10
	.p2align 3
.L25:
	addl	$1, %ebx
	cmpl	$1001, %ebx
	je	.L32
.L31:
	movslq	%ebx, %rax
	cmpb	$1, -210206(%rax,%r15)
	jne	.L25
	cmpl	$1, %edx
	je	.L30
.L26:
	movl	%ebx, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addl	$1, %ebx
	cmpl	$1001, %ebx
	je	.L32
	movslq	%ebx, %rax
	cmpb	$1, -210206(%r15,%rax)
	je	.L30
	addl	$1, %ebx
	movl	$1, %edx
	cmpl	$1001, %ebx
	jne	.L31
.L32:
	movl	$10, %edi
	addl	$1, %r14d
	addq	$1051, %r13
	call	putchar@PLT
	cmpl	%r14d, %r12d
	jne	.L28
.L29:
	movq	210280(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L47
	addq	$210296, %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
	.p2align 4,,10
	.p2align 3
.L30:
	.cfi_restore_state
	movl	$32, %edi
	call	putchar@PLT
	jmp	.L26
.L47:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE36:
	.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
	.p2align 4
	.globl	bubble_sort
	.type	bubble_sort, @function
bubble_sort:
.LFB35:
	.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
	leal	-1(%rsi), %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$104, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rdx
	movq	%rdx, 88(%rsp)
	xorl	%edx, %edx
	testl	%r12d, %r12d
	jle	.L1
	movq	%rdi, %rax
	leaq	50(%rdi), %rsi
	leaq	32(%rsp), %r13
	addq	$1101, %rax
	movq	%rsi, 16(%rsp)
	movq	%rax, 24(%rsp)
.L3:
	leal	-1(%r12), %ebp
	movq	16(%rsp), %r15
	movl	%ebp, 12(%rsp)
	imulq	$1051, %rbp, %rbp
	addq	24(%rsp), %rbp
	jmp	.L6
.L4:
	movq	%r14, %r15
	cmpq	%rbp, %r14
	je	.L16
	.p2align 4,,10
	.p2align 3
.L6:
	leaq	1001(%r15), %r12
	leaq	-50(%r15), %rbx
	movq	%r12, %rsi
	movq	%rbx, %rdi
	leaq	1051(%r15), %r14
	call	strcmp@PLT
	testl	%eax, %eax
	jle	.L4
	movq	%rbx, %rsi
	movl	$50, %edx
	movq	%r13, %rdi
	call	__stpcpy_chk@PLT
	movq	%rbx, %rdi
	movl	$50, %edx
	movq	%r12, %rsi
	movq	%rax, (%rsp)
	call	__strcpy_chk@PLT
	movq	(%rsp), %rbx
	movq	%r13, %rsi
	movq	%r12, %rdi
	movl	$50, %ecx
	subq	%r13, %rbx
	leaq	1(%rbx), %rdx
	call	__memcpy_chk@PLT
	movq	%r14, %rdx
	movq	%r15, %rax
	leaq	992(%r15), %rcx
	.p2align 4,,10
	.p2align 3
.L5:
	movdqu	(%rax), %xmm0
	movdqu	(%rdx), %xmm1
	addq	$16, %rax
	addq	$16, %rdx
	pxor	%xmm1, %xmm0
	movups	%xmm0, -16(%rax)
	movdqu	-16(%rdx), %xmm2
	pxor	%xmm2, %xmm0
	movups	%xmm0, -16(%rdx)
	movdqu	-16(%rax), %xmm3
	pxor	%xmm3, %xmm0
	movups	%xmm0, -16(%rax)
	cmpq	%rcx, %rax
	jne	.L5
	movq	2043(%r15), %rax
	movq	992(%r15), %rdx
	movq	%rax, 992(%r15)
	movzbl	2051(%r15), %eax
	movq	%rdx, 2043(%r15)
	movzbl	1000(%r15), %edx
	movb	%al, 1000(%r15)
	movb	%dl, 2051(%r15)
	movq	%r14, %r15
	cmpq	%rbp, %r14
	jne	.L6
.L16:
	movl	12(%rsp), %r12d
	testl	%r12d, %r12d
	jne	.L3
.L1:
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$104, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L17:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	bubble_sort, .-bubble_sort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s%d"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB36:
	.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	-208896(%rsp), %r11
	.cfi_def_cfa 11, 208952
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1400, %rsp
	.cfi_def_cfa_offset 210352
	xorl	%r12d, %r12d
	leaq	.LC0(%rip), %rbp
	movq	%fs:40, %rax
	movq	%rax, 210280(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rax
	leaq	210240(%rsp), %rbx
	movq	%rax, 8(%rsp)
	leaq	28(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L19:
	xorl	%eax, %eax
	movq	%r14, %rdx
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L45
	movq	stdin(%rip), %rdi
	call	getc@PLT
	testl	%r12d, %r12d
	je	.L20
	movq	8(%rsp), %r13
	xorl	%r15d, %r15d
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L46:
	addl	$1, %r15d
	addq	$1051, %r13
	cmpl	%r15d, %r12d
	je	.L20
.L22:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L46
	movslq	%r15d, %rax
	movslq	28(%rsp), %rcx
	imulq	$1051, %rax, %rax
	addq	$210288, %rax
	addq	%rsp, %rax
	movb	$1, -210206(%rcx,%rax)
	jmp	.L19
.L20:
	movslq	%r12d, %r8
	movq	8(%rsp), %rsi
	movl	$50, %edx
	addl	$1, %r12d
	imulq	$1051, %r8, %r15
	leaq	50(%rsi,%r15), %rax
	leaq	8(%rax), %rdi
	movq	$0, (%rax)
	movq	$0, 993(%rax)
	andq	$-8, %rdi
	subq	%rdi, %rax
	leal	1001(%rax), %ecx
	xorl	%eax, %eax
	shrl	$3, %ecx
	rep stosq
	leaq	(%rsi,%r15), %rdi
	movq	%rbx, %rsi
	call	__strcpy_chk@PLT
	movslq	28(%rsp), %rax
	leaq	210288(%r15), %rcx
	leaq	(%rsp,%rcx), %r8
	movb	$1, -210206(%rax,%r8)
	jmp	.L19
.L45:
	movq	8(%rsp), %r13
	movl	%r12d, %esi
	xorl	%r14d, %r14d
	leaq	.LC1(%rip), %rbp
	movq	%r13, %rdi
	call	bubble_sort
	testl	%r12d, %r12d
	je	.L29
.L28:
	movslq	%r14d, %r15
	movq	%r13, %rdi
	movl	$1, %ebx
	call	puts@PLT
	imulq	$1051, %r15, %r15
	xorl	%edx, %edx
	leaq	210288(%r15), %rax
	leaq	(%rsp,%rax), %r15
	jmp	.L31
	.p2align 4,,10
	.p2align 3
.L25:
	addl	$1, %ebx
	cmpl	$1001, %ebx
	je	.L32
.L31:
	movslq	%ebx, %rax
	cmpb	$1, -210206(%rax,%r15)
	jne	.L25
	cmpl	$1, %edx
	je	.L30
.L26:
	movl	%ebx, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addl	$1, %ebx
	cmpl	$1001, %ebx
	je	.L32
	movslq	%ebx, %rax
	cmpb	$1, -210206(%r15,%rax)
	je	.L30
	addl	$1, %ebx
	movl	$1, %edx
	cmpl	$1001, %ebx
	jne	.L31
.L32:
	movl	$10, %edi
	addl	$1, %r14d
	addq	$1051, %r13
	call	putchar@PLT
	cmpl	%r14d, %r12d
	jne	.L28
.L29:
	movq	210280(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L47
	addq	$210296, %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
	.p2align 4,,10
	.p2align 3
.L30:
	.cfi_restore_state
	movl	$32, %edi
	call	putchar@PLT
	jmp	.L26
.L47:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE36:
	.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>

typedef struct {
	char word[50];
	char page[1001];
} BOOK;

void bubble_sort(BOOK *ptr, int n)
{
	int i, j, k;
	char temp[50];
	for (i = 0; i < n - 1; i++){
		for (j = 0; j < n - i - 1; j++){
			if (strcmp(ptr[j].word, ptr[j + 1].word) > 0){
				strcpy(temp, ptr[j].word);
				strcpy(ptr[j].word, ptr[j + 1].word);
				strcpy(ptr[j + 1].word, temp);
				
				for (k = 0; k < 1001; k++){
					ptr[j].page[k] ^= ptr[j + 1].page[k];
					ptr[j + 1].page[k] ^= ptr[j].page[k];
					ptr[j].page[k] ^= ptr[j + 1].page[k];
				}
			}
		}
	}
}

int main(void)
{
	BOOK index[200];
	int i, j, s;
	int flag, temp;
	char str[31];
	
	i = 0;
	while (scanf("%s%d", str, &temp) != EOF){
		getchar();
		flag = 1;
		for (j = 0; j < i; j++){
			if (strcmp(str, index[j].word) == 0){
				flag = 0;
				break;
			}
		}
		
		if (flag == 1){
			memset(index[i].page, 0, sizeof(index[i].page));
			strcpy(index[i].word, str);
			index[i].page[temp] = 1;
			i++;
		}
		else {
			index[j].page[temp] = 1;
		}
	}
	s = i;
	
	bubble_sort(index, s);
	
	for (i = 0; i < s; i++){
		printf("%s\n", index[i].word);
		flag = 0;
		for (j = 1; j < 1001; j++){
			if (index[i].page[j] == 1){
				if (flag == 1){
					printf(" ");
				}
				printf("%d", j);
				flag = 1;
			}
		}
		printf("\n");
	}
	
	return (0);
}
style 12
even 25
introduction 3
easy 9
style 9
document 13
style 21
even 18
 style 12
even 25
introduction 3
easy 9
style 9
tnemucod 13
style 21
even 18
 style 12
even 25
introduction 3
easy 9
style 9
tnemucod 13
style 21
even 10
 style 12
even 25
introduction 3
easy 9
style 17
tnemucod 13
style 21
even 10
 style 12
even 25
introduction 3
easy 9
style 17
tnemucod 13
style 7
even 10
 style 12
even 25
introduction 3
easy 9
style 17
tnemucod 13
elyts 7
even 10
 style 12
even 25
introduction 3
e`sy 9
style 17
tnemucod 13
elyts 7
even 10
 style 12
even 25
introduction 3
e`sy 9
style 17
tnemucod 13
elyts 7
even 13
 style 12
even 25
noitcudortni 3
e`sy 9
style 17
tnemucod 13
elyts 7
even 13
 style 12
even 25
noitcudortni 3
e`sy 3
style 17
tnemucod 13
elyts 7
even 13

document
13
easy
9
even
18 25
introduction
3
style
9 12 21
 easy
9
even
18 25
introduction
3
style
9 12 21
tnemucod
13
 easy
9
even
10 25
introduction
3
style
9 12 21
tnemucod
13
 easy
9
even
10 25
introduction
3
style
12 17 21
tnemucod
13
 easy
9
even
10 25
introduction
3
style
7 12 17
tnemucod
13
 easy
9
elyts
7
even
10 25
introduction
3
style
12 17
tnemucod
13
 e`sy
9
elyts
7
even
10 25
introduction
3
style
12 17
tnemucod
13
 e`sy
9
elyts
7
even
13 25
introduction
3
style
12 17
tnemucod
13
 e`sy
9
elyts
7
even
13 25
noitcudortni
3
style
12 17
tnemucod
13
 e`sy
3
elyts
7
even
13 25
noitcudortni
3
style
12 17
tnemucod
13

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>

typedef struct {
	char word[50];
	char page[1001];
} BOOK;

void bubble_sort(BOOK *ptr, int n)
{
	int i, j, k;
	char temp[50];
	for (i = 0; i < n - 1; i++){
		for (j = 0; j < n - i - 1; j++){
			if (strcmp(ptr[j].word, ptr[j + 1].word) > 0){
				strcpy(temp, ptr[j].word);
				strcpy(ptr[j].word, ptr[j + 1].word);
				strcpy(ptr[j + 1].word, temp);
				
				for (k = 0; k < 1001; k++){
					ptr[j].page[k] ^= ptr[j + 1].page[k];
					ptr[j + 1].page[k] ^= ptr[j].page[k];
					ptr[j].page[k] ^= ptr[j + 1].page[k];
				}
			}
		}
	}
}

int main(void)
{
	BOOK index[200];
	int i, j, s;
	int flag, temp;
	char str[31];
	
	i = 0;
	while (scanf("%s%d", str, &temp) != EOF){
		getchar();
		flag = 1;
		for (j = 0; j < i; j++){
			if (strcmp(str, index[j].word) == 0){
				flag = 0;
				break;
			}
		}
		
		if (flag == 1){
			memset(index[i].page, 0, sizeof(index[i].page));
			strcpy(index[i].word, str);
			index[i].page[temp] = 1;
			i++;
		}
		else {
			index[j].page[temp] = 1;
		}
	}
	s = i;
	
	bubble_sort(index, s);
	
	for (i = 0; i < s; i++){
		printf("%s\n", index[i].word);
		flag = 0;
		for (j = 1; j < 1001; j++){
			if (index[i].page[j] == 1){
				if (flag == 1){
					printf(" ");
				}
				printf("%d", j);
				flag = 1;
			}
		}
		printf("\n");
	}
	
	return (0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	bubble_sort
	.type	bubble_sort, @function
bubble_sort:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$96, %rsp
	movq	%rdi, -88(%rbp)
	movl	%esi, -92(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -76(%rbp)
	jmp	.L2
.L8:
	movl	$0, -72(%rbp)
	jmp	.L3
.L7:
	movl	-72(%rbp), %eax
	cltq
	addq	$1, %rax
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	movl	-72(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rcx
	movq	-88(%rbp), %rax
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jle	.L4
	movl	-72(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	leaq	-64(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcpy@PLT
	movl	-72(%rbp), %eax
	cltq
	addq	$1, %rax
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	movl	-72(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rcx
	movq	-88(%rbp), %rax
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcpy@PLT
	movl	-72(%rbp), %eax
	cltq
	addq	$1, %rax
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	leaq	-64(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	$0, -68(%rbp)
	jmp	.L5
.L6:
	movl	-72(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rax, %rdx
	movl	-68(%rbp), %eax
	cltq
	movzbl	50(%rdx,%rax), %esi
	movl	-72(%rbp), %eax
	cltq
	addq	$1, %rax
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rax, %rdx
	movl	-68(%rbp), %eax
	cltq
	movzbl	50(%rdx,%rax), %ecx
	movl	-72(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rax, %rdx
	xorl	%esi, %ecx
	movl	-68(%rbp), %eax
	cltq
	movb	%cl, 50(%rdx,%rax)
	movl	-72(%rbp), %eax
	cltq
	addq	$1, %rax
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rax, %rdx
	movl	-68(%rbp), %eax
	cltq
	movzbl	50(%rdx,%rax), %esi
	movl	-72(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rax, %rdx
	movl	-68(%rbp), %eax
	cltq
	movzbl	50(%rdx,%rax), %ecx
	movl	-72(%rbp), %eax
	cltq
	addq	$1, %rax
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rax, %rdx
	xorl	%esi, %ecx
	movl	-68(%rbp), %eax
	cltq
	movb	%cl, 50(%rdx,%rax)
	movl	-72(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rax, %rdx
	movl	-68(%rbp), %eax
	cltq
	movzbl	50(%rdx,%rax), %esi
	movl	-72(%rbp), %eax
	cltq
	addq	$1, %rax
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rax, %rdx
	movl	-68(%rbp), %eax
	cltq
	movzbl	50(%rdx,%rax), %ecx
	movl	-72(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rax, %rdx
	xorl	%esi, %ecx
	movl	-68(%rbp), %eax
	cltq
	movb	%cl, 50(%rdx,%rax)
	addl	$1, -68(%rbp)
.L5:
	cmpl	$1000, -68(%rbp)
	jle	.L6
.L4:
	addl	$1, -72(%rbp)
.L3:
	movl	-92(%rbp), %eax
	subl	-76(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -72(%rbp)
	jl	.L7
	addl	$1, -76(%rbp)
.L2:
	movl	-92(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -76(%rbp)
	jl	.L8
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	bubble_sort, .-bubble_sort
	.section	.rodata
.LC0:
	.string	"%s%d"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-208896(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1392, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -210272(%rbp)
	jmp	.L11
.L17:
	call	getchar@PLT
	movl	$1, -210264(%rbp)
	movl	$0, -210268(%rbp)
	jmp	.L12
.L15:
	leaq	-210256(%rbp), %rdx
	movl	-210268(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rax
	addq	%rax, %rdx
	leaq	-48(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L13
	movl	$0, -210264(%rbp)
	jmp	.L14
.L13:
	addl	$1, -210268(%rbp)
.L12:
	movl	-210268(%rbp), %eax
	cmpl	-210272(%rbp), %eax
	jl	.L15
.L14:
	cmpl	$1, -210264(%rbp)
	jne	.L16
	leaq	-210256(%rbp), %rdx
	movl	-210272(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rax
	addq	$48, %rax
	addq	%rdx, %rax
	addq	$2, %rax
	movl	$1001, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-210256(%rbp), %rdx
	movl	-210272(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rax
	addq	%rax, %rdx
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	-210276(%rbp), %eax
	movslq	%eax, %rdx
	movl	-210272(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rax
	addq	%rbp, %rax
	addq	%rdx, %rax
	subq	$210206, %rax
	movb	$1, (%rax)
	addl	$1, -210272(%rbp)
	jmp	.L11
.L16:
	movl	-210276(%rbp), %eax
	movslq	%eax, %rdx
	movl	-210268(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rax
	addq	%rbp, %rax
	addq	%rdx, %rax
	subq	$210206, %rax
	movb	$1, (%rax)
.L11:
	leaq	-210276(%rbp), %rdx
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L17
	movl	-210272(%rbp), %eax
	movl	%eax, -210260(%rbp)
	movl	-210260(%rbp), %edx
	leaq	-210256(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	bubble_sort
	movl	$0, -210272(%rbp)
	jmp	.L18
.L23:
	leaq	-210256(%rbp), %rdx
	movl	-210272(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, -210264(%rbp)
	movl	$1, -210268(%rbp)
	jmp	.L19
.L22:
	movl	-210268(%rbp), %eax
	movslq	%eax, %rdx
	movl	-210272(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rax
	addq	%rbp, %rax
	addq	%rdx, %rax
	subq	$210206, %rax
	movzbl	(%rax), %eax
	cmpb	$1, %al
	jne	.L20
	cmpl	$1, -210264(%rbp)
	jne	.L21
	movl	$32, %edi
	call	putchar@PLT
.L21:
	movl	-210268(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$1, -210264(%rbp)
.L20:
	addl	$1, -210268(%rbp)
.L19:
	cmpl	$1000, -210268(%rbp)
	jle	.L22
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -210272(%rbp)
.L18:
	movl	-210272(%rbp), %eax
	cmpl	-210260(%rbp), %eax
	jl	.L23
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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
	.globl	bubble_sort
	.type	bubble_sort, @function
bubble_sort:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$96, %rsp
	movq	%rdi, -88(%rbp)
	movl	%esi, -92(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -76(%rbp)
	jmp	.L2
.L8:
	movl	$0, -72(%rbp)
	jmp	.L3
.L7:
	movl	-72(%rbp), %eax
	cltq
	addq	$1, %rax
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	movl	-72(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rcx
	movq	-88(%rbp), %rax
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jle	.L4
	movl	-72(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	leaq	-64(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcpy@PLT
	movl	-72(%rbp), %eax
	cltq
	addq	$1, %rax
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	movl	-72(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rcx
	movq	-88(%rbp), %rax
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcpy@PLT
	movl	-72(%rbp), %eax
	cltq
	addq	$1, %rax
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	leaq	-64(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	$0, -68(%rbp)
	jmp	.L5
.L6:
	movl	-72(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rax, %rdx
	movl	-68(%rbp), %eax
	cltq
	movzbl	50(%rdx,%rax), %esi
	movl	-72(%rbp), %eax
	cltq
	addq	$1, %rax
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rax, %rdx
	movl	-68(%rbp), %eax
	cltq
	movzbl	50(%rdx,%rax), %ecx
	movl	-72(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rax, %rdx
	xorl	%esi, %ecx
	movl	-68(%rbp), %eax
	cltq
	movb	%cl, 50(%rdx,%rax)
	movl	-72(%rbp), %eax
	cltq
	addq	$1, %rax
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rax, %rdx
	movl	-68(%rbp), %eax
	cltq
	movzbl	50(%rdx,%rax), %esi
	movl	-72(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rax, %rdx
	movl	-68(%rbp), %eax
	cltq
	movzbl	50(%rdx,%rax), %ecx
	movl	-72(%rbp), %eax
	cltq
	addq	$1, %rax
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rax, %rdx
	xorl	%esi, %ecx
	movl	-68(%rbp), %eax
	cltq
	movb	%cl, 50(%rdx,%rax)
	movl	-72(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rax, %rdx
	movl	-68(%rbp), %eax
	cltq
	movzbl	50(%rdx,%rax), %esi
	movl	-72(%rbp), %eax
	cltq
	addq	$1, %rax
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rax, %rdx
	movl	-68(%rbp), %eax
	cltq
	movzbl	50(%rdx,%rax), %ecx
	movl	-72(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rdx
	movq	-88(%rbp), %rax
	addq	%rax, %rdx
	xorl	%esi, %ecx
	movl	-68(%rbp), %eax
	cltq
	movb	%cl, 50(%rdx,%rax)
	addl	$1, -68(%rbp)
.L5:
	cmpl	$1000, -68(%rbp)
	jle	.L6
.L4:
	addl	$1, -72(%rbp)
.L3:
	movl	-92(%rbp), %eax
	subl	-76(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -72(%rbp)
	jl	.L7
	addl	$1, -76(%rbp)
.L2:
	movl	-92(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -76(%rbp)
	jl	.L8
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	bubble_sort, .-bubble_sort
	.section	.rodata
.LC0:
	.string	"%s%d"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-208896(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1392, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -210272(%rbp)
	jmp	.L11
.L17:
	call	getchar@PLT
	movl	$1, -210264(%rbp)
	movl	$0, -210268(%rbp)
	jmp	.L12
.L15:
	leaq	-210256(%rbp), %rdx
	movl	-210268(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rax
	addq	%rax, %rdx
	leaq	-48(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L13
	movl	$0, -210264(%rbp)
	jmp	.L14
.L13:
	addl	$1, -210268(%rbp)
.L12:
	movl	-210268(%rbp), %eax
	cmpl	-210272(%rbp), %eax
	jl	.L15
.L14:
	cmpl	$1, -210264(%rbp)
	jne	.L16
	leaq	-210256(%rbp), %rdx
	movl	-210272(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rax
	addq	$48, %rax
	addq	%rdx, %rax
	addq	$2, %rax
	movl	$1001, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-210256(%rbp), %rdx
	movl	-210272(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rax
	addq	%rax, %rdx
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	-210276(%rbp), %eax
	movslq	%eax, %rdx
	movl	-210272(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rax
	addq	%rbp, %rax
	addq	%rdx, %rax
	subq	$210206, %rax
	movb	$1, (%rax)
	addl	$1, -210272(%rbp)
	jmp	.L11
.L16:
	movl	-210276(%rbp), %eax
	movslq	%eax, %rdx
	movl	-210268(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rax
	addq	%rbp, %rax
	addq	%rdx, %rax
	subq	$210206, %rax
	movb	$1, (%rax)
.L11:
	leaq	-210276(%rbp), %rdx
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L17
	movl	-210272(%rbp), %eax
	movl	%eax, -210260(%rbp)
	movl	-210260(%rbp), %edx
	leaq	-210256(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	bubble_sort
	movl	$0, -210272(%rbp)
	jmp	.L18
.L23:
	leaq	-210256(%rbp), %rdx
	movl	-210272(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rax
	addq	%rdx, %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, -210264(%rbp)
	movl	$1, -210268(%rbp)
	jmp	.L19
.L22:
	movl	-210268(%rbp), %eax
	movslq	%eax, %rdx
	movl	-210272(%rbp), %eax
	cltq
	imulq	$1051, %rax, %rax
	addq	%rbp, %rax
	addq	%rdx, %rax
	subq	$210206, %rax
	movzbl	(%rax), %eax
	cmpb	$1, %al
	jne	.L20
	cmpl	$1, -210264(%rbp)
	jne	.L21
	movl	$32, %edi
	call	putchar@PLT
.L21:
	movl	-210268(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$1, -210264(%rbp)
.L20:
	addl	$1, -210268(%rbp)
.L19:
	cmpl	$1000, -210268(%rbp)
	jle	.L22
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -210272(%rbp)
.L18:
	movl	-210272(%rbp), %eax
	cmpl	-210260(%rbp), %eax
	jl	.L23
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
