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			998244353								// 除数
#define D_FACT_MAX		200000									// 最大階乗数

// 内部変数
static FILE *szpFpI;											// 入力
static int si1ModFact[D_FACT_MAX];								// 階乗リスト
static int si1ModFactR[D_FACT_MAX];								// 階乗リスト(逆元)

// 内部変数 - テスト用
#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> 値２
)
{
	return (piVal1 + piVal2) % 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
fMakeModFact(
	int piMax					// <I> 最大値
)
{
	int i;

	si1ModFact[0] = 1;
	si1ModFact[1] = 1;
	for (i = 2; i <= piMax; i++) {
		si1ModFact[i] = fGetModMulti(si1ModFact[i - 1], i);
	}

	return 0;
}

// 階乗リスト(逆元) - 作成
int
fMakeModFactR(
	int piMax					// <I> 最大値
)
{
	int i;

	for (i = 0; i <= piMax; i++) {
		si1ModFactR[i] = fGetModPower(si1ModFact[i], D_MOD - 2);
	}

	return 0;
}

// nCk - 取得
int
fGetModnCk(
	int piN						// <I> N
	, int piK					// <I> K
)
{
	if (piN < piK) {
		return 0;
	}
	if (piK < 0) {
		return 0;
	}
	int liCnt = fGetModMulti(si1ModFact[piN], si1ModFactR[piN - piK]);
	return fGetModMulti(liCnt, si1ModFactR[piK]);
}

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

	// ブロック数・色数・組数 - 取得
	int liBCnt, liCCnt, liPCnt;
	fgets(lc1Buf, sizeof(lc1Buf), szpFpI);
	sscanf(lc1Buf, "%d%d%d", &liBCnt, &liCCnt, &liPCnt);
	if (liBCnt == 1) {
		return liCCnt;
	}
	if (liCCnt == 1) {
		if (liPCnt < liBCnt - 1) {
			return 0;
		}
		else {
			return 1;
		}
	}

	// 階乗リスト - 作成
	fMakeModFact(liBCnt - 1);
	fMakeModFactR(liBCnt - 1);

	// 組数でループ
	int liSum = 0;
	for (i = 0; i <= liPCnt; i++) {

		// １ブロック目
		int liPtn = liCCnt;

		// 異色
		int liVal = fGetModPower(liCCnt - 1, liBCnt - 1 - i);
		liPtn = fGetModMulti(liPtn, liVal);

		// 同色
		liVal = fGetModnCk(liBCnt - 1, i);
		liPtn = fGetModMulti(liPtn, liVal);

		// 合計 - 加算
		liSum = fGetModSum(liSum, liPtn);
	}

	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
	.local	si1ModFact
	.comm	si1ModFact,800000,32
	.local	si1ModFactR
	.comm	si1ModFactR,800000,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	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, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%eax, %edx
	movslq	%edx, %rax
	imulq	$288737297, %rax, %rax
	shrq	$32, %rax
	sarl	$26, %eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	imull	$998244353, %eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	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	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$998244353, %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	.L9
	movl	$0, %eax
	jmp	.L16
.L9:
	movl	-436(%rbp), %eax
	movl	%eax, -416(%rbp)
	movl	$1, -428(%rbp)
	movl	$1, -424(%rbp)
	jmp	.L11
.L12:
	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)
.L11:
	movl	-440(%rbp), %eax
	cmpl	-424(%rbp), %eax
	jg	.L12
	movl	$1, -420(%rbp)
	jmp	.L13
.L15:
	movl	-440(%rbp), %eax
	cmpl	-424(%rbp), %eax
	jl	.L14
	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)
.L14:
	subl	$1, -428(%rbp)
	movl	-424(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -424(%rbp)
.L13:
	cmpl	$0, -440(%rbp)
	jg	.L15
	movl	-420(%rbp), %eax
.L16:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	fGetModPower, .-fGetModPower
	.globl	fMakeModFact
	.type	fMakeModFact, @function
fMakeModFact:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$24, %rsp
	movl	%edi, -20(%rbp)
	movl	$1, si1ModFact(%rip)
	movl	$1, 4+si1ModFact(%rip)
	movl	$2, -4(%rbp)
	jmp	.L19
.L20:
	movl	-4(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	si1ModFact(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-4(%rbp), %edx
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModMulti
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	si1ModFact(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -4(%rbp)
.L19:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jle	.L20
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	fMakeModFact, .-fMakeModFact
	.globl	fMakeModFactR
	.type	fMakeModFactR, @function
fMakeModFactR:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L23
.L24:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	si1ModFact(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	$998244351, %esi
	movl	%eax, %edi
	call	fGetModPower
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	si1ModFactR(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -4(%rbp)
.L23:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jle	.L24
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	fMakeModFactR, .-fMakeModFactR
	.globl	fGetModnCk
	.type	fGetModnCk, @function
fGetModnCk:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$24, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jge	.L27
	movl	$0, %eax
	jmp	.L28
.L27:
	cmpl	$0, -24(%rbp)
	jns	.L29
	movl	$0, %eax
	jmp	.L28
.L29:
	movl	-20(%rbp), %eax
	subl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	si1ModFactR(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	si1ModFact(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModMulti
	movl	%eax, -4(%rbp)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	si1ModFactR(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModMulti
.L28:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	fGetModnCk, .-fGetModnCk
	.section	.rodata
.LC1:
	.string	"%d%d%d"
	.text
	.globl	fMain
	.type	fMain, @function
fMain:
.LFB13:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1072, %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	-1060(%rbp), %rsi
	leaq	-1064(%rbp), %rcx
	leaq	-1068(%rbp), %rdx
	leaq	-1040(%rbp), %rax
	movq	%rsi, %r8
	leaq	.LC1(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	-1068(%rbp), %eax
	cmpl	$1, %eax
	jne	.L31
	movl	-1064(%rbp), %eax
	jmp	.L37
.L31:
	movl	-1064(%rbp), %eax
	cmpl	$1, %eax
	jne	.L33
	movl	-1068(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-1060(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L34
	movl	$0, %eax
	jmp	.L37
.L34:
	movl	$1, %eax
	jmp	.L37
.L33:
	movl	-1068(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %edi
	call	fMakeModFact
	movl	-1068(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %edi
	call	fMakeModFactR
	movl	$0, -1052(%rbp)
	movl	$0, -1056(%rbp)
	jmp	.L35
.L36:
	movl	-1064(%rbp), %eax
	movl	%eax, -1048(%rbp)
	movl	-1068(%rbp), %eax
	subl	$1, %eax
	subl	-1056(%rbp), %eax
	movl	-1064(%rbp), %edx
	subl	$1, %edx
	movl	%eax, %esi
	movl	%edx, %edi
	call	fGetModPower
	movl	%eax, -1044(%rbp)
	movl	-1044(%rbp), %edx
	movl	-1048(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModMulti
	movl	%eax, -1048(%rbp)
	movl	-1068(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-1056(%rbp), %eax
	movl	%eax, %esi
	movl	%edx, %edi
	call	fGetModnCk
	movl	%eax, -1044(%rbp)
	movl	-1044(%rbp), %edx
	movl	-1048(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModMulti
	movl	%eax, -1048(%rbp)
	movl	-1048(%rbp), %edx
	movl	-1052(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModSum
	movl	%eax, -1052(%rbp)
	addl	$1, -1056(%rbp)
.L35:
	movl	-1060(%rbp), %eax
	cmpl	%eax, -1056(%rbp)
	jle	.L36
	movl	-1052(%rbp), %eax
.L37:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L38
	call	__stack_chk_fail@PLT
.L38:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	fMain, .-fMain
	.section	.rodata
.LC2:
	.string	"%d\n"
	.text
	.globl	fOne
	.type	fOne, @function
fOne:
.LFB14:
	.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	.L41
	call	__stack_chk_fail@PLT
.L41:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	fOne, .-fOne
	.globl	main
	.type	main, @function
main:
.LFB15:
	.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
.LFE15:
	.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:
.LFB61:
	.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	$155014655926305585, %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
	sarq	$23, %rdx
	subq	%rax, %rdx
	movslq	%r9d, %rax
	imulq	$998244353, %rdx, %rdx
	subq	%rdx, %rcx
	movl	%ecx, -4(%r10,%r9,4)
	movl	%ecx, %edi
	addq	$1, %r9
	cmpl	%r8d, %esi
	jl	.L3
.L4:
	movabsq	$155014655926305585, %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
	sarq	$23, %rdx
	subq	%rax, %rdx
	movl	%ecx, %eax
	imulq	$998244353, %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
.LFE61:
	.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
	movslq	%edi, %rax
	movl	%edi, %edx
	imulq	$288737297, %rax, %rax
	sarl	$31, %edx
	sarq	$58, %rax
	subl	%edx, %eax
	imull	$998244353, %eax, %edx
	movl	%edi, %eax
	subl	%edx, %eax
	ret
	.cfi_endproc
.LFE52:
	.size	fGetModSum, .-fGetModSum
	.p2align 4
	.globl	fGetModMulti
	.type	fGetModMulti, @function
fGetModMulti:
.LFB53:
	.cfi_startproc
	endbr64
	movabsq	$155014655926305585, %rdx
	movslq	%esi, %rsi
	movslq	%edi, %rdi
	imulq	%rsi, %rdi
	movq	%rdi, %rax
	imulq	%rdx
	movq	%rdi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	movl	%edi, %eax
	imulq	$998244353, %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	.L21
	jmp	fGetModPower.part.0
	.p2align 4,,10
	.p2align 3
.L21:
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE54:
	.size	fGetModPower, .-fGetModPower
	.p2align 4
	.globl	fMakeModFact
	.type	fMakeModFact, @function
fMakeModFact:
.LFB55:
	.cfi_startproc
	endbr64
	movq	.LC1(%rip), %rax
	movq	%rax, si1ModFact(%rip)
	cmpl	$1, %edi
	jle	.L23
	leal	1(%rdi), %r9d
	movl	$2, %esi
	movl	$1, %eax
	movabsq	$155014655926305585, %rdi
	leaq	si1ModFact(%rip), %r8
	.p2align 4,,10
	.p2align 3
.L24:
	movslq	%eax, %rcx
	imulq	%rsi, %rcx
	movq	%rcx, %rax
	imulq	%rdi
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rdx
	subq	%rdx, %rcx
	movl	%ecx, (%r8,%rsi,4)
	addq	$1, %rsi
	movl	%ecx, %eax
	cmpq	%r9, %rsi
	jne	.L24
.L23:
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE55:
	.size	fMakeModFact, .-fMakeModFact
	.p2align 4
	.globl	fMakeModFactR
	.type	fMakeModFactR, @function
fMakeModFactR:
.LFB56:
	.cfi_startproc
	endbr64
	testl	%edi, %edi
	js	.L32
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movslq	%edi, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	si1ModFactR(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	si1ModFact(%rip), %rbx
	leaq	4(%rbx), %rax
	leaq	(%rax,%rdi,4), %r12
	.p2align 4,,10
	.p2align 3
.L30:
	movl	(%rbx), %edi
	testl	%edi, %edi
	je	.L28
	movl	$998244351, %esi
	addq	$4, %rbx
	addq	$4, %rbp
	call	fGetModPower.part.0
	movl	%eax, -4(%rbp)
	cmpq	%rbx, %r12
	jne	.L30
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L28:
	.cfi_restore_state
	addq	$4, %rbx
	movl	$0, 0(%rbp)
	addq	$4, %rbp
	cmpq	%r12, %rbx
	jne	.L30
	popq	%rbx
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L32:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE56:
	.size	fMakeModFactR, .-fMakeModFactR
	.p2align 4
	.globl	fGetModnCk
	.type	fGetModnCk, @function
fGetModnCk:
.LFB57:
	.cfi_startproc
	endbr64
	testl	%esi, %esi
	js	.L37
	cmpl	%esi, %edi
	jl	.L37
	movl	%edi, %eax
	leaq	si1ModFactR(%rip), %r8
	movslq	%edi, %rdi
	subl	%esi, %eax
	movslq	%esi, %rsi
	cltq
	movslq	(%r8,%rax,4), %rcx
	leaq	si1ModFact(%rip), %rax
	movslq	(%rax,%rdi,4), %rax
	movabsq	$155014655926305585, %rdi
	imulq	%rax, %rcx
	movq	%rcx, %rax
	imulq	%rdi
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	movslq	(%r8,%rsi,4), %rax
	imulq	$998244353, %rdx, %rdx
	subq	%rdx, %rcx
	imulq	%rax, %rcx
	movq	%rcx, %rax
	imulq	%rdi
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	movl	%ecx, %eax
	imulq	$998244353, %rdx, %rdx
	subl	%edx, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L37:
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE57:
	.size	fGetModnCk, .-fGetModnCk
	.section	.rodata.str1.1
.LC2:
	.string	"%d%d%d"
	.text
	.p2align 4
	.globl	fMain
	.type	fMain, @function
fMain:
.LFB58:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$1024, %esi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$1496, %rsp
	.cfi_def_cfa_offset 1552
	movq	szpFpI(%rip), %rdx
	movq	%fs:40, %rax
	movq	%rax, 1480(%rsp)
	xorl	%eax, %eax
	leaq	448(%rsp), %rbp
	movq	%rbp, %rdi
	call	fgets@PLT
	leaq	40(%rsp), %rcx
	movq	%rbp, %rdi
	xorl	%eax, %eax
	leaq	36(%rsp), %rdx
	leaq	44(%rsp), %r8
	leaq	.LC2(%rip), %rsi
	call	__isoc99_sscanf@PLT
	movslq	36(%rsp), %rbx
	movl	40(%rsp), %r10d
	cmpl	$1, %ebx
	je	.L38
	movl	40(%rsp), %r11d
	movl	44(%rsp), %ebp
	cmpl	$1, %r11d
	je	.L80
	movq	.LC1(%rip), %rax
	movq	%rax, si1ModFact(%rip)
	cmpl	$2, %ebx
	jle	.L42
	movslq	%ebx, %r8
	movl	$2, %esi
	movl	$1, %eax
	movabsq	$155014655926305585, %rdi
	leaq	si1ModFact(%rip), %r15
	.p2align 4,,10
	.p2align 3
.L43:
	imulq	%rsi, %rax
	movq	%rax, %rcx
	imulq	%rdi
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rdx
	subq	%rdx, %rcx
	movl	%ecx, (%r15,%rsi,4)
	addq	$1, %rsi
	movslq	%ecx, %rax
	cmpq	%rsi, %r8
	jne	.L43
.L45:
	xorl	%r10d, %r10d
	movl	$1, %eax
	leaq	si1ModFactR(%rip), %r12
	movabsq	$155014655926305585, %r8
	leaq	48(%rsp), %r9
	leaq	si1ModFact(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L44:
	testl	%eax, %eax
	je	.L47
	movl	%eax, 48(%rsp)
	movl	$2, %edi
	movl	$1, %esi
	.p2align 4,,10
	.p2align 3
.L48:
	imulq	%rax, %rax
	addl	%esi, %esi
	movq	%rax, %rcx
	imulq	%r8
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rdx
	subq	%rdx, %rcx
	movslq	%edi, %rdx
	movl	%ecx, -4(%r9,%rdi,4)
	addq	$1, %rdi
	movslq	%ecx, %rax
	cmpq	$32, %rdi
	jne	.L48
	leaq	(%r9,%rdx,4), %rdi
	movl	$1, %eax
	movl	$998244351, %ecx
	.p2align 4,,10
	.p2align 3
.L52:
	cmpl	%esi, %ecx
	jl	.L49
	movslq	-4(%rdi), %r14
	cltq
	subl	%esi, %ecx
	subq	$4, %rdi
	imulq	%rax, %r14
	movq	%r14, %rax
	imulq	%r8
	movq	%r14, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	movl	%r14d, %eax
	imulq	$998244353, %rdx, %rdx
	subl	%edx, %eax
	movl	%esi, %edx
	shrl	$31, %edx
	addl	%esi, %edx
	movl	%edx, %esi
	sarl	%esi
	testl	%ecx, %ecx
	jg	.L52
.L47:
	movl	%eax, (%r12,%r10,4)
	addq	$1, %r10
	cmpl	%r10d, %ebx
	jle	.L46
	movslq	0(%r13,%r10,4), %rax
	jmp	.L44
	.p2align 4,,10
	.p2align 3
.L67:
	xorl	%r10d, %r10d
.L38:
	movq	1480(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L81
	addq	$1496, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	%r10d, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L49:
	.cfi_restore_state
	sarl	%esi
	subq	$4, %rdi
	jmp	.L52
.L42:
	testl	%ebx, %ebx
	jg	.L45
	.p2align 4,,10
	.p2align 3
.L46:
	testl	%ebp, %ebp
	js	.L67
	movslq	%r11d, %rax
	leal	-1(%r11), %r14d
	movl	%ebx, %r11d
	movq	%rax, 24(%rsp)
	subl	$1, %r11d
	js	.L67
	cmpl	%ebp, %r11d
	movslq	%r11d, %rax
	leaq	si1ModFact(%rip), %r15
	movabsq	$155014655926305585, %r9
	cmovle	%r11d, %ebp
	movq	%rax, 16(%rsp)
	xorl	%r10d, %r10d
	xorl	%r12d, %r12d
	movl	%ebp, 12(%rsp)
	leaq	si1ModFactR(%rip), %rbp
	leaq	0(%rbp,%rbx,4), %r13
	leaq	48(%rsp), %rbx
	.p2align 4,,10
	.p2align 3
.L64:
	movl	%r11d, %r8d
	xorl	%ecx, %ecx
	testl	%r14d, %r14d
	je	.L54
	movl	%r14d, 48(%rsp)
	cmpl	$1, %r11d
	jle	.L55
	movslq	%r14d, %rax
	movl	$2, %edi
	movl	$1, %esi
	.p2align 4,,10
	.p2align 3
.L56:
	imulq	%rax, %rax
	addl	%esi, %esi
	movq	%rax, %rcx
	imulq	%r9
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rdx
	subq	%rdx, %rcx
	movslq	%edi, %rdx
	movl	%ecx, -4(%rbx,%rdi,4)
	movslq	%ecx, %rax
	addq	$1, %rdi
	cmpl	%esi, %r11d
	jg	.L56
.L57:
	leaq	(%rbx,%rdx,4), %rdi
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L62:
	cmpl	%r8d, %esi
	jg	.L59
	movslq	-4(%rdi), %rdx
	movslq	%eax, %rcx
	subl	%esi, %r8d
	subq	$4, %rdi
	sarl	%esi
	imulq	%rdx, %rcx
	movq	%rcx, %rax
	imulq	%r9
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	movl	%ecx, %eax
	imulq	$998244353, %rdx, %rdx
	subl	%edx, %eax
	testl	%r8d, %r8d
	jg	.L62
.L61:
	movslq	%eax, %rsi
.L58:
	imulq	24(%rsp), %rsi
	movq	%rsi, %rax
	imulq	%r9
	movq	%rsi, %rax
	sarq	$63, %rax
	movq	%rdx, %rcx
	sarq	$23, %rcx
	subq	%rax, %rcx
	imulq	$998244353, %rcx, %rax
	subq	%rax, %rsi
	movq	%rsi, %rcx
.L54:
	addl	$1, %r12d
	subq	$4, %r13
	addq	$4, %rbp
	subl	$1, %r11d
	movq	16(%rsp), %rax
	movslq	(%r15,%rax,4), %rsi
	movslq	0(%r13), %rax
	imulq	%rax, %rsi
	movq	%rsi, %rax
	imulq	%r9
	movq	%rsi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	movslq	-4(%rbp), %rax
	imulq	$998244353, %rdx, %rdx
	subq	%rdx, %rsi
	imulq	%rax, %rsi
	movq	%rsi, %rax
	imulq	%r9
	movq	%rsi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rdx
	subq	%rdx, %rsi
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	imulq	%r9
	movq	%rsi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rdx
	subq	%rdx, %rsi
	addl	%r10d, %esi
	movslq	%esi, %r10
	movl	%esi, %eax
	imulq	$288737297, %r10, %r10
	sarl	$31, %eax
	sarq	$58, %r10
	subl	%eax, %r10d
	imull	$998244353, %r10d, %eax
	subl	%eax, %esi
	movl	%esi, %r10d
	cmpl	12(%rsp), %r12d
	jle	.L64
	jmp	.L38
	.p2align 4,,10
	.p2align 3
.L59:
	sarl	%esi
	subq	$4, %rdi
	testl	%r8d, %r8d
	jg	.L62
	jmp	.L61
	.p2align 4,,10
	.p2align 3
.L55:
	je	.L82
	movl	$1, %esi
	jmp	.L58
	.p2align 4,,10
	.p2align 3
.L80:
	subl	$1, %ebx
	xorl	%r10d, %r10d
	cmpl	%ebp, %ebx
	setle	%r10b
	jmp	.L38
.L81:
	call	__stack_chk_fail@PLT
.L82:
	movl	$1, %edx
	movl	$1, %esi
	jmp	.L57
	.cfi_endproc
.LFE58:
	.size	fMain, .-fMain
	.section	.rodata.str1.1
.LC3:
	.string	"%d\n"
	.text
	.p2align 4
	.globl	fOne
	.type	fOne, @function
fOne:
.LFB59:
	.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	.LC3(%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	.L86
	addq	$1040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L86:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE59:
	.size	fOne, .-fOne
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB60:
	.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
.LFE60:
	.size	main, .-main
	.local	si1ModFactR
	.comm	si1ModFactR,800000,32
	.local	si1ModFact
	.comm	si1ModFact,800000,32
	.local	szpFpI
	.comm	szpFpI,8,8
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	1
	.long	1
	.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:
.LFB61:
	.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	$155014655926305585, %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
	sarq	$23, %rdx
	subq	%rax, %rdx
	movslq	%r9d, %rax
	imulq	$998244353, %rdx, %rdx
	subq	%rdx, %rcx
	movl	%ecx, -4(%r10,%r9,4)
	movl	%ecx, %edi
	addq	$1, %r9
	cmpl	%r8d, %esi
	jl	.L3
.L4:
	movabsq	$155014655926305585, %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
	sarq	$23, %rdx
	subq	%rax, %rdx
	movl	%ecx, %eax
	imulq	$998244353, %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
.LFE61:
	.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
	movslq	%edi, %rax
	movl	%edi, %edx
	imulq	$288737297, %rax, %rax
	sarl	$31, %edx
	sarq	$58, %rax
	subl	%edx, %eax
	imull	$998244353, %eax, %edx
	movl	%edi, %eax
	subl	%edx, %eax
	ret
	.cfi_endproc
.LFE52:
	.size	fGetModSum, .-fGetModSum
	.p2align 4
	.globl	fGetModMulti
	.type	fGetModMulti, @function
fGetModMulti:
.LFB53:
	.cfi_startproc
	endbr64
	movabsq	$155014655926305585, %rdx
	movslq	%esi, %rsi
	movslq	%edi, %rdi
	imulq	%rsi, %rdi
	movq	%rdi, %rax
	imulq	%rdx
	movq	%rdi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	movl	%edi, %eax
	imulq	$998244353, %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	.L21
	jmp	fGetModPower.part.0
	.p2align 4,,10
	.p2align 3
.L21:
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE54:
	.size	fGetModPower, .-fGetModPower
	.p2align 4
	.globl	fMakeModFact
	.type	fMakeModFact, @function
fMakeModFact:
.LFB55:
	.cfi_startproc
	endbr64
	movq	.LC1(%rip), %rax
	movq	%rax, si1ModFact(%rip)
	cmpl	$1, %edi
	jle	.L23
	leal	1(%rdi), %r9d
	movl	$2, %esi
	movl	$1, %eax
	movabsq	$155014655926305585, %rdi
	leaq	si1ModFact(%rip), %r8
	.p2align 4,,10
	.p2align 3
.L24:
	movslq	%eax, %rcx
	imulq	%rsi, %rcx
	movq	%rcx, %rax
	imulq	%rdi
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rdx
	subq	%rdx, %rcx
	movl	%ecx, (%r8,%rsi,4)
	addq	$1, %rsi
	movl	%ecx, %eax
	cmpq	%r9, %rsi
	jne	.L24
.L23:
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE55:
	.size	fMakeModFact, .-fMakeModFact
	.p2align 4
	.globl	fMakeModFactR
	.type	fMakeModFactR, @function
fMakeModFactR:
.LFB56:
	.cfi_startproc
	endbr64
	testl	%edi, %edi
	js	.L32
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movslq	%edi, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	si1ModFactR(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	si1ModFact(%rip), %rbx
	leaq	4(%rbx), %rax
	leaq	(%rax,%rdi,4), %r12
	.p2align 4,,10
	.p2align 3
.L30:
	movl	(%rbx), %edi
	testl	%edi, %edi
	je	.L28
	movl	$998244351, %esi
	addq	$4, %rbx
	addq	$4, %rbp
	call	fGetModPower.part.0
	movl	%eax, -4(%rbp)
	cmpq	%rbx, %r12
	jne	.L30
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L28:
	.cfi_restore_state
	addq	$4, %rbx
	movl	$0, 0(%rbp)
	addq	$4, %rbp
	cmpq	%r12, %rbx
	jne	.L30
	popq	%rbx
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L32:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE56:
	.size	fMakeModFactR, .-fMakeModFactR
	.p2align 4
	.globl	fGetModnCk
	.type	fGetModnCk, @function
fGetModnCk:
.LFB57:
	.cfi_startproc
	endbr64
	testl	%esi, %esi
	js	.L37
	cmpl	%esi, %edi
	jl	.L37
	movl	%edi, %eax
	leaq	si1ModFactR(%rip), %r8
	movslq	%edi, %rdi
	subl	%esi, %eax
	movslq	%esi, %rsi
	cltq
	movslq	(%r8,%rax,4), %rcx
	leaq	si1ModFact(%rip), %rax
	movslq	(%rax,%rdi,4), %rax
	movabsq	$155014655926305585, %rdi
	imulq	%rax, %rcx
	movq	%rcx, %rax
	imulq	%rdi
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	movslq	(%r8,%rsi,4), %rax
	imulq	$998244353, %rdx, %rdx
	subq	%rdx, %rcx
	imulq	%rax, %rcx
	movq	%rcx, %rax
	imulq	%rdi
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	movl	%ecx, %eax
	imulq	$998244353, %rdx, %rdx
	subl	%edx, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L37:
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE57:
	.size	fGetModnCk, .-fGetModnCk
	.section	.rodata.str1.1
.LC2:
	.string	"%d%d%d"
	.text
	.p2align 4
	.globl	fMain
	.type	fMain, @function
fMain:
.LFB58:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$1024, %esi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$1496, %rsp
	.cfi_def_cfa_offset 1552
	movq	szpFpI(%rip), %rdx
	movq	%fs:40, %rax
	movq	%rax, 1480(%rsp)
	xorl	%eax, %eax
	leaq	448(%rsp), %rbp
	movq	%rbp, %rdi
	call	fgets@PLT
	leaq	40(%rsp), %rcx
	movq	%rbp, %rdi
	xorl	%eax, %eax
	leaq	36(%rsp), %rdx
	leaq	44(%rsp), %r8
	leaq	.LC2(%rip), %rsi
	call	__isoc99_sscanf@PLT
	movslq	36(%rsp), %rbx
	movl	40(%rsp), %r10d
	cmpl	$1, %ebx
	je	.L38
	movl	40(%rsp), %r11d
	movl	44(%rsp), %ebp
	cmpl	$1, %r11d
	je	.L80
	movq	.LC1(%rip), %rax
	movq	%rax, si1ModFact(%rip)
	cmpl	$2, %ebx
	jle	.L42
	movslq	%ebx, %r8
	movl	$2, %esi
	movl	$1, %eax
	movabsq	$155014655926305585, %rdi
	leaq	si1ModFact(%rip), %r15
	.p2align 4,,10
	.p2align 3
.L43:
	imulq	%rsi, %rax
	movq	%rax, %rcx
	imulq	%rdi
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rdx
	subq	%rdx, %rcx
	movl	%ecx, (%r15,%rsi,4)
	addq	$1, %rsi
	movslq	%ecx, %rax
	cmpq	%rsi, %r8
	jne	.L43
.L45:
	xorl	%r10d, %r10d
	movl	$1, %eax
	leaq	si1ModFactR(%rip), %r12
	movabsq	$155014655926305585, %r8
	leaq	48(%rsp), %r9
	leaq	si1ModFact(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L44:
	testl	%eax, %eax
	je	.L47
	movl	%eax, 48(%rsp)
	movl	$2, %edi
	movl	$1, %esi
	.p2align 4,,10
	.p2align 3
.L48:
	imulq	%rax, %rax
	addl	%esi, %esi
	movq	%rax, %rcx
	imulq	%r8
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rdx
	subq	%rdx, %rcx
	movslq	%edi, %rdx
	movl	%ecx, -4(%r9,%rdi,4)
	addq	$1, %rdi
	movslq	%ecx, %rax
	cmpq	$32, %rdi
	jne	.L48
	leaq	(%r9,%rdx,4), %rdi
	movl	$1, %eax
	movl	$998244351, %ecx
	.p2align 4,,10
	.p2align 3
.L52:
	cmpl	%esi, %ecx
	jl	.L49
	movslq	-4(%rdi), %r14
	cltq
	subl	%esi, %ecx
	subq	$4, %rdi
	imulq	%rax, %r14
	movq	%r14, %rax
	imulq	%r8
	movq	%r14, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	movl	%r14d, %eax
	imulq	$998244353, %rdx, %rdx
	subl	%edx, %eax
	movl	%esi, %edx
	shrl	$31, %edx
	addl	%esi, %edx
	movl	%edx, %esi
	sarl	%esi
	testl	%ecx, %ecx
	jg	.L52
.L47:
	movl	%eax, (%r12,%r10,4)
	addq	$1, %r10
	cmpl	%r10d, %ebx
	jle	.L46
	movslq	0(%r13,%r10,4), %rax
	jmp	.L44
	.p2align 4,,10
	.p2align 3
.L67:
	xorl	%r10d, %r10d
.L38:
	movq	1480(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L81
	addq	$1496, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	%r10d, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L49:
	.cfi_restore_state
	sarl	%esi
	subq	$4, %rdi
	jmp	.L52
.L42:
	testl	%ebx, %ebx
	jg	.L45
	.p2align 4,,10
	.p2align 3
.L46:
	testl	%ebp, %ebp
	js	.L67
	movslq	%r11d, %rax
	leal	-1(%r11), %r14d
	movl	%ebx, %r11d
	movq	%rax, 24(%rsp)
	subl	$1, %r11d
	js	.L67
	cmpl	%ebp, %r11d
	movslq	%r11d, %rax
	leaq	si1ModFact(%rip), %r15
	movabsq	$155014655926305585, %r9
	cmovle	%r11d, %ebp
	movq	%rax, 16(%rsp)
	xorl	%r10d, %r10d
	xorl	%r12d, %r12d
	movl	%ebp, 12(%rsp)
	leaq	si1ModFactR(%rip), %rbp
	leaq	0(%rbp,%rbx,4), %r13
	leaq	48(%rsp), %rbx
	.p2align 4,,10
	.p2align 3
.L64:
	movl	%r11d, %r8d
	xorl	%ecx, %ecx
	testl	%r14d, %r14d
	je	.L54
	movl	%r14d, 48(%rsp)
	cmpl	$1, %r11d
	jle	.L55
	movslq	%r14d, %rax
	movl	$2, %edi
	movl	$1, %esi
	.p2align 4,,10
	.p2align 3
.L56:
	imulq	%rax, %rax
	addl	%esi, %esi
	movq	%rax, %rcx
	imulq	%r9
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rdx
	subq	%rdx, %rcx
	movslq	%edi, %rdx
	movl	%ecx, -4(%rbx,%rdi,4)
	movslq	%ecx, %rax
	addq	$1, %rdi
	cmpl	%esi, %r11d
	jg	.L56
.L57:
	leaq	(%rbx,%rdx,4), %rdi
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L62:
	cmpl	%r8d, %esi
	jg	.L59
	movslq	-4(%rdi), %rdx
	movslq	%eax, %rcx
	subl	%esi, %r8d
	subq	$4, %rdi
	sarl	%esi
	imulq	%rdx, %rcx
	movq	%rcx, %rax
	imulq	%r9
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	movl	%ecx, %eax
	imulq	$998244353, %rdx, %rdx
	subl	%edx, %eax
	testl	%r8d, %r8d
	jg	.L62
.L61:
	movslq	%eax, %rsi
.L58:
	imulq	24(%rsp), %rsi
	movq	%rsi, %rax
	imulq	%r9
	movq	%rsi, %rax
	sarq	$63, %rax
	movq	%rdx, %rcx
	sarq	$23, %rcx
	subq	%rax, %rcx
	imulq	$998244353, %rcx, %rax
	subq	%rax, %rsi
	movq	%rsi, %rcx
.L54:
	addl	$1, %r12d
	subq	$4, %r13
	addq	$4, %rbp
	subl	$1, %r11d
	movq	16(%rsp), %rax
	movslq	(%r15,%rax,4), %rsi
	movslq	0(%r13), %rax
	imulq	%rax, %rsi
	movq	%rsi, %rax
	imulq	%r9
	movq	%rsi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	movslq	-4(%rbp), %rax
	imulq	$998244353, %rdx, %rdx
	subq	%rdx, %rsi
	imulq	%rax, %rsi
	movq	%rsi, %rax
	imulq	%r9
	movq	%rsi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rdx
	subq	%rdx, %rsi
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	imulq	%r9
	movq	%rsi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rdx
	subq	%rdx, %rsi
	addl	%r10d, %esi
	movslq	%esi, %r10
	movl	%esi, %eax
	imulq	$288737297, %r10, %r10
	sarl	$31, %eax
	sarq	$58, %r10
	subl	%eax, %r10d
	imull	$998244353, %r10d, %eax
	subl	%eax, %esi
	movl	%esi, %r10d
	cmpl	12(%rsp), %r12d
	jle	.L64
	jmp	.L38
	.p2align 4,,10
	.p2align 3
.L59:
	sarl	%esi
	subq	$4, %rdi
	testl	%r8d, %r8d
	jg	.L62
	jmp	.L61
	.p2align 4,,10
	.p2align 3
.L55:
	je	.L82
	movl	$1, %esi
	jmp	.L58
	.p2align 4,,10
	.p2align 3
.L80:
	subl	$1, %ebx
	xorl	%r10d, %r10d
	cmpl	%ebp, %ebx
	setle	%r10b
	jmp	.L38
.L81:
	call	__stack_chk_fail@PLT
.L82:
	movl	$1, %edx
	movl	$1, %esi
	jmp	.L57
	.cfi_endproc
.LFE58:
	.size	fMain, .-fMain
	.section	.rodata.str1.1
.LC3:
	.string	"%d\n"
	.text
	.p2align 4
	.globl	fOne
	.type	fOne, @function
fOne:
.LFB59:
	.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	.LC3(%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	.L86
	addq	$1040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L86:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE59:
	.size	fOne, .-fOne
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB60:
	.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
.LFE60:
	.size	main, .-main
	.local	si1ModFactR
	.comm	si1ModFactR,800000,32
	.local	si1ModFact
	.comm	si1ModFact,800000,32
	.local	szpFpI
	.comm	szpFpI,8,8
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	1
	.long	1
	.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			998244353								// 除数
#define D_FACT_MAX		200000									// 最大階乗数

// 内部変数
static FILE *szpFpI;											// 入力
static int si1ModFact[D_FACT_MAX];								// 階乗リスト
static int si1ModFactR[D_FACT_MAX];								// 階乗リスト(逆元)

// 内部変数 - テスト用
#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> 値２
)
{
	return (piVal1 + piVal2) % 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
fMakeModFact(
	int piMax					// <I> 最大値
)
{
	int i;

	si1ModFact[0] = 1;
	si1ModFact[1] = 1;
	for (i = 2; i <= piMax; i++) {
		si1ModFact[i] = fGetModMulti(si1ModFact[i - 1], i);
	}

	return 0;
}

// 階乗リスト(逆元) - 作成
int
fMakeModFactR(
	int piMax					// <I> 最大値
)
{
	int i;

	for (i = 0; i <= piMax; i++) {
		si1ModFactR[i] = fGetModPower(si1ModFact[i], D_MOD - 2);
	}

	return 0;
}

// nCk - 取得
int
fGetModnCk(
	int piN						// <I> N
	, int piK					// <I> K
)
{
	if (piN < piK) {
		return 0;
	}
	if (piK < 0) {
		return 0;
	}
	int liCnt = fGetModMulti(si1ModFact[piN], si1ModFactR[piN - piK]);
	return fGetModMulti(liCnt, si1ModFactR[piK]);
}

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

	// ブロック数・色数・組数 - 取得
	int liBCnt, liCCnt, liPCnt;
	fgets(lc1Buf, sizeof(lc1Buf), szpFpI);
	sscanf(lc1Buf, "%d%d%d", &liBCnt, &liCCnt, &liPCnt);
	if (liBCnt == 1) {
		return liCCnt;
	}
	if (liCCnt == 1) {
		if (liPCnt < liBCnt - 1) {
			return 0;
		}
		else {
			return 1;
		}
	}

	// 階乗リスト - 作成
	fMakeModFact(liBCnt - 1);
	fMakeModFactR(liBCnt - 1);

	// 組数でループ
	int liSum = 0;
	for (i = 0; i <= liPCnt; i++) {

		// １ブロック目
		int liPtn = liCCnt;

		// 異色
		int liVal = fGetModPower(liCCnt - 1, liBCnt - 1 - i);
		liPtn = fGetModMulti(liPtn, liVal);

		// 同色
		liVal = fGetModnCk(liBCnt - 1, i);
		liPtn = fGetModMulti(liPtn, liVal);

		// 合計 - 加算
		liSum = fGetModSum(liSum, liPtn);
	}

	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;
}


100 110 0
 6 2 1
 119754 114575 7559
 100 010 0
 12 2 1
 119754 114575 8988
 100 010 -1
 11 2 1
 145188 114575 8988
 11 3 1

701524751
 12
 612524154
 113759282
 24
 536128558
 0
 22
 964030371
 18432

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			998244353								// 除数
#define D_FACT_MAX		200000									// 最大階乗数

// 内部変数
static FILE *szpFpI;											// 入力
static int si1ModFact[D_FACT_MAX];								// 階乗リスト
static int si1ModFactR[D_FACT_MAX];								// 階乗リスト(逆元)

// 内部変数 - テスト用
#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> 値２
)
{
	return (piVal1 + piVal2) % 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
fMakeModFact(
	int piMax					// <I> 最大値
)
{
	int i;

	si1ModFact[0] = 1;
	si1ModFact[1] = 1;
	for (i = 2; i <= piMax; i++) {
		si1ModFact[i] = fGetModMulti(si1ModFact[i - 1], i);
	}

	return 0;
}

// 階乗リスト(逆元) - 作成
int
fMakeModFactR(
	int piMax					// <I> 最大値
)
{
	int i;

	for (i = 0; i <= piMax; i++) {
		si1ModFactR[i] = fGetModPower(si1ModFact[i], D_MOD - 2);
	}

	return 0;
}

// nCk - 取得
int
fGetModnCk(
	int piN						// <I> N
	, int piK					// <I> K
)
{
	if (piN < piK) {
		return 0;
	}
	if (piK < 0) {
		return 0;
	}
	int liCnt = fGetModMulti(si1ModFact[piN], si1ModFactR[piN - piK]);
	return fGetModMulti(liCnt, si1ModFactR[piK]);
}

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

	// ブロック数・色数・組数 - 取得
	int liBCnt, liCCnt, liPCnt;
	fgets(lc1Buf, sizeof(lc1Buf), szpFpI);
	sscanf(lc1Buf, "%d%d%d", &liBCnt, &liCCnt, &liPCnt);
	if (liBCnt == 1) {
		return liCCnt;
	}
	if (liCCnt == 1) {
		if (liPCnt < liBCnt - 1) {
			return 0;
		}
		else {
			return 1;
		}
	}

	// 階乗リスト - 作成
	fMakeModFact(liBCnt - 1);
	fMakeModFactR(liBCnt - 1);

	// 組数でループ
	int liSum = 0;
	for (i = 0; i <= liPCnt; i++) {

		// １ブロック目
		int liPtn = liCCnt;

		// 異色
		int liVal = fGetModPower(liCCnt - 1, liBCnt - 1 - i);
		liPtn = fGetModMulti(liPtn, liVal);

		// 同色
		liVal = fGetModnCk(liBCnt - 1, i);
		liPtn = fGetModMulti(liPtn, liVal);

		// 合計 - 加算
		liSum = fGetModSum(liSum, liPtn);
	}

	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
	.local	si1ModFact
	.comm	si1ModFact,800000,32
	.local	si1ModFactR
	.comm	si1ModFactR,800000,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	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, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%eax, %edx
	movslq	%edx, %rax
	imulq	$288737297, %rax, %rax
	shrq	$32, %rax
	sarl	$26, %eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	imull	$998244353, %eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	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	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$998244353, %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	.L9
	movl	$0, %eax
	jmp	.L16
.L9:
	movl	-436(%rbp), %eax
	movl	%eax, -416(%rbp)
	movl	$1, -428(%rbp)
	movl	$1, -424(%rbp)
	jmp	.L11
.L12:
	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)
.L11:
	movl	-440(%rbp), %eax
	cmpl	-424(%rbp), %eax
	jg	.L12
	movl	$1, -420(%rbp)
	jmp	.L13
.L15:
	movl	-440(%rbp), %eax
	cmpl	-424(%rbp), %eax
	jl	.L14
	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)
.L14:
	subl	$1, -428(%rbp)
	movl	-424(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -424(%rbp)
.L13:
	cmpl	$0, -440(%rbp)
	jg	.L15
	movl	-420(%rbp), %eax
.L16:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	fGetModPower, .-fGetModPower
	.globl	fMakeModFact
	.type	fMakeModFact, @function
fMakeModFact:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$24, %rsp
	movl	%edi, -20(%rbp)
	movl	$1, si1ModFact(%rip)
	movl	$1, 4+si1ModFact(%rip)
	movl	$2, -4(%rbp)
	jmp	.L19
.L20:
	movl	-4(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	si1ModFact(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-4(%rbp), %edx
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModMulti
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	si1ModFact(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -4(%rbp)
.L19:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jle	.L20
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	fMakeModFact, .-fMakeModFact
	.globl	fMakeModFactR
	.type	fMakeModFactR, @function
fMakeModFactR:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L23
.L24:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	si1ModFact(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	$998244351, %esi
	movl	%eax, %edi
	call	fGetModPower
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	si1ModFactR(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -4(%rbp)
.L23:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jle	.L24
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	fMakeModFactR, .-fMakeModFactR
	.globl	fGetModnCk
	.type	fGetModnCk, @function
fGetModnCk:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$24, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jge	.L27
	movl	$0, %eax
	jmp	.L28
.L27:
	cmpl	$0, -24(%rbp)
	jns	.L29
	movl	$0, %eax
	jmp	.L28
.L29:
	movl	-20(%rbp), %eax
	subl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	si1ModFactR(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	si1ModFact(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModMulti
	movl	%eax, -4(%rbp)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	si1ModFactR(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModMulti
.L28:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	fGetModnCk, .-fGetModnCk
	.section	.rodata
.LC1:
	.string	"%d%d%d"
	.text
	.globl	fMain
	.type	fMain, @function
fMain:
.LFB13:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1072, %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	-1060(%rbp), %rsi
	leaq	-1064(%rbp), %rcx
	leaq	-1068(%rbp), %rdx
	leaq	-1040(%rbp), %rax
	movq	%rsi, %r8
	leaq	.LC1(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	-1068(%rbp), %eax
	cmpl	$1, %eax
	jne	.L31
	movl	-1064(%rbp), %eax
	jmp	.L37
.L31:
	movl	-1064(%rbp), %eax
	cmpl	$1, %eax
	jne	.L33
	movl	-1068(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-1060(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L34
	movl	$0, %eax
	jmp	.L37
.L34:
	movl	$1, %eax
	jmp	.L37
.L33:
	movl	-1068(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %edi
	call	fMakeModFact
	movl	-1068(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %edi
	call	fMakeModFactR
	movl	$0, -1052(%rbp)
	movl	$0, -1056(%rbp)
	jmp	.L35
.L36:
	movl	-1064(%rbp), %eax
	movl	%eax, -1048(%rbp)
	movl	-1068(%rbp), %eax
	subl	$1, %eax
	subl	-1056(%rbp), %eax
	movl	-1064(%rbp), %edx
	subl	$1, %edx
	movl	%eax, %esi
	movl	%edx, %edi
	call	fGetModPower
	movl	%eax, -1044(%rbp)
	movl	-1044(%rbp), %edx
	movl	-1048(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModMulti
	movl	%eax, -1048(%rbp)
	movl	-1068(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-1056(%rbp), %eax
	movl	%eax, %esi
	movl	%edx, %edi
	call	fGetModnCk
	movl	%eax, -1044(%rbp)
	movl	-1044(%rbp), %edx
	movl	-1048(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModMulti
	movl	%eax, -1048(%rbp)
	movl	-1048(%rbp), %edx
	movl	-1052(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModSum
	movl	%eax, -1052(%rbp)
	addl	$1, -1056(%rbp)
.L35:
	movl	-1060(%rbp), %eax
	cmpl	%eax, -1056(%rbp)
	jle	.L36
	movl	-1052(%rbp), %eax
.L37:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L38
	call	__stack_chk_fail@PLT
.L38:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	fMain, .-fMain
	.section	.rodata
.LC2:
	.string	"%d\n"
	.text
	.globl	fOne
	.type	fOne, @function
fOne:
.LFB14:
	.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	.L41
	call	__stack_chk_fail@PLT
.L41:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	fOne, .-fOne
	.globl	main
	.type	main, @function
main:
.LFB15:
	.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
.LFE15:
	.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	si1ModFact
	.comm	si1ModFact,800000,32
	.local	si1ModFactR
	.comm	si1ModFactR,800000,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	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, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%eax, %edx
	movslq	%edx, %rax
	imulq	$288737297, %rax, %rax
	shrq	$32, %rax
	sarl	$26, %eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	imull	$998244353, %eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	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	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$998244353, %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	.L9
	movl	$0, %eax
	jmp	.L16
.L9:
	movl	-436(%rbp), %eax
	movl	%eax, -416(%rbp)
	movl	$1, -428(%rbp)
	movl	$1, -424(%rbp)
	jmp	.L11
.L12:
	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)
.L11:
	movl	-440(%rbp), %eax
	cmpl	-424(%rbp), %eax
	jg	.L12
	movl	$1, -420(%rbp)
	jmp	.L13
.L15:
	movl	-440(%rbp), %eax
	cmpl	-424(%rbp), %eax
	jl	.L14
	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)
.L14:
	subl	$1, -428(%rbp)
	movl	-424(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -424(%rbp)
.L13:
	cmpl	$0, -440(%rbp)
	jg	.L15
	movl	-420(%rbp), %eax
.L16:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	fGetModPower, .-fGetModPower
	.globl	fMakeModFact
	.type	fMakeModFact, @function
fMakeModFact:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$24, %rsp
	movl	%edi, -20(%rbp)
	movl	$1, si1ModFact(%rip)
	movl	$1, 4+si1ModFact(%rip)
	movl	$2, -4(%rbp)
	jmp	.L19
.L20:
	movl	-4(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	si1ModFact(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-4(%rbp), %edx
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModMulti
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	si1ModFact(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -4(%rbp)
.L19:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jle	.L20
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	fMakeModFact, .-fMakeModFact
	.globl	fMakeModFactR
	.type	fMakeModFactR, @function
fMakeModFactR:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L23
.L24:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	si1ModFact(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	$998244351, %esi
	movl	%eax, %edi
	call	fGetModPower
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	si1ModFactR(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -4(%rbp)
.L23:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jle	.L24
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	fMakeModFactR, .-fMakeModFactR
	.globl	fGetModnCk
	.type	fGetModnCk, @function
fGetModnCk:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$24, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jge	.L27
	movl	$0, %eax
	jmp	.L28
.L27:
	cmpl	$0, -24(%rbp)
	jns	.L29
	movl	$0, %eax
	jmp	.L28
.L29:
	movl	-20(%rbp), %eax
	subl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	si1ModFactR(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	si1ModFact(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModMulti
	movl	%eax, -4(%rbp)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	si1ModFactR(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModMulti
.L28:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	fGetModnCk, .-fGetModnCk
	.section	.rodata
.LC1:
	.string	"%d%d%d"
	.text
	.globl	fMain
	.type	fMain, @function
fMain:
.LFB13:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1072, %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	-1060(%rbp), %rsi
	leaq	-1064(%rbp), %rcx
	leaq	-1068(%rbp), %rdx
	leaq	-1040(%rbp), %rax
	movq	%rsi, %r8
	leaq	.LC1(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	-1068(%rbp), %eax
	cmpl	$1, %eax
	jne	.L31
	movl	-1064(%rbp), %eax
	jmp	.L37
.L31:
	movl	-1064(%rbp), %eax
	cmpl	$1, %eax
	jne	.L33
	movl	-1068(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-1060(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L34
	movl	$0, %eax
	jmp	.L37
.L34:
	movl	$1, %eax
	jmp	.L37
.L33:
	movl	-1068(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %edi
	call	fMakeModFact
	movl	-1068(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %edi
	call	fMakeModFactR
	movl	$0, -1052(%rbp)
	movl	$0, -1056(%rbp)
	jmp	.L35
.L36:
	movl	-1064(%rbp), %eax
	movl	%eax, -1048(%rbp)
	movl	-1068(%rbp), %eax
	subl	$1, %eax
	subl	-1056(%rbp), %eax
	movl	-1064(%rbp), %edx
	subl	$1, %edx
	movl	%eax, %esi
	movl	%edx, %edi
	call	fGetModPower
	movl	%eax, -1044(%rbp)
	movl	-1044(%rbp), %edx
	movl	-1048(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModMulti
	movl	%eax, -1048(%rbp)
	movl	-1068(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-1056(%rbp), %eax
	movl	%eax, %esi
	movl	%edx, %edi
	call	fGetModnCk
	movl	%eax, -1044(%rbp)
	movl	-1044(%rbp), %edx
	movl	-1048(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModMulti
	movl	%eax, -1048(%rbp)
	movl	-1048(%rbp), %edx
	movl	-1052(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModSum
	movl	%eax, -1052(%rbp)
	addl	$1, -1056(%rbp)
.L35:
	movl	-1060(%rbp), %eax
	cmpl	%eax, -1056(%rbp)
	jle	.L36
	movl	-1052(%rbp), %eax
.L37:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L38
	call	__stack_chk_fail@PLT
.L38:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	fMain, .-fMain
	.section	.rodata
.LC2:
	.string	"%d\n"
	.text
	.globl	fOne
	.type	fOne, @function
fOne:
.LFB14:
	.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	.L41
	call	__stack_chk_fail@PLT
.L41:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	fOne, .-fOne
	.globl	main
	.type	main, @function
main:
.LFB15:
	.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
.LFE15:
	.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:
