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 game,pa=0,pb=0,i;
    char line[101];
    for(game=1;fgets(line,101,stdin),line[0]!= '0';game++){
        if(game!= 1){
            line[0]=='A'?pa++:pb++;
            printf("%d %d\n",pa,pb);
            pa=pb=0;
        }
        i=0;
        while(line[++i]!= '\n'){
            if(line[i] == 'A')
                pa++;
            else
                pb++;
        }
        if(game == 3){
            if(pa+pb <=20){
                pa==10?pa++:pb++;
                printf("%d %d\n",pa,pb);
            }
            else{
                pa>pb?pa++:pb++;
                printf("%d %d\n",pa,pb);
            }
            pa=pb=0;
            game=0;
        }
    }
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d\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
	addq	$-128, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -124(%rbp)
	movl	$0, -120(%rbp)
	movl	$1, -128(%rbp)
	jmp	.L2
.L16:
	cmpl	$1, -128(%rbp)
	je	.L3
	movzbl	-112(%rbp), %eax
	cmpb	$65, %al
	jne	.L4
	movl	-124(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -124(%rbp)
	jmp	.L5
.L4:
	movl	-120(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -120(%rbp)
.L5:
	movl	-120(%rbp), %edx
	movl	-124(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -120(%rbp)
	movl	-120(%rbp), %eax
	movl	%eax, -124(%rbp)
.L3:
	movl	$0, -116(%rbp)
	jmp	.L6
.L8:
	movl	-116(%rbp), %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	cmpb	$65, %al
	jne	.L7
	addl	$1, -124(%rbp)
	jmp	.L6
.L7:
	addl	$1, -120(%rbp)
.L6:
	addl	$1, -116(%rbp)
	movl	-116(%rbp), %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	cmpb	$10, %al
	jne	.L8
	cmpl	$3, -128(%rbp)
	jne	.L9
	movl	-124(%rbp), %edx
	movl	-120(%rbp), %eax
	addl	%edx, %eax
	cmpl	$20, %eax
	jg	.L10
	cmpl	$10, -124(%rbp)
	jne	.L11
	movl	-124(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -124(%rbp)
	jmp	.L12
.L11:
	movl	-120(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -120(%rbp)
.L12:
	movl	-120(%rbp), %edx
	movl	-124(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L10:
	movl	-124(%rbp), %eax
	cmpl	-120(%rbp), %eax
	jle	.L14
	movl	-124(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -124(%rbp)
	jmp	.L15
.L14:
	movl	-120(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -120(%rbp)
.L15:
	movl	-120(%rbp), %edx
	movl	-124(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L13:
	movl	$0, -120(%rbp)
	movl	-120(%rbp), %eax
	movl	%eax, -124(%rbp)
	movl	$0, -128(%rbp)
.L9:
	addl	$1, -128(%rbp)
.L2:
	movq	stdin(%rip), %rdx
	leaq	-112(%rbp), %rax
	movl	$101, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	movzbl	-112(%rbp), %eax
	cmpb	$48, %al
	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\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	xorl	%r14d, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movl	$1, %ebx
	subq	$112, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	.p2align 4,,10
	.p2align 3
.L2:
	movq	stdin(%rip), %rdx
	movl	$101, %esi
	movq	%rbp, %rdi
	call	fgets@PLT
	movzbl	(%rsp), %eax
	cmpb	$48, %al
	je	.L29
	cmpl	$1, %ebx
	je	.L3
	cmpb	$65, %al
	je	.L30
	addl	$1, %r12d
.L5:
	movl	%r12d, %ecx
	movl	%r14d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	xorl	%r12d, %r12d
	xorl	%r14d, %r14d
	call	__printf_chk@PLT
	movzbl	1(%rsp), %eax
	cmpb	$10, %al
	je	.L6
.L20:
	leaq	2(%rsp), %rdx
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L7:
	movzbl	(%rdx), %eax
	addq	$1, %rdx
	addl	$1, %r12d
	cmpb	$10, %al
	je	.L31
.L9:
	cmpb	$65, %al
	jne	.L7
	movzbl	(%rdx), %eax
	addq	$1, %rdx
	addl	$1, %r14d
	cmpb	$10, %al
	jne	.L9
.L31:
	cmpl	$3, %ebx
	je	.L13
.L12:
	addl	$1, %ebx
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movzbl	1(%rsp), %eax
	cmpb	$10, %al
	jne	.L20
	movl	$2, %ebx
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L13:
	leal	(%r14,%r12), %eax
	cmpl	$20, %eax
	jg	.L15
	cmpl	$10, %r14d
	je	.L32
.L17:
	addl	$1, %r12d
.L18:
	movl	%r12d, %ecx
	movl	%r14d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	$1, %ebx
	xorl	%r12d, %r12d
	xorl	%r14d, %r14d
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L30:
	addl	$1, %r14d
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L15:
	cmpl	%r12d, %r14d
	jle	.L17
	addl	$1, %r14d
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L29:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L33
	addq	$112, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	cmpl	$3, %ebx
	jne	.L12
	jmp	.L17
.L32:
	movl	$11, %r14d
	jmp	.L18
.L33:
	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\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	xorl	%r14d, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movl	$1, %ebx
	subq	$112, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	.p2align 4,,10
	.p2align 3
.L2:
	movq	stdin(%rip), %rdx
	movl	$101, %esi
	movq	%rbp, %rdi
	call	fgets@PLT
	movzbl	(%rsp), %eax
	cmpb	$48, %al
	je	.L29
	cmpl	$1, %ebx
	je	.L3
	cmpb	$65, %al
	je	.L30
	addl	$1, %r12d
.L5:
	movl	%r12d, %ecx
	movl	%r14d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	xorl	%r12d, %r12d
	xorl	%r14d, %r14d
	call	__printf_chk@PLT
	movzbl	1(%rsp), %eax
	cmpb	$10, %al
	je	.L6
.L20:
	leaq	2(%rsp), %rdx
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L7:
	movzbl	(%rdx), %eax
	addq	$1, %rdx
	addl	$1, %r12d
	cmpb	$10, %al
	je	.L31
.L9:
	cmpb	$65, %al
	jne	.L7
	movzbl	(%rdx), %eax
	addq	$1, %rdx
	addl	$1, %r14d
	cmpb	$10, %al
	jne	.L9
.L31:
	cmpl	$3, %ebx
	je	.L13
.L12:
	addl	$1, %ebx
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movzbl	1(%rsp), %eax
	cmpb	$10, %al
	jne	.L20
	movl	$2, %ebx
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L13:
	leal	(%r14,%r12), %eax
	cmpl	$20, %eax
	jg	.L15
	cmpl	$10, %r14d
	je	.L32
.L17:
	addl	$1, %r12d
.L18:
	movl	%r12d, %ecx
	movl	%r14d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	$1, %ebx
	xorl	%r12d, %r12d
	xorl	%r14d, %r14d
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L30:
	addl	$1, %r14d
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L15:
	cmpl	%r12d, %r14d
	jle	.L17
	addl	$1, %r14d
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L29:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L33
	addq	$112, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	cmpl	$3, %ebx
	jne	.L12
	jmp	.L17
.L32:
	movl	$11, %r14d
	jmp	.L18
.L33:
	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 game,pa=0,pb=0,i;
    char line[101];
    for(game=1;fgets(line,101,stdin),line[0]!= '0';game++){
        if(game!= 1){
            line[0]=='A'?pa++:pb++;
            printf("%d %d\n",pa,pb);
            pa=pb=0;
        }
        i=0;
        while(line[++i]!= '\n'){
            if(line[i] == 'A')
                pa++;
            else
                pb++;
        }
        if(game == 3){
            if(pa+pb <=20){
                pa==10?pa++:pb++;
                printf("%d %d\n",pa,pb);
            }
            else{
                pa>pb?pa++:pb++;
                printf("%d %d\n",pa,pb);
            }
            pa=pb=0;
            game=0;
        }
    }
    return 0;
}
AABBAAABABAABBBAABA
AABBBABBABBAAABABABAAB
BABAABAABABABBAAAB
AABABAAABBAABBBABAA
AAAAAAAAAAA
ABBBBBBBBBB
0
 ABAABBBAABABAAABBAA
AABBBABBABBAAABABABAAB
BABAABAABABABBAAAB
AABABAAABBAABBBABAA
AAAAAAAAAAA
ABBBBBABBBB
0
 ABAABBBAABABAAABBAA
AABBBABBABBAAABABABAAB
BABAABAABABABBAAAB
AABAABBAABBAAABABAA
AAAAAAAAAAA
ABBBBBABBBB
0
 ABAABABAABABAAABBAA
AABBBABBABBAAABABABAAB
BABAABAABABABBAAAB
AABABAAABBAABBBABAA
AAAAAAAAAAA
ABBBBBABBBB
0
 AABBAAABABAABBBAABA
AABBBABBABBAAABABABAAB
BABAABAABABABBAAAB
AABAABBAABBAAABABAA
AAAAAAAAAAA
ABBBABABBBB
0
 ABBABBAAABABAAABBAA
AABBBABBABBAAABABABAAB
BABAABAABABABBBAAB
AABBBBBAABAAAABABAA
AAAAAAAAAAA
ABBBBBABBBB
0
 AABBAAABABAABBBAABA
AABBBABBABBAAABABABAAB
BABAABAABAABBBAAAB
AABAABBAABBAAABABAB
AAAAAAAAAAA
ABBBABABBBB
0
 ABAABBBAABABAAABBAA
AABBBABBABBAAABABABAAB
BABAABAABABABBAAAA
AABAABBAABBAAABABAA
AAAAAAAAAAA
ABBBBBABBBB
0
 ABBABBAAABABAAABBAA
AABBBABBABBAAABABABAAB
BABAABAABABABBBAAB
AABBBBBAABAAAABABAA
AAAAAAAAAAA
ABBBBBABBBA
0
 AABBAAABABAABBBAABA
AABBBABBABBAAABABABAAB
BABAABAABAABBBAAAB
AABAABBAABBAAABABAB
AAAAAAAAAAA
ABBAABABBBB
0

11 8
10 12
11 7
11 8
11 0
0 11
 11 8
10 12
11 7
11 8
11 0
1 10
 11 8
10 12
11 7
12 7
11 0
1 10
 12 7
10 12
11 7
11 8
11 0
1 10
 11 8
10 12
11 7
12 7
11 0
2 9
 11 8
10 12
9 9
11 8
11 0
1 10
 11 8
10 12
11 7
11 8
11 0
2 9
 11 8
10 12
11 7
12 7
11 0
1 10
 11 8
10 12
9 9
11 8
11 0
2 9
 11 8
10 12
11 7
11 8
11 0
3 8

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 game,pa=0,pb=0,i;
    char line[101];
    for(game=1;fgets(line,101,stdin),line[0]!= '0';game++){
        if(game!= 1){
            line[0]=='A'?pa++:pb++;
            printf("%d %d\n",pa,pb);
            pa=pb=0;
        }
        i=0;
        while(line[++i]!= '\n'){
            if(line[i] == 'A')
                pa++;
            else
                pb++;
        }
        if(game == 3){
            if(pa+pb <=20){
                pa==10?pa++:pb++;
                printf("%d %d\n",pa,pb);
            }
            else{
                pa>pb?pa++:pb++;
                printf("%d %d\n",pa,pb);
            }
            pa=pb=0;
            game=0;
        }
    }
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d\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
	addq	$-128, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -124(%rbp)
	movl	$0, -120(%rbp)
	movl	$1, -128(%rbp)
	jmp	.L2
.L16:
	cmpl	$1, -128(%rbp)
	je	.L3
	movzbl	-112(%rbp), %eax
	cmpb	$65, %al
	jne	.L4
	movl	-124(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -124(%rbp)
	jmp	.L5
.L4:
	movl	-120(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -120(%rbp)
.L5:
	movl	-120(%rbp), %edx
	movl	-124(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -120(%rbp)
	movl	-120(%rbp), %eax
	movl	%eax, -124(%rbp)
.L3:
	movl	$0, -116(%rbp)
	jmp	.L6
.L8:
	movl	-116(%rbp), %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	cmpb	$65, %al
	jne	.L7
	addl	$1, -124(%rbp)
	jmp	.L6
.L7:
	addl	$1, -120(%rbp)
.L6:
	addl	$1, -116(%rbp)
	movl	-116(%rbp), %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	cmpb	$10, %al
	jne	.L8
	cmpl	$3, -128(%rbp)
	jne	.L9
	movl	-124(%rbp), %edx
	movl	-120(%rbp), %eax
	addl	%edx, %eax
	cmpl	$20, %eax
	jg	.L10
	cmpl	$10, -124(%rbp)
	jne	.L11
	movl	-124(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -124(%rbp)
	jmp	.L12
.L11:
	movl	-120(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -120(%rbp)
.L12:
	movl	-120(%rbp), %edx
	movl	-124(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L10:
	movl	-124(%rbp), %eax
	cmpl	-120(%rbp), %eax
	jle	.L14
	movl	-124(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -124(%rbp)
	jmp	.L15
.L14:
	movl	-120(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -120(%rbp)
.L15:
	movl	-120(%rbp), %edx
	movl	-124(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L13:
	movl	$0, -120(%rbp)
	movl	-120(%rbp), %eax
	movl	%eax, -124(%rbp)
	movl	$0, -128(%rbp)
.L9:
	addl	$1, -128(%rbp)
.L2:
	movq	stdin(%rip), %rdx
	leaq	-112(%rbp), %rax
	movl	$101, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	movzbl	-112(%rbp), %eax
	cmpb	$48, %al
	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\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
	addq	$-128, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -124(%rbp)
	movl	$0, -120(%rbp)
	movl	$1, -128(%rbp)
	jmp	.L2
.L16:
	cmpl	$1, -128(%rbp)
	je	.L3
	movzbl	-112(%rbp), %eax
	cmpb	$65, %al
	jne	.L4
	movl	-124(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -124(%rbp)
	jmp	.L5
.L4:
	movl	-120(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -120(%rbp)
.L5:
	movl	-120(%rbp), %edx
	movl	-124(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -120(%rbp)
	movl	-120(%rbp), %eax
	movl	%eax, -124(%rbp)
.L3:
	movl	$0, -116(%rbp)
	jmp	.L6
.L8:
	movl	-116(%rbp), %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	cmpb	$65, %al
	jne	.L7
	addl	$1, -124(%rbp)
	jmp	.L6
.L7:
	addl	$1, -120(%rbp)
.L6:
	addl	$1, -116(%rbp)
	movl	-116(%rbp), %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	cmpb	$10, %al
	jne	.L8
	cmpl	$3, -128(%rbp)
	jne	.L9
	movl	-124(%rbp), %edx
	movl	-120(%rbp), %eax
	addl	%edx, %eax
	cmpl	$20, %eax
	jg	.L10
	cmpl	$10, -124(%rbp)
	jne	.L11
	movl	-124(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -124(%rbp)
	jmp	.L12
.L11:
	movl	-120(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -120(%rbp)
.L12:
	movl	-120(%rbp), %edx
	movl	-124(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L10:
	movl	-124(%rbp), %eax
	cmpl	-120(%rbp), %eax
	jle	.L14
	movl	-124(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -124(%rbp)
	jmp	.L15
.L14:
	movl	-120(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -120(%rbp)
.L15:
	movl	-120(%rbp), %edx
	movl	-124(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L13:
	movl	$0, -120(%rbp)
	movl	-120(%rbp), %eax
	movl	%eax, -124(%rbp)
	movl	$0, -128(%rbp)
.L9:
	addl	$1, -128(%rbp)
.L2:
	movq	stdin(%rip), %rdx
	leaq	-112(%rbp), %rax
	movl	$101, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	movzbl	-112(%rbp), %eax
	cmpb	$48, %al
	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:
