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)
#define D_SIZE_MAX		1005									// 最大サイズ

// 内部変数
static FILE *szpFpI;											// 入力
static int siRCnt, siCCnt;										// 行数・列数
static int si1RMax[D_SIZE_MAX];									// 行内最大値
static int si1CMax[D_SIZE_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降順
int
fSortFncId(
	const void *pzpVal1			// <I> 値１
	, const void *pzpVal2		// <I> 値２
)
{
	int *lipVal1 = (int *)pzpVal1;
	int *lipVal2 = (int *)pzpVal2;

	// int降順
	if (*lipVal1 > *lipVal2) {
		return -1;
	}
	else if (*lipVal1 < *lipVal2) {
		return 1;
	}

	return 0;
}

// 配列 - 重複カット
int
fCutDpl(
	int *pipArray				// <IO> 配列
	, int *pipACnt				// <IO> 配列数
)
{
	int i;
	int liTo = 1;
	int liDCnt = 0;
	for (i = 1; i < *pipACnt; i++) {
		if (pipArray[i] != pipArray[liTo - 1]) {
			pipArray[liTo] = pipArray[i];
			liTo++;
		}
		else {
			liDCnt++;
		}
	}

	*pipACnt -= liDCnt;

	return liDCnt;
}

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

// データ - 取得
int
fGetData(
	int *pipArray				// <IO> 配列
	, int piACnt				// <I> 配列数
)
{
	int i;
	char lc1Buf[1024];

	// データ - 取得
	for (i = 0; i < piACnt; i++) {
		fscanf(szpFpI, "%d", &pipArray[i]);
	}
	fgets(lc1Buf, sizeof(lc1Buf), szpFpI);

	// ソート
	qsort(pipArray, piACnt, sizeof(int), fSortFncId);

	// 重複カット
	int liACnt = piACnt;
	fCutDpl(pipArray, &liACnt);
	if (liACnt != piACnt) {
		return -1;
	}

	// 番兵
	pipArray[piACnt] = 0;

	return 0;
}

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

	// 行数・列数 - 取得
	fgets(lc1Buf, sizeof(lc1Buf), szpFpI);
	sscanf(lc1Buf, "%d%d", &siRCnt, &siCCnt);
	int liMCnt = siRCnt * siCCnt;

	// 行内最大値 - 取得
	liRet = fGetData(si1RMax, siRCnt);
	if (liRet != 0) {
		return 0;
	}

	// 列内最大値 - 取得
	liRet = fGetData(si1CMax, siCCnt);
	if (liRet != 0) {
		return 0;
	}

	// パターン数 - 取得
	int liPCnt = 1;
	int liRNo = 0;
	int liCNo = 0;
	for (i = liMCnt; i >= 1; i--) {
		if (si1RMax[liRNo] == i) {
			liRNo++;

			// マス確定
			if (si1CMax[liCNo] == i) {
				liCNo++;
			}

			// 新行内
			else {
				liPCnt = fGetModMulti(liPCnt, liCNo);
			}
		}
		else {

			// 新列内
			if (si1CMax[liCNo] == i) {
				liCNo++;
				liPCnt = fGetModMulti(liPCnt, liRNo);
			}

			// 既存行列内
			else {
				int liVal = liCNo * liRNo - liMCnt + i;
				liPCnt = fGetModMulti(liPCnt, liVal);
			}
		}
	}

	return liPCnt;
}

// １回実行
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	siRCnt
	.comm	siRCnt,4,4
	.local	siCCnt
	.comm	siCCnt,4,4
	.local	si1RMax
	.comm	si1RMax,4020,32
	.local	si1CMax
	.comm	si1CMax,4020,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	fSortFncId
	.type	fSortFncId, @function
fSortFncId:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jle	.L5
	movl	$-1, %eax
	jmp	.L6
.L5:
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L7
	movl	$1, %eax
	jmp	.L6
.L7:
	movl	$0, %eax
.L6:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	fSortFncId, .-fSortFncId
	.globl	fCutDpl
	.type	fCutDpl, @function
fCutDpl:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	$1, -8(%rbp)
	movl	$0, -4(%rbp)
	movl	$1, -12(%rbp)
	jmp	.L9
.L12:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	-4(%rax), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	je	.L10
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	addl	$1, -8(%rbp)
	jmp	.L11
.L10:
	addl	$1, -4(%rbp)
.L11:
	addl	$1, -12(%rbp)
.L9:
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L12
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	subl	-4(%rbp), %eax
	movl	%eax, %edx
	movq	-32(%rbp), %rax
	movl	%edx, (%rax)
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	fCutDpl, .-fCutDpl
	.globl	fGetModMulti
	.type	fGetModMulti, @function
fGetModMulti:
.LFB9:
	.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
.LFE9:
	.size	fGetModMulti, .-fGetModMulti
	.section	.rodata
.LC1:
	.string	"%d"
	.text
	.globl	fGetData
	.type	fGetData, @function
fGetData:
.LFB10:
	.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	%rdi, -1064(%rbp)
	movl	%esi, -1068(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -1044(%rbp)
	jmp	.L17
.L18:
	movl	-1044(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-1064(%rbp), %rax
	addq	%rax, %rdx
	movq	szpFpI(%rip), %rax
	leaq	.LC1(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_fscanf@PLT
	addl	$1, -1044(%rbp)
.L17:
	movl	-1044(%rbp), %eax
	cmpl	-1068(%rbp), %eax
	jl	.L18
	movq	szpFpI(%rip), %rdx
	leaq	-1040(%rbp), %rax
	movl	$1024, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	movl	-1068(%rbp), %eax
	movslq	%eax, %rsi
	movq	-1064(%rbp), %rax
	leaq	fSortFncId(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	-1068(%rbp), %eax
	movl	%eax, -1048(%rbp)
	leaq	-1048(%rbp), %rdx
	movq	-1064(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	fCutDpl
	movl	-1048(%rbp), %eax
	cmpl	%eax, -1068(%rbp)
	je	.L19
	movl	$-1, %eax
	jmp	.L21
.L19:
	movl	-1068(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-1064(%rbp), %rax
	addq	%rdx, %rax
	movl	$0, (%rax)
	movl	$0, %eax
.L21:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	fGetData, .-fGetData
	.section	.rodata
.LC2:
	.string	"%d%d"
	.text
	.globl	fMain
	.type	fMain, @function
fMain:
.LFB11:
	.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	-1040(%rbp), %rax
	leaq	siCCnt(%rip), %rdx
	movq	%rdx, %rcx
	leaq	siRCnt(%rip), %rdx
	leaq	.LC2(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	siRCnt(%rip), %edx
	movl	siCCnt(%rip), %eax
	imull	%edx, %eax
	movl	%eax, -1052(%rbp)
	movl	siRCnt(%rip), %eax
	movl	%eax, %esi
	leaq	si1RMax(%rip), %rax
	movq	%rax, %rdi
	call	fGetData
	movl	%eax, -1048(%rbp)
	cmpl	$0, -1048(%rbp)
	je	.L24
	movl	$0, %eax
	jmp	.L33
.L24:
	movl	siCCnt(%rip), %eax
	movl	%eax, %esi
	leaq	si1CMax(%rip), %rax
	movq	%rax, %rdi
	call	fGetData
	movl	%eax, -1048(%rbp)
	cmpl	$0, -1048(%rbp)
	je	.L26
	movl	$0, %eax
	jmp	.L33
.L26:
	movl	$1, -1064(%rbp)
	movl	$0, -1060(%rbp)
	movl	$0, -1056(%rbp)
	movl	-1052(%rbp), %eax
	movl	%eax, -1068(%rbp)
	jmp	.L27
.L32:
	movl	-1060(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	si1RMax(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -1068(%rbp)
	jne	.L28
	addl	$1, -1060(%rbp)
	movl	-1056(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	si1CMax(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -1068(%rbp)
	jne	.L29
	addl	$1, -1056(%rbp)
	jmp	.L30
.L29:
	movl	-1056(%rbp), %edx
	movl	-1064(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModMulti
	movl	%eax, -1064(%rbp)
	jmp	.L30
.L28:
	movl	-1056(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	si1CMax(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -1068(%rbp)
	jne	.L31
	addl	$1, -1056(%rbp)
	movl	-1060(%rbp), %edx
	movl	-1064(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModMulti
	movl	%eax, -1064(%rbp)
	jmp	.L30
.L31:
	movl	-1056(%rbp), %eax
	imull	-1060(%rbp), %eax
	subl	-1052(%rbp), %eax
	movl	%eax, %edx
	movl	-1068(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -1044(%rbp)
	movl	-1044(%rbp), %edx
	movl	-1064(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModMulti
	movl	%eax, -1064(%rbp)
.L30:
	subl	$1, -1068(%rbp)
.L27:
	cmpl	$0, -1068(%rbp)
	jg	.L32
	movl	-1064(%rbp), %eax
.L33:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L34
	call	__stack_chk_fail@PLT
.L34:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	fMain, .-fMain
	.section	.rodata
.LC3:
	.string	"%d\n"
	.text
	.globl	fOne
	.type	fOne, @function
fOne:
.LFB12:
	.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	.LC3(%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	.L37
	call	__stack_chk_fail@PLT
.L37:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	fOne, .-fOne
	.globl	main
	.type	main, @function
main:
.LFB13:
	.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
.LFE13:
	.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
	.globl	fSortFncId
	.type	fSortFncId, @function
fSortFncId:
.LFB52:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	cmpl	%eax, (%rdi)
	movl	$-1, %edx
	setl	%al
	movzbl	%al, %eax
	cmovg	%edx, %eax
	ret
	.cfi_endproc
.LFE52:
	.size	fSortFncId, .-fSortFncId
	.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	fCutDpl
	.type	fCutDpl, @function
fCutDpl:
.LFB53:
	.cfi_startproc
	endbr64
	movl	(%rsi), %r8d
	cmpl	$1, %r8d
	jle	.L13
	movl	$1, %eax
	xorl	%r10d, %r10d
	movl	$1, %r9d
	movl	$1, %ecx
.L12:
	movl	(%rdi,%rax,4), %edx
	cmpl	-4(%rdi,%rcx,4), %edx
	je	.L9
.L15:
	movl	%edx, (%rdi,%rcx,4)
	movl	(%rsi), %r8d
	addq	$1, %rax
	addl	$1, %r9d
	cmpl	%eax, %r8d
	jle	.L11
	movslq	%r9d, %rcx
	movl	(%rdi,%rax,4), %edx
	cmpl	-4(%rdi,%rcx,4), %edx
	jne	.L15
.L9:
	addq	$1, %rax
	addl	$1, %r10d
	cmpl	%eax, %r8d
	jg	.L12
.L11:
	subl	%r10d, %r8d
	movl	%r10d, %eax
	movl	%r8d, (%rsi)
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	xorl	%r10d, %r10d
	movl	%r8d, (%rsi)
	movl	%r10d, %eax
	ret
	.cfi_endproc
.LFE53:
	.size	fCutDpl, .-fCutDpl
	.p2align 4
	.globl	fGetModMulti
	.type	fGetModMulti, @function
fGetModMulti:
.LFB54:
	.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
.LFE54:
	.size	fGetModMulti, .-fGetModMulti
	.section	.rodata.str1.1
.LC1:
	.string	"%d"
	.text
	.p2align 4
	.globl	fGetData
	.type	fGetData, @function
fGetData:
.LFB55:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	%esi, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rdi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$1048, %rsp
	.cfi_def_cfa_offset 1104
	movq	%fs:40, %rax
	movq	%rax, 1032(%rsp)
	xorl	%eax, %eax
	testl	%esi, %esi
	jle	.L18
	leal	-1(%rsi), %eax
	leaq	4(%rdi), %rbx
	movq	%rdi, %rbp
	leaq	(%rbx,%rax,4), %r15
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L19:
	movq	szpFpI(%rip), %rdi
	movq	%rbp, %rdx
	movq	%r13, %rsi
	xorl	%eax, %eax
	addq	$4, %rbp
	call	__isoc99_fscanf@PLT
	cmpq	%rbp, %r15
	jne	.L19
	movq	szpFpI(%rip), %rdx
	movq	%rsp, %rdi
	movl	$1024, %esi
	movslq	%r14d, %rbp
	call	fgets@PLT
	movl	$4, %edx
	movq	%rbp, %rsi
	movq	%r12, %rdi
	leaq	fSortFncId(%rip), %rcx
	call	qsort@PLT
	cmpl	$1, %r14d
	jle	.L20
	leal	-2(%r14), %edx
	movq	%rbx, %rax
	xorl	%r8d, %r8d
	movl	$1, %esi
	leaq	8(%r12,%rdx,4), %rdi
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L35:
	addq	$4, %rax
	movl	%ecx, (%r12,%rdx,4)
	addl	$1, %esi
	cmpq	%rax, %rdi
	je	.L34
.L23:
	movslq	%esi, %rdx
	movl	(%rax), %ecx
	cmpl	-4(%r12,%rdx,4), %ecx
	jne	.L35
	addq	$4, %rax
	addl	$1, %r8d
	cmpq	%rax, %rdi
	jne	.L23
.L34:
	movl	$-1, %eax
	testl	%r8d, %r8d
	jne	.L17
.L20:
	movl	$0, (%r12,%rbp,4)
	xorl	%eax, %eax
.L17:
	movq	1032(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L36
	addq	$1048, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L18:
	.cfi_restore_state
	movq	szpFpI(%rip), %rdx
	movq	%rsp, %rdi
	movl	$1024, %esi
	movslq	%r14d, %rbp
	call	fgets@PLT
	movl	$4, %edx
	movq	%rbp, %rsi
	movq	%r12, %rdi
	leaq	fSortFncId(%rip), %rcx
	call	qsort@PLT
	jmp	.L20
.L36:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE55:
	.size	fGetData, .-fGetData
	.section	.rodata.str1.1
.LC2:
	.string	"%d%d"
	.text
	.p2align 4
	.globl	fMain
	.type	fMain, @function
fMain:
.LFB56:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movl	$1024, %esi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	si1RMax(%rip), %rbx
	subq	$1048, %rsp
	.cfi_def_cfa_offset 1088
	movq	szpFpI(%rip), %rdx
	movq	%fs:40, %rax
	movq	%rax, 1032(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	movq	%rbp, %rdi
	call	fgets@PLT
	leaq	.LC2(%rip), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	leaq	siCCnt(%rip), %rcx
	leaq	siRCnt(%rip), %rdx
	call	__isoc99_sscanf@PLT
	movl	siRCnt(%rip), %r12d
	movq	%rbx, %rdi
	movl	siCCnt(%rip), %r13d
	movl	%r12d, %esi
	call	fGetData
	testl	%eax, %eax
	je	.L38
.L40:
	xorl	%eax, %eax
.L37:
	movq	1032(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L52
	addq	$1048, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L38:
	.cfi_restore_state
	movl	siCCnt(%rip), %esi
	leaq	si1CMax(%rip), %rbp
	movq	%rbp, %rdi
	call	fGetData
	movl	%eax, %edi
	testl	%eax, %eax
	jne	.L40
	movl	%r12d, %r9d
	imull	%r13d, %r9d
	testl	%r9d, %r9d
	jle	.L47
	xorl	%r8d, %r8d
	movl	%r9d, %esi
	movl	$1, %eax
	movabsq	$-8543223828751151131, %r10
	jmp	.L45
	.p2align 4,,10
	.p2align 3
.L41:
	cltq
	cmpl	%r11d, %esi
	je	.L53
	movl	%edi, %edx
	imull	%r8d, %edx
	subl	%r9d, %edx
	addl	%esi, %edx
	movslq	%edx, %rdx
.L51:
	movq	%rdx, %rcx
.L50:
	imulq	%rax, %rcx
	movq	%rcx, %rax
	imulq	%r10
	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
.L43:
	subl	$1, %esi
	je	.L37
.L45:
	movslq	%r8d, %rcx
	movslq	%edi, %rdx
	movl	0(%rbp,%rcx,4), %r11d
	cmpl	(%rbx,%rdx,4), %esi
	jne	.L41
	addl	$1, %edi
	cmpl	%r11d, %esi
	je	.L54
	cltq
	jmp	.L50
	.p2align 4,,10
	.p2align 3
.L53:
	addl	$1, %r8d
	jmp	.L51
	.p2align 4,,10
	.p2align 3
.L54:
	addl	$1, %r8d
	jmp	.L43
	.p2align 4,,10
	.p2align 3
.L47:
	movl	$1, %eax
	jmp	.L37
.L52:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE56:
	.size	fMain, .-fMain
	.section	.rodata.str1.1
.LC3:
	.string	"%d\n"
	.text
	.p2align 4
	.globl	fOne
	.type	fOne, @function
fOne:
.LFB57:
	.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	.L58
	addq	$1040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L58:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE57:
	.size	fOne, .-fOne
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB58:
	.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
.LFE58:
	.size	main, .-main
	.local	si1CMax
	.comm	si1CMax,4020,32
	.local	si1RMax
	.comm	si1RMax,4020,32
	.local	siCCnt
	.comm	siCCnt,4,4
	.local	siRCnt
	.comm	siRCnt,4,4
	.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
	.globl	fSortFncId
	.type	fSortFncId, @function
fSortFncId:
.LFB52:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	cmpl	%eax, (%rdi)
	movl	$-1, %edx
	setl	%al
	movzbl	%al, %eax
	cmovg	%edx, %eax
	ret
	.cfi_endproc
.LFE52:
	.size	fSortFncId, .-fSortFncId
	.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	fCutDpl
	.type	fCutDpl, @function
fCutDpl:
.LFB53:
	.cfi_startproc
	endbr64
	movl	(%rsi), %r8d
	cmpl	$1, %r8d
	jle	.L13
	movl	$1, %eax
	xorl	%r10d, %r10d
	movl	$1, %r9d
	movl	$1, %ecx
.L12:
	movl	(%rdi,%rax,4), %edx
	cmpl	-4(%rdi,%rcx,4), %edx
	je	.L9
.L15:
	movl	%edx, (%rdi,%rcx,4)
	movl	(%rsi), %r8d
	addq	$1, %rax
	addl	$1, %r9d
	cmpl	%eax, %r8d
	jle	.L11
	movslq	%r9d, %rcx
	movl	(%rdi,%rax,4), %edx
	cmpl	-4(%rdi,%rcx,4), %edx
	jne	.L15
.L9:
	addq	$1, %rax
	addl	$1, %r10d
	cmpl	%eax, %r8d
	jg	.L12
.L11:
	subl	%r10d, %r8d
	movl	%r10d, %eax
	movl	%r8d, (%rsi)
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	xorl	%r10d, %r10d
	movl	%r8d, (%rsi)
	movl	%r10d, %eax
	ret
	.cfi_endproc
.LFE53:
	.size	fCutDpl, .-fCutDpl
	.p2align 4
	.globl	fGetModMulti
	.type	fGetModMulti, @function
fGetModMulti:
.LFB54:
	.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
.LFE54:
	.size	fGetModMulti, .-fGetModMulti
	.section	.rodata.str1.1
.LC1:
	.string	"%d"
	.text
	.p2align 4
	.globl	fGetData
	.type	fGetData, @function
fGetData:
.LFB55:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	%esi, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rdi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$1048, %rsp
	.cfi_def_cfa_offset 1104
	movq	%fs:40, %rax
	movq	%rax, 1032(%rsp)
	xorl	%eax, %eax
	testl	%esi, %esi
	jle	.L18
	leal	-1(%rsi), %eax
	leaq	4(%rdi), %rbx
	movq	%rdi, %rbp
	leaq	(%rbx,%rax,4), %r15
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L19:
	movq	szpFpI(%rip), %rdi
	movq	%rbp, %rdx
	movq	%r13, %rsi
	xorl	%eax, %eax
	addq	$4, %rbp
	call	__isoc99_fscanf@PLT
	cmpq	%rbp, %r15
	jne	.L19
	movq	szpFpI(%rip), %rdx
	movq	%rsp, %rdi
	movl	$1024, %esi
	movslq	%r14d, %rbp
	call	fgets@PLT
	movl	$4, %edx
	movq	%rbp, %rsi
	movq	%r12, %rdi
	leaq	fSortFncId(%rip), %rcx
	call	qsort@PLT
	cmpl	$1, %r14d
	jle	.L20
	leal	-2(%r14), %edx
	movq	%rbx, %rax
	xorl	%r8d, %r8d
	movl	$1, %esi
	leaq	8(%r12,%rdx,4), %rdi
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L35:
	addq	$4, %rax
	movl	%ecx, (%r12,%rdx,4)
	addl	$1, %esi
	cmpq	%rax, %rdi
	je	.L34
.L23:
	movslq	%esi, %rdx
	movl	(%rax), %ecx
	cmpl	-4(%r12,%rdx,4), %ecx
	jne	.L35
	addq	$4, %rax
	addl	$1, %r8d
	cmpq	%rax, %rdi
	jne	.L23
.L34:
	movl	$-1, %eax
	testl	%r8d, %r8d
	jne	.L17
.L20:
	movl	$0, (%r12,%rbp,4)
	xorl	%eax, %eax
.L17:
	movq	1032(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L36
	addq	$1048, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L18:
	.cfi_restore_state
	movq	szpFpI(%rip), %rdx
	movq	%rsp, %rdi
	movl	$1024, %esi
	movslq	%r14d, %rbp
	call	fgets@PLT
	movl	$4, %edx
	movq	%rbp, %rsi
	movq	%r12, %rdi
	leaq	fSortFncId(%rip), %rcx
	call	qsort@PLT
	jmp	.L20
.L36:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE55:
	.size	fGetData, .-fGetData
	.section	.rodata.str1.1
.LC2:
	.string	"%d%d"
	.text
	.p2align 4
	.globl	fMain
	.type	fMain, @function
fMain:
.LFB56:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movl	$1024, %esi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	si1RMax(%rip), %rbx
	subq	$1048, %rsp
	.cfi_def_cfa_offset 1088
	movq	szpFpI(%rip), %rdx
	movq	%fs:40, %rax
	movq	%rax, 1032(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	movq	%rbp, %rdi
	call	fgets@PLT
	leaq	.LC2(%rip), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	leaq	siCCnt(%rip), %rcx
	leaq	siRCnt(%rip), %rdx
	call	__isoc99_sscanf@PLT
	movl	siRCnt(%rip), %r12d
	movq	%rbx, %rdi
	movl	siCCnt(%rip), %r13d
	movl	%r12d, %esi
	call	fGetData
	testl	%eax, %eax
	je	.L38
.L40:
	xorl	%eax, %eax
.L37:
	movq	1032(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L52
	addq	$1048, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L38:
	.cfi_restore_state
	movl	siCCnt(%rip), %esi
	leaq	si1CMax(%rip), %rbp
	movq	%rbp, %rdi
	call	fGetData
	movl	%eax, %edi
	testl	%eax, %eax
	jne	.L40
	movl	%r12d, %r9d
	imull	%r13d, %r9d
	testl	%r9d, %r9d
	jle	.L47
	xorl	%r8d, %r8d
	movl	%r9d, %esi
	movl	$1, %eax
	movabsq	$-8543223828751151131, %r10
	jmp	.L45
	.p2align 4,,10
	.p2align 3
.L41:
	cltq
	cmpl	%r11d, %esi
	je	.L53
	movl	%edi, %edx
	imull	%r8d, %edx
	subl	%r9d, %edx
	addl	%esi, %edx
	movslq	%edx, %rdx
.L51:
	movq	%rdx, %rcx
.L50:
	imulq	%rax, %rcx
	movq	%rcx, %rax
	imulq	%r10
	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
.L43:
	subl	$1, %esi
	je	.L37
.L45:
	movslq	%r8d, %rcx
	movslq	%edi, %rdx
	movl	0(%rbp,%rcx,4), %r11d
	cmpl	(%rbx,%rdx,4), %esi
	jne	.L41
	addl	$1, %edi
	cmpl	%r11d, %esi
	je	.L54
	cltq
	jmp	.L50
	.p2align 4,,10
	.p2align 3
.L53:
	addl	$1, %r8d
	jmp	.L51
	.p2align 4,,10
	.p2align 3
.L54:
	addl	$1, %r8d
	jmp	.L43
	.p2align 4,,10
	.p2align 3
.L47:
	movl	$1, %eax
	jmp	.L37
.L52:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE56:
	.size	fMain, .-fMain
	.section	.rodata.str1.1
.LC3:
	.string	"%d\n"
	.text
	.p2align 4
	.globl	fOne
	.type	fOne, @function
fOne:
.LFB57:
	.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	.L58
	addq	$1040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L58:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE57:
	.size	fOne, .-fOne
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB58:
	.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
.LFE58:
	.size	main, .-main
	.local	si1CMax
	.comm	si1CMax,4020,32
	.local	si1RMax
	.comm	si1RMax,4020,32
	.local	siCCnt
	.comm	siCCnt,4,4
	.local	siRCnt
	.comm	siRCnt,4,4
	.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)
#define D_SIZE_MAX		1005									// 最大サイズ

// 内部変数
static FILE *szpFpI;											// 入力
static int siRCnt, siCCnt;										// 行数・列数
static int si1RMax[D_SIZE_MAX];									// 行内最大値
static int si1CMax[D_SIZE_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降順
int
fSortFncId(
	const void *pzpVal1			// <I> 値１
	, const void *pzpVal2		// <I> 値２
)
{
	int *lipVal1 = (int *)pzpVal1;
	int *lipVal2 = (int *)pzpVal2;

	// int降順
	if (*lipVal1 > *lipVal2) {
		return -1;
	}
	else if (*lipVal1 < *lipVal2) {
		return 1;
	}

	return 0;
}

// 配列 - 重複カット
int
fCutDpl(
	int *pipArray				// <IO> 配列
	, int *pipACnt				// <IO> 配列数
)
{
	int i;
	int liTo = 1;
	int liDCnt = 0;
	for (i = 1; i < *pipACnt; i++) {
		if (pipArray[i] != pipArray[liTo - 1]) {
			pipArray[liTo] = pipArray[i];
			liTo++;
		}
		else {
			liDCnt++;
		}
	}

	*pipACnt -= liDCnt;

	return liDCnt;
}

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

// データ - 取得
int
fGetData(
	int *pipArray				// <IO> 配列
	, int piACnt				// <I> 配列数
)
{
	int i;
	char lc1Buf[1024];

	// データ - 取得
	for (i = 0; i < piACnt; i++) {
		fscanf(szpFpI, "%d", &pipArray[i]);
	}
	fgets(lc1Buf, sizeof(lc1Buf), szpFpI);

	// ソート
	qsort(pipArray, piACnt, sizeof(int), fSortFncId);

	// 重複カット
	int liACnt = piACnt;
	fCutDpl(pipArray, &liACnt);
	if (liACnt != piACnt) {
		return -1;
	}

	// 番兵
	pipArray[piACnt] = 0;

	return 0;
}

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

	// 行数・列数 - 取得
	fgets(lc1Buf, sizeof(lc1Buf), szpFpI);
	sscanf(lc1Buf, "%d%d", &siRCnt, &siCCnt);
	int liMCnt = siRCnt * siCCnt;

	// 行内最大値 - 取得
	liRet = fGetData(si1RMax, siRCnt);
	if (liRet != 0) {
		return 0;
	}

	// 列内最大値 - 取得
	liRet = fGetData(si1CMax, siCCnt);
	if (liRet != 0) {
		return 0;
	}

	// パターン数 - 取得
	int liPCnt = 1;
	int liRNo = 0;
	int liCNo = 0;
	for (i = liMCnt; i >= 1; i--) {
		if (si1RMax[liRNo] == i) {
			liRNo++;

			// マス確定
			if (si1CMax[liCNo] == i) {
				liCNo++;
			}

			// 新行内
			else {
				liPCnt = fGetModMulti(liPCnt, liCNo);
			}
		}
		else {

			// 新列内
			if (si1CMax[liCNo] == i) {
				liCNo++;
				liPCnt = fGetModMulti(liPCnt, liRNo);
			}

			// 既存行列内
			else {
				int liVal = liCNo * liRNo - liMCnt + i;
				liPCnt = fGetModMulti(liPCnt, liVal);
			}
		}
	}

	return liPCnt;
}

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


3 3
5 9 2
3 6 9
 0 2
4 3
3 4
 14 13
158 167 181 147 178 151 179 182 176 169 180 129 175 168
181 73 178 179 167 180 176 169 182 177 175 159 173
 2 2
6 4
4 4
 3 3
5 9 2
0 6 9
 2 2
6 4
5 4
 0 2
8 3
3 4
 3 3
5 9 2
0 8 9
 2 2
6 1
5 4
 0 2
8 3
3 0

0
 1
 146891838
 0
 0
 0
 1
 0
 0
 1

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)
#define D_SIZE_MAX		1005									// 最大サイズ

// 内部変数
static FILE *szpFpI;											// 入力
static int siRCnt, siCCnt;										// 行数・列数
static int si1RMax[D_SIZE_MAX];									// 行内最大値
static int si1CMax[D_SIZE_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降順
int
fSortFncId(
	const void *pzpVal1			// <I> 値１
	, const void *pzpVal2		// <I> 値２
)
{
	int *lipVal1 = (int *)pzpVal1;
	int *lipVal2 = (int *)pzpVal2;

	// int降順
	if (*lipVal1 > *lipVal2) {
		return -1;
	}
	else if (*lipVal1 < *lipVal2) {
		return 1;
	}

	return 0;
}

// 配列 - 重複カット
int
fCutDpl(
	int *pipArray				// <IO> 配列
	, int *pipACnt				// <IO> 配列数
)
{
	int i;
	int liTo = 1;
	int liDCnt = 0;
	for (i = 1; i < *pipACnt; i++) {
		if (pipArray[i] != pipArray[liTo - 1]) {
			pipArray[liTo] = pipArray[i];
			liTo++;
		}
		else {
			liDCnt++;
		}
	}

	*pipACnt -= liDCnt;

	return liDCnt;
}

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

// データ - 取得
int
fGetData(
	int *pipArray				// <IO> 配列
	, int piACnt				// <I> 配列数
)
{
	int i;
	char lc1Buf[1024];

	// データ - 取得
	for (i = 0; i < piACnt; i++) {
		fscanf(szpFpI, "%d", &pipArray[i]);
	}
	fgets(lc1Buf, sizeof(lc1Buf), szpFpI);

	// ソート
	qsort(pipArray, piACnt, sizeof(int), fSortFncId);

	// 重複カット
	int liACnt = piACnt;
	fCutDpl(pipArray, &liACnt);
	if (liACnt != piACnt) {
		return -1;
	}

	// 番兵
	pipArray[piACnt] = 0;

	return 0;
}

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

	// 行数・列数 - 取得
	fgets(lc1Buf, sizeof(lc1Buf), szpFpI);
	sscanf(lc1Buf, "%d%d", &siRCnt, &siCCnt);
	int liMCnt = siRCnt * siCCnt;

	// 行内最大値 - 取得
	liRet = fGetData(si1RMax, siRCnt);
	if (liRet != 0) {
		return 0;
	}

	// 列内最大値 - 取得
	liRet = fGetData(si1CMax, siCCnt);
	if (liRet != 0) {
		return 0;
	}

	// パターン数 - 取得
	int liPCnt = 1;
	int liRNo = 0;
	int liCNo = 0;
	for (i = liMCnt; i >= 1; i--) {
		if (si1RMax[liRNo] == i) {
			liRNo++;

			// マス確定
			if (si1CMax[liCNo] == i) {
				liCNo++;
			}

			// 新行内
			else {
				liPCnt = fGetModMulti(liPCnt, liCNo);
			}
		}
		else {

			// 新列内
			if (si1CMax[liCNo] == i) {
				liCNo++;
				liPCnt = fGetModMulti(liPCnt, liRNo);
			}

			// 既存行列内
			else {
				int liVal = liCNo * liRNo - liMCnt + i;
				liPCnt = fGetModMulti(liPCnt, liVal);
			}
		}
	}

	return liPCnt;
}

// １回実行
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	siRCnt
	.comm	siRCnt,4,4
	.local	siCCnt
	.comm	siCCnt,4,4
	.local	si1RMax
	.comm	si1RMax,4020,32
	.local	si1CMax
	.comm	si1CMax,4020,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	fSortFncId
	.type	fSortFncId, @function
fSortFncId:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jle	.L5
	movl	$-1, %eax
	jmp	.L6
.L5:
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L7
	movl	$1, %eax
	jmp	.L6
.L7:
	movl	$0, %eax
.L6:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	fSortFncId, .-fSortFncId
	.globl	fCutDpl
	.type	fCutDpl, @function
fCutDpl:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	$1, -8(%rbp)
	movl	$0, -4(%rbp)
	movl	$1, -12(%rbp)
	jmp	.L9
.L12:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	-4(%rax), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	je	.L10
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	addl	$1, -8(%rbp)
	jmp	.L11
.L10:
	addl	$1, -4(%rbp)
.L11:
	addl	$1, -12(%rbp)
.L9:
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L12
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	subl	-4(%rbp), %eax
	movl	%eax, %edx
	movq	-32(%rbp), %rax
	movl	%edx, (%rax)
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	fCutDpl, .-fCutDpl
	.globl	fGetModMulti
	.type	fGetModMulti, @function
fGetModMulti:
.LFB9:
	.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
.LFE9:
	.size	fGetModMulti, .-fGetModMulti
	.section	.rodata
.LC1:
	.string	"%d"
	.text
	.globl	fGetData
	.type	fGetData, @function
fGetData:
.LFB10:
	.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	%rdi, -1064(%rbp)
	movl	%esi, -1068(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -1044(%rbp)
	jmp	.L17
.L18:
	movl	-1044(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-1064(%rbp), %rax
	addq	%rax, %rdx
	movq	szpFpI(%rip), %rax
	leaq	.LC1(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_fscanf@PLT
	addl	$1, -1044(%rbp)
.L17:
	movl	-1044(%rbp), %eax
	cmpl	-1068(%rbp), %eax
	jl	.L18
	movq	szpFpI(%rip), %rdx
	leaq	-1040(%rbp), %rax
	movl	$1024, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	movl	-1068(%rbp), %eax
	movslq	%eax, %rsi
	movq	-1064(%rbp), %rax
	leaq	fSortFncId(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	-1068(%rbp), %eax
	movl	%eax, -1048(%rbp)
	leaq	-1048(%rbp), %rdx
	movq	-1064(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	fCutDpl
	movl	-1048(%rbp), %eax
	cmpl	%eax, -1068(%rbp)
	je	.L19
	movl	$-1, %eax
	jmp	.L21
.L19:
	movl	-1068(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-1064(%rbp), %rax
	addq	%rdx, %rax
	movl	$0, (%rax)
	movl	$0, %eax
.L21:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	fGetData, .-fGetData
	.section	.rodata
.LC2:
	.string	"%d%d"
	.text
	.globl	fMain
	.type	fMain, @function
fMain:
.LFB11:
	.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	-1040(%rbp), %rax
	leaq	siCCnt(%rip), %rdx
	movq	%rdx, %rcx
	leaq	siRCnt(%rip), %rdx
	leaq	.LC2(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	siRCnt(%rip), %edx
	movl	siCCnt(%rip), %eax
	imull	%edx, %eax
	movl	%eax, -1052(%rbp)
	movl	siRCnt(%rip), %eax
	movl	%eax, %esi
	leaq	si1RMax(%rip), %rax
	movq	%rax, %rdi
	call	fGetData
	movl	%eax, -1048(%rbp)
	cmpl	$0, -1048(%rbp)
	je	.L24
	movl	$0, %eax
	jmp	.L33
.L24:
	movl	siCCnt(%rip), %eax
	movl	%eax, %esi
	leaq	si1CMax(%rip), %rax
	movq	%rax, %rdi
	call	fGetData
	movl	%eax, -1048(%rbp)
	cmpl	$0, -1048(%rbp)
	je	.L26
	movl	$0, %eax
	jmp	.L33
.L26:
	movl	$1, -1064(%rbp)
	movl	$0, -1060(%rbp)
	movl	$0, -1056(%rbp)
	movl	-1052(%rbp), %eax
	movl	%eax, -1068(%rbp)
	jmp	.L27
.L32:
	movl	-1060(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	si1RMax(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -1068(%rbp)
	jne	.L28
	addl	$1, -1060(%rbp)
	movl	-1056(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	si1CMax(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -1068(%rbp)
	jne	.L29
	addl	$1, -1056(%rbp)
	jmp	.L30
.L29:
	movl	-1056(%rbp), %edx
	movl	-1064(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModMulti
	movl	%eax, -1064(%rbp)
	jmp	.L30
.L28:
	movl	-1056(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	si1CMax(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -1068(%rbp)
	jne	.L31
	addl	$1, -1056(%rbp)
	movl	-1060(%rbp), %edx
	movl	-1064(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModMulti
	movl	%eax, -1064(%rbp)
	jmp	.L30
.L31:
	movl	-1056(%rbp), %eax
	imull	-1060(%rbp), %eax
	subl	-1052(%rbp), %eax
	movl	%eax, %edx
	movl	-1068(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -1044(%rbp)
	movl	-1044(%rbp), %edx
	movl	-1064(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModMulti
	movl	%eax, -1064(%rbp)
.L30:
	subl	$1, -1068(%rbp)
.L27:
	cmpl	$0, -1068(%rbp)
	jg	.L32
	movl	-1064(%rbp), %eax
.L33:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L34
	call	__stack_chk_fail@PLT
.L34:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	fMain, .-fMain
	.section	.rodata
.LC3:
	.string	"%d\n"
	.text
	.globl	fOne
	.type	fOne, @function
fOne:
.LFB12:
	.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	.LC3(%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	.L37
	call	__stack_chk_fail@PLT
.L37:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	fOne, .-fOne
	.globl	main
	.type	main, @function
main:
.LFB13:
	.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
.LFE13:
	.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	siRCnt
	.comm	siRCnt,4,4
	.local	siCCnt
	.comm	siCCnt,4,4
	.local	si1RMax
	.comm	si1RMax,4020,32
	.local	si1CMax
	.comm	si1CMax,4020,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	fSortFncId
	.type	fSortFncId, @function
fSortFncId:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jle	.L5
	movl	$-1, %eax
	jmp	.L6
.L5:
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L7
	movl	$1, %eax
	jmp	.L6
.L7:
	movl	$0, %eax
.L6:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	fSortFncId, .-fSortFncId
	.globl	fCutDpl
	.type	fCutDpl, @function
fCutDpl:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	$1, -8(%rbp)
	movl	$0, -4(%rbp)
	movl	$1, -12(%rbp)
	jmp	.L9
.L12:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	-4(%rax), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	je	.L10
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	addl	$1, -8(%rbp)
	jmp	.L11
.L10:
	addl	$1, -4(%rbp)
.L11:
	addl	$1, -12(%rbp)
.L9:
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L12
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	subl	-4(%rbp), %eax
	movl	%eax, %edx
	movq	-32(%rbp), %rax
	movl	%edx, (%rax)
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	fCutDpl, .-fCutDpl
	.globl	fGetModMulti
	.type	fGetModMulti, @function
fGetModMulti:
.LFB9:
	.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
.LFE9:
	.size	fGetModMulti, .-fGetModMulti
	.section	.rodata
.LC1:
	.string	"%d"
	.text
	.globl	fGetData
	.type	fGetData, @function
fGetData:
.LFB10:
	.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	%rdi, -1064(%rbp)
	movl	%esi, -1068(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -1044(%rbp)
	jmp	.L17
.L18:
	movl	-1044(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-1064(%rbp), %rax
	addq	%rax, %rdx
	movq	szpFpI(%rip), %rax
	leaq	.LC1(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_fscanf@PLT
	addl	$1, -1044(%rbp)
.L17:
	movl	-1044(%rbp), %eax
	cmpl	-1068(%rbp), %eax
	jl	.L18
	movq	szpFpI(%rip), %rdx
	leaq	-1040(%rbp), %rax
	movl	$1024, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	movl	-1068(%rbp), %eax
	movslq	%eax, %rsi
	movq	-1064(%rbp), %rax
	leaq	fSortFncId(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	-1068(%rbp), %eax
	movl	%eax, -1048(%rbp)
	leaq	-1048(%rbp), %rdx
	movq	-1064(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	fCutDpl
	movl	-1048(%rbp), %eax
	cmpl	%eax, -1068(%rbp)
	je	.L19
	movl	$-1, %eax
	jmp	.L21
.L19:
	movl	-1068(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-1064(%rbp), %rax
	addq	%rdx, %rax
	movl	$0, (%rax)
	movl	$0, %eax
.L21:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	fGetData, .-fGetData
	.section	.rodata
.LC2:
	.string	"%d%d"
	.text
	.globl	fMain
	.type	fMain, @function
fMain:
.LFB11:
	.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	-1040(%rbp), %rax
	leaq	siCCnt(%rip), %rdx
	movq	%rdx, %rcx
	leaq	siRCnt(%rip), %rdx
	leaq	.LC2(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	siRCnt(%rip), %edx
	movl	siCCnt(%rip), %eax
	imull	%edx, %eax
	movl	%eax, -1052(%rbp)
	movl	siRCnt(%rip), %eax
	movl	%eax, %esi
	leaq	si1RMax(%rip), %rax
	movq	%rax, %rdi
	call	fGetData
	movl	%eax, -1048(%rbp)
	cmpl	$0, -1048(%rbp)
	je	.L24
	movl	$0, %eax
	jmp	.L33
.L24:
	movl	siCCnt(%rip), %eax
	movl	%eax, %esi
	leaq	si1CMax(%rip), %rax
	movq	%rax, %rdi
	call	fGetData
	movl	%eax, -1048(%rbp)
	cmpl	$0, -1048(%rbp)
	je	.L26
	movl	$0, %eax
	jmp	.L33
.L26:
	movl	$1, -1064(%rbp)
	movl	$0, -1060(%rbp)
	movl	$0, -1056(%rbp)
	movl	-1052(%rbp), %eax
	movl	%eax, -1068(%rbp)
	jmp	.L27
.L32:
	movl	-1060(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	si1RMax(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -1068(%rbp)
	jne	.L28
	addl	$1, -1060(%rbp)
	movl	-1056(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	si1CMax(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -1068(%rbp)
	jne	.L29
	addl	$1, -1056(%rbp)
	jmp	.L30
.L29:
	movl	-1056(%rbp), %edx
	movl	-1064(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModMulti
	movl	%eax, -1064(%rbp)
	jmp	.L30
.L28:
	movl	-1056(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	si1CMax(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -1068(%rbp)
	jne	.L31
	addl	$1, -1056(%rbp)
	movl	-1060(%rbp), %edx
	movl	-1064(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModMulti
	movl	%eax, -1064(%rbp)
	jmp	.L30
.L31:
	movl	-1056(%rbp), %eax
	imull	-1060(%rbp), %eax
	subl	-1052(%rbp), %eax
	movl	%eax, %edx
	movl	-1068(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -1044(%rbp)
	movl	-1044(%rbp), %edx
	movl	-1064(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetModMulti
	movl	%eax, -1064(%rbp)
.L30:
	subl	$1, -1068(%rbp)
.L27:
	cmpl	$0, -1068(%rbp)
	jg	.L32
	movl	-1064(%rbp), %eax
.L33:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L34
	call	__stack_chk_fail@PLT
.L34:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	fMain, .-fMain
	.section	.rodata
.LC3:
	.string	"%d\n"
	.text
	.globl	fOne
	.type	fOne, @function
fOne:
.LFB12:
	.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	.LC3(%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	.L37
	call	__stack_chk_fail@PLT
.L37:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	fOne, .-fOne
	.globl	main
	.type	main, @function
main:
.LFB13:
	.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
.LFE13:
	.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:
