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

```c
#include <limits.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

// 内部定数
#define D_STR_MAX		100000									// 最大文字列長

// 内部変数 - テスト用
#ifdef D_TEST
	static int siRes;
	static FILE *szpFpT, *szpFpA;
#endif

// 実行メイン
int
fMain(
	int piTNo					// <I> テスト番号 1～
)
{
	int i;
	char lc1Buf[1024], lc1Out[1024];

	// テストファイルオープン
#ifdef D_TEST
	sprintf(lc1Buf, ".\\Test\\T%d.txt", piTNo);
	szpFpT = fopen(lc1Buf, "r");
	sprintf(lc1Buf, ".\\Test\\A%d.txt", piTNo);
	szpFpA = fopen(lc1Buf, "r");
	siRes = 0;
#endif

	// 文字列取得
	char lc1Str[D_STR_MAX + 5];
#ifdef D_TEST
	fgets(lc1Str, sizeof(lc1Str), szpFpT);
#else
	fgets(lc1Str, sizeof(lc1Str), stdin);
#endif

	// 文字列長
	int liSLen = strlen(lc1Str);
	liSLen--;
	lc1Str[liSLen] = '\0';			// 改行カット

	// チェック文字数
	int liCCnt = liSLen / 2;

	// 変更に必要な長さ - 初期値
	int liNLen = liSLen;

	// 文字変更の必要性をチェック - 左側
	for (i = 0; i < liCCnt; i++) {

		// 一致チェック
		if (lc1Str[i] == lc1Str[i + 1]) {
			continue;
		}

		// 変更に必要な長さ
		liNLen = liSLen - i - 1;
	}

	// 文字変更の必要性をチェック - 右側
	for (i = 0; i < liCCnt; i++) {

		// 一致チェック
		if (lc1Str[liSLen - i - 1] == lc1Str[liSLen - i - 2]) {
			continue;
		}

		// 変更に必要な長さ
		int liLen = liSLen - i - 1;
		if (liNLen > liLen) {
			liNLen = liLen;
		}
	}

	// 結果セット
	sprintf(lc1Out, "%d\n", liNLen);

	// 結果表示
#ifdef D_TEST
	fgets(lc1Buf, sizeof(lc1Buf), szpFpA);
	if (strcmp(lc1Buf, lc1Out)) {
		siRes = -1;
	}
#else
	printf("%s", lc1Out);
#endif

	// テストファイルクローズ
#ifdef D_TEST
	fclose(szpFpT);
	fclose(szpFpA);
#endif

	// テスト結果
#ifdef D_TEST
	if (siRes == 0) {
		printf("OK %d\n", piTNo);
	}
	else {
		printf("NG %d\n", piTNo);
	}
#endif

	return 0;
}

int
main()
{

#ifdef D_TEST
	int i;
	for (i = D_TEST_SNO; i <= D_TEST_ENO; i++) {
		fMain(i);
	}
#else
	fMain(0);
#endif

	return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%s"
	.text
	.globl	fMain
	.type	fMain, @function
fMain:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-98304(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2784, %rsp
	movl	%edi, -101076(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	stdin(%rip), %rdx
	leaq	-100016(%rbp), %rax
	movl	$100005, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	leaq	-100016(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -101052(%rbp)
	subl	$1, -101052(%rbp)
	movl	-101052(%rbp), %eax
	cltq
	movb	$0, -100016(%rbp,%rax)
	movl	-101052(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -101048(%rbp)
	movl	-101052(%rbp), %eax
	movl	%eax, -101056(%rbp)
	movl	$0, -101060(%rbp)
	jmp	.L2
.L5:
	movl	-101060(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %edx
	movl	-101060(%rbp), %eax
	addl	$1, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	%al, %dl
	je	.L12
	movl	-101052(%rbp), %eax
	subl	-101060(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -101056(%rbp)
	jmp	.L4
.L12:
	nop
.L4:
	addl	$1, -101060(%rbp)
.L2:
	movl	-101060(%rbp), %eax
	cmpl	-101048(%rbp), %eax
	jl	.L5
	movl	$0, -101060(%rbp)
	jmp	.L6
.L9:
	movl	-101052(%rbp), %eax
	subl	-101060(%rbp), %eax
	subl	$1, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %edx
	movl	-101052(%rbp), %eax
	subl	-101060(%rbp), %eax
	subl	$2, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	%al, %dl
	je	.L13
	movl	-101052(%rbp), %eax
	subl	-101060(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -101044(%rbp)
	movl	-101056(%rbp), %eax
	cmpl	-101044(%rbp), %eax
	jle	.L8
	movl	-101044(%rbp), %eax
	movl	%eax, -101056(%rbp)
	jmp	.L8
.L13:
	nop
.L8:
	addl	$1, -101060(%rbp)
.L6:
	movl	-101060(%rbp), %eax
	cmpl	-101048(%rbp), %eax
	jl	.L9
	movl	-101056(%rbp), %edx
	leaq	-101040(%rbp), %rax
	leaq	.LC0(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	sprintf@PLT
	leaq	-101040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	fMain, .-fMain
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, %edi
	call	fMain
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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\n"
.LC1:
	.string	"%s"
	.text
	.p2align 4
	.globl	fMain
	.type	fMain, @function
fMain:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	leaq	-98304(%rsp), %r11
	.cfi_def_cfa 11, 98328
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2744, %rsp
	.cfi_def_cfa_offset 101072
	movq	stdin(%rip), %rdx
	movl	$100005, %esi
	movq	%fs:40, %rax
	movq	%rax, 101032(%rsp)
	xorl	%eax, %eax
	leaq	1024(%rsp), %rbx
	movq	%rbx, %rdi
	call	fgets@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	leal	-1(%rax), %r8d
	movl	%r8d, %edi
	movslq	%r8d, %rdx
	shrl	$31, %edi
	movb	$0, 1024(%rsp,%rdx)
	addl	%r8d, %edi
	sarl	%edi
	cmpl	$1, %r8d
	jle	.L2
	movzbl	1024(%rsp), %ecx
	xorl	%edx, %edx
	leaq	1025(%rsp), %r11
	leal	-2(%rax), %r9d
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%ecx, %r10d
	movzbl	(%r11,%rdx), %ecx
	movl	%r9d, %esi
	subl	%edx, %esi
	cmpb	%cl, %r10b
	cmovne	%esi, %r8d
	addq	$1, %rdx
	cmpl	%edx, %edi
	jg	.L4
	movzbl	1022(%rsp,%rax), %esi
	leaq	(%rbx,%rax), %rcx
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L6:
	movl	%r9d, %eax
	movl	%esi, %r10d
	movzbl	-3(%rcx), %esi
	subl	%edx, %eax
	cmpl	%eax, %r8d
	cmovle	%r8d, %eax
	cmpb	%sil, %r10b
	cmovne	%eax, %r8d
	addl	$1, %edx
	subq	$1, %rcx
	cmpl	%edx, %edi
	jg	.L6
.L2:
	movq	%rsp, %r12
	movl	$1024, %edx
	movl	$1, %esi
	xorl	%eax, %eax
	movq	%r12, %rdi
	leaq	.LC0(%rip), %rcx
	call	__sprintf_chk@PLT
	xorl	%eax, %eax
	movq	%r12, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	101032(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	addq	$101048, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L12:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	fMain, .-fMain
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	xorl	%edi, %edi
	call	fMain
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE52:
	.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\n"
.LC1:
	.string	"%s"
	.text
	.p2align 4
	.globl	fMain
	.type	fMain, @function
fMain:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	leaq	-98304(%rsp), %r11
	.cfi_def_cfa 11, 98328
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2744, %rsp
	.cfi_def_cfa_offset 101072
	movq	stdin(%rip), %rdx
	movl	$100005, %esi
	movq	%fs:40, %rax
	movq	%rax, 101032(%rsp)
	xorl	%eax, %eax
	leaq	1024(%rsp), %rbx
	movq	%rbx, %rdi
	call	fgets@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	leal	-1(%rax), %r8d
	movl	%r8d, %edi
	movslq	%r8d, %rdx
	shrl	$31, %edi
	movb	$0, 1024(%rsp,%rdx)
	addl	%r8d, %edi
	sarl	%edi
	cmpl	$1, %r8d
	jle	.L2
	movzbl	1024(%rsp), %ecx
	xorl	%edx, %edx
	leaq	1025(%rsp), %r11
	leal	-2(%rax), %r9d
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%ecx, %r10d
	movzbl	(%r11,%rdx), %ecx
	movl	%r9d, %esi
	subl	%edx, %esi
	cmpb	%cl, %r10b
	cmovne	%esi, %r8d
	addq	$1, %rdx
	cmpl	%edx, %edi
	jg	.L4
	movzbl	1022(%rsp,%rax), %esi
	leaq	(%rbx,%rax), %rcx
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L6:
	movl	%r9d, %eax
	movl	%esi, %r10d
	movzbl	-3(%rcx), %esi
	subl	%edx, %eax
	cmpl	%eax, %r8d
	cmovle	%r8d, %eax
	cmpb	%sil, %r10b
	cmovne	%eax, %r8d
	addl	$1, %edx
	subq	$1, %rcx
	cmpl	%edx, %edi
	jg	.L6
.L2:
	movq	%rsp, %r12
	movl	$1024, %edx
	movl	$1, %esi
	xorl	%eax, %eax
	movq	%r12, %rdi
	leaq	.LC0(%rip), %rcx
	call	__sprintf_chk@PLT
	xorl	%eax, %eax
	movq	%r12, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	101032(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	addq	$101048, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L12:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	fMain, .-fMain
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	xorl	%edi, %edi
	call	fMain
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE52:
	.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 <limits.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

// 内部定数
#define D_STR_MAX		100000									// 最大文字列長

// 内部変数 - テスト用
#ifdef D_TEST
	static int siRes;
	static FILE *szpFpT, *szpFpA;
#endif

// 実行メイン
int
fMain(
	int piTNo					// <I> テスト番号 1～
)
{
	int i;
	char lc1Buf[1024], lc1Out[1024];

	// テストファイルオープン
#ifdef D_TEST
	sprintf(lc1Buf, ".\\Test\\T%d.txt", piTNo);
	szpFpT = fopen(lc1Buf, "r");
	sprintf(lc1Buf, ".\\Test\\A%d.txt", piTNo);
	szpFpA = fopen(lc1Buf, "r");
	siRes = 0;
#endif

	// 文字列取得
	char lc1Str[D_STR_MAX + 5];
#ifdef D_TEST
	fgets(lc1Str, sizeof(lc1Str), szpFpT);
#else
	fgets(lc1Str, sizeof(lc1Str), stdin);
#endif

	// 文字列長
	int liSLen = strlen(lc1Str);
	liSLen--;
	lc1Str[liSLen] = '\0';			// 改行カット

	// チェック文字数
	int liCCnt = liSLen / 2;

	// 変更に必要な長さ - 初期値
	int liNLen = liSLen;

	// 文字変更の必要性をチェック - 左側
	for (i = 0; i < liCCnt; i++) {

		// 一致チェック
		if (lc1Str[i] == lc1Str[i + 1]) {
			continue;
		}

		// 変更に必要な長さ
		liNLen = liSLen - i - 1;
	}

	// 文字変更の必要性をチェック - 右側
	for (i = 0; i < liCCnt; i++) {

		// 一致チェック
		if (lc1Str[liSLen - i - 1] == lc1Str[liSLen - i - 2]) {
			continue;
		}

		// 変更に必要な長さ
		int liLen = liSLen - i - 1;
		if (liNLen > liLen) {
			liNLen = liLen;
		}
	}

	// 結果セット
	sprintf(lc1Out, "%d\n", liNLen);

	// 結果表示
#ifdef D_TEST
	fgets(lc1Buf, sizeof(lc1Buf), szpFpA);
	if (strcmp(lc1Buf, lc1Out)) {
		siRes = -1;
	}
#else
	printf("%s", lc1Out);
#endif

	// テストファイルクローズ
#ifdef D_TEST
	fclose(szpFpT);
	fclose(szpFpA);
#endif

	// テスト結果
#ifdef D_TEST
	if (siRes == 0) {
		printf("OK %d\n", piTNo);
	}
	else {
		printf("NG %d\n", piTNo);
	}
#endif

	return 0;
}

int
main()
{

#ifdef D_TEST
	int i;
	for (i = D_TEST_SNO; i <= D_TEST_ENO; i++) {
		fMain(i);
	}
#else
	fMain(0);
#endif

	return 0;
}


100000010
 011
 00001101
 111
 00011101
 100000101
 11111111
 000000000
 100000011
 100001011

7
 2
 4
 3
 5
 6
 8
 9
 7
 5

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

```c
#include <limits.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

// 内部定数
#define D_STR_MAX		100000									// 最大文字列長

// 内部変数 - テスト用
#ifdef D_TEST
	static int siRes;
	static FILE *szpFpT, *szpFpA;
#endif

// 実行メイン
int
fMain(
	int piTNo					// <I> テスト番号 1～
)
{
	int i;
	char lc1Buf[1024], lc1Out[1024];

	// テストファイルオープン
#ifdef D_TEST
	sprintf(lc1Buf, ".\\Test\\T%d.txt", piTNo);
	szpFpT = fopen(lc1Buf, "r");
	sprintf(lc1Buf, ".\\Test\\A%d.txt", piTNo);
	szpFpA = fopen(lc1Buf, "r");
	siRes = 0;
#endif

	// 文字列取得
	char lc1Str[D_STR_MAX + 5];
#ifdef D_TEST
	fgets(lc1Str, sizeof(lc1Str), szpFpT);
#else
	fgets(lc1Str, sizeof(lc1Str), stdin);
#endif

	// 文字列長
	int liSLen = strlen(lc1Str);
	liSLen--;
	lc1Str[liSLen] = '\0';			// 改行カット

	// チェック文字数
	int liCCnt = liSLen / 2;

	// 変更に必要な長さ - 初期値
	int liNLen = liSLen;

	// 文字変更の必要性をチェック - 左側
	for (i = 0; i < liCCnt; i++) {

		// 一致チェック
		if (lc1Str[i] == lc1Str[i + 1]) {
			continue;
		}

		// 変更に必要な長さ
		liNLen = liSLen - i - 1;
	}

	// 文字変更の必要性をチェック - 右側
	for (i = 0; i < liCCnt; i++) {

		// 一致チェック
		if (lc1Str[liSLen - i - 1] == lc1Str[liSLen - i - 2]) {
			continue;
		}

		// 変更に必要な長さ
		int liLen = liSLen - i - 1;
		if (liNLen > liLen) {
			liNLen = liLen;
		}
	}

	// 結果セット
	sprintf(lc1Out, "%d\n", liNLen);

	// 結果表示
#ifdef D_TEST
	fgets(lc1Buf, sizeof(lc1Buf), szpFpA);
	if (strcmp(lc1Buf, lc1Out)) {
		siRes = -1;
	}
#else
	printf("%s", lc1Out);
#endif

	// テストファイルクローズ
#ifdef D_TEST
	fclose(szpFpT);
	fclose(szpFpA);
#endif

	// テスト結果
#ifdef D_TEST
	if (siRes == 0) {
		printf("OK %d\n", piTNo);
	}
	else {
		printf("NG %d\n", piTNo);
	}
#endif

	return 0;
}

int
main()
{

#ifdef D_TEST
	int i;
	for (i = D_TEST_SNO; i <= D_TEST_ENO; i++) {
		fMain(i);
	}
#else
	fMain(0);
#endif

	return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%s"
	.text
	.globl	fMain
	.type	fMain, @function
fMain:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-98304(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2784, %rsp
	movl	%edi, -101076(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	stdin(%rip), %rdx
	leaq	-100016(%rbp), %rax
	movl	$100005, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	leaq	-100016(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -101052(%rbp)
	subl	$1, -101052(%rbp)
	movl	-101052(%rbp), %eax
	cltq
	movb	$0, -100016(%rbp,%rax)
	movl	-101052(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -101048(%rbp)
	movl	-101052(%rbp), %eax
	movl	%eax, -101056(%rbp)
	movl	$0, -101060(%rbp)
	jmp	.L2
.L5:
	movl	-101060(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %edx
	movl	-101060(%rbp), %eax
	addl	$1, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	%al, %dl
	je	.L12
	movl	-101052(%rbp), %eax
	subl	-101060(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -101056(%rbp)
	jmp	.L4
.L12:
	nop
.L4:
	addl	$1, -101060(%rbp)
.L2:
	movl	-101060(%rbp), %eax
	cmpl	-101048(%rbp), %eax
	jl	.L5
	movl	$0, -101060(%rbp)
	jmp	.L6
.L9:
	movl	-101052(%rbp), %eax
	subl	-101060(%rbp), %eax
	subl	$1, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %edx
	movl	-101052(%rbp), %eax
	subl	-101060(%rbp), %eax
	subl	$2, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	%al, %dl
	je	.L13
	movl	-101052(%rbp), %eax
	subl	-101060(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -101044(%rbp)
	movl	-101056(%rbp), %eax
	cmpl	-101044(%rbp), %eax
	jle	.L8
	movl	-101044(%rbp), %eax
	movl	%eax, -101056(%rbp)
	jmp	.L8
.L13:
	nop
.L8:
	addl	$1, -101060(%rbp)
.L6:
	movl	-101060(%rbp), %eax
	cmpl	-101048(%rbp), %eax
	jl	.L9
	movl	-101056(%rbp), %edx
	leaq	-101040(%rbp), %rax
	leaq	.LC0(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	sprintf@PLT
	leaq	-101040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	fMain, .-fMain
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, %edi
	call	fMain
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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\n"
.LC1:
	.string	"%s"
	.text
	.globl	fMain
	.type	fMain, @function
fMain:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-98304(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2784, %rsp
	movl	%edi, -101076(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	stdin(%rip), %rdx
	leaq	-100016(%rbp), %rax
	movl	$100005, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	leaq	-100016(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -101052(%rbp)
	subl	$1, -101052(%rbp)
	movl	-101052(%rbp), %eax
	cltq
	movb	$0, -100016(%rbp,%rax)
	movl	-101052(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -101048(%rbp)
	movl	-101052(%rbp), %eax
	movl	%eax, -101056(%rbp)
	movl	$0, -101060(%rbp)
	jmp	.L2
.L5:
	movl	-101060(%rbp), %eax
	cltq
	movzbl	-100016(%rbp,%rax), %edx
	movl	-101060(%rbp), %eax
	addl	$1, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	%al, %dl
	je	.L12
	movl	-101052(%rbp), %eax
	subl	-101060(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -101056(%rbp)
	jmp	.L4
.L12:
	nop
.L4:
	addl	$1, -101060(%rbp)
.L2:
	movl	-101060(%rbp), %eax
	cmpl	-101048(%rbp), %eax
	jl	.L5
	movl	$0, -101060(%rbp)
	jmp	.L6
.L9:
	movl	-101052(%rbp), %eax
	subl	-101060(%rbp), %eax
	subl	$1, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %edx
	movl	-101052(%rbp), %eax
	subl	-101060(%rbp), %eax
	subl	$2, %eax
	cltq
	movzbl	-100016(%rbp,%rax), %eax
	cmpb	%al, %dl
	je	.L13
	movl	-101052(%rbp), %eax
	subl	-101060(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -101044(%rbp)
	movl	-101056(%rbp), %eax
	cmpl	-101044(%rbp), %eax
	jle	.L8
	movl	-101044(%rbp), %eax
	movl	%eax, -101056(%rbp)
	jmp	.L8
.L13:
	nop
.L8:
	addl	$1, -101060(%rbp)
.L6:
	movl	-101060(%rbp), %eax
	cmpl	-101048(%rbp), %eax
	jl	.L9
	movl	-101056(%rbp), %edx
	leaq	-101040(%rbp), %rax
	leaq	.LC0(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	sprintf@PLT
	leaq	-101040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	fMain, .-fMain
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, %edi
	call	fMain
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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:
