// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2c8, %rsp            # imm = 0x2C8
movq %rdx, %r14
movq %rsi, %rbx
movq (%rdi), %rsi
leaq 0xc0(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x22a0
leaq 0x138(%rsp), %rdi
callq 0x2060
testb %al, %al
je 0x434f
leaq 0x48(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x18(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x70(%rsp), %r12
leaq 0x4(%rsp), %rbp
movq %rsp, %r15
leaq 0x40(%rsp), %r13
movq 0xc0(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x2, 0xe0(%rsp,%rax)
jne 0x41e5
leaq 0xc0(%rsp), %rdi
movq %r12, %rsi
pushq $0x46
popq %rdx
callq 0x2090
cmpb $0x65, 0x70(%rsp)
jne 0x4161
movq %r12, %rdi
leaq 0x107a(%rip), %rsi      # 0x5215
movq %rbp, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x21c0
movq %r13, %rdi
movq %rbp, %rsi
callq 0x4450
movq %r13, %rdi
movq %r15, %rsi
callq 0x4450
movl 0x4(%rsp), %eax
movl (%rsp), %ecx
shlq $0x20, %rcx
orq %rax, %rcx
movq %rcx, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x45a2
jmp 0x4161
movq 0x68(%rsp), %r15
movq %r15, (%r14)
movq %r15, %rax
shrq $0x3d, %rax
leaq (,%r15,8), %rcx
xorl %edi, %edi
negq %rax
sbbq %rdi, %rdi
orq %rcx, %rdi
callq 0x2030
movq %rax, (%rbx)
xorl %r12d, %r12d
cmpq %r15, %r12
jae 0x423f
movq %r15, %rdi
callq 0x2030
movq (%rbx), %rcx
movq %rax, (%rcx,%r12,8)
movq (%rbx), %rax
movq (%rax,%r12,8), %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x2110
incq %r12
movq (%r14), %r15
jmp 0x4212
movq 0x28(%rsp), %rax
movq (%rbx), %rbx
movb $0x1, %bpl
leaq 0x18(%rsp), %rcx
cmpq %rcx, %rax
je 0x427a
movslq 0x20(%rax), %rcx
movq -0x8(%rbx,%rcx,8), %rdx
movslq 0x24(%rax), %rsi
movb %bpl, -0x1(%rdx,%rsi)
movq -0x8(%rbx,%rsi,8), %rdx
movb %bpl, -0x1(%rdx,%rcx)
movq %rax, %rdi
callq 0x2160
jmp 0x424a
movq 0x3d57(%rip), %rdi      # 0x7fd8
leaq 0xf97(%rip), %rsi       # 0x521f
callq 0x21d0
movq 0x38(%rsp), %rsi
movq %rax, %rdi
callq 0x2150
leaq 0xf85(%rip), %rsi       # 0x5226
movq %rax, %rdi
callq 0x21d0
movq 0x68(%rsp), %rsi
movq %rax, %rdi
callq 0x2150
leaq 0xf71(%rip), %rsi       # 0x522e
movq %rax, %rdi
callq 0x21d0
movsd 0x38(%rsp), %xmm1
unpcklps 0xede(%rip), %xmm1      # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0xee6(%rip), %xmm1      # 0x51c0
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movq 0x68(%rsp), %rcx
leaq -0x1(%rcx), %rdx
imulq %rcx, %rdx
shrq %rdx
cvtsi2sd %rdx, %xmm1
divsd %xmm1, %xmm0
movq %rax, %rdi
callq 0x2230
movq %rax, %rdi
callq 0x20e0
leaq 0xc0(%rsp), %rdi
callq 0x2050
leaq 0x10(%rsp), %rdi
callq 0x43a0
leaq 0x40(%rsp), %rdi
callq 0x43f8
leaq 0xc0(%rsp), %rdi
callq 0x2070
addq $0x2c8, %rsp            # imm = 0x2C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xe7a(%rip), %rdi       # 0x51d0
leaq 0xe7f(%rip), %rsi       # 0x51dc
leaq 0xe86(%rip), %rcx       # 0x51ea
pushq $0x7
popq %rdx
callq 0x2130
jmp 0x4374
jmp 0x4374
jmp 0x4374
jmp 0x4374
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x43a0
leaq 0x40(%rsp), %rdi
callq 0x43f8
leaq 0xc0(%rsp), %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x2270