// File: millanek[P]evo/evo_shared_variation.cpp
// Function: parseSharedVarOptions(int, char**)
void parseSharedVarOptions(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 'n': arg >> opt::runName; break;
            case 'l': opt::getLocsFor = split(arg.str(), ','); break;
            case '?': die = true; break;
            case 'h': std::cout << SHAREDVAR_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" << SHAREDVAR_USAGE_MESSAGE;
        exit(EXIT_FAILURE);
    }
    
    // Parse the input filenames
    opt::vcfFile = argv[optind++];
    opt::setsFile = argv[optind++];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x230, %rsp            # imm = 0x230
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movq 0xd3694(%rip), %rdx     # 0x1998a8
leaq 0xd1985(%rip), %rcx     # 0x197ba0
xorl %eax, %eax
movl %eax, %r8d
callq 0xaa40
movb %al, -0x12(%rbp)
movsbl %al, %eax
cmpl $-0x1, %eax
je 0xc644e
movq 0xd2d55(%rip), %rax     # 0x198f90
cmpq $0x0, (%rax)
je 0xc6254
movq 0xd2d48(%rip), %rax     # 0x198f90
movq (%rax), %rax
movq %rax, -0x210(%rbp)
jmp 0xc6264
leaq 0x6fc84(%rip), %rax     # 0x135edf
movq %rax, -0x210(%rbp)
jmp 0xc6264
movq -0x210(%rbp), %rax
movq %rax, -0x220(%rbp)
leaq -0x1b9(%rbp), %rdi
movq %rdi, -0x218(%rbp)
callq 0xab60
movq -0x220(%rbp), %rsi
movq -0x218(%rbp), %rdx
leaq -0x1b8(%rbp), %rdi
callq 0x2d6c0
jmp 0xc62a1
leaq -0x198(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
movl $0x8, %edx
callq 0xaaa0
jmp 0xc62bb
leaq -0x1b8(%rbp), %rdi
callq 0xac88
leaq -0x1b9(%rbp), %rdi
callq 0xa640
movsbl -0x12(%rbp), %eax
movl %eax, -0x224(%rbp)
subl $0x3f, %eax
je 0xc640a
jmp 0xc62e8
movl -0x224(%rbp), %eax
subl $0x68, %eax
je 0xc6410
jmp 0xc62f9
movl -0x224(%rbp), %eax
subl $0x6c, %eax
je 0xc638e
jmp 0xc630a
movl -0x224(%rbp), %eax
subl $0x6e, %eax
je 0xc635d
jmp 0xc642c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0xc634c
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 0xc6539
leaq 0xd48ec(%rip), %rsi     # 0x19ac50
leaq -0x198(%rbp), %rdi
callq 0xa750
jmp 0xc6372
jmp 0xc642c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0xc643d
leaq -0x208(%rbp), %rdi
leaq -0x198(%rbp), %rsi
callq 0xa900
jmp 0xc63a3
leaq -0x1e8(%rbp), %rdi
leaq -0x208(%rbp), %rsi
movl $0x2c, %edx
callq 0x7bbe0
jmp 0xc63bd
leaq 0xd4874(%rip), %rdi     # 0x19ac38
leaq -0x1e8(%rbp), %rsi
callq 0x50c30
leaq -0x1e8(%rbp), %rdi
callq 0x3dfa0
leaq -0x208(%rbp), %rdi
callq 0xac88
jmp 0xc642c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x208(%rbp), %rdi
callq 0xac88
jmp 0xc643d
movb $0x1, -0x11(%rbp)
jmp 0xc642c
movq 0xd3499(%rip), %rsi     # 0x1998b0
movq 0xd2b9a(%rip), %rdi     # 0x198fb8
callq 0xa5c0
jmp 0xc6425
xorl %edi, %edi
callq 0xa700
leaq -0x198(%rbp), %rdi
callq 0xa290
jmp 0xc6206
leaq -0x198(%rbp), %rdi
callq 0xa290
jmp 0xc6539
movl -0x4(%rbp), %eax
movq 0xd2b68(%rip), %rcx     # 0x198fc0
subl (%rcx), %eax
cmpl $0x2, %eax
jge 0xc6478
movq 0xd2b8a(%rip), %rdi     # 0x198ff0
leaq 0x6bfbd(%rip), %rsi     # 0x13242a
callq 0xa5c0
movb $0x1, -0x11(%rbp)
jmp 0xc64a2
movl -0x4(%rbp), %eax
movq 0xd2b3e(%rip), %rcx     # 0x198fc0
subl (%rcx), %eax
cmpl $0x2, %eax
jle 0xc64a0
movq 0xd2b60(%rip), %rdi     # 0x198ff0
leaq 0x6bfa6(%rip), %rsi     # 0x13243d
callq 0xa5c0
movb $0x1, -0x11(%rbp)
jmp 0xc64a2
testb $0x1, -0x11(%rbp)
je 0xc64d4
movq 0xd2b09(%rip), %rdi     # 0x198fb8
leaq 0x693d7(%rip), %rsi     # 0x12f88d
callq 0xa5c0
movq %rax, %rdi
movq 0xd33eb(%rip), %rsi     # 0x1998b0
callq 0xa5c0
movl $0x1, %edi
callq 0xa700
movq -0x10(%rbp), %rax
movq 0xd2ae1(%rip), %rcx     # 0x198fc0
movl (%rcx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movq 0xd2ad3(%rip), %rdx     # 0x198fc0
movl %esi, (%rdx)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xd46fb(%rip), %rdi     # 0x19abf8
callq 0xa810
movq -0x10(%rbp), %rax
movq 0xd2ab3(%rip), %rcx     # 0x198fc0
movl (%rcx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movq 0xd2aa5(%rip), %rdx     # 0x198fc0
movl %esi, (%rdx)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xd46ed(%rip), %rdi     # 0x19ac18
callq 0xa810
addq $0x230, %rsp            # imm = 0x230
popq %rbp
retq
movq -0x1c8(%rbp), %rdi
callq 0xab50
nopw %cs:(%rax,%rax)
nop