// File: /workspace/github_cpp_makefile_star2_O3/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, %r15
leaq 0x99746(%rip), %rdx     # 0xcc393
leaq 0xcc99c(%rip), %rcx     # 0xff5f0
movq $0x0, 0x10(%rsp)
movl %edi, 0xc(%rsp)
xorl %r8d, %r8d
callq 0x8770
movl %eax, %r14d
shll $0x18, %r14d
cmpl $0xff000000, %r14d      # imm = 0xFF000000
je 0x32d8e
leaq 0x28(%rsp), %rbx
movq $0x0, 0x10(%rsp)
leaq 0x18(%rsp), %r12
leaq 0x38(%rsp), %r13
movq 0xcf2e4(%rip), %rax     # 0x101f80
movq (%rax), %rbp
testq %rbp, %rbp
leaq 0x9ad22(%rip), %rax     # 0xcd9cb
cmoveq %rax, %rbp
movq %rbx, 0x18(%rsp)
movq %rbp, %rdi
callq 0x81f0
leaq (%rax,%rbp), %rdx
movq %r12, %rdi
movq %rbp, %rsi
callq 0x28a52
movq %r13, %rdi
movq %r12, %rsi
movl $0x8, %edx
callq 0x87b0
movq 0x18(%rsp), %rdi
cmpq %rbx, %rdi
je 0x32cf0
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x8480
sarl $0x18, %r14d
cmpl $0x6b, %r14d
jle 0x32d17
cmpl $0x6c, %r14d
je 0x32d26
cmpl $0x70, %r14d
jne 0x32d41
movq %r13, %rdi
leaq 0xcf79c(%rip), %rsi     # 0x1024ac
callq 0x85a0
jmp 0x32d41
cmpl $0x3f, %r14d
jne 0x32d37
movb $0x1, %al
movq %rax, 0x10(%rsp)
jmp 0x32d41
movq %r13, %rdi
leaq 0xcfb88(%rip), %rsi     # 0x1028b8
callq 0x8560
jmp 0x32d41
cmpl $0x68, %r14d
je 0x32e2e
movq %r13, %rdi
movq 0xcf24d(%rip), %rsi     # 0x101f98
callq 0x8620
leaq 0xb0(%rsp), %rdi
callq 0x8190
movl 0xc(%rsp), %edi
movq %r15, %rsi
leaq 0x99628(%rip), %rdx     # 0xcc393
leaq 0xcc87e(%rip), %rcx     # 0xff5f0
xorl %r8d, %r8d
callq 0x8770
movl %eax, %r14d
shll $0x18, %r14d
cmpl $0xff000000, %r14d      # imm = 0xFF000000
jne 0x32c95
leaq 0xcfb23(%rip), %rdi     # 0x1028b8
leaq 0x9ac2f(%rip), %rsi     # 0xcd9cb
callq 0x8160
testl %eax, %eax
movq 0x10(%rsp), %rdx
jne 0x32dc4
movq 0xcf237(%rip), %rdi     # 0x101fe8
leaq 0x9952e(%rip), %rsi     # 0xcc2e6
movl $0x20, %edx
callq 0x84e0
movb $0x1, %dl
movzbl 0xcf6e1(%rip), %eax     # 0x1024ac
cmpl $0x64, %eax
je 0x32e06
cmpl $0x68, %eax
je 0x32e06
movq 0xcf20c(%rip), %r14     # 0x101fe8
leaq 0x99524(%rip), %rsi     # 0xcc307
movl $0x3d, %edx
movq %r14, %rdi
callq 0x84e0
leaq 0x9954e(%rip), %rsi     # 0xcc345
movl $0x45, %edx
movq %r14, %rdi
callq 0x84e0
movb $0x1, %dl
movq 0xcf1b3(%rip), %rax     # 0x101fc0
movl 0xc(%rsp), %ecx
cmpl %ecx, (%rax)
jg 0x32e48
jne 0x32e56
testb $0x1, %dl
jne 0x32e6e
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xcf183(%rip), %rdi     # 0x101fb8
leaq 0x99575(%rip), %rsi     # 0xcc3b1
callq 0x8460
xorl %edi, %edi
callq 0x8530
leaq 0x99093(%rip), %rsi     # 0xcbee2
movl $0x12, %edx
jmp 0x32e62
leaq 0x99098(%rip), %rsi     # 0xcbef5
movl $0x13, %edx
movq 0xcf17f(%rip), %rdi     # 0x101fe8
callq 0x84e0
movq 0xcf143(%rip), %rdi     # 0x101fb8
leaq 0x985c1(%rip), %rsi     # 0xcb43d
callq 0x8460
leaq 0x99529(%rip), %rsi     # 0xcc3b1
movq %rax, %rdi
callq 0x8460
movl $0x1, %edi
callq 0x8530
jmp 0x32e9c
movq %rax, %r14
movq 0xcf0f2(%rip), %rsi     # 0x101f98
leaq 0x38(%rsp), %rdi
callq 0x8620
leaq 0xb0(%rsp), %rdi
callq 0x8190
jmp 0x32ede
movq %rax, %r14
jmp 0x32ede
movq %rax, %r14
movq 0x18(%rsp), %rdi
cmpq %rbx, %rdi
je 0x32ede
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x8480
movq %r14, %rdi
callq 0x8840