// File: todo314[P]pruned-monte-carlo/samples/benchmark.cpp
// Function: main
int main(int argc, char **argv) {
	if (argc < 4) {
		cerr << "./pmc graph k R" << endl;
		exit(1);
	}

	string file = argv[1];
	int k = atoi(argv[2]);
	int R = atoi(argv[3]);

	ifstream is(file.c_str());
	vector<pair<pair<int, int>, double> > es;
	int u, v;
	double p;
	for (; is >> u >> v >> p;) {
		if (u == v) {
			continue;
		}
		es.push_back(make_pair(make_pair(u, v), p));
	}
	is.close();

	InfluenceMaximizer im;
	vector<int> seeds = im.run(es, k, R);
	for (int i = 0; i < k; i++) {
		cout << i << "-th seed =\t" << seeds[i] << endl;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x390, %rsp            # imm = 0x390
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x4, -0x8(%rbp)
jge 0x249b
movq 0x1ab7a(%rip), %rdi     # 0x1cff0
leaq 0x11b87(%rip), %rsi     # 0x14004
callq 0x2170
movq %rax, %rdi
movq 0x1ab34(%rip), %rsi     # 0x1cfc0
callq 0x21a0
movl $0x1, %edi
callq 0x21f0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x330(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x328(%rbp)
callq 0x2290
movq -0x330(%rbp), %rsi
movq -0x328(%rbp), %rdx
leaq -0x30(%rbp), %rdi
callq 0x2810
jmp 0x24d3
leaq -0x31(%rbp), %rdi
callq 0x21c0
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x2240
movl %eax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x2240
movl %eax, -0x4c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x2090
movq %rax, %rsi
leaq -0x258(%rbp), %rdi
movl $0x8, %edx
callq 0x22b0
jmp 0x251b
leaq -0x270(%rbp), %rdi
callq 0x28c0
leaq -0x258(%rbp), %rdi
leaq -0x274(%rbp), %rsi
callq 0x20d0
movq %rax, -0x338(%rbp)
jmp 0x2543
movq -0x338(%rbp), %rdi
leaq -0x278(%rbp), %rsi
callq 0x20d0
movq %rax, -0x340(%rbp)
jmp 0x255f
movq -0x340(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x2130
movq %rax, -0x348(%rbp)
jmp 0x257b
movq -0x348(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x2210
movb %al, -0x349(%rbp)
jmp 0x2599
movb -0x349(%rbp), %al
testb $0x1, %al
jne 0x25a8
jmp 0x267d
movl -0x274(%rbp), %eax
cmpl -0x278(%rbp), %eax
jne 0x25f7
jmp 0x2527
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x31(%rbp), %rdi
callq 0x21c0
jmp 0x2807
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x27fe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x27e6
leaq -0x274(%rbp), %rdi
leaq -0x278(%rbp), %rsi
callq 0x2940
movq %rax, -0x358(%rbp)
jmp 0x2613
movq -0x358(%rbp), %rax
movq %rax, -0x298(%rbp)
leaq -0x298(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x2910
movsd %xmm0, -0x368(%rbp)
movq %rax, -0x360(%rbp)
jmp 0x2645
movsd -0x368(%rbp), %xmm0
movq -0x360(%rbp), %rax
movq %rax, -0x290(%rbp)
movsd %xmm0, -0x288(%rbp)
leaq -0x270(%rbp), %rdi
leaq -0x290(%rbp), %rsi
callq 0x28e0
jmp 0x2678
jmp 0x2527
leaq -0x258(%rbp), %rdi
callq 0x2040
jmp 0x268b
leaq -0x300(%rbp), %rdi
movq %rdi, -0x370(%rbp)
callq 0x2970
movq -0x370(%rbp), %rsi
movl -0x48(%rbp), %ecx
movl -0x4c(%rbp), %r8d
leaq -0x318(%rbp), %rdi
leaq -0x270(%rbp), %rdx
callq 0x5f50
jmp 0x26c1
movl $0x0, -0x31c(%rbp)
movl -0x31c(%rbp), %eax
cmpl -0x48(%rbp), %eax
jge 0x278e
movl -0x31c(%rbp), %esi
movq 0x1a8e9(%rip), %rdi     # 0x1cfd0
callq 0x2270
movq %rax, -0x378(%rbp)
jmp 0x26f5
movq -0x378(%rbp), %rdi
leaq 0x11911(%rip), %rsi     # 0x14014
callq 0x2170
movq %rax, -0x380(%rbp)
jmp 0x2711
movslq -0x31c(%rbp), %rsi
leaq -0x318(%rbp), %rdi
callq 0x29c0
movq -0x380(%rbp), %rdi
movl (%rax), %esi
callq 0x2270
movq %rax, -0x388(%rbp)
jmp 0x273b
movq -0x388(%rbp), %rdi
movq 0x1a877(%rip), %rsi     # 0x1cfc0
callq 0x21a0
jmp 0x2750
jmp 0x2752
movl -0x31c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x31c(%rbp)
jmp 0x26cb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x27da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x318(%rbp), %rdi
callq 0x29e0
jmp 0x27da
movl $0x0, -0x4(%rbp)
leaq -0x318(%rbp), %rdi
callq 0x29e0
leaq -0x300(%rbp), %rdi
callq 0x2a40
leaq -0x270(%rbp), %rdi
callq 0x2a90
leaq -0x258(%rbp), %rdi
callq 0x2050
leaq -0x30(%rbp), %rdi
callq 0x20e0
movl -0x4(%rbp), %eax
addq $0x390, %rsp            # imm = 0x390
popq %rbp
retq
leaq -0x300(%rbp), %rdi
callq 0x2a40
leaq -0x270(%rbp), %rdi
callq 0x2a90
leaq -0x258(%rbp), %rdi
callq 0x2050
leaq -0x30(%rbp), %rdi
callq 0x20e0
movq -0x40(%rbp), %rdi
callq 0x2280