// File: /workspace/github_cpp_makefile_star2_O1/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
leaq 0x8912a(%rip), %rdx     # 0xce653
leaq 0xc3600(%rip), %rcx     # 0x108b30
movq $0x0, 0x10(%rsp)
movl %edi, 0xc(%rsp)
xorl %r8d, %r8d
callq 0x8770
movl %eax, %r15d
shll $0x18, %r15d
cmpl $0xff000000, %r15d      # imm = 0xFF000000
jne 0x4557a
leaq 0xc69dc(%rip), %rdi     # 0x10bf38
leaq 0x8c71c(%rip), %rsi     # 0xd1c7f
callq 0x8160
testl %eax, %eax
je 0x456ff
movq 0x10(%rsp), %rbx
jmp 0x45735
leaq 0x28(%rsp), %rbx
movq $0x0, 0x10(%rsp)
leaq 0x18(%rsp), %r12
leaq 0x38(%rsp), %r13
movq 0xc59e7(%rip), %rax     # 0x10af80
movq (%rax), %rbp
testq %rbp, %rbp
leaq 0x8c6d9(%rip), %rax     # 0xd1c7f
cmoveq %rax, %rbp
movq %rbx, 0x18(%rsp)
movq %rbp, %rdi
callq 0x81f0
leaq (%rax,%rbp), %rdx
movq %r12, %rdi
movq %rbp, %rsi
callq 0x28952
movq %r13, %rdi
movq %r12, %rsi
movl $0x8, %edx
callq 0x87b0
movq 0x18(%rsp), %rdi
cmpq %rbx, %rdi
je 0x455ed
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x8480
sarl $0x18, %r15d
cmpl $0x60, %r15d
jg 0x45611
testl %r15d, %r15d
je 0x45633
cmpl $0x1, %r15d
je 0x4563c
cmpl $0x3f, %r15d
jne 0x4565e
movb $0x1, %al
movq %rax, 0x10(%rsp)
jmp 0x4565e
leal -0x6c(%r15), %eax
cmpl $0x8, %eax
ja 0x45645
leaq 0x8e32f(%rip), %rcx     # 0xd3950
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xc6927(%rip), %rsi     # 0x10bf58
jmp 0x45656
leaq 0xc695e(%rip), %rsi     # 0x10bf98
jmp 0x45656
leaq 0xc6935(%rip), %rsi     # 0x10bf78
jmp 0x45656
leaq 0xc68ec(%rip), %rsi     # 0x10bf38
cmpl $0x61, %r15d
jne 0x456db
movq %r13, %rdi
callq 0x8560
movq %r13, %rdi
movq 0xc5930(%rip), %rsi     # 0x10af98
callq 0x8620
leaq 0xb0(%rsp), %rdi
callq 0x8190
movl 0xc(%rsp), %edi
movq %r14, %rsi
leaq 0x88fcb(%rip), %rdx     # 0xce653
leaq 0xc34a1(%rip), %rcx     # 0x108b30
xorl %r8d, %r8d
callq 0x8770
movl %eax, %r15d
shll $0x18, %r15d
cmpl $0xff000000, %r15d      # imm = 0xFF000000
jne 0x45592
jmp 0x45555
movq %r13, %rdi
leaq 0xc5e2e(%rip), %rsi     # 0x10b4e8
callq 0x82d0
jmp 0x4565e
movq %r13, %rdi
leaq 0xc5e15(%rip), %rsi     # 0x10b4e0
callq 0x85a0
jmp 0x4565e
movb $0x1, 0xc68df(%rip)     # 0x10bfb8
jmp 0x4565e
cmpl $0x68, %r15d
jne 0x4565e
movq 0xc58cc(%rip), %rdi     # 0x10afb8
leaq 0x8ef3e(%rip), %rsi     # 0xd4631
callq 0x8460
xorl %edi, %edi
callq 0x8530
leaq 0xc6852(%rip), %rdi     # 0x10bf58
leaq 0x8c572(%rip), %rsi     # 0xd1c7f
callq 0x8160
testl %eax, %eax
movq 0x10(%rsp), %rbx
jne 0x45735
movq 0xc58c6(%rip), %rdi     # 0x10afe8
leaq 0x8c557(%rip), %rsi     # 0xd1c80
movl $0x2a, %edx
callq 0x84e0
movb $0x1, %bl
leaq 0xc67fc(%rip), %rdi     # 0x10bf38
leaq 0x8c53c(%rip), %rsi     # 0xd1c7f
callq 0x8160
testl %eax, %eax
je 0x4577d
leaq 0xc6805(%rip), %rdi     # 0x10bf58
leaq 0x8c525(%rip), %rsi     # 0xd1c7f
callq 0x8160
testl %eax, %eax
je 0x4577d
movq 0xc587e(%rip), %rdi     # 0x10afe8
leaq 0x8c53a(%rip), %rsi     # 0xd1cab
movl $0x2e, %edx
callq 0x84e0
movb $0x1, %bl
movzbl 0xc5d5c(%rip), %eax     # 0x10b4e0
cmpl $0x64, %eax
je 0x457bf
cmpl $0x68, %eax
je 0x457bf
movq 0xc5853(%rip), %r14     # 0x10afe8
leaq 0x88e2b(%rip), %rsi     # 0xce5c7
movl $0x3d, %edx
movq %r14, %rdi
callq 0x84e0
leaq 0x88e55(%rip), %rsi     # 0xce605
movl $0x45, %edx
movq %r14, %rdi
callq 0x84e0
movb $0x1, %bl
xorpd %xmm0, %xmm0
ucomisd 0xc5d1d(%rip), %xmm0    # 0x10b4e8
jb 0x457e7
movq 0xc5814(%rip), %rdi     # 0x10afe8
leaq 0x8edef(%rip), %rsi     # 0xd45ca
movl $0x21, %edx
callq 0x84e0
movb $0x1, %bl
movq 0xc57d2(%rip), %rax     # 0x10afc0
movl 0xc(%rsp), %ecx
cmpl %ecx, (%rax)
jle 0x4580b
movq 0xc57eb(%rip), %rdi     # 0x10afe8
leaq 0x889ae(%rip), %rsi     # 0xce1b2
movl $0x12, %edx
jmp 0x45820
je 0x45827
movq 0xc57d4(%rip), %rdi     # 0x10afe8
leaq 0x889aa(%rip), %rsi     # 0xce1c5
movl $0x13, %edx
callq 0x84e0
movb $0x1, %bl
testb $0x1, %bl
jne 0x4583e
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xc5773(%rip), %rdi     # 0x10afb8
leaq 0x86e31(%rip), %rsi     # 0xcc67d
callq 0x8460
leaq 0x8edd9(%rip), %rsi     # 0xd4631
movq %rax, %rdi
callq 0x8460
movl $0x1, %edi
callq 0x8530
jmp 0x4586c
movq %rax, %r14
movq 0xc5722(%rip), %rsi     # 0x10af98
leaq 0x38(%rsp), %rdi
callq 0x8620
leaq 0xb0(%rsp), %rdi
callq 0x8190
jmp 0x458ae
movq %rax, %r14
jmp 0x458ae
movq %rax, %r14
movq 0x18(%rsp), %rdi
cmpq %rbx, %rdi
je 0x458ae
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x8480
movq %r14, %rdi
callq 0x8840