// File: /workspace/github_cpp_makefile_star2_O3/millanek[P]evo/process_vcf_annotation_tools.cpp
// Function: getReferenceForThisRegion(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::string getReferenceForThisRegion(const std::vector<std::string>& thisRegionAnnotation, const std::string& strand, const std::string& currentScaffoldReference) {
    // std::cerr << "generating gene refseq" << std::endl;
    std::string refSeq = "";
    for (std::vector<std::string>::size_type j = 0; j != thisRegionAnnotation.size(); j++) {
        std::vector<string> annotLineVec = split(thisRegionAnnotation[j], '\t');
        refSeq = refSeq + currentScaffoldReference.substr(atoi(annotLineVec[1].c_str())-1,atoi(annotLineVec[2].c_str())-atoi(annotLineVec[1].c_str()) + 1);
    }
    if (strand == "-")
        refSeq = reverseComplementIUPAC(refSeq);
    // std::cerr << "Done" << std::endl;
    return refSeq;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rcx, 0x48(%rsp)
movq %rdx, 0x38(%rsp)
movq %rsi, %r14
movq %rdi, %r15
leaq 0x10(%rdi), %rax
movq %rax, 0x8(%rsp)
movq %rax, (%rdi)
leaq 0x75a1f(%rip), %rdx     # 0xcd9cb
movq %rdx, %rsi
callq 0x28a52
movq (%r14), %rsi
movq %r14, 0x40(%rsp)
cmpq %rsi, 0x8(%r14)
je 0x580fc
leaq 0x28(%rsp), %rbx
xorl %ebp, %ebp
leaq 0x70(%rsp), %r12
xorl %r13d, %r13d
movq %r15, (%rsp)
movq %rbp, 0x10(%rsp)
addq %rbp, %rsi
movq %r12, %rbp
movq %r12, %rdi
movl $0x9, %edx
callq 0x4d650
movq 0x70(%rsp), %r12
movq 0x20(%r12), %rdi
callq 0x86e0
movl %eax, %r14d
leal -0x1(%r14), %eax
movslq %eax, %r15
movq 0x40(%r12), %rdi
callq 0x86e0
subl %r14d, %eax
incl %eax
movslq %eax, %rcx
leaq 0x50(%rsp), %r14
movq %r14, %rdi
movq 0x48(%rsp), %rsi
movq %r15, %rdx
callq 0x84a0
movq (%rsp), %r15
movq (%r15), %rcx
movq 0x8(%r15), %r8
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x84d0
movq %rbx, 0x18(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
movq %rbp, %r12
je 0x5806e
movq %rdx, 0x18(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x28(%rsp)
jmp 0x58074
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x10(%rsp), %rbp
movq 0x8(%rax), %rdx
movq %rdx, 0x20(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r15, %rdi
leaq 0x18(%rsp), %rsi
callq 0x8540
movq 0x18(%rsp), %rdi
cmpq %rbx, %rdi
je 0x580b5
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x580d1
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x8480
movq %r12, %rdi
callq 0x2e784
incq %r13
movq 0x40(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rax
subq %rsi, %rax
sarq $0x5, %rax
addq $0x20, %rbp
cmpq %rax, %r13
jne 0x57fd9
leaq 0x74fb5(%rip), %rsi     # 0xcd0b8
movq 0x38(%rsp), %rdi
callq 0x8160
testl %eax, %eax
jne 0x58148
leaq 0x18(%rsp), %rdi
movq %r15, %rsi
callq 0x579a4
leaq 0x18(%rsp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x8540
movq (%r14), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x58148
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x8480
movq %r15, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, (%rsp)
jmp 0x58163
movq %rax, %r14
jmp 0x58196
movq %rax, %r14
jmp 0x5818c
movq %rax, %r14
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x5818c
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x70(%rsp), %rdi
callq 0x2e784
movq (%rsp), %rax
movq (%rax), %rdi
cmpq 0x8(%rsp), %rdi
je 0x581b4
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x8480
movq %r14, %rdi
callq 0x8840