// File: /workspace/github_cpp_makefile_star2_O1/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 0x3ab9
movq %rsi, %rbx
movq 0x4a80(%rip), %r14      # 0x7fd8
leaq 0x1b2b(%rip), %rsi      # 0x508a
movl $0x7, %edx
movq %r14, %rdi
callq 0x2200
movq 0x8(%rbx), %r15
testq %r15, %r15
je 0x3591
movq %r15, %rdi
callq 0x20c0
movq 0x4a54(%rip), %rdi      # 0x7fd8
movq %r15, %rsi
movq %rax, %rdx
callq 0x2200
jmp 0x35a9
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 0x3d38
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
leaq 0x38(%rsp), %rdx
callq 0x4438
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3610
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 0x3d76
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x3d76
movq 0x4997(%rip), %r15      # 0x7fd8
leaq 0x1a4a(%rip), %rsi      # 0x5092
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 0x4965(%rip), %rdi      # 0x7fd8
callq 0x2040
movq %rax, %rdi
callq 0x2140
movq 0x38(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x259c
movq (%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x26c8
leaq 0x8(%rsp), %rdi
callq 0x3db8
movq (%rsp), %rsi
leaq 0x8(%rsp), %rdi
movl $0x1, %edx
callq 0x2906
movq (%rsp), %rsi
leaq 0x8(%rsp), %rdx
xorl %edi, %edi
callq 0x3b36
movq 0x4907(%rip), %rdi      # 0x7fd8
leaq 0x1a9e(%rip), %rsi      # 0x5176
movl $0x6, %edx
callq 0x2200
movq 0x4af7(%rip), %rsi      # 0x81e0
subq 0x4ae8(%rip), %rsi      # 0x81d8
sarq $0x2, %rsi
movq 0x48dd(%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 0x48a7(%rip), %rdi      # 0x7fd8
leaq 0x19a3(%rip), %rsi      # 0x50db
movl $0x12, %edx
callq 0x2200
movl 0x4ac0(%rip), %esi      # 0x8208
movq 0x4889(%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 0x4853(%rip), %rdi      # 0x7fd8
leaq 0x1962(%rip), %rsi      # 0x50ee
movl $0x7, %edx
callq 0x2200
xorl %edi, %edi
callq 0x21a0
movq %rax, %rdi
movq %r14, %rsi
callq 0x20d0
movq 0x4829(%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 0x47f3(%rip), %rdi      # 0x7fd8
leaq 0x190a(%rip), %rsi      # 0x50f6
movl $0x11, %edx
callq 0x2200
callq 0x2120
subq %rbx, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd 0x1832(%rip), %xmm0     # 0x5040
movq 0x47c3(%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, 0x49ba(%rip)      # 0x8208
leaq 0x4983(%rip), %rdi      # 0x81d8
xorl %esi, %esi
callq 0x2dcc
xorl %edi, %edi
callq 0x21a0
movq %rax, %r14
callq 0x2120
movq %rax, %rbx
movq 0x4763(%rip), %r15      # 0x7fd8
leaq 0x188c(%rip), %rsi      # 0x5108
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 0x4731(%rip), %rdi      # 0x7fd8
callq 0x2040
movq %rax, %rdi
callq 0x2140
movq 0x38(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x259c
movq (%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x26c8
movq (%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x2720
movq (%rsp), %rsi
leaq 0x20(%rsp), %rdi
movl $0x1, %edx
callq 0x2906
movq (%rsp), %rsi
leaq 0x20(%rsp), %rdx
movl $0x1, %edi
callq 0x3b36
movq 0x46cc(%rip), %rdi      # 0x7fd8
leaq 0x1863(%rip), %rsi      # 0x5176
movl $0x6, %edx
callq 0x2200
movq 0x48bc(%rip), %rsi      # 0x81e0
subq 0x48ad(%rip), %rsi      # 0x81d8
sarq $0x2, %rsi
movq 0x46a2(%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 0x466c(%rip), %rdi      # 0x7fd8
leaq 0x17de(%rip), %rsi      # 0x5151
movl $0xf, %edx
callq 0x2200
movl 0x4885(%rip), %esi      # 0x8208
movq 0x464e(%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 0x4618(%rip), %rdi      # 0x7fd8
leaq 0x1727(%rip), %rsi      # 0x50ee
movl $0x7, %edx
callq 0x2200
xorl %edi, %edi
callq 0x21a0
movq %rax, %rdi
movq %r14, %rsi
callq 0x20d0
movq 0x45ee(%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 0x45b8(%rip), %rdi      # 0x7fd8
leaq 0x16cf(%rip), %rsi      # 0x50f6
movl $0x11, %edx
callq 0x2200
callq 0x2120
subq %rbx, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd 0x15f7(%rip), %xmm0     # 0x5040
movq 0x4588(%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 0x3a96
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x21e0
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3aad
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x21e0
xorl %eax, %eax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x15a0(%rip), %rdi      # 0x5060
leaq 0x15a3(%rip), %rsi      # 0x506a
leaq 0x15a5(%rip), %rcx      # 0x5073
movl $0xd, %edx
callq 0x2110
movq %rax, %rbx
jmp 0x3b17
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3b2e
movq 0x50(%rsp), %rsi
incq %rsi
jmp 0x3b29
movq %rax, %rbx
jmp 0x3b2e
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x3b17
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x21e0
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3b2e
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x21e0
movq %rbx, %rdi
callq 0x2280