Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
typedef struct word{
	char s[32];
	int p[110],pn;
}WORD;
WORD a[110];

int comp_str(const void *a,const void *b){
	WORD *p=(WORD *)a,*q=(WORD *)b;
	//return strcmp((char *)a,(char *)b);
	return strcmp((char *)p->s,(char *)q->s);
}
int comp_int(const void *a,const void *b){
	return *(int *)a - *(int *)b;
}
int main(){
	int i,j,wn=0,p;
	char s[32];
	while(scanf("%s",s)!=EOF){
		scanf("%d",&p);
		for(i=0;i<wn;i++)if(strcmp(s,a[i].s)==0)break;
		if(i==wn){
			strcpy(a[wn].s,s);
			a[wn].p[0]=p;
			a[wn].pn=1;
			wn++;
		}else{
			a[i].p[a[i].pn]=p;
			a[i].pn++;
		}
	}
	qsort(a,wn,sizeof(WORD),comp_str);
	for(i=0;i<wn;i++){
		printf("%s\n",a[i].s);
		qsort(a[i].p,a[i].pn,sizeof(int),comp_int);
		for(j=0;j<a[i].pn;j++)printf("%s%d",(j==0)?"":" ",a[i].p[j]);
		printf("\n");
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 52360
a:
	.zero	52360
	.text
	.globl	comp_str
	.type	comp_str, @function
comp_str:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rdx
	movq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	comp_str, .-comp_str
	.globl	comp_int
	.type	comp_int, @function
comp_int:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	comp_int, .-comp_int
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	""
.LC3:
	.string	" "
.LC4:
	.string	"%s%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -52(%rbp)
	jmp	.L6
.L12:
	leaq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -60(%rbp)
	jmp	.L7
.L10:
	movl	-60(%rbp), %eax
	cltq
	imulq	$476, %rax, %rax
	leaq	a(%rip), %rdx
	addq	%rax, %rdx
	leaq	-48(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L21
	addl	$1, -60(%rbp)
.L7:
	movl	-60(%rbp), %eax
	cmpl	-52(%rbp), %eax
	jl	.L10
	jmp	.L9
.L21:
	nop
.L9:
	movl	-60(%rbp), %eax
	cmpl	-52(%rbp), %eax
	jne	.L11
	movl	-52(%rbp), %eax
	cltq
	imulq	$476, %rax, %rax
	leaq	a(%rip), %rdx
	addq	%rax, %rdx
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	-64(%rbp), %edx
	movl	-52(%rbp), %eax
	cltq
	imulq	$476, %rax, %rax
	leaq	32+a(%rip), %rcx
	movl	%edx, (%rax,%rcx)
	movl	-52(%rbp), %eax
	cltq
	imulq	$476, %rax, %rax
	leaq	472+a(%rip), %rdx
	movl	$1, (%rax,%rdx)
	addl	$1, -52(%rbp)
	jmp	.L6
.L11:
	movl	-60(%rbp), %eax
	cltq
	imulq	$476, %rax, %rax
	leaq	472+a(%rip), %rdx
	movl	(%rax,%rdx), %edx
	movl	-64(%rbp), %eax
	movslq	%edx, %rcx
	movl	-60(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$119, %rdx, %rdx
	addq	%rcx, %rdx
	addq	$8, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-60(%rbp), %eax
	cltq
	imulq	$476, %rax, %rax
	leaq	472+a(%rip), %rdx
	movl	(%rax,%rdx), %eax
	leal	1(%rax), %ecx
	movl	-60(%rbp), %eax
	cltq
	imulq	$476, %rax, %rax
	leaq	472+a(%rip), %rdx
	movl	%ecx, (%rax,%rdx)
.L6:
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L12
	movl	-52(%rbp), %eax
	cltq
	leaq	comp_str(%rip), %rdx
	movq	%rdx, %rcx
	movl	$476, %edx
	movq	%rax, %rsi
	leaq	a(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -60(%rbp)
	jmp	.L13
.L18:
	movl	-60(%rbp), %eax
	cltq
	imulq	$476, %rax, %rax
	leaq	a(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	-60(%rbp), %eax
	cltq
	imulq	$476, %rax, %rax
	leaq	472+a(%rip), %rdx
	movl	(%rax,%rdx), %eax
	cltq
	movl	-60(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$476, %rdx, %rdx
	leaq	32(%rdx), %rcx
	leaq	a(%rip), %rdx
	leaq	(%rcx,%rdx), %rdi
	leaq	comp_int(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	call	qsort@PLT
	movl	$0, -56(%rbp)
	jmp	.L14
.L17:
	movl	-56(%rbp), %eax
	movslq	%eax, %rdx
	movl	-60(%rbp), %eax
	cltq
	imulq	$119, %rax, %rax
	addq	%rdx, %rax
	addq	$8, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	cmpl	$0, -56(%rbp)
	jne	.L15
	leaq	.LC2(%rip), %rax
	jmp	.L16
.L15:
	leaq	.LC3(%rip), %rax
.L16:
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -56(%rbp)
.L14:
	movl	-60(%rbp), %eax
	cltq
	imulq	$476, %rax, %rax
	leaq	472+a(%rip), %rdx
	movl	(%rax,%rdx), %eax
	cmpl	%eax, -56(%rbp)
	jl	.L17
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -60(%rbp)
.L13:
	movl	-60(%rbp), %eax
	cmpl	-52(%rbp), %eax
	jl	.L18
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	comp_int
	.type	comp_int, @function
comp_int:
.LFB52:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE52:
	.size	comp_int, .-comp_int
	.p2align 4
	.globl	comp_str
	.type	comp_str, @function
comp_str:
.LFB51:
	.cfi_startproc
	endbr64
	jmp	strcmp@PLT
	.cfi_endproc
.LFE51:
	.size	comp_str, .-comp_str
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	" "
.LC3:
	.string	"%s%d"
.LC4:
	.string	""
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB53:
	.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
	leaq	.LC1(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	a(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L28
	xorl	%eax, %eax
	leaq	28(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	testl	%ebp, %ebp
	je	.L6
	leaq	a(%rip), %r15
	xorl	%ebx, %ebx
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L29:
	addl	$1, %ebx
	addq	$476, %r15
	cmpl	%ebx, %ebp
	je	.L6
.L8:
	movq	%r15, %rsi
	movq	%r12, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L29
	movslq	%ebx, %rbx
	movl	28(%rsp), %esi
	imulq	$476, %rbx, %rax
	imulq	$119, %rbx, %rbx
	addq	%r13, %rax
	movslq	472(%rax), %rcx
	movq	%rcx, %rdx
	leaq	8(%rcx,%rbx), %rcx
	addl	$1, %edx
	movl	%esi, 0(%r13,%rcx,4)
	movl	%edx, 472(%rax)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	movslq	%ebp, %rcx
	movl	28(%rsp), %ebx
	movl	$32, %edx
	movq	%r12, %rsi
	imulq	$476, %rcx, %rcx
	addl	$1, %ebp
	addq	%r13, %rcx
	movq	%rcx, %rdi
	call	__strcpy_chk@PLT
	movl	%ebx, 32(%rax)
	movl	$1, 472(%rax)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L28:
	movslq	%ebp, %rsi
	leaq	comp_str(%rip), %rcx
	movl	$476, %edx
	movq	%r13, %rdi
	call	qsort@PLT
	testl	%ebp, %ebp
	je	.L14
	leal	-1(%rbp), %eax
	leaq	a(%rip), %r14
	imulq	$476, %rax, %rdx
	leaq	476(%r14), %rax
	leaq	comp_int(%rip), %r15
	leaq	.LC3(%rip), %rbp
	leaq	.LC4(%rip), %r13
	leaq	.LC2(%rip), %r12
	addq	%rdx, %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%r14, %rdi
	xorl	%ebx, %ebx
	call	puts@PLT
	movslq	472(%r14), %rsi
	leaq	32(%r14), %rdi
	movq	%r15, %rcx
	movl	$4, %edx
	call	qsort@PLT
	movl	472(%r14), %eax
	testl	%eax, %eax
	jle	.L17
	.p2align 4,,10
	.p2align 3
.L12:
	movl	32(%r14,%rbx,4), %ecx
	testq	%rbx, %rbx
	je	.L15
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$1, %rbx
	cmpl	%ebx, 472(%r14)
	jg	.L12
.L17:
	movl	$10, %edi
	addq	$476, %r14
	call	putchar@PLT
	cmpq	8(%rsp), %r14
	jne	.L13
.L14:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$88, %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
.L15:
	.cfi_restore_state
	xorl	%eax, %eax
	movq	%r13, %rdx
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	cmpl	$1, 472(%r14)
	movl	$1, %ebx
	jg	.L12
	jmp	.L17
.L30:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE53:
	.size	main, .-main
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 52360
a:
	.zero	52360
	.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	comp_int
	.type	comp_int, @function
comp_int:
.LFB52:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE52:
	.size	comp_int, .-comp_int
	.p2align 4
	.globl	comp_str
	.type	comp_str, @function
comp_str:
.LFB51:
	.cfi_startproc
	endbr64
	jmp	strcmp@PLT
	.cfi_endproc
.LFE51:
	.size	comp_str, .-comp_str
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	" "
.LC3:
	.string	"%s%d"
.LC4:
	.string	""
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB53:
	.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
	leaq	.LC1(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	a(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L28
	xorl	%eax, %eax
	leaq	28(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	testl	%ebp, %ebp
	je	.L6
	leaq	a(%rip), %r15
	xorl	%ebx, %ebx
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L29:
	addl	$1, %ebx
	addq	$476, %r15
	cmpl	%ebx, %ebp
	je	.L6
.L8:
	movq	%r15, %rsi
	movq	%r12, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L29
	movslq	%ebx, %rbx
	movl	28(%rsp), %esi
	imulq	$476, %rbx, %rax
	imulq	$119, %rbx, %rbx
	addq	%r13, %rax
	movslq	472(%rax), %rcx
	movq	%rcx, %rdx
	leaq	8(%rcx,%rbx), %rcx
	addl	$1, %edx
	movl	%esi, 0(%r13,%rcx,4)
	movl	%edx, 472(%rax)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	movslq	%ebp, %rcx
	movl	28(%rsp), %ebx
	movl	$32, %edx
	movq	%r12, %rsi
	imulq	$476, %rcx, %rcx
	addl	$1, %ebp
	addq	%r13, %rcx
	movq	%rcx, %rdi
	call	__strcpy_chk@PLT
	movl	%ebx, 32(%rax)
	movl	$1, 472(%rax)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L28:
	movslq	%ebp, %rsi
	leaq	comp_str(%rip), %rcx
	movl	$476, %edx
	movq	%r13, %rdi
	call	qsort@PLT
	testl	%ebp, %ebp
	je	.L14
	leal	-1(%rbp), %eax
	leaq	a(%rip), %r14
	imulq	$476, %rax, %rdx
	leaq	476(%r14), %rax
	leaq	comp_int(%rip), %r15
	leaq	.LC3(%rip), %rbp
	leaq	.LC4(%rip), %r13
	leaq	.LC2(%rip), %r12
	addq	%rdx, %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%r14, %rdi
	xorl	%ebx, %ebx
	call	puts@PLT
	movslq	472(%r14), %rsi
	leaq	32(%r14), %rdi
	movq	%r15, %rcx
	movl	$4, %edx
	call	qsort@PLT
	movl	472(%r14), %eax
	testl	%eax, %eax
	jle	.L17
	.p2align 4,,10
	.p2align 3
.L12:
	movl	32(%r14,%rbx,4), %ecx
	testq	%rbx, %rbx
	je	.L15
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$1, %rbx
	cmpl	%ebx, 472(%r14)
	jg	.L12
.L17:
	movl	$10, %edi
	addq	$476, %r14
	call	putchar@PLT
	cmpq	8(%rsp), %r14
	jne	.L13
.L14:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$88, %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
.L15:
	.cfi_restore_state
	xorl	%eax, %eax
	movq	%r13, %rdx
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	cmpl	$1, 472(%r14)
	movl	$1, %ebx
	jg	.L12
	jmp	.L17
.L30:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE53:
	.size	main, .-main
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 52360
a:
	.zero	52360
	.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 <stdlib.h>
#include <string.h>
#include <stdio.h>
typedef struct word{
	char s[32];
	int p[110],pn;
}WORD;
WORD a[110];

int comp_str(const void *a,const void *b){
	WORD *p=(WORD *)a,*q=(WORD *)b;
	//return strcmp((char *)a,(char *)b);
	return strcmp((char *)p->s,(char *)q->s);
}
int comp_int(const void *a,const void *b){
	return *(int *)a - *(int *)b;
}
int main(){
	int i,j,wn=0,p;
	char s[32];
	while(scanf("%s",s)!=EOF){
		scanf("%d",&p);
		for(i=0;i<wn;i++)if(strcmp(s,a[i].s)==0)break;
		if(i==wn){
			strcpy(a[wn].s,s);
			a[wn].p[0]=p;
			a[wn].pn=1;
			wn++;
		}else{
			a[i].p[a[i].pn]=p;
			a[i].pn++;
		}
	}
	qsort(a,wn,sizeof(WORD),comp_str);
	for(i=0;i<wn;i++){
		printf("%s\n",a[i].s);
		qsort(a[i].p,a[i].pn,sizeof(int),comp_int);
		for(j=0;j<a[i].pn;j++)printf("%s%d",(j==0)?"":" ",a[i].p[j]);
		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 <stdlib.h>
#include <string.h>
#include <stdio.h>
typedef struct word{
	char s[32];
	int p[110],pn;
}WORD;
WORD a[110];

int comp_str(const void *a,const void *b){
	WORD *p=(WORD *)a,*q=(WORD *)b;
	//return strcmp((char *)a,(char *)b);
	return strcmp((char *)p->s,(char *)q->s);
}
int comp_int(const void *a,const void *b){
	return *(int *)a - *(int *)b;
}
int main(){
	int i,j,wn=0,p;
	char s[32];
	while(scanf("%s",s)!=EOF){
		scanf("%d",&p);
		for(i=0;i<wn;i++)if(strcmp(s,a[i].s)==0)break;
		if(i==wn){
			strcpy(a[wn].s,s);
			a[wn].p[0]=p;
			a[wn].pn=1;
			wn++;
		}else{
			a[i].p[a[i].pn]=p;
			a[i].pn++;
		}
	}
	qsort(a,wn,sizeof(WORD),comp_str);
	for(i=0;i<wn;i++){
		printf("%s\n",a[i].s);
		qsort(a[i].p,a[i].pn,sizeof(int),comp_int);
		for(j=0;j<a[i].pn;j++)printf("%s%d",(j==0)?"":" ",a[i].p[j]);
		printf("\n");
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 52360
a:
	.zero	52360
	.text
	.globl	comp_str
	.type	comp_str, @function
comp_str:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rdx
	movq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	comp_str, .-comp_str
	.globl	comp_int
	.type	comp_int, @function
comp_int:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	comp_int, .-comp_int
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	""
.LC3:
	.string	" "
.LC4:
	.string	"%s%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -52(%rbp)
	jmp	.L6
.L12:
	leaq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -60(%rbp)
	jmp	.L7
.L10:
	movl	-60(%rbp), %eax
	cltq
	imulq	$476, %rax, %rax
	leaq	a(%rip), %rdx
	addq	%rax, %rdx
	leaq	-48(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L21
	addl	$1, -60(%rbp)
.L7:
	movl	-60(%rbp), %eax
	cmpl	-52(%rbp), %eax
	jl	.L10
	jmp	.L9
.L21:
	nop
.L9:
	movl	-60(%rbp), %eax
	cmpl	-52(%rbp), %eax
	jne	.L11
	movl	-52(%rbp), %eax
	cltq
	imulq	$476, %rax, %rax
	leaq	a(%rip), %rdx
	addq	%rax, %rdx
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	-64(%rbp), %edx
	movl	-52(%rbp), %eax
	cltq
	imulq	$476, %rax, %rax
	leaq	32+a(%rip), %rcx
	movl	%edx, (%rax,%rcx)
	movl	-52(%rbp), %eax
	cltq
	imulq	$476, %rax, %rax
	leaq	472+a(%rip), %rdx
	movl	$1, (%rax,%rdx)
	addl	$1, -52(%rbp)
	jmp	.L6
.L11:
	movl	-60(%rbp), %eax
	cltq
	imulq	$476, %rax, %rax
	leaq	472+a(%rip), %rdx
	movl	(%rax,%rdx), %edx
	movl	-64(%rbp), %eax
	movslq	%edx, %rcx
	movl	-60(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$119, %rdx, %rdx
	addq	%rcx, %rdx
	addq	$8, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-60(%rbp), %eax
	cltq
	imulq	$476, %rax, %rax
	leaq	472+a(%rip), %rdx
	movl	(%rax,%rdx), %eax
	leal	1(%rax), %ecx
	movl	-60(%rbp), %eax
	cltq
	imulq	$476, %rax, %rax
	leaq	472+a(%rip), %rdx
	movl	%ecx, (%rax,%rdx)
.L6:
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L12
	movl	-52(%rbp), %eax
	cltq
	leaq	comp_str(%rip), %rdx
	movq	%rdx, %rcx
	movl	$476, %edx
	movq	%rax, %rsi
	leaq	a(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -60(%rbp)
	jmp	.L13
.L18:
	movl	-60(%rbp), %eax
	cltq
	imulq	$476, %rax, %rax
	leaq	a(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	-60(%rbp), %eax
	cltq
	imulq	$476, %rax, %rax
	leaq	472+a(%rip), %rdx
	movl	(%rax,%rdx), %eax
	cltq
	movl	-60(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$476, %rdx, %rdx
	leaq	32(%rdx), %rcx
	leaq	a(%rip), %rdx
	leaq	(%rcx,%rdx), %rdi
	leaq	comp_int(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	call	qsort@PLT
	movl	$0, -56(%rbp)
	jmp	.L14
.L17:
	movl	-56(%rbp), %eax
	movslq	%eax, %rdx
	movl	-60(%rbp), %eax
	cltq
	imulq	$119, %rax, %rax
	addq	%rdx, %rax
	addq	$8, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	cmpl	$0, -56(%rbp)
	jne	.L15
	leaq	.LC2(%rip), %rax
	jmp	.L16
.L15:
	leaq	.LC3(%rip), %rax
.L16:
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -56(%rbp)
.L14:
	movl	-60(%rbp), %eax
	cltq
	imulq	$476, %rax, %rax
	leaq	472+a(%rip), %rdx
	movl	(%rax,%rdx), %eax
	cmpl	%eax, -56(%rbp)
	jl	.L17
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -60(%rbp)
.L13:
	movl	-60(%rbp), %eax
	cmpl	-52(%rbp), %eax
	jl	.L18
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 52360
a:
	.zero	52360
	.text
	.globl	comp_str
	.type	comp_str, @function
comp_str:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rdx
	movq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	comp_str, .-comp_str
	.globl	comp_int
	.type	comp_int, @function
comp_int:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	comp_int, .-comp_int
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	""
.LC3:
	.string	" "
.LC4:
	.string	"%s%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -52(%rbp)
	jmp	.L6
.L12:
	leaq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -60(%rbp)
	jmp	.L7
.L10:
	movl	-60(%rbp), %eax
	cltq
	imulq	$476, %rax, %rax
	leaq	a(%rip), %rdx
	addq	%rax, %rdx
	leaq	-48(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L21
	addl	$1, -60(%rbp)
.L7:
	movl	-60(%rbp), %eax
	cmpl	-52(%rbp), %eax
	jl	.L10
	jmp	.L9
.L21:
	nop
.L9:
	movl	-60(%rbp), %eax
	cmpl	-52(%rbp), %eax
	jne	.L11
	movl	-52(%rbp), %eax
	cltq
	imulq	$476, %rax, %rax
	leaq	a(%rip), %rdx
	addq	%rax, %rdx
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	-64(%rbp), %edx
	movl	-52(%rbp), %eax
	cltq
	imulq	$476, %rax, %rax
	leaq	32+a(%rip), %rcx
	movl	%edx, (%rax,%rcx)
	movl	-52(%rbp), %eax
	cltq
	imulq	$476, %rax, %rax
	leaq	472+a(%rip), %rdx
	movl	$1, (%rax,%rdx)
	addl	$1, -52(%rbp)
	jmp	.L6
.L11:
	movl	-60(%rbp), %eax
	cltq
	imulq	$476, %rax, %rax
	leaq	472+a(%rip), %rdx
	movl	(%rax,%rdx), %edx
	movl	-64(%rbp), %eax
	movslq	%edx, %rcx
	movl	-60(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$119, %rdx, %rdx
	addq	%rcx, %rdx
	addq	$8, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-60(%rbp), %eax
	cltq
	imulq	$476, %rax, %rax
	leaq	472+a(%rip), %rdx
	movl	(%rax,%rdx), %eax
	leal	1(%rax), %ecx
	movl	-60(%rbp), %eax
	cltq
	imulq	$476, %rax, %rax
	leaq	472+a(%rip), %rdx
	movl	%ecx, (%rax,%rdx)
.L6:
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L12
	movl	-52(%rbp), %eax
	cltq
	leaq	comp_str(%rip), %rdx
	movq	%rdx, %rcx
	movl	$476, %edx
	movq	%rax, %rsi
	leaq	a(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -60(%rbp)
	jmp	.L13
.L18:
	movl	-60(%rbp), %eax
	cltq
	imulq	$476, %rax, %rax
	leaq	a(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	-60(%rbp), %eax
	cltq
	imulq	$476, %rax, %rax
	leaq	472+a(%rip), %rdx
	movl	(%rax,%rdx), %eax
	cltq
	movl	-60(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$476, %rdx, %rdx
	leaq	32(%rdx), %rcx
	leaq	a(%rip), %rdx
	leaq	(%rcx,%rdx), %rdi
	leaq	comp_int(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	call	qsort@PLT
	movl	$0, -56(%rbp)
	jmp	.L14
.L17:
	movl	-56(%rbp), %eax
	movslq	%eax, %rdx
	movl	-60(%rbp), %eax
	cltq
	imulq	$119, %rax, %rax
	addq	%rdx, %rax
	addq	$8, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	cmpl	$0, -56(%rbp)
	jne	.L15
	leaq	.LC2(%rip), %rax
	jmp	.L16
.L15:
	leaq	.LC3(%rip), %rax
.L16:
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -56(%rbp)
.L14:
	movl	-60(%rbp), %eax
	cltq
	imulq	$476, %rax, %rax
	leaq	472+a(%rip), %rdx
	movl	(%rax,%rdx), %eax
	cmpl	%eax, -56(%rbp)
	jl	.L17
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -60(%rbp)
.L13:
	movl	-60(%rbp), %eax
	cmpl	-52(%rbp), %eax
	jl	.L18
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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:
