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_SIZE_MAX		300000									// 最大サイズ

// 内部構造体 - 座標情報
typedef struct Point {
	int miX, miY;												// 座標
} Point;

// 内部構造体 - 個数情報
typedef struct Cnt {
	int miCnt;													// 個数
	int miPos;													// 位置
} Cnt;

// 内部変数
static FILE *szpFpI;											// 入力
static int siW, siH;											// 幅・高さ
static Point sz1Point[D_SIZE_MAX];								// 座標
static int siPCnt;												// 座標数
static Cnt sz1CntX[D_SIZE_MAX];									// 個数[X]
static Cnt sz1CntY[D_SIZE_MAX];									// 個数[Y]

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

// 比較関数 - 座標昇順
int
fCmpFncXY(
	const void *pzpVal1			// <I> 値１
	, const void *pzpVal2		// <I> 値２
)
{
	Point *lzpVal1 = (Point *)pzpVal1;
	Point *lzpVal2 = (Point *)pzpVal2;

	// 座標昇順
	if (lzpVal1->miX > lzpVal2->miX) {
		return 1;
	}
	else if (lzpVal1->miX < lzpVal2->miX) {
		return -1;
	}
	if (lzpVal1->miY > lzpVal2->miY) {
		return 1;
	}
	else if (lzpVal1->miY < lzpVal2->miY) {
		return -1;
	}

	return 0;
}

// 比較関数 - 個数降順
int
fCmpFncCd(
	const void *pzpVal1			// <I> 値１
	, const void *pzpVal2		// <I> 値２
)
{
	Cnt *lzpVal1 = (Cnt *)pzpVal1;
	Cnt *lzpVal2 = (Cnt *)pzpVal2;

	// 個数降順
	if (lzpVal1->miCnt > lzpVal2->miCnt) {
		return -1;
	}
	else if (lzpVal1->miCnt < lzpVal2->miCnt) {
		return 1;
	}

	return 0;
}

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

	// データ - 初期化
	memset(sz1CntX, 0, sizeof(sz1CntX));
	memset(sz1CntY, 0, sizeof(sz1CntY));

	// 幅・高さ・座標数 - 取得
	fgets(lc1Buf, sizeof(lc1Buf), szpFpI);
	sscanf(lc1Buf, "%d%d%d", &siH, &siW, &siPCnt);

	// 個数 - 初期化
	for (i = 0; i < siW; i++) {
		sz1CntX[i].miPos = i;
	}
	for (i = 0; i < siH; i++) {
		sz1CntY[i].miPos = i;
	}

	// 座標 - 取得
	for (i = 0; i < siPCnt; i++) {
		fgets(lc1Buf, sizeof(lc1Buf), szpFpI);
		sscanf(lc1Buf, "%d%d", &sz1Point[i].miY, &sz1Point[i].miX);
		sz1Point[i].miX--;
		sz1Point[i].miY--;

		// 個数 - 加算
		sz1CntX[sz1Point[i].miX].miCnt++;
		sz1CntY[sz1Point[i].miY].miCnt++;
	}

	// ソート
	qsort(sz1Point, siPCnt, sizeof(Point), fCmpFncXY);
	qsort(sz1CntX, siW, sizeof(Cnt), fCmpFncCd);
	qsort(sz1CntY, siH, sizeof(Cnt), fCmpFncCd);

	// XY最大数
	int liMaxX = sz1CntX[0].miCnt;
	int liMaxY = sz1CntY[0].miCnt;

	// 最大数 - 取得
	int liMax = 0;
	for (i = 0; sz1CntX[i].miCnt == liMaxX; i++) {
		for (j = 0; sz1CntY[j].miCnt == liMaxY && j <= liMaxX; j++) {

			// 個数
			int liCnt = liMaxX + liMaxY;

			// 同一有無
			Point lzPoint;
			lzPoint.miX = sz1CntX[i].miPos;
			lzPoint.miY = sz1CntY[j].miPos;
			Point *lzpPoint = (Point *)bsearch(&lzPoint, sz1Point, siPCnt, sizeof(Point), fCmpFncXY);
			if (lzpPoint != NULL) {
				liCnt--;
			}

			// 最大数 - 更新
			liMax = fGetMaxI(liMax, liCnt);
		}
	}

	return liMax;
}

// １回実行
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	siW
	.comm	siW,4,4
	.local	siH
	.comm	siH,4,4
	.local	sz1Point
	.comm	sz1Point,2400000,32
	.local	siPCnt
	.comm	siPCnt,4,4
	.local	sz1CntX
	.comm	sz1CntX,2400000,32
	.local	sz1CntY
	.comm	sz1CntY,2400000,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	fGetMaxI
	.type	fGetMaxI, @function
fGetMaxI:
.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), %eax
	cmpl	-8(%rbp), %eax
	jle	.L5
	movl	-4(%rbp), %eax
	jmp	.L6
.L5:
	movl	-8(%rbp), %eax
.L6:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	fGetMaxI, .-fGetMaxI
	.globl	fCmpFncXY
	.type	fCmpFncXY, @function
fCmpFncXY:
.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)
	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	.L8
	movl	$1, %eax
	jmp	.L9
.L8:
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L10
	movl	$-1, %eax
	jmp	.L9
.L10:
	movq	-16(%rbp), %rax
	movl	4(%rax), %edx
	movq	-8(%rbp), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jle	.L11
	movl	$1, %eax
	jmp	.L9
.L11:
	movq	-16(%rbp), %rax
	movl	4(%rax), %edx
	movq	-8(%rbp), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L12
	movl	$-1, %eax
	jmp	.L9
.L12:
	movl	$0, %eax
.L9:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	fCmpFncXY, .-fCmpFncXY
	.globl	fCmpFncCd
	.type	fCmpFncCd, @function
fCmpFncCd:
.LFB9:
	.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	.L14
	movl	$-1, %eax
	jmp	.L15
.L14:
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L16
	movl	$1, %eax
	jmp	.L15
.L16:
	movl	$0, %eax
.L15:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	fCmpFncCd, .-fCmpFncCd
	.section	.rodata
.LC1:
	.string	"%d%d%d"
