// File: /workspace/github_cpp_makefile_star2_O1/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 0x700a9(%rip), %rdx     # 0xdb63b
leaq 0x9e247(%rip), %rcx     # 0x1097e0
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 0x6b5f7
movq 0x9f9fb(%rip), %rbx     # 0x10afc0
movl 0xc(%rsp), %eax
subl (%rbx), %eax
jle 0x6b7a2
cmpl $0x3, %eax
movq 0x10(%rsp), %rdx
jl 0x6b7bc
movq 0x9fa02(%rip), %rdi     # 0x10afe8
leaq 0x62bd8(%rip), %rsi     # 0xce1c5
movl $0x13, %edx
jmp 0x6b7b5
leaq 0x28(%rsp), %rbx
movq $0x0, 0x10(%rsp)
leaq 0x18(%rsp), %r15
leaq 0x38(%rsp), %r12
movq 0x9f96a(%rip), %rax     # 0x10af80
movq (%rax), %r13
testq %r13, %r13
leaq 0x6665c(%rip), %rax     # 0xd1c7f
cmoveq %rax, %r13
movq %rbx, 0x18(%rsp)
movq %r13, %rdi
callq 0x81f0
leaq (%rax,%r13), %rdx
movq %r15, %rdi
movq %r13, %rsi
callq 0x28952
movq %r12, %rdi
movq %r15, %rsi
movl $0x8, %edx
callq 0x87b0
movq 0x18(%rsp), %rdi
cmpq %rbx, %rdi
je 0x6b66a
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x8480
sarl $0x18, %r14d
cmpl $0x3e, %r14d
jg 0x6b6a4
cmpl $0x8, %r14d
ja 0x6b730
movl %r14d, %eax
leaq 0x6fad8(%rip), %rcx     # 0xdb160
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
leaq 0xa0d52(%rip), %rsi     # 0x10c3e8
jmpq *%rax
movb $0x1, 0xa0dcf(%rip)     # 0x10c46e
jmp 0x6b730
cmpl $0x67, %r14d
jg 0x6b6c7
cmpl $0x3f, %r14d
je 0x6b6da
cmpl $0x48, %r14d
jne 0x6b730
movq %r12, %rdi
leaq 0x9fea8(%rip), %rsi     # 0x10b568
callq 0x85a0
jmp 0x6b730
cmpl $0x73, %r14d
jne 0x6b782
leaq 0xa0d30(%rip), %rsi     # 0x10c408
jmp 0x6b716
movb $0x1, %al
movq %rax, 0x10(%rsp)
jmp 0x6b730
movq %r12, %rdi
leaq 0xa0d7b(%rip), %rsi     # 0x10c468
callq 0x82b0
jmp 0x6b730
movb $0x1, 0xa0d71(%rip)     # 0x10c46c
jmp 0x6b730
leaq 0xa0d24(%rip), %rsi     # 0x10c428
jmp 0x6b716
movb $0x1, 0xa0d62(%rip)     # 0x10c46f
jmp 0x6b730
leaq 0xa0d32(%rip), %rsi     # 0x10c448
movq %r12, %rdi
callq 0x8560
jmp 0x6b730
movb $0x1, 0xa0d46(%rip)     # 0x10c46d
jmp 0x6b730
movb $0x1, 0xa0d40(%rip)     # 0x10c470
movq %r12, %rdi
movq 0x9f85e(%rip), %rsi     # 0x10af98
callq 0x8620
leaq 0xb0(%rsp), %rdi
callq 0x8190
movl 0xc(%rsp), %edi
movq %rbp, %rsi
leaq 0x6fee1(%rip), %rdx     # 0xdb63b
leaq 0x9e07f(%rip), %rcx     # 0x1097e0
xorl %r8d, %r8d
callq 0x8770
movl %eax, %r14d
shll $0x18, %r14d
cmpl $0xff000000, %r14d      # imm = 0xFF000000
jne 0x6b60f
jmp 0x6b5be
cmpl $0x68, %r14d
jne 0x6b730
movq 0x9f829(%rip), %rdi     # 0x10afb8
leaq 0x6ff0f(%rip), %rsi     # 0xdb6a5
callq 0x8460
xorl %edi, %edi
callq 0x8530
movq 0x9f83f(%rip), %rdi     # 0x10afe8
leaq 0x62a02(%rip), %rsi     # 0xce1b2
movl $0x12, %edx
callq 0x84e0
movb $0x1, %dl
movzbl 0x9fda5(%rip), %eax     # 0x10b568
addl $-0x62, %eax
cmpl $0x10, %eax
ja 0x6b8f3
movl $0x14081, %ecx          # imm = 0x14081
btl %eax, %ecx
jae 0x6b8f3
cmpl $0x0, 0xa0c84(%rip)     # 0x10c468
jle 0x6b809
cmpb $0x1, 0xa0c82(%rip)     # 0x10c46f
jne 0x6b809
movq 0x9f7f2(%rip), %rdi     # 0x10afe8
leaq 0x6fd91(%rip), %rsi     # 0xdb58e
movl $0x36, %edx
callq 0x84e0
movb $0x1, %dl
cmpb $0x1, 0xa0c5c(%rip)     # 0x10c46c
jne 0x6b83e
cmpl $0x0, 0xa0c4f(%rip)     # 0x10c468
jg 0x6b824
cmpb $0x1, 0xa0c4d(%rip)     # 0x10c46f
jne 0x6b83e
movq 0x9f7bd(%rip), %rdi     # 0x10afe8
leaq 0x6fd93(%rip), %rsi     # 0xdb5c5
movl $0x49, %edx
callq 0x84e0
movb $0x1, %dl
cmpl $0x0, 0xa0c23(%rip)     # 0x10c468
jns 0x6b861
movq 0x9f79a(%rip), %rdi     # 0x10afe8
leaq 0x6fdba(%rip), %rsi     # 0xdb60f
movl $0x2b, %edx
callq 0x84e0
movb $0x1, %dl
testb $0x1, %dl
jne 0x6b912
movslq (%rbx), %rax
leal 0x1(%rax), %ecx
movl %ecx, (%rbx)
movq (%rbp,%rax,8), %r14
movq 0xa0b32(%rip), %r15     # 0x10c3b0
leaq 0xa0b23(%rip), %r12     # 0x10c3a8
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 0x6b8e1
leal 0x1(%rax), %ecx
movl %ecx, (%rbx)
movq (%rbp,%rax,8), %rbx
movq 0xa0b11(%rip), %r14     # 0x10c3d0
leaq 0xa0b02(%rip), %r15     # 0x10c3c8
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 0x9f6ee(%rip), %rdi     # 0x10afe8
leaq 0x6fc3d(%rip), %rsi     # 0xdb53e
movl $0x4f, %edx
callq 0x84e0
movb $0x1, %dl
jmp 0x6b7dd
movq 0x9f69f(%rip), %rdi     # 0x10afb8
leaq 0x60d5d(%rip), %rsi     # 0xcc67d
callq 0x8460
leaq 0x6fd79(%rip), %rsi     # 0xdb6a5
movq %rax, %rdi
callq 0x8460
movl $0x1, %edi
callq 0x8530
jmp 0x6b940
movq %rax, %r14
movq 0x9f64e(%rip), %rsi     # 0x10af98
leaq 0x38(%rsp), %rdi
callq 0x8620
leaq 0xb0(%rsp), %rdi
callq 0x8190
jmp 0x6b982
movq %rax, %r14
jmp 0x6b982
movq %rax, %r14
movq 0x18(%rsp), %rdi
cmpq %rbx, %rdi
je 0x6b982
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x8480
movq %r14, %rdi
callq 0x8840