// File: MiWitt[P]HLAbaits/main.cpp
// Function: parseResults(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
vector<pair<int,int> > parseResults(const string& filename)
{
    try
    {
        vector<pair<int,int> > vctReturn;
        ifstream in(filename.c_str());
        if(!in)
        {
            cerr << "Can't open " << filename << endl;
             exit(EXIT_FAILURE);
        }
        size_t truncated_reads = 0;
        string strLine;
        while(getline(in,strLine))
            if(strLine.length() > 0 && strLine[0] == '-')
                break;
        while(getline(in,strLine))
        {
            vector<string> parsed = Tokenize(strLine);
            //  0      1       2       3        4       5       6       7       8     9        10     11      12      13      14      15      16      17      18         19              20       21
            //match   mis-    rep.    N's     Q gap   Q gap   T gap   T gap   strand  Q        Q       Q       Q       T       T       T       T     block   blockSizes  qStarts     tStarts
            //match   match           count   bases   count   bases                  name    size    start   end     name    size    start   end     count
            int RefEnd      = atoi(parsed[16].c_str())-1;
            int RefStart    = atoi(parsed[15].c_str());
            vctReturn.push_back(pair<int,int>(RefStart,RefEnd));
        }
        in.close();

        return vctReturn;
    }
    catch(...)
    {
        cerr << "Error parsing psl" << endl;
        exit(EXIT_FAILURE);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x310, %rsp            # imm = 0x310
movq %rdi, -0x2b8(%rbp)
movq %rdi, %rax
movq %rax, -0x2b0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
callq 0x6420
movq -0x10(%rbp), %rdi
callq 0x3150
movq %rax, %rsi
leaq -0x220(%rbp), %rdi
movl $0x8, %edx
callq 0x3560
jmp 0x3b4c
movq -0x220(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x220(%rbp,%rax), %rdi
callq 0x31a0
movb %al, -0x2b9(%rbp)
jmp 0x3b6c
movb -0x2b9(%rbp), %al
testb $0x1, %al
jne 0x3b7b
jmp 0x3bfd
movq 0xe46e(%rip), %rdi      # 0x11ff0
leaq 0x8490(%rip), %rsi      # 0xc019
callq 0x32b0
movq %rax, -0x2c8(%rbp)
jmp 0x3b97
movq -0x2c8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x3290
movq %rax, -0x2d0(%rbp)
jmp 0x3bb0
movq -0x2d0(%rbp), %rdi
movq 0xe3ea(%rip), %rsi      # 0x11fa8
callq 0x3310
jmp 0x3bc5
movl $0x1, %edi
callq 0x33b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x228(%rbp)
movl %eax, -0x22c(%rbp)
jmp 0x3ec1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x228(%rbp)
movl %eax, -0x22c(%rbp)
jmp 0x3e97
movq $0x0, -0x238(%rbp)
leaq -0x258(%rbp), %rdi
callq 0x3440
leaq -0x220(%rbp), %rdi
leaq -0x258(%rbp), %rsi
callq 0x3080
movq %rax, -0x2d8(%rbp)
jmp 0x3c30
movq -0x2d8(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x33f0
movb %al, -0x2d9(%rbp)
jmp 0x3c4e
movb -0x2d9(%rbp), %al
testb $0x1, %al
jne 0x3c5a
jmp 0x3cb2
leaq -0x258(%rbp), %rdi
callq 0x34b0
cmpq $0x0, %rax
jbe 0x3cad
xorl %eax, %eax
movl %eax, %esi
leaq -0x258(%rbp), %rdi
callq 0x35c0
movq %rax, -0x2e8(%rbp)
jmp 0x3c85
movq -0x2e8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x3cad
jmp 0x3cb2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x228(%rbp)
movl %eax, -0x22c(%rbp)
jmp 0x3e8b
jmp 0x3c14
jmp 0x3cb4
leaq -0x220(%rbp), %rdi
leaq -0x258(%rbp), %rsi
callq 0x3080
movq %rax, -0x2f0(%rbp)
jmp 0x3cd0
movq -0x2f0(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x33f0
movb %al, -0x2f1(%rbp)
jmp 0x3cee
movb -0x2f1(%rbp), %al
testb $0x1, %al
jne 0x3cfd
jmp 0x3e59
leaq -0x291(%rbp), %rdi
movq %rdi, -0x300(%rbp)
callq 0x3540
movq -0x300(%rbp), %rdx
leaq 0x8307(%rip), %rsi      # 0xc025
leaq -0x290(%rbp), %rdi
callq 0x62c0
jmp 0x3d2c
leaq -0x270(%rbp), %rdi
leaq -0x258(%rbp), %rsi
leaq -0x290(%rbp), %rdx
callq 0x3790
jmp 0x3d48
leaq -0x290(%rbp), %rdi
callq 0x35d8
leaq -0x291(%rbp), %rdi
callq 0x3330
leaq -0x270(%rbp), %rdi
movq %rdi, -0x308(%rbp)
movl $0x10, %esi
callq 0x6440
movq %rax, %rdi
callq 0x3150
movq %rax, %rdi
callq 0x34e0
movq -0x308(%rbp), %rdi
decl %eax
movl %eax, -0x298(%rbp)
movl $0xf, %esi
callq 0x6440
movq %rax, %rdi
callq 0x3150
movq %rax, %rdi
callq 0x34e0
movl %eax, -0x29c(%rbp)
leaq -0x2a4(%rbp), %rdi
leaq -0x29c(%rbp), %rsi
leaq -0x298(%rbp), %rdx
callq 0x6490
jmp 0x3dd3
movq -0x2b8(%rbp), %rdi
leaq -0x2a4(%rbp), %rsi
callq 0x6460
jmp 0x3de8
leaq -0x270(%rbp), %rdi
callq 0x63c0
jmp 0x3cb4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x228(%rbp)
movl %eax, -0x22c(%rbp)
jmp 0x3e2b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x228(%rbp)
movl %eax, -0x22c(%rbp)
leaq -0x290(%rbp), %rdi
callq 0x35d8
leaq -0x291(%rbp), %rdi
callq 0x3330
jmp 0x3e8b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x228(%rbp)
movl %eax, -0x22c(%rbp)
leaq -0x270(%rbp), %rdi
callq 0x63c0
jmp 0x3e8b
leaq -0x220(%rbp), %rdi
callq 0x3090
jmp 0x3e67
movb $0x1, -0x11(%rbp)
leaq -0x258(%rbp), %rdi
callq 0x35d8
leaq -0x220(%rbp), %rdi
callq 0x30d0
testb $0x1, -0x11(%rbp)
jne 0x3eb1
jmp 0x3ea5
leaq -0x258(%rbp), %rdi
callq 0x35d8
leaq -0x220(%rbp), %rdi
callq 0x30d0
jmp 0x3ec1
movq -0x2b8(%rbp), %rdi
callq 0x64c0
movq -0x2b0(%rbp), %rax
addq $0x310, %rsp            # imm = 0x310
popq %rbp
retq
movq -0x2b8(%rbp), %rdi
callq 0x64c0
movq -0x228(%rbp), %rdi
callq 0x3140
movq 0xe110(%rip), %rdi      # 0x11ff0
leaq 0x8140(%rip), %rsi      # 0xc027
callq 0x32b0
movq %rax, -0x310(%rbp)
jmp 0x3ef5
movq -0x310(%rbp), %rdi
movq 0xe0a5(%rip), %rsi      # 0x11fa8
callq 0x3310
jmp 0x3f0a
movl $0x1, %edi
callq 0x33b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x228(%rbp)
movl %eax, -0x22c(%rbp)
callq 0x3500
jmp 0x3f2d
jmp 0x3f2f
movq -0x228(%rbp), %rdi
callq 0x3530
movq %rax, %rdi
callq 0x6520
nopw %cs:(%rax,%rax)