// File: /workspace/github_cpp_makefile_star2_O2/millanek[P]Dsuite/Dquartets.cpp
// Function: parseDquartetsOptions(int, char**)
void parseDquartetsOptions(int argc, char** argv) {
    bool die = false; string regionArgString; std::vector<string> regionArgs;
    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 'n': arg >> opt::runName; break;
            case 't': arg >> opt::treeFile; break;
            case 'j': arg >> opt::jkWindowSize; break;
            case 'k': arg >> opt::jkNum; break;
            case 'o': arg >> opt::providedOutPrefix; break;
            case OPT_NO_F4: opt::fStats = false; break;
            case 'l': arg >> opt::providedNumLines; break;
            case 'a': opt::allF4 = true; break;
            case 'r': arg >> regionArgString; regionArgs = split(regionArgString, ',');
                opt::regionStart = (int)stringToDouble(regionArgs[0]); opt::regionLength = (int)stringToDouble(regionArgs[1]);  break;
            case 'h':
                std::cout << DQUARTS_USAGE_MESSAGE;
                exit(EXIT_SUCCESS);
        }
    }
    
    if (argc - optind < 2) {
        std::cerr << "missing arguments\n";
        die = true;
    }
    else if (argc - optind > 2)
    {
        std::cerr << "too many arguments\n";
        die = true;
    }
    
    if (die) {
        std::cout << "\n" << DQUARTS_USAGE_MESSAGE;
        exit(EXIT_FAILURE);
    }
    
    // Parse the input filenames
    opt::vcfFile = argv[optind++];
    opt::setsFile = argv[optind++];
    
    if (opt::vcfFile == "stdin" && opt::providedNumLines <= 0) {
        std::cerr << "If you want to read the VCF via a pipe, you need to specify the number of lines in the input via the -l option\n";
        std::cerr << "See the example above\n";
        die = true;
    }
    
    if (die) {
        std::cout << "\n" << DQUARTS_USAGE_MESSAGE;
        exit(EXIT_FAILURE);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rsi, %rbx
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movl %edi, %ebp
movb $0x0, (%rax)
xorpd %xmm0, %xmm0
leaq 0x10(%rsp), %rax
movapd %xmm0, (%rax)
andq $0x0, 0x10(%rax)
movq $0x0, 0x8(%rsp)
leaq 0x88(%rsp), %r13
leaq 0xa8(%rsp), %r14
leaq 0x9b1d(%rip), %r12      # 0x3a3dc
movl %ebp, %edi
movq %rbx, %rsi
leaq 0x9cab(%rip), %rdx      # 0x3a576
leaq 0x2031e(%rip), %rcx     # 0x50bf0
xorl %r8d, %r8d
callq 0x76b0
movl %eax, %r15d
shll $0x18, %eax
cmpl $0xff000000, %eax       # imm = 0xFF000000
je 0x30a55
movq 0x20676(%rip), %rax     # 0x50f68
movq (%rax), %rsi
testq %rsi, %rsi
leaq 0x86d2(%rip), %rax      # 0x38fd1
cmoveq %rax, %rsi
movq %r13, %rdi
leaq 0x7(%rsp), %rdx
callq 0x8102
movq %r14, %rdi
movq %r13, %rsi
pushq $0x8
popq %rdx
callq 0x76c0
movsbl %r15b, %r15d
movq %r13, %rdi
callq 0x7898
leal -0x61(%r15), %eax
cmpl $0x13, %eax
ja 0x30956
movslq (%r12,%rax,4), %rcx
addq %r12, %rcx
leaq 0x21287(%rip), %rsi     # 0x51bc8
leaq 0x212e4(%rip), %rax     # 0x51c2c
jmpq *%rcx
movb $0x1, 0x212df(%rip)     # 0x51c30
jmp 0x30a48
testl %r15d, %r15d
je 0x30a41
cmpl $0x3f, %r15d
jne 0x30a48
movb $0x1, %al
movq %rax, 0x8(%rsp)
jmp 0x30a48
leaq 0x2126c(%rip), %rsi     # 0x51be8
jmp 0x30a37
movq %r14, %rdi
leaq 0x28(%rsp), %rsi
callq 0x7520
leaq 0x68(%rsp), %r15
movq %r13, %rdi
leaq 0x28(%rsp), %rsi
pushq $0x2c
popq %rdx
callq 0x88f1
leaq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x1455c
movq %r13, %rdi
callq 0xb80c
movq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x7590
movq %r15, %rdi
callq 0xaf68
cvttsd2si %xmm0, %eax
movl %eax, 0x20ee9(%rip)     # 0x518c0
movq %r15, %rdi
callq 0x7898
movq 0x10(%rsp), %rsi
addq $0x20, %rsi
leaq 0x48(%rsp), %rdi
callq 0x7590
leaq 0x48(%rsp), %r15
movq %r15, %rdi
callq 0xaf68
cvttsd2si %xmm0, %eax
movl %eax, 0x20ebb(%rip)     # 0x518c4
movq %r15, %rdi
callq 0x7898
jmp 0x30a48
leaq 0x20eb2(%rip), %rax     # 0x518cc
jmp 0x30a23
leaq 0x20ea5(%rip), %rax     # 0x518c8
movq %r14, %rdi
movq %rax, %rsi
callq 0x7270
jmp 0x30a48
leaq 0x211d1(%rip), %rsi     # 0x51c08
movq %r14, %rdi
callq 0x7520
jmp 0x30a48
movb $0x1, 0x211e0(%rip)     # 0x51c28
movq %r14, %rdi
callq 0x71d0
jmp 0x308bf
movq 0x20544(%rip), %r14     # 0x50fa0
movslq (%r14), %rax
subl %eax, %ebp
cmpl $0x2, %ebp
jl 0x30b0e
jne 0x30b17
testb $0x1, 0x8(%rsp)
jne 0x30b2a
leal 0x1(%rax), %ecx
movl %ecx, (%r14)
movq (%rbx,%rax,8), %rsi
leaq 0x210fc(%rip), %rdi     # 0x51b88
callq 0x7800
movslq (%r14), %rax
leal 0x1(%rax), %ecx
movl %ecx, (%r14)
movq (%rbx,%rax,8), %rsi
leaq 0x21103(%rip), %rdi     # 0x51ba8
callq 0x7800
leaq 0x210d7(%rip), %rdi     # 0x51b88
leaq 0x67e0(%rip), %rsi      # 0x37298
callq 0x813d
testb %al, %al
je 0x30ace
cmpl $0x0, 0x20e00(%rip)     # 0x518c8
jle 0x30b54
leaq 0x10(%rsp), %rdi
callq 0xb80c
leaq 0x28(%rsp), %rdi
callq 0x7898
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2049d(%rip), %rdi     # 0x50f98
leaq 0x9a94(%rip), %rsi      # 0x3a596
callq 0x7400
xorl %edi, %edi
callq 0x74f0
leaq 0x5f25(%rip), %rsi      # 0x36a3a
jmp 0x30b1e
leaq 0x5f2f(%rip), %rsi      # 0x36a4d
movq 0x204c3(%rip), %rdi     # 0x50fe8
callq 0x7400
movq 0x20467(%rip), %rdi     # 0x50f98
leaq 0x5902(%rip), %rsi      # 0x3643a
callq 0x7400
leaq 0x9a52(%rip), %rsi      # 0x3a596
movq %rax, %rdi
callq 0x7400
pushq $0x1
popq %rdi
callq 0x74f0
movq 0x2048d(%rip), %rdi     # 0x50fe8
leaq 0x6b36(%rip), %rsi      # 0x37698
callq 0x7400
movq 0x2047a(%rip), %rdi     # 0x50fe8
leaq 0x6b93(%rip), %rsi      # 0x37708
callq 0x7400
movq 0x20417(%rip), %rdi     # 0x50f98
leaq 0x58b2(%rip), %rsi      # 0x3643a
callq 0x7400
leaq 0x9a02(%rip), %rsi      # 0x3a596
movq %rax, %rdi
callq 0x7400
jmp 0x30b4c
jmp 0x30bbd
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
jmp 0x30bb2
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x7898
jmp 0x30bc0
jmp 0x30bbd
jmp 0x30bcf
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x71d0
jmp 0x30be4
movq %rax, %rbx
jmp 0x30be4
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x7898
leaq 0x10(%rsp), %rdi
callq 0xb80c
leaq 0x28(%rsp), %rdi
callq 0x7898
movq %rbx, %rdi
callq 0x7750