// File: millanek[P]evo/process_vcf_merge.cpp
// Function: parseMergeOptions(int, char**)
void parseMergeOptions(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 'o': arg >> opt::out; break;
            case OPT_GT_ONLY: opt::bGTonly = true; break;
            case '?': die = true; break;
            case 'h': std::cout << MERGE_USAGE_MESSAGE;
                exit(EXIT_SUCCESS);
        }
    }
    
    if (opt::out.empty()) {
        std::cerr << "You must specify the name of the output file\n";
        die = true;
    }
    
    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" << MERGE_USAGE_MESSAGE;
        exit(EXIT_FAILURE);
    }
    
    // Parse the input filenames
    opt::VCF1File = argv[optind++];
    opt::VCF2File = 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 0xb23d4(%rip), %rdx     # 0x199958
leaq 0xb0b35(%rip), %rcx     # 0x1980c0
xorl %eax, %eax
movl %eax, %r8d
callq 0xaa40
movb %al, -0x12(%rbp)
movsbl %al, %eax
cmpl $-0x1, %eax
je 0xe7743
movq 0xb19e5(%rip), %rax     # 0x198f90
cmpq $0x0, (%rax)
je 0xe75c4
movq 0xb19d8(%rip), %rax     # 0x198f90
movq (%rax), %rax
movq %rax, -0x1d8(%rbp)
jmp 0xe75d4
leaq 0x4e914(%rip), %rax     # 0x135edf
movq %rax, -0x1d8(%rbp)
jmp 0xe75d4
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 0xe7611
leaq -0x198(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
movl $0x8, %edx
callq 0xaaa0
jmp 0xe762b
leaq -0x1b8(%rbp), %rdi
callq 0xac88
leaq -0x1b9(%rbp), %rdi
callq 0xa640
movsbl -0x12(%rbp), %eax
movl %eax, -0x1ec(%rbp)
subl $0x2, %eax
je 0xe7707
jmp 0xe7658
movl -0x1ec(%rbp), %eax
subl $0x3f, %eax
je 0xe7710
jmp 0xe7669
movl -0x1ec(%rbp), %eax
subl $0x68, %eax
je 0xe7716
jmp 0xe767a
movl -0x1ec(%rbp), %eax
subl $0x6f, %eax
je 0xe76cd
jmp 0xe7732
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0xe76bc
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 0xe7857
leaq 0xb3944(%rip), %rsi     # 0x19b018
leaq -0x198(%rbp), %rdi
callq 0xa750
jmp 0xe76e2
jmp 0xe7732
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x198(%rbp), %rdi
callq 0xa290
jmp 0xe7857
movb $0x1, 0xb392a(%rip)     # 0x19b038
jmp 0xe7732
movb $0x1, -0x11(%rbp)
jmp 0xe7732
movq 0xb2243(%rip), %rsi     # 0x199960
movq 0xb1894(%rip), %rdi     # 0x198fb8
callq 0xa5c0
jmp 0xe772b
xorl %edi, %edi
callq 0xa700
leaq -0x198(%rbp), %rdi
callq 0xa290
jmp 0xe7576
leaq 0xb38ce(%rip), %rdi     # 0x19b018
callq 0xaa70
testb $0x1, %al
jne 0xe7755
jmp 0xe776c
movq 0xb1894(%rip), %rdi     # 0x198ff0
leaq 0x6186e(%rip), %rsi     # 0x148fd1
callq 0xa5c0
movb $0x1, -0x11(%rbp)
movl -0x4(%rbp), %eax
movq 0xb184a(%rip), %rcx     # 0x198fc0
subl (%rcx), %eax
cmpl $0x2, %eax
jge 0xe7796
movq 0xb186c(%rip), %rdi     # 0x198ff0
leaq 0x4ac9f(%rip), %rsi     # 0x13242a
callq 0xa5c0
movb $0x1, -0x11(%rbp)
jmp 0xe77c0
movl -0x4(%rbp), %eax
movq 0xb1820(%rip), %rcx     # 0x198fc0
subl (%rcx), %eax
cmpl $0x2, %eax
jle 0xe77be
movq 0xb1842(%rip), %rdi     # 0x198ff0
leaq 0x4ac88(%rip), %rsi     # 0x13243d
callq 0xa5c0
movb $0x1, -0x11(%rbp)
jmp 0xe77c0
testb $0x1, -0x11(%rbp)
je 0xe77f2
movq 0xb17eb(%rip), %rdi     # 0x198fb8
leaq 0x480b9(%rip), %rsi     # 0x12f88d
callq 0xa5c0
movq %rax, %rdi
movq 0xb217d(%rip), %rsi     # 0x199960
callq 0xa5c0
movl $0x1, %edi
callq 0xa700
movq -0x10(%rbp), %rax
movq 0xb17c3(%rip), %rcx     # 0x198fc0
movl (%rcx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movq 0xb17b5(%rip), %rdx     # 0x198fc0
movl %esi, (%rdx)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xb37bd(%rip), %rdi     # 0x19afd8
callq 0xa810
movq -0x10(%rbp), %rax
movq 0xb1795(%rip), %rcx     # 0x198fc0
movl (%rcx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movq 0xb1787(%rip), %rdx     # 0x198fc0
movl %esi, (%rdx)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xb37af(%rip), %rdi     # 0x19aff8
callq 0xa810
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbp
retq
movq -0x1c8(%rbp), %rdi
callq 0xab50
nopw %cs:(%rax,%rax)
nopl (%rax)