// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/evo_PBS.cpp
// Function: parsePBSoptions(int, char**)
void parsePBSoptions(int argc, char** argv) {
    bool die = false; string regionArgString; std::vector<string> regionArgs;
    std::vector<string> windowSizeStep;
    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 'f': arg >> opt::fixedWindowSize; break;
            case 'w':
                windowSizeStep = split(arg.str(), ',');
                opt::windowSize = atoi(windowSizeStep[0].c_str());
                opt::windowStep = atoi(windowSizeStep[1].c_str());
                break;
            case 'n': arg >> opt::runName; break;
            case 'i': opt::allowIndels = true; break;
            case OPT_ANNOT: arg >> opt::annotFile; break;
            case OPT_AF: opt::af = true; break;
            case 'h':
                std::cout << PBS_USAGE_MESSAGE;
                exit(EXIT_SUCCESS);
        }
    }
    
    if (argc - optind < 3) {
        std::cerr << "missing arguments\n";
        die = true;
    }
    else if (argc - optind > 3)
    {
        std::cerr << "too many arguments\n";
        die = true;
    }
    
    if (die) {
        std::cout << "\n" << PBS_USAGE_MESSAGE;
        exit(EXIT_FAILURE);
    }
    
    // Parse the input filenames
    opt::vcfFile = argv[optind++];
    opt::setsFile = argv[optind++];
    opt::PBStriosFile = argv[optind++];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movl %edi, %ebp
