// File: /workspace/github_cpp_makefile_star2_O3/jkunlin[P]maxclique/main.cpp
// Function: main
int main(int argc, char *argv[]) {
	assert(argc == 2);
	cout << "args = " << argv[1] << endl;

	bool **conn;
	size_t size;
	read_file(argv[1], conn, size);

	clock_t start1 = time(NULL);
	clock_t start2 = clock();

	Vertices V, V_MCR;

	cout<<"--------------------------normal sort-----------------------------------"<<endl;
	V.init(size);
	V.set_degrees(conn);
	V.degree_sort();
	V.colo_sort(conn, 1);
	expand(false, conn, V);
	/*
	cout<<"maxclique: ";
	for(vector<int>::iterator iter = maxclique.begin(); iter != maxclique.end(); ++iter) {
		cout<<*iter + 1<<' ';
	}
	cout<<endl;
	*/
	cout<<"size: "<<maxclique.size()<<endl;
	cout<<"common expand num:"<<num<<endl;
	cout<<"Time = "<<difftime(time(NULL), start1) <<endl;
	cout<<"Time (precise) = "<<((double) (clock() - start2)) / CLOCKS_PER_SEC <<endl;
	
	num = 0;
	maxclique.resize(0);

	start1 = time(NULL);
	start2 = clock();

	cout<<"--------------------------MCR sort--------------------------------------"<<endl;
	V_MCR.init(size);
	V_MCR.set_degrees(conn);
	V_MCR.MCR_sort(conn);
	V_MCR.colo_sort(conn, 1);
	expand(true, conn, V_MCR);
	/*
	cout<<"maxclique: ";
	for(vector<int>::iterator iter = maxclique.begin(); iter != maxclique.end(); ++iter) {
		cout<<*iter + 1<<' ';
	}
	cout<<endl;
	*/
	cout<<"size: "<<maxclique.size()<<endl;
	cout<<"MCR expand num:"<<num<<endl;
	cout<<"Time = "<<difftime(time(NULL), start1) <<endl;
	cout<<"Time (precise) = "<<((double) (clock() - start2)) / CLOCKS_PER_SEC <<endl;

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
cmpl $0x2, %edi
jne 0x3b79
movq %rsi, %rbx
movq 0x49c0(%rip), %r14      # 0x7fd8
leaq 0x1a9b(%rip), %rsi      # 0x50ba
movl $0x7, %edx
movq %r14, %rdi
callq 0x2200
movq 0x8(%rbx), %r15
testq %r15, %r15
je 0x3651
movq %r15, %rdi
callq 0x20c0
movq 0x4994(%rip), %rdi      # 0x7fd8
movq %r15, %rsi
movq %rax, %rdx
callq 0x2200
jmp 0x3669
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x2260
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2140
movq 0x8(%rbx), %rsi
leaq 0x40(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x3e02
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
leaq 0x38(%rsp), %rdx
callq 0x4518
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x36d0
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x21e0
xorl %edi, %edi
callq 0x21a0
movq %rax, %r14
callq 0x2120
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x3e40
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x3e40
movq 0x48d7(%rip), %r15      # 0x7fd8
leaq 0x19ba(%rip), %rsi      # 0x50c2
movl $0x48, %edx
movq %r15, %rdi
callq 0x2200
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq 0x48a5(%rip), %rdi      # 0x7fd8
callq 0x2040
movq %rax, %rdi
callq 0x2140
movq 0x38(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x25ac
movq (%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x26d8
leaq 0x8(%rsp), %rdi
callq 0x3e82
movq (%rsp), %rsi
leaq 0x8(%rsp), %rdi
movl $0x1, %edx
callq 0x2a10
movq (%rsp), %rsi
leaq 0x8(%rsp), %rdx
xorl %edi, %edi
callq 0x3bf6
movq 0x4847(%rip), %rdi      # 0x7fd8
leaq 0x1a0e(%rip), %rsi      # 0x51a6
movl $0x6, %edx
callq 0x2200
movq 0x4a47(%rip), %rsi      # 0x81f0
subq 0x4a38(%rip), %rsi      # 0x81e8
sarq $0x2, %rsi
movq 0x481d(%rip), %rdi      # 0x7fd8
callq 0x2130
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2140
movq 0x47e7(%rip), %rdi      # 0x7fd8
leaq 0x1913(%rip), %rsi      # 0x510b
movl $0x12, %edx
callq 0x2200
movl 0x4a10(%rip), %esi      # 0x8218
movq 0x47c9(%rip), %rdi      # 0x7fd8
callq 0x2270
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2140
movq 0x4793(%rip), %rdi      # 0x7fd8
leaq 0x18d2(%rip), %rsi      # 0x511e
movl $0x7, %edx
callq 0x2200
xorl %edi, %edi
callq 0x21a0
movq %rax, %rdi
movq %r14, %rsi
callq 0x20d0
movq 0x4769(%rip), %rdi      # 0x7fd8
callq 0x2230
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2140
movq 0x4733(%rip), %rdi      # 0x7fd8
leaq 0x187a(%rip), %rsi      # 0x5126
movl $0x11, %edx
callq 0x2200
callq 0x2120
subq %rbx, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd 0x17aa(%rip), %xmm0     # 0x5078
movq 0x4703(%rip), %rdi      # 0x7fd8
callq 0x2230
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2140
movl $0x0, 0x490a(%rip)      # 0x8218
leaq 0x48d3(%rip), %rdi      # 0x81e8
xorl %esi, %esi
callq 0x2ea4
xorl %edi, %edi
callq 0x21a0
movq %rax, %r14
callq 0x2120
movq %rax, %rbx
movq 0x46a3(%rip), %r15      # 0x7fd8
leaq 0x17fc(%rip), %rsi      # 0x5138
movl $0x48, %edx
movq %r15, %rdi
callq 0x2200
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq 0x4671(%rip), %rdi      # 0x7fd8
callq 0x2040
movq %rax, %rdi
callq 0x2140
movq 0x38(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x25ac
movq (%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x26d8
movq (%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x282e
movq (%rsp), %rsi
leaq 0x20(%rsp), %rdi
movl $0x1, %edx
callq 0x2a10
movq (%rsp), %rsi
leaq 0x20(%rsp), %rdx
movl $0x1, %edi
callq 0x3bf6
movq 0x460c(%rip), %rdi      # 0x7fd8
leaq 0x17d3(%rip), %rsi      # 0x51a6
movl $0x6, %edx
callq 0x2200
movq 0x480c(%rip), %rsi      # 0x81f0
subq 0x47fd(%rip), %rsi      # 0x81e8
sarq $0x2, %rsi
movq 0x45e2(%rip), %rdi      # 0x7fd8
callq 0x2130
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2140
movq 0x45ac(%rip), %rdi      # 0x7fd8
leaq 0x174e(%rip), %rsi      # 0x5181
movl $0xf, %edx
callq 0x2200
movl 0x47d5(%rip), %esi      # 0x8218
movq 0x458e(%rip), %rdi      # 0x7fd8
callq 0x2270
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2140
movq 0x4558(%rip), %rdi      # 0x7fd8
leaq 0x1697(%rip), %rsi      # 0x511e
movl $0x7, %edx
callq 0x2200
xorl %edi, %edi
callq 0x21a0
movq %rax, %rdi
movq %r14, %rsi
callq 0x20d0
movq 0x452e(%rip), %rdi      # 0x7fd8
callq 0x2230
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2140
movq 0x44f8(%rip), %rdi      # 0x7fd8
leaq 0x163f(%rip), %rsi      # 0x5126
movl $0x11, %edx
callq 0x2200
callq 0x2120
subq %rbx, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd 0x156f(%rip), %xmm0     # 0x5078
movq 0x44c8(%rip), %rdi      # 0x7fd8
callq 0x2230
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2140
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x3b56
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x21e0
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3b6d
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x21e0
xorl %eax, %eax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1510(%rip), %rdi      # 0x5090
leaq 0x1513(%rip), %rsi      # 0x509a
leaq 0x1515(%rip), %rcx      # 0x50a3
movl $0xd, %edx
callq 0x2110
movq %rax, %rbx
jmp 0x3bd7
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3bee
movq 0x50(%rsp), %rsi
incq %rsi
jmp 0x3be9
movq %rax, %rbx
jmp 0x3bee
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x3bd7
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x21e0
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3bee
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x21e0
movq %rbx, %rdi
callq 0x2280