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

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

// 内部定数
#define D_CHAR_MAX		1000005									// 最大文字数

// 内部変数
static FILE *szpFpI;											// 入力
static char sc1Str[D_CHAR_MAX];									// 文字列
static int siCCnt;												// 文字数
static int si2Cnt[D_CHAR_MAX][2];								// 枚数

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

// １行出力
int
fOutLine(
	char *pcpLine				// <I> １行
)
{
	char lc1Buf[1024];

#ifdef D_TEST
	lc1Buf[0] = '\0';
	fgets(lc1Buf, sizeof(lc1Buf), szpFpA);
	if (strcmp(lc1Buf, pcpLine)) {
		siRes = -1;
	}
#else
	printf("%s", pcpLine);
#endif

	return 0;
}

// 改行カット
// 戻り値：文字数
int
fCutCrLf(
	char *pcpStr				// <I> 文字列
)
{
	int i;

	for (i = 0; pcpStr[i] != '\0'; i++) {
		if (pcpStr[i] == '\n') {
			pcpStr[i] = '\0';
			break;
		}
	}

	return i;
}

// 最小値 - 取得
int
fGetMin(
	int piVal1					// <I> 値１
	, int piVal2				// <I> 値２
)
{
	if (piVal1 < piVal2) {
		return piVal1;
	}
	else {
		return piVal2;
	}
}

// 実行メイン
int
fMain(
)
{
	int i;

	// 文字列 - 取得
	sc1Str[0] = '0';
	fgets(&sc1Str[1], sizeof(sc1Str) - 1, szpFpI);
	siCCnt = fCutCrLf(sc1Str);

	// 数値化
	for (i = 0; i < siCCnt; i++) {
		sc1Str[i] -= '0';
	}

	// 枚数 - 初期化
	for (i = 0; i < siCCnt; i++) {
		si2Cnt[i][0] = INT_MAX;
		si2Cnt[i][1] = INT_MAX;
	}
	si2Cnt[siCCnt][0] = 0;
	si2Cnt[siCCnt][1] = 1;

	// 枚数 - セット
	for (i = siCCnt - 1; i >= 0; i--) {

		// 釣りなし + 釣りなし
		si2Cnt[i][0] = fGetMin(si2Cnt[i][0], si2Cnt[i + 1][0] + sc1Str[i]);

		// 釣りあり + 釣りなし
		si2Cnt[i][0] = fGetMin(si2Cnt[i][0], si2Cnt[i + 1][1] + sc1Str[i] + 1);

		// 釣りなし + 釣りあり
		si2Cnt[i][1] = fGetMin(si2Cnt[i][1], si2Cnt[i + 1][0] + 10 - sc1Str[i]);

		// 釣りあり + 釣りあり
		si2Cnt[i][1] = fGetMin(si2Cnt[i][1], si2Cnt[i + 1][1] + 10 - sc1Str[i] - 1);
	}

	return si2Cnt[0][0];
}

// １回実行
int
fOne(
)
{
	int liRet;
	char lc1Buf[1024];

	// 入力 - セット
#ifdef D_TEST
	sprintf(lc1Buf, ".\\Test\\T%d.txt", siTNo);
	szpFpI = fopen(lc1Buf, "r");
	sprintf(lc1Buf, ".\\Test\\A%d.txt", siTNo);
	szpFpA = fopen(lc1Buf, "r");
	siRes = 0;
#else
	szpFpI = stdin;
#endif

	// 実行メイン
	liRet = fMain();

	// 出力
	sprintf(lc1Buf, "%d\n", liRet);
	fOutLine(lc1Buf);

	// 残データ有無
#ifdef D_TEST
	lc1Buf[0] = '\0';
	fgets(lc1Buf, sizeof(lc1Buf), szpFpA);
	if (strcmp(lc1Buf, "")) {
		siRes = -1;
	}
#endif

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

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

	return 0;
}

// プログラム開始
int
main()
{

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

	return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.local	szpFpI
	.comm	szpFpI,8,8
	.local	sc1Str
	.comm	sc1Str,1000005,32
	.local	siCCnt
	.comm	siCCnt,4,4
	.local	si2Cnt
	.comm	si2Cnt,8000040,32
	.section	.rodata
.LC0:
	.string	"%s"
	.text
	.globl	fOutLine
	.type	fOutLine, @function
fOutLine:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1056, %rsp
	movq	%rdi, -1048(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	-1048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	fOutLine, .-fOutLine
	.globl	fCutCrLf
	.type	fCutCrLf, @function
fCutCrLf:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L5
.L8:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$10, %al
	jne	.L6
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movb	$0, (%rax)
	jmp	.L7
.L6:
	addl	$1, -4(%rbp)
.L5:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L8
.L7:
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	fCutCrLf, .-fCutCrLf
	.globl	fGetMin
	.type	fGetMin, @function
fGetMin:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L11
	movl	-4(%rbp), %eax
	jmp	.L12
.L11:
	movl	-8(%rbp), %eax
.L12:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	fGetMin, .-fGetMin
	.globl	fMain
	.type	fMain, @function
fMain:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movb	$48, sc1Str(%rip)
	movq	szpFpI(%rip), %rax
	movq	%rax, %rdx
	movl	$1000004, %esi
	leaq	1+sc1Str(%rip), %rax
	movq	%rax, %rdi
	call	fgets@PLT
	leaq	sc1Str(%rip), %rax
	movq	%rax, %rdi
	call	fCutCrLf
	movl	%eax, siCCnt(%rip)
	movl	$0, -4(%rbp)
	jmp	.L14
.L15:
	movl	-4(%rbp), %eax
	cltq
	leaq	sc1Str(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	subl	$48, %eax
	movl	%eax, %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	sc1Str(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	addl	$1, -4(%rbp)
.L14:
	movl	siCCnt(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L15
	movl	$0, -4(%rbp)
	jmp	.L16
.L17:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	si2Cnt(%rip), %rax
	movl	$2147483647, (%rdx,%rax)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+si2Cnt(%rip), %rax
	movl	$2147483647, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L16:
	movl	siCCnt(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L17
	movl	siCCnt(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	si2Cnt(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	siCCnt(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+si2Cnt(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	siCCnt(%rip), %eax
	subl	$1, %eax
	movl	%eax, -4(%rbp)
	jmp	.L18
.L19:
	movl	-4(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	si2Cnt(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	sc1Str(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	leal	(%rcx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	si2Cnt(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetMin
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	si2Cnt(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+si2Cnt(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	sc1Str(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	addl	%ecx, %eax
	leal	1(%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	si2Cnt(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetMin
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	si2Cnt(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	si2Cnt(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	10(%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	sc1Str(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+si2Cnt(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetMin
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	4+si2Cnt(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+si2Cnt(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	10(%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	sc1Str(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	leal	-1(%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+si2Cnt(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetMin
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	4+si2Cnt(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	subl	$1, -4(%rbp)
.L18:
	cmpl	$0, -4(%rbp)
	jns	.L19
	movl	si2Cnt(%rip), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	fMain, .-fMain
	.section	.rodata
.LC1:
	.string	"%d\n"
	.text
	.globl	fOne
	.type	fOne, @function
fOne:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1056, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	stdin(%rip), %rax
	movq	%rax, szpFpI(%rip)
	movl	$0, %eax
	call	fMain
	movl	%eax, -1044(%rbp)
	movl	-1044(%rbp), %edx
	leaq	-1040(%rbp), %rax
	leaq	.LC1(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	sprintf@PLT
	leaq	-1040(%rbp), %rax
	movq	%rax, %rdi
	call	fOutLine
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	fOne, .-fOne
	.globl	main
	.type	main, @function
main:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, %eax
	call	fOne
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.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	"%s"
	.text
	.p2align 4
	.globl	fOutLine
	.type	fOutLine, @function
fOutLine:
.LFB51:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	movq	%rdi, %rdx
	leaq	.LC0(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE51:
	.size	fOutLine, .-fOutLine
	.p2align 4
	.globl	fCutCrLf
	.type	fCutCrLf, @function
fCutCrLf:
.LFB52:
	.cfi_startproc
	endbr64
	movzbl	(%rdi), %eax
	xorl	%r8d, %r8d
	testb	%al, %al
	jne	.L7
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	movzbl	1(%rdi), %eax
	addq	$1, %rdi
	addl	$1, %r8d
	testb	%al, %al
	je	.L4
.L7:
	cmpb	$10, %al
	jne	.L6
	movb	$0, (%rdi)
.L4:
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE52:
	.size	fCutCrLf, .-fCutCrLf
	.p2align 4
	.globl	fGetMin
	.type	fGetMin, @function
fGetMin:
.LFB53:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovle	%edi, %eax
	ret
	.cfi_endproc
.LFE53:
	.size	fGetMin, .-fGetMin
	.p2align 4
	.globl	fMain
	.type	fMain, @function
fMain:
.LFB54:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	$1000004, %esi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	leaq	sc1Str(%rip), %rbx
	leaq	1(%rbx), %rdi
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	movq	szpFpI(%rip), %rdx
	movb	$48, sc1Str(%rip)
	call	fgets@PLT
	movzbl	sc1Str(%rip), %edx
	movq	%rbx, %rcx
	xorl	%esi, %esi
	testb	%dl, %dl
	jne	.L12
	jmp	.L41
	.p2align 4,,10
	.p2align 3
.L14:
	movzbl	1(%rcx), %edx
	addq	$1, %rcx
	leal	1(%rsi), %eax
	testb	%dl, %dl
	je	.L15
	movl	%eax, %esi
.L12:
	cmpb	$10, %dl
	jne	.L14
	movb	$0, (%rcx)
	leal	-1(%rsi), %edx
	testl	%esi, %esi
	je	.L41
	movl	%esi, %eax
	movl	%edx, %esi
.L15:
	testl	%eax, %eax
	movl	$1, %ecx
	cmovg	%eax, %ecx
	cmpl	$15, %eax
	jle	.L33
	movl	%ecx, %edi
	leaq	sc1Str(%rip), %rdx
	movdqa	.LC2(%rip), %xmm1
	shrl	$4, %edi
	leaq	16(%rdx), %r8
	subl	$1, %edi
	salq	$4, %rdi
	addq	%r8, %rdi
	.p2align 4,,10
	.p2align 3
.L18:
	movdqa	(%rdx), %xmm0
	addq	$16, %rdx
	paddb	%xmm1, %xmm0
	movaps	%xmm0, -16(%rdx)
	cmpq	%rdi, %rdx
	jne	.L18
	movl	%ecx, %edx
	andl	$-16, %edx
	movl	%edx, %edi
	cmpl	%ecx, %edx
	je	.L19
.L17:
	subl	%edx, %ecx
	leal	-1(%rcx), %r8d
	cmpl	$6, %r8d
	jbe	.L20
	movq	.LC3(%rip), %xmm1
	addq	%rbx, %rdx
	movq	(%rdx), %xmm0
	paddb	%xmm1, %xmm0
	movq	%xmm0, (%rdx)
	movl	%ecx, %edx
	andl	$-8, %edx
	addl	%edx, %edi
	cmpl	%edx, %ecx
	je	.L21
.L20:
	movslq	%edi, %rdx
	subb	$48, (%rbx,%rdx)
	leal	1(%rdi), %edx
	cmpl	%edx, %eax
	jle	.L21
	movslq	%edx, %rdx
	subb	$48, (%rbx,%rdx)
	leal	2(%rdi), %edx
	cmpl	%edx, %eax
	jle	.L19
	movslq	%edx, %rdx
	subb	$48, (%rbx,%rdx)
	leal	3(%rdi), %edx
	cmpl	%edx, %eax
	jle	.L19
	movslq	%edx, %rdx
	subb	$48, (%rbx,%rdx)
	leal	4(%rdi), %edx
	cmpl	%edx, %eax
	jle	.L19
	movslq	%edx, %rdx
	subb	$48, (%rbx,%rdx)
	leal	5(%rdi), %edx
	cmpl	%edx, %eax
	jle	.L19
	movslq	%edx, %rdx
	subb	$48, (%rbx,%rdx)
	leal	6(%rdi), %edx
	cmpl	%edx, %eax
	jle	.L19
	movslq	%edx, %rdx
	subb	$48, (%rbx,%rdx)
.L19:
	movl	%eax, %ecx
	leaq	si2Cnt(%rip), %r8
	movdqa	.LC4(%rip), %xmm0
	shrl	%ecx
	leaq	16(%r8), %rdi
	movq	%r8, %rdx
	subl	$1, %ecx
	salq	$4, %rcx
	addq	%rdi, %rcx
	.p2align 4,,10
	.p2align 3
.L23:
	movaps	%xmm0, (%rdx)
	addq	$16, %rdx
	cmpq	%rcx, %rdx
	jne	.L23
	movl	%eax, %edx
	andl	$-2, %edx
	testb	$1, %al
	je	.L24
.L29:
	movq	.LC5(%rip), %rcx
	movslq	%edx, %rdx
	movq	%rcx, (%r8,%rdx,8)
.L24:
	movq	.LC1(%rip), %rdx
	cltq
	movq	%rdx, (%r8,%rax,8)
	movslq	%esi, %rdx
	leaq	0(,%rdx,8), %rax
	leaq	12(%r8,%rax), %rcx
	leaq	8(%r8,%rax), %rdi
	cmpl	$1, %esi
	jle	.L28
	movl	(%rdi), %r11d
	leal	-2(%rsi), %r10d
	movl	(%rcx), %ecx
	leaq	(%rbx,%rdx), %r9
	leaq	(%r8,%rax), %rdi
	andl	$1, %esi
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L44:
	subl	$2, %r10d
.L25:
	movsbl	(%r9), %ebp
	movl	(%rdi), %edx
	leal	0(%rbp,%r11), %eax
	cmpl	%edx, %eax
	cmovg	%edx, %eax
	leal	1(%rbp,%rcx), %edx
	cmpl	%edx, %eax
	cmovg	%edx, %eax
	leal	10(%r11), %edx
	movl	4(%rdi), %r11d
	subl	%ebp, %edx
	cmpl	%r11d, %edx
	movl	%eax, (%rdi)
	cmovg	%r11d, %edx
	subl	%ebp, %ecx
	movsbl	-1(%r9), %ebp
	addl	$9, %ecx
	cmpl	%ecx, %edx
	leal	(%rax,%rbp), %r11d
	cmovg	%ecx, %edx
	movl	-8(%rdi), %ecx
	cmpl	%ecx, %r11d
	movl	%edx, 4(%rdi)
	cmovg	%ecx, %r11d
	leal	1(%rdx,%rbp), %ecx
	cmpl	%ecx, %r11d
	cmovg	%ecx, %r11d
	movl	-4(%rdi), %ecx
	addl	$10, %eax
	subl	%ebp, %eax
	cmpl	%ecx, %eax
	movl	%r11d, -8(%rdi)
	cmovle	%eax, %ecx
	subl	%ebp, %edx
	leal	9(%rdx), %eax
	cmpl	%eax, %ecx
	cmovg	%eax, %ecx
	subq	$2, %r9
	subq	$16, %rdi
	movl	%ecx, 12(%rdi)
	cmpl	%esi, %r10d
	jne	.L44
.L28:
	movslq	%esi, %rax
	movl	%esi, %esi
	leaq	-8+si2Cnt(%rip), %rcx
	leaq	(%r8,%rax,8), %rdx
	leaq	(%rbx,%rax), %r8
	subq	%rsi, %rax
	leaq	(%rcx,%rax,8), %r9
	.p2align 4,,10
	.p2align 3
.L26:
	movsbl	(%r8), %edi
	movl	8(%rdx), %eax
	movl	(%rdx), %r10d
	movl	12(%rdx), %esi
	leal	(%rdi,%rax), %ecx
	cmpl	%r10d, %ecx
	cmovg	%r10d, %ecx
	leal	1(%rsi,%rdi), %r10d
	cmpl	%r10d, %ecx
	cmovg	%r10d, %ecx
	addl	$10, %eax
	subl	%edi, %eax
	movl	%ecx, (%rdx)
	movl	4(%rdx), %ecx
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
	subl	%edi, %esi
	leal	9(%rsi), %ecx
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
	subq	$8, %rdx
	subq	$1, %r8
	movl	%eax, 12(%rdx)
	cmpq	%rdx, %r9
	jne	.L26
	movl	si2Cnt(%rip), %eax
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_restore_state
	xorl	%edx, %edx
	leaq	si2Cnt(%rip), %r8
	cmpl	$1, %eax
	je	.L29
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L41:
	movq	.LC1(%rip), %rax
	movq	%rax, si2Cnt(%rip)
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L33:
	.cfi_restore_state
	xorl	%edx, %edx
	xorl	%edi, %edi
	jmp	.L17
	.cfi_endproc
.LFE54:
	.size	fMain, .-fMain
	.section	.rodata.str1.1
.LC6:
	.string	"%d\n"
	.text
	.p2align 4
	.globl	fOne
	.type	fOne, @function
fOne:
.LFB55:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	subq	$1040, %rsp
	.cfi_def_cfa_offset 1056
	movq	%fs:40, %rax
	movq	%rax, 1032(%rsp)
	movq	stdin(%rip), %rax
	movq	%rsp, %r12
	movq	%rax, szpFpI(%rip)
	xorl	%eax, %eax
	call	fMain
	movl	$1024, %edx
	movq	%r12, %rdi
	movl	$1, %esi
	movl	%eax, %r8d
	leaq	.LC6(%rip), %rcx
	xorl	%eax, %eax
	call	__sprintf_chk@PLT
	xorl	%eax, %eax
	movq	%r12, %rdx
	movl	$1, %edi
	leaq	.LC0(%rip), %rsi
	call	__printf_chk@PLT
	movq	1032(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L48
	addq	$1040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L48:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE55:
	.size	fOne, .-fOne
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB56:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	call	fOne
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE56:
	.size	main, .-main
	.local	si2Cnt
	.comm	si2Cnt,8000040,32
	.local	sc1Str
	.comm	sc1Str,1000005,32
	.local	szpFpI
	.comm	szpFpI,8,8
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.set	.LC3,.LC2
	.align 16
.LC4:
	.long	2147483647
	.long	2147483647
	.long	2147483647
	.long	2147483647
	.set	.LC5,.LC4
	.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	"%s"
	.text
	.p2align 4
	.globl	fOutLine
	.type	fOutLine, @function
fOutLine:
.LFB51:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	movq	%rdi, %rdx
	leaq	.LC0(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE51:
	.size	fOutLine, .-fOutLine
	.p2align 4
	.globl	fCutCrLf
	.type	fCutCrLf, @function
fCutCrLf:
.LFB52:
	.cfi_startproc
	endbr64
	movzbl	(%rdi), %eax
	xorl	%r8d, %r8d
	testb	%al, %al
	jne	.L7
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	movzbl	1(%rdi), %eax
	addq	$1, %rdi
	addl	$1, %r8d
	testb	%al, %al
	je	.L4
.L7:
	cmpb	$10, %al
	jne	.L6
	movb	$0, (%rdi)
.L4:
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE52:
	.size	fCutCrLf, .-fCutCrLf
	.p2align 4
	.globl	fGetMin
	.type	fGetMin, @function
fGetMin:
.LFB53:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovle	%edi, %eax
	ret
	.cfi_endproc
.LFE53:
	.size	fGetMin, .-fGetMin
	.p2align 4
	.globl	fMain
	.type	fMain, @function
fMain:
.LFB54:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	$1000004, %esi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	leaq	sc1Str(%rip), %rbx
	leaq	1(%rbx), %rdi
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	movq	szpFpI(%rip), %rdx
	movb	$48, sc1Str(%rip)
	call	fgets@PLT
	movzbl	sc1Str(%rip), %edx
	movq	%rbx, %rcx
	xorl	%esi, %esi
	testb	%dl, %dl
	jne	.L12
	jmp	.L41
	.p2align 4,,10
	.p2align 3
.L14:
	movzbl	1(%rcx), %edx
	addq	$1, %rcx
	leal	1(%rsi), %eax
	testb	%dl, %dl
	je	.L15
	movl	%eax, %esi
.L12:
	cmpb	$10, %dl
	jne	.L14
	movb	$0, (%rcx)
	leal	-1(%rsi), %edx
	testl	%esi, %esi
	je	.L41
	movl	%esi, %eax
	movl	%edx, %esi
.L15:
	testl	%eax, %eax
	movl	$1, %ecx
	cmovg	%eax, %ecx
	cmpl	$15, %eax
	jle	.L33
	movl	%ecx, %edi
	leaq	sc1Str(%rip), %rdx
	movdqa	.LC2(%rip), %xmm1
	shrl	$4, %edi
	leaq	16(%rdx), %r8
	subl	$1, %edi
	salq	$4, %rdi
	addq	%r8, %rdi
	.p2align 4,,10
	.p2align 3
.L18:
	movdqa	(%rdx), %xmm0
	addq	$16, %rdx
	paddb	%xmm1, %xmm0
	movaps	%xmm0, -16(%rdx)
	cmpq	%rdi, %rdx
	jne	.L18
	movl	%ecx, %edx
	andl	$-16, %edx
	movl	%edx, %edi
	cmpl	%ecx, %edx
	je	.L19
.L17:
	subl	%edx, %ecx
	leal	-1(%rcx), %r8d
	cmpl	$6, %r8d
	jbe	.L20
	movq	.LC3(%rip), %xmm1
	addq	%rbx, %rdx
	movq	(%rdx), %xmm0
	paddb	%xmm1, %xmm0
	movq	%xmm0, (%rdx)
	movl	%ecx, %edx
	andl	$-8, %edx
	addl	%edx, %edi
	cmpl	%edx, %ecx
	je	.L21
.L20:
	movslq	%edi, %rdx
	subb	$48, (%rbx,%rdx)
	leal	1(%rdi), %edx
	cmpl	%edx, %eax
	jle	.L21
	movslq	%edx, %rdx
	subb	$48, (%rbx,%rdx)
	leal	2(%rdi), %edx
	cmpl	%edx, %eax
	jle	.L19
	movslq	%edx, %rdx
	subb	$48, (%rbx,%rdx)
	leal	3(%rdi), %edx
	cmpl	%edx, %eax
	jle	.L19
	movslq	%edx, %rdx
	subb	$48, (%rbx,%rdx)
	leal	4(%rdi), %edx
	cmpl	%edx, %eax
	jle	.L19
	movslq	%edx, %rdx
	subb	$48, (%rbx,%rdx)
	leal	5(%rdi), %edx
	cmpl	%edx, %eax
	jle	.L19
	movslq	%edx, %rdx
	subb	$48, (%rbx,%rdx)
	leal	6(%rdi), %edx
	cmpl	%edx, %eax
	jle	.L19
	movslq	%edx, %rdx
	subb	$48, (%rbx,%rdx)
.L19:
	movl	%eax, %ecx
	leaq	si2Cnt(%rip), %r8
	movdqa	.LC4(%rip), %xmm0
	shrl	%ecx
	leaq	16(%r8), %rdi
	movq	%r8, %rdx
	subl	$1, %ecx
	salq	$4, %rcx
	addq	%rdi, %rcx
	.p2align 4,,10
	.p2align 3
.L23:
	movaps	%xmm0, (%rdx)
	addq	$16, %rdx
	cmpq	%rcx, %rdx
	jne	.L23
	movl	%eax, %edx
	andl	$-2, %edx
	testb	$1, %al
	je	.L24
.L29:
	movq	.LC5(%rip), %rcx
	movslq	%edx, %rdx
	movq	%rcx, (%r8,%rdx,8)
.L24:
	movq	.LC1(%rip), %rdx
	cltq
	movq	%rdx, (%r8,%rax,8)
	movslq	%esi, %rdx
	leaq	0(,%rdx,8), %rax
	leaq	12(%r8,%rax), %rcx
	leaq	8(%r8,%rax), %rdi
	cmpl	$1, %esi
	jle	.L28
	movl	(%rdi), %r11d
	leal	-2(%rsi), %r10d
	movl	(%rcx), %ecx
	leaq	(%rbx,%rdx), %r9
	leaq	(%r8,%rax), %rdi
	andl	$1, %esi
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L44:
	subl	$2, %r10d
.L25:
	movsbl	(%r9), %ebp
	movl	(%rdi), %edx
	leal	0(%rbp,%r11), %eax
	cmpl	%edx, %eax
	cmovg	%edx, %eax
	leal	1(%rbp,%rcx), %edx
	cmpl	%edx, %eax
	cmovg	%edx, %eax
	leal	10(%r11), %edx
	movl	4(%rdi), %r11d
	subl	%ebp, %edx
	cmpl	%r11d, %edx
	movl	%eax, (%rdi)
	cmovg	%r11d, %edx
	subl	%ebp, %ecx
	movsbl	-1(%r9), %ebp
	addl	$9, %ecx
	cmpl	%ecx, %edx
	leal	(%rax,%rbp), %r11d
	cmovg	%ecx, %edx
	movl	-8(%rdi), %ecx
	cmpl	%ecx, %r11d
	movl	%edx, 4(%rdi)
	cmovg	%ecx, %r11d
	leal	1(%rdx,%rbp), %ecx
	cmpl	%ecx, %r11d
	cmovg	%ecx, %r11d
	movl	-4(%rdi), %ecx
	addl	$10, %eax
	subl	%ebp, %eax
	cmpl	%ecx, %eax
	movl	%r11d, -8(%rdi)
	cmovle	%eax, %ecx
	subl	%ebp, %edx
	leal	9(%rdx), %eax
	cmpl	%eax, %ecx
	cmovg	%eax, %ecx
	subq	$2, %r9
	subq	$16, %rdi
	movl	%ecx, 12(%rdi)
	cmpl	%esi, %r10d
	jne	.L44
.L28:
	movslq	%esi, %rax
	movl	%esi, %esi
	leaq	-8+si2Cnt(%rip), %rcx
	leaq	(%r8,%rax,8), %rdx
	leaq	(%rbx,%rax), %r8
	subq	%rsi, %rax
	leaq	(%rcx,%rax,8), %r9
	.p2align 4,,10
	.p2align 3
.L26:
	movsbl	(%r8), %edi
	movl	8(%rdx), %eax
	movl	(%rdx), %r10d
	movl	12(%rdx), %esi
	leal	(%rdi,%rax), %ecx
	cmpl	%r10d, %ecx
	cmovg	%r10d, %ecx
	leal	1(%rsi,%rdi), %r10d
	cmpl	%r10d, %ecx
	cmovg	%r10d, %ecx
	addl	$10, %eax
	subl	%edi, %eax
	movl	%ecx, (%rdx)
	movl	4(%rdx), %ecx
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
	subl	%edi, %esi
	leal	9(%rsi), %ecx
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
	subq	$8, %rdx
	subq	$1, %r8
	movl	%eax, 12(%rdx)
	cmpq	%rdx, %r9
	jne	.L26
	movl	si2Cnt(%rip), %eax
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_restore_state
	xorl	%edx, %edx
	leaq	si2Cnt(%rip), %r8
	cmpl	$1, %eax
	je	.L29
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L41:
	movq	.LC1(%rip), %rax
	movq	%rax, si2Cnt(%rip)
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L33:
	.cfi_restore_state
	xorl	%edx, %edx
	xorl	%edi, %edi
	jmp	.L17
	.cfi_endproc
.LFE54:
	.size	fMain, .-fMain
	.section	.rodata.str1.1
.LC6:
	.string	"%d\n"
	.text
	.p2align 4
	.globl	fOne
	.type	fOne, @function
fOne:
.LFB55:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	subq	$1040, %rsp
	.cfi_def_cfa_offset 1056
	movq	%fs:40, %rax
	movq	%rax, 1032(%rsp)
	movq	stdin(%rip), %rax
	movq	%rsp, %r12
	movq	%rax, szpFpI(%rip)
	xorl	%eax, %eax
	call	fMain
	movl	$1024, %edx
	movq	%r12, %rdi
	movl	$1, %esi
	movl	%eax, %r8d
	leaq	.LC6(%rip), %rcx
	xorl	%eax, %eax
	call	__sprintf_chk@PLT
	xorl	%eax, %eax
	movq	%r12, %rdx
	movl	$1, %edi
	leaq	.LC0(%rip), %rsi
	call	__printf_chk@PLT
	movq	1032(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L48
	addq	$1040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L48:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE55:
	.size	fOne, .-fOne
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB56:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	call	fOne
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE56:
	.size	main, .-main
	.local	si2Cnt
	.comm	si2Cnt,8000040,32
	.local	sc1Str
	.comm	sc1Str,1000005,32
	.local	szpFpI
	.comm	szpFpI,8,8
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.byte	-48
	.set	.LC3,.LC2
	.align 16
.LC4:
	.long	2147483647
	.long	2147483647
	.long	2147483647
	.long	2147483647
	.set	.LC5,.LC4
	.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 <float.h>
#include <limits.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

// 内部定数
#define D_CHAR_MAX		1000005									// 最大文字数

// 内部変数
static FILE *szpFpI;											// 入力
static char sc1Str[D_CHAR_MAX];									// 文字列
static int siCCnt;												// 文字数
static int si2Cnt[D_CHAR_MAX][2];								// 枚数

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

// １行出力
int
fOutLine(
	char *pcpLine				// <I> １行
)
{
	char lc1Buf[1024];

#ifdef D_TEST
	lc1Buf[0] = '\0';
	fgets(lc1Buf, sizeof(lc1Buf), szpFpA);
	if (strcmp(lc1Buf, pcpLine)) {
		siRes = -1;
	}
#else
	printf("%s", pcpLine);
#endif

	return 0;
}

// 改行カット
// 戻り値：文字数
int
fCutCrLf(
	char *pcpStr				// <I> 文字列
)
{
	int i;

	for (i = 0; pcpStr[i] != '\0'; i++) {
		if (pcpStr[i] == '\n') {
			pcpStr[i] = '\0';
			break;
		}
	}

	return i;
}

// 最小値 - 取得
int
fGetMin(
	int piVal1					// <I> 値１
	, int piVal2				// <I> 値２
)
{
	if (piVal1 < piVal2) {
		return piVal1;
	}
	else {
		return piVal2;
	}
}

// 実行メイン
int
fMain(
)
{
	int i;

	// 文字列 - 取得
	sc1Str[0] = '0';
	fgets(&sc1Str[1], sizeof(sc1Str) - 1, szpFpI);
	siCCnt = fCutCrLf(sc1Str);

	// 数値化
	for (i = 0; i < siCCnt; i++) {
		sc1Str[i] -= '0';
	}

	// 枚数 - 初期化
	for (i = 0; i < siCCnt; i++) {
		si2Cnt[i][0] = INT_MAX;
		si2Cnt[i][1] = INT_MAX;
	}
	si2Cnt[siCCnt][0] = 0;
	si2Cnt[siCCnt][1] = 1;

	// 枚数 - セット
	for (i = siCCnt - 1; i >= 0; i--) {

		// 釣りなし + 釣りなし
		si2Cnt[i][0] = fGetMin(si2Cnt[i][0], si2Cnt[i + 1][0] + sc1Str[i]);

		// 釣りあり + 釣りなし
		si2Cnt[i][0] = fGetMin(si2Cnt[i][0], si2Cnt[i + 1][1] + sc1Str[i] + 1);

		// 釣りなし + 釣りあり
		si2Cnt[i][1] = fGetMin(si2Cnt[i][1], si2Cnt[i + 1][0] + 10 - sc1Str[i]);

		// 釣りあり + 釣りあり
		si2Cnt[i][1] = fGetMin(si2Cnt[i][1], si2Cnt[i + 1][1] + 10 - sc1Str[i] - 1);
	}

	return si2Cnt[0][0];
}

// １回実行
int
fOne(
)
{
	int liRet;
	char lc1Buf[1024];

	// 入力 - セット
#ifdef D_TEST
	sprintf(lc1Buf, ".\\Test\\T%d.txt", siTNo);
	szpFpI = fopen(lc1Buf, "r");
	sprintf(lc1Buf, ".\\Test\\A%d.txt", siTNo);
	szpFpA = fopen(lc1Buf, "r");
	siRes = 0;
#else
	szpFpI = stdin;
#endif

	// 実行メイン
	liRet = fMain();

	// 出力
	sprintf(lc1Buf, "%d\n", liRet);
	fOutLine(lc1Buf);

	// 残データ有無
#ifdef D_TEST
	lc1Buf[0] = '\0';
	fgets(lc1Buf, sizeof(lc1Buf), szpFpA);
	if (strcmp(lc1Buf, "")) {
		siRes = -1;
	}
#endif

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

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

	return 0;
}

// プログラム開始
int
main()
{

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

	return 0;
}


30
 476640020082194381531155118436783393866726953614433851622190777875571135215042541028243752681838573
 22
 41
 402419059500366785869358882282163159674165660152915334404536663378232442791064106232595577577780162
 85935701773254562628410719372396848335402648590418634844101760809881540580187751784321748296967820
 112971229910948442277742063793860536302679259212406616014111988669828741066875057785985507004364571
 9
 112951179209792539124037565379106363289174458264689808441706471502486080445534951144969723896577005
 30635919304419657545615271990396525521219360923496828845301606010256650094809182113049943540395907

3
 259
 4
 5
 252
 243
 225
 2
 246
 235

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

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

// 内部定数
#define D_CHAR_MAX		1000005									// 最大文字数

// 内部変数
static FILE *szpFpI;											// 入力
static char sc1Str[D_CHAR_MAX];									// 文字列
static int siCCnt;												// 文字数
static int si2Cnt[D_CHAR_MAX][2];								// 枚数

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

// １行出力
int
fOutLine(
	char *pcpLine				// <I> １行
)
{
	char lc1Buf[1024];

#ifdef D_TEST
	lc1Buf[0] = '\0';
	fgets(lc1Buf, sizeof(lc1Buf), szpFpA);
	if (strcmp(lc1Buf, pcpLine)) {
		siRes = -1;
	}
#else
	printf("%s", pcpLine);
#endif

	return 0;
}

// 改行カット
// 戻り値：文字数
int
fCutCrLf(
	char *pcpStr				// <I> 文字列
)
{
	int i;

	for (i = 0; pcpStr[i] != '\0'; i++) {
		if (pcpStr[i] == '\n') {
			pcpStr[i] = '\0';
			break;
		}
	}

	return i;
}

// 最小値 - 取得
int
fGetMin(
	int piVal1					// <I> 値１
	, int piVal2				// <I> 値２
)
{
	if (piVal1 < piVal2) {
		return piVal1;
	}
	else {
		return piVal2;
	}
}

// 実行メイン
int
fMain(
)
{
	int i;

	// 文字列 - 取得
	sc1Str[0] = '0';
	fgets(&sc1Str[1], sizeof(sc1Str) - 1, szpFpI);
	siCCnt = fCutCrLf(sc1Str);

	// 数値化
	for (i = 0; i < siCCnt; i++) {
		sc1Str[i] -= '0';
	}

	// 枚数 - 初期化
	for (i = 0; i < siCCnt; i++) {
		si2Cnt[i][0] = INT_MAX;
		si2Cnt[i][1] = INT_MAX;
	}
	si2Cnt[siCCnt][0] = 0;
	si2Cnt[siCCnt][1] = 1;

	// 枚数 - セット
	for (i = siCCnt - 1; i >= 0; i--) {

		// 釣りなし + 釣りなし
		si2Cnt[i][0] = fGetMin(si2Cnt[i][0], si2Cnt[i + 1][0] + sc1Str[i]);

		// 釣りあり + 釣りなし
		si2Cnt[i][0] = fGetMin(si2Cnt[i][0], si2Cnt[i + 1][1] + sc1Str[i] + 1);

		// 釣りなし + 釣りあり
		si2Cnt[i][1] = fGetMin(si2Cnt[i][1], si2Cnt[i + 1][0] + 10 - sc1Str[i]);

		// 釣りあり + 釣りあり
		si2Cnt[i][1] = fGetMin(si2Cnt[i][1], si2Cnt[i + 1][1] + 10 - sc1Str[i] - 1);
	}

	return si2Cnt[0][0];
}

// １回実行
int
fOne(
)
{
	int liRet;
	char lc1Buf[1024];

	// 入力 - セット
#ifdef D_TEST
	sprintf(lc1Buf, ".\\Test\\T%d.txt", siTNo);
	szpFpI = fopen(lc1Buf, "r");
	sprintf(lc1Buf, ".\\Test\\A%d.txt", siTNo);
	szpFpA = fopen(lc1Buf, "r");
	siRes = 0;
#else
	szpFpI = stdin;
#endif

	// 実行メイン
	liRet = fMain();

	// 出力
	sprintf(lc1Buf, "%d\n", liRet);
	fOutLine(lc1Buf);

	// 残データ有無
#ifdef D_TEST
	lc1Buf[0] = '\0';
	fgets(lc1Buf, sizeof(lc1Buf), szpFpA);
	if (strcmp(lc1Buf, "")) {
		siRes = -1;
	}
#endif

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

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

	return 0;
}

// プログラム開始
int
main()
{

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

	return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.local	szpFpI
	.comm	szpFpI,8,8
	.local	sc1Str
	.comm	sc1Str,1000005,32
	.local	siCCnt
	.comm	siCCnt,4,4
	.local	si2Cnt
	.comm	si2Cnt,8000040,32
	.section	.rodata
.LC0:
	.string	"%s"
	.text
	.globl	fOutLine
	.type	fOutLine, @function
fOutLine:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1056, %rsp
	movq	%rdi, -1048(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	-1048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	fOutLine, .-fOutLine
	.globl	fCutCrLf
	.type	fCutCrLf, @function
fCutCrLf:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L5
.L8:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$10, %al
	jne	.L6
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movb	$0, (%rax)
	jmp	.L7
.L6:
	addl	$1, -4(%rbp)
.L5:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L8
.L7:
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	fCutCrLf, .-fCutCrLf
	.globl	fGetMin
	.type	fGetMin, @function
fGetMin:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L11
	movl	-4(%rbp), %eax
	jmp	.L12
.L11:
	movl	-8(%rbp), %eax
.L12:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	fGetMin, .-fGetMin
	.globl	fMain
	.type	fMain, @function
fMain:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movb	$48, sc1Str(%rip)
	movq	szpFpI(%rip), %rax
	movq	%rax, %rdx
	movl	$1000004, %esi
	leaq	1+sc1Str(%rip), %rax
	movq	%rax, %rdi
	call	fgets@PLT
	leaq	sc1Str(%rip), %rax
	movq	%rax, %rdi
	call	fCutCrLf
	movl	%eax, siCCnt(%rip)
	movl	$0, -4(%rbp)
	jmp	.L14
.L15:
	movl	-4(%rbp), %eax
	cltq
	leaq	sc1Str(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	subl	$48, %eax
	movl	%eax, %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	sc1Str(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	addl	$1, -4(%rbp)
.L14:
	movl	siCCnt(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L15
	movl	$0, -4(%rbp)
	jmp	.L16
.L17:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	si2Cnt(%rip), %rax
	movl	$2147483647, (%rdx,%rax)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+si2Cnt(%rip), %rax
	movl	$2147483647, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L16:
	movl	siCCnt(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L17
	movl	siCCnt(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	si2Cnt(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	siCCnt(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+si2Cnt(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	siCCnt(%rip), %eax
	subl	$1, %eax
	movl	%eax, -4(%rbp)
	jmp	.L18
.L19:
	movl	-4(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	si2Cnt(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	sc1Str(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	leal	(%rcx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	si2Cnt(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetMin
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	si2Cnt(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+si2Cnt(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	sc1Str(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	addl	%ecx, %eax
	leal	1(%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	si2Cnt(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetMin
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	si2Cnt(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	si2Cnt(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	10(%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	sc1Str(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+si2Cnt(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetMin
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	4+si2Cnt(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+si2Cnt(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	10(%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	sc1Str(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	leal	-1(%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+si2Cnt(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetMin
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	4+si2Cnt(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	subl	$1, -4(%rbp)
.L18:
	cmpl	$0, -4(%rbp)
	jns	.L19
	movl	si2Cnt(%rip), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	fMain, .-fMain
	.section	.rodata
.LC1:
	.string	"%d\n"
	.text
	.globl	fOne
	.type	fOne, @function
fOne:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1056, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	stdin(%rip), %rax
	movq	%rax, szpFpI(%rip)
	movl	$0, %eax
	call	fMain
	movl	%eax, -1044(%rbp)
	movl	-1044(%rbp), %edx
	leaq	-1040(%rbp), %rax
	leaq	.LC1(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	sprintf@PLT
	leaq	-1040(%rbp), %rax
	movq	%rax, %rdi
	call	fOutLine
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	fOne, .-fOne
	.globl	main
	.type	main, @function
main:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, %eax
	call	fOne
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.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
	.local	szpFpI
	.comm	szpFpI,8,8
	.local	sc1Str
	.comm	sc1Str,1000005,32
	.local	siCCnt
	.comm	siCCnt,4,4
	.local	si2Cnt
	.comm	si2Cnt,8000040,32
	.section	.rodata
.LC0:
	.string	"%s"
	.text
	.globl	fOutLine
	.type	fOutLine, @function
fOutLine:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1056, %rsp
	movq	%rdi, -1048(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	-1048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	fOutLine, .-fOutLine
	.globl	fCutCrLf
	.type	fCutCrLf, @function
fCutCrLf:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L5
.L8:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$10, %al
	jne	.L6
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movb	$0, (%rax)
	jmp	.L7
.L6:
	addl	$1, -4(%rbp)
.L5:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L8
.L7:
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	fCutCrLf, .-fCutCrLf
	.globl	fGetMin
	.type	fGetMin, @function
fGetMin:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L11
	movl	-4(%rbp), %eax
	jmp	.L12
.L11:
	movl	-8(%rbp), %eax
.L12:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	fGetMin, .-fGetMin
	.globl	fMain
	.type	fMain, @function
fMain:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movb	$48, sc1Str(%rip)
	movq	szpFpI(%rip), %rax
	movq	%rax, %rdx
	movl	$1000004, %esi
	leaq	1+sc1Str(%rip), %rax
	movq	%rax, %rdi
	call	fgets@PLT
	leaq	sc1Str(%rip), %rax
	movq	%rax, %rdi
	call	fCutCrLf
	movl	%eax, siCCnt(%rip)
	movl	$0, -4(%rbp)
	jmp	.L14
.L15:
	movl	-4(%rbp), %eax
	cltq
	leaq	sc1Str(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	subl	$48, %eax
	movl	%eax, %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	sc1Str(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	addl	$1, -4(%rbp)
.L14:
	movl	siCCnt(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L15
	movl	$0, -4(%rbp)
	jmp	.L16
.L17:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	si2Cnt(%rip), %rax
	movl	$2147483647, (%rdx,%rax)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+si2Cnt(%rip), %rax
	movl	$2147483647, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L16:
	movl	siCCnt(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L17
	movl	siCCnt(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	si2Cnt(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	siCCnt(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+si2Cnt(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	siCCnt(%rip), %eax
	subl	$1, %eax
	movl	%eax, -4(%rbp)
	jmp	.L18
.L19:
	movl	-4(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	si2Cnt(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	sc1Str(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	leal	(%rcx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	si2Cnt(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetMin
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	si2Cnt(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+si2Cnt(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	sc1Str(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	addl	%ecx, %eax
	leal	1(%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	si2Cnt(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetMin
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	si2Cnt(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	si2Cnt(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	10(%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	sc1Str(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+si2Cnt(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetMin
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	4+si2Cnt(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+si2Cnt(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	10(%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	sc1Str(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	leal	-1(%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+si2Cnt(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetMin
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	4+si2Cnt(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	subl	$1, -4(%rbp)
.L18:
	cmpl	$0, -4(%rbp)
	jns	.L19
	movl	si2Cnt(%rip), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	fMain, .-fMain
	.section	.rodata
.LC1:
	.string	"%d\n"
	.text
	.globl	fOne
	.type	fOne, @function
fOne:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1056, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	stdin(%rip), %rax
	movq	%rax, szpFpI(%rip)
	movl	$0, %eax
	call	fMain
	movl	%eax, -1044(%rbp)
	movl	-1044(%rbp), %edx
	leaq	-1040(%rbp), %rax
	leaq	.LC1(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	sprintf@PLT
	leaq	-1040(%rbp), %rax
	movq	%rax, %rdi
	call	fOutLine
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	fOne, .-fOne
	.globl	main
	.type	main, @function
main:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, %eax
	call	fOne
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.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:
