// File: /workspace/github_cpp_makefile_star2_O3/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 0x7e48
movq 0x18204(%rip), %rdi     # 0x1fff0
leaq 0x10c1f(%rip), %rsi     # 0x18a12
movl $0x3e, %edx
callq 0x32a0
movq 0x181ec(%rip), %rbx     # 0x1fff0
leaq 0x10c46(%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 0x181ba(%rip), %rdi     # 0x1fff0
callq 0x3040
movq %rax, %rdi
callq 0x31b0
callq 0x430c
movq %rsi, %rbx
movl %edi, %r14d
movq 0x1841b(%rip), %rsi     # 0x20270
movq 0x1841c(%rip), %rdx     # 0x20278
movq 0x1816d(%rip), %r15     # 0x1ffd0
movq %r15, %rdi
callq 0x32a0
leaq 0xf2ab(%rip), %rsi      # 0x1711d
movl $0x1, %edx
movq %rax, %rdi
callq 0x32a0
movq %r14, 0x50(%rsp)
movl %r14d, %ebp
xorl %r14d, %r14d
leaq 0xfb21(%rip), %r12      # 0x179b2
testq %r14, %r14
je 0x7ea6
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x32a0
movq (%rbx,%r14,8), %r13
testq %r13, %r13
je 0x7ec7
movq %r13, %rdi
callq 0x30e0
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x32a0
jmp 0x7edf
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 0x7e91
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x3240
movq 0x50(%rsp), %r14
movsbl %al, %esi
movq 0x180c6(%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 0x8200
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x93bc
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7f6d
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3270
movq 0x10(%rbx), %rsi
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x8200
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x93bc
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x7fab
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3270
leaq 0x60(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x85b0
leaq 0x30(%rsp), %rdi
movq (%rdi), %rsi
callq 0x99d2
cmpl $0x3, %r14d
je 0x80a8
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 0x8200
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x93bc
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x8031
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3270
cmpq %r13, %r15
jne 0x808a
leaq 0x60(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x85b0
movq 0x30(%rsp), %r12
movq 0x38(%rsp), %rbp
cmpq %r12, %rbp
je 0x809a
leaq 0x10(%r12), %r13
movq -0x10(%r13), %rdi
cmpq %rdi, %r13
je 0x806e
movq (%r13), %rsi
incq %rsi
callq 0x3270
leaq 0x20(%r13), %rax
addq $0x10, %r13
cmpq %rbp, %r13
movq %rax, %r13
jne 0x8059
movq %r12, 0x38(%rsp)
movq 0x78(%rsp), %r13
jmp 0x809a
movq 0x8(%rbx,%r15,8), %rax
cmpb $0x2d, (%rax)
jne 0x809a
cmpb $0x41, 0x1(%rax)
jge 0x8036
incq %r15
cmpq 0x50(%rsp), %r15
jne 0x7ff7
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x85dc
leaq 0x58(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x48ac
leaq 0x80(%rsp), %rdi
callq 0x8676
leaq 0x58(%rsp), %rdi
callq 0x7b5c
leaq 0x30(%rsp), %rdi
callq 0x86be
leaq 0x60(%rsp), %rdi
callq 0x8676
leaq 0x58(%rsp), %rdi
callq 0x7d56
jmp 0x81d5
jmp 0x815a
jmp 0x8123
jmp 0x815a
movq %rdx, %r14
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x8676
jmp 0x8160
jmp 0x815a
movq %rdx, %r14
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
jmp 0x8146
jmp 0x815a
movq %rdx, %r14
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8160
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3270
jmp 0x8160
movq %rdx, %r14
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x86be
leaq 0x60(%rsp), %rdi
callq 0x8676
jmp 0x817e
jmp 0x8178
movq %rdx, %r14
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x7d56
cmpl $0x1, %r14d
jne 0x81f7
movq %rbx, %rdi
callq 0x30d0
movq %rax, %rbx
movq 0x17e50(%rip), %rdi     # 0x1fff0
leaq 0x108e5(%rip), %rsi     # 0x18a8c
movl $0x12, %edx
callq 0x32a0
movq 0x17e38(%rip), %rdi     # 0x1fff0
callq 0x30f0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3250
movq %rax, %rdi
callq 0x30f0
callq 0x3390
movq 0x17e14(%rip), %rdi     # 0x1fff0
leaq 0x108bc(%rip), %rsi     # 0x18a9f
callq 0x3250
xorl %edi, %edi
callq 0x32c0
movq %rax, %rbx
callq 0x3390
movq %rbx, %rdi
callq 0x33f0
nop