// File: /workspace/github_cpp_makefile_star2_O3/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 $0x248, %rsp            # imm = 0x248
movl %edi, %ebp
leaq 0x60(%rsp), %rax
movq %rax, -0x10(%rax)
xorl %ecx, %ecx
movq %rcx, -0x8(%rax)
movb $0x0, (%rax)
movq %rcx, 0xa0(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x90(%rsp)
movq $0x0, 0x8(%rsp)
movq %rcx, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
leaq 0x310af(%rip), %rdx     # 0xde287
leaq 0x54381(%rip), %rcx     # 0x101560
movq %rsi, %rbx
xorl %r8d, %r8d
callq 0x8770
movl %eax, %r14d
shll $0x18, %r14d
cmpl $0xff000000, %r14d      # imm = 0xFF000000
je 0xad415
movq $0x0, 0x8(%rsp)
leaq 0x10(%rsp), %r12
leaq 0xc8(%rsp), %r13
movq 0x54d65(%rip), %rax     # 0x101f80
movq (%rax), %r15
testq %r15, %r15
leaq 0x207a3(%rip), %rax     # 0xcd9cb
cmoveq %rax, %r15
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %r15, %rdi
callq 0x81f0
leaq (%rax,%r15), %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x28a52
movq %r13, %rdi
movq %r12, %rsi
movl $0x8, %edx
callq 0x87b0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xad279
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x8480
sarl $0x18, %r14d
cmpl $0x65, %r14d
jle 0xad2b7
leal -0x66(%r14), %eax
cmpl $0x8, %eax
ja 0xad2e0
leaq 0x30ef5(%rip), %rcx     # 0xde188
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
leaq 0x56b87(%rip), %rsi     # 0x103e28
jmpq *%rax
movq %r13, %rdi
leaq 0x5531b(%rip), %rsi     # 0x1025c8
callq 0x82b0
jmp 0xad3ca
testl %r14d, %r14d
je 0xad3b2
cmpl $0x1, %r14d
je 0xad3c3
cmpl $0x3f, %r14d
jne 0xad3ca
movb $0x1, %al
movq %rax, 0x8(%rsp)
jmp 0xad3ca
cmpl $0x77, %r14d
jne 0xad3ca
movq %r12, %rdi
leaq 0xd8(%rsp), %rsi
callq 0x8700
leaq 0x70(%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
movl $0x2c, %edx
callq 0x4d650
movq 0x40(%rsp), %rax
movaps 0x70(%rsp), %xmm0
movq 0x80(%rsp), %rcx
movq %rcx, 0x40(%rsp)
movaps 0x30(%rsp), %xmm1
movaps %xmm0, 0x30(%rsp)
movaps %xmm1, 0xb0(%rsp)
movq %rax, 0xc0(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movq $0x0, 0x80(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x2e784
movq %r14, %rdi
callq 0x2e784
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xad385
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x30(%rsp), %r14
movq (%r14), %rdi
callq 0x86e0
movl %eax, 0x55228(%rip)     # 0x1025c0
movq 0x20(%r14), %rdi
callq 0x86e0
movl %eax, 0x5521d(%rip)     # 0x1025c4
jmp 0xad3ca
movb $0x1, 0x56a98(%rip)     # 0x103e48
jmp 0xad3ca
leaq 0x56a4f(%rip), %rsi     # 0x103e08
movq %r13, %rdi
callq 0x8560
jmp 0xad3ca
movb $0x1, 0x56a7f(%rip)     # 0x103e49
movq %r13, %rdi
movq 0x54bc4(%rip), %rsi     # 0x101f98
callq 0x8620
leaq 0x140(%rsp), %rdi
callq 0x8190
movl %ebp, %edi
movq %rbx, %rsi
leaq 0x30e95(%rip), %rdx     # 0xde287
leaq 0x54167(%rip), %rcx     # 0x101560
xorl %r8d, %r8d
callq 0x8770
movl %eax, %r14d
shll $0x18, %r14d
cmpl $0xff000000, %r14d      # imm = 0xFF000000
jne 0xad214
movq 0x54ba4(%rip), %r13     # 0x101fc0
movslq (%r13), %rax
subl %eax, %ebp
cmpl $0x3, %ebp
jl 0xad53f
jne 0xad54d
testb $0x1, 0x8(%rsp)
jne 0xad565
leal 0x1(%rax), %ecx
movl %ecx, (%r13)
movq (%rbx,%rax,8), %r14
movq 0x56962(%rip), %r15     # 0x103db0
leaq 0x56953(%rip), %r12     # 0x103da8
movq %r14, %rdi
callq 0x81f0
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x86c0
movslq (%r13), %rax
leal 0x1(%rax), %ecx
movl %ecx, (%r13)
movq (%rbx,%rax,8), %r14
movq 0x5694a(%rip), %r15     # 0x103dd0
leaq 0x5693b(%rip), %r12     # 0x103dc8
movq %r14, %rdi
callq 0x81f0
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x86c0
movslq (%r13), %rax
leal 0x1(%rax), %ecx
movl %ecx, (%r13)
movq (%rbx,%rax,8), %rbx
movq 0x56932(%rip), %r14     # 0x103df0
leaq 0x56923(%rip), %r15     # 0x103de8
movq %rbx, %rdi
callq 0x81f0
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %rbx, %rcx
movq %rax, %r8
callq 0x86c0
leaq 0x30(%rsp), %rdi
callq 0x2e784
leaq 0x90(%rsp), %rdi
callq 0x2e784
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0xad513
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x8480
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x54a8c(%rip), %rdi     # 0x101fb8
leaq 0x30d83(%rip), %rsi     # 0xde2b6
callq 0x8460
xorl %edi, %edi
callq 0x8530
movl $0x12, %edx
leaq 0x1e997(%rip), %rsi     # 0xcbee2
jmp 0xad559
movl $0x13, %edx
leaq 0x1e99c(%rip), %rsi     # 0xcbef5
movq 0x54a88(%rip), %rdi     # 0x101fe8
callq 0x84e0
movq 0x54a4c(%rip), %rdi     # 0x101fb8
leaq 0x1deca(%rip), %rsi     # 0xcb43d
movl $0x1, %edx
callq 0x84e0
movq 0x54a34(%rip), %rdi     # 0x101fb8
leaq 0x30d2b(%rip), %rsi     # 0xde2b6
callq 0x8460
movl $0x1, %edi
callq 0x8530
jmp 0xad5c1
movq %rax, %r14
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xad5c4
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0xad5c4
jmp 0xad5c1
jmp 0xad5e7
movq %rax, %r14
movq 0x549cd(%rip), %rsi     # 0x101f98
leaq 0xc8(%rsp), %rdi
callq 0x8620
leaq 0x140(%rsp), %rdi
callq 0x8190
jmp 0xad60b
movq %rax, %r14
jmp 0xad60b
movq %rax, %r14
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xad60b
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x30(%rsp), %rdi
callq 0x2e784
leaq 0x90(%rsp), %rdi
callq 0x2e784
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0xad63e
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x8480
movq %r14, %rdi
callq 0x8840