// File: /workspace/github_cpp_makefile_star2_O2/millanek[P]evo/evo_codingStats_from_alignment.cpp
// Function: parseCodingStatsOptions(int, char**)
void parseCodingStatsOptions(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 'p': arg >> opt::ploidy; break;
            case 'a': arg >> opt::alignmentFile; break;
            case 'l': arg >> opt::alignmentListFile; break;
            case 't': arg >> opt::tStVratio; break;
            case 'n': opt::nonCodingNull = true; break;
            case OPT_DXY_MATRIX: arg >> opt::genomeWide_DxyMatrixFile; break;
            case OPT_PN_GROUPS: arg >> opt::pNgroupsFile; break;
            case 'h':
                std::cout << CODINGSTATS_USAGE_MESSAGE;
                exit(EXIT_SUCCESS);
        }
    }
    
    if (opt::alignmentFile == "" && opt::alignmentListFile == "") {
        std::cerr << "Either -a or -l options must be specified\n";
        die = true;
    }
    
    if (opt::alignmentFile != "" && opt::alignmentListFile != "") {
        std::cerr << "The -a and -l options can't both be specified\n";
        die = true;
    }
    
    if (opt::ploidy != 'h' && opt::ploidy != 'd') {
        std::cerr << "The -p (--ploidy) option can only have the values 'h' or 'd'\n";
        std::cerr << "At the moment I don't support other than haploid and diploid species\n";
        die = true;
    }
    
    if (opt::tStVratio <= 0) {
        std::cerr << "The tS/tV ratio must be positive\n";
        die = true;
    }
    
    
    if (argc - optind < 0) {
        std::cerr << "missing arguments\n";
        die = true;
    }
    else if (argc - optind > 0)
    {
        std::cerr << "too many arguments\n";
        die = true;
    }
    
    if (die) {
        std::cout << "\n" << CODINGSTATS_USAGE_MESSAGE;
        exit(EXIT_FAILURE);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movq %rsi, %r14
movl %edi, %ebx
movq $0x0, 0x10(%rsp)
leaq 0x18(%rsp), %r13
leaq 0x38(%rsp), %rbp
leaq 0x6462b(%rip), %r15     # 0x9baf0
movl %ebx, %edi
movq %r14, %rsi
leaq 0x5f2f2(%rip), %rdx     # 0x967c3
leaq 0xa3678(%rip), %rcx     # 0xdab50
xorl %r8d, %r8d
callq 0x8790
movl %eax, %r12d
shll $0x18, %eax
cmpl $0xff000000, %eax       # imm = 0xFF000000
je 0x375ce
movq 0xa5a98(%rip), %rax     # 0xdcf90
movq (%rax), %rsi
testq %rsi, %rsi
leaq 0x6291a(%rip), %rax     # 0x99e1f
cmoveq %rax, %rsi
movq %r13, %rdi
leaq 0xf(%rsp), %rdx
callq 0x21904
movq %rbp, %rdi
movq %r13, %rsi
pushq $0x8
popq %rdx
callq 0x87e0
movsbl %r12b, %r12d
movq %r13, %rdi
callq 0x8978
leal -0x6c(%r12), %eax
cmpl $0x8, %eax
jbe 0x37563
testl %r12d, %r12d
je 0x375a9
cmpl $0x1, %r12d
je 0x375b2
cmpl $0x3f, %r12d
je 0x375a0
leaq 0xa6a1e(%rip), %rsi     # 0xddf70
cmpl $0x61, %r12d
je 0x375b9
cmpl $0x68, %r12d
jne 0x375c1
jmp 0x376e4
movslq (%r15,%rax,4), %rax
addq %r15, %rax
jmpq *%rax
leaq 0xa6a1d(%rip), %rsi     # 0xddf90
jmp 0x375b9
movq %rbp, %rdi
leaq 0xa5f91(%rip), %rsi     # 0xdd510
callq 0x85c0
jmp 0x375c1
movb $0x1, 0xa6a63(%rip)     # 0xddff0
jmp 0x375c1
movq %rbp, %rdi
leaq 0xa5f7f(%rip), %rsi     # 0xdd518
callq 0x8300
jmp 0x375c1
movb $0x1, %al
movq %rax, 0x10(%rsp)
jmp 0x375c1
leaq 0xa6a20(%rip), %rsi     # 0xddfd0
jmp 0x375b9
leaq 0xa69f7(%rip), %rsi     # 0xddfb0
movq %rbp, %rdi
callq 0x8570
movq %rbp, %rdi
callq 0x8220
jmp 0x374c5
leaq 0xa699b(%rip), %rdi     # 0xddf70
leaq 0x62843(%rip), %rsi     # 0x99e1f
callq 0x2193f
testb %al, %al
je 0x37619
leaq 0xa69a4(%rip), %rdi     # 0xddf90
leaq 0x6282c(%rip), %rsi     # 0x99e1f
callq 0x2193f
testb %al, %al
movq 0x10(%rsp), %r14
je 0x3761e
movq 0xa59e0(%rip), %rdi     # 0xdcfe8
leaq 0x62811(%rip), %rsi     # 0x99e20
callq 0x8480
movb $0x1, %r14b
jmp 0x3761e
movq 0x10(%rsp), %r14
leaq 0xa694b(%rip), %rdi     # 0xddf70
leaq 0x627f3(%rip), %rsi     # 0x99e1f
callq 0x2ea9b
testb %al, %al
je 0x37662
leaq 0xa6954(%rip), %rdi     # 0xddf90
leaq 0x627dc(%rip), %rsi     # 0x99e1f
callq 0x2ea9b
testb %al, %al
je 0x37662
movq 0xa5995(%rip), %rdi     # 0xdcfe8
leaq 0x627f1(%rip), %rsi     # 0x99e4b
callq 0x8480
movb $0x1, %r14b
movzbl 0xa5ea7(%rip), %eax     # 0xdd510
cmpl $0x64, %eax
je 0x3769b
cmpl $0x68, %eax
je 0x3769b
movq 0xa596e(%rip), %r14     # 0xdcfe8
leaq 0x5f0b6(%rip), %rsi     # 0x96737
movq %r14, %rdi
callq 0x8480
leaq 0x5f0e5(%rip), %rsi     # 0x96775
movq %r14, %rdi
callq 0x8480
movb $0x1, %r14b
xorpd %xmm0, %xmm0
ucomisd 0xa5e71(%rip), %xmm0    # 0xdd518
jb 0x376bf
movq 0xa5938(%rip), %rdi     # 0xdcfe8
leaq 0x650b3(%rip), %rsi     # 0x9c76a
callq 0x8480
movb $0x1, %r14b
movq 0xa58fa(%rip), %rax     # 0xdcfc0
cmpl %ebx, (%rax)
jg 0x376fe
jne 0x37707
testb $0x1, %r14b
jne 0x3771a
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xa58cd(%rip), %rdi     # 0xdcfb8
leaq 0x650df(%rip), %rsi     # 0x9c7d1
callq 0x8480
xorl %edi, %edi
callq 0x8540
leaq 0x5ec1d(%rip), %rsi     # 0x96322
jmp 0x3770e
leaq 0x5ec27(%rip), %rsi     # 0x96335
movq 0xa58d3(%rip), %rdi     # 0xdcfe8
callq 0x8480
movq 0xa5897(%rip), %rdi     # 0xdcfb8
leaq 0x5c225(%rip), %rsi     # 0x9394d
callq 0x8480
leaq 0x6509d(%rip), %rsi     # 0x9c7d1
movq %rax, %rdi
callq 0x8480
pushq $0x1
popq %rdi
callq 0x8540
jmp 0x37746
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x8220
jmp 0x37767
movq %rax, %rbx
jmp 0x37767
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x8978
movq %rbx, %rdi
callq 0x8870
nop