// File: /workspace/github_cpp_makefile_star2_O1/gchen98[P]macs/simulator.cpp
// Function: main
int main(int argc,char * argv[]){

    try{
        #ifdef DIAG
          cerr<<"Diagnostic mode is on\n";
        #endif
        Simulator simulator;
        if(argc<3){
            cerr<< "You did not specify any parameters. You must at least specify "<<
            "the number of chromosomes sampled and the sequence length."<<endl;
            simulator.printUsage();
        }
        cout<<COMMAND<<"\t";
        for (int i=0;i<argc;++i){
          if (i>0){
            cout<<" ";
          }
          cout<<argv[i];
        }
        cout<<endl;
        CommandArguments arguments;
        vector<string> subOption;
        // sample size
        subOption.push_back(string(argv[1]));
        // seq length
        subOption.push_back(string(argv[2]));
        arguments.push_back(subOption);
        subOption.clear();
        for (int i=3;i<argc;++i){
            subOption.push_back(string(argv[i]));
            if (i==argc-1 || (argv[i+1][0]=='-' && argv[i+1][1]>=65)){
                arguments.push_back(subOption);
                subOption.clear();
            }
        }

        simulator.readInputParameters(arguments);
        simulator.beginSimulation();
    }catch(const char* message){
      cerr<<"Exception at main:"<<endl<<message<<endl;
    }
	cerr<<"Program is complete\n";
	exit(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
cmpl $0x2, %edi
jg 0x7dfe
movq 0x1824e(%rip), %rdi     # 0x1fff0
leaq 0x10c69(%rip), %rsi     # 0x18a12
movl $0x3e, %edx
callq 0x32a0
movq 0x18236(%rip), %rbx     # 0x1fff0
leaq 0x10c90(%rip), %rsi     # 0x18a51
movl $0x3a, %edx
movq %rbx, %rdi
callq 0x32a0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3240
movsbl %al, %esi
movq 0x18204(%rip), %rdi     # 0x1fff0
callq 0x3040
movq %rax, %rdi
callq 0x31b0
callq 0x42aa
movq %rsi, %rbx
movl %edi, %r14d
movq 0x18465(%rip), %rsi     # 0x20270
movq 0x18466(%rip), %rdx     # 0x20278
movq 0x181b7(%rip), %r15     # 0x1ffd0
movq %r15, %rdi
callq 0x32a0
leaq 0xf2f5(%rip), %rsi      # 0x1711d
movl $0x1, %edx
movq %rax, %rdi
callq 0x32a0
movq %r14, 0x50(%rsp)
movl %r14d, %ebp
xorl %r14d, %r14d
leaq 0xfb6b(%rip), %r12      # 0x179b2
testq %r14, %r14
je 0x7e5c
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x32a0
movq (%rbx,%r14,8), %r13
testq %r13, %r13
je 0x7e7d
movq %r13, %rdi
callq 0x30e0
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x32a0
jmp 0x7e95
movq (%r15), %rax
movq -0x18(%rax), %rax
leaq (%r15,%rax), %rdi
movl 0x20(%r15,%rax), %esi
orl $0x1, %esi
callq 0x33c0
incq %r14
cmpq %r14, %rbp
jne 0x7e47
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x3240
movq 0x50(%rsp), %r14
movsbl %al, %esi
movq 0x18110(%rip), %rdi     # 0x1ffd0
callq 0x3040
movq %rax, %rdi
callq 0x31b0
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
xorl %eax, %eax
movq %rax, 0x70(%rsp)
movq %rax, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movq 0x8(%rbx), %rsi
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x81b6
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x93e2
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7f23
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3270
movq 0x10(%rbx), %rsi
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x81b6
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x93e2
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x7f61
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3270
leaq 0x60(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x857a
leaq 0x30(%rsp), %rdi
movq (%rdi), %rsi
callq 0x99fa
cmpl $0x3, %r14d
je 0x805e
leal -0x1(%r14), %r13d
cmpl $0x5, %r14d
movl $0x4, %ecx
cmovgel %r14d, %ecx
movq %rcx, 0x50(%rsp)
movl $0x3, %r15d
leaq 0x10(%rsp), %r14
movq %r13, 0x78(%rsp)
movq (%rbx,%r15,8), %rsi
movq %r14, %rdi
leaq 0xf(%rsp), %rdx
callq 0x81b6
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x93e2
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x7fe7
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3270
cmpq %r13, %r15
jne 0x8040
leaq 0x60(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x857a
movq 0x30(%rsp), %r12
movq 0x38(%rsp), %rbp
cmpq %r12, %rbp
je 0x8050
leaq 0x10(%r12), %r13
movq -0x10(%r13), %rdi
cmpq %rdi, %r13
je 0x8024
movq (%r13), %rsi
incq %rsi
callq 0x3270
leaq 0x20(%r13), %rax
addq $0x10, %r13
cmpq %rbp, %r13
movq %rax, %r13
jne 0x800f
movq %r12, 0x38(%rsp)
movq 0x78(%rsp), %r13
jmp 0x8050
movq 0x8(%rbx,%r15,8), %rax
cmpb $0x2d, (%rax)
jne 0x8050
cmpb $0x41, 0x1(%rax)
jge 0x7fec
incq %r15
cmpq 0x50(%rsp), %r15
jne 0x7fad
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x85a6
leaq 0x58(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x483a
leaq 0x80(%rsp), %rdi
callq 0x8640
leaq 0x58(%rsp), %rdi
callq 0x7ad0
leaq 0x30(%rsp), %rdi
callq 0x8682
leaq 0x60(%rsp), %rdi
callq 0x8640
leaq 0x58(%rsp), %rdi
callq 0x7d04
jmp 0x818b
jmp 0x8110
jmp 0x80d9
jmp 0x8110
movq %rdx, %r14
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x8640
jmp 0x8116
jmp 0x8110
movq %rdx, %r14
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
jmp 0x80fc
jmp 0x8110
movq %rdx, %r14
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8116
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3270
jmp 0x8116
movq %rdx, %r14
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x8682
leaq 0x60(%rsp), %rdi
callq 0x8640
jmp 0x8134
jmp 0x812e
movq %rdx, %r14
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x7d04
cmpl $0x1, %r14d
jne 0x81ad
movq %rbx, %rdi
callq 0x30d0
movq %rax, %rbx
movq 0x17e9a(%rip), %rdi     # 0x1fff0
leaq 0x1092f(%rip), %rsi     # 0x18a8c
movl $0x12, %edx
callq 0x32a0
movq 0x17e82(%rip), %rdi     # 0x1fff0
callq 0x30f0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3250
movq %rax, %rdi
callq 0x30f0
callq 0x3390
movq 0x17e5e(%rip), %rdi     # 0x1fff0
leaq 0x10906(%rip), %rsi     # 0x18a9f
callq 0x3250
xorl %edi, %edi
callq 0x32c0
movq %rax, %rbx
callq 0x3390
movq %rbx, %rdi
callq 0x33f0
nop