// File: fjamour[P]icentral/src/main.cc
// Function: paper_exp_main(int, char**)
void paper_exp_main(int argc, char** argv)
{
    int             num_edges, num_iter, rand_seed;
    bool            do_inc_brandes, do_qube, do_inc_qube, do_fuad;
    double          max_time;
    vector<string>  path_vec;
    
    if(argc != 2) {
        printf("Pass one parameter, path with experiment details\n");
        printf("num_edges, num_iter, max_time, rand_seed\n");
        printf("do_inc_brandes, do_qube, do_inc_qube, do_fuad\n");
        printf("list of graph paths\n");
        exit(1);
    } else {
        FILE* fin = fopen(argv[1], "r");
        fscanf(fin, "%d, %d, %lf, %d\n", &num_edges, &num_iter, &max_time, &rand_seed);
        int t1, t2, t3, t4;
        fscanf(fin, "%d, %d, %d, %d\n", &t1, &t2, &t3, &t4);
        do_inc_brandes  = (t1 != 0);
        do_qube         = (t2 != 0);
        do_inc_qube     = (t3 != 0);
        do_fuad         = (t4 != 0);
        char buff[1024*4];
        while(fscanf(fin, "%s\n", buff) != EOF) {
            string path = buff;
            path_vec.push_back(path);
        }
    }
    do_paper_exp(num_edges, num_iter, max_time, rand_seed, path_vec,
        do_inc_brandes, do_qube, do_inc_qube, do_fuad);
}

// Assembly:
subq $0x10e8, %rsp           # imm = 0x10E8
movl %edi, 0x10e4(%rsp)
movq %rsi, 0x10d8(%rsp)
leaq 0x10a8(%rsp), %rdi
callq 0x5f3f0
cmpl $0x2, 0x10e4(%rsp)
je 0x5d6d0
leaq 0x1e828(%rip), %rdi     # 0x7be9c
xorl %eax, %eax
callq 0x9040
jmp 0x5d67d
leaq 0x1e84a(%rip), %rdi     # 0x7bece
xorl %eax, %eax
callq 0x9040
jmp 0x5d68d
leaq 0x1e864(%rip), %rdi     # 0x7bef8
xorl %eax, %eax
callq 0x9040
jmp 0x5d69d
leaq 0x1e883(%rip), %rdi     # 0x7bf27
xorl %eax, %eax
callq 0x9040
jmp 0x5d6ad
movl $0x1, %edi
callq 0x98d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x10a0(%rsp)
movl %eax, 0x109c(%rsp)
jmp 0x5d964
movq 0x10d8(%rsp), %rax
movq 0x8(%rax), %rdi
leaq 0x1e859(%rip), %rsi     # 0x7bf3c
callq 0x9890
movq %rax, 0x38(%rsp)
jmp 0x5d6ef
movq 0x38(%rsp), %rax
movq %rax, 0x1090(%rsp)
movq 0x1090(%rsp), %rdi
leaq 0x1e833(%rip), %rsi     # 0x7bf3e
xorl %eax, %eax
leaq 0x10d4(%rsp), %rdx
leaq 0x10d0(%rsp), %rcx
leaq 0x10c0(%rsp), %r8
leaq 0x10cc(%rsp), %r9
callq 0x9d90
jmp 0x5d734
movq 0x1090(%rsp), %rdi
leaq 0x1e80c(%rip), %rsi     # 0x7bf4f
xorl %eax, %eax
leaq 0x108c(%rsp), %rdx
leaq 0x1088(%rsp), %rcx
leaq 0x1084(%rsp), %r8
leaq 0x1080(%rsp), %r9
callq 0x9d90
jmp 0x5d76c
cmpl $0x0, 0x108c(%rsp)
setne %al
andb $0x1, %al
movb %al, 0x10cb(%rsp)
cmpl $0x0, 0x1088(%rsp)
setne %al
andb $0x1, %al
movb %al, 0x10ca(%rsp)
cmpl $0x0, 0x1084(%rsp)
setne %al
andb $0x1, %al
movb %al, 0x10c9(%rsp)
cmpl $0x0, 0x1080(%rsp)
setne %al
andb $0x1, %al
movb %al, 0x10c8(%rsp)
movq 0x1090(%rsp), %rdi
leaq 0x1db5b(%rip), %rsi     # 0x7b326
xorl %eax, %eax
leaq 0x80(%rsp), %rdx
callq 0x9d90
movl %eax, 0x34(%rsp)
jmp 0x5d7e0
movl 0x34(%rsp), %eax
cmpl $-0x1, %eax
je 0x5d888
leaq 0x5f(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x9d00
movq 0x28(%rsp), %rdx
leaq 0x60(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x5ef00
jmp 0x5d815
leaq 0x5f(%rsp), %rdi
callq 0x97d0
leaq 0x10a8(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x5f400
jmp 0x5d833
leaq 0x60(%rsp), %rdi
callq 0x9410
jmp 0x5d7bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x10a0(%rsp)
movl %eax, 0x109c(%rsp)
leaq 0x5f(%rsp), %rdi
callq 0x97d0
jmp 0x5d964
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x10a0(%rsp)
movl %eax, 0x109c(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x9410
jmp 0x5d964
jmp 0x5d88a
movl 0x10d4(%rsp), %eax
movl %eax, 0x10(%rsp)
movl 0x10d0(%rsp), %eax
movl %eax, 0x14(%rsp)
movsd 0x10c0(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movl 0x10cc(%rsp), %eax
movl %eax, 0x24(%rsp)
leaq 0x40(%rsp), %rdi
leaq 0x10a8(%rsp), %rsi
callq 0x5f470
jmp 0x5d8ce
movl 0x24(%rsp), %edx
movsd 0x18(%rsp), %xmm0
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edi
movzbl 0x10ca(%rsp), %r9d
movzbl 0x10cb(%rsp), %r8d
movzbl 0x10c9(%rsp), %ecx
movzbl 0x10c8(%rsp), %r10d
andl $0x1, %r10d
movq %rsp, %rax
movl %r10d, 0x8(%rax)
andl $0x1, %ecx
movl %ecx, (%rax)
andl $0x1, %r8d
andl $0x1, %r9d
leaq 0x40(%rsp), %rcx
callq 0x5c230
jmp 0x5d927
leaq 0x40(%rsp), %rdi
callq 0x5f570
leaq 0x10a8(%rsp), %rdi
callq 0x5f570
addq $0x10e8, %rsp           # imm = 0x10E8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x10a0(%rsp)
movl %eax, 0x109c(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x5f570
leaq 0x10a8(%rsp), %rdi
callq 0x5f570
movq 0x10a0(%rsp), %rdi
callq 0x9cf0
nop