// File: millanek[P]evo/evo_ABS.cpp
// Function: parseABSoptions(int, char**)
void parseABSoptions(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 'w':
                windowSizeStep = split(arg.str(), ',');
                opt::windowSize = atoi(windowSizeStep[0].c_str());
                opt::windowStep = atoi(windowSizeStep[1].c_str());
                break;
            case 'n': arg >> opt::runName; break;
            case OPT_ANNOT: arg >> opt::annotFile; break;
            case 'h':
                std::cout << ABS_USAGE_MESSAGE;
                exit(EXIT_SUCCESS);
        }
    }
    
    if (argc - optind < 3) {
        std::cerr << "missing arguments\n";
        die = true;
    }
    else if (argc - optind > 3)
    {
        std::cerr << "too many arguments\n";
        die = true;
    }
    
    if (die) {
        std::cout << "\n" << ABS_USAGE_MESSAGE;
        exit(EXIT_FAILURE);
    }
    
    // Parse the input filenames
    opt::vcfFile = argv[optind++];
    opt::setsFile = argv[optind++];
    opt::ABSquartetFile = argv[optind++];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x290, %rsp            # imm = 0x290
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 0x8d731(%rip), %rdx     # 0x199a20
leaq 0x8c44a(%rip), %rcx     # 0x198740
xorl %eax, %eax
movl %eax, %r8d
callq 0xaa40
movb %al, -0x69(%rbp)
movsbl %al, %eax
cmpl $-0x1, %eax
je 0x10c58d
movq 0x8cc7a(%rip), %rax     # 0x198f90
cmpq $0x0, (%rax)
je 0x10c32f
movq 0x8cc6d(%rip), %rax     # 0x198f90
movq (%rax), %rax
movq %rax, -0x268(%rbp)
jmp 0x10c33f
leaq 0x29ba9(%rip), %rax     # 0x135edf
movq %rax, -0x268(%rbp)
jmp 0x10c33f
movq -0x268(%rbp), %rax
movq %rax, -0x278(%rbp)
leaq -0x211(%rbp), %rdi
movq %rdi, -0x270(%rbp)
callq 0xab60
movq -0x278(%rbp), %rsi
movq -0x270(%rbp), %rdx
leaq -0x210(%rbp), %rdi
callq 0x2d6c0
jmp 0x10c37c
leaq -0x1f0(%rbp), %rdi
leaq -0x210(%rbp), %rsi
movl $0x8, %edx
callq 0xaaa0
jmp 0x10c396
leaq -0x210(%rbp), %rdi
callq 0xac88
leaq -0x211(%rbp), %rdi
callq 0xa640
movsbl -0x69(%rbp), %eax
movl %eax, -0x27c(%rbp)
testl %eax, %eax
je 0x10c538
jmp 0x10c3c2
movl -0x27c(%rbp), %eax
subl $0x3f, %eax
je 0x10c444
jmp 0x10c3cf
movl -0x27c(%rbp), %eax
subl $0x68, %eax
je 0x10c54f
jmp 0x10c3e0
movl -0x27c(%rbp), %eax
subl $0x6e, %eax
je 0x10c521
jmp 0x10c3f1
movl -0x27c(%rbp), %eax
subl $0x77, %eax
je 0x10c44d
jmp 0x10c56b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x10c433
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 0x10c6d3
movb $0x1, -0x11(%rbp)
jmp 0x10c56b
leaq -0x260(%rbp), %rdi
leaq -0x1f0(%rbp), %rsi
callq 0xa900
jmp 0x10c462
leaq -0x240(%rbp), %rdi
leaq -0x260(%rbp), %rsi
movl $0x2c, %edx
callq 0x7bbe0
jmp 0x10c47c
leaq -0x68(%rbp), %rdi
leaq -0x240(%rbp), %rsi
callq 0x50c30
leaq -0x240(%rbp), %rdi
callq 0x3dfa0
leaq -0x260(%rbp), %rdi
callq 0xac88
leaq -0x68(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3d940
movq %rax, %rdi
callq 0xa220
movq %rax, %rdi
callq 0xa970
movl %eax, 0x8d551(%rip)     # 0x199a18
leaq -0x68(%rbp), %rdi
movl $0x1, %esi
callq 0x3d940
movq %rax, %rdi
callq 0xa220
movq %rax, %rdi
callq 0xa970
movl %eax, 0x8d531(%rip)     # 0x199a1c
jmp 0x10c56b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x10c57c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x260(%rbp), %rdi
callq 0xac88
jmp 0x10c57c
leaq 0x8ef40(%rip), %rsi     # 0x19b468
leaq -0x1f0(%rbp), %rdi
callq 0xa750
jmp 0x10c536
jmp 0x10c56b
leaq 0x8ef09(%rip), %rsi     # 0x19b448
leaq -0x1f0(%rbp), %rdi
callq 0xa750
jmp 0x10c54d
jmp 0x10c56b
movq 0x8d4d2(%rip), %rsi     # 0x199a28
movq 0x8ca5b(%rip), %rdi     # 0x198fb8
callq 0xa5c0
jmp 0x10c564
xorl %edi, %edi
callq 0xa700
leaq -0x1f0(%rbp), %rdi
callq 0xa290
jmp 0x10c2e1
leaq -0x1f0(%rbp), %rdi
callq 0xa290
jmp 0x10c6d3
movl -0x4(%rbp), %eax
movq 0x8ca29(%rip), %rcx     # 0x198fc0
subl (%rcx), %eax
cmpl $0x3, %eax
jge 0x10c5d0
movq 0x8ca4b(%rip), %rdi     # 0x198ff0
leaq 0x25e7e(%rip), %rsi     # 0x13242a
callq 0xa5c0
jmp 0x10c5b3
movb $0x1, -0x11(%rbp)
jmp 0x10c5fc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x10c6d3
movl -0x4(%rbp), %eax
movq 0x8c9e6(%rip), %rcx     # 0x198fc0
subl (%rcx), %eax
cmpl $0x3, %eax
jle 0x10c5fa
movq 0x8ca08(%rip), %rdi     # 0x198ff0
leaq 0x25e4e(%rip), %rsi     # 0x13243d
callq 0xa5c0
jmp 0x10c5f6
movb $0x1, -0x11(%rbp)
jmp 0x10c5fc
testb $0x1, -0x11(%rbp)
je 0x10c63d
movq 0x8c9af(%rip), %rdi     # 0x198fb8
leaq 0x2327d(%rip), %rsi     # 0x12f88d
callq 0xa5c0
movq %rax, -0x288(%rbp)
jmp 0x10c61e
movq -0x288(%rbp), %rdi
movq 0x8d3fc(%rip), %rsi     # 0x199a28
callq 0xa5c0
jmp 0x10c633
movl $0x1, %edi
callq 0xa700
movq -0x10(%rbp), %rax
movq 0x8c978(%rip), %rdx     # 0x198fc0
movslq (%rdx), %rcx
movl %ecx, %esi
incl %esi
movl %esi, (%rdx)
movq (%rax,%rcx,8), %rsi
leaq 0x8ed8c(%rip), %rdi     # 0x19b3e8
callq 0xa810
jmp 0x10c663
movq -0x10(%rbp), %rax
movq 0x8c952(%rip), %rdx     # 0x198fc0
movslq (%rdx), %rcx
movl %ecx, %esi
incl %esi
movl %esi, (%rdx)
movq (%rax,%rcx,8), %rsi
leaq 0x8ed86(%rip), %rdi     # 0x19b408
callq 0xa810
jmp 0x10c689
movq -0x10(%rbp), %rax
movq 0x8c92c(%rip), %rdx     # 0x198fc0
movslq (%rdx), %rcx
movl %ecx, %esi
incl %esi
movl %esi, (%rdx)
movq (%rax,%rcx,8), %rsi
leaq 0x8ed80(%rip), %rdi     # 0x19b428
callq 0xa810
jmp 0x10c6af
leaq -0x68(%rbp), %rdi
callq 0x3dfa0
leaq -0x50(%rbp), %rdi
callq 0x3dfa0
leaq -0x38(%rbp), %rdi
callq 0xac88
addq $0x290, %rsp            # imm = 0x290
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 (%rax,%rax)