// File: /workspace/github_cpp_makefile_star2_O2/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, %rbx
movl %edi, %ebp
movq $0x0, 0x10(%rsp)
leaq 0x18(%rsp), %r12
leaq 0x38(%rsp), %r13
leaq 0x4fd49(%rip), %r14     # 0xa33e0
movl %ebp, %edi
movq %rbx, %rsi
leaq 0x50218(%rip), %rdx     # 0xa38bb
leaq 0x88156(%rip), %rcx     # 0xdb800
xorl %r8d, %r8d
callq 0x8790
movl %eax, %r15d
shll $0x18, %eax
cmpl $0xff000000, %eax       # imm = 0xFF000000
je 0x537c1
movq 0x898c6(%rip), %rax     # 0xdcf90
movq (%rax), %rsi
testq %rsi, %rsi
leaq 0x46748(%rip), %rax     # 0x99e1f
cmoveq %rax, %rsi
movq %r12, %rdi
leaq 0xf(%rsp), %rdx
callq 0x21904
movq %r13, %rdi
movq %r12, %rsi
pushq $0x8
popq %rdx
callq 0x87e0
movsbl %r15b, %r15d
movq %r12, %rdi
callq 0x8978
cmpl $0x8, %r15d
ja 0x53727
movl %r15d, %eax
movslq (%r14,%rax,4), %rax
addq %r14, %rax
leaq 0x8ad07(%rip), %rsi     # 0xde420
jmpq *%rax
movb $0x1, 0x8ad84(%rip)     # 0xde4a6
jmp 0x537b4
cmpl $0x3f, %r15d
je 0x5375f
cmpl $0x48, %r15d
je 0x53782
cmpl $0x73, %r15d
je 0x53756
cmpl $0x68, %r15d
jne 0x537b4
jmp 0x538da
movb $0x1, 0x8ad59(%rip)     # 0xde4a4
jmp 0x537b4
movb $0x1, 0x8ad53(%rip)     # 0xde4a7
jmp 0x537b4
leaq 0x8ace3(%rip), %rsi     # 0xde440
jmp 0x5379a
movb $0x1, %al
movq %rax, 0x10(%rsp)
jmp 0x537b4
movq %r13, %rdi
leaq 0x8ad2e(%rip), %rsi     # 0xde4a0
callq 0x82e0
jmp 0x537b4
leaq 0x8ace0(%rip), %rsi     # 0xde460
jmp 0x5379a
movq %r13, %rdi
leaq 0x89e0c(%rip), %rsi     # 0xdd598
callq 0x85c0
jmp 0x537b4
leaq 0x8ace6(%rip), %rsi     # 0xde480
movq %r13, %rdi
callq 0x8570
jmp 0x537b4
movb $0x1, 0x8acfa(%rip)     # 0xde4a5
jmp 0x537b4
movb $0x1, 0x8acf4(%rip)     # 0xde4a8
movq %r13, %rdi
callq 0x8220
jmp 0x53697
movq 0x897f8(%rip), %r14     # 0xdcfc0
movl %ebp, %eax
subl (%r14), %eax
jle 0x537e2
cmpl $0x3, %eax
movq 0x10(%rsp), %rdx
jb 0x537f7
leaq 0x42b55(%rip), %rsi     # 0x96335
jmp 0x537e9
leaq 0x42b39(%rip), %rsi     # 0x96322
movq 0x897f8(%rip), %rdi     # 0xdcfe8
callq 0x8480
movb $0x1, %dl
movzbl 0x89d9a(%rip), %eax     # 0xdd598
addl $-0x62, %eax
cmpl $0x10, %eax
ja 0x538c0
movl $0x14081, %ecx          # imm = 0x14081
btl %eax, %ecx
jae 0x538c0
movl 0x8ac82(%rip), %eax     # 0xde4a0
testl %eax, %eax
jle 0x53846
cmpb $0x1, 0x8ac7e(%rip)     # 0xde4a7
jne 0x53846
movq 0x897b6(%rip), %rdi     # 0xdcfe8
leaq 0x4ffd5(%rip), %rsi     # 0xa380e
callq 0x8480
movb $0x1, %dl
movl 0x8ac5a(%rip), %eax     # 0xde4a0
cmpb $0x1, 0x8ac57(%rip)     # 0xde4a4
jne 0x53864
testl %eax, %eax
jg 0x538f4
cmpb $0x0, 0x8ac49(%rip)     # 0xde4a7
jne 0x538f4
testl %eax, %eax
js 0x53910
testb $0x1, %dl
jne 0x53923
movslq (%r14), %rax
leal 0x1(%rax), %ecx
movl %ecx, (%r14)
movq (%rbx,%rax,8), %rsi
leaq 0x8ab57(%rip), %rdi     # 0xde3e0
callq 0x88f0
movslq (%r14), %rax
subl %eax, %ebp
cmpl $0x1, %ebp
jne 0x538ae
leal 0x1(%rax), %ecx
movl %ecx, (%r14)
movq (%rbx,%rax,8), %rsi
leaq 0x8ab57(%rip), %rdi     # 0xde400
callq 0x88f0
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x89721(%rip), %rdi     # 0xdcfe8
leaq 0x4fef0(%rip), %rsi     # 0xa37be
callq 0x8480
movb $0x1, %dl
jmp 0x53818
movq 0x896d7(%rip), %rdi     # 0xdcfb8
leaq 0x5003d(%rip), %rsi     # 0xa3925
callq 0x8480
xorl %edi, %edi
callq 0x8540
movq 0x896ed(%rip), %rdi     # 0xdcfe8
leaq 0x4ff43(%rip), %rsi     # 0xa3845
callq 0x8480
cmpl $0x0, 0x8ab92(%rip)     # 0xde4a0
jns 0x53923
movq 0x896d1(%rip), %rdi     # 0xdcfe8
leaq 0x4ff71(%rip), %rsi     # 0xa388f
callq 0x8480
movq 0x8968e(%rip), %rdi     # 0xdcfb8
leaq 0x4001c(%rip), %rsi     # 0x9394d
callq 0x8480
leaq 0x4ffe8(%rip), %rsi     # 0xa3925
movq %rax, %rdi
callq 0x8480
pushq $0x1
popq %rdi
callq 0x8540
jmp 0x5394f
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x8220
jmp 0x53970
movq %rax, %rbx
jmp 0x53970
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x8978
movq %rbx, %rdi
callq 0x8870