leaq 0x60(%rsp), %rax
movq %rax, -0x10(%rax)
xorl %ecx, %ecx
movq %rcx, -0x8(%rax)
movb $0x0, (%rax)
movq %rcx, 0xb0(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0xa0(%rsp)
movq $0x0, 0x8(%rsp)
movq %rcx, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
leaq 0x391e6(%rip), %rdx     # 0xe720f
leaq 0x5c530(%rip), %rcx     # 0x10a560
movq %rsi, (%rsp)
xorl %r8d, %r8d
callq 0x8770
movl %eax, %r15d
shll $0x18, %r15d
cmpl $0xff000000, %r15d      # imm = 0xFF000000
je 0xae26b
leaq 0x40(%rsp), %rbx
movq $0x0, 0x8(%rsp)
leaq 0x30(%rsp), %r12
leaq 0xb8(%rsp), %r13
movq 0x5cf0e(%rip), %rax     # 0x10af80
movq (%rax), %r14
testq %r14, %r14
leaq 0x23c00(%rip), %rax     # 0xd1c7f
cmoveq %rax, %r14
movq %rbx, 0x30(%rsp)
movq %r14, %rdi
callq 0x81f0
leaq (%rax,%r14), %rdx
movq %r12, %rdi
movq %r14, %rsi
callq 0x28952
movq %r13, %rdi
movq %r12, %rsi
movl $0x8, %edx
callq 0x87b0
movq 0x30(%rsp), %rdi
cmpq %rbx, %rdi
je 0xae0c6
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x8480
sarl $0x18, %r15d
cmpl $0x65, %r15d
jle 0xae104
leal -0x66(%r15), %eax
cmpl $0x8, %eax
ja 0xae12d
leaq 0x39030(%rip), %rcx     # 0xe7110
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
leaq 0x5ed2a(%rip), %rsi     # 0x10ce18
jmpq *%rax
movq %r13, %rdi
leaq 0x5d4ce(%rip), %rsi     # 0x10b5c8
callq 0x82b0
jmp 0xae21f
testl %r15d, %r15d
je 0xae207
cmpl $0x1, %r15d
je 0xae218
cmpl $0x3f, %r15d
jne 0xae21f
movb $0x1, %al
movq %rax, 0x8(%rsp)
jmp 0xae21f
cmpl $0x77, %r15d
jne 0xae21f
movq %r12, %rdi
leaq 0xc8(%rsp), %rsi
callq 0x8700
leaq 0x88(%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
movl $0x2c, %edx
callq 0x50624
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movaps 0x10(%rsp), %xmm0
movq 0x20(%rsp), %rax
movups 0x88(%rsp), %xmm1
movaps %xmm1, 0x10(%rsp)
movq 0x98(%rsp), %rcx
movq %rcx, 0x20(%rsp)
movaps 0x70(%rsp), %xmm1
movaps %xmm0, 0x70(%rsp)
movq %rax, 0x80(%rsp)
movups %xmm1, 0x88(%rsp)
movq $0x0, 0x98(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x3123c
movq %r14, %rdi
callq 0x3123c
movq 0x30(%rsp), %rdi
cmpq %rbx, %rdi
je 0xae1da
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x10(%rsp), %r14
movq (%r14), %rdi
callq 0x86e0
movl %eax, 0x5d3d3(%rip)     # 0x10b5c0
movq 0x20(%r14), %rdi
callq 0x86e0
movl %eax, 0x5d3c8(%rip)     # 0x10b5c4
jmp 0xae21f
movb $0x1, 0x5ec33(%rip)     # 0x10ce38
jmp 0xae21f
leaq 0x5ebea(%rip), %rsi     # 0x10cdf8
movq %r13, %rdi
callq 0x8560
jmp 0xae21f
movb $0x1, 0x5ec1a(%rip)     # 0x10ce39
movq %r13, %rdi
movq 0x5cd6f(%rip), %rsi     # 0x10af98
callq 0x8620
leaq 0x130(%rsp), %rdi
callq 0x8190
movl %ebp, %edi
movq (%rsp), %rsi
leaq 0x38fc7(%rip), %rdx     # 0xe720f
leaq 0x5c311(%rip), %rcx     # 0x10a560
xorl %r8d, %r8d
callq 0x8770
movl %eax, %r15d
shll $0x18, %r15d
cmpl $0xff000000, %r15d      # imm = 0xFF000000
jne 0xae06b
movq 0x5cd4e(%rip), %rbx     # 0x10afc0
subl (%rbx), %ebp
cmpl $0x3, %ebp
jge 0xae287
movl $0x12, %edx
leaq 0x1ff2d(%rip), %rsi     # 0xce1b2
jmp 0xae29a
movq 0x8(%rsp), %r14
je 0xae2a9
movl $0x13, %edx
leaq 0x1ff2b(%rip), %rsi     # 0xce1c5
movb $0x1, %r14b
movq 0x5cd44(%rip), %rdi     # 0x10afe8
callq 0x84e0
testb $0x1, %r14b
jne 0xae3bd
movslq (%rbx), %rax
leal 0x1(%rax), %ecx
movl %ecx, (%rbx)
movq (%rsp), %rcx
movq (%rcx,%rax,8), %r14
movq 0x5ead6(%rip), %r15     # 0x10cda0
leaq 0x5eac7(%rip), %r12     # 0x10cd98
movq %r14, %rdi
callq 0x81f0
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x86c0
movslq (%rbx), %rax
leal 0x1(%rax), %ecx
movl %ecx, (%rbx)
movq (%rsp), %rcx
movq (%rcx,%rax,8), %r14
movq 0x5eabd(%rip), %r15     # 0x10cdc0
leaq 0x5eaae(%rip), %r12     # 0x10cdb8
movq %r14, %rdi
callq 0x81f0
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x86c0
movslq (%rbx), %rax
leal 0x1(%rax), %ecx
movl %ecx, (%rbx)
movq (%rsp), %rcx
movq (%rcx,%rax,8), %rbx
movq 0x5eaa4(%rip), %r14     # 0x10cde0
leaq 0x5ea95(%rip), %r15     # 0x10cdd8
movq %rbx, %rdi
callq 0x81f0
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %rbx, %rcx
movq %rax, %r8
callq 0x86c0
leaq 0x10(%rsp), %rdi
callq 0x3123c
leaq 0xa0(%rsp), %rdi
callq 0x3123c
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0xae391
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x8480
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x5cc0e(%rip), %rdi     # 0x10afb8
leaq 0x38e8d(%rip), %rsi     # 0xe723e
callq 0x8460
xorl %edi, %edi
callq 0x8530
movq 0x5cbf4(%rip), %rdi     # 0x10afb8
leaq 0x1e2b2(%rip), %rsi     # 0xcc67d
movl $0x1, %edx
callq 0x84e0
movq 0x5cbdc(%rip), %rdi     # 0x10afb8
leaq 0x38e5b(%rip), %rsi     # 0xe723e
callq 0x8460
movl $0x1, %edi
callq 0x8530
jmp 0xae414
movq %rax, %r14
movq 0x30(%rsp), %rdi
cmpq %rbx, %rdi
je 0xae417
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0xae417
jmp 0xae414
jmp 0xae43a
movq %rax, %r14
movq 0x5cb7a(%rip), %rsi     # 0x10af98
leaq 0xb8(%rsp), %rdi
callq 0x8620
leaq 0x130(%rsp), %rdi
callq 0x8190
jmp 0xae459
movq %rax, %r14
jmp 0xae459
movq %rax, %r14
movq 0x30(%rsp), %rdi
cmpq %rbx, %rdi
je 0xae459
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x10(%rsp), %rdi
callq 0x3123c
leaq 0xa0(%rsp), %rdi
callq 0x3123c
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0xae48c
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x8480
movq %r14, %rdi
callq 0x8840