// File: /workspace/github_cpp_makefile_star2_O1/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 $0x248, %rsp            # imm = 0x248
movl %edi, %ebp
leaq 0xa0(%rsp), %rax
movq %rax, -0x10(%rax)
xorl %ecx, %ecx
movq %rcx, -0x8(%rax)
movb $0x0, (%rax)
movq $0x0, (%rsp)
movq %rcx, 0x20(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x10(%rsp)
leaq 0xaa16(%rip), %rdx      # 0x44556
leaq 0x1d089(%rip), %rcx     # 0x56bd0
movq %rsi, 0x8(%rsp)
xorl %r8d, %r8d
callq 0x76b0
movl %eax, %r14d
shll $0x18, %r14d
cmpl $0xff000000, %r14d      # imm = 0xFF000000
je 0x39e02
leaq 0x40(%rsp), %rbx
movq $0x0, (%rsp)
leaq 0x30(%rsp), %r15
leaq 0xc8(%rsp), %r12
movq 0x1d3cf(%rip), %rax     # 0x56f58
movq (%rax), %r13
testq %r13, %r13
leaq 0x941b(%rip), %rax      # 0x42fb1
cmoveq %rax, %r13
movq %rbx, 0x30(%rsp)
movq %r13, %rdi
callq 0x7190
leaq (%rax,%r13), %rdx
movq %r15, %rdi
movq %r13, %rsi
callq 0x88ba
movq %r12, %rdi
movq %r15, %rsi
movl $0x8, %edx
callq 0x76c0
movq 0x30(%rsp), %rdi
cmpq %rbx, %rdi
je 0x39bdd
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x7420
sarl $0x18, %r14d
leal -0x61(%r14), %eax
cmpl $0x13, %eax
ja 0x39c14
leaq 0xa7cb(%rip), %rdx      # 0x443bc
movslq (%rdx,%rax,4), %rcx
addq %rdx, %rcx
leaq 0x1df99(%rip), %rsi     # 0x57b98
leaq 0x1dff6(%rip), %rax     # 0x57bfc
jmpq *%rcx
movb $0x1, 0x1dff1(%rip)     # 0x57c00
jmp 0x39db5
testl %r14d, %r14d
je 0x39dae
cmpl $0x3f, %r14d
jne 0x39db5
movb $0x1, %al
movq %rax, (%rsp)
jmp 0x39db5
leaq 0x1df7f(%rip), %rsi     # 0x57bb8
jmp 0x39da4
movq %r12, %rdi
leaq 0x90(%rsp), %rsi
callq 0x7540
leaq 0xb0(%rsp), %r14
movq %r14, %rdi
leaq 0x90(%rsp), %rsi
movl $0x2c, %edx
callq 0x91a9
xorpd %xmm0, %xmm0
movapd %xmm0, 0x30(%rsp)
movapd 0x10(%rsp), %xmm0
movq 0x20(%rsp), %rax
movups 0xb0(%rsp), %xmm1
movaps %xmm1, 0x10(%rsp)
movq 0xc0(%rsp), %rcx
movq %rcx, 0x20(%rsp)
movaps 0x30(%rsp), %xmm1
movapd %xmm0, 0x30(%rsp)
movq %rax, 0x40(%rsp)
movups %xmm1, 0xb0(%rsp)
movq $0x0, 0xc0(%rsp)
movq %r15, %rdi
callq 0xd250
movq %r14, %rdi
callq 0xd250
movq 0x10(%rsp), %rax
leaq 0x80(%rsp), %rcx
movq %rcx, 0x70(%rsp)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x70(%rsp), %rdi
callq 0xdfb6
leaq 0x70(%rsp), %rdi
callq 0xc76a
cvttsd2si %xmm0, %eax
movl %eax, 0x1db88(%rip)     # 0x57890
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x39d2a
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x7420
movq 0x10(%rsp), %rax
leaq 0x60(%rsp), %rcx
movq %rcx, 0x50(%rsp)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq 0x50(%rsp), %rdi
callq 0xdfb6
leaq 0x50(%rsp), %rdi
callq 0xc76a
cvttsd2si %xmm0, %eax
movl %eax, 0x1db32(%rip)     # 0x57894
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x39db5
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x7420
jmp 0x39db5
leaq 0x1db15(%rip), %rax     # 0x5789c
jmp 0x39d90
leaq 0x1db08(%rip), %rax     # 0x57898
movq %r12, %rdi
movq %rax, %rsi
callq 0x7250
jmp 0x39db5
leaq 0x1de34(%rip), %rsi     # 0x57bd8
movq %r12, %rdi
callq 0x7540
jmp 0x39db5
movb $0x1, 0x1de43(%rip)     # 0x57bf8
movq %r12, %rdi
movq 0x1d1c1(%rip), %rsi     # 0x56f80
callq 0x75d0
leaq 0x140(%rsp), %rdi
callq 0x7130
movl %ebp, %edi
movq 0x8(%rsp), %rsi
leaq 0xa777(%rip), %rdx      # 0x44556
leaq 0x1cdea(%rip), %rcx     # 0x56bd0
xorl %r8d, %r8d
callq 0x76b0
movl %eax, %r14d
shll $0x18, %r14d
cmpl $0xff000000, %r14d      # imm = 0xFF000000
jne 0x39b82
movq 0x1d197(%rip), %rbx     # 0x56fa0
subl (%rbx), %ebp
cmpl $0x2, %ebp
jge 0x39e1e
movl $0x12, %edx
leaq 0x6c1e(%rip), %rsi      # 0x40a3a
jmp 0x39e30
movq (%rsp), %r13
je 0x39e3f
movl $0x13, %edx
leaq 0x6c1d(%rip), %rsi      # 0x40a4d
movb $0x1, %r13b
movq 0x1d1ae(%rip), %rdi     # 0x56fe8
callq 0x74b0
testb $0x1, %r13b
jne 0x39f75
movslq (%rbx), %rax
leal 0x1(%rax), %ecx
movl %ecx, (%rbx)
movq 0x8(%rsp), %rcx
movq (%rcx,%rax,8), %r14
movq 0x1dcff(%rip), %r15     # 0x57b60
leaq 0x1dcf0(%rip), %r12     # 0x57b58
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 0x8(%rsp), %rcx
movq (%rcx,%rax,8), %rbx
movq 0x1dce5(%rip), %r14     # 0x57b80
leaq 0x1dcd6(%rip), %r15     # 0x57b78
movq %rbx, %rdi
callq 0x7190
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %rbx, %rcx
movq %rax, %r8
callq 0x7640
leaq 0x1dc94(%rip), %rdi     # 0x57b58
leaq 0x73ad(%rip), %rsi      # 0x41278
callq 0x70f0
testl %eax, %eax
jne 0x39f10
cmpl $0x0, 0x1d9bd(%rip)     # 0x57898
jg 0x39f10
movq 0x1d104(%rip), %rdi     # 0x56fe8
leaq 0x778d(%rip), %rsi      # 0x41678
movl $0x6f, %edx
callq 0x74b0
movb $0x1, %r13b
movq 0x1d0e9(%rip), %rdi     # 0x56fe8
leaq 0x77e2(%rip), %rsi      # 0x416e8
movl $0x16, %edx
callq 0x74b0
testb $0x1, %r13b
jne 0x39fa2
leaq 0x10(%rsp), %rdi
callq 0xd250
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x39f49
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x7420
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1d036(%rip), %rdi     # 0x56f98
leaq 0xa60d(%rip), %rsi      # 0x44576
callq 0x7400
xorl %edi, %edi
callq 0x7510
movq 0x1d01c(%rip), %rdi     # 0x56f98
leaq 0x64b7(%rip), %rsi      # 0x4043a
movl $0x1, %edx
callq 0x74b0
movq 0x1d004(%rip), %rdi     # 0x56f98
leaq 0xa5db(%rip), %rsi      # 0x44576
callq 0x7400
jmp 0x39fcd
movq 0x1cfef(%rip), %rdi     # 0x56f98
leaq 0x648a(%rip), %rsi      # 0x4043a
movl $0x1, %edx
callq 0x74b0
movq 0x1cfd7(%rip), %rdi     # 0x56f98
leaq 0xa5ae(%rip), %rsi      # 0x44576
callq 0x7400
movl $0x1, %edi
callq 0x7510
jmp 0x3a01d
movq %rax, %r14
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x3a020
movq 0x60(%rsp), %rsi
jmp 0x3a00f
movq %rax, %r14
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x3a020
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x7420
jmp 0x3a020
jmp 0x3a01d
jmp 0x3a043
movq %rax, %r14
movq 0x1cf59(%rip), %rsi     # 0x56f80
leaq 0xc8(%rsp), %rdi
callq 0x75d0
leaq 0x140(%rsp), %rdi
callq 0x7130
jmp 0x3a062
movq %rax, %r14
jmp 0x3a062
movq %rax, %r14
movq 0x30(%rsp), %rdi
cmpq %rbx, %rdi
je 0x3a062
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x7420
leaq 0x10(%rsp), %rdi
callq 0xd250
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x3a091
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x7420
movq %r14, %rdi
callq 0x7740
nop