.LC2:
	.string	"%d%d"
	.text
	.globl	fMain
	.type	fMain, @function
fMain:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1088, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$2400000, %edx
	movl	$0, %esi
	leaq	sz1CntX(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$2400000, %edx
	movl	$0, %esi
	leaq	sz1CntY(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movq	szpFpI(%rip), %rdx
	leaq	-1040(%rbp), %rax
	movl	$1024, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	leaq	-1040(%rbp), %rax
	leaq	siPCnt(%rip), %r8
	leaq	siW(%rip), %rdx
	movq	%rdx, %rcx
	leaq	siH(%rip), %rdx
	leaq	.LC1(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	$0, -1080(%rbp)
	jmp	.L18
.L19:
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+sz1CntX(%rip), %rdx
	movl	-1080(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -1080(%rbp)
.L18:
	movl	siW(%rip), %eax
	cmpl	%eax, -1080(%rbp)
	jl	.L19
	movl	$0, -1080(%rbp)
	jmp	.L20
.L21:
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+sz1CntY(%rip), %rdx
	movl	-1080(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -1080(%rbp)
.L20:
	movl	siH(%rip), %eax
	cmpl	%eax, -1080(%rbp)
	jl	.L21
	movl	$0, -1080(%rbp)
	jmp	.L22
.L23:
	movq	szpFpI(%rip), %rdx
	leaq	-1040(%rbp), %rax
	movl	$1024, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sz1Point(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sz1Point(%rip), %rax
	addq	%rdx, %rax
	leaq	4(%rax), %rdx
	leaq	-1040(%rbp), %rax
	leaq	.LC2(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sz1Point(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sz1Point(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+sz1Point(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+sz1Point(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sz1Point(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	sz1CntX(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sz1CntX(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+sz1Point(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	sz1CntY(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sz1CntY(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -1080(%rbp)
.L22:
	movl	siPCnt(%rip), %eax
	cmpl	%eax, -1080(%rbp)
	jl	.L23
	movl	siPCnt(%rip), %eax
	cltq
	leaq	fCmpFncXY(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	sz1Point(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	siW(%rip), %eax
	cltq
	leaq	fCmpFncCd(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	sz1CntX(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	siH(%rip), %eax
	cltq
	leaq	fCmpFncCd(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	sz1CntY(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	sz1CntX(%rip), %eax
	movl	%eax, -1064(%rbp)
	movl	sz1CntY(%rip), %eax
	movl	%eax, -1060(%rbp)
	movl	$0, -1072(%rbp)
	movl	$0, -1080(%rbp)
	jmp	.L24
.L29:
	movl	$0, -1076(%rbp)
	jmp	.L25
.L28:
	movl	-1064(%rbp), %edx
	movl	-1060(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -1068(%rbp)
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+sz1CntX(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -1048(%rbp)
	movl	-1076(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+sz1CntY(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -1044(%rbp)
	movl	siPCnt(%rip), %eax
	movslq	%eax, %rdx
	leaq	-1048(%rbp), %rax
	leaq	fCmpFncXY(%rip), %r8
	movl	$8, %ecx
	leaq	sz1Point(%rip), %rsi
	movq	%rax, %rdi
	call	bsearch@PLT
	movq	%rax, -1056(%rbp)
	cmpq	$0, -1056(%rbp)
	je	.L26
	subl	$1, -1068(%rbp)
.L26:
	movl	-1068(%rbp), %edx
	movl	-1072(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetMaxI
	movl	%eax, -1072(%rbp)
	addl	$1, -1076(%rbp)
.L25:
	movl	-1076(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sz1CntY(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -1060(%rbp)
	jne	.L27
	movl	-1076(%rbp), %eax
	cmpl	-1064(%rbp), %eax
	jle	.L28
.L27:
	addl	$1, -1080(%rbp)
.L24:
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sz1CntX(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -1064(%rbp)
	je	.L29
	movl	-1072(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	fMain, .-fMain
	.section	.rodata
.LC3:
	.string	"%d\n"
	.text
	.globl	fOne
	.type	fOne, @function
fOne:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1056, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	stdin(%rip), %rax
	movq	%rax, szpFpI(%rip)
	movl	$0, %eax
	call	fMain
	movl	%eax, -1044(%rbp)
	movl	-1044(%rbp), %edx
	leaq	-1040(%rbp), %rax
	leaq	.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	.L34
	call	__stack_chk_fail@PLT
.L34:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	fOne, .-fOne
	.globl	main
	.type	main, @function
main:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, %eax
	call	fOne
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.p2align 4
	.globl	fCmpFncCd
	.type	fCmpFncCd, @function
fCmpFncCd:
.LFB54:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	cmpl	%eax, (%rdi)
	movl	$-1, %edx
	setl	%al
	movzbl	%al, %eax
	cmovg	%edx, %eax
	ret
	.cfi_endproc
.LFE54:
	.size	fCmpFncCd, .-fCmpFncCd
	.p2align 4
	.globl	fCmpFncXY
	.type	fCmpFncXY, @function
fCmpFncXY:
.LFB53:
	.cfi_startproc
	endbr64
	movl	(%rsi), %edx
	movl	$1, %eax
	cmpl	%edx, (%rdi)
	jg	.L5
	movl	$-1, %eax
	jl	.L5
	movl	4(%rsi), %ecx
	movl	$1, %eax
	cmpl	%ecx, 4(%rdi)
	jg	.L5
	setl	%al
	movzbl	%al, %eax
	negl	%eax
.L5:
	ret
	.cfi_endproc
.LFE53:
	.size	fCmpFncXY, .-fCmpFncXY
	.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	fGetMaxI
	.type	fGetMaxI, @function
fGetMaxI:
.LFB52:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovge	%edi, %eax
	ret
	.cfi_endproc
.LFE52:
	.size	fGetMaxI, .-fGetMaxI
	.section	.rodata.str1.1
.LC1:
	.string	"%d%d%d"
.LC2:
	.string	"%d%d"
	.text
	.p2align 4
	.globl	fMain
	.type	fMain, @function
fMain:
.LFB55:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$2400000, %edx
	xorl	%esi, %esi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	sz1CntX(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %rdi
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	sz1CntY(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$1064, %rsp
	.cfi_def_cfa_offset 1120
	movq	%fs:40, %rax
	movq	%rax, 1048(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r13
	call	memset@PLT
	movl	$2400000, %edx
	xorl	%esi, %esi
	movq	%rbp, %rdi
	call	memset@PLT
	movq	szpFpI(%rip), %rdx
	movl	$1024, %esi
	movq	%r13, %rdi
	call	fgets@PLT
	leaq	siW(%rip), %rcx
	movq	%r13, %rdi
	xorl	%eax, %eax
	leaq	siH(%rip), %rdx
	leaq	siPCnt(%rip), %r8
	leaq	.LC1(%rip), %rsi
	call	__isoc99_sscanf@PLT
	movslq	siW(%rip), %rcx
	xorl	%eax, %eax
	leaq	4(%r14), %rdx
	testl	%ecx, %ecx
	jle	.L18
	.p2align 4,,10
	.p2align 3
.L17:
	movl	%eax, (%rdx,%rax,8)
	addq	$1, %rax
	cmpq	%rcx, %rax
	jne	.L17
.L18:
	movslq	siH(%rip), %rcx
	xorl	%eax, %eax
	leaq	4+sz1CntY(%rip), %rdx
	testl	%ecx, %ecx
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L21:
	movl	%eax, (%rdx,%rax,8)
	addq	$1, %rax
	cmpq	%rcx, %rax
	jne	.L21
.L16:
	movl	siPCnt(%rip), %eax
	leaq	sz1Point(%rip), %rbx
	xorl	%r15d, %r15d
	movq	%rbx, %r12
	testl	%eax, %eax
	jle	.L20
	.p2align 4,,10
	.p2align 3
.L22:
	movq	szpFpI(%rip), %rdx
	movl	$1024, %esi
	movq	%r13, %rdi
	addl	$1, %r15d
	call	fgets@PLT
	leaq	4(%r12), %rdx
	movq	%r12, %rcx
	movq	%r13, %rdi
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	addq	$8, %r12
	call	__isoc99_sscanf@PLT
	movq	-8(%r12), %xmm0
	movq	.LC3(%rip), %xmm1
	paddd	%xmm1, %xmm0
	pshufd	$0xe5, %xmm0, %xmm2
	movd	%xmm2, %eax
	movd	%xmm0, %edx
	movq	%xmm0, -8(%r12)
	cltq
	movslq	%edx, %rdx
	addl	$1, 0(%rbp,%rax,8)
	movl	siPCnt(%rip), %eax
	addl	$1, (%r14,%rdx,8)
	cmpl	%r15d, %eax
	jg	.L22
.L20:
	movslq	%eax, %rsi
	leaq	fCmpFncXY(%rip), %rcx
	movl	$8, %edx
	movq	%rbx, %rdi
	call	qsort@PLT
	leaq	fCmpFncCd(%rip), %r12
	movq	%r14, %rdi
	movslq	siW(%rip), %rsi
	movq	%r12, %rcx
	movl	$8, %edx
	leaq	-4+sz1CntY(%rip), %r14
	call	qsort@PLT
	movq	%r12, %rcx
	movl	$8, %edx
	movq	%rbp, %rdi
	movslq	siH(%rip), %rsi
	call	qsort@PLT
	movl	sz1CntX(%rip), %r12d
	movl	sz1CntY(%rip), %r13d
	xorl	%r10d, %r10d
	leaq	4+sz1CntX(%rip), %rax
	movq	%rax, 8(%rsp)
	leal	(%r12,%r13), %eax
	movl	%eax, 4(%rsp)
	leal	-1(%rax), %r15d
	.p2align 4,,10
	.p2align 3
.L23:
	testl	%r12d, %r12d
	js	.L31
	movq	8(%rsp), %rax
	movslq	siPCnt(%rip), %r11
	movl	$1, %r9d
	movl	(%rax), %edi
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L47:
	jg	.L35
	cmpl	4(%rcx), %r8d
	jg	.L25
	jl	.L35
	movl	%r15d, %eax
.L24:
	cmpl	%eax, %r10d
	cmovl	%eax, %r10d
	cmpl	%r13d, 0(%rbp,%r9,8)
	sete	%dl
	cmpl	%r9d, %r12d
	setge	%al
	addq	$1, %r9
	testb	%al, %dl
	je	.L31
.L28:
	movl	(%r14,%r9,8), %r8d
	testq	%r11, %r11
	je	.L33
	movq	%r11, %rsi
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L27:
	leaq	(%rdx,%rsi), %rax
	shrq	%rax
	leaq	(%rbx,%rax,8), %rcx
	cmpl	%edi, (%rcx)
	jge	.L47
.L25:
	leaq	1(%rax), %rdx
.L26:
	cmpq	%rdx, %rsi
	ja	.L27
.L33:
	movl	4(%rsp), %eax
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L35:
	movq	%rax, %rsi
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L31:
	addq	$8, 8(%rsp)
	movq	8(%rsp), %rax
	cmpl	%r12d, -4(%rax)
	je	.L23
	movq	1048(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L48
	addq	$1064, %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
.L48:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE55:
	.size	fMain, .-fMain
	.section	.rodata.str1.1
.LC4:
	.string	"%d\n"
	.text
	.p2align 4
	.globl	fOne
	.type	fOne, @function
fOne:
.LFB56:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	subq	$1040, %rsp
	.cfi_def_cfa_offset 1056
	movq	%fs:40, %rax
	movq	%rax, 1032(%rsp)
	movq	stdin(%rip), %rax
	movq	%rsp, %r12
	movq	%rax, szpFpI(%rip)
	xorl	%eax, %eax
	call	fMain
	movl	$1024, %edx
	movq	%r12, %rdi
	movl	$1, %esi
	movl	%eax, %r8d
	leaq	.LC4(%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	.L52
	addq	$1040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L52:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE56:
	.size	fOne, .-fOne
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB57:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	call	fOne
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE57:
	.size	main, .-main
	.local	sz1CntY
	.comm	sz1CntY,2400000,32
	.local	sz1CntX
	.comm	sz1CntX,2400000,32
	.local	siPCnt
	.comm	siPCnt,4,4
	.local	sz1Point
	.comm	sz1Point,2400000,32
	.local	siH
	.comm	siH,4,4
	.local	siW
	.comm	siW,4,4
	.local	szpFpI
	.comm	szpFpI,8,8
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC3:
	.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
	.globl	fCmpFncCd
	.type	fCmpFncCd, @function
fCmpFncCd:
.LFB54:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	cmpl	%eax, (%rdi)
	movl	$-1, %edx
	setl	%al
	movzbl	%al, %eax
	cmovg	%edx, %eax
	ret
	.cfi_endproc
.LFE54:
	.size	fCmpFncCd, .-fCmpFncCd
	.p2align 4
	.globl	fCmpFncXY
	.type	fCmpFncXY, @function
fCmpFncXY:
.LFB53:
	.cfi_startproc
	endbr64
	movl	(%rsi), %edx
	movl	$1, %eax
	cmpl	%edx, (%rdi)
	jg	.L5
	movl	$-1, %eax
	jl	.L5
	movl	4(%rsi), %ecx
	movl	$1, %eax
	cmpl	%ecx, 4(%rdi)
	jg	.L5
	setl	%al
	movzbl	%al, %eax
	negl	%eax
.L5:
	ret
	.cfi_endproc
.LFE53:
	.size	fCmpFncXY, .-fCmpFncXY
	.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	fGetMaxI
	.type	fGetMaxI, @function
fGetMaxI:
.LFB52:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovge	%edi, %eax
	ret
	.cfi_endproc
.LFE52:
	.size	fGetMaxI, .-fGetMaxI
	.section	.rodata.str1.1
.LC1:
	.string	"%d%d%d"
.LC2:
	.string	"%d%d"
	.text
	.p2align 4
	.globl	fMain
	.type	fMain, @function
fMain:
.LFB55:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$2400000, %edx
	xorl	%esi, %esi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	sz1CntX(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %rdi
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	sz1CntY(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$1064, %rsp
	.cfi_def_cfa_offset 1120
	movq	%fs:40, %rax
	movq	%rax, 1048(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r13
	call	memset@PLT
	movl	$2400000, %edx
	xorl	%esi, %esi
	movq	%rbp, %rdi
	call	memset@PLT
	movq	szpFpI(%rip), %rdx
	movl	$1024, %esi
	movq	%r13, %rdi
	call	fgets@PLT
	leaq	siW(%rip), %rcx
	movq	%r13, %rdi
	xorl	%eax, %eax
	leaq	siH(%rip), %rdx
	leaq	siPCnt(%rip), %r8
	leaq	.LC1(%rip), %rsi
	call	__isoc99_sscanf@PLT
	movslq	siW(%rip), %rcx
	xorl	%eax, %eax
	leaq	4(%r14), %rdx
	testl	%ecx, %ecx
	jle	.L18
	.p2align 4,,10
	.p2align 3
.L17:
	movl	%eax, (%rdx,%rax,8)
	addq	$1, %rax
	cmpq	%rcx, %rax
	jne	.L17
.L18:
	movslq	siH(%rip), %rcx
	xorl	%eax, %eax
	leaq	4+sz1CntY(%rip), %rdx
	testl	%ecx, %ecx
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L21:
	movl	%eax, (%rdx,%rax,8)
	addq	$1, %rax
	cmpq	%rcx, %rax
	jne	.L21
.L16:
	movl	siPCnt(%rip), %eax
	leaq	sz1Point(%rip), %rbx
	xorl	%r15d, %r15d
	movq	%rbx, %r12
	testl	%eax, %eax
	jle	.L20
	.p2align 4,,10
	.p2align 3
.L22:
	movq	szpFpI(%rip), %rdx
	movl	$1024, %esi
	movq	%r13, %rdi
	addl	$1, %r15d
	call	fgets@PLT
	leaq	4(%r12), %rdx
	movq	%r12, %rcx
	movq	%r13, %rdi
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	addq	$8, %r12
	call	__isoc99_sscanf@PLT
	movq	-8(%r12), %xmm0
	movq	.LC3(%rip), %xmm1
	paddd	%xmm1, %xmm0
	pshufd	$0xe5, %xmm0, %xmm2
	movd	%xmm2, %eax
	movd	%xmm0, %edx
	movq	%xmm0, -8(%r12)
	cltq
	movslq	%edx, %rdx
	addl	$1, 0(%rbp,%rax,8)
	movl	siPCnt(%rip), %eax
	addl	$1, (%r14,%rdx,8)
	cmpl	%r15d, %eax
	jg	.L22
.L20:
	movslq	%eax, %rsi
	leaq	fCmpFncXY(%rip), %rcx
	movl	$8, %edx
	movq	%rbx, %rdi
	call	qsort@PLT
	leaq	fCmpFncCd(%rip), %r12
	movq	%r14, %rdi
	movslq	siW(%rip), %rsi
	movq	%r12, %rcx
	movl	$8, %edx
	leaq	-4+sz1CntY(%rip), %r14
	call	qsort@PLT
	movq	%r12, %rcx
	movl	$8, %edx
	movq	%rbp, %rdi
	movslq	siH(%rip), %rsi
	call	qsort@PLT
	movl	sz1CntX(%rip), %r12d
	movl	sz1CntY(%rip), %r13d
	xorl	%r10d, %r10d
	leaq	4+sz1CntX(%rip), %rax
	movq	%rax, 8(%rsp)
	leal	(%r12,%r13), %eax
	movl	%eax, 4(%rsp)
	leal	-1(%rax), %r15d
	.p2align 4,,10
	.p2align 3
.L23:
	testl	%r12d, %r12d
	js	.L31
	movq	8(%rsp), %rax
	movslq	siPCnt(%rip), %r11
	movl	$1, %r9d
	movl	(%rax), %edi
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L47:
	jg	.L35
	cmpl	4(%rcx), %r8d
	jg	.L25
	jl	.L35
	movl	%r15d, %eax
.L24:
	cmpl	%eax, %r10d
	cmovl	%eax, %r10d
	cmpl	%r13d, 0(%rbp,%r9,8)
	sete	%dl
	cmpl	%r9d, %r12d
	setge	%al
	addq	$1, %r9
	testb	%al, %dl
	je	.L31
.L28:
	movl	(%r14,%r9,8), %r8d
	testq	%r11, %r11
	je	.L33
	movq	%r11, %rsi
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L27:
	leaq	(%rdx,%rsi), %rax
	shrq	%rax
	leaq	(%rbx,%rax,8), %rcx
	cmpl	%edi, (%rcx)
	jge	.L47
.L25:
	leaq	1(%rax), %rdx
.L26:
	cmpq	%rdx, %rsi
	ja	.L27
.L33:
	movl	4(%rsp), %eax
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L35:
	movq	%rax, %rsi
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L31:
	addq	$8, 8(%rsp)
	movq	8(%rsp), %rax
	cmpl	%r12d, -4(%rax)
	je	.L23
	movq	1048(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L48
	addq	$1064, %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
.L48:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE55:
	.size	fMain, .-fMain
	.section	.rodata.str1.1
.LC4:
	.string	"%d\n"
	.text
	.p2align 4
	.globl	fOne
	.type	fOne, @function
fOne:
.LFB56:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	subq	$1040, %rsp
	.cfi_def_cfa_offset 1056
	movq	%fs:40, %rax
	movq	%rax, 1032(%rsp)
	movq	stdin(%rip), %rax
	movq	%rsp, %r12
	movq	%rax, szpFpI(%rip)
	xorl	%eax, %eax
	call	fMain
	movl	$1024, %edx
	movq	%r12, %rdi
	movl	$1, %esi
	movl	%eax, %r8d
	leaq	.LC4(%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	.L52
	addq	$1040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L52:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE56:
	.size	fOne, .-fOne
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB57:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	call	fOne
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE57:
	.size	main, .-main
	.local	sz1CntY
	.comm	sz1CntY,2400000,32
	.local	sz1CntX
	.comm	sz1CntX,2400000,32
	.local	siPCnt
	.comm	siPCnt,4,4
	.local	sz1Point
	.comm	sz1Point,2400000,32
	.local	siH
	.comm	siH,4,4
	.local	siW
	.comm	siW,4,4
	.local	szpFpI
	.comm	szpFpI,8,8
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC3:
	.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_SIZE_MAX		300000									// 最大サイズ

// 内部構造体 - 座標情報
typedef struct Point {
	int miX, miY;												// 座標
} Point;

// 内部構造体 - 個数情報
typedef struct Cnt {
	int miCnt;													// 個数
	int miPos;													// 位置
} Cnt;

// 内部変数
static FILE *szpFpI;											// 入力
static int siW, siH;											// 幅・高さ
static Point sz1Point[D_SIZE_MAX];								// 座標
static int siPCnt;												// 座標数
static Cnt sz1CntX[D_SIZE_MAX];									// 個数[X]
static Cnt sz1CntY[D_SIZE_MAX];									// 個数[Y]

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

// 比較関数 - 座標昇順
int
fCmpFncXY(
	const void *pzpVal1			// <I> 値１
	, const void *pzpVal2		// <I> 値２
)
{
	Point *lzpVal1 = (Point *)pzpVal1;
	Point *lzpVal2 = (Point *)pzpVal2;

	// 座標昇順
	if (lzpVal1->miX > lzpVal2->miX) {
		return 1;
	}
	else if (lzpVal1->miX < lzpVal2->miX) {
		return -1;
	}
	if (lzpVal1->miY > lzpVal2->miY) {
		return 1;
	}
	else if (lzpVal1->miY < lzpVal2->miY) {
		return -1;
	}

	return 0;
}

// 比較関数 - 個数降順
int
fCmpFncCd(
	const void *pzpVal1			// <I> 値１
	, const void *pzpVal2		// <I> 値２
)
{
	Cnt *lzpVal1 = (Cnt *)pzpVal1;
	Cnt *lzpVal2 = (Cnt *)pzpVal2;

	// 個数降順
	if (lzpVal1->miCnt > lzpVal2->miCnt) {
		return -1;
	}
	else if (lzpVal1->miCnt < lzpVal2->miCnt) {
		return 1;
	}

	return 0;
}

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

	// データ - 初期化
	memset(sz1CntX, 0, sizeof(sz1CntX));
	memset(sz1CntY, 0, sizeof(sz1CntY));

	// 幅・高さ・座標数 - 取得
	fgets(lc1Buf, sizeof(lc1Buf), szpFpI);
	sscanf(lc1Buf, "%d%d%d", &siH, &siW, &siPCnt);

	// 個数 - 初期化
	for (i = 0; i < siW; i++) {
		sz1CntX[i].miPos = i;
	}
	for (i = 0; i < siH; i++) {
		sz1CntY[i].miPos = i;
	}

	// 座標 - 取得
	for (i = 0; i < siPCnt; i++) {
		fgets(lc1Buf, sizeof(lc1Buf), szpFpI);
		sscanf(lc1Buf, "%d%d", &sz1Point[i].miY, &sz1Point[i].miX);
		sz1Point[i].miX--;
		sz1Point[i].miY--;

		// 個数 - 加算
		sz1CntX[sz1Point[i].miX].miCnt++;
		sz1CntY[sz1Point[i].miY].miCnt++;
	}

	// ソート
	qsort(sz1Point, siPCnt, sizeof(Point), fCmpFncXY);
	qsort(sz1CntX, siW, sizeof(Cnt), fCmpFncCd);
	qsort(sz1CntY, siH, sizeof(Cnt), fCmpFncCd);

	// XY最大数
	int liMaxX = sz1CntX[0].miCnt;
	int liMaxY = sz1CntY[0].miCnt;

	// 最大数 - 取得
	int liMax = 0;
	for (i = 0; sz1CntX[i].miCnt == liMaxX; i++) {
		for (j = 0; sz1CntY[j].miCnt == liMaxY && j <= liMaxX; j++) {

			// 個数
			int liCnt = liMaxX + liMaxY;

			// 同一有無
			Point lzPoint;
			lzPoint.miX = sz1CntX[i].miPos;
			lzPoint.miY = sz1CntY[j].miPos;
			Point *lzpPoint = (Point *)bsearch(&lzPoint, sz1Point, siPCnt, sizeof(Point), fCmpFncXY);
			if (lzpPoint != NULL) {
				liCnt--;
			}

			// 最大数 - 更新
			liMax = fGetMaxI(liMax, liCnt);
		}
	}

	return liMax;
}

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


2 3 3
2 2
1 1
1 2
 5 5 10
2 5
4 5
2 3
5 5
2 2
5 4
5 3
5 1
3 5
1 4
 5 5 10
2 5
4 5
2 3
5 5
2 4
5 4
5 1
1 1
4 5
1 4
 5 5 10
2 5
4 2
2 3
5 5
2 3
5 4
5 1
1 1
4 5
1 4
 6 3 4
1 3
3 1
1 1
1 2
 5 5 10
2 5
4 5
2 1
5 5
2 2
5 4
5 1
5 2
3 5
1 5
 5 5 10
2 5
4 5
2 3
5 5
2 2
5 4
5 1
5 1
3 5
1 4
 5 5 10
2 5
4 5
2 3
5 5
2 4
5 4
5 1
5 1
3 5
1 4
 5 5 10
2 5
4 5
2 3
5 5
2 4
5 4
5 1
5 1
4 5
1 4
 2 3 3
2 1
1 1
1 3

3
 7
 6
 5
 4
 8
 7
 7
 7
 3

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_SIZE_MAX		300000									// 最大サイズ

// 内部構造体 - 座標情報
typedef struct Point {
	int miX, miY;												// 座標
} Point;

// 内部構造体 - 個数情報
typedef struct Cnt {
	int miCnt;													// 個数
	int miPos;													// 位置
} Cnt;

// 内部変数
static FILE *szpFpI;											// 入力
static int siW, siH;											// 幅・高さ
static Point sz1Point[D_SIZE_MAX];								// 座標
static int siPCnt;												// 座標数
static Cnt sz1CntX[D_SIZE_MAX];									// 個数[X]
static Cnt sz1CntY[D_SIZE_MAX];									// 個数[Y]

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

// 比較関数 - 座標昇順
int
fCmpFncXY(
	const void *pzpVal1			// <I> 値１
	, const void *pzpVal2		// <I> 値２
)
{
	Point *lzpVal1 = (Point *)pzpVal1;
	Point *lzpVal2 = (Point *)pzpVal2;

	// 座標昇順
	if (lzpVal1->miX > lzpVal2->miX) {
		return 1;
	}
	else if (lzpVal1->miX < lzpVal2->miX) {
		return -1;
	}
	if (lzpVal1->miY > lzpVal2->miY) {
		return 1;
	}
	else if (lzpVal1->miY < lzpVal2->miY) {
		return -1;
	}

	return 0;
}

// 比較関数 - 個数降順
int
fCmpFncCd(
	const void *pzpVal1			// <I> 値１
	, const void *pzpVal2		// <I> 値２
)
{
	Cnt *lzpVal1 = (Cnt *)pzpVal1;
	Cnt *lzpVal2 = (Cnt *)pzpVal2;

	// 個数降順
	if (lzpVal1->miCnt > lzpVal2->miCnt) {
		return -1;
	}
	else if (lzpVal1->miCnt < lzpVal2->miCnt) {
		return 1;
	}

	return 0;
}

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

	// データ - 初期化
	memset(sz1CntX, 0, sizeof(sz1CntX));
	memset(sz1CntY, 0, sizeof(sz1CntY));

	// 幅・高さ・座標数 - 取得
	fgets(lc1Buf, sizeof(lc1Buf), szpFpI);
	sscanf(lc1Buf, "%d%d%d", &siH, &siW, &siPCnt);

	// 個数 - 初期化
	for (i = 0; i < siW; i++) {
		sz1CntX[i].miPos = i;
	}
	for (i = 0; i < siH; i++) {
		sz1CntY[i].miPos = i;
	}

	// 座標 - 取得
	for (i = 0; i < siPCnt; i++) {
		fgets(lc1Buf, sizeof(lc1Buf), szpFpI);
		sscanf(lc1Buf, "%d%d", &sz1Point[i].miY, &sz1Point[i].miX);
		sz1Point[i].miX--;
		sz1Point[i].miY--;

		// 個数 - 加算
		sz1CntX[sz1Point[i].miX].miCnt++;
		sz1CntY[sz1Point[i].miY].miCnt++;
	}

	// ソート
	qsort(sz1Point, siPCnt, sizeof(Point), fCmpFncXY);
	qsort(sz1CntX, siW, sizeof(Cnt), fCmpFncCd);
	qsort(sz1CntY, siH, sizeof(Cnt), fCmpFncCd);

	// XY最大数
	int liMaxX = sz1CntX[0].miCnt;
	int liMaxY = sz1CntY[0].miCnt;

	// 最大数 - 取得
	int liMax = 0;
	for (i = 0; sz1CntX[i].miCnt == liMaxX; i++) {
		for (j = 0; sz1CntY[j].miCnt == liMaxY && j <= liMaxX; j++) {

			// 個数
			int liCnt = liMaxX + liMaxY;

			// 同一有無
			Point lzPoint;
			lzPoint.miX = sz1CntX[i].miPos;
			lzPoint.miY = sz1CntY[j].miPos;
			Point *lzpPoint = (Point *)bsearch(&lzPoint, sz1Point, siPCnt, sizeof(Point), fCmpFncXY);
			if (lzpPoint != NULL) {
				liCnt--;
			}

			// 最大数 - 更新
			liMax = fGetMaxI(liMax, liCnt);
		}
	}

	return liMax;
}

// １回実行
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	siW
	.comm	siW,4,4
	.local	siH
	.comm	siH,4,4
	.local	sz1Point
	.comm	sz1Point,2400000,32
	.local	siPCnt
	.comm	siPCnt,4,4
	.local	sz1CntX
	.comm	sz1CntX,2400000,32
	.local	sz1CntY
	.comm	sz1CntY,2400000,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	fGetMaxI
	.type	fGetMaxI, @function
fGetMaxI:
.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), %eax
	cmpl	-8(%rbp), %eax
	jle	.L5
	movl	-4(%rbp), %eax
	jmp	.L6
.L5:
	movl	-8(%rbp), %eax
.L6:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	fGetMaxI, .-fGetMaxI
	.globl	fCmpFncXY
	.type	fCmpFncXY, @function
fCmpFncXY:
.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)
	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	.L8
	movl	$1, %eax
	jmp	.L9
.L8:
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L10
	movl	$-1, %eax
	jmp	.L9
.L10:
	movq	-16(%rbp), %rax
	movl	4(%rax), %edx
	movq	-8(%rbp), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jle	.L11
	movl	$1, %eax
	jmp	.L9
.L11:
	movq	-16(%rbp), %rax
	movl	4(%rax), %edx
	movq	-8(%rbp), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L12
	movl	$-1, %eax
	jmp	.L9
.L12:
	movl	$0, %eax
.L9:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	fCmpFncXY, .-fCmpFncXY
	.globl	fCmpFncCd
	.type	fCmpFncCd, @function
fCmpFncCd:
.LFB9:
	.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	.L14
	movl	$-1, %eax
	jmp	.L15
.L14:
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L16
	movl	$1, %eax
	jmp	.L15
.L16:
	movl	$0, %eax
.L15:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	fCmpFncCd, .-fCmpFncCd
	.section	.rodata
.LC1:
	.string	"%d%d%d"
.LC2:
	.string	"%d%d"
	.text
	.globl	fMain
	.type	fMain, @function
fMain:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1088, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$2400000, %edx
	movl	$0, %esi
	leaq	sz1CntX(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$2400000, %edx
	movl	$0, %esi
	leaq	sz1CntY(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movq	szpFpI(%rip), %rdx
	leaq	-1040(%rbp), %rax
	movl	$1024, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	leaq	-1040(%rbp), %rax
	leaq	siPCnt(%rip), %r8
	leaq	siW(%rip), %rdx
	movq	%rdx, %rcx
	leaq	siH(%rip), %rdx
	leaq	.LC1(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	$0, -1080(%rbp)
	jmp	.L18
.L19:
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+sz1CntX(%rip), %rdx
	movl	-1080(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -1080(%rbp)
.L18:
	movl	siW(%rip), %eax
	cmpl	%eax, -1080(%rbp)
	jl	.L19
	movl	$0, -1080(%rbp)
	jmp	.L20
.L21:
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+sz1CntY(%rip), %rdx
	movl	-1080(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -1080(%rbp)
.L20:
	movl	siH(%rip), %eax
	cmpl	%eax, -1080(%rbp)
	jl	.L21
	movl	$0, -1080(%rbp)
	jmp	.L22
.L23:
	movq	szpFpI(%rip), %rdx
	leaq	-1040(%rbp), %rax
	movl	$1024, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sz1Point(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sz1Point(%rip), %rax
	addq	%rdx, %rax
	leaq	4(%rax), %rdx
	leaq	-1040(%rbp), %rax
	leaq	.LC2(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sz1Point(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sz1Point(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+sz1Point(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+sz1Point(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sz1Point(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	sz1CntX(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sz1CntX(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+sz1Point(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	sz1CntY(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sz1CntY(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -1080(%rbp)
.L22:
	movl	siPCnt(%rip), %eax
	cmpl	%eax, -1080(%rbp)
	jl	.L23
	movl	siPCnt(%rip), %eax
	cltq
	leaq	fCmpFncXY(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	sz1Point(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	siW(%rip), %eax
	cltq
	leaq	fCmpFncCd(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	sz1CntX(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	siH(%rip), %eax
	cltq
	leaq	fCmpFncCd(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	sz1CntY(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	sz1CntX(%rip), %eax
	movl	%eax, -1064(%rbp)
	movl	sz1CntY(%rip), %eax
	movl	%eax, -1060(%rbp)
	movl	$0, -1072(%rbp)
	movl	$0, -1080(%rbp)
	jmp	.L24
.L29:
	movl	$0, -1076(%rbp)
	jmp	.L25
.L28:
	movl	-1064(%rbp), %edx
	movl	-1060(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -1068(%rbp)
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+sz1CntX(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -1048(%rbp)
	movl	-1076(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+sz1CntY(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -1044(%rbp)
	movl	siPCnt(%rip), %eax
	movslq	%eax, %rdx
	leaq	-1048(%rbp), %rax
	leaq	fCmpFncXY(%rip), %r8
	movl	$8, %ecx
	leaq	sz1Point(%rip), %rsi
	movq	%rax, %rdi
	call	bsearch@PLT
	movq	%rax, -1056(%rbp)
	cmpq	$0, -1056(%rbp)
	je	.L26
	subl	$1, -1068(%rbp)
.L26:
	movl	-1068(%rbp), %edx
	movl	-1072(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetMaxI
	movl	%eax, -1072(%rbp)
	addl	$1, -1076(%rbp)
.L25:
	movl	-1076(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sz1CntY(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -1060(%rbp)
	jne	.L27
	movl	-1076(%rbp), %eax
	cmpl	-1064(%rbp), %eax
	jle	.L28
.L27:
	addl	$1, -1080(%rbp)
.L24:
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sz1CntX(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -1064(%rbp)
	je	.L29
	movl	-1072(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	fMain, .-fMain
	.section	.rodata
.LC3:
	.string	"%d\n"
	.text
	.globl	fOne
	.type	fOne, @function
fOne:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1056, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	stdin(%rip), %rax
	movq	%rax, szpFpI(%rip)
	movl	$0, %eax
	call	fMain
	movl	%eax, -1044(%rbp)
	movl	-1044(%rbp), %edx
	leaq	-1040(%rbp), %rax
	leaq	.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	.L34
	call	__stack_chk_fail@PLT
.L34:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	fOne, .-fOne
	.globl	main
	.type	main, @function
main:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, %eax
	call	fOne
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.local	szpFpI
	.comm	szpFpI,8,8
	.local	siW
	.comm	siW,4,4
	.local	siH
	.comm	siH,4,4
	.local	sz1Point
	.comm	sz1Point,2400000,32
	.local	siPCnt
	.comm	siPCnt,4,4
	.local	sz1CntX
	.comm	sz1CntX,2400000,32
	.local	sz1CntY
	.comm	sz1CntY,2400000,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	fGetMaxI
	.type	fGetMaxI, @function
fGetMaxI:
.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), %eax
	cmpl	-8(%rbp), %eax
	jle	.L5
	movl	-4(%rbp), %eax
	jmp	.L6
.L5:
	movl	-8(%rbp), %eax
.L6:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	fGetMaxI, .-fGetMaxI
	.globl	fCmpFncXY
	.type	fCmpFncXY, @function
fCmpFncXY:
.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)
	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	.L8
	movl	$1, %eax
	jmp	.L9
.L8:
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L10
	movl	$-1, %eax
	jmp	.L9
.L10:
	movq	-16(%rbp), %rax
	movl	4(%rax), %edx
	movq	-8(%rbp), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jle	.L11
	movl	$1, %eax
	jmp	.L9
.L11:
	movq	-16(%rbp), %rax
	movl	4(%rax), %edx
	movq	-8(%rbp), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L12
	movl	$-1, %eax
	jmp	.L9
.L12:
	movl	$0, %eax
.L9:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	fCmpFncXY, .-fCmpFncXY
	.globl	fCmpFncCd
	.type	fCmpFncCd, @function
fCmpFncCd:
.LFB9:
	.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	.L14
	movl	$-1, %eax
	jmp	.L15
.L14:
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L16
	movl	$1, %eax
	jmp	.L15
.L16:
	movl	$0, %eax
.L15:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	fCmpFncCd, .-fCmpFncCd
	.section	.rodata
.LC1:
	.string	"%d%d%d"
.LC2:
	.string	"%d%d"
	.text
	.globl	fMain
	.type	fMain, @function
fMain:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1088, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$2400000, %edx
	movl	$0, %esi
	leaq	sz1CntX(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$2400000, %edx
	movl	$0, %esi
	leaq	sz1CntY(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movq	szpFpI(%rip), %rdx
	leaq	-1040(%rbp), %rax
	movl	$1024, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	leaq	-1040(%rbp), %rax
	leaq	siPCnt(%rip), %r8
	leaq	siW(%rip), %rdx
	movq	%rdx, %rcx
	leaq	siH(%rip), %rdx
	leaq	.LC1(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	$0, -1080(%rbp)
	jmp	.L18
.L19:
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+sz1CntX(%rip), %rdx
	movl	-1080(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -1080(%rbp)
.L18:
	movl	siW(%rip), %eax
	cmpl	%eax, -1080(%rbp)
	jl	.L19
	movl	$0, -1080(%rbp)
	jmp	.L20
.L21:
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+sz1CntY(%rip), %rdx
	movl	-1080(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -1080(%rbp)
.L20:
	movl	siH(%rip), %eax
	cmpl	%eax, -1080(%rbp)
	jl	.L21
	movl	$0, -1080(%rbp)
	jmp	.L22
.L23:
	movq	szpFpI(%rip), %rdx
	leaq	-1040(%rbp), %rax
	movl	$1024, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sz1Point(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sz1Point(%rip), %rax
	addq	%rdx, %rax
	leaq	4(%rax), %rdx
	leaq	-1040(%rbp), %rax
	leaq	.LC2(%rip), %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sz1Point(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sz1Point(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+sz1Point(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+sz1Point(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sz1Point(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	sz1CntX(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sz1CntX(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+sz1Point(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	sz1CntY(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sz1CntY(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -1080(%rbp)
.L22:
	movl	siPCnt(%rip), %eax
	cmpl	%eax, -1080(%rbp)
	jl	.L23
	movl	siPCnt(%rip), %eax
	cltq
	leaq	fCmpFncXY(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	sz1Point(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	siW(%rip), %eax
	cltq
	leaq	fCmpFncCd(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	sz1CntX(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	siH(%rip), %eax
	cltq
	leaq	fCmpFncCd(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	sz1CntY(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	sz1CntX(%rip), %eax
	movl	%eax, -1064(%rbp)
	movl	sz1CntY(%rip), %eax
	movl	%eax, -1060(%rbp)
	movl	$0, -1072(%rbp)
	movl	$0, -1080(%rbp)
	jmp	.L24
.L29:
	movl	$0, -1076(%rbp)
	jmp	.L25
.L28:
	movl	-1064(%rbp), %edx
	movl	-1060(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -1068(%rbp)
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+sz1CntX(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -1048(%rbp)
	movl	-1076(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+sz1CntY(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -1044(%rbp)
	movl	siPCnt(%rip), %eax
	movslq	%eax, %rdx
	leaq	-1048(%rbp), %rax
	leaq	fCmpFncXY(%rip), %r8
	movl	$8, %ecx
	leaq	sz1Point(%rip), %rsi
	movq	%rax, %rdi
	call	bsearch@PLT
	movq	%rax, -1056(%rbp)
	cmpq	$0, -1056(%rbp)
	je	.L26
	subl	$1, -1068(%rbp)
.L26:
	movl	-1068(%rbp), %edx
	movl	-1072(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	fGetMaxI
	movl	%eax, -1072(%rbp)
	addl	$1, -1076(%rbp)
.L25:
	movl	-1076(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sz1CntY(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -1060(%rbp)
	jne	.L27
	movl	-1076(%rbp), %eax
	cmpl	-1064(%rbp), %eax
	jle	.L28
.L27:
	addl	$1, -1080(%rbp)
.L24:
	movl	-1080(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sz1CntX(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -1064(%rbp)
	je	.L29
	movl	-1072(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	fMain, .-fMain
	.section	.rodata
.LC3:
	.string	"%d\n"
	.text
	.globl	fOne
	.type	fOne, @function
fOne:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1056, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	stdin(%rip), %rax
	movq	%rax, szpFpI(%rip)
	movl	$0, %eax
	call	fMain
	movl	%eax, -1044(%rbp)
	movl	-1044(%rbp), %edx
	leaq	-1040(%rbp), %rax
	leaq	.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	.L34
	call	__stack_chk_fail@PLT
.L34:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	fOne, .-fOne
	.globl	main
	.type	main, @function
main:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, %eax
	call	fOne
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
