// File: millanek[P]evo/process_vcf_massoko.cpp
// Function: parseMassokoOptions(int, char**)
void parseMassokoOptions(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 'd': arg >> opt::max_overall_depth; break;
            case 'c': arg >> opt::min_copies; break;
            case 's': arg >> opt::min_depth_in_any_individual; break;
            case '?': die = true; break;   
            case OPT_HELP:
                std::cout << FILTER_USAGE_MESSAGE;
                exit(EXIT_SUCCESS);
        }
    }
    if (argc - optind < 1) {
        std::cerr << "missing arguments\n";
        die = true;
    } 
    else if (argc - optind > 1) 
    {
        std::cerr << "too many arguments\n";
        die = true;
    }
    
    if (die) {
        std::cout << "\n" << FILTER_USAGE_MESSAGE;
        exit(EXIT_FAILURE);
    }
    
    // Parse the input filenames
    opt::vcfFile = argv[optind++];
}

// 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 0xf470c(%rip), %rdx     # 0x199840
leaq 0xf2625(%rip), %rcx     # 0x197760
xorl %eax, %eax
movl %eax, %r8d
callq 0xaa40
movb %al, -0x12(%rbp)
movsbl %al, %eax
cmpl $-0x1, %eax
je 0xa5329
movq 0xf3e35(%rip), %rax     # 0x198f90
cmpq $0x0, (%rax)
je 0xa5174
movq 0xf3e28(%rip), %rax     # 0x198f90
movq (%rax), %rax
movq %rax, -0x1d8(%rbp)
jmp 0xa5184
leaq 0x90d64(%rip), %rax     # 0x135edf
movq %rax, -0x1d8(%rbp)
jmp 0xa5184
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 0xa51c1
leaq -0x198(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
movl $0x8, %edx
callq 0xaaa0
jmp 0xa51db
leaq -0x1b8(%rbp), %rdi
callq 0xac88
leaq -0x1b9(%rbp), %rdi
callq 0xa640
movsbl -0x12(%rbp), %eax
movl %eax, -0x1ec(%rbp)
subl $0x1, %eax
je 0xa52fc
jmp 0xa5208
movl -0x1ec(%rbp), %eax
subl $0x3f, %eax
je 0xa52f6
jmp 0xa5219
movl -0x1ec(%rbp), %eax
subl $0x63, %eax
je 0xa52c8
jmp 0xa522a
movl -0x1ec(%rbp), %eax
subl $0x64, %eax
je 0xa528e
jmp 0xa5237
movl -0x1ec(%rbp), %eax
subl $0x73, %eax
je 0xa52df
jmp 0xa5318
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0xa527d
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 0xa53e6
leaq 0xf459f(%rip), %rsi     # 0x199834
leaq -0x198(%rbp), %rdi
callq 0xa370
jmp 0xa52a3
jmp 0xa5318
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x198(%rbp), %rdi
callq 0xa290
jmp 0xa53e6
leaq 0xf4561(%rip), %rsi     # 0x199830
leaq -0x198(%rbp), %rdi
callq 0xa370
jmp 0xa52dd
jmp 0xa5318
leaq 0xf4552(%rip), %rsi     # 0x199838
leaq -0x198(%rbp), %rdi
callq 0xa370
jmp 0xa52f4
jmp 0xa5318
movb $0x1, -0x11(%rbp)
jmp 0xa5318
movq 0xf4545(%rip), %rsi     # 0x199848
movq 0xf3cae(%rip), %rdi     # 0x198fb8
callq 0xa5c0
jmp 0xa5311
xorl %edi, %edi
callq 0xa700
leaq -0x198(%rbp), %rdi
callq 0xa290
jmp 0xa5126
movl -0x4(%rbp), %eax
movq 0xf3c8d(%rip), %rcx     # 0x198fc0
subl (%rcx), %eax
cmpl $0x1, %eax
jge 0xa5353
movq 0xf3caf(%rip), %rdi     # 0x198ff0
leaq 0x8d0e2(%rip), %rsi     # 0x13242a
callq 0xa5c0
movb $0x1, -0x11(%rbp)
jmp 0xa537d
movl -0x4(%rbp), %eax
movq 0xf3c63(%rip), %rcx     # 0x198fc0
subl (%rcx), %eax
cmpl $0x1, %eax
jle 0xa537b
movq 0xf3c85(%rip), %rdi     # 0x198ff0
leaq 0x8d0cb(%rip), %rsi     # 0x13243d
callq 0xa5c0
movb $0x1, -0x11(%rbp)
jmp 0xa537d
testb $0x1, -0x11(%rbp)
je 0xa53af
movq 0xf3c2e(%rip), %rdi     # 0x198fb8
leaq 0x8a4fc(%rip), %rsi     # 0x12f88d
callq 0xa5c0
movq %rax, %rdi
movq 0xf44a8(%rip), %rsi     # 0x199848
callq 0xa5c0
movl $0x1, %edi
callq 0xa700
movq -0x10(%rbp), %rax
movq 0xf3c06(%rip), %rcx     # 0x198fc0
movl (%rcx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movq 0xf3bf8(%rip), %rdx     # 0x198fc0
movl %esi, (%rdx)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xf5498(%rip), %rdi     # 0x19a870
callq 0xa810
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbp
retq
movq -0x1c8(%rbp), %rdi
callq 0xab50
nopw %cs:(%rax,%rax)
nopl (%rax)