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>

int main(void)
{
	int W[15], L[15], r;
	int i, j, n, max;
	char t[15];
	
	while (1){
		
		scanf("%d", &n);
		
		if (n == 0){
			break;
		}
		
		for (i = 0; i < n; i++){
			scanf(" %c", &t[i]);
			W[i] = 0;
			L[i] = 0;
			
			for (j = 0; j < n - 1; j++){
				scanf ("%d", &r);
				
				if (r == 0){
					W[i]++;
				}
				else if (r == 1){
					L[i]++;
				}
			}
		}
		
		for (i = 0; i < n; i++){
			max = 0;
			for (j = 0; j < n; j++){
				
				if (W[max] < W[j]){
					max = j;
				}
				else if (W[max] == W[j]){
					if (L[max] > L[j]){
						max = j;
					}
				}
			}
			printf("%c\n", t[max]);
			W[max] = -1;
		}
	}
	return (0);
}
				
					
				```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	" %c"
.LC2:
	.string	"%c\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	$192, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L16:
	leaq	-176(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-176(%rbp), %eax
	testl	%eax, %eax
	je	.L20
	movl	$0, -172(%rbp)
	jmp	.L4
.L9:
	leaq	-23(%rbp), %rdx
	movl	-172(%rbp), %eax
	cltq
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-172(%rbp), %eax
	cltq
	movl	$0, -160(%rbp,%rax,4)
	movl	-172(%rbp), %eax
	cltq
	movl	$0, -96(%rbp,%rax,4)
	movl	$0, -168(%rbp)
	jmp	.L5
.L8:
	leaq	-180(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-180(%rbp), %eax
	testl	%eax, %eax
	jne	.L6
	movl	-172(%rbp), %eax
	cltq
	movl	-160(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-172(%rbp), %eax
	cltq
	movl	%edx, -160(%rbp,%rax,4)
	jmp	.L7
.L6:
	movl	-180(%rbp), %eax
	cmpl	$1, %eax
	jne	.L7
	movl	-172(%rbp), %eax
	cltq
	movl	-96(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-172(%rbp), %eax
	cltq
	movl	%edx, -96(%rbp,%rax,4)
.L7:
	addl	$1, -168(%rbp)
.L5:
	movl	-176(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -168(%rbp)
	jl	.L8
	addl	$1, -172(%rbp)
.L4:
	movl	-176(%rbp), %eax
	cmpl	%eax, -172(%rbp)
	jl	.L9
	movl	$0, -172(%rbp)
	jmp	.L10
.L15:
	movl	$0, -164(%rbp)
	movl	$0, -168(%rbp)
	jmp	.L11
.L14:
	movl	-164(%rbp), %eax
	cltq
	movl	-160(%rbp,%rax,4), %edx
	movl	-168(%rbp), %eax
	cltq
	movl	-160(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L12
	movl	-168(%rbp), %eax
	movl	%eax, -164(%rbp)
	jmp	.L13
.L12:
	movl	-164(%rbp), %eax
	cltq
	movl	-160(%rbp,%rax,4), %edx
	movl	-168(%rbp), %eax
	cltq
	movl	-160(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L13
	movl	-164(%rbp), %eax
	cltq
	movl	-96(%rbp,%rax,4), %edx
	movl	-168(%rbp), %eax
	cltq
	movl	-96(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L13
	movl	-168(%rbp), %eax
	movl	%eax, -164(%rbp)
.L13:
	addl	$1, -168(%rbp)
.L11:
	movl	-176(%rbp), %eax
	cmpl	%eax, -168(%rbp)
	jl	.L14
	movl	-164(%rbp), %eax
	cltq
	movzbl	-23(%rbp,%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-164(%rbp), %eax
	cltq
	movl	$-1, -160(%rbp,%rax,4)
	addl	$1, -172(%rbp)
.L10:
	movl	-176(%rbp), %eax
	cmpl	%eax, -172(%rbp)
	jl	.L15
	jmp	.L16
.L20:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.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	"%d"
.LC1:
	.string	" %c"
.LC2:
	.string	"%c\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$200, %rsp
	.cfi_def_cfa_offset 256
	movq	%fs:40, %rax
	movq	%rax, 184(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L4:
	movq	8(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	je	.L2
	jle	.L4
	leaq	169(%rsp), %rax
	leaq	32(%rsp), %rbx
	xorl	%r13d, %r13d
	movq	%rax, (%rsp)
	leaq	96(%rsp), %r14
	leaq	24(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L9:
	movq	(%rsp), %rax
	leaq	.LC1(%rip), %rdi
	leaq	(%rax,%r13), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	movl	$0, (%rbx)
	movl	$0, (%r14,%r13,4)
	cmpl	$1, %eax
	jle	.L5
	xorl	%r15d, %r15d
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L116:
	addl	$1, (%rbx)
.L7:
	movl	28(%rsp), %eax
	addl	$1, %r15d
	leal	-1(%rax), %ecx
	cmpl	%r15d, %ecx
	jle	.L115
.L8:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	testl	%eax, %eax
	je	.L116
	cmpl	$1, %eax
	jne	.L7
	movl	28(%rsp), %eax
	addl	$1, %r15d
	addl	$1, (%r14,%r13,4)
	leal	-1(%rax), %ecx
	cmpl	%r15d, %ecx
	jg	.L8
	.p2align 4,,10
	.p2align 3
.L115:
	addq	$1, %r13
	addq	$4, %rbx
	cmpl	%r13d, %eax
	jg	.L9
	.p2align 4,,10
	.p2align 3
.L5:
	testl	%eax, %eax
	jle	.L4
	xorl	%r12d, %r12d
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L130:
	je	.L117
	movl	%ecx, %esi
.L13:
	cmpl	$3, %eax
	je	.L113
.L100:
	movl	44(%rsp), %ecx
	cmpl	%ecx, %esi
	jl	.L35
	je	.L118
	movl	%esi, %ecx
.L14:
	cmpl	$4, %eax
	je	.L113
	movl	48(%rsp), %esi
	cmpl	%esi, %ecx
	jl	.L38
	je	.L119
	movl	%ecx, %esi
.L15:
	cmpl	$5, %eax
	je	.L113
	movl	52(%rsp), %ecx
	cmpl	%ecx, %esi
	jl	.L41
	je	.L120
	movl	%esi, %ecx
.L16:
	cmpl	$6, %eax
	je	.L113
	movl	56(%rsp), %esi
	cmpl	%esi, %ecx
	jl	.L44
	je	.L121
	movl	%ecx, %esi
.L17:
	cmpl	$7, %eax
	je	.L113
	movl	60(%rsp), %ecx
	cmpl	%ecx, %esi
	jl	.L47
	je	.L122
	movl	%esi, %ecx
.L18:
	cmpl	$8, %eax
	je	.L113
	movl	64(%rsp), %esi
	cmpl	%esi, %ecx
	jl	.L50
	je	.L123
	movl	%ecx, %esi
.L19:
	cmpl	$9, %eax
	je	.L113
	movl	68(%rsp), %ecx
	cmpl	%ecx, %esi
	jl	.L53
	je	.L124
	movl	%esi, %ecx
.L20:
	cmpl	$10, %eax
	je	.L113
	movl	72(%rsp), %esi
	cmpl	%esi, %ecx
	jl	.L56
	je	.L125
	movl	%ecx, %esi
.L21:
	cmpl	$11, %eax
	je	.L113
	movl	76(%rsp), %ecx
	cmpl	%ecx, %esi
	jl	.L59
	je	.L126
	movl	%esi, %ecx
.L22:
	cmpl	$12, %eax
	je	.L113
	movl	80(%rsp), %esi
	cmpl	%esi, %ecx
	jl	.L62
	je	.L127
	movl	%ecx, %esi
.L23:
	cmpl	$13, %eax
	je	.L113
	movl	84(%rsp), %ecx
	cmpl	%ecx, %esi
	jl	.L65
	je	.L128
	movl	%esi, %ecx
.L24:
	cmpl	$14, %eax
	je	.L113
	movl	$14, %ebx
	cmpl	%ecx, 88(%rsp)
	jg	.L11
	movslq	%edx, %rbx
	jne	.L11
	movl	152(%rsp), %eax
	cmpl	%eax, 96(%rsp,%rbx,4)
	movl	$14, %eax
	cmovg	%rax, %rbx
	.p2align 4,,10
	.p2align 3
.L11:
	movsbl	169(%rsp,%rbx), %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__printf_chk@PLT
	movl	28(%rsp), %eax
	movl	$-1, 32(%rsp,%rbx,4)
	cmpl	%r12d, %eax
	jle	.L4
.L26:
	movl	32(%rsp), %esi
	movl	96(%rsp), %edi
	cmpl	$1, %eax
	je	.L28
	movl	36(%rsp), %ecx
	movl	$1, %edx
	cmpl	%ecx, %esi
	jl	.L12
	je	.L129
	movl	%esi, %ecx
	xorl	%edx, %edx
.L12:
	cmpl	$2, %eax
	je	.L113
	movl	40(%rsp), %esi
	cmpl	%esi, %ecx
	jge	.L130
	movl	$2, %edx
	cmpl	$3, %eax
	jne	.L100
	.p2align 4,,10
	.p2align 3
.L113:
	movslq	%edx, %rbx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L35:
	movl	$3, %edx
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L38:
	movl	$4, %edx
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L41:
	movl	$5, %edx
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L44:
	movl	$6, %edx
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L47:
	movl	$7, %edx
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L50:
	movl	$8, %edx
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L53:
	movl	$9, %edx
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L129:
	xorl	%edx, %edx
	cmpl	100(%rsp), %edi
	setg	%dl
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L56:
	movl	$10, %edx
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L117:
	movslq	%edx, %rbx
	movl	104(%rsp), %edi
	movl	$2, %ecx
	cmpl	%edi, 96(%rsp,%rbx,4)
	cmovg	%ecx, %edx
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L28:
	xorl	%ebx, %ebx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L59:
	movl	$11, %edx
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L118:
	movslq	%edx, %rbx
	movl	108(%rsp), %edi
	movl	$3, %esi
	cmpl	%edi, 96(%rsp,%rbx,4)
	cmovg	%esi, %edx
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L62:
	movl	$12, %edx
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L119:
	movslq	%edx, %rbx
	movl	112(%rsp), %edi
	movl	$4, %ecx
	cmpl	%edi, 96(%rsp,%rbx,4)
	cmovg	%ecx, %edx
	jmp	.L15
.L65:
	movl	$13, %edx
	jmp	.L24
.L120:
	movslq	%edx, %rbx
	movl	116(%rsp), %edi
	movl	$5, %esi
	cmpl	%edi, 96(%rsp,%rbx,4)
	cmovg	%esi, %edx
	jmp	.L16
.L121:
	movslq	%edx, %rbx
	movl	120(%rsp), %edi
	movl	$6, %ecx
	cmpl	%edi, 96(%rsp,%rbx,4)
	cmovg	%ecx, %edx
	jmp	.L17
.L122:
	movslq	%edx, %rbx
	movl	124(%rsp), %edi
	movl	$7, %esi
	cmpl	%edi, 96(%rsp,%rbx,4)
	cmovg	%esi, %edx
	jmp	.L18
.L123:
	movslq	%edx, %rbx
	movl	128(%rsp), %edi
	movl	$8, %ecx
	cmpl	%edi, 96(%rsp,%rbx,4)
	cmovg	%ecx, %edx
	jmp	.L19
.L124:
	movslq	%edx, %rbx
	movl	132(%rsp), %edi
	movl	$9, %esi
	cmpl	%edi, 96(%rsp,%rbx,4)
	cmovg	%esi, %edx
	jmp	.L20
.L125:
	movslq	%edx, %rbx
	movl	136(%rsp), %edi
	movl	$10, %ecx
	cmpl	%edi, 96(%rsp,%rbx,4)
	cmovg	%ecx, %edx
	jmp	.L21
.L126:
	movslq	%edx, %rbx
	movl	140(%rsp), %edi
	movl	$11, %esi
	cmpl	%edi, 96(%rsp,%rbx,4)
	cmovg	%esi, %edx
	jmp	.L22
.L127:
	movslq	%edx, %rbx
	movl	144(%rsp), %edi
	movl	$12, %ecx
	cmpl	%edi, 96(%rsp,%rbx,4)
	cmovg	%ecx, %edx
	jmp	.L23
.L128:
	movslq	%edx, %rbx
	movl	148(%rsp), %edi
	movl	$13, %esi
	cmpl	%edi, 96(%rsp,%rbx,4)
	cmovg	%esi, %edx
	jmp	.L24
.L2:
	movq	184(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L131
	addq	$200, %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
.L131:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	" %c"
.LC2:
	.string	"%c\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$200, %rsp
	.cfi_def_cfa_offset 256
	movq	%fs:40, %rax
	movq	%rax, 184(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L4:
	movq	8(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	je	.L2
	jle	.L4
	leaq	169(%rsp), %rax
	leaq	32(%rsp), %rbx
	xorl	%r13d, %r13d
	movq	%rax, (%rsp)
	leaq	96(%rsp), %r14
	leaq	24(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L9:
	movq	(%rsp), %rax
	leaq	.LC1(%rip), %rdi
	leaq	(%rax,%r13), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	movl	$0, (%rbx)
	movl	$0, (%r14,%r13,4)
	cmpl	$1, %eax
	jle	.L5
	xorl	%r15d, %r15d
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L116:
	addl	$1, (%rbx)
.L7:
	movl	28(%rsp), %eax
	addl	$1, %r15d
	leal	-1(%rax), %ecx
	cmpl	%r15d, %ecx
	jle	.L115
.L8:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	testl	%eax, %eax
	je	.L116
	cmpl	$1, %eax
	jne	.L7
	movl	28(%rsp), %eax
	addl	$1, %r15d
	addl	$1, (%r14,%r13,4)
	leal	-1(%rax), %ecx
	cmpl	%r15d, %ecx
	jg	.L8
	.p2align 4,,10
	.p2align 3
.L115:
	addq	$1, %r13
	addq	$4, %rbx
	cmpl	%r13d, %eax
	jg	.L9
	.p2align 4,,10
	.p2align 3
.L5:
	testl	%eax, %eax
	jle	.L4
	xorl	%r12d, %r12d
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L130:
	je	.L117
	movl	%ecx, %esi
.L13:
	cmpl	$3, %eax
	je	.L113
.L100:
	movl	44(%rsp), %ecx
	cmpl	%ecx, %esi
	jl	.L35
	je	.L118
	movl	%esi, %ecx
.L14:
	cmpl	$4, %eax
	je	.L113
	movl	48(%rsp), %esi
	cmpl	%esi, %ecx
	jl	.L38
	je	.L119
	movl	%ecx, %esi
.L15:
	cmpl	$5, %eax
	je	.L113
	movl	52(%rsp), %ecx
	cmpl	%ecx, %esi
	jl	.L41
	je	.L120
	movl	%esi, %ecx
.L16:
	cmpl	$6, %eax
	je	.L113
	movl	56(%rsp), %esi
	cmpl	%esi, %ecx
	jl	.L44
	je	.L121
	movl	%ecx, %esi
.L17:
	cmpl	$7, %eax
	je	.L113
	movl	60(%rsp), %ecx
	cmpl	%ecx, %esi
	jl	.L47
	je	.L122
	movl	%esi, %ecx
.L18:
	cmpl	$8, %eax
	je	.L113
	movl	64(%rsp), %esi
	cmpl	%esi, %ecx
	jl	.L50
	je	.L123
	movl	%ecx, %esi
.L19:
	cmpl	$9, %eax
	je	.L113
	movl	68(%rsp), %ecx
	cmpl	%ecx, %esi
	jl	.L53
	je	.L124
	movl	%esi, %ecx
.L20:
	cmpl	$10, %eax
	je	.L113
	movl	72(%rsp), %esi
	cmpl	%esi, %ecx
	jl	.L56
	je	.L125
	movl	%ecx, %esi
.L21:
	cmpl	$11, %eax
	je	.L113
	movl	76(%rsp), %ecx
	cmpl	%ecx, %esi
	jl	.L59
	je	.L126
	movl	%esi, %ecx
.L22:
	cmpl	$12, %eax
	je	.L113
	movl	80(%rsp), %esi
	cmpl	%esi, %ecx
	jl	.L62
	je	.L127
	movl	%ecx, %esi
.L23:
	cmpl	$13, %eax
	je	.L113
	movl	84(%rsp), %ecx
	cmpl	%ecx, %esi
	jl	.L65
	je	.L128
	movl	%esi, %ecx
.L24:
	cmpl	$14, %eax
	je	.L113
	movl	$14, %ebx
	cmpl	%ecx, 88(%rsp)
	jg	.L11
	movslq	%edx, %rbx
	jne	.L11
	movl	152(%rsp), %eax
	cmpl	%eax, 96(%rsp,%rbx,4)
	movl	$14, %eax
	cmovg	%rax, %rbx
	.p2align 4,,10
	.p2align 3
.L11:
	movsbl	169(%rsp,%rbx), %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__printf_chk@PLT
	movl	28(%rsp), %eax
	movl	$-1, 32(%rsp,%rbx,4)
	cmpl	%r12d, %eax
	jle	.L4
.L26:
	movl	32(%rsp), %esi
	movl	96(%rsp), %edi
	cmpl	$1, %eax
	je	.L28
	movl	36(%rsp), %ecx
	movl	$1, %edx
	cmpl	%ecx, %esi
	jl	.L12
	je	.L129
	movl	%esi, %ecx
	xorl	%edx, %edx
.L12:
	cmpl	$2, %eax
	je	.L113
	movl	40(%rsp), %esi
	cmpl	%esi, %ecx
	jge	.L130
	movl	$2, %edx
	cmpl	$3, %eax
	jne	.L100
	.p2align 4,,10
	.p2align 3
.L113:
	movslq	%edx, %rbx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L35:
	movl	$3, %edx
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L38:
	movl	$4, %edx
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L41:
	movl	$5, %edx
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L44:
	movl	$6, %edx
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L47:
	movl	$7, %edx
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L50:
	movl	$8, %edx
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L53:
	movl	$9, %edx
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L129:
	xorl	%edx, %edx
	cmpl	100(%rsp), %edi
	setg	%dl
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L56:
	movl	$10, %edx
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L117:
	movslq	%edx, %rbx
	movl	104(%rsp), %edi
	movl	$2, %ecx
	cmpl	%edi, 96(%rsp,%rbx,4)
	cmovg	%ecx, %edx
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L28:
	xorl	%ebx, %ebx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L59:
	movl	$11, %edx
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L118:
	movslq	%edx, %rbx
	movl	108(%rsp), %edi
	movl	$3, %esi
	cmpl	%edi, 96(%rsp,%rbx,4)
	cmovg	%esi, %edx
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L62:
	movl	$12, %edx
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L119:
	movslq	%edx, %rbx
	movl	112(%rsp), %edi
	movl	$4, %ecx
	cmpl	%edi, 96(%rsp,%rbx,4)
	cmovg	%ecx, %edx
	jmp	.L15
.L65:
	movl	$13, %edx
	jmp	.L24
.L120:
	movslq	%edx, %rbx
	movl	116(%rsp), %edi
	movl	$5, %esi
	cmpl	%edi, 96(%rsp,%rbx,4)
	cmovg	%esi, %edx
	jmp	.L16
.L121:
	movslq	%edx, %rbx
	movl	120(%rsp), %edi
	movl	$6, %ecx
	cmpl	%edi, 96(%rsp,%rbx,4)
	cmovg	%ecx, %edx
	jmp	.L17
.L122:
	movslq	%edx, %rbx
	movl	124(%rsp), %edi
	movl	$7, %esi
	cmpl	%edi, 96(%rsp,%rbx,4)
	cmovg	%esi, %edx
	jmp	.L18
.L123:
	movslq	%edx, %rbx
	movl	128(%rsp), %edi
	movl	$8, %ecx
	cmpl	%edi, 96(%rsp,%rbx,4)
	cmovg	%ecx, %edx
	jmp	.L19
.L124:
	movslq	%edx, %rbx
	movl	132(%rsp), %edi
	movl	$9, %esi
	cmpl	%edi, 96(%rsp,%rbx,4)
	cmovg	%esi, %edx
	jmp	.L20
.L125:
	movslq	%edx, %rbx
	movl	136(%rsp), %edi
	movl	$10, %ecx
	cmpl	%edi, 96(%rsp,%rbx,4)
	cmovg	%ecx, %edx
	jmp	.L21
.L126:
	movslq	%edx, %rbx
	movl	140(%rsp), %edi
	movl	$11, %esi
	cmpl	%edi, 96(%rsp,%rbx,4)
	cmovg	%esi, %edx
	jmp	.L22
.L127:
	movslq	%edx, %rbx
	movl	144(%rsp), %edi
	movl	$12, %ecx
	cmpl	%edi, 96(%rsp,%rbx,4)
	cmovg	%ecx, %edx
	jmp	.L23
.L128:
	movslq	%edx, %rbx
	movl	148(%rsp), %edi
	movl	$13, %esi
	cmpl	%edi, 96(%rsp,%rbx,4)
	cmovg	%esi, %edx
	jmp	.L24
.L2:
	movq	184(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L131
	addq	$200, %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
.L131:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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>

int main(void)
{
	int W[15], L[15], r;
	int i, j, n, max;
	char t[15];
	
	while (1){
		
		scanf("%d", &n);
		
		if (n == 0){
			break;
		}
		
		for (i = 0; i < n; i++){
			scanf(" %c", &t[i]);
			W[i] = 0;
			L[i] = 0;
			
			for (j = 0; j < n - 1; j++){
				scanf ("%d", &r);
				
				if (r == 0){
					W[i]++;
				}
				else if (r == 1){
					L[i]++;
				}
			}
		}
		
		for (i = 0; i < n; i++){
			max = 0;
			for (j = 0; j < n; j++){
				
				if (W[max] < W[j]){
					max = j;
				}
				else if (W[max] == W[j]){
					if (L[max] > L[j]){
						max = j;
					}
				}
			}
			printf("%c\n", t[max]);
			W[max] = -1;
		}
	}
	return (0);
}
				
					
				
6
A 1 0 0 2 0
B 0 0 1 1 0
C 1 1 1 1 1
D 1 0 0 1 2
E 2 0 0 0 0
F 1 1 0 2 1
4
g 1 1 1
h 0 1 2
x 0 0 0
b 0 2 1
0
 6
A 1 0 0 2 -1
B 0 0 1 1 0
C 1 1 1 1 1
D 1 0 0 1 2
E 2 0 0 0 0
F 1 1 0 2 1
4
g 1 1 1
h 0 1 2
x 0 0 0
b 0 2 1
0
 6
A 1 0 0 2 -1
B 0 0 1 1 0
C 1 1 1 1 1
D 1 0 0 0 2
E 2 0 0 0 0
F 1 1 0 2 1
4
g 1 1 1
h 0 1 2
x 0 0 0
b 0 2 1
0
 6
A 1 0 0 2 -1
B 0 0 1 1 0
C 1 1 1 1 1
D 1 0 0 0 2
E 2 0 0 0 0
F 1 1 0 2 1
4
g 1 1 1
h 0 1 2
x 0 0 0
b 0 2 2
0
 6
A 1 0 0 2 -1
B 0 0 1 1 0
C 1 1 1 1 1
D 1 0 0 0 2
E 2 0 0 0 0
F 1 1 0 2 1
4
g 1 1 1
g 0 1 2
x 0 0 0
b 0 2 2
0
 6
A 1 0 0 2 -1
B 0 0 1 1 0
C 1 1 1 1 1
D 1 0 0 0 2
E 2 0 0 0 0
F 1 1 0 2 2
4
g 1 1 1
g 0 1 0
x 0 0 0
b 0 2 2
0
 6
A 1 0 0 2 0
B 0 0 1 1 0
C 1 1 1 1 1
D 1 0 0 1 2
E 2 0 0 0 0
F 1 1 0 2 1
4
g 1 1 1
g 0 1 2
x 0 0 0
b 0 2 1
0
 6
A 1 0 0 2 -1
B 1 0 1 1 0
C 1 1 1 1 1
D 1 0 0 0 2
E 2 0 0 0 0
F 1 1 0 2 1
4
g 1 1 1
h 0 1 2
x 0 0 0
b 0 2 1
0
 6
A 1 0 0 2 -1
B 0 0 1 1 0
C 1 1 1 1 1
D 1 0 0 0 2
E 2 0 0 0 0
F 1 1 0 2 1
4
h 1 1 1
g 0 1 2
x 0 0 0
b 0 2 2
0
 6
A 1 0 0 2 0
C 0 0 1 1 0
C 1 1 1 1 1
D 1 0 0 1 2
E 2 0 0 0 0
F 1 1 0 2 1
4
g 1 1 1
g 0 1 2
x 0 0 0
b 0 2 1
0

E
A
B
D
F
C
x
h
b
g
 E
B
A
D
F
C
x
h
b
g
 E
D
B
A
F
C
x
h
b
g
 E
D
B
A
F
C
x
b
h
g
 E
D
B
A
F
C
x
b
g
g
 E
D
B
A
F
C
x
g
b
g
 E
A
B
D
F
C
x
g
b
g
 E
D
A
B
F
C
x
h
b
g
 E
D
B
A
F
C
x
b
g
h
 E
A
C
D
F
C
x
g
b
g

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>

int main(void)
{
	int W[15], L[15], r;
	int i, j, n, max;
	char t[15];
	
	while (1){
		
		scanf("%d", &n);
		
		if (n == 0){
			break;
		}
		
		for (i = 0; i < n; i++){
			scanf(" %c", &t[i]);
			W[i] = 0;
			L[i] = 0;
			
			for (j = 0; j < n - 1; j++){
				scanf ("%d", &r);
				
				if (r == 0){
					W[i]++;
				}
				else if (r == 1){
					L[i]++;
				}
			}
		}
		
		for (i = 0; i < n; i++){
			max = 0;
			for (j = 0; j < n; j++){
				
				if (W[max] < W[j]){
					max = j;
				}
				else if (W[max] == W[j]){
					if (L[max] > L[j]){
						max = j;
					}
				}
			}
			printf("%c\n", t[max]);
			W[max] = -1;
		}
	}
	return (0);
}
				
					
				```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	" %c"
