// File: millanek[P]evo/evo_findDiscordantPairsFromSAM.cpp
// Function: parseDiscordPairsFromSAMOptions(int, char**)
void parseDiscordPairsFromSAMOptions(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 '?': die = true; break;
            case 'n': arg >> opt::runName; break;
            case 'b': arg >> opt::minBQ; break;
            case 'm': arg >> opt::minMQ; break;
            case 'd': arg >> opt::minDist; break;
            case OPT_HAPCUT: opt::hapcutFormat = true; break;
            case 'h':
                std::cout << DISCORDPAIRS_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" << DISCORDPAIRS_USAGE_MESSAGE;
        exit(EXIT_FAILURE);
    }
    
    // Parse the input filenames
    opt::hetsFile = argv[optind++];
    opt::samFile = 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 0x6c974(%rip), %rdx     # 0x199ad8
leaq 0x6baf5(%rip), %rcx     # 0x198c60
xorl %eax, %eax
movl %eax, %r8d
callq 0xaa40
movb %al, -0x12(%rbp)
movsbl %al, %eax
cmpl $-0x1, %eax
je 0x12d3a0
movq 0x6be05(%rip), %rax     # 0x198f90
cmpq $0x0, (%rax)
je 0x12d1a4
movq 0x6bdf8(%rip), %rax     # 0x198f90
movq (%rax), %rax
movq %rax, -0x1d8(%rbp)
jmp 0x12d1b4
leaq 0x8d34(%rip), %rax      # 0x135edf
movq %rax, -0x1d8(%rbp)
jmp 0x12d1b4
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 0x12d1f1
leaq -0x198(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
movl $0x8, %edx
callq 0xaaa0
jmp 0x12d20b
leaq -0x1b8(%rbp), %rdi
callq 0xac88
leaq -0x1b9(%rbp), %rdi
callq 0xa640
movsbl -0x12(%rbp), %eax
movl %eax, -0x1ec(%rbp)
testl %eax, %eax
je 0x12d36a
jmp 0x12d237
movl -0x1ec(%rbp), %eax
subl $0x3f, %eax
je 0x12d2df
jmp 0x12d248
movl -0x1ec(%rbp), %eax
subl $0x62, %eax
je 0x12d325
jmp 0x12d259
movl -0x1ec(%rbp), %eax
subl $0x64, %eax
je 0x12d353
jmp 0x12d26a
movl -0x1ec(%rbp), %eax
subl $0x68, %eax
je 0x12d373
jmp 0x12d27b
movl -0x1ec(%rbp), %eax
subl $0x6d, %eax
je 0x12d33c
jmp 0x12d28c
movl -0x1ec(%rbp), %eax
subl $0x6e, %eax
je 0x12d2e8
jmp 0x12d38f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x12d2ce
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 0x12d48b
movb $0x1, -0x11(%rbp)
jmp 0x12d38f
leaq 0x6e609(%rip), %rsi     # 0x19b8f8
leaq -0x198(%rbp), %rdi
callq 0xa750
jmp 0x12d2fd
jmp 0x12d38f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x198(%rbp), %rdi
callq 0xa290
jmp 0x12d48b
leaq 0x6c7a4(%rip), %rsi     # 0x199ad0
leaq -0x198(%rbp), %rdi
callq 0xa370
jmp 0x12d33a
jmp 0x12d38f
leaq 0x6c79d(%rip), %rsi     # 0x199ae0
leaq -0x198(%rbp), %rdi
callq 0xa370
jmp 0x12d351
jmp 0x12d38f
leaq 0x6c77a(%rip), %rsi     # 0x199ad4
leaq -0x198(%rbp), %rdi
callq 0xa370
jmp 0x12d368
jmp 0x12d38f
movb $0x1, 0x6e5a7(%rip)     # 0x19b918
jmp 0x12d38f
movq 0x6c76e(%rip), %rsi     # 0x199ae8
movq 0x6bc37(%rip), %rdi     # 0x198fb8
callq 0xa5c0
jmp 0x12d388
xorl %edi, %edi
callq 0xa700
leaq -0x198(%rbp), %rdi
callq 0xa290
jmp 0x12d156
movl -0x4(%rbp), %eax
movq 0x6bc16(%rip), %rcx     # 0x198fc0
subl (%rcx), %eax
cmpl $0x2, %eax
jge 0x12d3ca
movq 0x6bc38(%rip), %rdi     # 0x198ff0
leaq 0x506b(%rip), %rsi      # 0x13242a
callq 0xa5c0
movb $0x1, -0x11(%rbp)
jmp 0x12d3f4
movl -0x4(%rbp), %eax
movq 0x6bbec(%rip), %rcx     # 0x198fc0
subl (%rcx), %eax
cmpl $0x2, %eax
jle 0x12d3f2
movq 0x6bc0e(%rip), %rdi     # 0x198ff0
leaq 0x5054(%rip), %rsi      # 0x13243d
callq 0xa5c0
movb $0x1, -0x11(%rbp)
jmp 0x12d3f4
testb $0x1, -0x11(%rbp)
je 0x12d426
movq 0x6bbb7(%rip), %rdi     # 0x198fb8
leaq 0x2485(%rip), %rsi      # 0x12f88d
callq 0xa5c0
movq %rax, %rdi
movq 0x6c6d1(%rip), %rsi     # 0x199ae8
callq 0xa5c0
movl $0x1, %edi
callq 0xa700
movq -0x10(%rbp), %rax
movq 0x6bb8f(%rip), %rcx     # 0x198fc0
movl (%rcx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movq 0x6bb81(%rip), %rdx     # 0x198fc0
movl %esi, (%rdx)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x6e469(%rip), %rdi     # 0x19b8b8
callq 0xa810
movq -0x10(%rbp), %rax
movq 0x6bb61(%rip), %rcx     # 0x198fc0
movl (%rcx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movq 0x6bb53(%rip), %rdx     # 0x198fc0
movl %esi, (%rdx)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x6e45b(%rip), %rdi     # 0x19b8d8
callq 0xa810
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbp
retq
movq -0x1c8(%rbp), %rdi
callq 0xab50
nopw (%rax,%rax)