// File: /workspace/github_cpp_makefile_star2_O3/millanek[P]evo/process_vcf_get_sequences.cpp
// Function: parseGetSeqOptions(int, char**)
void parseGetSeqOptions(int argc, char** argv) {
    bool die = false;
    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 's': arg >> opt::sampleNameFile; break;
            case 'H': arg >> opt::hetTreatment; break;
            case OPT_LDHAT: opt::bLDhat = true; break;
            case OPT_BY_SCAFFOLD: opt::bByScaffold = true; break;
            case OPT_SPLIT: arg >> opt::splitNum; break;
            case OPT_WG: opt::bWholeGenome = true; break;
            case OPT_PN: arg >> opt::outgroupFile; break;
            case OPT_ACC_GEN_BED: arg >> opt::accesibleGenBedFile; break;
            case OPT_SVD: opt::bSVD = true; break;
            case OPT_SVD_BOOT: arg >> opt::bootSVDnameRoot; break;
            case OPT_METH: opt::methylome = true; break;
            case 'h':
                std::cout << GETSEQ_USAGE_MESSAGE;
                exit(EXIT_SUCCESS);
        }
    }
    if (argc - optind < 1) {
        std::cerr << "missing arguments\n";
        die = true;
    } 
    else if (argc - optind > 2)
    {
        std::cerr << "too many arguments\n";
        die = true;
    }
    
    if (opt::hetTreatment != 'r' && opt::hetTreatment != 'p' && opt::hetTreatment != 'b' && opt::hetTreatment != 'i') {
        std::cerr << "The -H (--het-treatment) option can only have the values 'r', 'p', 'b', or 'i'\n";
        die = true;
    }
    
    if (opt::splitNum > 0 && opt::bByScaffold) {
        std::cerr << "The option --split is incompatible with --by-scaffold\n";
        die = true;
    }
    
    if (opt::bWholeGenome && (opt::splitNum > 0 || opt::bByScaffold)) {
        std::cerr << "The option --whole-genome is incompatible with --by-scaffold and --split\n";
        die = true;
    }
    
    if (opt::splitNum < 0) {
        std::cerr << "The argument to --split cannot be negative\n";
        die = true;
    }
    
    if (die) {
        std::cout << "\n" << GETSEQ_USAGE_MESSAGE;
        exit(EXIT_FAILURE);
    }
    
    // Parse the input filenames
    opt::vcfFile = argv[optind++];
    //std::cerr << "argc - optind " << argc - optind << std::endl;
    if( argc - optind == 1) {
        opt::genomeFile = argv[optind++];
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movq %rsi, %rbp
leaq 0x69f4a(%rip), %rdx     # 0xd517b
leaq 0x955a8(%rip), %rcx     # 0x1007e0
movq $0x0, 0x10(%rsp)
movl %edi, 0xc(%rsp)
xorl %r8d, %r8d
callq 0x8770
movl %eax, %r14d
shll $0x18, %r14d
cmpl $0xff000000, %r14d      # imm = 0xFF000000
jne 0x6b296
movq 0x96d5c(%rip), %rbx     # 0x101fc0
movl 0xc(%rsp), %eax
subl (%rbx), %eax
jle 0x6b441
cmpl $0x3, %eax
movq 0x10(%rsp), %rdx
jb 0x6b45b
movq 0x96d63(%rip), %rdi     # 0x101fe8
leaq 0x60c69(%rip), %rsi     # 0xcbef5
movl $0x13, %edx
jmp 0x6b454
leaq 0x28(%rsp), %rbx
movq $0x0, 0x10(%rsp)
leaq 0x18(%rsp), %r15
leaq 0x38(%rsp), %r12
movq 0x96ccb(%rip), %rax     # 0x101f80
movq (%rax), %r13
testq %r13, %r13
leaq 0x62709(%rip), %rax     # 0xcd9cb
cmoveq %rax, %r13
movq %rbx, 0x18(%rsp)
movq %r13, %rdi
callq 0x81f0
leaq (%rax,%r13), %rdx
movq %r15, %rdi
movq %r13, %rsi
callq 0x28a52
movq %r12, %rdi
movq %r15, %rsi
movl $0x8, %edx
callq 0x87b0
movq 0x18(%rsp), %rdi
cmpq %rbx, %rdi
je 0x6b309
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x8480
sarl $0x18, %r14d
cmpl $0x3e, %r14d
jg 0x6b343
cmpl $0x8, %r14d
ja 0x6b3cf
movl %r14d, %eax
leaq 0x69979(%rip), %rcx     # 0xd4ca0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
leaq 0x980bb(%rip), %rsi     # 0x1033f0
jmpq *%rax
movb $0x1, 0x98138(%rip)     # 0x103476
jmp 0x6b3cf
cmpl $0x67, %r14d
jg 0x6b366
cmpl $0x3f, %r14d
je 0x6b379
cmpl $0x48, %r14d
jne 0x6b3cf
movq %r12, %rdi
leaq 0x97209(%rip), %rsi     # 0x102568
callq 0x85a0
jmp 0x6b3cf
cmpl $0x73, %r14d
jne 0x6b421
leaq 0x98099(%rip), %rsi     # 0x103410
jmp 0x6b3b5
movb $0x1, %al
movq %rax, 0x10(%rsp)
jmp 0x6b3cf
movq %r12, %rdi
leaq 0x980e4(%rip), %rsi     # 0x103470
callq 0x82b0
jmp 0x6b3cf
movb $0x1, 0x980da(%rip)     # 0x103474
jmp 0x6b3cf
leaq 0x9808d(%rip), %rsi     # 0x103430
jmp 0x6b3b5
movb $0x1, 0x980cb(%rip)     # 0x103477
jmp 0x6b3cf
leaq 0x9809b(%rip), %rsi     # 0x103450
movq %r12, %rdi
callq 0x8560
jmp 0x6b3cf
movb $0x1, 0x980af(%rip)     # 0x103475
jmp 0x6b3cf
movb $0x1, 0x980a9(%rip)     # 0x103478
movq %r12, %rdi
movq 0x96bbf(%rip), %rsi     # 0x101f98
callq 0x8620
leaq 0xb0(%rsp), %rdi
callq 0x8190
movl 0xc(%rsp), %edi
movq %rbp, %rsi
leaq 0x69d82(%rip), %rdx     # 0xd517b
leaq 0x953e0(%rip), %rcx     # 0x1007e0
xorl %r8d, %r8d
callq 0x8770
movl %eax, %r14d
shll $0x18, %r14d
cmpl $0xff000000, %r14d      # imm = 0xFF000000
jne 0x6b2ae
jmp 0x6b25d
cmpl $0x68, %r14d
jne 0x6b3cf
movq 0x96b8a(%rip), %rdi     # 0x101fb8
leaq 0x69db0(%rip), %rsi     # 0xd51e5
callq 0x8460
xorl %edi, %edi
callq 0x8530
movq 0x96ba0(%rip), %rdi     # 0x101fe8
leaq 0x60a93(%rip), %rsi     # 0xcbee2
movl $0x12, %edx
callq 0x84e0
movb $0x1, %dl
movzbl 0x97106(%rip), %eax     # 0x102568
addl $-0x62, %eax
cmpl $0x10, %eax
ja 0x6b567
movl $0x14081, %ecx          # imm = 0x14081
btl %eax, %ecx
jae 0x6b567
movl 0x97fee(%rip), %eax     # 0x103470
testl %eax, %eax
jle 0x6b4af
cmpb $0x1, 0x97fea(%rip)     # 0x103477
jne 0x6b4af
movq 0x96b52(%rip), %rdi     # 0x101fe8
leaq 0x69c31(%rip), %rsi     # 0xd50ce
movl $0x36, %edx
callq 0x84e0
movb $0x1, %dl
movl 0x97fc1(%rip), %eax     # 0x103470
cmpb $0x1, 0x97fbe(%rip)     # 0x103474
jne 0x6b4cd
testl %eax, %eax
jg 0x6b586
cmpb $0x0, 0x97fb0(%rip)     # 0x103477
jne 0x6b586
testl %eax, %eax
js 0x6b5a7
testb $0x1, %dl
jne 0x6b5bf
movslq (%rbx), %rax
leal 0x1(%rax), %ecx
movl %ecx, (%rbx)
movq (%rbp,%rax,8), %r14
movq 0x97ec6(%rip), %r15     # 0x1033b8
leaq 0x97eb7(%rip), %r12     # 0x1033b0
movq %r14, %rdi
callq 0x81f0
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x86c0
movslq (%rbx), %rax
movl 0xc(%rsp), %ecx
subl %eax, %ecx
cmpl $0x1, %ecx
jne 0x6b555
leal 0x1(%rax), %ecx
movl %ecx, (%rbx)
movq (%rbp,%rax,8), %rbx
movq 0x97ea5(%rip), %r14     # 0x1033d8
leaq 0x97e96(%rip), %r15     # 0x1033d0
movq %rbx, %rdi
callq 0x81f0
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %rbx, %rcx
movq %rax, %r8
callq 0x86c0
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x96a7a(%rip), %rdi     # 0x101fe8
leaq 0x69b09(%rip), %rsi     # 0xd507e
movl $0x4f, %edx
callq 0x84e0
movb $0x1, %dl
jmp 0x6b47c
movq 0x96a5b(%rip), %rdi     # 0x101fe8
leaq 0x69b71(%rip), %rsi     # 0xd5105
movl $0x49, %edx
callq 0x84e0
cmpl $0x0, 0x97ecb(%rip)     # 0x103470
jns 0x6b5bf
movq 0x96a3a(%rip), %rdi     # 0x101fe8
leaq 0x69b9a(%rip), %rsi     # 0xd514f
movl $0x2b, %edx
callq 0x84e0
movq 0x969f2(%rip), %rdi     # 0x101fb8
leaq 0x5fe70(%rip), %rsi     # 0xcb43d
callq 0x8460
leaq 0x69c0c(%rip), %rsi     # 0xd51e5
movq %rax, %rdi
callq 0x8460
movl $0x1, %edi
callq 0x8530
jmp 0x6b5ed
movq %rax, %r14
movq 0x969a1(%rip), %rsi     # 0x101f98
leaq 0x38(%rsp), %rdi
callq 0x8620
leaq 0xb0(%rsp), %rdi
callq 0x8190
jmp 0x6b62f
movq %rax, %r14
jmp 0x6b62f
movq %rax, %r14
movq 0x18(%rsp), %rdi
cmpq %rbx, %rdi
je 0x6b62f
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x8480
movq %r14, %rdi
callq 0x8840