// File: jkunlin[P]maxclique/read_file.cpp
// Function: read_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool**&, unsigned long&)
void read_file(string name, bool ** &conn, size_t &size) {
	ifstream f(name.c_str());
	char buffer[80];
	assert(f.is_open());
	set<int> v;
	multimap<int, int> e;

	while(!f.eof()) {
		f.getline (buffer, 70);
		if(buffer[0] == 'e') {
			int vi, vj;
			sscanf(buffer, "%*c %d %d", &vi, &vj);
			v.insert(vi);
			v.insert(vj);
			e.insert(make_pair(vi, vj));
		}
	}
	size = v.size();

	conn = new bool *[size];
	for(size_t i = 0; i < size; i++) {
		conn[i] = new bool[size];
		memset(conn[i], 0, size * sizeof(bool));
	}
	for(multimap<int, int>::iterator it = e.begin(); it != e.end(); it++) {
		conn[it->first - 1][it->second -1] = true;
		conn[it->second - 1][it->first - 1] = true;
	}

	cout << "|E| = "<< e.size() << " |V| = " << v.size() << " p = " << (double) e.size() / (v.size() * (v.size() - 1) /2) <<endl;
	f.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x400, %rsp            # imm = 0x400
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
callq 0x20d0
movq %rax, %rsi
leaq -0x220(%rbp), %rdi
movq %rdi, -0x348(%rbp)
movl $0x8, %edx
callq 0x2330
movq -0x348(%rbp), %rdi
callq 0x22b0
movb %al, -0x339(%rbp)
jmp 0x974b
movb -0x339(%rbp), %al
testb $0x1, %al
jne 0x9757
jmp 0x9759
jmp 0x978f
leaq 0x2a50(%rip), %rdi      # 0xc1b0
leaq 0x2a55(%rip), %rsi      # 0xc1bc
movl $0x7, %edx
leaq 0x2a57(%rip), %rcx      # 0xc1ca
callq 0x2140
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x278(%rbp)
movl %eax, -0x27c(%rbp)
jmp 0x9c95
leaq -0x2b0(%rbp), %rdi
callq 0x9cb0
leaq -0x2e0(%rbp), %rdi
callq 0x9cd0
movq -0x220(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x220(%rbp,%rax), %rdi
callq 0x2340
movb %al, -0x349(%rbp)
jmp 0x97c7
movb -0x349(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x97d8
jmp 0x992e
leaq -0x220(%rbp), %rdi
leaq -0x270(%rbp), %rsi
movl $0x46, %edx
callq 0x20a0
jmp 0x97f2
movsbl -0x270(%rbp), %eax
cmpl $0x65, %eax
jne 0x9929
leaq 0x29ec(%rip), %rsi      # 0xc1f5
xorl %eax, %eax
leaq -0x270(%rbp), %rdi
leaq -0x2e4(%rbp), %rdx
movq %rdx, -0x368(%rbp)
leaq -0x2e8(%rbp), %rcx
callq 0x21e0
movq -0x368(%rbp), %rsi
leaq -0x2b0(%rbp), %rdi
callq 0x9cf0
movb %dl, -0x359(%rbp)
movq %rax, -0x358(%rbp)
jmp 0x984e
movb -0x359(%rbp), %al
movq -0x358(%rbp), %rcx
movq %rcx, -0x2f8(%rbp)
movb %al, -0x2f0(%rbp)
leaq -0x2b0(%rbp), %rdi
leaq -0x2e8(%rbp), %rsi
callq 0x9cf0
movb %dl, -0x371(%rbp)
movq %rax, -0x370(%rbp)
jmp 0x988a
movb -0x371(%rbp), %al
movq -0x370(%rbp), %rcx
movq %rcx, -0x308(%rbp)
movb %al, -0x300(%rbp)
leaq -0x2e4(%rbp), %rdi
leaq -0x2e8(%rbp), %rsi
callq 0x9d70
movq %rax, -0x380(%rbp)
jmp 0x98c0
movq -0x380(%rbp), %rax
movq %rax, -0x310(%rbp)
leaq -0x2e0(%rbp), %rdi
leaq -0x310(%rbp), %rsi
callq 0x9d40
movq %rax, -0x388(%rbp)
jmp 0x98ea
movq -0x388(%rbp), %rax
movq %rax, -0x318(%rbp)
jmp 0x9929
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x278(%rbp)
movl %eax, -0x27c(%rbp)
leaq -0x2e0(%rbp), %rdi
callq 0x9ed0
leaq -0x2b0(%rbp), %rdi
callq 0x9ef0
jmp 0x9c95
jmp 0x97a7
leaq -0x2b0(%rbp), %rdi
callq 0x9da0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0x2030
movq %rax, -0x390(%rbp)
jmp 0x996f
movq -0x390(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq $0x0, -0x320(%rbp)
movq -0x320(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x99fe
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x2030
movq %rax, -0x398(%rbp)
jmp 0x99ad
movq -0x398(%rbp), %rdx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x320(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x320(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
shlq $0x0, %rdx
xorl %esi, %esi
callq 0x2110
movq -0x320(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x320(%rbp)
jmp 0x9988
leaq -0x2e0(%rbp), %rdi
callq 0x9dc0
movq %rax, -0x328(%rbp)
leaq -0x2e0(%rbp), %rdi
callq 0x9e20
movq %rax, -0x330(%rbp)
leaq -0x328(%rbp), %rdi
leaq -0x330(%rbp), %rsi
callq 0x9df0
testb $0x1, %al
jne 0x9a40
jmp 0x9b0e
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x3b8(%rbp)
leaq -0x328(%rbp), %rdi
callq 0x9e50
movq %rax, %rcx
movq -0x3b8(%rbp), %rax
movl (%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x3b0(%rbp)
leaq -0x328(%rbp), %rdi
callq 0x9e50
movq %rax, %rcx
movq -0x3b0(%rbp), %rax
movl 0x4(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb $0x1, (%rax,%rcx)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x3a8(%rbp)
leaq -0x328(%rbp), %rdi
callq 0x9e50
movq %rax, %rcx
movq -0x3a8(%rbp), %rax
movl 0x4(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x3a0(%rbp)
leaq -0x328(%rbp), %rdi
callq 0x9e50
movq %rax, %rcx
movq -0x3a0(%rbp), %rax
movl (%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb $0x1, (%rax,%rcx)
leaq -0x328(%rbp), %rdi
xorl %esi, %esi
callq 0x9e70
movq %rax, -0x338(%rbp)
jmp 0x9a11
movq 0x94c3(%rip), %rdi      # 0x12fd8
leaq 0x26e3(%rip), %rsi      # 0xc1ff
callq 0x21f0
movq %rax, -0x3c0(%rbp)
jmp 0x9b2a
leaq -0x2e0(%rbp), %rdi
callq 0x9eb0
movq -0x3c0(%rbp), %rdi
movq %rax, %rsi
callq 0x2070
movq %rax, -0x3c8(%rbp)
jmp 0x9b4e
movq -0x3c8(%rbp), %rdi
leaq 0x26aa(%rip), %rsi      # 0xc206
callq 0x21f0
movq %rax, -0x3d0(%rbp)
jmp 0x9b6a
leaq -0x2b0(%rbp), %rdi
callq 0x9da0
movq -0x3d0(%rbp), %rdi
movq %rax, %rsi
callq 0x2070
movq %rax, -0x3d8(%rbp)
jmp 0x9b8e
movq -0x3d8(%rbp), %rdi
leaq 0x2672(%rip), %rsi      # 0xc20e
callq 0x21f0
movq %rax, -0x3e0(%rbp)
jmp 0x9baa
leaq -0x2e0(%rbp), %rdi
callq 0x9eb0
movq %rax, %xmm0
movaps 0x25ce(%rip), %xmm1     # 0xc190
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x25d2(%rip), %xmm1     # 0xc1a0
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd %xmm0, -0x3f8(%rbp)
leaq -0x2b0(%rbp), %rdi
movq %rdi, -0x400(%rbp)
callq 0x9da0
movq -0x400(%rbp), %rdi
movq %rax, -0x3f0(%rbp)
callq 0x9da0
movsd -0x3f8(%rbp), %xmm0
movq -0x3e0(%rbp), %rdi
movq %rax, %rcx
movq -0x3f0(%rbp), %rax
decq %rcx
imulq %rcx, %rax
shrq %rax
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
callq 0x2350
movq %rax, -0x3e8(%rbp)
jmp 0x9c45
movq -0x3e8(%rbp), %rdi
movq 0x9375(%rip), %rsi      # 0x12fc8
callq 0x2230
jmp 0x9c5a
leaq -0x220(%rbp), %rdi
callq 0x2060
jmp 0x9c68
leaq -0x2e0(%rbp), %rdi
callq 0x9ed0
leaq -0x2b0(%rbp), %rdi
callq 0x9ef0
leaq -0x220(%rbp), %rdi
callq 0x2080
addq $0x400, %rsp            # imm = 0x400
popq %rbp
retq
leaq -0x220(%rbp), %rdi
callq 0x2080
movq -0x278(%rbp), %rdi
callq 0x22f0
nopl (%rax)