// File: millanek[P]evo/evo_protein_SegregatingSites.cpp
// Function: parseProteinSsOptions(int, char**)
void parseProteinSsOptions(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 'a': arg >> opt::alignmentFile; break;
            case 'l': arg >> opt::alignmentListFile; break;
            case OPT_NEW_LABELS: arg >> opt::newLabelFile; break;
            case OPT_FOLDER: arg >> opt::outFolder; break;
            case 'h':
                std::cout << DNATOPROTEIN_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 (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" << DNATOPROTEIN_USAGE_MESSAGE;
        exit(EXIT_FAILURE);
    }
}

// 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 0x13a15c(%rip), %rdx    # 0x199700
leaq 0x137425(%rip), %rcx    # 0x1969d0
xorl %eax, %eax
movl %eax, %r8d
callq 0xaa40
movb %al, -0x12(%rbp)
movsbl %al, %eax
cmpl $-0x1, %eax
je 0x5f7c2
movq 0x1399c5(%rip), %rax    # 0x198f90
cmpq $0x0, (%rax)
je 0x5f5e4
movq 0x1399b8(%rip), %rax    # 0x198f90
movq (%rax), %rax
movq %rax, -0x1d8(%rbp)
jmp 0x5f5f4
leaq 0xd68f4(%rip), %rax     # 0x135edf
movq %rax, -0x1d8(%rbp)
jmp 0x5f5f4
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 0x5f631
leaq -0x198(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
movl $0x8, %edx
callq 0xaaa0
jmp 0x5f64b
leaq -0x1b8(%rbp), %rdi
callq 0xac88
leaq -0x1b9(%rbp), %rdi
callq 0xa640
movsbl -0x12(%rbp), %eax
movl %eax, -0x1ec(%rbp)
testl %eax, %eax
je 0x5f767
jmp 0x5f677
movl -0x1ec(%rbp), %eax
subl $0x1, %eax
je 0x5f77e
jmp 0x5f688
movl -0x1ec(%rbp), %eax
subl $0x3f, %eax
je 0x5f70a
jmp 0x5f695
movl -0x1ec(%rbp), %eax
subl $0x61, %eax
je 0x5f713
jmp 0x5f6a2
movl -0x1ec(%rbp), %eax
subl $0x68, %eax
je 0x5f795
jmp 0x5f6b3
movl -0x1ec(%rbp), %eax
subl $0x6c, %eax
je 0x5f750
jmp 0x5f7b1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x5f6f9
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 0x5f8e3
movb $0x1, -0x11(%rbp)
jmp 0x5f7b1
leaq 0x13aa36(%rip), %rsi    # 0x19a150
leaq -0x198(%rbp), %rdi
callq 0xa750
jmp 0x5f728
jmp 0x5f7b1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x198(%rbp), %rdi
callq 0xa290
jmp 0x5f8e3
leaq 0x13aa19(%rip), %rsi    # 0x19a170
leaq -0x198(%rbp), %rdi
callq 0xa750
jmp 0x5f765
jmp 0x5f7b1
leaq 0x13aa22(%rip), %rsi    # 0x19a190
leaq -0x198(%rbp), %rdi
callq 0xa750
jmp 0x5f77c
jmp 0x5f7b1
leaq 0x13aa2b(%rip), %rsi    # 0x19a1b0
leaq -0x198(%rbp), %rdi
callq 0xa750
jmp 0x5f793
jmp 0x5f7b1
movq 0x139f6c(%rip), %rsi    # 0x199708
movq 0x139815(%rip), %rdi    # 0x198fb8
callq 0xa5c0
jmp 0x5f7aa
xorl %edi, %edi
callq 0xa700
leaq -0x198(%rbp), %rdi
callq 0xa290
jmp 0x5f596
leaq 0x13a987(%rip), %rdi    # 0x19a150
leaq 0xd670f(%rip), %rsi     # 0x135edf
callq 0x2d770
testb $0x1, %al
jne 0x5f7db
jmp 0x5f80b
leaq 0x13a98e(%rip), %rdi    # 0x19a170
leaq 0xd66f6(%rip), %rsi     # 0x135edf
callq 0x2d770
testb $0x1, %al
jne 0x5f7f4
jmp 0x5f80b
movq 0x1397f5(%rip), %rdi    # 0x198ff0
leaq 0xd66de(%rip), %rsi     # 0x135ee0
callq 0xa5c0
movb $0x1, -0x11(%rbp)
leaq 0x13a93e(%rip), %rdi    # 0x19a150
leaq 0xd66c6(%rip), %rsi     # 0x135edf
callq 0x50eb0
testb $0x1, %al
jne 0x5f824
jmp 0x5f854
leaq 0x13a945(%rip), %rdi    # 0x19a170
leaq 0xd66ad(%rip), %rsi     # 0x135edf
callq 0x50eb0
testb $0x1, %al
jne 0x5f83d
jmp 0x5f854
movq 0x1397ac(%rip), %rdi    # 0x198ff0
leaq 0xd66c0(%rip), %rsi     # 0x135f0b
callq 0xa5c0
movb $0x1, -0x11(%rbp)
movl -0x4(%rbp), %eax
movq 0x139762(%rip), %rcx    # 0x198fc0
subl (%rcx), %eax
cmpl $0x0, %eax
jge 0x5f87e
movq 0x139784(%rip), %rdi    # 0x198ff0
leaq 0xd2bb7(%rip), %rsi     # 0x13242a
callq 0xa5c0
movb $0x1, -0x11(%rbp)
jmp 0x5f8a8
movl -0x4(%rbp), %eax
movq 0x139738(%rip), %rcx    # 0x198fc0
subl (%rcx), %eax
cmpl $0x0, %eax
jle 0x5f8a6
movq 0x13975a(%rip), %rdi    # 0x198ff0
leaq 0xd2ba0(%rip), %rsi     # 0x13243d
callq 0xa5c0
movb $0x1, -0x11(%rbp)
jmp 0x5f8a8
testb $0x1, -0x11(%rbp)
je 0x5f8da
movq 0x139703(%rip), %rdi    # 0x198fb8
leaq 0xcffd1(%rip), %rsi     # 0x12f88d
callq 0xa5c0
movq %rax, %rdi
movq 0x139e3d(%rip), %rsi    # 0x199708
callq 0xa5c0
movl $0x1, %edi
callq 0xa700
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbp
retq
movq -0x1c8(%rbp), %rdi
callq 0xab50
nop