// File: millanek[P]evo/evo_Dmin.cpp
// Function: parseDminOptions(int, char**)
void parseDminOptions(int argc, char** argv) {
    bool die = false; string regionArgString; std::vector<string> regionArgs;
    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': arg >> opt::windowSize; break;
            case 'n': arg >> opt::runName; break;
            case 'r': arg >> regionArgString; regionArgs = split(regionArgString, ',');
                opt::regionStart = (int)stringToDouble(regionArgs[0]); opt::regionLength = (int)stringToDouble(regionArgs[1]);  break;
            case 'h':
                std::cout << DMIN_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" << DMIN_USAGE_MESSAGE;
        exit(EXIT_FAILURE);
    }
    
    // Parse the input filenames
    opt::vcfFile = argv[optind++];
    opt::setsFile = argv[optind++];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2b0, %rsp            # imm = 0x2B0
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xa820
leaq -0x50(%rbp), %rdi
callq 0x48da0
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movq 0xa4852(%rip), %rdx     # 0x1999a8
leaq 0xa32e3(%rip), %rcx     # 0x198440
xorl %eax, %eax
movl %eax, %r8d
callq 0xaa40
movb %al, -0x51(%rbp)
movsbl %al, %eax
cmpl $-0x1, %eax
je 0xf547f
movq 0xa3e13(%rip), %rax     # 0x198f90
cmpq $0x0, (%rax)
je 0xf5196
movq 0xa3e06(%rip), %rax     # 0x198f90
movq (%rax), %rax
movq %rax, -0x270(%rbp)
jmp 0xf51a6
leaq 0x40d42(%rip), %rax     # 0x135edf
movq %rax, -0x270(%rbp)
jmp 0xf51a6
movq -0x270(%rbp), %rax
movq %rax, -0x280(%rbp)
leaq -0x1f9(%rbp), %rdi
movq %rdi, -0x278(%rbp)
callq 0xab60
movq -0x280(%rbp), %rsi
movq -0x278(%rbp), %rdx
leaq -0x1f8(%rbp), %rdi
callq 0x2d6c0
jmp 0xf51e3
leaq -0x1d8(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
movl $0x8, %edx
callq 0xaaa0
jmp 0xf51fd
leaq -0x1f8(%rbp), %rdi
callq 0xac88
leaq -0x1f9(%rbp), %rdi
callq 0xa640
movsbl -0x51(%rbp), %eax
movl %eax, -0x284(%rbp)
subl $0x3f, %eax
je 0xf52b0
jmp 0xf522a
movl -0x284(%rbp), %eax
subl $0x68, %eax
je 0xf5441
jmp 0xf523b
movl -0x284(%rbp), %eax
subl $0x6e, %eax
je 0xf52ea
jmp 0xf524c
movl -0x284(%rbp), %eax
subl $0x72, %eax
je 0xf5304
jmp 0xf525d
movl -0x284(%rbp), %eax
subl $0x77, %eax
je 0xf52b9
jmp 0xf545d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x208(%rbp)
movl %eax, -0x20c(%rbp)
jmp 0xf529f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x208(%rbp)
movl %eax, -0x20c(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0xac88
leaq -0x1f9(%rbp), %rdi
callq 0xa640
jmp 0xf5596
movb $0x1, -0x11(%rbp)
jmp 0xf545d
leaq 0xa46f0(%rip), %rsi     # 0x1999b0
leaq -0x1d8(%rbp), %rdi
callq 0xa370
jmp 0xf52ce
jmp 0xf545d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x208(%rbp)
movl %eax, -0x20c(%rbp)
jmp 0xf546e
leaq 0xa5f37(%rip), %rsi     # 0x19b228
leaq -0x1d8(%rbp), %rdi
callq 0xa750
jmp 0xf52ff
jmp 0xf545d
leaq -0x1d8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xa750
jmp 0xf5316
leaq -0x228(%rbp), %rdi
leaq -0x38(%rbp), %rsi
movl $0x2c, %edx
callq 0x7bbe0
jmp 0xf532d
leaq -0x50(%rbp), %rdi
movq %rdi, -0x290(%rbp)
leaq -0x228(%rbp), %rsi
movq %rsi, -0x298(%rbp)
callq 0x50c30
movq -0x298(%rbp), %rdi
callq 0x3dfa0
movq -0x290(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3d940
movq %rax, %rsi
leaq -0x248(%rbp), %rdi
callq 0xa250
jmp 0xf5378
leaq -0x248(%rbp), %rdi
callq 0x7bab0
movsd %xmm0, -0x2a0(%rbp)
jmp 0xf538e
movsd -0x2a0(%rbp), %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0xa45fc(%rip)     # 0x19999c
leaq -0x248(%rbp), %rdi
callq 0xac88
leaq -0x50(%rbp), %rdi
movl $0x1, %esi
callq 0x3d940
movq %rax, %rsi
leaq -0x268(%rbp), %rdi
callq 0xa250
jmp 0xf53cb
leaq -0x268(%rbp), %rdi
callq 0x7bab0
movsd %xmm0, -0x2a8(%rbp)
jmp 0xf53e1
movsd -0x2a8(%rbp), %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0xa45ad(%rip)     # 0x1999a0
leaq -0x268(%rbp), %rdi
callq 0xac88
jmp 0xf545d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x208(%rbp)
movl %eax, -0x20c(%rbp)
leaq -0x248(%rbp), %rdi
callq 0xac88
jmp 0xf546e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x208(%rbp)
movl %eax, -0x20c(%rbp)
leaq -0x268(%rbp), %rdi
callq 0xac88
jmp 0xf546e
movq 0xa4570(%rip), %rsi     # 0x1999b8
movq 0xa3b69(%rip), %rdi     # 0x198fb8
callq 0xa5c0
jmp 0xf5456
xorl %edi, %edi
callq 0xa700
leaq -0x1d8(%rbp), %rdi
callq 0xa290
jmp 0xf5148
leaq -0x1d8(%rbp), %rdi
callq 0xa290
jmp 0xf5596
movl -0x4(%rbp), %eax
movq 0xa3b37(%rip), %rcx     # 0x198fc0
subl (%rcx), %eax
cmpl $0x2, %eax
jge 0xf54c2
movq 0xa3b59(%rip), %rdi     # 0x198ff0
leaq 0x3cf8c(%rip), %rsi     # 0x13242a
callq 0xa5c0
jmp 0xf54a5
movb $0x1, -0x11(%rbp)
jmp 0xf54ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x208(%rbp)
movl %eax, -0x20c(%rbp)
jmp 0xf5596
movl -0x4(%rbp), %eax
movq 0xa3af4(%rip), %rcx     # 0x198fc0
subl (%rcx), %eax
cmpl $0x2, %eax
jle 0xf54ec
movq 0xa3b16(%rip), %rdi     # 0x198ff0
leaq 0x3cf5c(%rip), %rsi     # 0x13243d
callq 0xa5c0
jmp 0xf54e8
movb $0x1, -0x11(%rbp)
jmp 0xf54ee
testb $0x1, -0x11(%rbp)
je 0xf552f
movq 0xa3abd(%rip), %rdi     # 0x198fb8
leaq 0x3a38b(%rip), %rsi     # 0x12f88d
callq 0xa5c0
movq %rax, -0x2b0(%rbp)
jmp 0xf5510
movq -0x2b0(%rbp), %rdi
movq 0xa449a(%rip), %rsi     # 0x1999b8
callq 0xa5c0
jmp 0xf5525
movl $0x1, %edi
callq 0xa700
movq -0x10(%rbp), %rax
movq 0xa3a86(%rip), %rdx     # 0x198fc0
movslq (%rdx), %rcx
movl %ecx, %esi
incl %esi
movl %esi, (%rdx)
movq (%rax,%rcx,8), %rsi
leaq 0xa5c9a(%rip), %rdi     # 0x19b1e8
callq 0xa810
jmp 0xf5555
movq -0x10(%rbp), %rax
movq 0xa3a60(%rip), %rdx     # 0x198fc0
movslq (%rdx), %rcx
movl %ecx, %esi
incl %esi
movl %esi, (%rdx)
movq (%rax,%rcx,8), %rsi
leaq 0xa5c94(%rip), %rdi     # 0x19b208
callq 0xa810
jmp 0xf557b
leaq -0x50(%rbp), %rdi
callq 0x3dfa0
leaq -0x38(%rbp), %rdi
callq 0xac88
addq $0x2b0, %rsp            # imm = 0x2B0
popq %rbp
retq
leaq -0x50(%rbp), %rdi
callq 0x3dfa0
leaq -0x38(%rbp), %rdi
callq 0xac88
movq -0x208(%rbp), %rdi
callq 0xab50
nopw %cs:(%rax,%rax)
nop