// File: /workspace/github_cpp_makefile_star2_O2/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 $0x88, %rsp
cmpl $0x2, %edi
jg 0x6942
movq 0x186d6(%rip), %rdi     # 0x1eff0
leaq 0xf0fa(%rip), %rsi      # 0x15a1b
callq 0x3250
leaq 0xf12d(%rip), %rsi      # 0x15a5a
movq %rax, %rdi
callq 0x3250
movq %rax, %rdi
callq 0x3100
callq 0x3bfe
movq %rsi, %rbx
movq %rdi, %r13
movq 0x18681(%rip), %rdi     # 0x1efd0
leaq 0x1891a(%rip), %rsi     # 0x1f270
callq 0x3210
leaq 0xd7c4(%rip), %rsi      # 0x14126
movq %rax, %rdi
callq 0x3250
movl %r13d, %ebp
xorl %r14d, %r14d
movq 0x18659(%rip), %r15     # 0x1efd0
leaq 0xe03d(%rip), %r12      # 0x149bb
cmpq %r14, %rbp
je 0x69a4
testq %r14, %r14
je 0x6993
movq %r15, %rdi
movq %r12, %rsi
callq 0x3250
movq (%rbx,%r14,8), %rsi
movq %r15, %rdi
callq 0x3250
incq %r14
jmp 0x697e
movq 0x18625(%rip), %rdi     # 0x1efd0
callq 0x3100
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
andq $0x0, 0x60(%rsp)
movaps %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
movq 0x8(%rbx), %rsi
leaq 0x30(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x6bcc
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x816c
leaq 0x30(%rsp), %rdi
callq 0x3468
movq 0x10(%rbx), %rsi
leaq 0x30(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x6bcc
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x816c
leaq 0x30(%rsp), %rdi
callq 0x3468
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x6f0c
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x6f38
decl %r13d
addq $-0x3, %rbp
addq $-0x3, %r13
xorl %r14d, %r14d
leaq 0x30(%rsp), %r12
cmpq %r14, %rbp
je 0x6aab
movq 0x18(%rbx,%r14,8), %rsi
movq %r12, %rdi
leaq 0x7(%rsp), %rdx
callq 0x6bcc
movq %r15, %rdi
movq %r12, %rsi
callq 0x816c
movq %r12, %rdi
callq 0x3468
cmpq %r14, %r13
jne 0x6a96
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0x6f0c
movq %r15, %rdi
callq 0x6f38
jmp 0x6aa6
movq 0x20(%rbx,%r14,8), %rax
cmpb $0x2d, (%rax)
jne 0x6aa6
cmpb $0x41, 0x1(%rax)
jge 0x6a7f
incq %r14
jmp 0x6a50
leaq 0x70(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x6f40
leaq 0x8(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x4166
leaq 0x70(%rsp), %rdi
callq 0x6f9a
leaq 0x8(%rsp), %rdi
callq 0x6732
leaq 0x10(%rsp), %rdi
callq 0x6fbc
leaq 0x50(%rsp), %rdi
callq 0x6f9a
leaq 0x8(%rsp), %rdi
callq 0x68b8
jmp 0x6ba2
movq %rdx, %r14
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x6f9a
jmp 0x6b36
jmp 0x6b30
jmp 0x6b1e
jmp 0x6b30
jmp 0x6b30
jmp 0x6b1e
jmp 0x6b30
movq %rdx, %r14
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x3468
jmp 0x6b36
movq %rdx, %r14
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x6fbc
leaq 0x50(%rsp), %rdi
callq 0x6f9a
jmp 0x6b54
jmp 0x6b4e
movq %rdx, %r14
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x68b8
cmpl $0x1, %r14d
jne 0x6bc4
movq %rbx, %rdi
callq 0x30d0
movq %rax, %rbx
movq 0x1847a(%rip), %rdi     # 0x1eff0
leaq 0xef18(%rip), %rsi      # 0x15a95
callq 0x3250
movq %rax, %rdi
callq 0x3100
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3250
movq %rax, %rdi
callq 0x3100
callq 0x33a0
movq 0x18447(%rip), %rdi     # 0x1eff0
leaq 0xeef8(%rip), %rsi      # 0x15aa8
callq 0x3250
xorl %edi, %edi
callq 0x32c0
movq %rax, %rbx
callq 0x33a0
movq %rbx, %rdi
callq 0x3400