LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/sparseSA.cpp
// Function: sparseSA::computeLCP()
void sparseSA::computeLCP() {
  long h=0;
  for(long i = 0; i < N; i+=K) {
    long m = ISA[i/K];
    if(m==0) LCP.set(m, 0); // LCP[m]=0;
    else {
      long j = SA[m-1];
      while(i+h < N && j+h < N && S[i+h] == S[j+h])  h++;
      LCP.set(m, h); //LCP[m] = h;
    }
    h = max(0L, h - K);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0xa0(%rdi), %r14
xorl %r13d, %r13d
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x38(%rbx), %rcx
cmpq %rcx, %r15
jge 0xd79c
movq %r15, %rax
cqto
idivq 0xe8(%rbx)
movq 0x88(%rbx), %rdx
movslq (%rdx,%rax,4), %rsi
testq %rsi, %rsi
je 0xd777
movq 0x50(%rbx), %rax
movq 0x70(%rbx), %rdx
movl -0x4(%rdx,%rsi,4), %edx
leaq (%rax,%rdx), %rdi
addq %r15, %rax
leaq (%r15,%r12), %r8
cmpq %rcx, %r8
jge 0xd76f
leaq (%rdx,%r12), %r8
cmpq %rcx, %r8
jge 0xd76f
movb (%rax,%r12), %r8b
cmpb (%rdi,%r12), %r8b
jne 0xd76f
incq %r12
jmp 0xd74e
movq %r14, %rdi
movl %r12d, %edx
jmp 0xd77e
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x10e82
movq 0xe8(%rbx), %rax
subq %rax, %r12
testq %r12, %r12
cmovleq %r13, %r12
addq %rax, %r15
jmp 0xd716
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/sparseSA.cpp
// Function: sparseSA::collectAllSMAMs(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, interval_t, std::vector<match_t, std::allocator<match_t>>&, int, int, int) const
void sparseSA::collectAllSMAMs(const string &P, int prefix,
        interval_t xmi, vector<match_t> &matches, int min_len, int maxCount, int maxLeft) const {
  // All of the suffixes in xmi's interval are right maximal.
  if(xmi.size() <= maxCount)
        for(long i = xmi.start; i <= xmi.end; i++) 
            find_LmaximalStrict(P, prefix, SA[i], xmi.depth, matches, min_len, maxLeft);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, (%rsp)
movq %rcx, %r15
movl %edx, %ebp
movslq 0x40(%rsp), %rcx
movq (%r15), %rbx
movq 0x8(%r15), %rax
movq %rax, %rdx
subq %rbx, %rdx
incq %rdx
cmpq %rcx, %rdx
jle 0xf60b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r8, %r14
movq %rsi, %r12
movq %rdi, %r13
cmpq %rax, %rbx
jg 0xf5fc
movq 0x70(%r13), %rax
movl (%rax,%rbx,4), %ecx
movl 0x10(%r15), %r8d
movq %r13, %rdi
movq %r12, %rsi
movl %ebp, %edx
movq %r14, %r9
movl 0x48(%rsp), %eax
pushq %rax
pushq 0x8(%rsp)
callq 0x1123a
popq %rax
popq %rcx
incq %rbx
movq 0x8(%r15), %rax
jmp 0xf614
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/sparseSA.h
// Function: vec_uchar::set(unsigned long, int)
void set(size_t idx, int v){
    if(v >= std::numeric_limits<unsigned char>::max()) {
        vec.at(idx) = std::numeric_limits<unsigned char>::max();
        M.push_back(item_t(idx, v));
    }
    else { vec.at(idx) = (unsigned char)v; }
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
cmpl $0xff, %edx
jge 0x10eaa
movq %r14, %rdi
movq %r15, %rsi
callq 0x11b46
movb %bl, (%rax)
jmp 0x10ecd
movq %r14, %rdi
movq %r15, %rsi
callq 0x11b46
movb $-0x1, (%rax)
addq $0x18, %r14
movq %rsp, %rsi
movq %r15, (%rsi)
movl %ebx, 0x8(%rsi)
movq %r14, %rdi
callq 0x11b80
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/sparseSA.cpp
// Function: sparseSA::top_down_faster(char, long, long&, long&) const
bool sparseSA::top_down_faster(char c, long i, long &start, long &end) const {
  long l, r, m, r2=end, l2=start, vgl;
  bool found = false;
  long cmp_with_first = (long)c - (long)S[SA[start]+i];
  long cmp_with_last = (long)c - (long)S[SA[end]+i];
  if(cmp_with_first < 0) {
    l = start+1; l2 = start; // pattern doesn't occur!
  }
  else if(cmp_with_last > 0) {
    l = end+1; l2 = end;
    // pattern doesn't occur!
  }
  else {
    // search for left border:
    l = start; r = end;
    if (cmp_with_first == 0) {
      found = true; r2 = r;
    }
    else {
      while (r - l > 1) {
	m = (l+r) / 2;
	vgl = (long)c - (long)S[SA[m] + i];
	if (vgl <= 0) {
	  if (!found && vgl == 0) {
	    found = true;
	    l2 = m; r2 = r; // search interval for right border
	  }
	  r = m;
	}
	else l = m;
      }
      l = r;
    }
    // search for right border (in the range [l2:r2])
    if (!found) {
      l2 = l - 1; // pattern not found => right border to the left of 'l'
    }
    if (cmp_with_last == 0) {
      l2 = end; // right border is the end of the array
    }
    else {
      while (r2 - l2 > 1) {
	m = (l2 + r2) / 2;
	vgl = (long)c - (long)S[SA[m] + i];
	if (vgl < 0) r2 = m;
	else l2 = m;
      }
    }
  }
  start = l;
  end = l2;
  return l <= l2;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %rbp
movq (%rcx), %r12
movq 0x50(%rdi), %r11
movq 0x70(%rdi), %rdi
movl (%rdi,%r12,4), %eax
addq %r11, %rax
movb (%rdx,%rax), %al
cmpb %sil, %al
jle 0x10f7b
leaq 0x1(%r12), %r14
jmp 0x11040
movq %rdx, %r9
movq (%rbp), %r8
movl (%rdi,%r8,4), %edx
addq %r11, %rdx
movb (%r9,%rdx), %dl
cmpb %sil, %dl
jge 0x10f9b
leaq 0x1(%r8), %r14
jmp 0x1103d
movabsq $0x2, %rbx
cmpb %sil, %al
jne 0x10fb5
movq %r12, %r14
movq %r8, %r15
jmp 0x11038
movb %dl, -0xd(%rsp)
leaq (%r11,%r9), %r13
movl $0x0, -0xc(%rsp)
movq %r8, %r15
movq %r8, %r14
movq %r12, %r10
movq %r10, %rax
movq %rax, %r10
movq %r14, %rax
subq %r10, %rax
cmpq $0x2, %rax
jl 0x11027
leaq (%r10,%r14), %rax
cqto
idivq %rbx
movl (%rdi,%rax,4), %edx
cmpb %sil, (%r13,%rdx)
jl 0x10fd1
setne %dl
movq %rbp, -0x8(%rsp)
movl -0xc(%rsp), %ebp
orb %bpl, %dl
testb $0x1, %dl
cmoveq %r14, %r15
cmoveq %rax, %r12
movzbl %bpl, %ebp
movl $0x1, %edx
cmovel %edx, %ebp
movl %ebp, -0xc(%rsp)
movq -0x8(%rsp), %rbp
movq %rax, %r14
jmp 0x10fce
leaq -0x1(%r14), %rax
testb $0x1, -0xc(%rsp)
cmoveq %rax, %r12
movb -0xd(%rsp), %dl
cmpb %sil, %dl
jne 0x11058
movq %r8, %r12
movq %r14, (%rcx)
movq %r12, (%rbp)
cmpq %r12, %r14
setle %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq %r9, %r11
movq %r15, %rax
subq %r12, %rax
cmpq $0x2, %rax
jl 0x11040
leaq (%r12,%r15), %rax
cqto
idivq %rbx
movl (%rdi,%rax,4), %edx
cmpb %sil, (%r11,%rdx)
cmovgq %rax, %r15
cmovleq %rax, %r12
jmp 0x1105b
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/sparseSA.cpp
// Function: sparseSA::find_LmaximalStrict(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, long, int, std::vector<match_t, std::allocator<match_t>>&, int, int) const
void sparseSA::find_LmaximalStrict(const string &P, int prefix, long i,
        int len, vector<match_t> &matches, int min_len, int border) const {
  // Advance to the left up to K steps.
  for(int k = 0; k < border; k++) {
    // If we reach the end and the match is long enough, print.
    if(prefix == 0 || i == 0 || P[prefix-1] != S[i-1]) {
        if(len >= min_len){
            matches.push_back(match_t(i, prefix, len));
        }
        return; // Reached mismatch, done.
    }
    prefix--; i--; len++; // Continue matching.
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl 0x40(%rsp), %r10d
movl 0x48(%rsp), %r11d
movq (%rsi), %rbx
movq 0x50(%rdi), %r14
movslq %edx, %rdi
movl %edi, %eax
cmpq %rax, %rcx
cmovbq %rcx, %rax
addl %r8d, %eax
xorl %esi, %esi
testl %r11d, %r11d
cmovlel %esi, %r11d
addq %rdi, %rbx
decq %rbx
negq %rdi
addq %rcx, %r14
decq %r14
negl %r11d
cmpl %esi, %r11d
je 0x112c3
movq %rcx, %r15
addq %rsi, %r15
je 0x112a6
cmpq %rsi, %rdi
je 0x112a6
movb (%rbx,%rsi), %bpl
cmpb (%r14,%rsi), %bpl
jne 0x112a3
incl %r8d
decq %rsi
jmp 0x1127f
movl %r8d, %eax
cmpl %r10d, %eax
jl 0x112c3
addl %esi, %edx
leaq 0x8(%rsp), %rsi
movq %r15, (%rsi)
movl %edx, 0x8(%rsi)
movl %eax, 0xc(%rsi)
movq %r9, %rdi
callq 0x11de8
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/sparseSA.cpp
// Function: sparseSA::traverse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, interval_t&, int, int) const
void sparseSA::traverse(const string &P, int prefix, interval_t &cur, int min_len, int maxBranching) const {
  if(hasKmer && cur.depth == 0 && min_len >= KMERSIZE){//free match first bases
    unsigned int index = 0;
    for(long i = 0; i < KMERSIZE; i++)
        index = (index << 2 ) | BITADD[ (unsigned char) P[prefix + i]];
    if(index < TABLESIZE && KMR[index].right>0){
        cur.depth = KMERSIZE;
        cur.start = KMR[index].left;
        cur.end = KMR[index].right;
    }
    else{
        return;//this results in no found seeds where the first KMERSIZE bases contain a non-ACGT character
    }
  }
  if(cur.depth >= min_len || cur.size() <= maxBranching) return;

  while(prefix+cur.depth < (int)P.length()) {
    long start = cur.start; long end = cur.end;
    // If we reach a mismatch, stop.
    if(top_down_faster(P[prefix+cur.depth], cur.depth, start, end) == false) return;

    // Advance to next interval.
    cur.depth += 1; cur.start = start; cur.end = end;

    // If we reach min_len, stop.
    if(cur.depth == min_len || cur.size() <= maxBranching) return;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %ebx
movq %rcx, %r14
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %r13
movl 0x10(%rcx), %eax
cmpb $0x1, 0xf8(%rdi)
jne 0x11625
testl %eax, %eax
setne %cl
cmpl $0xa, %ebx
setl %dl
orb %cl, %dl
jne 0x11625
movslq %r15d, %rcx
addq (%r12), %rcx
xorl %eax, %eax
leaq 0x24e88(%rip), %rdx     # 0x36460
xorl %esi, %esi
cmpq $0xa, %rsi
je 0x115ef
shll $0x2, %eax
movzbl (%rcx,%rsi), %edi
orl (%rdx,%rdi,4), %eax
incq %rsi
jmp 0x115da
cmpl $0x100000, %eax         # imm = 0x100000
jae 0x116a4
movl %eax, %eax
movq 0x100(%r13), %rdx
movl 0x4(%rdx,%rax,8), %ecx
testq %rcx, %rcx
je 0x116a4
movl $0xa, 0x10(%r14)
movl (%rdx,%rax,8), %eax
movq %rax, (%r14)
movq %rcx, 0x8(%r14)
pushq $0xa
popq %rax
cmpl %ebx, %eax
jge 0x116a4
movq (%r14), %rcx
movq 0x8(%r14), %rdx
movq %rdx, %rsi
subq %rcx, %rsi
incq %rsi
movslq %r9d, %rbp
cmpq %rbp, %rsi
jle 0x116a4
leal (%rax,%r15), %esi
cmpl 0x8(%r12), %esi
jge 0x116a4
movq %rcx, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movslq %esi, %rcx
movq (%r12), %rdx
movsbl (%rdx,%rcx), %esi
movslq %eax, %rdx
movq %r13, %rdi
leaq 0x10(%rsp), %rcx
leaq 0x8(%rsp), %r8
callq 0x10f4a
testb %al, %al
je 0x116a4
movl 0x10(%r14), %eax
incl %eax
movl %eax, 0x10(%r14)
movq 0x10(%rsp), %rcx
movq %rcx, (%r14)
movq 0x8(%rsp), %rdx
movq %rdx, 0x8(%r14)
cmpl %ebx, %eax
je 0x116a4
movq %rdx, %rsi
subq %rcx, %rsi
incq %rsi
jmp 0x1163c
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/sparseSA.cpp
// Function: sparseSA::suffixlink(interval_t&) const
bool sparseSA::suffixlink(interval_t &m) const {
  m.depth -= K;
  if( m.depth <= 0) return false;
  m.start = ISA[SA[m.start] / K + 1];
  m.end = ISA[SA[m.end] / K + 1];
  return expand_link(m);
}

// Assembly:
movq 0xe8(%rdi), %rcx
movl 0x10(%rsi), %eax
subl %ecx, %eax
movl %eax, 0x10(%rsi)
testl %eax, %eax
jle 0x11701
movq 0x70(%rdi), %r8
movq 0x88(%rdi), %r9
movq (%rsi), %rax
movq 0x8(%rsi), %r10
movl (%r8,%rax,4), %eax
xorl %edx, %edx
idivq %rcx
movslq 0x4(%r9,%rax,4), %rax
movq %rax, (%rsi)
movl (%r8,%r10,4), %eax
xorl %edx, %edx
idivq %rcx
movslq 0x4(%r9,%rax,4), %rax
movq %rax, 0x8(%rsi)
jmp 0x12096
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/sparseSA.cpp
// Function: sparseSA::top_down_child(char, interval_t&) const
bool sparseSA::top_down_child(char c, interval_t &cur) const{
    long left = cur.start;
    long right = CHILD[cur.end];
    if(cur.start >= right || right > cur.end)
        right = CHILD[cur.start];
    //now left and right point to first child
    if(S[SA[cur.start]+cur.depth] == c){
        cur.end = right-1;
        return true;
    }
    left = right;
    //while has next L-index
    while(CHILD[right] > right && LCP[right] == LCP[CHILD[right]]){
        right = CHILD[right];
        if(S[SA[left]+cur.depth] == c){
            cur.start = left; cur.end = right - 1;
            return true;
        }
        left = right;
    }
    //last interval
    if(S[SA[left]+cur.depth] == c){
            cur.start = left;
            return true;
    }
    return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movq (%rdx), %r8
movq 0x8(%rdx), %rcx
movq 0xd0(%rdi), %rax
movslq (%rax,%rcx,4), %rdi
cmpq %rdi, %r8
setl %dl
cmpq %rdi, %rcx
setge %cl
testb %cl, %dl
jne 0x11ff3
movslq (%rax,%r8,4), %rdi
movq 0x50(%r14), %rcx
movq 0x70(%r14), %rsi
movl 0x10(%rbx), %edx
movl (%rsi,%r8,4), %r8d
addl %edx, %r8d
cmpb %bpl, (%rcx,%r8)
je 0x1206a
leaq 0xa0(%r14), %r12
movq %rdi, %r15
movslq (%rax,%rdi,4), %rax
cmpq %rax, %rdi
jge 0x12073
movq %r12, %rdi
movq %r15, %rsi
callq 0x10ed8
movl %eax, %r13d
movq 0xd0(%r14), %rax
movslq (%rax,%r15,4), %rsi
movq %r12, %rdi
callq 0x10ed8
movq 0x50(%r14), %rcx
movq 0x70(%r14), %rsi
movl 0x10(%rbx), %edx
cmpl %eax, %r13d
jne 0x12073
movq 0xd0(%r14), %rax
movslq (%rax,%r15,4), %rdi
movl (%rsi,%r15,4), %r8d
addl %edx, %r8d
cmpb %bpl, (%rcx,%r8)
jne 0x12012
movq %r15, (%rbx)
decq %rdi
movq %rdi, 0x8(%rbx)
jmp 0x12080
addl (%rsi,%r15,4), %edx
cmpb %bpl, (%rcx,%rdx)
jne 0x12091
movq %r15, (%rbx)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0x12082
nop
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/sparseSA.h
// Function: sparseSA::expand_link(interval_t&) const
inline bool expand_link(interval_t &link) const {
    long thresh = 2 * link.depth * logN, exp = 0; // Threshold link expansion.
    long start = link.start;
    long end = link.end;
    while(LCP[start] >= link.depth) {
      exp++;
      if(exp >= thresh) return false;
      start--;
    }
    while(end < NKm1 && LCP[end+1] >= link.depth) {
      exp++;
      if(exp >= thresh) return false;
      end++;
    }
    link.start = start; link.end = end;
    return true;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movslq 0x10(%rsi), %rbp
imulq 0x40(%rdi), %rbp
addq %rbp, %rbp
movq (%rsi), %r15
movq 0x8(%rsi), %r12
movq %rdi, 0x10(%rsp)
leaq 0xa0(%rdi), %r13
xorl %r14d, %r14d
movq %r13, %rdi
movq %r15, %rsi
callq 0x10ed8
cmpl 0x10(%rbx), %eax
jl 0x120e6
incq %r14
cmpq %rbp, %r14
jge 0x12118
decq %r15
jmp 0x120c9
movq %r13, 0x8(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x48(%rax), %r12
jge 0x1211c
leaq 0x1(%r12), %r13
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x10ed8
cmpl 0x10(%rbx), %eax
jl 0x1211c
incq %r14
movq %r13, %r12
cmpq %rbp, %r14
jl 0x120eb
xorl %eax, %eax
jmp 0x12125
movq %r15, (%rbx)
movq %r12, 0x8(%rbx)
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/fasta.cpp
// Function: trim(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, long&, long&)
void trim(string &line, long &start, long &end) {
  // Trim leading spaces.
  for(long i = start; i < (int)line.length(); i++) {
    if(line[i] != ' ') { start = i; break; }
  }
  // Trim trailing spaces.
  for(long i = line.length() - 1; i >= 0; i--) {
    if(line[i] != ' ') { end = i; break; }
    if(i == 0) break;
  }
}

// Assembly:
movq (%rsi), %r8
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movslq %ecx, %r9
cmpq %r9, %r8
jge 0x14b00
cmpb $0x20, (%rax,%r8)
jne 0x14af6
incq %r8
jmp 0x14ae5
movq %r8, (%rsi)
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
decq %rcx
testq %rcx, %rcx
js 0x14b14
cmpb $0x20, (%rax,%rcx)
jne 0x14b15
addq $-0x1, %rcx
jb 0x14b03
retq
movq %rcx, (%rdx)
retq
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/fasta.cpp
// Function: fastqInputReader::fastqInputReader(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
fastqInputReader::fastqInputReader(const string& fName, bool nucOnly): 
        nucleotidesOnly(nucOnly), filename(fName) {
    pthread_mutex_init(&readLock_, NULL);
    fp = gzopen(fName.c_str(),"r");
    if(fp == NULL){
        fprintf(stderr, "ERROR: file %s could not be read.", fName.c_str());
        exit(1);
    }
    seq = kseq_init(fp);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movb %dl, 0x14(%rdi)
leaq 0x18(%rdi), %r15
movq %r15, %rdi
callq 0x7440
leaq 0x38(%rbx), %rdi
xorl %esi, %esi
callq 0x74e0
movq (%r14), %rdi
leaq 0x1e8d4(%rip), %rsi     # 0x3378b
callq 0x74c0
movq %rax, (%rbx)
testq %rax, %rax
je 0x14ed6
movq %rax, %rdi
callq 0x14f0c
movq %rax, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movq 0x350eb(%rip), %rax     # 0x49fc8
movq (%rax), %rdi
movq (%r14), %rdx
leaq 0x21994(%rip), %rsi     # 0x3687e
xorl %eax, %eax
callq 0x7480
pushq $0x1
popq %rdi
callq 0x7390
movq %rax, %rbx
movq %r15, %rdi
callq 0x76a8
movq %rbx, %rdi
callq 0x75e0
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/fasta.cpp
// Function: fastqInputReader::open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
void fastqInputReader::open(const string& fileName, bool nucOnly){
    nucleotidesOnly = nucOnly;
    filename = fileName;
    fp = gzopen(fileName.c_str(),"r");
    if(fp == NULL){
        fprintf(stderr, "ERROR: file %s could not be read.", fileName.c_str());
        exit(1);
    }
    seq = kseq_init(fp);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movb %dl, 0x14(%rdi)
addq $0x18, %rdi
callq 0x7180
movq (%r14), %rdi
leaq 0x1e819(%rip), %rsi     # 0x3378b
callq 0x74c0
movq %rax, (%rbx)
testq %rax, %rax
je 0x14f93
movq %rax, %rdi
callq 0x14f0c
movq %rax, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x3502e(%rip), %rax     # 0x49fc8
movq (%rax), %rdi
movq (%r14), %rdx
leaq 0x218d7(%rip), %rsi     # 0x3687e
xorl %eax, %eax
callq 0x7480
pushq $0x1
popq %rdi
callq 0x7390
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/dp.cpp
// Function: dp_scores::updateScoreMatrixDna()
void dp_scores::updateScoreMatrixDna(){//presumes match/mismatch has been added correctly
    for(int i = 0; i < 127; i++)
        for(int j = 0; j < 127; j++)
            //set to value that is small enough to be used with large reads and not cause overflow with current score
            scoreMatrix[i][j] = -200000;
    for(int i = 'A'; i <= 'Z'; i++)
        for(int j = 'A'; j <= 'Z'; j++)
            scoreMatrix[i][j] = i==j ? match : mismatch;
    for(int i = 'a'; i <= 'z'; i++)
        for(int j = 'a'; j <= 'z'; j++)
            scoreMatrix[i][j] = i==j ? match : mismatch;
}

// Assembly:
leaq 0x10(%rdi), %rax
xorl %ecx, %ecx
cmpq $0x7f, %rcx
je 0x155f7
xorl %edx, %edx
cmpq $0x7f, %rdx
je 0x155ec
movl $0xfffcf2c0, (%rax,%rdx,4) # imm = 0xFFFCF2C0
incq %rdx
jmp 0x155da
incq %rcx
addq $0x1fc, %rax            # imm = 0x1FC
jmp 0x155d2
leaq 0x8210(%rdi), %rax
pushq $0x41
popq %rcx
xorl %edx, %edx
cmpq $0x5b, %rcx
je 0x15636
xorl %esi, %esi
cmpq $0x1a, %rsi
je 0x15628
xorl %r8d, %r8d
cmpq %rsi, %rdx
setne %r8b
movl (%rdi,%r8,4), %r8d
movl %r8d, (%rax,%rsi,4)
incq %rsi
jmp 0x1560b
incq %rcx
addq $0x1fc, %rax            # imm = 0x1FC
incq %rdx
jmp 0x15603
leaq 0xc210(%rdi), %rax
pushq $0x61
popq %rcx
xorl %edx, %edx
cmpq $0x7b, %rcx
je 0x15675
xorl %esi, %esi
cmpq $0x1a, %rsi
je 0x15667
xorl %r8d, %r8d
cmpq %rsi, %rdx
setne %r8b
movl (%rdi,%r8,4), %r8d
movl %r8d, (%rax,%rsi,4)
incq %rsi
jmp 0x1564a
incq %rcx
addq $0x1fc, %rax            # imm = 0x1FC
incq %rdx
jmp 0x15642
retq
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/dp.cpp
// Function: dynProg::initDPMatrix(int, int, bool)
void dynProg::initDPMatrix(int dimensionL2, int dimensionL1, bool affine){
    DP_L2 = dimensionL2;
    DP_L1 = dimensionL1;
    M = new int * [DP_L2];
    for(int i = 0; i < DP_L2; i++){
        M[i] = new int[DP_L1];
    }
    if(affine){
        UP = new int * [DP_L1];
        LEFT = new int * [DP_L1];
        for(int i = 0; i < DP_L2; i++){
            UP[i] = new int[DP_L1];
            LEFT[i] = new int[DP_L1];
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, 0x4(%rsp)
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
movl %esi, 0x18(%rdi)
movl %edx, 0x1c(%rdi)
movl %esi, %edi
shlq $0x3, %rdi
xorl %r15d, %r15d
testl %esi, %esi
pushq $-0x1
popq %r13
cmovsq %r13, %rdi
cmovlel %r15d, %ebx
callq 0x7030
movq %rax, (%r14)
movl %ebp, %r12d
shlq $0x2, %r12
testl %ebp, %ebp
cmovsq %r13, %r12
cmpq %r15, %rbx
je 0x156d7
movq %r12, %rdi
callq 0x7030
movq (%r14), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
jmp 0x156be
cmpb $0x0, 0x4(%rsp)
je 0x1573c
movslq %ebp, %r15
leaq (,%r15,8), %r12
shlq $0x2, %r15
testl %ebp, %ebp
cmovsq %r13, %r12
cmovsq %r13, %r15
movq %r12, %rdi
callq 0x7030
movq %rax, 0x8(%r14)
movq %r12, %rdi
callq 0x7030
movq %rax, 0x10(%r14)
xorl %r12d, %r12d
cmpq %r12, %rbx
je 0x1573c
movq %r15, %rdi
callq 0x7030
movq 0x8(%r14), %rcx
movq %rax, (%rcx,%r12,8)
movq %r15, %rdi
callq 0x7030
movq 0x10(%r14), %rcx
movq %rax, (%rcx,%r12,8)
incq %r12
jmp 0x15712
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/dp.cpp
// Function: dynProg::deleteDPMatrix(bool)
void dynProg::deleteDPMatrix(bool affine){
    for(int i = 0; i < DP_L2; i++)
        delete[] M[ i ];
    delete[] M;
    if(affine){
        for(int i = 0; i < DP_L2; i++){
            delete[] UP[ i ];
            delete[] LEFT[ i ];
        }
        delete[] UP;
        delete[] LEFT;
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
xorl %r14d, %r14d
movslq 0x18(%rbx), %rax
movq (%rbx), %rdi
cmpq %rax, %r14
jge 0x1578b
movq (%rdi,%r14,8), %rdi
testq %rdi, %rdi
je 0x15786
callq 0x73f0
incq %r14
jmp 0x1576c
testq %rdi, %rdi
je 0x15795
callq 0x73f0
testb %bpl, %bpl
je 0x157eb
xorl %r14d, %r14d
movslq 0x18(%rbx), %rax
movq 0x8(%rbx), %rdi
cmpq %rax, %r14
jge 0x157cf
movq (%rdi,%r14,8), %rdi
testq %rdi, %rdi
je 0x157b8
callq 0x73f0
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x157ca
callq 0x73f0
incq %r14
jmp 0x1579d
testq %rdi, %rdi
je 0x157d9
callq 0x73f0
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x157eb
popq %rbx
popq %r14
popq %rbp
jmp 0x73f0
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/utils.cpp
// Function: Utils::contains(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, long, long, char)
bool contains(const std::string & str,const long begin,const long end, const char c){
        bool contains = false;
        long i = begin;
        assert(begin >= 0 && end < (long)str.length());
        while(!contains && i <= end){
            contains = str[i] == c;
            i++;
        }
        return contains;
    }

// Assembly:
movq (%rdi), %rdi
xorl %eax, %eax
testb $0x1, %al
jne 0x18f70
cmpq %rdx, %rsi
jg 0x18f70
cmpb %cl, (%rdi,%rsi)
sete %al
incq %rsi
jmp 0x18f5c
andb $0x1, %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/utils.cpp
// Function: Utils::reverse_complement(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, bool)
void reverse_complement(std::string &seq_rc, bool nucleotides_only) {//TODO optimize this for char arrays
        // Reverse in-place.
        std::reverse(seq_rc.begin(), seq_rc.end());
        for(size_t i = 0; i < seq_rc.length(); i++) {
            // Adapted from Kurtz code in MUMmer v3.
            seq_rc[i] = RC_TABLE[(int)seq_rc[i]];
        }
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0x8(%rbx), %rsi
addq %rdi, %rsi
callq 0xa101
xorl %eax, %eax
leaq 0x1dae1(%rip), %rcx     # 0x36a70
cmpq 0x8(%rbx), %rax
jae 0x18faa
movq (%rbx), %rdx
movsbq (%rdx,%rax), %rsi
movb (%rsi,%rcx), %sil
movb %sil, (%rdx,%rax)
incq %rax
jmp 0x18f8f
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/mapper.cpp
// Function: recoverCIGAR3from4(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string recoverCIGAR3from4(string cigar4){
    stringstream ss(cigar4);
    stringstream cigar3;
    int i;
    char symbol;
    int matchLength = 0;
    while (ss >> i){
        ss.get(symbol);
        if(symbol == 'X' || symbol == '=')
            matchLength += i;
        else{
            //finish previous series of match/mismatch
            if(matchLength > 0){
                cigar3 << matchLength << 'M';
                matchLength = 0;
            }
            cigar3 << i << symbol;
        }
    }
    //finish possible last series of matches
    if(matchLength > 0)
        cigar3 << matchLength << 'M';
    return cigar3.str();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x328, %rsp            # imm = 0x328
movq %rdi, 0x10(%rsp)
leaq 0x1a0(%rsp), %rdi
pushq $0x18
popq %rdx
callq 0x7550
leaq 0x18(%rsp), %rdi
callq 0x71e0
xorl %ebp, %ebp
leaq 0x28(%rsp), %r14
leaq 0x1a0(%rsp), %r15
leaq 0xc(%rsp), %r12
leaq 0xb(%rsp), %r13
pushq $0x4d
popq %rbx
movq %r15, %rdi
movq %r12, %rsi
callq 0x71a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x190c0
movq %r15, %rdi
movq %r13, %rsi
callq 0x7450
movzbl 0xb(%rsp), %eax
cmpl $0x58, %eax
je 0x19085
cmpl $0x3d, %eax
jne 0x1908b
addl 0xc(%rsp), %ebp
jmp 0x19052
testl %ebp, %ebp
jle 0x190a5
movq %r14, %rdi
movl %ebp, %esi
callq 0x75c0
xorl %ebp, %ebp
movq %rax, %rdi
movl %ebx, %esi
callq 0x7330
movl 0xc(%rsp), %esi
movq %r14, %rdi
callq 0x75c0
movsbl 0xb(%rsp), %esi
movq %rax, %rdi
callq 0x7330
jmp 0x19052
testl %ebp, %ebp
jle 0x190d9
movq %r14, %rdi
movl %ebp, %esi
callq 0x75c0
pushq $0x4d
popq %rsi
movq %rax, %rdi
callq 0x7330
leaq 0x30(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x7540
leaq 0x18(%rsp), %rdi
callq 0x7210
leaq 0x1a0(%rsp), %rdi
callq 0x7210
movq 0x10(%rsp), %rax
addq $0x328, %rsp            # imm = 0x328
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x1912a
jmp 0x1911d
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x7210
leaq 0x1a0(%rsp), %rdi
callq 0x7210
movq %rbx, %rdi
callq 0x75e0
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/mapper.cpp
// Function: alignment_t::setMate(alignment_t const*, bool, bool)
void alignment_t::setMate(const alignment_t * o, bool concordant, bool upstream){
    mate.flag.set(0,true);//positions for mate to be important: 0,1,5,6,7
    mate.flag.set(1,true);
    mate.flag.set(5,o->flag.test(4));
    mate.flag.set(6,upstream);
    mate.flag.set(7,!upstream);
    mate.concordant = concordant;
    mate.pnext = o->pos;
    mate.pnextGlob = o->refB;
    mate.tLength = max(refE,o->refE) - min(refB,o->refB) + 1;
    long firstPos = flag.test(4) ? refE : refB;
    long secondPos = o->flag.test(4) ? o->refE : o->refB;
    if(firstPos > secondPos) mate.tLength *= -1;
    mate.rnext = rname == o->rname ? "=" : o->rname;
    if(concordant)
        mate.alignmentScore = o->alignmentScore;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %r13d
movl %edx, %r12d
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xa0(%rdi), %rbp
pushq $0x1
popq %r15
movq %rbp, %rdi
xorl %esi, %esi
movl %r15d, %edx
callq 0xa1f6
pushq $0x1
popq %rsi
movq %rbp, %rdi
movl %r15d, %edx
callq 0xa1f6
leaq 0x40(%r14), %r15
pushq $0x4
popq %rsi
movq %r15, %rdi
callq 0xa11c
movzbl %al, %edx
pushq $0x5
popq %rsi
movq %rbp, %rdi
callq 0xa1f6
pushq $0x6
popq %rsi
movq %rbp, %rdi
movl %r13d, %edx
callq 0xa1f6
xorb $0x1, %r13b
movzbl %r13b, %edx
pushq $0x7
popq %rsi
movq %rbp, %rdi
movl %r12d, %ebp
callq 0xa1f6
movb %bpl, 0xdc(%rbx)
movq 0x18(%r14), %rax
movq %rax, 0xc8(%rbx)
movq (%r14), %rax
movq %rax, 0xd0(%rbx)
leaq 0x8(%rbx), %r13
movq 0x8(%rbx), %rcx
movq 0x8(%r14), %rdx
cmpq %rdx, %rcx
cmovgq %rcx, %rdx
movq (%rbx), %rcx
cmpq %rcx, %rax
cmovlq %rax, %rcx
subl %ecx, %edx
incl %edx
movl %edx, 0xd8(%rbx)
leaq 0x40(%rbx), %rdi
pushq $0x4
popq %r12
movq %r12, %rsi
callq 0xa11c
testb %al, %al
cmoveq %rbx, %r13
movq (%r13), %r13
movq %r15, %rdi
movq %r12, %rsi
callq 0xa11c
movzbl %al, %eax
cmpq (%r14,%rax,8), %r13
jle 0x1a1ec
negl 0xd8(%rbx)
leaq 0x48(%rbx), %rdi
leaq 0x48(%r14), %r12
movq %r12, %rsi
callq 0xa171
movl %eax, %r15d
testb %al, %al
je 0x1a21b
leaq 0x182e9(%rip), %rsi     # 0x324f3
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x91c4
jmp 0x1a228
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x7440
leaq 0xa8(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x7180
leaq 0x8(%rsp), %rdi
callq 0x76a8
testb %r15b, %r15b
testb %bpl, %bpl
je 0x1a255
movl 0x70(%r14), %eax
movl %eax, 0xe0(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x76a8
jmp 0x1a276
movq %rax, %rbx
testb %r15b, %r15b
movq %rbx, %rdi
callq 0x75e0
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/mapper.cpp
// Function: coveredBases(lis_t&)
int coveredBases(lis_t& interval){
    //sort this candidate region by query position
    interval.sortByReadPos();
    vector<match_t> & seeds = interval.matches;
    int trueCover = seeds[0].len;
    int prevEnd = seeds[0].query + seeds[0].len-1;
    for(size_t i = 1; i < seeds.size(); i++ ){
        int start = max(seeds[i].query,prevEnd+1);
        int stop = max(prevEnd,seeds[i].query + seeds[i].len -1);
        prevEnd = stop;
        trueCover += max(0,stop-start+1);
    }
    return trueCover;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x220ea
movq 0x20(%rbx), %rcx
movq 0x28(%rbx), %rdx
movl 0x8(%rcx), %esi
movl 0xc(%rcx), %eax
addl %eax, %esi
decl %esi
subq %rcx, %rdx
sarq $0x4, %rdx
addq $0x1c, %rcx
pushq $0x1
popq %rdi
pushq $-0x1
popq %r8
cmpq %rdx, %rdi
jae 0x1b3cd
leal 0x1(%rsi), %r10d
movl -0x4(%rcx), %r9d
movl (%rcx), %r11d
cmpl %r10d, %r9d
cmovgl %r9d, %r10d
addl %r11d, %r9d
decl %r9d
cmpl %r9d, %esi
cmovlel %r9d, %esi
movl %esi, %r9d
subl %r10d, %r9d
jns 0x1b3bf
movl %r8d, %r9d
addl %r9d, %eax
incl %eax
incq %rdi
addq $0x10, %rcx
jmp 0x1b390
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/mapper.cpp
// Function: filterLISwithAlignments(read_t&, std::vector<lis_t, std::allocator<lis_t>>&)
void filterLISwithAlignments(read_t & read, vector<lis_t> & lisIntervals){
    for(size_t i = 0; i < read.alignments.size(); i++){
        alignment_t * a = read.alignments[i];
        vector< lis_t >::iterator it = lisIntervals.begin();
        while(it != lisIntervals.end()) {
            //If alignment overlaps with LIS
            if(a->flag.test(4) != it->fw && a->refE >= it->refBegin && a->refB <= it->refEnd) 
                it = lisIntervals.erase(it);
            else 
                ++it;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, (%rsp)
xorl %ebp, %ebp
pushq $0x4
popq %r15
movq (%rsp), %rcx
movq 0xb0(%rcx), %rax
movq 0xb8(%rcx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %rbp
jae 0x1d2b8
movq (%rax,%rbp,8), %r14
movq (%rbx), %r13
leaq 0x40(%r14), %r12
cmpq 0x8(%rbx), %r13
je 0x1d2b3
movq %r12, %rdi
movq %r15, %rsi
callq 0xa11c
cmpb %al, 0x4(%r13)
je 0x1d29d
movq 0x8(%r14), %rax
cmpq 0x8(%r13), %rax
jl 0x1d29d
movq (%r14), %rax
cmpq 0x10(%r13), %rax
jle 0x1d2a3
addq $0x38, %r13
jmp 0x1d273
movq %rbx, %rdi
movq %r13, %rsi
callq 0x22b84
movq %rax, %r13
jmp 0x1d273
incq %rbp
jmp 0x1d24a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/mapper.cpp
// Function: unpairedCopy(alignment_t const*)
alignment_t * unpairedCopy(const alignment_t * a){
  alignment_t * newAln = new alignment_t();
  newAln->refB = a->refB;
  newAln->refE = a->refE;
  newAln->qB = a->qB;
  newAln->qE = a->qE;
  newAln->pos = a->pos;
  newAln->rname = a->rname;
  newAln->refLength = a->refLength;
  newAln->alignmentScore = a->alignmentScore;
  newAln->flag.set(4, a->flag.test(4));
  for(size_t i = 0; i < a->chain.size(); i++)
      newAln->chain.push_back(a->chain[i]);
  return newAln;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r14
movl $0x100, %edi            # imm = 0x100
callq 0x72d0
movq %rax, %rbx
movq %rax, %rdi
callq 0x229e0
movups (%r14), %xmm0
movups %xmm0, (%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x10(%rbx)
movq 0x18(%r14), %rax
movq %rax, 0x18(%rbx)
leaq 0x48(%r14), %rsi
leaq 0x48(%rbx), %rdi
callq 0x7180
movl 0x98(%r14), %eax
movl %eax, 0x98(%rbx)
movl 0x70(%r14), %eax
movl %eax, 0x70(%rbx)
leaq 0x40(%rbx), %r15
leaq 0x40(%r14), %rdi
pushq $0x4
popq %r12
movq %r12, %rsi
callq 0xa11c
movzbl %al, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0xa1f6
movq %rbx, %r15
addq $0xe8, %r15
xorl %r12d, %r12d
xorl %r13d, %r13d
movq 0xe8(%r14), %rsi
movq 0xf0(%r14), %rax
subq %rsi, %rax
sarq $0x4, %rax
cmpq %rax, %r13
jae 0x1dba5
addq %r12, %rsi
movq %r15, %rdi
callq 0x2205e
incq %r13
addq $0x10, %r12
jmp 0x1db77
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdi
callq 0x72e0
movq %r14, %rdi
callq 0x75e0
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/mapper.cpp
// Function: setPaired(alignment_t*, alignment_t*, bool)
void setPaired(alignment_t* mate1, alignment_t* mate2, bool concordant){
    assert(!mate1->flag.test(0));
    assert(!mate2->flag.test(0));
    mate1->flag.set(0, true);
    mate2->flag.set(0, true);
    mate1->setMate(mate2, concordant, true);
    mate2->setMate(mate1, concordant, false);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
addq $0x40, %rdi
pushq $0x1
popq %rbp
xorl %esi, %esi
movl %ebp, %edx
callq 0xa1f6
leaq 0x40(%r14), %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0xa1f6
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
movl %ebp, %ecx
callq 0x1a0f4
movq %r14, %rdi
movq %r15, %rsi
movl %ebx, %edx
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1a0f4
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/mapper.cpp
// Function: setPaired(sparseSA const&, read_t&, read_t&, int, int, bool)
void setPaired(const sparseSA& sa, read_t & mate1, read_t & mate2, int i, int j, bool concordant){
    mate1.alignments[i]->setLocalPos(sa);
    mate2.alignments[j]->setLocalPos(sa);
    int mate1index = i;
    int mate2index = j;
    if(mate1.alignments[mate1index]->paired()){
        alignment_t * newAln = unpairedCopy(mate1.alignments[mate1index]);
        mate1.alignments.push_back(newAln);
        mate1index = mate1.alignments.size()-1;
    }
    if(mate2.alignments[mate2index]->paired()){
        alignment_t * newAln = unpairedCopy(mate2.alignments[mate2index]);
        mate2.alignments.push_back(newAln);
        mate2index = mate2.alignments.size()-1;
    }
    mate1.pairedAlignmentCount++;
    mate2.pairedAlignmentCount++;
    setPaired(mate1.alignments[mate1index], mate2.alignments[mate2index], concordant);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, 0xc(%rsp)
movl %r8d, %ebx
movl %ecx, %r12d
movq %rdx, %rbp
movq %rsi, %r14
movq %rdi, %r13
movslq %ecx, %r15
movq 0xb0(%rsi), %rax
movq (%rax,%r15,8), %rdi
movq %r13, %rsi
callq 0x21f20
movl $0xb0, %eax
addq %rbp, %rax
movq %rax, 0x18(%rsp)
movslq %ebx, %rbx
movq %rbp, 0x10(%rsp)
movq 0xb0(%rbp), %rax
movq (%rax,%rbx,8), %rdi
movq %r13, %rsi
callq 0x21f20
movq 0xb0(%r14), %rax
movq (%rax,%r15,8), %rdi
callq 0xa166
testb %al, %al
je 0x1dcd0
movl $0xb0, %r12d
addq %r14, %r12
movq 0xb0(%r14), %rax
movq (%rax,%r15,8), %rdi
callq 0x1daec
leaq 0x20(%rsp), %rsi
movq %rax, (%rsi)
movq %r12, %rdi
callq 0x22ac6
movq 0xb8(%r14), %r12
subq 0xb0(%r14), %r12
shrq $0x3, %r12
decl %r12d
movq 0x18(%rsp), %r15
movq (%r15), %rax
movq (%rax,%rbx,8), %rdi
callq 0xa166
movq (%r15), %rcx
testb %al, %al
je 0x1dd2e
movq (%rcx,%rbx,8), %rdi
callq 0x1daec
leaq 0x20(%rsp), %rsi
movq %rax, (%rsi)
movq %r15, %rdi
callq 0x22ac6
movq 0x10(%rsp), %rdx
movq 0xb0(%rdx), %rcx
movq 0xb8(%rdx), %rax
subq %rcx, %rax
shlq $0x1d, %rax
movabsq $-0x100000000, %rbx     # imm = 0xFFFFFFFF00000000
addq %rax, %rbx
sarq $0x20, %rbx
jmp 0x1dd33
movq 0x10(%rsp), %rdx
incl 0xc8(%r14)
incl 0xc8(%rdx)
movslq %r12d, %rax
movq 0xb0(%r14), %rdx
movq (%rdx,%rax,8), %rdi
movq (%rcx,%rbx,8), %rsi
movzbl 0xc(%rsp), %edx
callq 0x1dbca
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/mapper.cpp
// Function: calculateDiscordantAlignments(sparseSA const&, read_t&, read_t&)
void calculateDiscordantAlignments(const sparseSA& sa, read_t & mate1, read_t & mate2){
    if(!mate1.alignments.empty() && !mate2.alignments.empty()){
        sort(mate1.alignments.begin(),mate1.alignments.end(), compAlignments);
        sort(mate2.alignments.begin(),mate2.alignments.end(), compAlignments);
        //FIND MAX SCORE OF BOTH MATES
        int maxScoreFirst = mate1.alignments[0]->alignmentScore;
        int maxScoreSecond = mate2.alignments[0]->alignmentScore;
        //DISCORDANT ONLY BETWEEN UNPAIRED MAX SCORE ALIGNMENTS
        size_t mate1AlnCount = mate1.alignments.size();
        size_t mate2AlnCount = mate2.alignments.size();
        size_t i = 0;
        while(i < mate1AlnCount && mate1.alignments[i]->alignmentScore == maxScoreFirst){
            if(!mate1.alignments[i]->concordant()){
                size_t j = i;
                while(j < mate2AlnCount && mate2.alignments[j]->alignmentScore == maxScoreSecond){
                    if(!mate2.alignments[j]->concordant())
                        setPaired(sa, mate1,mate2,i,j,false);
                    j++;
                }
            }
            i++;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, 0x20(%rsp)
movq 0xb0(%rsi), %rdi
movq 0xb8(%rsi), %rsi
cmpq %rsi, %rdi
je 0x1de92
movq %rdx, %rbx
movq 0xb0(%rdx), %rax
cmpq 0xb8(%rdx), %rax
je 0x1de92
leaq -0x3b35(%rip), %r12     # 0x1a281
movq %r12, %rdx
callq 0x255ff
movq 0xb0(%rbx), %rdi
movq 0xb8(%rbx), %rsi
movq %r12, %rdx
callq 0x255ff
movq 0xb0(%r14), %rax
movq 0xb8(%r14), %rsi
movq (%rax), %rcx
movl 0x70(%rcx), %ecx
movl %ecx, 0xc(%rsp)
movq 0xb0(%rbx), %rcx
movq 0xb8(%rbx), %rdi
movq (%rcx), %rdx
movl 0x70(%rdx), %ebp
subq %rax, %rsi
sarq $0x3, %rsi
movq %rsi, 0x18(%rsp)
subq %rcx, %rdi
sarq $0x3, %rdi
movq %rdi, 0x10(%rsp)
xorl %r15d, %r15d
movq 0x10(%rsp), %rax
cmpq %r15, %rax
movq %r15, %r12
cmovaq %rax, %r12
cmpq 0x18(%rsp), %r15
je 0x1de92
movq 0xb0(%r14), %rax
movq (%rax,%r15,8), %rdi
movl 0xc(%rsp), %eax
cmpl %eax, 0x70(%rdi)
jne 0x1de92
callq 0x22bbe
testb %al, %al
je 0x1de53
incq %r15
jmp 0x1de1b
movq %r15, %r13
cmpq %r13, %r12
je 0x1de4e
movq 0xb0(%rbx), %rax
movq (%rax,%r13,8), %rdi
cmpl %ebp, 0x70(%rdi)
jne 0x1de4e
callq 0x22bbe
testb %al, %al
jne 0x1de8d
movq 0x20(%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %r15d, %ecx
movl %r13d, %r8d
xorl %r9d, %r9d
callq 0x1dc1e
incq %r13
jmp 0x1de56
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/mapper.cpp
// Function: dpWindow(long, long, bool, bool, int, paired_opt const&, long&, long&, bool&)
bool dpWindow(long mateRefB, long mateRefE, bool mateIsFirst, bool mateIsFw, 
        int Plength, const paired_opt& options, long & refB, long & refE, 
        bool& otherFW){
    //FIND VALUE OF OTHER ALNS BEGIN, ORIENTATION and IF ALN IS BEFORE OR AFTER THIS ONE
    long refBmate = mateIsFw ? mateRefB : mateRefE;
    bool rightWindow;
    if(options.orientation == PAIR_FF){
        rightWindow = mateIsFirst ? mateIsFw : !mateIsFw;
        otherFW = mateIsFw;
    }
    else if(options.orientation == PAIR_FR){
        rightWindow = mateIsFw;
        otherFW = !mateIsFw;
    }
    else{
        rightWindow = !mateIsFw;
        otherFW = !mateIsFw;
    }
    //FIND BASIC WINDOW VALUES
    if(rightWindow){
        refB = refBmate + options.minInsert;
        refE = refBmate + options.maxInsert;
    }
    else{
        refB = refBmate - options.maxInsert;
        refE = refBmate - options.minInsert;
    }
    if(otherFW)
        refE += Plength;
    else
        refB -= Plength;
    //ADJUST TO OVERLAP AND DOVETAIL
    if(!options.overlap){
        if(rightWindow)
            refB = max(refB, mateRefE);
        else
            refE = min(refE, mateRefB);
    }
    if(!options.dovetail){
        if(rightWindow)
            refB = max(refB, mateRefB);
        else
            refE = min(refE, mateRefE);
    }
    //RETURN IF WINDOW IS LARGE ENOUGH
    return refE > refB;
}

// Assembly:
pushq %rbp
pushq %rbx
movq 0x28(%rsp), %rbx
movq 0x20(%rsp), %r10
movq 0x18(%rsp), %rax
testl %ecx, %ecx
movq %rsi, %r11
cmovneq %rdi, %r11
movl 0x18(%r9), %ebp
testl %ebp, %ebp
je 0x1ded0
cmpl $0x2, %ebp
jne 0x1dee1
movb %cl, (%rbx)
cmpb %cl, %dl
jne 0x1deec
jmp 0x1df06
movl %ecx, %edx
xorb $0x1, %dl
movb %dl, (%rbx)
testb %cl, %cl
movb $0x1, %cl
je 0x1deec
xorl %ecx, %ecx
jmp 0x1df06
xorb $0x1, %cl
movb %cl, (%rbx)
movb $0x1, %cl
jne 0x1df06
xorl %ecx, %ecx
movslq 0x4(%r9), %rdx
movq %r11, %rbx
subq %rdx, %rbx
movq %rbx, (%rax)
movslq (%r9), %rdx
subq %rdx, %r11
movq %r11, (%r10)
xorl %edx, %edx
jmp 0x1df1b
movslq (%r9), %rdx
addq %r11, %rdx
movq %rdx, (%rax)
movslq 0x4(%r9), %rdx
addq %rdx, %r11
movq %r11, (%r10)
movb $0x1, %dl
testb %cl, %cl
je 0x1df2a
movslq %r8d, %rcx
addq %r11, %rcx
movq %rcx, (%r10)
jmp 0x1df30
movslq %r8d, %rcx
subq %rcx, (%rax)
cmpb $0x0, 0xc(%r9)
je 0x1df47
cmpb $0x0, 0xa(%r9)
jne 0x1df8e
testb %dl, %dl
je 0x1df81
movq (%rax), %rsi
jmp 0x1df5f
testb %dl, %dl
je 0x1df6b
movq (%rax), %rcx
cmpq %rsi, %rcx
cmovgq %rcx, %rsi
movq %rsi, (%rax)
cmpb $0x0, 0xa(%r9)
jne 0x1df8e
cmpq %rdi, %rsi
cmovgq %rsi, %rdi
movq %rdi, (%rax)
jmp 0x1df8e
movq (%r10), %rcx
cmpq %rdi, %rcx
cmovlq %rcx, %rdi
movq %rdi, (%r10)
cmpb $0x0, 0xa(%r9)
je 0x1df84
jmp 0x1df8e
movq (%r10), %rdi
cmpq %rsi, %rdi
cmovlq %rdi, %rsi
movq %rsi, (%r10)
movq (%r10), %rcx
cmpq (%rax), %rcx
setg %al
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/mapper.cpp
// Function: bestAlignmentInWindow(read_t const&, std::vector<alnScoreInfo_t, std::allocator<alnScoreInfo_t>> const&, bool, long, long, bool)
int bestAlignmentInWindow(const read_t & mate, const vector<alnScoreInfo_t> & mateAlns, 
        bool firstMate, long refB, long refE, bool fw){
    int bestAln = -1;
    int bestAlnScore = -1*mate.sequence.size();
    for(size_t i = 0; i < mateAlns.size(); i++){
        if(firstMate != mateAlns[i].firstMate){
            alignment_t * mateAln = mate.alignments[mateAlns[i].position];
            if(mateAln->refB >= refB && mateAln->refE <= refE && mateAln->flag.test(4) != fw && mateAln->alignmentScore > bestAlnScore){
                bestAln = mateAlns[i].position;
                bestAlnScore = mateAln->alignmentScore;
            }
        }
    }
    return bestAln;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, 0x14(%rsp)
movq %r8, %r14
movl %edx, %ebp
movq %rsi, %r12
xorl %ebx, %ebx
xorl %eax, %eax
subl 0x28(%rdi), %eax
movl %eax, 0x10(%rsp)
pushq $-0x1
popq %rax
movl %eax, 0xc(%rsp)
pushq $0x4
popq %r15
pushq $0xc
popq %r9
movq %rcx, 0x20(%rsp)
movq %rdi, 0x18(%rsp)
movq (%r12), %rsi
movq 0x8(%r12), %rax
subq %rsi, %rax
cqto
idivq %r9
cmpq %rax, %rbx
jae 0x1e071
cmpb %bpl, -0x4(%rsi,%r15)
je 0x1e065
movslq (%rsi,%r15), %rax
movq 0xb0(%rdi), %rdx
movq (%rdx,%rax,8), %r13
cmpq %rcx, (%r13)
jl 0x1e065
cmpq %r14, 0x8(%r13)
jg 0x1e065
leaq 0x40(%r13), %rdi
pushq $0x4
popq %rsi
callq 0xa11c
cmpb 0x14(%rsp), %al
je 0x1e057
movl 0x70(%r13), %eax
cmpl 0x10(%rsp), %eax
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %rdi
pushq $0xc
popq %r9
jle 0x1e065
movq (%r12), %rdx
movl (%rdx,%r15), %edx
movl %edx, 0xc(%rsp)
movl %eax, 0x10(%rsp)
jmp 0x1e065
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %rdi
pushq $0xc
popq %r9
incq %rbx
addq $0xc, %r15
jmp 0x1dfe3
movl 0xc(%rsp), %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/mapper.h
// Function: alignment_t::setLocalPos(sparseSA const&)
void setLocalPos(const sparseSA& sa){
    if(rname.empty() || rname == "*"){
        long descIndex;
        refB++;
        sa.from_set(refB, descIndex, pos);
        refB--;
        rname = sa.descr[descIndex];
    }
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
leaq 0x48(%rdi), %rbx
cmpq $0x0, 0x50(%rdi)
je 0x21f4c
leaq 0x10142(%rip), %rsi     # 0x32082
movq %rbx, %rdi
callq 0x245ee
testb %al, %al
je 0x21f7d
movq (%r15), %rsi
incq %rsi
movq %rsi, (%r15)
leaq 0x18(%r15), %rcx
movq %rsp, %r12
movq %r14, %rdi
movq %r12, %rdx
callq 0x245fc
decq (%r15)
movq (%r12), %rsi
shlq $0x5, %rsi
addq (%r14), %rsi
movq %rbx, %rdi
callq 0x7180
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/mapper.cpp
// Function: executeSeedType(sparseSA const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, mum_t, int, int, std::vector<match_t, std::allocator<match_t>>&, int)
inline void executeSeedType(const sparseSA& sa, const string& P, int min_len, mum_t memType, int maxBranchWidth, int sparseSkip, vector<match_t>& matches, int maxSmemMemStart){
    if(memType == SMAM)
        sa.SMAM(P, matches, min_len, maxBranchWidth, sparseSkip);
    else if(memType == SMEM)
        sa.SMEM(P, matches, min_len, maxBranchWidth, sparseSkip, maxSmemMemStart);
    else if(memType == MEM)
        sa.MEM(P, matches, min_len, maxBranchWidth, sparseSkip);
    else if(memType == SMEMP)
        sa.SMEMP(P, matches, min_len, maxBranchWidth, sparseSkip, maxSmemMemStart);
}

// Assembly:
pushq %rax
addl $-0x2, %ecx
cmpl $0x3, %ecx
ja 0x21fd6
movl %edx, %eax
movl 0x18(%rsp), %r10d
movq 0x10(%rsp), %rdx
leaq 0x14bf3(%rip), %r11     # 0x36b98
movslq (%r11,%rcx,4), %rcx
addq %r11, %rcx
jmpq *%rcx
movl %eax, %ecx
popq %rax
jmp 0x1017c
movl %eax, %ecx
popq %rax
jmp 0x101e0
movl %r10d, (%rsp)
movl %eax, %ecx
callq 0x1086a
jmp 0x21fd6
movl %r10d, (%rsp)
movl %eax, %ecx
callq 0x10250
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/sparseSA.h
// Function: sparseSA::getChromBounds(long, long&, long&) const
void getChromBounds(const long hit, long& chrStart, long& chrEnd) const{
    long seq, seqpos;
    from_set(hit, seq, seqpos);
    chrStart = startpos[seq];
    if(startpos.size() > 1 && seq < (long)(startpos.size() - 1))
        chrEnd = startpos[seq+1] - 1; // Minus one for the separation character
    else
        chrEnd =  N - 1; // Minus one for the separation character
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
leaq 0x10(%rsp), %r12
leaq 0x8(%rsp), %rcx
movq %r12, %rdx
callq 0x245fc
movq (%r12), %rax
movq 0x18(%r15), %rcx
movq (%rcx,%rax,8), %rdx
movq %rdx, (%r14)
movq 0x20(%r15), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
leaq -0x1(%rdx), %rsi
addq $0x38, %r15
cmpq %rsi, %rax
leaq 0x8(%rcx,%rax,8), %rax
cmovgeq %r15, %rax
cmpq $0x2, %rdx
cmovbq %r15, %rax
movq (%rax), %rax
decq %rax
movq %rax, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop