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_MOD			1000000007								// 除数(10の9乗+7)

// 内部変数
static FILE *szpFpI;											// 入力

// 内部変数 - テスト用
#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
fGetModSum(
	int piVal1					// <I> 値１
	, int piVal2				// <I> 値２
)
{
	int liSum = piVal1 + piVal2;
	if (liSum >= 0) {
		return liSum % D_MOD;
	}
	else {
		return liSum + D_MOD;
	}
}

// 積 - 取得
int
fGetModMulti(
	int piVal1					// <I> 値１
	, int piVal2				// <I> 値２
)
{
	return (int)((long long)piVal1 * (long long)piVal2 % D_MOD);
}

// べき乗 - 取得
int
fGetModPower(
	int piBase					// <I> 基数
	, int piIdx					// <I> 指数
)
{
	// 基数
	if (piBase == 0) {
		return 0;
	}

	// 平方リスト - 作成
	int li1Val[100];
	li1Val[0] = piBase;
	int liCnt = 1;
	int liIdx = 1;
	while (piIdx > liIdx) {
		li1Val[liCnt] = fGetModMulti(li1Val[liCnt - 1], li1Val[liCnt - 1]);
		liCnt++;
		liIdx += liIdx;
	}

	// べき乗 - 取得
	int liVal = 1;
	while (piIdx > 0) {
		if (piIdx >= liIdx) {
			piIdx -= liIdx;
			liVal = fGetModMulti(liVal, li1Val[liCnt - 1]);
		}
		liCnt--;
		liIdx /= 2;
	}

	return liVal;
}

// 実行メイン
int
fMain(
)
{
	char lc1Buf[1024];

	// 配列数 - 取得
	int liN;
	fgets(lc1Buf, sizeof(lc1Buf), szpFpI);
	sscanf(lc1Buf, "%d", &liN);

	// 全パターン
	int liSum = fGetModPower(10, liN);

	// 0なし(9なし)
	int liCnt = fGetModPower(9, liN);
	liSum = fGetModSum(liSum, -liCnt);
	liSum = fGetModSum(liSum, -liCnt);

	// 0,9なし
	liCnt = fGetModPower(8, liN);
	liSum = fGetModSum(liSum, liCnt);

	return liSum;
}

// １回実行
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
	.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	fGetModSum
	.type	fGetModSum, @function
fGetModSum:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -4(%rbp)
	cmpl	$0, -4(%rbp)
	js	.L5
	movl	-4(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1152921497, %rax, %rax
	shrq	$32, %rax
	sarl	$28, %eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	imull	$1000000007, %eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	jmp	.L6
.L5:
	movl	-4(%rbp), %eax
	addl	$1000000007, %eax
.L6:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	fGetModSum, .-fGetModSum
	.globl	fGetModMulti
	.type	fGetModMulti, @function
fGetModMulti:
.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
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	movq	%rdx, %rcx
	imulq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	fGetModMulti, .-fGetModMulti
	.globl	fGetModPower
	.type	fGetModPower, @function
fGetModPower:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$448, %rsp
	movl	%edi, -436(%rbp)
	movl	%esi, -440(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	cmpl	$0, -436(%rbp)
	jne	.L10
	movl	$0, %eax
	jmp	.L17
.L10:
	movl	-436(%rbp), %eax
	movl	%eax, -416(%rbp)
	movl	$1, -428(%rbp)
	movl	$1, -424(%rbp)
	jmp	.L12
.L13:
	movl	-428(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-428(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModMulti
	movl	-428(%rbp), %edx
	movslq	%edx, %rdx
	movl	%eax, -416(%rbp,%rdx,4)
	addl	$1, -428(%rbp)
	sall	-424(%rbp)
.L12:
	movl	-440(%rbp), %eax
	cmpl	-424(%rbp), %eax
	jg	.L13
	movl	$1, -420(%rbp)
	jmp	.L14
.L16:
	movl	-440(%rbp), %eax
	cmpl	-424(%rbp), %eax
	jl	.L15
	movl	-424(%rbp), %eax
	subl	%eax, -440(%rbp)
	movl	-428(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-420(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModMulti
	movl	%eax, -420(%rbp)
.L15:
	subl	$1, -428(%rbp)
	movl	-424(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -424(%rbp)
.L14:
	cmpl	$0, -440(%rbp)
	jg	.L16
	movl	-420(%rbp), %eax
.L17:
	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
.LFE9:
	.size	fGetModPower, .-fGetModPower
	.section	.rodata
.LC1:
	.string	"%d"
	.text
	.globl	fMain
	.type	fMain, @function
fMain:
.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	szpFpI(%rip), %rdx
	leaq	-1040(%rbp), %rax
	movl	$1024, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	leaq	-1052(%rbp), %rdx
	leaq	-1040(%rbp), %rax
	leaq	.LC1(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	-1052(%rbp), %eax
	movl	%eax, %esi
	movl	$10, %edi
	call	fGetModPower
	movl	%eax, -1048(%rbp)
	movl	-1052(%rbp), %eax
	movl	%eax, %esi
	movl	$9, %edi
	call	fGetModPower
	movl	%eax, -1044(%rbp)
	movl	-1044(%rbp), %eax
	negl	%eax
	movl	%eax, %edx
	movl	-1048(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModSum
	movl	%eax, -1048(%rbp)
	movl	-1044(%rbp), %eax
	negl	%eax
	movl	%eax, %edx
	movl	-1048(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModSum
	movl	%eax, -1048(%rbp)
	movl	-1052(%rbp), %eax
	movl	%eax, %esi
	movl	$8, %edi
	call	fGetModPower
	movl	%eax, -1044(%rbp)
	movl	-1044(%rbp), %edx
	movl	-1048(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModSum
	movl	%eax, -1048(%rbp)
	movl	-1048(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	fMain, .-fMain
	.section	.rodata
.LC2:
	.string	"%d\n"
	.text
	.globl	fOne
	.type	fOne, @function
fOne:
.LFB11:
	.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	.LC2(%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	.L24
	call	__stack_chk_fail@PLT
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	fOne, .-fOne
	.globl	main
	.type	main, @function
main:
.LFB12:
	.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
.LFE12:
	.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
	.p2align 4
	.type	fGetModPower.part.0, @function
fGetModPower.part.0:
.LFB58:
	.cfi_startproc
	subq	$424, %rsp
	.cfi_def_cfa_offset 432
	movl	%esi, %r8d
	movq	%fs:40, %rax
	movq	%rax, 408(%rsp)
	xorl	%eax, %eax
	movl	%edi, (%rsp)
	cmpl	$1, %esi
	jle	.L2
	movl	$2, %r9d
	movl	$1, %esi
	movq	%rsp, %r10
	movabsq	$-8543223828751151131, %r11
	.p2align 4,,10
	.p2align 3
.L3:
	movslq	%edi, %rcx
	addl	%esi, %esi
	imulq	%rcx, %rcx
	movq	%rcx, %rax
	imulq	%r11
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	movslq	%r9d, %rax
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	movl	%ecx, -4(%r10,%r9,4)
	movl	%ecx, %edi
	addq	$1, %r9
	cmpl	%r8d, %esi
	jl	.L3
.L4:
	movabsq	$-8543223828751151131, %r9
	leaq	(%r10,%rax,4), %rdi
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L8:
	cmpl	%esi, %r8d
	jl	.L6
	movslq	-4(%rdi), %rcx
	cltq
	subl	%esi, %r8d
	subq	$4, %rdi
	sarl	%esi
	imulq	%rax, %rcx
	movq	%rcx, %rax
	imulq	%r9
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	movl	%ecx, %eax
	imulq	$1000000007, %rdx, %rdx
	subl	%edx, %eax
	testl	%r8d, %r8d
	jne	.L8
.L1:
	movq	408(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L14
	addq	$424, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	sarl	%esi
	subq	$4, %rdi
	testl	%r8d, %r8d
	jg	.L8
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L2:
	je	.L15
	movl	$1, %eax
	jmp	.L1
.L15:
	movl	$1, %eax
	movl	$1, %esi
	movq	%rsp, %r10
	jmp	.L4
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE58:
	.size	fGetModPower.part.0, .-fGetModPower.part.0
	.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	fGetModSum
	.type	fGetModSum, @function
fGetModSum:
.LFB52:
	.cfi_startproc
	endbr64
	addl	%esi, %edi
	leal	1000000007(%rdi), %eax
	js	.L18
	movslq	%edi, %rax
	movl	%edi, %edx
	imulq	$1152921497, %rax, %rax
	sarl	$31, %edx
	sarq	$60, %rax
	subl	%edx, %eax
	imull	$1000000007, %eax, %edx
	movl	%edi, %eax
	subl	%edx, %eax
.L18:
	ret
	.cfi_endproc
.LFE52:
	.size	fGetModSum, .-fGetModSum
	.p2align 4
	.globl	fGetModMulti
	.type	fGetModMulti, @function
fGetModMulti:
.LFB53:
	.cfi_startproc
	endbr64
	movabsq	$-8543223828751151131, %rdx
	movslq	%esi, %rsi
	movslq	%edi, %rdi
	imulq	%rsi, %rdi
	movq	%rdi, %rax
	imulq	%rdx
	movq	%rdi, %rax
	sarq	$63, %rax
	addq	%rdi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	movl	%edi, %eax
	imulq	$1000000007, %rdx, %rdx
	subl	%edx, %eax
	ret
	.cfi_endproc
.LFE53:
	.size	fGetModMulti, .-fGetModMulti
	.p2align 4
	.globl	fGetModPower
	.type	fGetModPower, @function
fGetModPower:
.LFB54:
	.cfi_startproc
	endbr64
	testl	%edi, %edi
	je	.L23
	jmp	fGetModPower.part.0
	.p2align 4,,10
	.p2align 3
.L23:
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE54:
	.size	fGetModPower, .-fGetModPower
	.section	.rodata.str1.1
.LC1:
	.string	"%d"
	.text
	.p2align 4
	.globl	fMain
	.type	fMain, @function
fMain:
.LFB55:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	$1024, %esi
	subq	$1456, %rsp
	.cfi_def_cfa_offset 1472
	movq	szpFpI(%rip), %rdx
	movq	%fs:40, %rax
	movq	%rax, 1448(%rsp)
	xorl	%eax, %eax
	leaq	416(%rsp), %rbp
	movq	%rbp, %rdi
	call	fgets@PLT
	leaq	12(%rsp), %rdx
	movq	%rbp, %rdi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	call	__isoc99_sscanf@PLT
	movl	12(%rsp), %esi
	movl	$10, 16(%rsp)
	cmpl	$1, %esi
	jle	.L25
	movl	$2, %r9d
	movl	$10, %eax
	movl	$1, %r8d
	movabsq	$-8543223828751151131, %r10
	leaq	16(%rsp), %rdi
	.p2align 4,,10
	.p2align 3
.L26:
	movslq	%eax, %rcx
	addl	%r8d, %r8d
	imulq	%rcx, %rcx
	movq	%rcx, %rax
	imulq	%r10
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	movslq	%r9d, %rdx
	movl	%ecx, -4(%rdi,%r9,4)
	movl	%ecx, %eax
	addq	$1, %r9
	cmpl	%r8d, %esi
	jg	.L26
.L52:
	leaq	(%rdi,%rdx,4), %r9
	movl	%esi, %ecx
	movl	$1, %r10d
	movabsq	$-8543223828751151131, %r11
	.p2align 4,,10
	.p2align 3
.L30:
	cmpl	%ecx, %r8d
	jg	.L27
	movslq	-4(%r9), %rdx
	movslq	%r10d, %rax
	subl	%r8d, %ecx
	subq	$4, %r9
	imulq	%rax, %rdx
	movq	%rdx, %rax
	movq	%rdx, %r10
	imulq	%r11
	movq	%r10, %rax
	sarq	$63, %rax
	addq	%r10, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	movl	%r8d, %eax
	imulq	$1000000007, %rdx, %rdx
	shrl	$31, %eax
	addl	%r8d, %eax
	sarl	%eax
	subl	%edx, %r10d
	movl	%eax, %r8d
	testl	%ecx, %ecx
	jne	.L30
.L29:
	movl	$9, 16(%rsp)
	cmpl	$1, %esi
	jle	.L31
	movl	$2, %r9d
	movl	$9, %eax
	movl	$1, %r8d
	movabsq	$-8543223828751151131, %r11
	.p2align 4,,10
	.p2align 3
.L32:
	imulq	%rax, %rax
	addl	%r8d, %r8d
	movq	%rax, %rcx
	imulq	%r11
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	movslq	%r9d, %rdx
	movl	%ecx, -4(%rdi,%r9,4)
	movslq	%ecx, %rax
	addq	$1, %r9
	cmpl	%r8d, %esi
	jg	.L32
.L33:
	leaq	(%rdi,%rdx,4), %r9
	movl	$1, %eax
	movl	%esi, %edi
	movabsq	$-8543223828751151131, %r11
	.p2align 4,,10
	.p2align 3
.L37:
	cmpl	%edi, %r8d
	jg	.L35
	movslq	-4(%r9), %rcx
	cltq
	subl	%r8d, %edi
	subq	$4, %r9
	imulq	%rax, %rcx
	movq	%rcx, %rax
	imulq	%r11
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	movl	%ecx, %eax
	imulq	$1000000007, %rdx, %rdx
	subl	%edx, %eax
	movl	%r8d, %edx
	shrl	$31, %edx
	addl	%r8d, %edx
	sarl	%edx
	movl	%edx, %r8d
	testl	%edi, %edi
	jne	.L37
.L34:
	subl	%eax, %r10d
	leal	1000000007(%r10), %edx
	js	.L39
.L51:
	movslq	%r10d, %rdx
	movl	%r10d, %ecx
	imulq	$1152921497, %rdx, %rdx
	sarl	$31, %ecx
	sarq	$60, %rdx
	subl	%ecx, %edx
	imull	$1000000007, %edx, %ecx
	movl	%r10d, %edx
	subl	%ecx, %edx
.L39:
	subl	%eax, %edx
	leal	1000000007(%rdx), %r10d
	js	.L41
	movslq	%edx, %r10
	movl	%edx, %eax
	imulq	$1152921497, %r10, %r10
	sarl	$31, %eax
	sarq	$60, %r10
	subl	%eax, %r10d
	imull	$1000000007, %r10d, %eax
	subl	%eax, %edx
	movl	%edx, %r10d
.L41:
	movl	$8, 16(%rsp)
	cmpl	$1, %esi
	jle	.L42
	movl	$2, %r9d
	movl	$8, %eax
	movl	$1, %r8d
	movabsq	$-8543223828751151131, %r11
	leaq	16(%rsp), %rdi
	.p2align 4,,10
	.p2align 3
.L43:
	imulq	%rax, %rax
	addl	%r8d, %r8d
	movq	%rax, %rcx
	imulq	%r11
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	movslq	%r9d, %rdx
	movl	%ecx, -4(%rdi,%r9,4)
	movslq	%ecx, %rax
	addq	$1, %r9
	cmpl	%r8d, %esi
	jg	.L43
.L44:
	leaq	(%rdi,%rdx,4), %rdi
	movl	$1, %eax
	movabsq	$-8543223828751151131, %r9
	.p2align 4,,10
	.p2align 3
.L48:
	cmpl	%r8d, %esi
	jl	.L46
	movslq	-4(%rdi), %rcx
	cltq
	subl	%r8d, %esi
	subq	$4, %rdi
	sarl	%r8d
	imulq	%rax, %rcx
	movq	%rcx, %rax
	imulq	%r9
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	movl	%ecx, %eax
	imulq	$1000000007, %rdx, %rdx
	subl	%edx, %eax
	testl	%esi, %esi
	jne	.L48
.L45:
	addl	%eax, %r10d
	leal	1000000007(%r10), %eax
	js	.L24
	movslq	%r10d, %rax
	movl	%r10d, %edx
	imulq	$1152921497, %rax, %rax
	sarl	$31, %edx
	sarq	$60, %rax
	subl	%edx, %eax
	imull	$1000000007, %eax, %edx
	movl	%r10d, %eax
	subl	%edx, %eax
.L24:
	movq	1448(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L63
	addq	$1456, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L46:
	.cfi_restore_state
	sarl	%r8d
	subq	$4, %rdi
	testl	%esi, %esi
	jg	.L48
	jmp	.L45
	.p2align 4,,10
	.p2align 3
.L35:
	movl	%r8d, %edx
	subq	$4, %r9
	shrl	$31, %edx
	addl	%r8d, %edx
	sarl	%edx
	movl	%edx, %r8d
	testl	%edi, %edi
	jg	.L37
	subl	%eax, %r10d
	leal	1000000007(%r10), %edx
	jns	.L51
	jmp	.L39
	.p2align 4,,10
	.p2align 3
.L27:
	movl	%r8d, %eax
	subq	$4, %r9
	shrl	$31, %eax
	addl	%r8d, %eax
	sarl	%eax
	movl	%eax, %r8d
	testl	%ecx, %ecx
	jg	.L30
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L25:
	je	.L64
	movl	$1, %eax
	xorl	%r10d, %r10d
	jmp	.L51
	.p2align 4,,10
	.p2align 3
.L42:
	je	.L65
	movl	$1, %eax
	jmp	.L45
.L64:
	movl	$1, %edx
	movl	$1, %r8d
	leaq	16(%rsp), %rdi
	jmp	.L52
.L63:
	call	__stack_chk_fail@PLT
.L31:
	movl	$1, %eax
	jne	.L34
	movl	$1, %edx
	movl	$1, %r8d
	jmp	.L33
.L65:
	movl	$1, %edx
	movl	$1, %r8d
	leaq	16(%rsp), %rdi
	jmp	.L44
	.cfi_endproc
.LFE55:
	.size	fMain, .-fMain
	.section	.rodata.str1.1
.LC2:
	.string	"%d\n"
	.text
	.p2align 4
	.globl	fOne
	.type	fOne, @function
fOne:
.LFB56:
	.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	.LC2(%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	.L69
	addq	$1040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L69:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE56:
	.size	fOne, .-fOne
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB57:
	.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
.LFE57:
	.size	main, .-main
	.local	szpFpI
	.comm	szpFpI,8,8
	.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
	.p2align 4
	.type	fGetModPower.part.0, @function
fGetModPower.part.0:
.LFB58:
	.cfi_startproc
	subq	$424, %rsp
	.cfi_def_cfa_offset 432
	movl	%esi, %r8d
	movq	%fs:40, %rax
	movq	%rax, 408(%rsp)
	xorl	%eax, %eax
	movl	%edi, (%rsp)
	cmpl	$1, %esi
	jle	.L2
	movl	$2, %r9d
	movl	$1, %esi
	movq	%rsp, %r10
	movabsq	$-8543223828751151131, %r11
	.p2align 4,,10
	.p2align 3
.L3:
	movslq	%edi, %rcx
	addl	%esi, %esi
	imulq	%rcx, %rcx
	movq	%rcx, %rax
	imulq	%r11
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	movslq	%r9d, %rax
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	movl	%ecx, -4(%r10,%r9,4)
	movl	%ecx, %edi
	addq	$1, %r9
	cmpl	%r8d, %esi
	jl	.L3
.L4:
	movabsq	$-8543223828751151131, %r9
	leaq	(%r10,%rax,4), %rdi
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L8:
	cmpl	%esi, %r8d
	jl	.L6
	movslq	-4(%rdi), %rcx
	cltq
	subl	%esi, %r8d
	subq	$4, %rdi
	sarl	%esi
	imulq	%rax, %rcx
	movq	%rcx, %rax
	imulq	%r9
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	movl	%ecx, %eax
	imulq	$1000000007, %rdx, %rdx
	subl	%edx, %eax
	testl	%r8d, %r8d
	jne	.L8
.L1:
	movq	408(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L14
	addq	$424, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	sarl	%esi
	subq	$4, %rdi
	testl	%r8d, %r8d
	jg	.L8
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L2:
	je	.L15
	movl	$1, %eax
	jmp	.L1
.L15:
	movl	$1, %eax
	movl	$1, %esi
	movq	%rsp, %r10
	jmp	.L4
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE58:
	.size	fGetModPower.part.0, .-fGetModPower.part.0
	.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	fGetModSum
	.type	fGetModSum, @function
fGetModSum:
.LFB52:
	.cfi_startproc
	endbr64
	addl	%esi, %edi
	leal	1000000007(%rdi), %eax
	js	.L18
	movslq	%edi, %rax
	movl	%edi, %edx
	imulq	$1152921497, %rax, %rax
	sarl	$31, %edx
	sarq	$60, %rax
	subl	%edx, %eax
	imull	$1000000007, %eax, %edx
	movl	%edi, %eax
	subl	%edx, %eax
.L18:
	ret
	.cfi_endproc
.LFE52:
	.size	fGetModSum, .-fGetModSum
	.p2align 4
	.globl	fGetModMulti
	.type	fGetModMulti, @function
fGetModMulti:
.LFB53:
	.cfi_startproc
	endbr64
	movabsq	$-8543223828751151131, %rdx
	movslq	%esi, %rsi
	movslq	%edi, %rdi
	imulq	%rsi, %rdi
	movq	%rdi, %rax
	imulq	%rdx
	movq	%rdi, %rax
	sarq	$63, %rax
	addq	%rdi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	movl	%edi, %eax
	imulq	$1000000007, %rdx, %rdx
	subl	%edx, %eax
	ret
	.cfi_endproc
.LFE53:
	.size	fGetModMulti, .-fGetModMulti
	.p2align 4
	.globl	fGetModPower
	.type	fGetModPower, @function
fGetModPower:
.LFB54:
	.cfi_startproc
	endbr64
	testl	%edi, %edi
	je	.L23
	jmp	fGetModPower.part.0
	.p2align 4,,10
	.p2align 3
.L23:
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE54:
	.size	fGetModPower, .-fGetModPower
	.section	.rodata.str1.1
.LC1:
	.string	"%d"
	.text
	.p2align 4
	.globl	fMain
	.type	fMain, @function
fMain:
.LFB55:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	$1024, %esi
	subq	$1456, %rsp
	.cfi_def_cfa_offset 1472
	movq	szpFpI(%rip), %rdx
	movq	%fs:40, %rax
	movq	%rax, 1448(%rsp)
	xorl	%eax, %eax
	leaq	416(%rsp), %rbp
	movq	%rbp, %rdi
	call	fgets@PLT
	leaq	12(%rsp), %rdx
	movq	%rbp, %rdi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	call	__isoc99_sscanf@PLT
	movl	12(%rsp), %esi
	movl	$10, 16(%rsp)
	cmpl	$1, %esi
	jle	.L25
	movl	$2, %r9d
	movl	$10, %eax
	movl	$1, %r8d
	movabsq	$-8543223828751151131, %r10
	leaq	16(%rsp), %rdi
	.p2align 4,,10
	.p2align 3
.L26:
	movslq	%eax, %rcx
	addl	%r8d, %r8d
	imulq	%rcx, %rcx
	movq	%rcx, %rax
	imulq	%r10
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	movslq	%r9d, %rdx
	movl	%ecx, -4(%rdi,%r9,4)
	movl	%ecx, %eax
	addq	$1, %r9
	cmpl	%r8d, %esi
	jg	.L26
.L52:
	leaq	(%rdi,%rdx,4), %r9
	movl	%esi, %ecx
	movl	$1, %r10d
	movabsq	$-8543223828751151131, %r11
	.p2align 4,,10
	.p2align 3
.L30:
	cmpl	%ecx, %r8d
	jg	.L27
	movslq	-4(%r9), %rdx
	movslq	%r10d, %rax
	subl	%r8d, %ecx
	subq	$4, %r9
	imulq	%rax, %rdx
	movq	%rdx, %rax
	movq	%rdx, %r10
	imulq	%r11
	movq	%r10, %rax
	sarq	$63, %rax
	addq	%r10, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	movl	%r8d, %eax
	imulq	$1000000007, %rdx, %rdx
	shrl	$31, %eax
	addl	%r8d, %eax
	sarl	%eax
	subl	%edx, %r10d
	movl	%eax, %r8d
	testl	%ecx, %ecx
	jne	.L30
.L29:
	movl	$9, 16(%rsp)
	cmpl	$1, %esi
	jle	.L31
	movl	$2, %r9d
	movl	$9, %eax
	movl	$1, %r8d
	movabsq	$-8543223828751151131, %r11
	.p2align 4,,10
	.p2align 3
.L32:
	imulq	%rax, %rax
	addl	%r8d, %r8d
	movq	%rax, %rcx
	imulq	%r11
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	movslq	%r9d, %rdx
	movl	%ecx, -4(%rdi,%r9,4)
	movslq	%ecx, %rax
	addq	$1, %r9
	cmpl	%r8d, %esi
	jg	.L32
.L33:
	leaq	(%rdi,%rdx,4), %r9
	movl	$1, %eax
	movl	%esi, %edi
	movabsq	$-8543223828751151131, %r11
	.p2align 4,,10
	.p2align 3
.L37:
	cmpl	%edi, %r8d
	jg	.L35
	movslq	-4(%r9), %rcx
	cltq
	subl	%r8d, %edi
	subq	$4, %r9
	imulq	%rax, %rcx
	movq	%rcx, %rax
	imulq	%r11
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	movl	%ecx, %eax
	imulq	$1000000007, %rdx, %rdx
	subl	%edx, %eax
	movl	%r8d, %edx
	shrl	$31, %edx
	addl	%r8d, %edx
	sarl	%edx
	movl	%edx, %r8d
	testl	%edi, %edi
	jne	.L37
.L34:
	subl	%eax, %r10d
	leal	1000000007(%r10), %edx
	js	.L39
.L51:
	movslq	%r10d, %rdx
	movl	%r10d, %ecx
	imulq	$1152921497, %rdx, %rdx
	sarl	$31, %ecx
	sarq	$60, %rdx
	subl	%ecx, %edx
	imull	$1000000007, %edx, %ecx
	movl	%r10d, %edx
	subl	%ecx, %edx
.L39:
	subl	%eax, %edx
	leal	1000000007(%rdx), %r10d
	js	.L41
	movslq	%edx, %r10
	movl	%edx, %eax
	imulq	$1152921497, %r10, %r10
	sarl	$31, %eax
	sarq	$60, %r10
	subl	%eax, %r10d
	imull	$1000000007, %r10d, %eax
	subl	%eax, %edx
	movl	%edx, %r10d
.L41:
	movl	$8, 16(%rsp)
	cmpl	$1, %esi
	jle	.L42
	movl	$2, %r9d
	movl	$8, %eax
	movl	$1, %r8d
	movabsq	$-8543223828751151131, %r11
	leaq	16(%rsp), %rdi
	.p2align 4,,10
	.p2align 3
.L43:
	imulq	%rax, %rax
	addl	%r8d, %r8d
	movq	%rax, %rcx
	imulq	%r11
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rcx
	movslq	%r9d, %rdx
	movl	%ecx, -4(%rdi,%r9,4)
	movslq	%ecx, %rax
	addq	$1, %r9
	cmpl	%r8d, %esi
	jg	.L43
.L44:
	leaq	(%rdi,%rdx,4), %rdi
	movl	$1, %eax
	movabsq	$-8543223828751151131, %r9
	.p2align 4,,10
	.p2align 3
.L48:
	cmpl	%r8d, %esi
	jl	.L46
	movslq	-4(%rdi), %rcx
	cltq
	subl	%r8d, %esi
	subq	$4, %rdi
	sarl	%r8d
	imulq	%rax, %rcx
	movq	%rcx, %rax
	imulq	%r9
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	movl	%ecx, %eax
	imulq	$1000000007, %rdx, %rdx
	subl	%edx, %eax
	testl	%esi, %esi
	jne	.L48
.L45:
	addl	%eax, %r10d
	leal	1000000007(%r10), %eax
	js	.L24
	movslq	%r10d, %rax
	movl	%r10d, %edx
	imulq	$1152921497, %rax, %rax
	sarl	$31, %edx
	sarq	$60, %rax
	subl	%edx, %eax
	imull	$1000000007, %eax, %edx
	movl	%r10d, %eax
	subl	%edx, %eax
.L24:
	movq	1448(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L63
	addq	$1456, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L46:
	.cfi_restore_state
	sarl	%r8d
	subq	$4, %rdi
	testl	%esi, %esi
	jg	.L48
	jmp	.L45
	.p2align 4,,10
	.p2align 3
.L35:
	movl	%r8d, %edx
	subq	$4, %r9
	shrl	$31, %edx
	addl	%r8d, %edx
	sarl	%edx
	movl	%edx, %r8d
	testl	%edi, %edi
	jg	.L37
	subl	%eax, %r10d
	leal	1000000007(%r10), %edx
	jns	.L51
	jmp	.L39
	.p2align 4,,10
	.p2align 3
.L27:
	movl	%r8d, %eax
	subq	$4, %r9
	shrl	$31, %eax
	addl	%r8d, %eax
	sarl	%eax
	movl	%eax, %r8d
	testl	%ecx, %ecx
	jg	.L30
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L25:
	je	.L64
	movl	$1, %eax
	xorl	%r10d, %r10d
	jmp	.L51
	.p2align 4,,10
	.p2align 3
.L42:
	je	.L65
	movl	$1, %eax
	jmp	.L45
.L64:
	movl	$1, %edx
	movl	$1, %r8d
	leaq	16(%rsp), %rdi
	jmp	.L52
.L63:
	call	__stack_chk_fail@PLT
.L31:
	movl	$1, %eax
	jne	.L34
	movl	$1, %edx
	movl	$1, %r8d
	jmp	.L33
.L65:
	movl	$1, %edx
	movl	$1, %r8d
	leaq	16(%rsp), %rdi
	jmp	.L44
	.cfi_endproc
.LFE55:
	.size	fMain, .-fMain
	.section	.rodata.str1.1
.LC2:
	.string	"%d\n"
	.text
	.p2align 4
	.globl	fOne
	.type	fOne, @function
fOne:
.LFB56:
	.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	.LC2(%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	.L69
	addq	$1040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L69:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE56:
	.size	fOne, .-fOne
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB57:
	.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
.LFE57:
	.size	main, .-main
	.local	szpFpI
	.comm	szpFpI,8,8
	.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_MOD			1000000007								// 除数(10の9乗+7)

// 内部変数
static FILE *szpFpI;											// 入力

// 内部変数 - テスト用
#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
fGetModSum(
	int piVal1					// <I> 値１
	, int piVal2				// <I> 値２
)
{
	int liSum = piVal1 + piVal2;
	if (liSum >= 0) {
		return liSum % D_MOD;
	}
	else {
		return liSum + D_MOD;
	}
}

// 積 - 取得
int
fGetModMulti(
	int piVal1					// <I> 値１
	, int piVal2				// <I> 値２
)
{
	return (int)((long long)piVal1 * (long long)piVal2 % D_MOD);
}

// べき乗 - 取得
int
fGetModPower(
	int piBase					// <I> 基数
	, int piIdx					// <I> 指数
)
{
	// 基数
	if (piBase == 0) {
		return 0;
	}

	// 平方リスト - 作成
	int li1Val[100];
	li1Val[0] = piBase;
	int liCnt = 1;
	int liIdx = 1;
	while (piIdx > liIdx) {
		li1Val[liCnt] = fGetModMulti(li1Val[liCnt - 1], li1Val[liCnt - 1]);
		liCnt++;
		liIdx += liIdx;
	}

	// べき乗 - 取得
	int liVal = 1;
	while (piIdx > 0) {
		if (piIdx >= liIdx) {
			piIdx -= liIdx;
			liVal = fGetModMulti(liVal, li1Val[liCnt - 1]);
		}
		liCnt--;
		liIdx /= 2;
	}

	return liVal;
}

// 実行メイン
int
fMain(
)
{
	char lc1Buf[1024];

	// 配列数 - 取得
	int liN;
	fgets(lc1Buf, sizeof(lc1Buf), szpFpI);
	sscanf(lc1Buf, "%d", &liN);

	// 全パターン
	int liSum = fGetModPower(10, liN);

	// 0なし(9なし)
	int liCnt = fGetModPower(9, liN);
	liSum = fGetModSum(liSum, -liCnt);
	liSum = fGetModSum(liSum, -liCnt);

	// 0,9なし
	liCnt = fGetModPower(8, liN);
	liSum = fGetModSum(liSum, liCnt);

	return liSum;
}

// １回実行
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;
}


226564
 0
 3
 241465
 5
 127499
 10
 99752
 7
 112403

498733826
 0
 54
 202510248
 14670
 463923590
 100172994
 794180853
 2531214
 286663221

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_MOD			1000000007								// 除数(10の9乗+7)

// 内部変数
static FILE *szpFpI;											// 入力

// 内部変数 - テスト用
#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
fGetModSum(
	int piVal1					// <I> 値１
	, int piVal2				// <I> 値２
)
{
	int liSum = piVal1 + piVal2;
	if (liSum >= 0) {
		return liSum % D_MOD;
	}
	else {
		return liSum + D_MOD;
	}
}

// 積 - 取得
int
fGetModMulti(
	int piVal1					// <I> 値１
	, int piVal2				// <I> 値２
)
{
	return (int)((long long)piVal1 * (long long)piVal2 % D_MOD);
}

// べき乗 - 取得
int
fGetModPower(
	int piBase					// <I> 基数
	, int piIdx					// <I> 指数
)
{
	// 基数
	if (piBase == 0) {
		return 0;
	}

	// 平方リスト - 作成
	int li1Val[100];
	li1Val[0] = piBase;
	int liCnt = 1;
	int liIdx = 1;
	while (piIdx > liIdx) {
		li1Val[liCnt] = fGetModMulti(li1Val[liCnt - 1], li1Val[liCnt - 1]);
		liCnt++;
		liIdx += liIdx;
	}

	// べき乗 - 取得
	int liVal = 1;
	while (piIdx > 0) {
		if (piIdx >= liIdx) {
			piIdx -= liIdx;
			liVal = fGetModMulti(liVal, li1Val[liCnt - 1]);
		}
		liCnt--;
		liIdx /= 2;
	}

	return liVal;
}

// 実行メイン
int
fMain(
)
{
	char lc1Buf[1024];

	// 配列数 - 取得
	int liN;
	fgets(lc1Buf, sizeof(lc1Buf), szpFpI);
	sscanf(lc1Buf, "%d", &liN);

	// 全パターン
	int liSum = fGetModPower(10, liN);

	// 0なし(9なし)
	int liCnt = fGetModPower(9, liN);
	liSum = fGetModSum(liSum, -liCnt);
	liSum = fGetModSum(liSum, -liCnt);

	// 0,9なし
	liCnt = fGetModPower(8, liN);
	liSum = fGetModSum(liSum, liCnt);

	return liSum;
}

// １回実行
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
	.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	fGetModSum
	.type	fGetModSum, @function
fGetModSum:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -4(%rbp)
	cmpl	$0, -4(%rbp)
	js	.L5
	movl	-4(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1152921497, %rax, %rax
	shrq	$32, %rax
	sarl	$28, %eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	imull	$1000000007, %eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	jmp	.L6
.L5:
	movl	-4(%rbp), %eax
	addl	$1000000007, %eax
.L6:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	fGetModSum, .-fGetModSum
	.globl	fGetModMulti
	.type	fGetModMulti, @function
fGetModMulti:
.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
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	movq	%rdx, %rcx
	imulq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	fGetModMulti, .-fGetModMulti
	.globl	fGetModPower
	.type	fGetModPower, @function
fGetModPower:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$448, %rsp
	movl	%edi, -436(%rbp)
	movl	%esi, -440(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	cmpl	$0, -436(%rbp)
	jne	.L10
	movl	$0, %eax
	jmp	.L17
.L10:
	movl	-436(%rbp), %eax
	movl	%eax, -416(%rbp)
	movl	$1, -428(%rbp)
	movl	$1, -424(%rbp)
	jmp	.L12
.L13:
	movl	-428(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-428(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModMulti
	movl	-428(%rbp), %edx
	movslq	%edx, %rdx
	movl	%eax, -416(%rbp,%rdx,4)
	addl	$1, -428(%rbp)
	sall	-424(%rbp)
.L12:
	movl	-440(%rbp), %eax
	cmpl	-424(%rbp), %eax
	jg	.L13
	movl	$1, -420(%rbp)
	jmp	.L14
.L16:
	movl	-440(%rbp), %eax
	cmpl	-424(%rbp), %eax
	jl	.L15
	movl	-424(%rbp), %eax
	subl	%eax, -440(%rbp)
	movl	-428(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-420(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModMulti
	movl	%eax, -420(%rbp)
.L15:
	subl	$1, -428(%rbp)
	movl	-424(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -424(%rbp)
.L14:
	cmpl	$0, -440(%rbp)
	jg	.L16
	movl	-420(%rbp), %eax
.L17:
	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
.LFE9:
	.size	fGetModPower, .-fGetModPower
	.section	.rodata
.LC1:
	.string	"%d"
	.text
	.globl	fMain
	.type	fMain, @function
fMain:
.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	szpFpI(%rip), %rdx
	leaq	-1040(%rbp), %rax
	movl	$1024, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	leaq	-1052(%rbp), %rdx
	leaq	-1040(%rbp), %rax
	leaq	.LC1(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	-1052(%rbp), %eax
	movl	%eax, %esi
	movl	$10, %edi
	call	fGetModPower
	movl	%eax, -1048(%rbp)
	movl	-1052(%rbp), %eax
	movl	%eax, %esi
	movl	$9, %edi
	call	fGetModPower
	movl	%eax, -1044(%rbp)
	movl	-1044(%rbp), %eax
	negl	%eax
	movl	%eax, %edx
	movl	-1048(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModSum
	movl	%eax, -1048(%rbp)
	movl	-1044(%rbp), %eax
	negl	%eax
	movl	%eax, %edx
	movl	-1048(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModSum
	movl	%eax, -1048(%rbp)
	movl	-1052(%rbp), %eax
	movl	%eax, %esi
	movl	$8, %edi
	call	fGetModPower
	movl	%eax, -1044(%rbp)
	movl	-1044(%rbp), %edx
	movl	-1048(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModSum
	movl	%eax, -1048(%rbp)
	movl	-1048(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	fMain, .-fMain
	.section	.rodata
.LC2:
	.string	"%d\n"
	.text
	.globl	fOne
	.type	fOne, @function
fOne:
.LFB11:
	.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	.LC2(%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	.L24
	call	__stack_chk_fail@PLT
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	fOne, .-fOne
	.globl	main
	.type	main, @function
main:
.LFB12:
	.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
.LFE12:
	.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
	.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	fGetModSum
	.type	fGetModSum, @function
fGetModSum:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -4(%rbp)
	cmpl	$0, -4(%rbp)
	js	.L5
	movl	-4(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1152921497, %rax, %rax
	shrq	$32, %rax
	sarl	$28, %eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	imull	$1000000007, %eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	jmp	.L6
.L5:
	movl	-4(%rbp), %eax
	addl	$1000000007, %eax
.L6:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	fGetModSum, .-fGetModSum
	.globl	fGetModMulti
	.type	fGetModMulti, @function
fGetModMulti:
.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
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	movq	%rdx, %rcx
	imulq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	fGetModMulti, .-fGetModMulti
	.globl	fGetModPower
	.type	fGetModPower, @function
fGetModPower:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$448, %rsp
	movl	%edi, -436(%rbp)
	movl	%esi, -440(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	cmpl	$0, -436(%rbp)
	jne	.L10
	movl	$0, %eax
	jmp	.L17
.L10:
	movl	-436(%rbp), %eax
	movl	%eax, -416(%rbp)
	movl	$1, -428(%rbp)
	movl	$1, -424(%rbp)
	jmp	.L12
.L13:
	movl	-428(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-428(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModMulti
	movl	-428(%rbp), %edx
	movslq	%edx, %rdx
	movl	%eax, -416(%rbp,%rdx,4)
	addl	$1, -428(%rbp)
	sall	-424(%rbp)
.L12:
	movl	-440(%rbp), %eax
	cmpl	-424(%rbp), %eax
	jg	.L13
	movl	$1, -420(%rbp)
	jmp	.L14
.L16:
	movl	-440(%rbp), %eax
	cmpl	-424(%rbp), %eax
	jl	.L15
	movl	-424(%rbp), %eax
	subl	%eax, -440(%rbp)
	movl	-428(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-420(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModMulti
	movl	%eax, -420(%rbp)
.L15:
	subl	$1, -428(%rbp)
	movl	-424(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -424(%rbp)
.L14:
	cmpl	$0, -440(%rbp)
	jg	.L16
	movl	-420(%rbp), %eax
.L17:
	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
.LFE9:
	.size	fGetModPower, .-fGetModPower
	.section	.rodata
.LC1:
	.string	"%d"
	.text
	.globl	fMain
	.type	fMain, @function
fMain:
.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	szpFpI(%rip), %rdx
	leaq	-1040(%rbp), %rax
	movl	$1024, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	leaq	-1052(%rbp), %rdx
	leaq	-1040(%rbp), %rax
	leaq	.LC1(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	-1052(%rbp), %eax
	movl	%eax, %esi
	movl	$10, %edi
	call	fGetModPower
	movl	%eax, -1048(%rbp)
	movl	-1052(%rbp), %eax
	movl	%eax, %esi
	movl	$9, %edi
	call	fGetModPower
	movl	%eax, -1044(%rbp)
	movl	-1044(%rbp), %eax
	negl	%eax
	movl	%eax, %edx
	movl	-1048(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModSum
	movl	%eax, -1048(%rbp)
	movl	-1044(%rbp), %eax
	negl	%eax
	movl	%eax, %edx
	movl	-1048(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModSum
	movl	%eax, -1048(%rbp)
	movl	-1052(%rbp), %eax
	movl	%eax, %esi
	movl	$8, %edi
	call	fGetModPower
	movl	%eax, -1044(%rbp)
	movl	-1044(%rbp), %edx
	movl	-1048(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModSum
	movl	%eax, -1048(%rbp)
	movl	-1048(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	fMain, .-fMain
	.section	.rodata
.LC2:
	.string	"%d\n"
	.text
	.globl	fOne
	.type	fOne, @function
fOne:
.LFB11:
	.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	.LC2(%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	.L24
	call	__stack_chk_fail@PLT
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	fOne, .-fOne
	.globl	main
	.type	main, @function
main:
.LFB12:
	.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
.LFE12:
	.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:
