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

```c
#include <stdio.h>
#include <string.h>

int main(void)
{
	char A[100] = { 0 };
	char B[100] = { 0 };
	char C[100] = { 0 };
	int i;
	int count_a = 0;
	int count_b = 0;
	int count_c = 0;
	int turn = 0;
	int n_a = 0;
	int n_b = 0;
	int n_c = 0;

	scanf("%s\n%s\n%s", A, B, C);
	n_a = strlen(A);
	n_b = strlen(B);
	n_c = strlen(C);

	for (i = 0;i < 300;i++)
	{
		if (turn == 0 && (n_a != count_a))
		{
			turn = A[count_a] - 'a';
			count_a = count_a + 1;
		}
		else if (turn == 0 && (n_a == count_a))
		{
			printf("A");
			break;
		}
		else if (turn == 1 && (n_b != count_b))
		{
			turn = B[count_b] - 'a';
			count_b = count_b + 1;
		}
		else if (turn == 1 && (n_b == count_b))
		{
			printf("B");
			break;
		}
		else if (turn == 2 && (n_c != count_c))
		{
			turn = C[count_c] - 'a';
			count_c = count_c + 1;
		}
		else if (turn == 2 && (n_c == count_c))
		{
			printf("C");
			break;
		}
	}

}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s\n%s\n%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pxor	%xmm0, %xmm0
	leaq	.LC0(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$344, %rsp
	.cfi_def_cfa_offset 384
	movq	%fs:40, %rax
	movq	%rax, 328(%rsp)
	xorl	%eax, %eax
	leaq	112(%rsp), %rbp
	movq	%rsp, %r13
	movaps	%xmm0, (%rsp)
	leaq	224(%rsp), %r12
	movq	%rbp, %rdx
	movq	%r13, %rsi
	movaps	%xmm0, 16(%rsp)
	movq	%r12, %rcx
	movaps	%xmm0, 32(%rsp)
	movaps	%xmm0, 48(%rsp)
	movaps	%xmm0, 64(%rsp)
	movaps	%xmm0, 80(%rsp)
	movaps	%xmm0, 112(%rsp)
	movaps	%xmm0, 128(%rsp)
	movaps	%xmm0, 144(%rsp)
	movaps	%xmm0, 160(%rsp)
	movaps	%xmm0, 176(%rsp)
	movaps	%xmm0, 192(%rsp)
	movaps	%xmm0, 224(%rsp)
	movaps	%xmm0, 240(%rsp)
	movaps	%xmm0, 256(%rsp)
	movaps	%xmm0, 272(%rsp)
	movaps	%xmm0, 288(%rsp)
	movaps	%xmm0, 304(%rsp)
	movl	$0, 96(%rsp)
	movl	$0, 208(%rsp)
	movl	$0, 320(%rsp)
	call	__isoc99_scanf@PLT
	movq	%r13, %rdi
	call	strlen@PLT
	movq	%rbp, %rdi
	movl	%eax, %ebx
	call	strlen@PLT
	movq	%r12, %rdi
	movl	%eax, %ebp
	call	strlen@PLT
	movl	$300, %edx
	xorl	%r8d, %r8d
	xorl	%edi, %edi
	movl	%eax, %r9d
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L53:
	movslq	%ecx, %rax
	addl	$1, %ecx
	movsbl	(%rsp,%rax), %eax
	subl	$97, %eax
.L3:
	subl	$1, %edx
	je	.L5
.L9:
	testl	%eax, %eax
	sete	%sil
	cmpl	%ecx, %ebx
	je	.L48
	testb	%sil, %sil
	jne	.L53
	cmpl	%ecx, %ebx
	je	.L48
.L4:
	cmpl	$1, %eax
	sete	%sil
	cmpl	%edi, %ebp
	je	.L49
	testb	%sil, %sil
	je	.L6
	movslq	%edi, %rax
	addl	$1, %edi
	movsbl	112(%rsp,%rax), %eax
	subl	$97, %eax
	subl	$1, %edx
	jne	.L9
	.p2align 4,,10
	.p2align 3
.L5:
	movq	328(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L54
	addq	$344, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L48:
	.cfi_restore_state
	testb	%sil, %sil
	je	.L4
	movl	$65, %edi
	call	putchar@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	cmpl	%edi, %ebp
	jne	.L7
	.p2align 4,,10
	.p2align 3
.L49:
	testb	%sil, %sil
	jne	.L55
.L7:
	cmpl	$2, %eax
	sete	%sil
	cmpl	%r8d, %r9d
	je	.L50
	testb	%sil, %sil
	je	.L8
	movslq	%r8d, %rax
	addl	$1, %r8d
	movsbl	224(%rsp,%rax), %eax
	subl	$97, %eax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L8:
	cmpl	%r8d, %r9d
	jne	.L3
	.p2align 4,,10
	.p2align 3
.L50:
	testb	%sil, %sil
	je	.L3
	movl	$67, %edi
	call	putchar@PLT
	jmp	.L5
.L55:
	movl	$66, %edi
	call	putchar@PLT
	jmp	.L5
.L54:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s\n%s\n%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pxor	%xmm0, %xmm0
	leaq	.LC0(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$344, %rsp
	.cfi_def_cfa_offset 384
	movq	%fs:40, %rax
	movq	%rax, 328(%rsp)
	xorl	%eax, %eax
	leaq	112(%rsp), %rbp
	movq	%rsp, %r13
	movaps	%xmm0, (%rsp)
	leaq	224(%rsp), %r12
	movq	%rbp, %rdx
	movq	%r13, %rsi
	movaps	%xmm0, 16(%rsp)
	movq	%r12, %rcx
	movaps	%xmm0, 32(%rsp)
	movaps	%xmm0, 48(%rsp)
	movaps	%xmm0, 64(%rsp)
	movaps	%xmm0, 80(%rsp)
	movaps	%xmm0, 112(%rsp)
	movaps	%xmm0, 128(%rsp)
	movaps	%xmm0, 144(%rsp)
	movaps	%xmm0, 160(%rsp)
	movaps	%xmm0, 176(%rsp)
	movaps	%xmm0, 192(%rsp)
	movaps	%xmm0, 224(%rsp)
	movaps	%xmm0, 240(%rsp)
	movaps	%xmm0, 256(%rsp)
	movaps	%xmm0, 272(%rsp)
	movaps	%xmm0, 288(%rsp)
	movaps	%xmm0, 304(%rsp)
	movl	$0, 96(%rsp)
	movl	$0, 208(%rsp)
	movl	$0, 320(%rsp)
	call	__isoc99_scanf@PLT
	movq	%r13, %rdi
	call	strlen@PLT
	movq	%rbp, %rdi
	movl	%eax, %ebx
	call	strlen@PLT
	movq	%r12, %rdi
	movl	%eax, %ebp
	call	strlen@PLT
	movl	$300, %edx
	xorl	%r8d, %r8d
	xorl	%edi, %edi
	movl	%eax, %r9d
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L53:
	movslq	%ecx, %rax
	addl	$1, %ecx
	movsbl	(%rsp,%rax), %eax
	subl	$97, %eax
.L3:
	subl	$1, %edx
	je	.L5
.L9:
	testl	%eax, %eax
	sete	%sil
	cmpl	%ecx, %ebx
	je	.L48
	testb	%sil, %sil
	jne	.L53
	cmpl	%ecx, %ebx
	je	.L48
.L4:
	cmpl	$1, %eax
	sete	%sil
	cmpl	%edi, %ebp
	je	.L49
	testb	%sil, %sil
	je	.L6
	movslq	%edi, %rax
	addl	$1, %edi
	movsbl	112(%rsp,%rax), %eax
	subl	$97, %eax
	subl	$1, %edx
	jne	.L9
	.p2align 4,,10
	.p2align 3
.L5:
	movq	328(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L54
	addq	$344, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L48:
	.cfi_restore_state
	testb	%sil, %sil
	je	.L4
	movl	$65, %edi
	call	putchar@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	cmpl	%edi, %ebp
	jne	.L7
	.p2align 4,,10
	.p2align 3
.L49:
	testb	%sil, %sil
	jne	.L55
.L7:
	cmpl	$2, %eax
	sete	%sil
	cmpl	%r8d, %r9d
	je	.L50
	testb	%sil, %sil
	je	.L8
	movslq	%r8d, %rax
	addl	$1, %r8d
	movsbl	224(%rsp,%rax), %eax
	subl	$97, %eax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L8:
	cmpl	%r8d, %r9d
	jne	.L3
	.p2align 4,,10
	.p2align 3
.L50:
	testb	%sil, %sil
	je	.L3
	movl	$67, %edi
	call	putchar@PLT
	jmp	.L5
.L55:
	movl	$66, %edi
	call	putchar@PLT
	jmp	.L5
.L54:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s\n%s\n%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pxor	%xmm0, %xmm0
	leaq	.LC0(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$344, %rsp
	.cfi_def_cfa_offset 384
	movq	%fs:40, %rax
	movq	%rax, 328(%rsp)
	xorl	%eax, %eax
	leaq	112(%rsp), %rbp
	movq	%rsp, %r13
	movaps	%xmm0, (%rsp)
	leaq	224(%rsp), %r12
	movq	%rbp, %rdx
	movq	%r13, %rsi
	movaps	%xmm0, 16(%rsp)
	movq	%r12, %rcx
	movaps	%xmm0, 32(%rsp)
	movaps	%xmm0, 48(%rsp)
	movaps	%xmm0, 64(%rsp)
	movaps	%xmm0, 80(%rsp)
	movaps	%xmm0, 112(%rsp)
	movaps	%xmm0, 128(%rsp)
	movaps	%xmm0, 144(%rsp)
	movaps	%xmm0, 160(%rsp)
	movaps	%xmm0, 176(%rsp)
	movaps	%xmm0, 192(%rsp)
	movaps	%xmm0, 224(%rsp)
	movaps	%xmm0, 240(%rsp)
	movaps	%xmm0, 256(%rsp)
	movaps	%xmm0, 272(%rsp)
	movaps	%xmm0, 288(%rsp)
	movaps	%xmm0, 304(%rsp)
	movl	$0, 96(%rsp)
	movl	$0, 208(%rsp)
	movl	$0, 320(%rsp)
	call	__isoc99_scanf@PLT
	movq	%r13, %rdi
	call	strlen@PLT
	movq	%rbp, %rdi
	movl	%eax, %ebx
	call	strlen@PLT
	movq	%r12, %rdi
	movl	%eax, %ebp
	call	strlen@PLT
	movl	$300, %edx
	xorl	%r8d, %r8d
	xorl	%edi, %edi
	movl	%eax, %r9d
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L53:
	movslq	%ecx, %rax
	addl	$1, %ecx
	movsbl	(%rsp,%rax), %eax
	subl	$97, %eax
.L3:
	subl	$1, %edx
	je	.L5
.L9:
	testl	%eax, %eax
	sete	%sil
	cmpl	%ecx, %ebx
	je	.L48
	testb	%sil, %sil
	jne	.L53
	cmpl	%ecx, %ebx
	je	.L48
.L4:
	cmpl	$1, %eax
	sete	%sil
	cmpl	%edi, %ebp
	je	.L49
	testb	%sil, %sil
	je	.L6
	movslq	%edi, %rax
	addl	$1, %edi
	movsbl	112(%rsp,%rax), %eax
	subl	$97, %eax
	subl	$1, %edx
	jne	.L9
	.p2align 4,,10
	.p2align 3
.L5:
	movq	328(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L54
	addq	$344, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L48:
	.cfi_restore_state
	testb	%sil, %sil
	je	.L4
	movl	$65, %edi
	call	putchar@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	cmpl	%edi, %ebp
	jne	.L7
	.p2align 4,,10
	.p2align 3
.L49:
	testb	%sil, %sil
	jne	.L55
.L7:
	cmpl	$2, %eax
	sete	%sil
	cmpl	%r8d, %r9d
	je	.L50
	testb	%sil, %sil
	je	.L8
	movslq	%r8d, %rax
	addl	$1, %r8d
	movsbl	224(%rsp,%rax), %eax
	subl	$97, %eax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L8:
	cmpl	%r8d, %r9d
	jne	.L3
	.p2align 4,,10
	.p2align 3
.L50:
	testb	%sil, %sil
	je	.L3
	movl	$67, %edi
	call	putchar@PLT
	jmp	.L5
.L55:
	movl	$66, %edi
	call	putchar@PLT
	jmp	.L5
.L54:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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:
```
```c
#include <stdio.h>
#include <string.h>

int main(void)
{
	char A[100] = { 0 };
	char B[100] = { 0 };
	char C[100] = { 0 };
	int i;
	int count_a = 0;
	int count_b = 0;
	int count_c = 0;
	int turn = 0;
	int n_a = 0;
	int n_b = 0;
	int n_c = 0;

	scanf("%s\n%s\n%s", A, B, C);
	n_a = strlen(A);
	n_b = strlen(B);
	n_c = strlen(C);

	for (i = 0;i < 300;i++)
	{
		if (turn == 0 && (n_a != count_a))
		{
			turn = A[count_a] - 'a';
			count_a = count_a + 1;
		}
		else if (turn == 0 && (n_a == count_a))
		{
			printf("A");
			break;
		}
		else if (turn == 1 && (n_b != count_b))
		{
			turn = B[count_b] - 'a';
			count_b = count_b + 1;
		}
		else if (turn == 1 && (n_b == count_b))
		{
			printf("B");
			break;
		}
		else if (turn == 2 && (n_c != count_c))
		{
			turn = C[count_c] - 'a';
			count_c = count_c + 1;
		}
		else if (turn == 2 && (n_c == count_c))
		{
			printf("C");
			break;
		}
	}

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

```c
#include <stdio.h>
#include <string.h>

int main(void)
{
	char A[100] = { 0 };
	char B[100] = { 0 };
	char C[100] = { 0 };
	int i;
	int count_a = 0;
	int count_b = 0;
	int count_c = 0;
	int turn = 0;
	int n_a = 0;
	int n_b = 0;
	int n_c = 0;

	scanf("%s\n%s\n%s", A, B, C);
	n_a = strlen(A);
	n_b = strlen(B);
	n_c = strlen(C);

	for (i = 0;i < 300;i++)
	{
		if (turn == 0 && (n_a != count_a))
		{
			turn = A[count_a] - 'a';
			count_a = count_a + 1;
		}
		else if (turn == 0 && (n_a == count_a))
		{
			printf("A");
			break;
		}
		else if (turn == 1 && (n_b != count_b))
		{
			turn = B[count_b] - 'a';
			count_b = count_b + 1;
		}
		else if (turn == 1 && (n_b == count_b))
		{
			printf("B");
			break;
		}
		else if (turn == 2 && (n_c != count_c))
		{
			turn = C[count_c] - 'a';
			count_c = count_c + 1;
		}
		else if (turn == 2 && (n_c == count_c))
		{
			printf("C");
			break;
		}
	}

}```

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.
Optimized Assembly Code:

abcb
aabb
bccc
 caa
accc
ca
 aaca
aabb
cccc
 abcb
bbaa
bccc
 aacb
bbaa
bccc
 aacb
bbaa
cccb
 aaca
bbaa
cccb
 aaca
aabb
cccb
 acaa
aabb
cccc
 acaa
abab
cccc

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

```c
#include <stdio.h>
#include <string.h>

