// File: millanek[P]evo/evo_AlleleFeq.cpp
// Function: parseAFoptions(int, char**)
void parseAFoptions(int argc, char** argv) {
    bool die = false; string regionArgString; std::vector<string> regionArgs;
    std::vector<string> windowSizeStep;
    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 'n': arg >> opt::runName; break;
            case 'g': opt::useGenotypeProbabilities = true; break;
            case 'h':
                std::cout << AF_USAGE_MESSAGE;
                exit(EXIT_SUCCESS);
        }
    }
    
    if (argc - optind < 2) {
        std::cerr << "missing arguments\n";
        die = true;
    }
    else if (argc - optind > 2)
    {
        std::cerr << "too many arguments\n";
        die = true;
    }
    
    if (die) {
        std::cout << "\n" << AF_USAGE_MESSAGE;
        exit(EXIT_FAILURE);
    }
    
    // Parse the input filenames
    opt::vcfFile = argv[optind++];
    opt::setsFile = argv[optind++];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x250, %rsp            # imm = 0x250
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xa820
leaq -0x50(%rbp), %rdi
callq 0x48da0
leaq -0x68(%rbp), %rdi
callq 0x48da0
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movq 0x87c01(%rip), %rdx     # 0x199a40
leaq 0x869fa(%rip), %rcx     # 0x198840
xorl %eax, %eax
movl %eax, %r8d
callq 0xaa40
movb %al, -0x69(%rbp)
movsbl %al, %eax
cmpl $-0x1, %eax
je 0x111ffa
movq 0x8712a(%rip), %rax     # 0x198f90
cmpq $0x0, (%rax)
je 0x111e7f
movq 0x8711d(%rip), %rax     # 0x198f90
movq (%rax), %rax
movq %rax, -0x230(%rbp)
jmp 0x111e8f
leaq 0x24059(%rip), %rax     # 0x135edf
movq %rax, -0x230(%rbp)
jmp 0x111e8f
movq -0x230(%rbp), %rax
movq %rax, -0x240(%rbp)
leaq -0x211(%rbp), %rdi
movq %rdi, -0x238(%rbp)
callq 0xab60
movq -0x240(%rbp), %rsi
movq -0x238(%rbp), %rdx
leaq -0x210(%rbp), %rdi
callq 0x2d6c0
jmp 0x111ecc
leaq -0x1f0(%rbp), %rdi
leaq -0x210(%rbp), %rsi
movl $0x8, %edx
callq 0xaaa0
jmp 0x111ee6
leaq -0x210(%rbp), %rdi
callq 0xac88
leaq -0x211(%rbp), %rdi
callq 0xa640
movsbl -0x69(%rbp), %eax
movl %eax, -0x244(%rbp)
subl $0x3f, %eax
je 0x111f84
jmp 0x111f0f
movl -0x244(%rbp), %eax
subl $0x67, %eax
je 0x111fc4
jmp 0x111f20
movl -0x244(%rbp), %eax
subl $0x68, %eax
je 0x111fcd
jmp 0x111f31
movl -0x244(%rbp), %eax
subl $0x6e, %eax
je 0x111f8a
jmp 0x111fe9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x111f73
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x210(%rbp), %rdi
callq 0xac88
leaq -0x211(%rbp), %rdi
callq 0xa640
jmp 0x11211a
movb $0x1, -0x11(%rbp)
jmp 0x111fe9
leaq 0x89607(%rip), %rsi     # 0x19b598
leaq -0x1f0(%rbp), %rdi
callq 0xa750
jmp 0x111f9f
jmp 0x111fe9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x1f0(%rbp), %rdi
callq 0xa290
jmp 0x11211a
movb $0x1, 0x895ed(%rip)     # 0x19b5b8
jmp 0x111fe9
movq 0x87a74(%rip), %rsi     # 0x199a48
movq 0x86fdd(%rip), %rdi     # 0x198fb8
callq 0xa5c0
jmp 0x111fe2
xorl %edi, %edi
callq 0xa700
leaq -0x1f0(%rbp), %rdi
callq 0xa290
jmp 0x111e31
movl -0x4(%rbp), %eax
movq 0x86fbc(%rip), %rcx     # 0x198fc0
subl (%rcx), %eax
cmpl $0x2, %eax
jge 0x11203d
movq 0x86fde(%rip), %rdi     # 0x198ff0
leaq 0x20411(%rip), %rsi     # 0x13242a
callq 0xa5c0
jmp 0x112020
movb $0x1, -0x11(%rbp)
jmp 0x112069
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x11211a
movl -0x4(%rbp), %eax
movq 0x86f79(%rip), %rcx     # 0x198fc0
subl (%rcx), %eax
cmpl $0x2, %eax
jle 0x112067
movq 0x86f9b(%rip), %rdi     # 0x198ff0
leaq 0x203e1(%rip), %rsi     # 0x13243d
callq 0xa5c0
jmp 0x112063
movb $0x1, -0x11(%rbp)
jmp 0x112069
testb $0x1, -0x11(%rbp)
je 0x1120aa
movq 0x86f42(%rip), %rdi     # 0x198fb8
leaq 0x1d810(%rip), %rsi     # 0x12f88d
callq 0xa5c0
movq %rax, -0x250(%rbp)
jmp 0x11208b
movq -0x250(%rbp), %rdi
movq 0x879af(%rip), %rsi     # 0x199a48
callq 0xa5c0
jmp 0x1120a0
movl $0x1, %edi
callq 0xa700
movq -0x10(%rbp), %rax
movq 0x86f0b(%rip), %rdx     # 0x198fc0
movslq (%rdx), %rcx
movl %ecx, %esi
incl %esi
movl %esi, (%rdx)
movq (%rax,%rcx,8), %rsi
leaq 0x8948f(%rip), %rdi     # 0x19b558
callq 0xa810
jmp 0x1120d0
movq -0x10(%rbp), %rax
movq 0x86ee5(%rip), %rdx     # 0x198fc0
movslq (%rdx), %rcx
movl %ecx, %esi
incl %esi
movl %esi, (%rdx)
movq (%rax,%rcx,8), %rsi
leaq 0x89489(%rip), %rdi     # 0x19b578
callq 0xa810
jmp 0x1120f6
leaq -0x68(%rbp), %rdi
callq 0x3dfa0
leaq -0x50(%rbp), %rdi
callq 0x3dfa0
leaq -0x38(%rbp), %rdi
callq 0xac88
addq $0x250, %rsp            # imm = 0x250
popq %rbp
retq
leaq -0x68(%rbp), %rdi
callq 0x3dfa0
leaq -0x50(%rbp), %rdi
callq 0x3dfa0
leaq -0x38(%rbp), %rdi
callq 0xac88
movq -0x220(%rbp), %rdi
callq 0xab50
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)