// File: /workspace/github_cpp_makefile_star2_O1/gchen98[P]macs/simulator.cpp
// Function: Simulator::beginSimulation()
void Simulator::beginSimulation(){
    try{
        RandNumGenerator * rg = new RandNumGenerator(pConfig->iRandomSeed);
        cout<<SEED<<"\t"<<pConfig->iRandomSeed<<endl;
        for(unsigned int i=0;i<pConfig->iIterations;++i){
            if (pConfig->bDebug){
                cerr<<"Iteration: "<<i<<endl;
            }
            GraphBuilder graphBuilder = GraphBuilder(pConfig,rg);
            graphBuilder.build();
            graphBuilder.printHaplotypes();

        }
        delete rg;
    }catch(const char* message){
        cerr<<"Simulator caught exception with message:"<<endl<<message<<endl;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x9d8, %rsp            # imm = 0x9D8
movq %rdi, %r14
movl $0x8, %edi
callq 0x3260
movq %rax, %rbx
movq (%r14), %rax
movl 0x40(%rax), %eax
leaq 0xc(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x8852
movl $0x9d0, %edi            # imm = 0x9D0
callq 0x3260
movq %rax, %r15
leaq 0x10(%rsp), %rsi
movl $0x9c8, %edx            # imm = 0x9C8
movq %rax, %rdi
callq 0x31f0
movabsq $0x3df0000000000000, %rax # imm = 0x3DF0000000000000
movq %rax, 0x9c8(%r15)
movq %r15, (%rbx)
movq 0x1874e(%rip), %rsi     # 0x20290
movq 0x1874f(%rip), %rdx     # 0x20298
movq 0x18480(%rip), %rdi     # 0x1ffd0
callq 0x32a0
movq %rax, %r15
leaq 0xf5be(%rip), %rsi      # 0x1711d
movl $0x1, %edx
movq %rax, %rdi
callq 0x32a0
movq (%r14), %rax
movq 0x40(%rax), %rsi
movq %r15, %rdi
callq 0x3230
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3240
movsbl %al, %esi
movq %r15, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31b0
movq (%r14), %rax
cmpl $0x0, 0x34(%rax)
je 0x7c48
xorl %r15d, %r15d
movq 0x18434(%rip), %r12     # 0x1fff0
leaq 0x10(%rsp), %rbp
cmpb $0x1, 0x48(%rax)
jne 0x7c10
movl $0xb, %edx
movq %r12, %rdi
leaq 0x10df1(%rip), %rsi     # 0x189c7
callq 0x32a0
movq %r12, %rdi
movq %r15, %rsi
callq 0x31a0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3240
movsbl %al, %esi
movq %r13, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31b0
movq (%r14), %rsi
movq %rbp, %rdi
movq %rbx, %rdx
callq 0x128ec
movq %rbp, %rdi
callq 0xff4c
movq %rbp, %rdi
callq 0x14310
movq %rbp, %rdi
callq 0x1265a
incq %r15
movq (%r14), %rax
movl 0x34(%rax), %ecx
cmpq %rcx, %r15
jb 0x7bc1
movq %rbx, %rdi
callq 0x4270
movl $0x8, %esi
movq %rbx, %rdi
callq 0x3270
addq $0x9d8, %rsp            # imm = 0x9D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r15
movq %rax, %r14
movl $0x8, %esi
movq %rbx, %rdi
callq 0x3270
jmp 0x7ca0
jmp 0x7c9a
jmp 0x7c9a
movq %rdx, %r15
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x1265a
jmp 0x7ca0
movq %rdx, %r15
movq %rax, %r14
cmpl $0x1, %r15d
jne 0x7cfa
movq %r14, %rdi
callq 0x30d0
movq %rax, %rbx
movq 0x18338(%rip), %rdi     # 0x1fff0
leaq 0x10d14(%rip), %rsi     # 0x189d3
movl $0x28, %edx
callq 0x32a0
movq 0x18320(%rip), %rdi     # 0x1fff0
callq 0x30f0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3250
movq %rax, %rdi
callq 0x30f0
callq 0x3390
jmp 0x7c5d
movq %rax, %r14
callq 0x3390
movq %r14, %rdi
callq 0x33f0