.LC2:
	.string	"%c\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	$192, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L16:
	leaq	-176(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-176(%rbp), %eax
	testl	%eax, %eax
	je	.L20
	movl	$0, -172(%rbp)
	jmp	.L4
.L9:
	leaq	-23(%rbp), %rdx
	movl	-172(%rbp), %eax
	cltq
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-172(%rbp), %eax
	cltq
	movl	$0, -160(%rbp,%rax,4)
	movl	-172(%rbp), %eax
	cltq
	movl	$0, -96(%rbp,%rax,4)
	movl	$0, -168(%rbp)
	jmp	.L5
.L8:
	leaq	-180(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-180(%rbp), %eax
	testl	%eax, %eax
	jne	.L6
	movl	-172(%rbp), %eax
	cltq
	movl	-160(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-172(%rbp), %eax
	cltq
	movl	%edx, -160(%rbp,%rax,4)
	jmp	.L7
.L6:
	movl	-180(%rbp), %eax
	cmpl	$1, %eax
	jne	.L7
	movl	-172(%rbp), %eax
	cltq
	movl	-96(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-172(%rbp), %eax
	cltq
	movl	%edx, -96(%rbp,%rax,4)
.L7:
	addl	$1, -168(%rbp)
.L5:
	movl	-176(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -168(%rbp)
	jl	.L8
	addl	$1, -172(%rbp)
.L4:
	movl	-176(%rbp), %eax
	cmpl	%eax, -172(%rbp)
	jl	.L9
	movl	$0, -172(%rbp)
	jmp	.L10
.L15:
	movl	$0, -164(%rbp)
	movl	$0, -168(%rbp)
	jmp	.L11
.L14:
	movl	-164(%rbp), %eax
	cltq
	movl	-160(%rbp,%rax,4), %edx
	movl	-168(%rbp), %eax
	cltq
	movl	-160(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L12
	movl	-168(%rbp), %eax
	movl	%eax, -164(%rbp)
	jmp	.L13
.L12:
	movl	-164(%rbp), %eax
	cltq
	movl	-160(%rbp,%rax,4), %edx
	movl	-168(%rbp), %eax
	cltq
	movl	-160(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L13
	movl	-164(%rbp), %eax
	cltq
	movl	-96(%rbp,%rax,4), %edx
	movl	-168(%rbp), %eax
	cltq
	movl	-96(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L13
	movl	-168(%rbp), %eax
	movl	%eax, -164(%rbp)
.L13:
	addl	$1, -168(%rbp)
.L11:
	movl	-176(%rbp), %eax
	cmpl	%eax, -168(%rbp)
	jl	.L14
	movl	-164(%rbp), %eax
	cltq
	movzbl	-23(%rbp,%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-164(%rbp), %eax
	cltq
	movl	$-1, -160(%rbp,%rax,4)
	addl	$1, -172(%rbp)
.L10:
	movl	-176(%rbp), %eax
	cmpl	%eax, -172(%rbp)
	jl	.L15
	jmp	.L16
.L20:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.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
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	" %c"
.LC2:
	.string	"%c\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	$192, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L16:
	leaq	-176(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-176(%rbp), %eax
	testl	%eax, %eax
	je	.L20
	movl	$0, -172(%rbp)
	jmp	.L4
.L9:
	leaq	-23(%rbp), %rdx
	movl	-172(%rbp), %eax
	cltq
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-172(%rbp), %eax
	cltq
	movl	$0, -160(%rbp,%rax,4)
	movl	-172(%rbp), %eax
	cltq
	movl	$0, -96(%rbp,%rax,4)
	movl	$0, -168(%rbp)
	jmp	.L5
.L8:
	leaq	-180(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-180(%rbp), %eax
	testl	%eax, %eax
	jne	.L6
	movl	-172(%rbp), %eax
	cltq
	movl	-160(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-172(%rbp), %eax
	cltq
	movl	%edx, -160(%rbp,%rax,4)
	jmp	.L7
.L6:
	movl	-180(%rbp), %eax
	cmpl	$1, %eax
	jne	.L7
	movl	-172(%rbp), %eax
	cltq
	movl	-96(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-172(%rbp), %eax
	cltq
	movl	%edx, -96(%rbp,%rax,4)
.L7:
	addl	$1, -168(%rbp)
.L5:
	movl	-176(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -168(%rbp)
	jl	.L8
	addl	$1, -172(%rbp)
.L4:
	movl	-176(%rbp), %eax
	cmpl	%eax, -172(%rbp)
	jl	.L9
	movl	$0, -172(%rbp)
	jmp	.L10
.L15:
	movl	$0, -164(%rbp)
	movl	$0, -168(%rbp)
	jmp	.L11
.L14:
	movl	-164(%rbp), %eax
	cltq
	movl	-160(%rbp,%rax,4), %edx
	movl	-168(%rbp), %eax
	cltq
	movl	-160(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L12
	movl	-168(%rbp), %eax
	movl	%eax, -164(%rbp)
	jmp	.L13
.L12:
	movl	-164(%rbp), %eax
	cltq
	movl	-160(%rbp,%rax,4), %edx
	movl	-168(%rbp), %eax
	cltq
	movl	-160(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L13
	movl	-164(%rbp), %eax
	cltq
	movl	-96(%rbp,%rax,4), %edx
	movl	-168(%rbp), %eax
	cltq
	movl	-96(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L13
	movl	-168(%rbp), %eax
	movl	%eax, -164(%rbp)
.L13:
	addl	$1, -168(%rbp)
.L11:
	movl	-176(%rbp), %eax
	cmpl	%eax, -168(%rbp)
	jl	.L14
	movl	-164(%rbp), %eax
	cltq
	movzbl	-23(%rbp,%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-164(%rbp), %eax
	cltq
	movl	$-1, -160(%rbp,%rax,4)
	addl	$1, -172(%rbp)
.L10:
	movl	-176(%rbp), %eax
	cmpl	%eax, -172(%rbp)
	jl	.L15
	jmp	.L16
.L20:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.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:
