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

```c
char names[20][16];
int M[20][30],S[30],P[20];
main(n,m,i,j,d){
  for(;scanf("%d",&n),n;printf("%d %s\n",P[d],names[d])){
    memset(names,0,sizeof names),
    memset(M,0,sizeof M),
    memset(S,0,sizeof S),
    memset(P,0,sizeof P);
    for(i=0;i<n;i++)
      for(scanf("%s%d",names[i],&m),j=0;j<m;j++)scanf("%d",&d),M[i][d]++,S[d]++;
    for(i=0;i<n;i++)
      for(j=0;j<30;j++)
        if(M[i][j])P[i]+=1+n-S[j];
    for(d=0,m=999,i=0;i<n;i++)
      if(P[i]<m||(P[i]==m&&strcmp(names[i],names[d])<0))d=i,m=P[i];
  }
  exit(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	names
	.bss
	.align 32
	.type	names, @object
	.size	names, 320
names:
	.zero	320
	.globl	M
	.align 32
	.type	M, @object
	.size	M, 2400
M:
	.zero	2400
	.globl	S
	.align 32
	.type	S, @object
	.size	S, 120
S:
	.zero	120
	.globl	P
	.align 32
	.type	P, @object
	.size	P, 80
P:
	.zero	80
	.section	.rodata
.LC0:
	.string	"%s%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d %s\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	%ecx, -16(%rbp)
	movl	%r8d, -20(%rbp)
	jmp	.L2
.L16:
	movl	$320, %edx
	movl	$0, %esi
	leaq	names(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$2400, %edx
	movl	$0, %esi
	leaq	M(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$120, %edx
	movl	$0, %esi
	leaq	S(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$80, %edx
	movl	$0, %esi
	leaq	P(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -12(%rbp)
	jmp	.L3
.L6:
	movl	-12(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	names(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-8(%rbp), %rax
	movq	%rax, %rdx
	movq	%rcx, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L4
.L5:
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	-20(%rbp), %edx
	movslq	%edx, %rsi
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$4, %rax
	subq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rcx
	leaq	M(%rip), %rax
	movl	(%rcx,%rax), %eax
	leal	1(%rax), %ecx
	movslq	%edx, %rsi
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	M(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	S(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	S(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -16(%rbp)
.L4:
	movl	-8(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L5
	addl	$1, -12(%rbp)
.L3:
	movl	-4(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L6
	movl	$0, -12(%rbp)
	jmp	.L7
.L11:
	movl	$0, -16(%rbp)
	jmp	.L8
.L10:
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	M(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L9
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	P(%rip), %rax
	movl	(%rdx,%rax), %esi
	movl	-4(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	S(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	leal	(%rsi,%rdx), %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	P(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L9:
	addl	$1, -16(%rbp)
.L8:
	cmpl	$29, -16(%rbp)
	jle	.L10
	addl	$1, -12(%rbp)
.L7:
	movl	-4(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L11
	movl	$0, -20(%rbp)
	movl	$999, -8(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L12
.L15:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	P(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L13
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	P(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L14
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	names(%rip), %rax
	addq	%rax, %rdx
	movl	-12(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	names(%rip), %rax
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jns	.L14
.L13:
	movl	-12(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	P(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
.L14:
	addl	$1, -12(%rbp)
.L12:
	movl	-4(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L15
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	names(%rip), %rax
	addq	%rax, %rdx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	P(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-4(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	-4(%rbp), %eax
	testl	%eax, %eax
	jne	.L16
	movl	$0, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.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%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d %s\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	S(%rip), %r15
	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
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	M(%rip), %rbx
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	leaq	44(%rsp), %rax
	movl	%edi, 44(%rsp)
	movl	%esi, 40(%rsp)
	movl	%r8d, 36(%rsp)
	movq	%rax, 24(%rsp)
.L2:
	movq	24(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	44(%rsp), %eax
	testl	%eax, %eax
	je	.L30
	movl	$0, %eax
	movl	$40, %ecx
	leaq	names(%rip), %rdi
	rep stosq
	movl	$300, %ecx
	movq	%rbx, %rdi
	pxor	%xmm0, %xmm0
	rep stosq
	movl	$15, %ecx
	movq	%r15, %rdi
	movaps	%xmm0, P(%rip)
	rep stosq
	movaps	%xmm0, 16+P(%rip)
	movaps	%xmm0, 32+P(%rip)
	movaps	%xmm0, 48+P(%rip)
	movaps	%xmm0, 64+P(%rip)
	jle	.L18
	leaq	names(%rip), %rax
	movl	$0, 32(%rsp)
	leaq	36(%rsp), %r13
	movq	%rax, 8(%rsp)
	leaq	40(%rsp), %rax
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L5:
	movq	16(%rsp), %rdx
	movq	8(%rsp), %rsi
	xorl	%eax, %eax
	xorl	%r14d, %r14d
	leaq	.LC0(%rip), %rdi
	call	scanf@PLT
	movslq	32(%rsp), %rax
	movl	40(%rsp), %edi
	movq	%rax, %rbp
	salq	$4, %rbp
	subq	%rax, %rbp
	addq	%rbp, %rbp
	testl	%edi, %edi
	jle	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	scanf@PLT
	movslq	36(%rsp), %rax
	leaq	0(%rbp,%rax), %rcx
	addl	$1, (%r15,%rax,4)
	addl	$1, (%rbx,%rcx,4)
	cmpl	%r14d, 40(%rsp)
	jg	.L4
.L7:
	addl	$1, 32(%rsp)
	movl	44(%rsp), %r9d
	movl	32(%rsp), %eax
	addq	$16, 8(%rsp)
	cmpl	%eax, %r9d
	jg	.L5
	testl	%r9d, %r9d
	jle	.L31
	leaq	P(%rip), %rbp
	leal	-1(%r9), %eax
	leaq	4(%rbp), %rsi
	movq	%rbp, %rdx
	leaq	M(%rip), %rcx
	leaq	(%rsi,%rax,4), %r10
	leal	1(%r9), %edi
	.p2align 4,,10
	.p2align 3
.L11:
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L10:
	movl	(%rcx,%rax), %esi
	testl	%esi, %esi
	je	.L9
	movl	%edi, %esi
	subl	(%r15,%rax), %esi
	addl	%esi, (%rdx)
.L9:
	addq	$4, %rax
	cmpq	$120, %rax
	jne	.L10
	addq	$4, %rdx
	addq	$120, %rcx
	cmpq	%r10, %rdx
	jne	.L11
	movl	$0, 36(%rsp)
	movl	%r9d, %r14d
	xorl	%r13d, %r13d
	movl	$999, %ecx
	movl	$999, 40(%rsp)
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L34:
	je	.L32
.L14:
	addq	$1, %r13
	cmpq	%r13, %r14
	je	.L33
.L15:
	movl	0(%rbp,%r13,4), %edx
	movl	%r13d, 32(%rsp)
	cmpl	%ecx, %edx
	jge	.L34
	movl	%r13d, 36(%rsp)
	movl	%edx, %ecx
	movl	%edx, 40(%rsp)
.L35:
	addq	$1, %r13
	cmpq	%r13, %r14
	jne	.L15
.L33:
	movslq	36(%rsp), %rax
	leaq	names(%rip), %rdi
	movq	%rax, %rdx
	movl	0(%rbp,%rax,4), %esi
	salq	$4, %rdx
	addq	%rdi, %rdx
.L17:
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L2
.L32:
	movslq	36(%rsp), %rsi
	movq	%r13, %rdi
	leaq	names(%rip), %rax
	movl	%ecx, 8(%rsp)
	salq	$4, %rdi
	movl	%edx, 32(%rsp)
	salq	$4, %rsi
	addq	%rax, %rdi
	addq	%rax, %rsi
	call	strcmp@PLT
	movl	32(%rsp), %edx
	movl	8(%rsp), %ecx
	testl	%eax, %eax
	jns	.L14
	movl	%r13d, 36(%rsp)
	movl	%edx, %ecx
	movl	%edx, 40(%rsp)
	jmp	.L35
.L30:
	xorl	%edi, %edi
	call	exit@PLT
.L18:
	xorl	%esi, %esi
.L3:
	movl	$0, 36(%rsp)
	leaq	names(%rip), %rdx
	movl	$999, 40(%rsp)
	jmp	.L17
.L31:
	movl	P(%rip), %esi
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	P
	.bss
	.align 32
	.type	P, @object
	.size	P, 80
P:
	.zero	80
	.globl	S
	.align 32
	.type	S, @object
	.size	S, 120
S:
	.zero	120
	.globl	M
	.align 32
	.type	M, @object
	.size	M, 2400
M:
	.zero	2400
	.globl	names
	.align 32
	.type	names, @object
	.size	names, 320
names:
	.zero	320
	.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%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d %s\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	S(%rip), %r15
	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
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	M(%rip), %rbx
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	leaq	44(%rsp), %rax
	movl	%edi, 44(%rsp)
	movl	%esi, 40(%rsp)
	movl	%r8d, 36(%rsp)
	movq	%rax, 24(%rsp)
.L2:
	movq	24(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	44(%rsp), %eax
	testl	%eax, %eax
	je	.L30
	movl	$0, %eax
	movl	$40, %ecx
	leaq	names(%rip), %rdi
	rep stosq
	movl	$300, %ecx
	movq	%rbx, %rdi
	pxor	%xmm0, %xmm0
	rep stosq
	movl	$15, %ecx
	movq	%r15, %rdi
	movaps	%xmm0, P(%rip)
	rep stosq
	movaps	%xmm0, 16+P(%rip)
	movaps	%xmm0, 32+P(%rip)
	movaps	%xmm0, 48+P(%rip)
	movaps	%xmm0, 64+P(%rip)
	jle	.L18
	leaq	names(%rip), %rax
	movl	$0, 32(%rsp)
	leaq	36(%rsp), %r13
	movq	%rax, 8(%rsp)
	leaq	40(%rsp), %rax
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L5:
	movq	16(%rsp), %rdx
	movq	8(%rsp), %rsi
	xorl	%eax, %eax
	xorl	%r14d, %r14d
	leaq	.LC0(%rip), %rdi
	call	scanf@PLT
	movslq	32(%rsp), %rax
	movl	40(%rsp), %edi
	movq	%rax, %rbp
	salq	$4, %rbp
	subq	%rax, %rbp
	addq	%rbp, %rbp
	testl	%edi, %edi
	jle	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	scanf@PLT
	movslq	36(%rsp), %rax
	leaq	0(%rbp,%rax), %rcx
	addl	$1, (%r15,%rax,4)
	addl	$1, (%rbx,%rcx,4)
	cmpl	%r14d, 40(%rsp)
	jg	.L4
.L7:
	addl	$1, 32(%rsp)
	movl	44(%rsp), %r9d
	movl	32(%rsp), %eax
	addq	$16, 8(%rsp)
	cmpl	%eax, %r9d
	jg	.L5
	testl	%r9d, %r9d
	jle	.L31
	leaq	P(%rip), %rbp
	leal	-1(%r9), %eax
	leaq	4(%rbp), %rsi
	movq	%rbp, %rdx
	leaq	M(%rip), %rcx
	leaq	(%rsi,%rax,4), %r10
	leal	1(%r9), %edi
	.p2align 4,,10
	.p2align 3
.L11:
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L10:
	movl	(%rcx,%rax), %esi
	testl	%esi, %esi
	je	.L9
	movl	%edi, %esi
	subl	(%r15,%rax), %esi
	addl	%esi, (%rdx)
.L9:
	addq	$4, %rax
	cmpq	$120, %rax
	jne	.L10
	addq	$4, %rdx
	addq	$120, %rcx
	cmpq	%r10, %rdx
	jne	.L11
	movl	$0, 36(%rsp)
	movl	%r9d, %r14d
	xorl	%r13d, %r13d
	movl	$999, %ecx
	movl	$999, 40(%rsp)
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L34:
	je	.L32
.L14:
	addq	$1, %r13
	cmpq	%r13, %r14
	je	.L33
.L15:
	movl	0(%rbp,%r13,4), %edx
	movl	%r13d, 32(%rsp)
	cmpl	%ecx, %edx
	jge	.L34
	movl	%r13d, 36(%rsp)
	movl	%edx, %ecx
	movl	%edx, 40(%rsp)
.L35:
	addq	$1, %r13
	cmpq	%r13, %r14
	jne	.L15
.L33:
	movslq	36(%rsp), %rax
	leaq	names(%rip), %rdi
	movq	%rax, %rdx
	movl	0(%rbp,%rax,4), %esi
	salq	$4, %rdx
	addq	%rdi, %rdx
.L17:
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L2
.L32:
	movslq	36(%rsp), %rsi
	movq	%r13, %rdi
	leaq	names(%rip), %rax
	movl	%ecx, 8(%rsp)
	salq	$4, %rdi
	movl	%edx, 32(%rsp)
	salq	$4, %rsi
	addq	%rax, %rdi
	addq	%rax, %rsi
	call	strcmp@PLT
	movl	32(%rsp), %edx
	movl	8(%rsp), %ecx
	testl	%eax, %eax
	jns	.L14
	movl	%r13d, 36(%rsp)
	movl	%edx, %ecx
	movl	%edx, 40(%rsp)
	jmp	.L35
.L30:
	xorl	%edi, %edi
	call	exit@PLT
.L18:
	xorl	%esi, %esi
.L3:
	movl	$0, 36(%rsp)
	leaq	names(%rip), %rdx
	movl	$999, 40(%rsp)
	jmp	.L17
.L31:
	movl	P(%rip), %esi
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	P
	.bss
	.align 32
	.type	P, @object
	.size	P, 80
P:
	.zero	80
	.globl	S
	.align 32
	.type	S, @object
	.size	S, 120
S:
	.zero	120
	.globl	M
	.align 32
	.type	M, @object
	.size	M, 2400
M:
	.zero	2400
	.globl	names
	.align 32
	.type	names, @object
	.size	names, 320
names:
	.zero	320
	.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:

char names[20][16];
int M[20][30],S[30],P[20];
main(n,m,i,j,d){
  for(;scanf("%d",&n),n;printf("%d %s\n",P[d],names[d])){
    memset(names,0,sizeof names),
    memset(M,0,sizeof M),
    memset(S,0,sizeof S),
    memset(P,0,sizeof P);
    for(i=0;i<n;i++)
      for(scanf("%s%d",names[i],&m),j=0;j<m;j++)scanf("%d",&d),M[i][d]++,S[d]++;
    for(i=0;i<n;i++)
      for(j=0;j<30;j++)
        if(M[i][j])P[i]+=1+n-S[j];
    for(d=0,m=999,i=0;i<n;i++)
      if(P[i]<m||(P[i]==m&&strcmp(names[i],names[d])<0))d=i,m=P[i];
  }
  exit(0);
}
4
akzakr 2 1 8
fnmyi 5 2 3 4 6 9
tsnukk 5 2 3 4 7 9
yskwcnt 6 3 4 7 8 9 10
4
akzakr 1 2
fnmyi 3 10 11 12
tsnukk 2 1 8
yskwcnt 2 1 8
5
knmmdk 2 13 19
akmhmr 4 13 15 19 22
mksyk 6 3 7 12 13 15 19
skrkyk 3 1 4 8
tmemm 3 1 17 24
5
knmmdk 5 5 6 16 18 26
akmhmr 9 3 4 7 11 14 15 17 18 20
mksyk 5 6 13 25 27 28
skrkyk 4 3 16 23 24
tmemm 3 6 12 20
14
hrkamm 6 4 6 8 10 20 22
mkhsi 6 1 10 12 15 22 27
hbkgnh 2 4 9
chyksrg 8 3 4 12 15 16 20 25 28
mktkkc 6 0 1 8 15 17 20
tknsj 6 6 8 18 19 25 26
yyitktk 3 3 12 18
ykhhgwr 5 3 9 10 11 24
amftm 7 2 6 8 12 13 14 17
mmftm 4 6 12 16 18
rtkakzk 3 14 15 21
azsmur 7 1 2 4 12 15 18 20
iormns 2 4 20
ktrotns 6 7 12 14 17 20 25
14
hrkamm 2 4 21
mkhsi 6 2 3 8 11 18 20
hbkgnh 4 4 16 28 29
chyksrg 5 1 3 9 17 22
mktkkc 2 7 18
tknsj 3 3 9 23
yyitktk 3 10 13 25
ykhhgwr 2 18 26
amftm 3 13 18 22
mmftm 4 1 20 24 27
rtkakzk 2 1 10
azsmur 5 2 5 10 14 17
iormns 3 9 15 16
ktrotns 5 7 12 16 17 20
0
 4
akzakr 2 1 8
fnmyi 5 2 3 4 6 9
tsnukk 5 2 3 4 7 9
yskwcnt 6 3 4 7 8 9 10
4
akzakr 1 2
fnmyi 3 10 11 12
tsnukk 2 1 8
yskwcnt 2 1 8
5
knmmdk 2 13 19
akmhmr 4 13 15 19 22
mksyk 6 3 7 12 13 15 19
skrkyk 3 1 4 8
tmemm 3 1 17 24
5
knmmdk 5 5 6 16 18 26
akmhmr 9 3 4 7 11 14 15 17 18 20
mksyk 5 6 13 25 27 28
skrkyk 4 3 16 23 24
tmemm 3 6 12 20
14
hrkamm 6 4 6 8 10 20 22
mkhsi 6 1 10 12 15 22 27
hbkgnh 2 4 9
chyksrg 8 3 4 13 15 16 20 25 28
mktkkc 6 0 1 8 15 5 20
tknsj 6 6 1 18 19 25 26
yyitktk 3 3 12 18
ykhhgwr 5 3 9 10 11 24
amftm 7 2 6 8 12 13 14 17
mmftm 4 6 12 16 18
rtkakzk 3 14 15 21
azsmur 7 1 2 4 12 15 18 20
iormns 2 0 20
ktrotns 6 3 12 14 17 20 25
14
hrkamm 2 4 21
mkhsi 6 2 3 8 11 18 20
hbkgnh 4 4 16 28 29
chyksrg 5 1 3 9 17 22
mktkkc 2 7 18
tknsj 3 3 9 23
yyitktk 3 10 13 25
ykhhgwr 2 18 26
amftm 3 13 18 22
mmftm 4 1 20 24 27
rtkakzk 2 1 10
azsmur 5 2 5 10 14 17
iormns 3 9 15 16
ktrotns 5 7 12 16 17 20
0
 4
akzakr 2 1 8
fnmyi 5 2 3 4 6 9
tsnukk 5 2 3 4 7 9
yskwcnt 6 3 4 7 8 9 10
4
akzakr 1 2
fnmyi 3 10 11 12
tsnukk 2 1 8
yskwcnt 2 1 8
5
knmmdk 2 13 19
akmhmr 4 13 15 19 22
mksyk 6 3 7 12 13 15 19
skrkyk 3 1 4 8
tmemm 3 1 17 24
5
knmmdk 5 5 6 16 18 26
akmhmr 9 3 4 7 11 14 15 17 18 20
mksyk 5 6 13 25 27 28
skrkyk 4 3 16 23 24
tmemm 3 6 12 20
14
hrkamm 6 4 6 11 10 20 22
mkhsi 6 1 10 12 15 22 27
hbkgnh 2 4 9
chyksqg 8 3 4 13 15 16 20 25 28
mktkkc 6 0 1 8 15 5 20
tknsj 6 6 1 18 19 25 26
yyitktk 3 3 12 18
ykhhgwr 5 1 9 10 11 24
amftm 7 2 6 8 12 13 14 17
mmftm 4 6 12 16 18
rtkakzk 3 14 15 21
azsmur 7 1 2 4 12 15 18 20
iormns 2 0 20
ktrotns 6 3 12 14 17 20 25
14
hrkamm 2 4 21
mkhsi 6 2 3 8 11 18 20
hbkgnh 4 4 16 28 29
grskyhc 5 1 3 9 17 22
mktkkc 2 7 18
tknsj 3 3 9 23
yyitktk 3 10 13 25
ykhhgwr 2 18 26
amftm 3 13 18 22
mmftm 4 1 20 24 27
rtkakzk 2 1 10
azsmur 5 2 5 10 14 17
iormns 3 9 15 16
ktrotns 5 5 12 16 17 20
0
 4
akzakr 2 1 8
fnmyi 5 2 3 4 6 9
tsnukk 5 2 3 4 7 9
yskwcnt 6 3 4 7 8 9 10
4
akzakr 1 2
fnmyi 3 10 11 12
tsnukk 2 1 8
yskwcnt 2 1 8
5
knmmdk 2 13 19
akmhmr 4 13 15 19 22
mksyk 6 3 7 12 13 15 19
skrkyk 3 1 4 8
tmemm 3 1 17 24
5
knmmdk 5 5 6 16 18 26
akmhmr 9 3 4 7 11 14 15 17 18 20
mksyk 5 6 13 25 27 28
skrkyk 4 3 16 23 24
tmemm 3 6 12 20
14
hrkamm 6 4 6 8 10 20 22
mkhsi 6 1 10 12 15 22 27
hbkgnh 2 4 14
chyksrg 8 3 4 13 15 16 20 6 28
mktkkc 6 0 1 8 15 5 20
tknsj 6 6 1 18 19 25 26
yyitktk 3 3 12 18
ykhhgwr 5 3 9 10 11 24
amftm 7 2 6 8 12 13 14 17
mmftm 4 6 12 16 18
rtkakzk 3 14 15 21
azsmur 7 1 2 4 12 15 18 20
iormns 2 0 20
ktrotns 6 3 12 14 17 20 25
14
hrkamm 2 4 21
mkhsi 6 2 3 8 11 18 20
hbkgnh 4 4 16 28 29
chyksrg 5 1 3 9 23 22
mktkkc 2 7 18
tknsj 3 3 9 23
yyitktk 3 10 13 25
ykhhgwr 2 18 26
amftm 3 13 18 22
mmftm 4 1 20 24 27
rtkakzk 2 1 10
azsmur 5 2 5 10 14 17
iormns 3 9 15 16
ktrotns 5 7 12 16 17 20
0
 4
akzakr 2 1 8
fnmyi 5 2 3 4 6 9
tsnukk 5 2 3 4 7 9
yskwcnt 6 3 4 7 8 9 10
4
akzakr 1 2
fnmyi 3 5 11 12
tsnukk 2 1 8
yskwcnt 2 1 8
5
knmmdk 2 13 19
akmhmr 4 13 15 19 22
mksyk 6 3 7 12 13 15 19
skrkyk 3 1 4 8
tmemm 3 1 17 24
5
knmmdk 5 5 6 16 18 26
akmhmr 9 3 4 7 11 14 15 17 18 20
mksyk 5 6 13 25 27 28
skrkyk 4 3 16 23 24
tmemm 3 6 12 20
14
hrkamm 6 4 6 8 10 20 22
mkhsi 6 1 10 12 15 22 27
hbkgni 2 4 9
chyksqg 8 3 4 13 15 16 20 25 28
mktkkc 6 0 1 8 15 5 20
tknsj 6 0 1 18 19 25 26
yyitktk 3 3 12 18
ykhhgwr 5 3 9 10 11 24
amftm 7 2 6 8 12 13 14 17
mmftm 4 6 12 16 18
rtkakzk 3 14 15 21
azsmur 7 1 2 4 12 15 18 20
iormns 2 0 20
ktrotns 6 3 12 14 17 20 25
14
hrkamm 2 4 21
mkhsi 6 2 3 8 11 18 20
hbkgnh 4 4 16 28 29
grskyhc 5 1 3 9 17 22
mktkkc 2 7 18
tknsj 3 3 9 23
yyitktk 3 10 13 25
ykhhgwr 2 18 26
amftm 3 13 18 22
mmftm 4 1 20 24 27
rtkakzk 2 1 10
azsmur 5 2 5 10 14 17
iormns 3 9 15 16
ktrotns 5 7 12 16 17 20
0
 4
akzakr 2 1 8
fnmyi 5 2 3 4 6 9
tsnukk 5 2 2 4 7 9
yskwcnt 6 3 4 7 8 9 10
4
akzakr 1 2
fnmyi 3 10 11 12
tsnukk 2 1 8
yskwcnt 2 1 8
5
knmmdk 2 13 19
akmhmr 4 13 15 19 22
mksyk 6 3 7 12 13 15 19
skrkyk 3 1 4 8
tmemm 3 1 17 24
5
knmmdk 5 5 6 16 18 26
akmhmr 9 3 4 7 11 14 15 17 18 20
mksyk 5 6 13 25 27 28
skrkyk 4 3 16 23 24
tmemm 3 6 12 20
14
hrkamm 6 4 6 8 10 20 22
mkhsi 6 1 10 12 15 22 27
hbkgnh 2 4 9
chyksrg 8 3 4 13 15 16 20 25 28
mktkkc 6 0 1 8 15 5 20
tknsj 6 6 1 18 19 25 26
yyitktk 3 6 12 18
ykhhgwr 5 3 9 10 11 24
amftm 7 2 6 8 12 13 14 17
mmftm 4 6 12 16 18
rtkakzk 3 14 15 21
azsmur 7 1 2 4 12 15 18 20
iormns 2 0 20
ktrotns 6 3 12 14 17 20 25
14
hrkamm 2 4 21
mkhsi 6 2 3 8 11 18 20
hbkgnh 4 4 16 28 29
grskyhc 5 1 3 9 17 22
mktkkc 2 7 18
tknsj 3 3 9 23
yyitktk 3 10 13 25
ykhggwr 2 18 26
amftm 3 13 18 22
mmftm 4 1 20 24 27
rtkakzk 2 1 10
azsmur 5 2 5 10 14 17
ionmrs 3 9 15 16
ktrotns 5 7 12 18 17 20
0
 4
akzakr 2 1 8
fnmyi 5 2 3 4 6 9
tsnukk 5 2 3 4 7 9
yskwcnt 6 3 4 7 8 9 10
4
akzakr 1 2
fnmyi 3 10 11 12
tsnukk 2 1 8
yskwcnt 2 1 8
5
knmmdk 2 13 19
akmhmr 4 13 15 19 22
mksyk 6 3 7 12 13 15 19
skrkyk 3 1 4 8
tmemm 3 1 17 24
5
knmmdk 5 5 6 16 18 26
akmhmr 9 3 4 7 11 14 15 17 18 20
mksyk 5 6 13 25 27 28
skrkyk 4 3 16 23 24
tmemm 3 6 12 20
14
hrkamm 6 4 6 8 10 20 22
mkhsi 6 1 10 12 15 22 27
hbkgnh 2 4 9
chyksrg 8 3 4 13 15 16 20 6 28
mktkkc 6 0 1 8 15 5 20
tknsj 6 6 1 18 19 25 26
yyitktk 3 3 12 18
ykhhgwr 5 3 9 10 11 24
amftm 7 2 6 8 12 13 14 17
mmftm 4 6 12 16 18
rtkakzk 3 14 15 21
azsmur 7 1 2 4 12 15 18 20
iormns 2 0 20
ktrotns 6 3 12 14 17 20 25
14
hrkamm 2 4 21
mkhsi 6 2 3 8 11 18 20
hbkgnh 4 4 16 28 29
chyksrg 5 1 3 9 17 22
mktkkc 2 7 18
tknsj 3 3 9 23
yyitktk 3 10 13 25
ykhhgwr 2 18 26
amftm 3 13 18 22
mmftm 4 1 20 24 27
rtkakzk 2 1 10
azsmur 5 2 1 10 14 17
iormns 3 9 15 16
ktrotns 5 7 12 16 17 20
0
 4
akzakr 2 1 8
fnmyi 5 2 3 4 6 9
tsnukk 5 2 3 4 7 9
yskwcnt 6 3 0 7 8 9 10
4
akzakr 1 2
fnmyi 3 10 11 12
tsnukk 2 1 8
yskwcnt 2 1 8
5
knmmdk 2 13 19
akmhmr 4 13 15 19 22
mksyk 6 3 7 12 13 15 19
skrkyk 3 1 4 8
tmemm 3 1 17 24
5
knmmdk 5 5 6 16 18 26
akmhmr 9 3 4 7 11 14 15 17 18 20
mksyk 5 6 13 25 27 28
skrkyk 4 3 16 23 24
tmemm 3 6 12 20
14
hrkamm 6 4 6 8 10 20 22
mkhsi 6 1 10 12 15 22 27
hbkgnh 2 4 9
chyksrg 8 3 4 12 15 16 20 25 28
mktkkc 6 0 1 8 15 17 20
tknsj 6 6 8 18 19 25 26
yyitktk 3 3 20 18
ykhhgwr 5 3 9 10 11 24
amftm 7 2 6 8 12 13 14 17
mmftm 4 6 12 16 18
rtkakzk 3 14 15 21
azsmur 7 1 2 4 12 15 18 20
iormns 2 4 20
ktrotns 6 7 12 14 17 20 25
14
hrkamm 2 4 21
mkhsi 6 2 3 8 11 18 20
hbkgnh 4 4 16 28 29
chyksrg 5 1 3 9 17 22
mktkkc 2 7 18
tknsj 3 3 9 23
yyitktk 3 10 13 25
ykhhgwr 2 18 26
amftm 3 13 18 22
mmftm 4 1 20 24 27
rtkakzk 2 1 10
azsmur 5 2 5 10 14 17
iormns 3 9 15 16
ktrotns 5 7 12 16 17 12
0
 4
akzakr 2 1 8
fnmyi 5 2 3 4 6 9
tsnukk 5 2 3 4 7 9
yskwcnt 6 3 4 7 8 9 10
4
akzakr 1 2
fnmyi 3 10 11 12
tsnukk 2 1 8
yskwcnt 2 1 8
5
knmmdk 2 13 19
akmhmr 4 13 15 19 22
mksyk 6 3 7 12 13 15 19
skrkyk 3 1 4 8
tmemm 3 1 17 24
5
knmmdk 5 5 6 16 21 26
akmhmr 9 3 4 7 11 14 15 17 18 20
mksyk 5 6 13 25 27 28
skrkyk 4 3 16 23 24
smemm 3 6 12 20
14
hrkamm 6 4 6 8 10 20 22
mkhsi 6 1 10 12 15 22 27
hbkgnh 2 4 9
chyksrg 8 3 4 12 15 16 20 25 28
mktkkc 6 0 1 8 15 5 20
tknsj 6 6 1 18 19 25 26
yyitktk 3 3 12 18
ykhhgwr 5 3 9 10 11 24
amftm 7 2 6 8 12 13 14 17
mmftm 4 6 12 16 18
rtkakzk 3 14 15 21
azsmur 7 1 2 4 12 15 18 20
iormns 2 4 20
ktrotns 6 3 12 14 17 20 25
14
hrkamm 2 4 21
mkhsi 6 2 3 8 11 18 20
hbkgnh 4 4 16 28 29
chyksrg 5 1 3 9 17 22
mktkkc 2 7 18
tknsj 3 3 9 23
yyitktk 3 10 13 25
ykhhgwr 2 18 26
amftm 3 13 18 22
mmftm 4 1 20 24 27
rtkakzk 2 1 10
azsmur 5 2 5 10 14 17
iormns 3 9 15 16
ktrotns 5 7 12 16 17 20
0
 4
akzakr 2 1 8
fnmyi 5 2 3 4 6 9
tsnukk 5 2 3 4 7 9
yskwcnt 6 3 4 7 8 9 10
4
akzakr 1 2
fnmyi 3 7 11 12
tsnukk 2 1 8
yskwcnt 2 1 8
5
knmmdk 2 13 19
akmhmr 4 13 15 19 22
mksyk 6 3 7 12 13 15 19
skrkyk 3 1 4 8
tmemm 3 1 17 24
5
knmmdk 5 5 12 16 18 26
akmhmr 9 3 4 7 11 14 15 17 18 20
mksyk 5 6 13 25 27 28
skrkyk 4 3 16 23 24
tmemm 3 6 12 20
14
hrkamm 6 4 6 8 10 20 22
mkhsi 6 1 10 12 15 22 27
hbkgnh 2 4 9
chyksrg 8 3 4 12 15 16 20 25 28
mktkkc 6 0 1 8 15 5 20
tknsj 6 6 8 18 19 25 26
yyitktk 3 3 12 18
ykhhgwr 5 3 9 10 11 24
amftm 7 2 6 8 12 13 14 17
mmftm 4 6 12 16 18
rtkakzk 3 14 15 21
azsmur 7 1 2 4 12 15 18 20
iormns 2 4 20
ktrotns 6 7 12 14 17 20 25
14
hrkamm 2 4 21
mkhsi 6 2 3 8 11 18 20
hbkgnh 4 4 16 28 29
chyksrg 5 1 3 9 17 22
mktkkc 2 7 18
tknsj 3 3 9 23
yyitktk 3 10 13 25
ykhhgwr 2 18 26
amftm 3 13 18 22
mmftm 4 1 20 24 27
rtkakzk 2 1 10
azsmur 5 2 5 10 14 17
iormns 3 9 15 16
ktrotns 5 9 12 16 17 20
0

7 akzakr
4 akzakr
6 knmmdk
12 tmemm
19 iormns
24 mktkkc
 7 akzakr
4 akzakr
6 knmmdk
12 tmemm
22 iormns
24 mktkkc
 7 akzakr
4 akzakr
6 knmmdk
12 tmemm
22 iormns
24 rtkakzk
 7 akzakr
4 akzakr
6 knmmdk
12 tmemm
22 hbkgnh
24 mktkkc
 7 akzakr
4 akzakr
6 knmmdk
12 tmemm
21 iormns
24 mktkkc
 7 akzakr
4 akzakr
6 knmmdk
12 tmemm
22 iormns
23 mktkkc
 7 akzakr
4 akzakr
6 knmmdk
12 tmemm
22 iormns
23 rtkakzk
 7 akzakr
4 akzakr
6 knmmdk
12 tmemm
18 iormns
24 mktkkc
 7 akzakr
4 akzakr
6 knmmdk
12 smemm
19 iormns
24 mktkkc
 7 akzakr
4 akzakr
6 knmmdk
12 tmemm
19 iormns
24 rtkakzk

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

```c
char names[20][16];
int M[20][30],S[30],P[20];
main(n,m,i,j,d){
  for(;scanf("%d",&n),n;printf("%d %s\n",P[d],names[d])){
    memset(names,0,sizeof names),
    memset(M,0,sizeof M),
    memset(S,0,sizeof S),
    memset(P,0,sizeof P);
    for(i=0;i<n;i++)
      for(scanf("%s%d",names[i],&m),j=0;j<m;j++)scanf("%d",&d),M[i][d]++,S[d]++;
    for(i=0;i<n;i++)
      for(j=0;j<30;j++)
        if(M[i][j])P[i]+=1+n-S[j];
    for(d=0,m=999,i=0;i<n;i++)
      if(P[i]<m||(P[i]==m&&strcmp(names[i],names[d])<0))d=i,m=P[i];
  }
  exit(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	names
	.bss
	.align 32
	.type	names, @object
	.size	names, 320
names:
	.zero	320
	.globl	M
	.align 32
	.type	M, @object
	.size	M, 2400
M:
	.zero	2400
	.globl	S
	.align 32
	.type	S, @object
	.size	S, 120
S:
	.zero	120
	.globl	P
	.align 32
	.type	P, @object
	.size	P, 80
P:
	.zero	80
	.section	.rodata
.LC0:
	.string	"%s%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d %s\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	%ecx, -16(%rbp)
	movl	%r8d, -20(%rbp)
	jmp	.L2
.L16:
	movl	$320, %edx
	movl	$0, %esi
	leaq	names(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$2400, %edx
	movl	$0, %esi
	leaq	M(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$120, %edx
	movl	$0, %esi
	leaq	S(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$80, %edx
	movl	$0, %esi
	leaq	P(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -12(%rbp)
	jmp	.L3
.L6:
	movl	-12(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	names(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-8(%rbp), %rax
	movq	%rax, %rdx
	movq	%rcx, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L4
.L5:
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	-20(%rbp), %edx
	movslq	%edx, %rsi
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$4, %rax
	subq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rcx
	leaq	M(%rip), %rax
	movl	(%rcx,%rax), %eax
	leal	1(%rax), %ecx
	movslq	%edx, %rsi
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	M(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	S(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	S(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -16(%rbp)
.L4:
	movl	-8(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L5
	addl	$1, -12(%rbp)
.L3:
	movl	-4(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L6
	movl	$0, -12(%rbp)
	jmp	.L7
.L11:
	movl	$0, -16(%rbp)
	jmp	.L8
.L10:
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	M(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L9
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	P(%rip), %rax
	movl	(%rdx,%rax), %esi
	movl	-4(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	S(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	leal	(%rsi,%rdx), %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	P(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L9:
	addl	$1, -16(%rbp)
.L8:
	cmpl	$29, -16(%rbp)
	jle	.L10
	addl	$1, -12(%rbp)
.L7:
	movl	-4(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L11
	movl	$0, -20(%rbp)
	movl	$999, -8(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L12
.L15:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	P(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L13
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	P(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L14
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	names(%rip), %rax
	addq	%rax, %rdx
	movl	-12(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	names(%rip), %rax
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jns	.L14
.L13:
	movl	-12(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	P(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
.L14:
	addl	$1, -12(%rbp)
.L12:
	movl	-4(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L15
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	names(%rip), %rax
	addq	%rax, %rdx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	P(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-4(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	-4(%rbp), %eax
	testl	%eax, %eax
	jne	.L16
	movl	$0, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.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	names
	.bss
	.align 32
	.type	names, @object
	.size	names, 320
names:
	.zero	320
	.globl	M
	.align 32
	.type	M, @object
	.size	M, 2400
M:
	.zero	2400
	.globl	S
	.align 32
	.type	S, @object
	.size	S, 120
S:
	.zero	120
	.globl	P
	.align 32
	.type	P, @object
	.size	P, 80
P:
	.zero	80
	.section	.rodata
.LC0:
	.string	"%s%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d %s\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	%ecx, -16(%rbp)
	movl	%r8d, -20(%rbp)
	jmp	.L2
.L16:
	movl	$320, %edx
	movl	$0, %esi
	leaq	names(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$2400, %edx
	movl	$0, %esi
	leaq	M(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$120, %edx
	movl	$0, %esi
	leaq	S(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$80, %edx
	movl	$0, %esi
	leaq	P(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -12(%rbp)
	jmp	.L3
.L6:
	movl	-12(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	names(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-8(%rbp), %rax
	movq	%rax, %rdx
	movq	%rcx, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L4
.L5:
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	-20(%rbp), %edx
	movslq	%edx, %rsi
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$4, %rax
	subq	%rcx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rcx
	leaq	M(%rip), %rax
	movl	(%rcx,%rax), %eax
	leal	1(%rax), %ecx
	movslq	%edx, %rsi
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	M(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	S(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	S(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -16(%rbp)
.L4:
	movl	-8(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L5
	addl	$1, -12(%rbp)
.L3:
	movl	-4(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L6
	movl	$0, -12(%rbp)
	jmp	.L7
.L11:
	movl	$0, -16(%rbp)
	jmp	.L8
.L10:
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	M(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L9
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	P(%rip), %rax
	movl	(%rdx,%rax), %esi
	movl	-4(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	S(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	leal	(%rsi,%rdx), %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	P(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L9:
	addl	$1, -16(%rbp)
.L8:
	cmpl	$29, -16(%rbp)
	jle	.L10
	addl	$1, -12(%rbp)
.L7:
	movl	-4(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L11
	movl	$0, -20(%rbp)
	movl	$999, -8(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L12
.L15:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	P(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L13
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	P(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L14
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	names(%rip), %rax
	addq	%rax, %rdx
	movl	-12(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	names(%rip), %rax
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jns	.L14
.L13:
	movl	-12(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	P(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
.L14:
	addl	$1, -12(%rbp)
.L12:
	movl	-4(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L15
	movl	-20(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	names(%rip), %rax
	addq	%rax, %rdx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	P(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-4(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	-4(%rbp), %eax
	testl	%eax, %eax
	jne	.L16
	movl	$0, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.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:
