// File: millanek[P]evo/evo_codingSeqs_fromGenomes.cpp
// Function: parseSeqFromGenomesOptions(int, char**)
void parseSeqFromGenomesOptions(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 'g': arg >> opt::genomeFile; break;
            case 'l': arg >> opt::genomeListFile; break;
            case OPT_NEW_LABELS: arg >> opt::newLabelFile; break;
            case OPT_FOLDER: arg >> opt::outFolder; break;
            case 'h':
                std::cout << SEQFROMGENOME_USAGE_MESSAGE;
                exit(EXIT_SUCCESS);
        }
    }
    
    if (opt::genomeFile == "" && opt::genomeListFile == "") {
        std::cerr << "Either -g or -l options must be specified\n";
        die = true;
    }
    
    if (opt::genomeFile != "" && opt::genomeListFile != "") {
        std::cerr << "The -g and -l options can't both be specified\n";
        die = true;
    }
    
    if (argc - optind < 1) {
        std::cerr << "missing arguments\n";
        die = true;
    }
    else if (argc - optind > 1)
    {
        std::cerr << "too many arguments\n";
        die = true;
    }
    
    if (die) {
        std::cout << "\n" << SEQFROMGENOME_USAGE_MESSAGE;
        exit(EXIT_FAILURE);
    }
    opt::geneFile = argv[optind++];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1f0, %rsp            # imm = 0x1F0
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movq 0x1416dc(%rip), %rdx    # 0x1996f0
leaq 0x13e8d5(%rip), %rcx    # 0x1968f0
xorl %eax, %eax
movl %eax, %r8d
callq 0xaa40
movb %al, -0x12(%rbp)
movsbl %al, %eax
cmpl $-0x1, %eax
je 0x58232
movq 0x140f55(%rip), %rax    # 0x198f90
cmpq $0x0, (%rax)
je 0x58054
movq 0x140f48(%rip), %rax    # 0x198f90
movq (%rax), %rax
movq %rax, -0x1d8(%rbp)
jmp 0x58064
leaq 0xdde84(%rip), %rax     # 0x135edf
movq %rax, -0x1d8(%rbp)
jmp 0x58064
movq -0x1d8(%rbp), %rax
movq %rax, -0x1e8(%rbp)
leaq -0x1b9(%rbp), %rdi
movq %rdi, -0x1e0(%rbp)
callq 0xab60
movq -0x1e8(%rbp), %rsi
movq -0x1e0(%rbp), %rdx
leaq -0x1b8(%rbp), %rdi
callq 0x2d6c0
jmp 0x580a1
leaq -0x198(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
movl $0x8, %edx
callq 0xaaa0
jmp 0x580bb
leaq -0x1b8(%rbp), %rdi
callq 0xac88
leaq -0x1b9(%rbp), %rdi
callq 0xa640
movsbl -0x12(%rbp), %eax
movl %eax, -0x1ec(%rbp)
testl %eax, %eax
je 0x581d7
jmp 0x580e7
movl -0x1ec(%rbp), %eax
subl $0x1, %eax
je 0x581ee
jmp 0x580f8
movl -0x1ec(%rbp), %eax
subl $0x3f, %eax
je 0x5817a
jmp 0x58105
movl -0x1ec(%rbp), %eax
subl $0x67, %eax
je 0x58183
jmp 0x58112
movl -0x1ec(%rbp), %eax
subl $0x68, %eax
je 0x58205
jmp 0x58123
movl -0x1ec(%rbp), %eax
subl $0x6c, %eax
je 0x581c0
jmp 0x58221
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x58169
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x1b8(%rbp), %rdi
callq 0xac88
leaq -0x1b9(%rbp), %rdi
callq 0xa640
jmp 0x58381
movb $0x1, -0x11(%rbp)
jmp 0x58221
leaq 0x141e1e(%rip), %rsi    # 0x199fa8
leaq -0x198(%rbp), %rdi
callq 0xa750
jmp 0x58198
jmp 0x58221
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x198(%rbp), %rdi
callq 0xa290
jmp 0x58381
leaq 0x141e01(%rip), %rsi    # 0x199fc8
leaq -0x198(%rbp), %rdi
callq 0xa750
jmp 0x581d5
jmp 0x58221
leaq 0x141e0a(%rip), %rsi    # 0x199fe8
leaq -0x198(%rbp), %rdi
callq 0xa750
jmp 0x581ec
jmp 0x58221
leaq 0x141e13(%rip), %rsi    # 0x19a008
leaq -0x198(%rbp), %rdi
callq 0xa750
jmp 0x58203
jmp 0x58221
movq 0x1414ec(%rip), %rsi    # 0x1996f8
movq 0x140da5(%rip), %rdi    # 0x198fb8
callq 0xa5c0
jmp 0x5821a
xorl %edi, %edi
callq 0xa700
leaq -0x198(%rbp), %rdi
callq 0xa290
jmp 0x58006
leaq 0x141d6f(%rip), %rdi    # 0x199fa8
leaq 0xddc9f(%rip), %rsi     # 0x135edf
callq 0x2d770
testb $0x1, %al
jne 0x5824b
jmp 0x5827b
leaq 0x141d76(%rip), %rdi    # 0x199fc8
leaq 0xddc86(%rip), %rsi     # 0x135edf
callq 0x2d770
testb $0x1, %al
jne 0x58264
jmp 0x5827b
movq 0x140d85(%rip), %rdi    # 0x198ff0
leaq 0xdcce8(%rip), %rsi     # 0x134f5a
callq 0xa5c0
movb $0x1, -0x11(%rbp)
leaq 0x141d26(%rip), %rdi    # 0x199fa8
leaq 0xddc56(%rip), %rsi     # 0x135edf
callq 0x50eb0
testb $0x1, %al
jne 0x58294
jmp 0x582c4
leaq 0x141d2d(%rip), %rdi    # 0x199fc8
leaq 0xddc3d(%rip), %rsi     # 0x135edf
callq 0x50eb0
testb $0x1, %al
jne 0x582ad
jmp 0x582c4
movq 0x140d3c(%rip), %rdi    # 0x198ff0
leaq 0xdccca(%rip), %rsi     # 0x134f85
callq 0xa5c0
movb $0x1, -0x11(%rbp)
movl -0x4(%rbp), %eax
movq 0x140cf2(%rip), %rcx    # 0x198fc0
subl (%rcx), %eax
cmpl $0x1, %eax
jge 0x582ee
movq 0x140d14(%rip), %rdi    # 0x198ff0
leaq 0xda147(%rip), %rsi     # 0x13242a
callq 0xa5c0
movb $0x1, -0x11(%rbp)
jmp 0x58318
movl -0x4(%rbp), %eax
movq 0x140cc8(%rip), %rcx    # 0x198fc0
subl (%rcx), %eax
cmpl $0x1, %eax
jle 0x58316
movq 0x140cea(%rip), %rdi    # 0x198ff0
leaq 0xda130(%rip), %rsi     # 0x13243d
callq 0xa5c0
movb $0x1, -0x11(%rbp)
jmp 0x58318
testb $0x1, -0x11(%rbp)
je 0x5834a
movq 0x140c93(%rip), %rdi    # 0x198fb8
leaq 0xd7561(%rip), %rsi     # 0x12f88d
callq 0xa5c0
movq %rax, %rdi
movq 0x1413bd(%rip), %rsi    # 0x1996f8
callq 0xa5c0
movl $0x1, %edi
callq 0xa700
movq -0x10(%rbp), %rax
movq 0x140c6b(%rip), %rcx    # 0x198fc0
movl (%rcx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movq 0x140c5d(%rip), %rdx    # 0x198fc0
movl %esi, (%rdx)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x141cb5(%rip), %rdi    # 0x19a028
callq 0xa810
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbp
retq
movq -0x1c8(%rbp), %rdi
callq 0xab50
nopl (%rax)