// File: /workspace/github_cpp_makefile_star2_O2/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 0x372d
movq %rsi, %rbx
movq 0x4bd8(%rip), %rdi      # 0x7fd8
leaq 0x1c83(%rip), %rsi      # 0x508a
callq 0x21d0
movq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x20e0
movq 0x8(%rbx), %rsi
leaq 0x40(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x390c
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
leaq 0x20(%rsp), %rdx
callq 0x40dc
leaq 0x40(%rsp), %rdi
callq 0x20d0
xorl %edi, %edi
callq 0x21b0
movq %rax, %r14
callq 0x2140
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x3948
leaq 0x28(%rsp), %rdi
xorl %esi, %esi
callq 0x3948
movq 0x4b58(%rip), %rdi      # 0x7fd8
leaq 0x1c0b(%rip), %rsi      # 0x5092
callq 0x21d0
movq %rax, %rdi
callq 0x20e0
movq 0x20(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x247c
movq (%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x2554
leaq 0x8(%rsp), %rdi
callq 0x397a
movq (%rsp), %rsi
leaq 0x8(%rsp), %rdi
pushq $0x1
popq %rdx
callq 0x2714
movq (%rsp), %rsi
leaq 0x8(%rsp), %rdx
xorl %edi, %edi
callq 0x3782
movq 0x4af5(%rip), %rdi      # 0x7fd8
leaq 0x1c8c(%rip), %rsi      # 0x5176
callq 0x21d0
movq 0x4cda(%rip), %rsi      # 0x81d0
subq 0x4ccb(%rip), %rsi      # 0x81c8
sarq $0x2, %rsi
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20e0
movq 0x4ac0(%rip), %rdi      # 0x7fd8
leaq 0x1bbc(%rip), %rsi      # 0x50db
callq 0x21d0
movl 0x4cce(%rip), %esi      # 0x81f8
movq %rax, %rdi
callq 0x2260
movq %rax, %rdi
callq 0x20e0
movq 0x4a97(%rip), %rdi      # 0x7fd8
leaq 0x1ba6(%rip), %rsi      # 0x50ee
callq 0x21d0
movq %rax, %r15
xorl %edi, %edi
callq 0x21b0
movq %rax, %rdi
movq %r14, %rsi
callq 0x20f0
movq %r15, %rdi
callq 0x2230
movq %rax, %rdi
callq 0x20e0
movq 0x4a5f(%rip), %rdi      # 0x7fd8
leaq 0x1b76(%rip), %rsi      # 0x50f6
callq 0x21d0
movq %rax, %r14
callq 0x2140
subq %rbx, %rax
cvtsi2sd %rax, %xmm0
divsd 0x1aa3(%rip), %xmm0     # 0x5040
movq %r14, %rdi
callq 0x2230
movq %rax, %rdi
callq 0x20e0
andl $0x0, 0x4c44(%rip)      # 0x81f8
leaq 0x4c0d(%rip), %rdi      # 0x81c8
xorl %esi, %esi
callq 0x2b0e
xorl %edi, %edi
callq 0x21b0
movq %rax, %r14
callq 0x2140
movq %rax, %rbx
movq 0x49fd(%rip), %rdi      # 0x7fd8
leaq 0x1b26(%rip), %rsi      # 0x5108
callq 0x21d0
movq %rax, %rdi
callq 0x20e0
movq 0x20(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x247c
movq (%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x2554
movq (%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x25a0
movq (%rsp), %rsi
leaq 0x28(%rsp), %rdi
pushq $0x1
popq %rdx
callq 0x2714
movq (%rsp), %rsi
pushq $0x1
popq %rdi
leaq 0x28(%rsp), %rdx
callq 0x3782
movq 0x4995(%rip), %rdi      # 0x7fd8
leaq 0x1b2c(%rip), %rsi      # 0x5176
callq 0x21d0
movq 0x4b7a(%rip), %rsi      # 0x81d0
subq 0x4b6b(%rip), %rsi      # 0x81c8
sarq $0x2, %rsi
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20e0
movq 0x4960(%rip), %rdi      # 0x7fd8
leaq 0x1ad2(%rip), %rsi      # 0x5151
callq 0x21d0
movl 0x4b6e(%rip), %esi      # 0x81f8
movq %rax, %rdi
callq 0x2260
movq %rax, %rdi
callq 0x20e0
movq 0x4937(%rip), %rdi      # 0x7fd8
leaq 0x1a46(%rip), %rsi      # 0x50ee
callq 0x21d0
movq %rax, %r15
xorl %edi, %edi
callq 0x21b0
movq %rax, %rdi
movq %r14, %rsi
callq 0x20f0
movq %r15, %rdi
callq 0x2230
movq %rax, %rdi
callq 0x20e0
movq 0x48ff(%rip), %rdi      # 0x7fd8
leaq 0x1a16(%rip), %rsi      # 0x50f6
callq 0x21d0
movq %rax, %r14
callq 0x2140
subq %rbx, %rax
cvtsi2sd %rax, %xmm0
divsd 0x1943(%rip), %xmm0     # 0x5040
movq %r14, %rdi
callq 0x2230
movq %rax, %rdi
callq 0x20e0
leaq 0x28(%rsp), %rdi
callq 0x2b78
leaq 0x8(%rsp), %rdi
callq 0x2b78
xorl %eax, %eax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x192c(%rip), %rdi      # 0x5060
leaq 0x192f(%rip), %rsi      # 0x506a
leaq 0x1931(%rip), %rcx      # 0x5073
pushq $0xd
popq %rdx
callq 0x2130
movq %rax, %rbx
jmp 0x3770
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x20d0
jmp 0x377a
movq %rax, %rbx
jmp 0x377a
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x2b78
leaq 0x8(%rsp), %rdi
callq 0x2b78
movq %rbx, %rdi
callq 0x2270