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 n, pm, pe, pj;
	char m[10000];
	int i;
	
	while (scanf("%d", &n), n != 0){
		for (i = 0; i < n; i++){
			scanf("%d %d %d", &pm, &pe, &pj);
			if (pm == 100 || pe == 100 || pj == 100){
				m[i] = 'A';
			}
			else if ((pm + pe) / 2 >= 90){
				m[i] = 'A';
			}
			else if ((pm + pe + pj) / 3 >= 80){
				m[i] = 'A';
			}
			else if ((pm + pe + pj) / 3 >= 70){
				m[i] = 'B';
			}
			else if ((pm + pe + pj) / 3 >= 50 && pm >= 80 || pe >= 80){
				m[i] = 'B';
			}
			else {
				m[i] = 'C';
			}
		}
		for (i = 0; i < n; i++){
			printf("%c\n", m[i]);
		}
	}
	
	return (0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%c\n"
.LC2:
	.string	"%d"
	.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	$4096, %rsp
	orq	$0, (%rsp)
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$1856, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L16:
	movl	$0, -10020(%rbp)
	jmp	.L3
.L13:
	leaq	-10024(%rbp), %rcx
	leaq	-10028(%rbp), %rdx
	leaq	-10032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-10032(%rbp), %eax
	cmpl	$100, %eax
	je	.L4
	movl	-10028(%rbp), %eax
	cmpl	$100, %eax
	je	.L4
	movl	-10024(%rbp), %eax
	cmpl	$100, %eax
	jne	.L5
.L4:
	movl	-10020(%rbp), %eax
	cltq
	movb	$65, -10016(%rbp,%rax)
	jmp	.L6
.L5:
	movl	-10032(%rbp), %edx
	movl	-10028(%rbp), %eax
	addl	%edx, %eax
	cmpl	$179, %eax
	jle	.L7
	movl	-10020(%rbp), %eax
	cltq
	movb	$65, -10016(%rbp,%rax)
	jmp	.L6
.L7:
	movl	-10032(%rbp), %edx
	movl	-10028(%rbp), %eax
	addl	%eax, %edx
	movl	-10024(%rbp), %eax
	addl	%edx, %eax
	cmpl	$239, %eax
	jle	.L8
	movl	-10020(%rbp), %eax
	cltq
	movb	$65, -10016(%rbp,%rax)
	jmp	.L6
.L8:
	movl	-10032(%rbp), %edx
	movl	-10028(%rbp), %eax
	addl	%eax, %edx
	movl	-10024(%rbp), %eax
	addl	%edx, %eax
	cmpl	$209, %eax
	jle	.L9
	movl	-10020(%rbp), %eax
	cltq
	movb	$66, -10016(%rbp,%rax)
	jmp	.L6
.L9:
	movl	-10032(%rbp), %edx
	movl	-10028(%rbp), %eax
	addl	%eax, %edx
	movl	-10024(%rbp), %eax
	addl	%edx, %eax
	cmpl	$149, %eax
	jle	.L10
	movl	-10032(%rbp), %eax
	cmpl	$79, %eax
	jg	.L11
.L10:
	movl	-10028(%rbp), %eax
	cmpl	$79, %eax
	jle	.L12
.L11:
	movl	-10020(%rbp), %eax
	cltq
	movb	$66, -10016(%rbp,%rax)
	jmp	.L6
.L12:
	movl	-10020(%rbp), %eax
	cltq
	movb	$67, -10016(%rbp,%rax)
.L6:
	addl	$1, -10020(%rbp)
.L3:
	movl	-10036(%rbp), %eax
	cmpl	%eax, -10020(%rbp)
	jl	.L13
	movl	$0, -10020(%rbp)
	jmp	.L14
.L15:
	movl	-10020(%rbp), %eax
	cltq
	movzbl	-10016(%rbp,%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -10020(%rbp)
.L14:
	movl	-10036(%rbp), %eax
	cmpl	%eax, -10020(%rbp)
	jl	.L15
.L2:
	leaq	-10036(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-10036(%rbp), %eax
	testl	%eax, %eax
	jne	.L16
	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 %d %d"
.LC1:
	.string	"%c\n"
.LC2:
	.string	"%d"
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 8248
	orq	$0, (%rsp)
	subq	$1864, %rsp
	.cfi_def_cfa_offset 10112
	leaq	.LC0(%rip), %r15
	movq	%fs:40, %rax
	movq	%rax, 10040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rsi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %eax
	testl	%eax, %eax
	je	.L8
	jle	.L2
	xorl	%r14d, %r14d
	leaq	28(%rsp), %r13
	leaq	24(%rsp), %r12
	leaq	20(%rsp), %rbp
	leaq	32(%rsp), %rbx
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rdx
	movq	%r13, %rcx
	movq	%rbp, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	movl	$65, %edx
	cmpl	$100, %eax
	je	.L3
	movl	24(%rsp), %ecx
	cmpl	$100, %ecx
	je	.L3
	movl	28(%rsp), %esi
	cmpl	$100, %esi
	je	.L3
	leal	(%rax,%rcx), %edi
	cmpl	$179, %edi
	jg	.L3
	addl	%edi, %esi
	cmpl	$239, %esi
	jg	.L3
	movl	$66, %edx
	cmpl	$209, %esi
	jg	.L3
	cmpl	$149, %esi
	jle	.L20
	cmpl	$79, %eax
	jg	.L3
.L20:
	cmpl	$80, %ecx
	setl	%dl
	addl	$66, %edx
	.p2align 4,,10
	.p2align 3
.L3:
	movl	16(%rsp), %eax
	movb	%dl, (%rbx,%r14)
	addq	$1, %r14
	cmpl	%r14d, %eax
	jg	.L5
	testl	%eax, %eax
	jle	.L2
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L6:
	movsbl	(%rbx,%rbp), %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__printf_chk@PLT
	cmpl	%ebp, 16(%rsp)
	jg	.L6
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L8:
	movq	10040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$10056, %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
.L31:
	.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 %d %d"
.LC1:
	.string	"%c\n"
.LC2:
	.string	"%d"
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 8248
	orq	$0, (%rsp)
	subq	$1864, %rsp
	.cfi_def_cfa_offset 10112
	leaq	.LC0(%rip), %r15
	movq	%fs:40, %rax
	movq	%rax, 10040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rsi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %eax
	testl	%eax, %eax
	je	.L8
	jle	.L2
	xorl	%r14d, %r14d
	leaq	28(%rsp), %r13
	leaq	24(%rsp), %r12
	leaq	20(%rsp), %rbp
	leaq	32(%rsp), %rbx
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rdx
	movq	%r13, %rcx
	movq	%rbp, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	movl	$65, %edx
	cmpl	$100, %eax
	je	.L3
	movl	24(%rsp), %ecx
	cmpl	$100, %ecx
	je	.L3
	movl	28(%rsp), %esi
	cmpl	$100, %esi
	je	.L3
	leal	(%rax,%rcx), %edi
	cmpl	$179, %edi
	jg	.L3
	addl	%edi, %esi
	cmpl	$239, %esi
	jg	.L3
	movl	$66, %edx
	cmpl	$209, %esi
	jg	.L3
	cmpl	$149, %esi
	jle	.L20
	cmpl	$79, %eax
	jg	.L3
.L20:
	cmpl	$80, %ecx
	setl	%dl
	addl	$66, %edx
	.p2align 4,,10
	.p2align 3
.L3:
	movl	16(%rsp), %eax
	movb	%dl, (%rbx,%r14)
	addq	$1, %r14
	cmpl	%r14d, %eax
	jg	.L5
	testl	%eax, %eax
	jle	.L2
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L6:
	movsbl	(%rbx,%rbp), %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__printf_chk@PLT
	cmpl	%ebp, 16(%rsp)
	jg	.L6
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L8:
	movq	10040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$10056, %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
.L31:
	.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 n, pm, pe, pj;
	char m[10000];
	int i;
	
	while (scanf("%d", &n), n != 0){
		for (i = 0; i < n; i++){
			scanf("%d %d %d", &pm, &pe, &pj);
			if (pm == 100 || pe == 100 || pj == 100){
				m[i] = 'A';
			}
			else if ((pm + pe) / 2 >= 90){
				m[i] = 'A';
			}
			else if ((pm + pe + pj) / 3 >= 80){
				m[i] = 'A';
			}
			else if ((pm + pe + pj) / 3 >= 70){
				m[i] = 'B';
			}
			else if ((pm + pe + pj) / 3 >= 50 && pm >= 80 || pe >= 80){
				m[i] = 'B';
			}
			else {
				m[i] = 'C';
			}
		}
		for (i = 0; i < n; i++){
			printf("%c\n", m[i]);
		}
	}
	
	return (0);
}
4
100 70 20
98 86 55
80 34 39
65 79 65
2
99 81 20
66 72 90
0
 4
100 70 20
98 86 55
80 34 36
65 140 65
2
99 81 20
66 72 90
0
 4
100 70 20
98 86 19
80 34 39
65 79 65
2
99 75 20
66 72 90
0
 4
010 70 20
98 86 19
80 34 39
65 79 65
2
120 81 20
66 72 90
0
 4
010 133 20
98 86 19
80 34 39
65 79 65
2
120 81 20
66 72 90
0
 4
110 74 20
98 86 19
80 34 64
65 79 65
2
120 81 20
66 110 90
0
 4
100 70 20
143 86 55
80 34 20
65 53 65
2
99 81 20
66 72 90
0
 4
110 16 20
98 86 19
80 8 39
65 79 65
2
99 81 9
66 72 90
0
 4
010 133 20
98 86 19
80 34 39
65 79 65
2
120 81 20
66 47 90
0
 4
100 70 20
98 86 55
80 34 36
65 140 94
2
99 113 20
110 72 90
0

A
A
B
C
A
B
 A
A
B
A
A
B
 A
A
B
C
B
B
 C
A
B
C
A
B
 B
A
B
C
A
B
 A
A
B
C
A
A
 A
A
C
C
A
B
 C
A
C
C
A
B
 B
A
B
C
A
C
 A
A
B
A
A
A

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 n, pm, pe, pj;
	char m[10000];
	int i;
	
	while (scanf("%d", &n), n != 0){
		for (i = 0; i < n; i++){
			scanf("%d %d %d", &pm, &pe, &pj);
			if (pm == 100 || pe == 100 || pj == 100){
				m[i] = 'A';
			}
			else if ((pm + pe) / 2 >= 90){
				m[i] = 'A';
			}
			else if ((pm + pe + pj) / 3 >= 80){
				m[i] = 'A';
			}
			else if ((pm + pe + pj) / 3 >= 70){
				m[i] = 'B';
			}
			else if ((pm + pe + pj) / 3 >= 50 && pm >= 80 || pe >= 80){
				m[i] = 'B';
			}
			else {
				m[i] = 'C';
			}
		}
		for (i = 0; i < n; i++){
			printf("%c\n", m[i]);
		}
	}
	
	return (0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%c\n"
.LC2:
	.string	"%d"
	.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	$4096, %rsp
	orq	$0, (%rsp)
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$1856, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L16:
	movl	$0, -10020(%rbp)
	jmp	.L3
.L13:
	leaq	-10024(%rbp), %rcx
	leaq	-10028(%rbp), %rdx
	leaq	-10032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-10032(%rbp), %eax
	cmpl	$100, %eax
	je	.L4
	movl	-10028(%rbp), %eax
	cmpl	$100, %eax
	je	.L4
	movl	-10024(%rbp), %eax
	cmpl	$100, %eax
	jne	.L5
.L4:
	movl	-10020(%rbp), %eax
	cltq
	movb	$65, -10016(%rbp,%rax)
	jmp	.L6
.L5:
	movl	-10032(%rbp), %edx
	movl	-10028(%rbp), %eax
	addl	%edx, %eax
	cmpl	$179, %eax
	jle	.L7
	movl	-10020(%rbp), %eax
	cltq
	movb	$65, -10016(%rbp,%rax)
	jmp	.L6
.L7:
	movl	-10032(%rbp), %edx
	movl	-10028(%rbp), %eax
	addl	%eax, %edx
	movl	-10024(%rbp), %eax
	addl	%edx, %eax
	cmpl	$239, %eax
	jle	.L8
	movl	-10020(%rbp), %eax
	cltq
	movb	$65, -10016(%rbp,%rax)
	jmp	.L6
.L8:
	movl	-10032(%rbp), %edx
	movl	-10028(%rbp), %eax
	addl	%eax, %edx
	movl	-10024(%rbp), %eax
	addl	%edx, %eax
	cmpl	$209, %eax
	jle	.L9
	movl	-10020(%rbp), %eax
	cltq
	movb	$66, -10016(%rbp,%rax)
	jmp	.L6
.L9:
	movl	-10032(%rbp), %edx
	movl	-10028(%rbp), %eax
	addl	%eax, %edx
	movl	-10024(%rbp), %eax
	addl	%edx, %eax
	cmpl	$149, %eax
	jle	.L10
	movl	-10032(%rbp), %eax
	cmpl	$79, %eax
	jg	.L11
.L10:
	movl	-10028(%rbp), %eax
	cmpl	$79, %eax
	jle	.L12
.L11:
	movl	-10020(%rbp), %eax
	cltq
	movb	$66, -10016(%rbp,%rax)
	jmp	.L6
.L12:
	movl	-10020(%rbp), %eax
	cltq
	movb	$67, -10016(%rbp,%rax)
.L6:
	addl	$1, -10020(%rbp)
.L3:
	movl	-10036(%rbp), %eax
	cmpl	%eax, -10020(%rbp)
	jl	.L13
	movl	$0, -10020(%rbp)
	jmp	.L14
.L15:
	movl	-10020(%rbp), %eax
	cltq
	movzbl	-10016(%rbp,%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -10020(%rbp)
.L14:
	movl	-10036(%rbp), %eax
	cmpl	%eax, -10020(%rbp)
	jl	.L15
.L2:
	leaq	-10036(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-10036(%rbp), %eax
	testl	%eax, %eax
	jne	.L16
	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 %d %d"
.LC1:
	.string	"%c\n"
.LC2:
	.string	"%d"
	.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	$4096, %rsp
	orq	$0, (%rsp)
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$1856, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L16:
	movl	$0, -10020(%rbp)
	jmp	.L3
.L13:
	leaq	-10024(%rbp), %rcx
	leaq	-10028(%rbp), %rdx
	leaq	-10032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-10032(%rbp), %eax
	cmpl	$100, %eax
	je	.L4
	movl	-10028(%rbp), %eax
	cmpl	$100, %eax
	je	.L4
	movl	-10024(%rbp), %eax
	cmpl	$100, %eax
	jne	.L5
.L4:
	movl	-10020(%rbp), %eax
	cltq
	movb	$65, -10016(%rbp,%rax)
	jmp	.L6
.L5:
	movl	-10032(%rbp), %edx
	movl	-10028(%rbp), %eax
	addl	%edx, %eax
	cmpl	$179, %eax
	jle	.L7
	movl	-10020(%rbp), %eax
	cltq
	movb	$65, -10016(%rbp,%rax)
	jmp	.L6
.L7:
	movl	-10032(%rbp), %edx
	movl	-10028(%rbp), %eax
	addl	%eax, %edx
	movl	-10024(%rbp), %eax
	addl	%edx, %eax
	cmpl	$239, %eax
	jle	.L8
	movl	-10020(%rbp), %eax
	cltq
	movb	$65, -10016(%rbp,%rax)
	jmp	.L6
.L8:
	movl	-10032(%rbp), %edx
	movl	-10028(%rbp), %eax
	addl	%eax, %edx
	movl	-10024(%rbp), %eax
	addl	%edx, %eax
	cmpl	$209, %eax
	jle	.L9
	movl	-10020(%rbp), %eax
	cltq
	movb	$66, -10016(%rbp,%rax)
	jmp	.L6
.L9:
	movl	-10032(%rbp), %edx
	movl	-10028(%rbp), %eax
	addl	%eax, %edx
	movl	-10024(%rbp), %eax
	addl	%edx, %eax
	cmpl	$149, %eax
	jle	.L10
	movl	-10032(%rbp), %eax
	cmpl	$79, %eax
	jg	.L11
.L10:
	movl	-10028(%rbp), %eax
	cmpl	$79, %eax
	jle	.L12
.L11:
	movl	-10020(%rbp), %eax
	cltq
	movb	$66, -10016(%rbp,%rax)
	jmp	.L6
.L12:
	movl	-10020(%rbp), %eax
	cltq
	movb	$67, -10016(%rbp,%rax)
.L6:
	addl	$1, -10020(%rbp)
.L3:
	movl	-10036(%rbp), %eax
	cmpl	%eax, -10020(%rbp)
	jl	.L13
	movl	$0, -10020(%rbp)
	jmp	.L14
.L15:
	movl	-10020(%rbp), %eax
	cltq
	movzbl	-10016(%rbp,%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -10020(%rbp)
.L14:
	movl	-10036(%rbp), %eax
	cmpl	%eax, -10020(%rbp)
	jl	.L15
.L2:
	leaq	-10036(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-10036(%rbp), %eax
	testl	%eax, %eax
	jne	.L16
	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:
