// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/evo_permute_codons.cpp
// Function: parsePermuteCodonsOptions(int, char**)
void parsePermuteCodonsOptions(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 'l': arg >> opt::alignmentListFile; break;
            case 'h':
                std::cout << PERMUTE_USAGE_MESSAGE;
                exit(EXIT_SUCCESS);
        }
    }
    
    if (opt::alignmentListFile == "") {
        std::cerr << "The -l option must 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 (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" << PERMUTE_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 0x98f65(%rip), %rdx     # 0xce653
leaq 0xd2ffb(%rip), %rcx     # 0x1086f0
movq $0x0, 0x10(%rsp)
movl %edi, 0xc(%rsp)
xorl %r8d, %r8d
callq 0x8770
movl %eax, %r15d
shll $0x18, %r15d
cmpl $0xff000000, %r15d      # imm = 0xFF000000
je 0x3582f
leaq 0x28(%rsp), %rbx
movq $0x0, 0x10(%rsp)
leaq 0x18(%rsp), %r12
leaq 0x38(%rsp), %r13
movq 0xd5843(%rip), %rax     # 0x10af80
movq (%rax), %rbp
testq %rbp, %rbp
leaq 0x9c535(%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 0x35791
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x8480
sarl $0x18, %r15d
cmpl $0x6b, %r15d
jle 0x357b8
cmpl $0x6c, %r15d
je 0x357c7
cmpl $0x70, %r15d
jne 0x357e2
movq %r13, %rdi
leaq 0xd5d1b(%rip), %rsi     # 0x10b4cc
callq 0x85a0
jmp 0x357e2
cmpl $0x3f, %r15d
jne 0x357d8
movb $0x1, %al
movq %rax, 0x10(%rsp)
jmp 0x357e2
movq %r13, %rdi
leaq 0xd60df(%rip), %rsi     # 0x10b8b0
callq 0x8560
jmp 0x357e2
cmpl $0x68, %r15d
je 0x358fe
movq %r13, %rdi
movq 0xd57ac(%rip), %rsi     # 0x10af98
callq 0x8620
leaq 0xb0(%rsp), %rdi
callq 0x8190
movl 0xc(%rsp), %edi
movq %r14, %rsi
leaq 0x98e47(%rip), %rdx     # 0xce653
leaq 0xd2edd(%rip), %rcx     # 0x1086f0
xorl %r8d, %r8d
callq 0x8770
movl %eax, %r15d
shll $0x18, %r15d
cmpl $0xff000000, %r15d      # imm = 0xFF000000
jne 0x35736
leaq 0xd607a(%rip), %rdi     # 0x10b8b0
leaq 0x9c442(%rip), %rsi     # 0xd1c7f
callq 0x8160
testl %eax, %eax
movq 0x10(%rsp), %rdx
jne 0x35865
movq 0xd5796(%rip), %rdi     # 0x10afe8
leaq 0x98d4d(%rip), %rsi     # 0xce5a6
movl $0x20, %edx
callq 0x84e0
movb $0x1, %dl
movzbl 0xd5c60(%rip), %eax     # 0x10b4cc
cmpl $0x64, %eax
je 0x358a7
cmpl $0x68, %eax
je 0x358a7
movq 0xd576b(%rip), %r14     # 0x10afe8
leaq 0x98d43(%rip), %rsi     # 0xce5c7
movl $0x3d, %edx
movq %r14, %rdi
callq 0x84e0
leaq 0x98d6d(%rip), %rsi     # 0xce605
movl $0x45, %edx
movq %r14, %rdi
callq 0x84e0
movb $0x1, %dl
movq 0xd5712(%rip), %rax     # 0x10afc0
movl 0xc(%rsp), %ecx
cmpl %ecx, (%rax)
jle 0x358cb
movq 0xd572b(%rip), %rdi     # 0x10afe8
leaq 0x988ee(%rip), %rsi     # 0xce1b2
movl $0x12, %edx
jmp 0x358e0
je 0x358e7
movq 0xd5714(%rip), %rdi     # 0x10afe8
leaq 0x988ea(%rip), %rsi     # 0xce1c5
movl $0x13, %edx
callq 0x84e0
movb $0x1, %dl
testb $0x1, %dl
jne 0x35918
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xd56b3(%rip), %rdi     # 0x10afb8
leaq 0x98d65(%rip), %rsi     # 0xce671
callq 0x8460
xorl %edi, %edi
callq 0x8530
movq 0xd5699(%rip), %rdi     # 0x10afb8
leaq 0x96d57(%rip), %rsi     # 0xcc67d
callq 0x8460
leaq 0x98d3f(%rip), %rsi     # 0xce671
movq %rax, %rdi
callq 0x8460
movl $0x1, %edi
callq 0x8530
jmp 0x35946
movq %rax, %r14
movq 0xd5648(%rip), %rsi     # 0x10af98
leaq 0x38(%rsp), %rdi
callq 0x8620
leaq 0xb0(%rsp), %rdi
callq 0x8190
jmp 0x35988
movq %rax, %r14
jmp 0x35988
movq %rax, %r14
movq 0x18(%rsp), %rdi
cmpq %rbx, %rdi
je 0x35988
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x8480
movq %r14, %rdi
callq 0x8840