int main(void)
{
	char A[100] = { 0 };
	char B[100] = { 0 };
	char C[100] = { 0 };
	int i;
	int count_a = 0;
	int count_b = 0;
	int count_c = 0;
	int turn = 0;
	int n_a = 0;
	int n_b = 0;
	int n_c = 0;

	scanf("%s\n%s\n%s", A, B, C);
	n_a = strlen(A);
	n_b = strlen(B);
	n_c = strlen(C);

	for (i = 0;i < 300;i++)
	{
		if (turn == 0 && (n_a != count_a))
		{
			turn = A[count_a] - 'a';
			count_a = count_a + 1;
		}
		else if (turn == 0 && (n_a == count_a))
		{
			printf("A");
			break;
		}
		else if (turn == 1 && (n_b != count_b))
		{
			turn = B[count_b] - 'a';
			count_b = count_b + 1;
		}
		else if (turn == 1 && (n_b == count_b))
		{
			printf("B");
			break;
		}
		else if (turn == 2 && (n_c != count_c))
		{
			turn = C[count_c] - 'a';
			count_c = count_c + 1;
		}
		else if (turn == 2 && (n_c == count_c))
		{
			printf("C");
			break;
		}
	}

}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s\n%s\n%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pxor	%xmm0, %xmm0
	leaq	.LC0(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$344, %rsp
	.cfi_def_cfa_offset 384
	movq	%fs:40, %rax
	movq	%rax, 328(%rsp)
	xorl	%eax, %eax
	leaq	112(%rsp), %rbp
	movq	%rsp, %r13
	movaps	%xmm0, (%rsp)
	leaq	224(%rsp), %r12
	movq	%rbp, %rdx
	movq	%r13, %rsi
	movaps	%xmm0, 16(%rsp)
	movq	%r12, %rcx
	movaps	%xmm0, 32(%rsp)
	movaps	%xmm0, 48(%rsp)
	movaps	%xmm0, 64(%rsp)
	movaps	%xmm0, 80(%rsp)
	movaps	%xmm0, 112(%rsp)
	movaps	%xmm0, 128(%rsp)
	movaps	%xmm0, 144(%rsp)
	movaps	%xmm0, 160(%rsp)
	movaps	%xmm0, 176(%rsp)
	movaps	%xmm0, 192(%rsp)
	movaps	%xmm0, 224(%rsp)
	movaps	%xmm0, 240(%rsp)
	movaps	%xmm0, 256(%rsp)
	movaps	%xmm0, 272(%rsp)
	movaps	%xmm0, 288(%rsp)
	movaps	%xmm0, 304(%rsp)
	movl	$0, 96(%rsp)
	movl	$0, 208(%rsp)
	movl	$0, 320(%rsp)
	call	__isoc99_scanf@PLT
	movq	%r13, %rdi
	call	strlen@PLT
	movq	%rbp, %rdi
	movl	%eax, %ebx
	call	strlen@PLT
	movq	%r12, %rdi
	movl	%eax, %ebp
	call	strlen@PLT
	movl	$300, %edx
	xorl	%r8d, %r8d
	xorl	%edi, %edi
	movl	%eax, %r9d
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L53:
	movslq	%ecx, %rax
	addl	$1, %ecx
	movsbl	(%rsp,%rax), %eax
	subl	$97, %eax
.L3:
	subl	$1, %edx
	je	.L5
.L9:
	testl	%eax, %eax
	sete	%sil
	cmpl	%ecx, %ebx
	je	.L48
	testb	%sil, %sil
	jne	.L53
	cmpl	%ecx, %ebx
	je	.L48
.L4:
	cmpl	$1, %eax
	sete	%sil
	cmpl	%edi, %ebp
	je	.L49
	testb	%sil, %sil
	je	.L6
	movslq	%edi, %rax
	addl	$1, %edi
	movsbl	112(%rsp,%rax), %eax
	subl	$97, %eax
	subl	$1, %edx
	jne	.L9
	.p2align 4,,10
	.p2align 3
.L5:
	movq	328(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L54
	addq	$344, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L48:
	.cfi_restore_state
	testb	%sil, %sil
	je	.L4
	movl	$65, %edi
	call	putchar@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	cmpl	%edi, %ebp
	jne	.L7
	.p2align 4,,10
	.p2align 3
.L49:
	testb	%sil, %sil
	jne	.L55
.L7:
	cmpl	$2, %eax
	sete	%sil
	cmpl	%r8d, %r9d
	je	.L50
	testb	%sil, %sil
	je	.L8
	movslq	%r8d, %rax
	addl	$1, %r8d
	movsbl	224(%rsp,%rax), %eax
	subl	$97, %eax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L8:
	cmpl	%r8d, %r9d
	jne	.L3
	.p2align 4,,10
	.p2align 3
.L50:
	testb	%sil, %sil
	je	.L3
	movl	$67, %edi
	call	putchar@PLT
	jmp	.L5
.L55:
	movl	$66, %edi
	call	putchar@PLT
	jmp	.L5
.L54:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s\n%s\n%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pxor	%xmm0, %xmm0
	leaq	.LC0(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$344, %rsp
	.cfi_def_cfa_offset 384
	movq	%fs:40, %rax
	movq	%rax, 328(%rsp)
	xorl	%eax, %eax
	leaq	112(%rsp), %rbp
	movq	%rsp, %r13
	movaps	%xmm0, (%rsp)
	leaq	224(%rsp), %r12
	movq	%rbp, %rdx
	movq	%r13, %rsi
	movaps	%xmm0, 16(%rsp)
	movq	%r12, %rcx
	movaps	%xmm0, 32(%rsp)
	movaps	%xmm0, 48(%rsp)
	movaps	%xmm0, 64(%rsp)
	movaps	%xmm0, 80(%rsp)
	movaps	%xmm0, 112(%rsp)
	movaps	%xmm0, 128(%rsp)
	movaps	%xmm0, 144(%rsp)
	movaps	%xmm0, 160(%rsp)
	movaps	%xmm0, 176(%rsp)
	movaps	%xmm0, 192(%rsp)
	movaps	%xmm0, 224(%rsp)
	movaps	%xmm0, 240(%rsp)
	movaps	%xmm0, 256(%rsp)
	movaps	%xmm0, 272(%rsp)
	movaps	%xmm0, 288(%rsp)
	movaps	%xmm0, 304(%rsp)
	movl	$0, 96(%rsp)
	movl	$0, 208(%rsp)
	movl	$0, 320(%rsp)
	call	__isoc99_scanf@PLT
	movq	%r13, %rdi
	call	strlen@PLT
	movq	%rbp, %rdi
	movl	%eax, %ebx
	call	strlen@PLT
	movq	%r12, %rdi
	movl	%eax, %ebp
	call	strlen@PLT
	movl	$300, %edx
	xorl	%r8d, %r8d
	xorl	%edi, %edi
	movl	%eax, %r9d
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L53:
	movslq	%ecx, %rax
	addl	$1, %ecx
	movsbl	(%rsp,%rax), %eax
	subl	$97, %eax
.L3:
	subl	$1, %edx
	je	.L5
.L9:
	testl	%eax, %eax
	sete	%sil
	cmpl	%ecx, %ebx
	je	.L48
	testb	%sil, %sil
	jne	.L53
	cmpl	%ecx, %ebx
	je	.L48
.L4:
	cmpl	$1, %eax
	sete	%sil
	cmpl	%edi, %ebp
	je	.L49
	testb	%sil, %sil
	je	.L6
	movslq	%edi, %rax
	addl	$1, %edi
	movsbl	112(%rsp,%rax), %eax
	subl	$97, %eax
	subl	$1, %edx
	jne	.L9
	.p2align 4,,10
	.p2align 3
.L5:
	movq	328(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L54
	addq	$344, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L48:
	.cfi_restore_state
	testb	%sil, %sil
	je	.L4
	movl	$65, %edi
	call	putchar@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	cmpl	%edi, %ebp
	jne	.L7
	.p2align 4,,10
	.p2align 3
.L49:
	testb	%sil, %sil
	jne	.L55
.L7:
	cmpl	$2, %eax
	sete	%sil
	cmpl	%r8d, %r9d
	je	.L50
	testb	%sil, %sil
	je	.L8
	movslq	%r8d, %rax
	addl	$1, %r8d
	movsbl	224(%rsp,%rax), %eax
	subl	$97, %eax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L8:
	cmpl	%r8d, %r9d
	jne	.L3
	.p2align 4,,10
	.p2align 3
.L50:
	testb	%sil, %sil
	je	.L3
	movl	$67, %edi
	call	putchar@PLT
	jmp	.L5
.L55:
	movl	$66, %edi
	call	putchar@PLT
	jmp	.L5
.L54:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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:
```