// File: /workspace/github_cpp_makefile_star2_O3/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 $0x238, %rsp            # imm = 0x238
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x90(%rsp), %rax
movq %rax, -0x10(%rax)
xorl %r15d, %r15d
movq %r15, -0x8(%rax)
movb $0x0, (%rax)
movq %r15, 0x10(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, (%rsp)
leaq 0xb0c4(%rip), %rdx      # 0x455e6
leaq 0x1d6a7(%rip), %rcx     # 0x57bd0
xorl %r8d, %r8d
callq 0x76b0
movl %eax, %r14d
shll $0x18, %r14d
cmpl $0xff000000, %r14d      # imm = 0xFF000000
je 0x3a7d2
movq $0x0, 0x18(%rsp)
leaq 0x20(%rsp), %r15
leaq 0xb8(%rsp), %r12
movq 0x1d9f6(%rip), %rax     # 0x57f58
movq (%rax), %r13
testq %r13, %r13
leaq 0x9ad2(%rip), %rax      # 0x44041
cmoveq %rax, %r13
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%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 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3a5c0
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x7420
sarl $0x18, %r14d
leal -0x61(%r14), %eax
cmpl $0x13, %eax
ja 0x3a5f7
leaq 0xae78(%rip), %rdx      # 0x4544c
movslq (%rdx,%rax,4), %rcx
addq %rdx, %rcx
leaq 0x1e5b6(%rip), %rsi     # 0x58b98
leaq 0x1e613(%rip), %rax     # 0x58bfc
jmpq *%rcx
movb $0x1, 0x1e60e(%rip)     # 0x58c00
jmp 0x3a782
testl %r14d, %r14d
je 0x3a77b
cmpl $0x3f, %r14d
jne 0x3a782
movb $0x1, %al
movq %rax, 0x18(%rsp)
jmp 0x3a782
leaq 0x1e59b(%rip), %rsi     # 0x58bb8
jmp 0x3a771
movq %r12, %rdi
leaq 0x80(%rsp), %rsi
callq 0x7540
leaq 0xa0(%rsp), %r14
movq %r14, %rdi
leaq 0x80(%rsp), %rsi
movl $0x2c, %edx
callq 0x91c1
movq 0x10(%rsp), %rax
movapd 0xa0(%rsp), %xmm0
movq 0xb0(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movaps (%rsp), %xmm1
movapd %xmm0, (%rsp)
movaps %xmm1, 0x20(%rsp)
movq %rax, 0x30(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0xa0(%rsp)
movq $0x0, 0xb0(%rsp)
movq %r15, %rdi
callq 0xd1ac
movq %r14, %rdi
callq 0xd1ac
movq (%rsp), %rax
leaq 0x70(%rsp), %rcx
movq %rcx, 0x60(%rsp)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x60(%rsp), %rdi
callq 0xdf1c
leaq 0x60(%rsp), %rdi
callq 0xc6c7
cvttsd2si %xmm0, %eax
movl %eax, 0x1e1b4(%rip)     # 0x58890
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x3a6f8
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x7420
movq (%rsp), %rax
leaq 0x50(%rsp), %rcx
movq %rcx, 0x40(%rsp)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq 0x40(%rsp), %rdi
callq 0xdf1c
leaq 0x40(%rsp), %rdi
callq 0xc6c7
cvttsd2si %xmm0, %eax
movl %eax, 0x1e165(%rip)     # 0x58894
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x3a782
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x7420
jmp 0x3a782
leaq 0x1e148(%rip), %rax     # 0x5889c
jmp 0x3a75d
leaq 0x1e13b(%rip), %rax     # 0x58898
movq %r12, %rdi
movq %rax, %rsi
callq 0x7250
jmp 0x3a782
leaq 0x1e467(%rip), %rsi     # 0x58bd8
movq %r12, %rdi
callq 0x7540
jmp 0x3a782
movb $0x1, 0x1e476(%rip)     # 0x58bf8
movq %r12, %rdi
movq 0x1d7f4(%rip), %rsi     # 0x57f80
callq 0x75d0
leaq 0x130(%rsp), %rdi
callq 0x7130
movl %ebp, %edi
movq %rbx, %rsi
leaq 0xae3c(%rip), %rdx      # 0x455e6
leaq 0x1d41f(%rip), %rcx     # 0x57bd0
xorl %r8d, %r8d
callq 0x76b0
movl %eax, %r14d
shll $0x18, %r14d
cmpl $0xff000000, %r14d      # imm = 0xFF000000
jne 0x3a55b
movq 0x18(%rsp), %r15
movq 0x1d7c7(%rip), %r13     # 0x57fa0
movslq (%r13), %rax
subl %eax, %ebp
cmpl $0x2, %ebp
jl 0x3a8e1
jne 0x3a8ef
testb $0x1, %r15b
jne 0x3a907
leal 0x1(%rax), %ecx
movl %ecx, (%r13)
movq (%rbx,%rax,8), %r14
movq 0x1e356(%rip), %r15     # 0x58b60
leaq 0x1e347(%rip), %r12     # 0x58b58
movq %r14, %rdi
callq 0x7190
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x7640
movslq (%r13), %rax
leal 0x1(%rax), %ecx
movl %ecx, (%r13)
movq (%rbx,%rax,8), %rbx
movq 0x1e33e(%rip), %r14     # 0x58b80
leaq 0x1e32f(%rip), %r15     # 0x58b78
movq %rbx, %rdi
callq 0x7190
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %rbx, %rcx
movq %rax, %r8
callq 0x7640
leaq 0x1e2ed(%rip), %rdi     # 0x58b58
leaq 0x7a96(%rip), %rsi      # 0x42308
callq 0x70f0
testl %eax, %eax
jne 0x3a888
cmpl $0x0, 0x1e016(%rip)     # 0x58898
jle 0x3a93c
movq %rsp, %rdi
callq 0xd1ac
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x3a8b5
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x7420
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1d6ca(%rip), %rdi     # 0x57f98
leaq 0xad31(%rip), %rsi      # 0x45606
callq 0x7400
xorl %edi, %edi
callq 0x7510
movl $0x12, %edx
leaq 0x71b5(%rip), %rsi      # 0x41aa2
jmp 0x3a8fb
movl $0x13, %edx
leaq 0x71ba(%rip), %rsi      # 0x41ab5
movq 0x1d6e6(%rip), %rdi     # 0x57fe8
callq 0x74b0
movq 0x1d68a(%rip), %rdi     # 0x57f98
leaq 0x6b25(%rip), %rsi      # 0x4143a
movl $0x1, %edx
callq 0x74b0
movq 0x1d672(%rip), %rdi     # 0x57f98
leaq 0xacd9(%rip), %rsi      # 0x45606
callq 0x7400
movl $0x1, %edi
callq 0x7510
movq 0x1d6a5(%rip), %rdi     # 0x57fe8
leaq 0x7dbe(%rip), %rsi      # 0x42708
movl $0x6f, %edx
callq 0x74b0
movq 0x1d68d(%rip), %rdi     # 0x57fe8
leaq 0x7e16(%rip), %rsi      # 0x42778
movl $0x16, %edx
callq 0x74b0
movq 0x1d625(%rip), %rdi     # 0x57f98
leaq 0x6ac0(%rip), %rsi      # 0x4143a
movl $0x1, %edx
callq 0x74b0
movq 0x1d60d(%rip), %rdi     # 0x57f98
leaq 0xac74(%rip), %rsi      # 0x45606
callq 0x7400
jmp 0x3a932
jmp 0x3a9d9
movq %rax, %rbx
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x3a9dc
movq 0x50(%rsp), %rsi
jmp 0x3a9cb
movq %rax, %rbx
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x3a9dc
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x7420
jmp 0x3a9dc
jmp 0x3a9d9
jmp 0x3a9ff
movq %rax, %rbx
movq 0x1d59d(%rip), %rsi     # 0x57f80
leaq 0xb8(%rsp), %rdi
callq 0x75d0
leaq 0x130(%rsp), %rdi
callq 0x7130
jmp 0x3aa23
movq %rax, %rbx
jmp 0x3aa23
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3aa23
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x7420
movq %rsp, %rdi
callq 0xd1ac
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x3aa50
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x7420
movq %rbx, %rdi
callq 0x7740