// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]Dsuite/D.cpp
// Function: parseAbbaBabaOptions(int, char**)
void parseAbbaBabaOptions(int argc, char** argv) {
    bool die = false;
    std::vector<string> windowSizeStep;
    for (char c; (c = getopt_long(argc, argv, shortopts, longopts, NULL)) != -1;)
    {
        std::istringstream arg(optarg != NULL ? optarg : "");
        switch (c)
        {
            case '?': die = true; break;
            case 'w':
                windowSizeStep = split(arg.str(), ',');
                if(windowSizeStep.size() != 2) {std::cerr << "The -w option requires two arguments, separated by a comma ','\n"; exit(EXIT_FAILURE);}
                opt::windowSize = atoi(windowSizeStep[0].c_str());
                opt::windowStep = atoi(windowSizeStep[1].c_str());
                break;
            case 'n': arg >> opt::runName; break;
            case 'g': opt::useGenotypeProbabilities = true; break;
            case 'h':
                std::cout << ABBA_USAGE_MESSAGE;
                exit(EXIT_SUCCESS);
        }
    }
    
    if (argc - optind < 3) {
        std::cerr << "missing arguments\n";
        die = true;
    }
    else if (argc - optind > 3)
    {
        std::cerr << "too many arguments\n";
        die = true;
    }
    
    if (die) {
        std::cout << "\n" << ABBA_USAGE_MESSAGE;
        exit(EXIT_FAILURE);
    }
    
    // Parse the input filenames
    opt::vcfFile = argv[optind++];
    opt::setsFile = argv[optind++];
    opt::testTriosFile = argv[optind++];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movl %edi, %ebp
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
leaq 0x2df9a(%rip), %rdx     # 0x40c99
leaq 0x4370a(%rip), %rcx     # 0x56410
movq $0x0, 0x8(%rsp)
movq %rsi, (%rsp)
xorl %r8d, %r8d
callq 0x76b0
movl %eax, %r15d
shll $0x18, %r15d
cmpl $0xff000000, %r15d      # imm = 0xFF000000
je 0x12f19
leaq 0x40(%rsp), %rbx
movq $0x0, 0x8(%rsp)
leaq 0x30(%rsp), %r12
leaq 0x88(%rsp), %r13
movq 0x44207(%rip), %rax     # 0x56f58
movq (%rax), %r14
testq %r14, %r14
leaq 0x30253(%rip), %rax     # 0x42fb1
cmoveq %rax, %r14
movq %rbx, 0x30(%rsp)
movq %r14, %rdi
callq 0x7190
leaq (%rax,%r14), %rdx
movq %r12, %rdi
movq %r14, %rsi
callq 0x88ba
movq %r13, %rdi
movq %r12, %rsi
movl $0x8, %edx
callq 0x76c0
movq 0x30(%rsp), %rdi
cmpq %rbx, %rdi
je 0x12da5
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x7420
sarl $0x18, %r15d
cmpl $0x67, %r15d
jle 0x12e94
cmpl $0x6e, %r15d
je 0x12eb2
cmpl $0x77, %r15d
jne 0x12ec3
movq %r12, %rdi
leaq 0x98(%rsp), %rsi
callq 0x7660
leaq 0x70(%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
movl $0x2c, %edx
callq 0x91a9
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movaps 0x10(%rsp), %xmm0
movq 0x20(%rsp), %rax
movups 0x70(%rsp), %xmm1
movaps %xmm1, 0x10(%rsp)
movq 0x80(%rsp), %rcx
movq %rcx, 0x20(%rsp)
movaps 0x50(%rsp), %xmm1
movaps %xmm0, 0x50(%rsp)
movq %rax, 0x60(%rsp)
movups %xmm1, 0x70(%rsp)
movq $0x0, 0x80(%rsp)
leaq 0x50(%rsp), %rdi
callq 0xd250
movq %r14, %rdi
callq 0xd250
movq 0x30(%rsp), %rdi
cmpq %rbx, %rdi
je 0x12e5e
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x7420
movq 0x10(%rsp), %r14
movq 0x18(%rsp), %rax
subq %r14, %rax
cmpq $0x40, %rax
jne 0x13042
movq (%r14), %rdi
callq 0x7650
movl %eax, 0x445bd(%rip)     # 0x57440
movq 0x20(%r14), %rdi
callq 0x7650
movl %eax, 0x445b2(%rip)     # 0x57444
jmp 0x12ecd
cmpl $0x3f, %r15d
je 0x12ea9
cmpl $0x67, %r15d
jne 0x12ecd
movb $0x1, 0x44ad9(%rip)     # 0x57980
jmp 0x12ecd
movb $0x1, %al
movq %rax, 0x8(%rsp)
jmp 0x12ecd
movq %r13, %rdi
leaq 0x44aa4(%rip), %rsi     # 0x57960
callq 0x7540
jmp 0x12ecd
cmpl $0x68, %r15d
je 0x13028
movq %r13, %rdi
movq 0x440a9(%rip), %rsi     # 0x56f80
callq 0x75d0
leaq 0x100(%rsp), %rdi
callq 0x7130
movl %ebp, %edi
movq (%rsp), %rsi
leaq 0x2dda3(%rip), %rdx     # 0x40c99
leaq 0x43513(%rip), %rcx     # 0x56410
xorl %r8d, %r8d
callq 0x76b0
movl %eax, %r15d
shll $0x18, %r15d
cmpl $0xff000000, %r15d      # imm = 0xFF000000
jne 0x12d4a
movq 0x44080(%rip), %rbx     # 0x56fa0
subl (%rbx), %ebp
cmpl $0x3, %ebp
jge 0x12f35
movl $0x12, %edx
leaq 0x2db07(%rip), %rsi     # 0x40a3a
jmp 0x12f48
movq 0x8(%rsp), %r14
je 0x12f57
movl $0x13, %edx
leaq 0x2db05(%rip), %rsi     # 0x40a4d
movb $0x1, %r14b
movq 0x44096(%rip), %rdi     # 0x56fe8
callq 0x74b0
testb $0x1, %r14b
jne 0x1305f
movslq (%rbx), %rax
leal 0x1(%rax), %ecx
movl %ecx, (%rbx)
movq (%rsp), %rcx
movq (%rcx,%rax,8), %r14
movq 0x44990(%rip), %r15     # 0x57908
leaq 0x44981(%rip), %r12     # 0x57900
movq %r14, %rdi
callq 0x7190
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x7640
movslq (%rbx), %rax
leal 0x1(%rax), %ecx
movl %ecx, (%rbx)
movq (%rsp), %rcx
movq (%rcx,%rax,8), %r14
movq 0x44977(%rip), %r15     # 0x57928
leaq 0x44968(%rip), %r12     # 0x57920
movq %r14, %rdi
callq 0x7190
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x7640
movslq (%rbx), %rax
leal 0x1(%rax), %ecx
movl %ecx, (%rbx)
movq (%rsp), %rcx
movq (%rcx,%rax,8), %rbx
movq 0x4495e(%rip), %r14     # 0x57948
leaq 0x4494f(%rip), %r15     # 0x57940
movq %rbx, %rdi
callq 0x7190
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %rbx, %rcx
movq %rax, %r8
callq 0x7640
leaq 0x10(%rsp), %rdi
callq 0xd250
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x43f69(%rip), %rdi     # 0x56f98
leaq 0x2dc8e(%rip), %rsi     # 0x40cc4
callq 0x7400
xorl %edi, %edi
callq 0x7510
movq 0x43f9f(%rip), %rdi     # 0x56fe8
leaq 0x2d9aa(%rip), %rsi     # 0x409fa
callq 0x7400
movl $0x1, %edi
callq 0x7510
movq 0x43f32(%rip), %rdi     # 0x56f98
leaq 0x2d3cd(%rip), %rsi     # 0x4043a
movl $0x1, %edx
callq 0x74b0
movq 0x43f1a(%rip), %rdi     # 0x56f98
leaq 0x2dc3f(%rip), %rsi     # 0x40cc4
callq 0x7400
jmp 0x13055
jmp 0x130ac
movq %rax, %r14
movq 0x30(%rsp), %rdi
cmpq %rbx, %rdi
je 0x130af
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x7420
jmp 0x130af
jmp 0x130ac
movq %rax, %r14
movq 0x43eca(%rip), %rsi     # 0x56f80
leaq 0x88(%rsp), %rdi
callq 0x75d0
leaq 0x100(%rsp), %rdi
callq 0x7130
jmp 0x130f3
jmp 0x130d4
movq %rax, %r14
jmp 0x130f3
movq %rax, %r14
movq 0x30(%rsp), %rdi
cmpq %rbx, %rdi
je 0x130f3
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x7420
leaq 0x10(%rsp), %rdi
callq 0xd250
movq %r14, %rdi
callq 0x7740
nop