LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/readmapping[P]alfalfa/src/options.cpp
// Function: parseOrientation(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
orientation_t parseOrientation(string type) {
    if (type.compare("fr") == 0)
        return PAIR_FR;
    else if (type.compare("rf") == 0)
        return PAIR_RF;
    else if (type.compare("ff") == 0)
        return PAIR_FF;
    else {
        cerr << "WARNING: unrecognized orientation. fr is used instead." << endl;
        return PAIR_FR;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x326c7(%rip), %rsi     # 0x40df7
callq 0x70f0
xorl %ebx, %ebx
testl %eax, %eax
je 0xe7b1
leaq 0x326b8(%rip), %rsi     # 0x40dfa
movq %r14, %rdi
callq 0x70f0
testl %eax, %eax
je 0xe7a5
leaq 0x326a8(%rip), %rsi     # 0x40dfd
movq %r14, %rdi
callq 0x70f0
testl %eax, %eax
je 0xe7ac
movq 0x45880(%rip), %r14     # 0x53fe8
leaq 0x32691(%rip), %rsi     # 0x40e00
movl $0x36, %edx
movq %r14, %rdi
callq 0x7340
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x72b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x71d0
jmp 0xe7b1
movl $0x1, %ebx
jmp 0xe7b1
movl $0x2, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/readmapping[P]alfalfa/src/sparseSA.cpp
// Function: sparseSA::index_size_in_bytes()
long sparseSA::index_size_in_bytes(){
      long indexSize = 0L;
      indexSize += sizeof(sparseMult);
      indexSize += sizeof(hasSufLink);
      indexSize += sizeof(hasChild);
      indexSize += sizeof(K);
      indexSize += sizeof(NKm1);
      indexSize += sizeof(logN);
      indexSize += sizeof(N);
      indexSize += sizeof(maxdescrlen);
      indexSize += sizeof(descr);
      for(size_t i = 0; i < descr.size(); i++){
          indexSize += descr[i].capacity();
      }
      indexSize += sizeof(startpos) + startpos.capacity()*sizeof(long);
      indexSize += S.capacity();
      indexSize += sizeof(SA) + SA.capacity()*sizeof(unsigned int);
      indexSize += sizeof(ISA) + ISA.capacity()*sizeof(int);
      indexSize += sizeof(CHILD) + CHILD.capacity()*sizeof(int);
      indexSize += LCP.index_size_in_bytes();
      indexSize += sizeof(hasKmer);
      indexSize += sizeof(KMR) + KMR.capacity()*sizeof(saTuple_t);
      return indexSize;
}

// Assembly:
movq (%rdi), %rcx
movq 0x8(%rdi), %rdx
subq %rcx, %rdx
je 0xfde1
sarq $0x5, %rdx
cmpq $0x1, %rdx
adcq $0x0, %rdx
addq $0x10, %rcx
movl $0x46, %eax
movl $0xf, %esi
cmpq -0x10(%rcx), %rcx
je 0xfdcd
movq (%rcx), %rsi
addq %rsi, %rax
addq $0x20, %rcx
decq %rdx
jne 0xfdbf
addq $0xa9, %rax
jmp 0xfde6
movl $0xef, %eax
leaq 0x60(%rdi), %rdx
movq 0x70(%rdi), %rcx
movl $0xf, %esi
cmpq %rdx, 0x50(%rdi)
je 0xfdfd
movq 0x60(%rdi), %rsi
movq 0xc8(%rdi), %rdx
subq 0xb8(%rdi), %rdx
addq 0x28(%rdi), %rax
subq 0x18(%rdi), %rax
sarq $0x4, %rdx
addq %rsi, %rax
addq 0x80(%rdi), %rax
addq 0x98(%rdi), %rax
addq 0x88(%rdi), %rcx
addq 0xe0(%rdi), %rax
addq 0xd0(%rdi), %rcx
addq 0xb0(%rdi), %rax
addq 0xa0(%rdi), %rcx
addq 0x110(%rdi), %rax
addq 0x100(%rdi), %rcx
leaq (%rdx,%rdx,2), %rdx
subq %rcx, %rax
leaq (%rax,%rdx,4), %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/readmapping[P]alfalfa/src/sparseSA.cpp
// Function: sparseSA::init(long, bool, bool, bool)
void sparseSA::init(long K_, bool _hasSufLink, bool _hasChild, bool _hasKmer){
  hasSufLink = _hasSufLink;
  hasChild = _hasChild;
  hasKmer = _hasKmer;
  K = K_;

  // Increase string length so divisible by K.
  // Don't forget to count $ termination character.
  S.reserve(S.length()+2*K);
  if(S.length() % K != 0) {
    long appendK = K - S.length() % K ;
    for(long i = 0; i < appendK; i++) S += '$';
  }
  // Make sure last K-sampled characeter is this special character as well!!
  for(long i = 0; i < K; i++) S += '$'; // Append "special" end character. Note: It must be lexicographically less.
  N = S.length();
  std::string(S.data(), S.size()).swap(S);

  // Adjust to "sampled" size.
  logN = (long)ceil(log(N/K) / log(2.0));
  NKm1 = N/K-1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movb %dl, 0xf1(%rdi)
movb %cl, 0xf0(%rdi)
movb %r8b, 0xf8(%rdi)
movq %rsi, 0xe8(%rdi)
leaq 0x50(%rdi), %r14
addq %rsi, %rsi
addq 0x58(%rdi), %rsi
movq %r14, %rdi
callq 0x7530
movq 0x58(%rbx), %rax
movq 0xe8(%rbx), %r15
xorl %edx, %edx
divq %r15
testq %rdx, %rdx
je 0xfed6
subq %rdx, %r15
testq %r15, %r15
jle 0xfed6
xorl %r12d, %r12d
movq %r14, %rdi
movl $0x24, %esi
callq 0x7270
incq %r12
cmpq %r15, %r12
jl 0xfec1
cmpq $0x0, 0xe8(%rbx)
jle 0xfefc
xorl %r15d, %r15d
movq %r14, %rdi
movl $0x24, %esi
callq 0x7270
incq %r15
cmpq 0xe8(%rbx), %r15
jl 0xfee3
movq 0x58(%rbx), %rdx
movq %rdx, 0x38(%rbx)
movq 0x50(%rbx), %rsi
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
addq %rsi, %rdx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0xc2e4
movq %r15, %rdi
movq %r14, %rsi
callq 0x7200
movq (%r15), %rdi
cmpq %r12, %rdi
je 0xff42
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72f0
movq 0x38(%rbx), %rax
cqto
idivq 0xe8(%rbx)
cvtsi2sd %rax, %xmm0
callq 0x7240
divsd 0x342e7(%rip), %xmm0    # 0x44248
callq 0x70a0
cvttsd2si %xmm0, %rax
movq %rax, 0x40(%rbx)
movq 0x38(%rbx), %rax
cqto
idivq 0xe8(%rbx)
decq %rax
movq %rax, 0x48(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x38(%rdi), %rcx
testq %rcx, %rcx
jle 0x1060d
movq %rdi, %rbx
leaq 0xa0(%rdi), %r14
xorl %r13d, %r13d
xorl %r12d, %r12d
xorl %r15d, %r15d
movq %r15, %rax
cqto
idivq 0xe8(%rbx)
movq 0x88(%rbx), %rdx
movslq (%rdx,%rax,4), %rsi
testq %rsi, %rsi
je 0x105d9
leaq (%r12,%r15), %rax
cmpq %rcx, %rax
jge 0x105cc
movq 0x70(%rbx), %rax
movl -0x4(%rax,%rsi,4), %eax
movq 0x50(%rbx), %rdi
movq %rcx, %rdx
subq %r15, %rdx
leaq (%rdi,%r15), %r8
addq %rax, %rdi
leaq (%rax,%r12), %r9
cmpq %rcx, %r9
jge 0x105cc
movb (%r8,%r12), %r9b
cmpb (%rdi,%r12), %r9b
jne 0x105cc
leaq (%r15,%r12), %r9
incq %r9
incq %r12
cmpq %rcx, %r9
jl 0x105a7
movq %rdx, %r12
movq %r14, %rdi
movl %r12d, %edx
callq 0x15b0c
jmp 0x105ec
movq 0xa0(%rbx), %rax
cmpq %rax, 0xa8(%rbx)
je 0x10617
movb $0x0, (%rax)
movq 0x38(%rbx), %rcx
movq 0xe8(%rbx), %rax
subq %rax, %r12
testq %r12, %r12
cmovleq %r13, %r12
addq %rax, %r15
cmpq %rcx, %r15
jl 0x10569
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x2fde8(%rip), %rdi     # 0x40406
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x74e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
subq $0x38, %rsp
movl %r9d, 0x4(%rsp)
movq %r8, 0x10(%rsp)
movq %rcx, %r15
movq %rsi, 0x20(%rsp)
movslq 0x70(%rsp), %rax
movq (%rcx), %r14
movq 0x8(%rcx), %rcx
subq %r14, %rcx
incq %rcx
cmpq %rax, %rcx
jg 0x1366a
cmpq 0x8(%r15), %r14
jg 0x1366a
movl %edx, %ebp
movq %rdi, %r13
movslq %edx, %r12
movl %r12d, %eax
movq %rax, 0x8(%rsp)
leaq -0x1(%r12), %rax
movq %rax, 0x18(%rsp)
negq %r12
cmpl $0x0, 0x78(%rsp)
jle 0x13659
movl 0x10(%r15), %ecx
movq 0x50(%r13), %rdi
movq 0x70(%r13), %rax
movl (%rax,%r14,4), %esi
cmpl %ebp, %esi
movl %ebp, %edx
cmovbl %esi, %edx
movl %ebp, %eax
subl %edx, %eax
addl %ecx, %edx
movq 0x20(%rsp), %r8
movq (%r8), %r9
addq 0x18(%rsp), %r9
leaq (%rdi,%rsi), %r10
decq %r10
movl 0x78(%rsp), %r11d
xorl %r8d, %r8d
leaq (%rsi,%r8), %rdi
cmpq %r8, %r12
je 0x13637
testq %rdi, %rdi
je 0x13637
movb (%r9,%r8), %bl
cmpb (%r10,%r8), %bl
jne 0x1362a
decq %r8
decl %r11d
jne 0x13608
jmp 0x13659
movq 0x8(%rsp), %rax
addl %r8d, %eax
subl %r8d, %ecx
movl %ecx, %edx
cmpl 0x4(%rsp), %edx
jl 0x13659
movq %rdi, 0x28(%rsp)
movl %eax, 0x30(%rsp)
movl %edx, 0x34(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x16cc0
leaq 0x1(%r14), %rax
cmpq 0x8(%r15), %r14
movq %rax, %r14
jl 0x135c4
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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:
subq $0x18, %rsp
movl %edx, %eax
movq (%rdi), %rcx
movq 0x8(%rdi), %rdx
subq %rcx, %rdx
cmpl $0xff, %eax
jge 0x15b2d
cmpq %rsi, %rdx
jbe 0x15b6b
movb %al, (%rcx,%rsi)
jmp 0x15b66
cmpq %rsi, %rdx
jbe 0x15b6b
movb $-0x1, (%rcx,%rsi)
movq %rsi, 0x8(%rsp)
movl %eax, 0x10(%rsp)
movq 0x20(%rdi), %rsi
cmpq 0x28(%rdi), %rsi
je 0x15b58
movups 0x8(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x20(%rdi)
jmp 0x15b66
addq $0x18, %rdi
leaq 0x8(%rsp), %rdx
callq 0x16ae0
addq $0x18, %rsp
retq
leaq 0x2a894(%rip), %rdi     # 0x40406
xorl %eax, %eax
callq 0x74e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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), %rax
movslq 0x8(%rdi), %rcx
cmpq %rcx, %rax
jge 0x19993
movq (%rdi), %r8
cmpb $0x20, (%r8,%rax)
jne 0x19990
incq %rax
cmpq %rax, %rcx
jne 0x1997f
jmp 0x19993
movq %rax, (%rsi)
movq (%rdi), %rcx
movq 0x8(%rdi), %rax
decq %rax
testq %rax, %rax
js 0x199ae
cmpb $0x20, (%rcx,%rax)
jne 0x199af
addq $-0x1, %rax
jb 0x1999d
retq
movq %rax, (%rdx)
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movb %dl, 0x14(%rdi)
leaq 0x18(%rdi), %r15
leaq 0x28(%rdi), %r12
movq %r12, 0x18(%rdi)
movq (%rsi), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0xc1f4
leaq 0x38(%rbx), %rdi
xorl %esi, %esi
callq 0x74d0
movq (%r14), %rdi
leaq 0x27877(%rip), %rsi     # 0x4170b
callq 0x74b0
movq %rax, (%rbx)
testq %rax, %rax
je 0x19eb9
movq %rax, %rdi
callq 0x19ee0
movq %rax, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r14, %rdi
callq 0x7997
movq %rax, %rbx
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x19ed8
movq (%r12), %rsi
incq %rsi
callq 0x72f0
movq %rbx, %rdi
callq 0x7600
// File: /workspace/github_cpp_makefile_star2_O1/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 0x7170
movq (%r14), %rdi
leaq 0x277c1(%rip), %rsi     # 0x4170b
callq 0x74b0
movq %rax, (%rbx)
testq %rax, %rax
je 0x19f6b
movq %rax, %rdi
callq 0x19ee0
movq %rax, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rdi
callq 0x79be
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1c(%rdi), %rax
xorl %ecx, %ecx
movdqa 0x29bba(%rip), %xmm0    # 0x44270
movdqa 0x29b92(%rip), %xmm1    # 0x44250
movdqa 0x2597a(%rip), %xmm2    # 0x40040
movdqa 0x2a1b2(%rip), %xmm3    # 0x44880
pshufd $0xf5, %xmm3, %xmm4     # xmm4 = xmm3[1,1,3,3]
movdqa 0x2a1b5(%rip), %xmm5    # 0x44890
xorl %edx, %edx
movdqa %xmm1, %xmm6
movdqa %xmm0, %xmm7
movdqa %xmm6, %xmm8
pxor %xmm2, %xmm8
movdqa %xmm3, %xmm9
pcmpgtd %xmm8, %xmm9
pshufd $0xf5, %xmm8, %xmm8     # xmm8 = xmm8[1,1,3,3]
pcmpeqd %xmm4, %xmm8
pand %xmm9, %xmm8
movd %xmm8, %esi
testb $0x1, %sil
je 0x1a71c
movl $0xfffcf2c0, -0xc(%rax,%rdx,4) # imm = 0xFFFCF2C0
pextrw $0x4, %xmm8, %esi
testb $0x1, %sil
je 0x1a730
movl $0xfffcf2c0, -0x8(%rax,%rdx,4) # imm = 0xFFFCF2C0
movdqa %xmm7, %xmm8
pxor %xmm2, %xmm8
movdqa %xmm3, %xmm9
pcmpgtd %xmm8, %xmm9
pshufd $0xf5, %xmm8, %xmm8     # xmm8 = xmm8[1,1,3,3]
pcmpeqd %xmm4, %xmm8
pand %xmm9, %xmm8
pextrw $0x0, %xmm8, %esi
testb $0x1, %sil
je 0x1a768
movl $0xfffcf2c0, -0x4(%rax,%rdx,4) # imm = 0xFFFCF2C0
pextrw $0x4, %xmm8, %esi
testb $0x1, %sil
je 0x1a77b
movl $0xfffcf2c0, (%rax,%rdx,4) # imm = 0xFFFCF2C0
addq $0x4, %rdx
paddq %xmm5, %xmm6
paddq %xmm5, %xmm7
cmpq $0x80, %rdx
jne 0x1a6e5
incq %rcx
addq $0x1fc, %rax            # imm = 0x1FC
cmpq $0x7f, %rcx
jne 0x1a6db
leaq 0x8210(%rdi), %rax
movl $0x41, %ecx
xorl %edx, %edx
xorl %esi, %esi
xorl %r8d, %r8d
cmpq %rsi, %rdx
setne %r8b
movl (%rdi,%r8,4), %r8d
movl %r8d, (%rax,%rsi,4)
incq %rsi
cmpq $0x1a, %rsi
jne 0x1a7b7
incq %rcx
incq %rdx
addq $0x1fc, %rax            # imm = 0x1FC
cmpq $0x5b, %rcx
jne 0x1a7b5
leaq 0xc210(%rdi), %rax
movl $0x61, %ecx
xorl %edx, %edx
xorl %esi, %esi
xorl %r8d, %r8d
cmpq %rsi, %rdx
setne %r8b
movl (%rdi,%r8,4), %r8d
movl %r8d, (%rax,%rsi,4)
incq %rsi
cmpq $0x1a, %rsi
jne 0x1a7f4
incq %rcx
incq %rdx
addq $0x1fc, %rax            # imm = 0x1FC
cmpq $0x7b, %rcx
jne 0x1a7f2
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, %r15d
movl %esi, %ebp
movq %rdi, %rbx
movl %esi, 0x18(%rdi)
movl %edx, 0x1c(%rdi)
movslq %esi, %r14
leaq (,%r14,8), %rdi
testl %r14d, %r14d
movq $-0x1, %r13
cmovsq %r13, %rdi
callq 0x7030
movq %rax, (%rbx)
movslq %r15d, %r12
testl %r14d, %r14d
jle 0x1a894
leaq (,%r12,4), %r15
testl %r12d, %r12d
cmovsq %r13, %r15
movl %ebp, %r13d
xorl %r14d, %r14d
movq %r15, %rdi
callq 0x7030
movq (%rbx), %rcx
movq %rax, (%rcx,%r14,8)
incq %r14
cmpq %r14, %r13
jne 0x1a87d
cmpb $0x0, 0x4(%rsp)
je 0x1a90a
leaq (,%r12,8), %r14
testl %r12d, %r12d
movq $-0x1, %r15
cmovsq %r15, %r14
movq %r14, %rdi
callq 0x7030
movq %rax, 0x8(%rbx)
movq %r14, %rdi
callq 0x7030
movq %rax, 0x10(%rbx)
testl %ebp, %ebp
jle 0x1a90a
leaq (,%r12,4), %r14
testl %r12d, %r12d
cmovsq %r15, %r14
movl %ebp, %r15d
xorl %r12d, %r12d
movq %r14, %rdi
callq 0x7030
movq 0x8(%rbx), %rcx
movq %rax, (%rcx,%r12,8)
movq %r14, %rdi
callq 0x7030
movq 0x10(%rbx), %rcx
movq %rax, (%rcx,%r12,8)
incq %r12
cmpq %r12, %r15
jne 0x1a8e2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
cmpl $0x0, 0x18(%rdi)
jle 0x1a95d
xorl %r14d, %r14d
movq (%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x1a951
callq 0x7400
incq %r14
movslq 0x18(%rbx), %rax
cmpq %rax, %r14
jl 0x1a940
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x1a96a
callq 0x7400
testb %bpl, %bpl
je 0x1a9c8
cmpl $0x0, 0x18(%rbx)
jle 0x1a9a8
xorl %r14d, %r14d
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x1a98a
callq 0x7400
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x1a99c
callq 0x7400
incq %r14
movslq 0x18(%rbx), %rax
cmpq %rax, %r14
jl 0x1a978
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x1a9b6
callq 0x7400
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x1a9c8
popq %rbx
popq %r14
popq %rbp
jmp 0x7400
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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:
cmpq %rdx, %rsi
jle 0x1ee0f
xorl %eax, %eax
retq
movq (%rdi), %rdi
cmpb %cl, (%rdi,%rsi)
sete %al
je 0x1ee26
leaq 0x1(%rsi), %r8
cmpq %rdx, %rsi
movq %r8, %rsi
jl 0x1ee12
retq
// File: /workspace/github_cpp_makefile_star2_O1/readmapping[P]alfalfa/src/mapper.cpp
// Function: bandSizeEstimate(int, int, int, int, int, int, int)
int bandSizeEstimate(int fixedBandSize, int qLen, int refLen, int matchScore, int gapOpen, int gapExtend, int alignmentScore){
    int minBandSize = max(qLen-refLen,refLen-qLen)+3;
    int scoreBandSize = (min(qLen,refLen)*matchScore - alignmentScore + gapOpen)/(-1*gapExtend) + 1;
    int maxGapBandSize = minBandSize-3 + ((qLen>>1)*matchScore+gapOpen)/(-1*gapExtend) + 1;
    int band = min(maxGapBandSize,scoreBandSize);
    band = min(fixedBandSize,band);
    band = max(minBandSize,band);
    return band;
}

// Assembly:
movl %edx, %eax
subl %esi, %eax
cmovgel %esi, %edx
negl %eax
movl %eax, %r11d
negl %r11d
cmovsl %eax, %r11d
imull %ecx, %edx
leal (%rdx,%r8), %eax
subl 0x8(%rsp), %eax
negl %r9d
cltd
idivl %r9d
movl %eax, %r10d
incl %r10d
sarl %esi
imull %ecx, %esi
leal (%rsi,%r8), %eax
cltd
idivl %r9d
addl %r11d, %eax
incl %eax
cmpl %eax, %r10d
cmovgel %eax, %r10d
leal 0x3(%r11), %eax
cmpl %edi, %r10d
cmovgel %edi, %r10d
cmpl %r10d, %eax
cmovgl %eax, %r10d
movl %r10d, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
movl $0x18, %edx
callq 0x7550
leaq 0x18(%rsp), %rdi
callq 0x71e0
leaq 0x28(%rsp), %r12
xorl %r14d, %r14d
leaq 0x1a0(%rsp), %r15
leaq 0xc(%rsp), %r13
leaq 0xb(%rsp), %rbp
leaq 0xa(%rsp), %rbx
movq %r15, %rdi
movq %r13, %rsi
callq 0x7190
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x1efca
movq %r15, %rdi
movq %rbp, %rsi
callq 0x7440
movzbl 0xb(%rsp), %eax
cmpl $0x58, %eax
je 0x1ef72
cmpl $0x3d, %eax
jne 0x1ef79
addl 0xc(%rsp), %r14d
jmp 0x1ef3f
testl %r14d, %r14d
jle 0x1efa1
movq %r12, %rdi
movl %r14d, %esi
callq 0x75d0
movb $0x4d, 0xa(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x7340
xorl %r14d, %r14d
movl 0xc(%rsp), %esi
movq %r12, %rdi
callq 0x75d0
movb 0xb(%rsp), %cl
movb %cl, 0xa(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x7340
jmp 0x1ef3f
testl %r14d, %r14d
jle 0x1eff1
leaq 0x28(%rsp), %rdi
movl %r14d, %esi
callq 0x75d0
leaq 0xa(%rsp), %rsi
movb $0x4d, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x7340
leaq 0x30(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x7540
movq 0x34f91(%rip), %rbx     # 0x53f98
leaq 0x18(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x7210
movl $0x80, %r14d
addq %r14, %r12
movq %r12, %rdi
callq 0x7100
movq %r15, %rdi
movq %rbx, %rsi
callq 0x7210
addq %r14, %r15
movq %r15, %rdi
callq 0x7100
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 0x1f07d
jmp 0x1f05c
movq %rax, %rbx
movq 0x34f32(%rip), %rsi     # 0x53f98
leaq 0x18(%rsp), %rdi
callq 0x7210
leaq 0x98(%rsp), %rdi
callq 0x7100
movq 0x34f14(%rip), %rsi     # 0x53f98
leaq 0x1a0(%rsp), %rdi
callq 0x7210
leaq 0x220(%rsp), %rdi
callq 0x7100
movq %rbx, %rdi
callq 0x7600
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0xa0(%rdi), %rax
movq %rax, %rsi
orq $0x3, %rsi
movq %rsi, 0xa0(%rdi)
orq $0x23, %rax
andq $-0xe1, %rsi
testb $0x10, 0x40(%r14)
movl %edx, %ebp
cmovneq %rax, %rsi
andq $-0xc1, %rsi
xorb $0x1, %cl
movzbl %cl, %eax
shll $0x6, %eax
addq %rsi, %rax
addq $0x40, %rax
movq %rax, 0xa0(%rdi)
movb %bpl, 0xdc(%rdi)
movq 0x18(%r14), %rax
movq %rax, 0xc8(%rdi)
movq (%r14), %rax
movq %rax, 0xd0(%rdi)
movq (%rdi), %rcx
movq 0x8(%rdi), %rdx
movq 0x8(%r14), %rax
cmpq %rax, %rdx
cmovgq %rdx, %rax
movq (%r14), %rdx
cmpq %rcx, %rdx
cmovlq %rdx, %rcx
leaq 0x8(%rdi), %rdx
subl %ecx, %eax
leal 0x1(%rax), %ecx
movl %ecx, 0xd8(%rdi)
testb $0x10, 0x40(%rdi)
cmoveq %rdi, %rdx
leaq 0x8(%r14), %rcx
movq (%rdx), %rdx
testb $0x10, 0x40(%r14)
cmoveq %r14, %rcx
cmpq (%rcx), %rdx
jle 0x205b3
notl %eax
movl %eax, 0xd8(%rbx)
movq 0x50(%rbx), %rdx
movq 0x50(%r14), %r15
cmpq %r15, %rdx
jne 0x205d6
testq %rdx, %rdx
je 0x205f5
movq 0x48(%r14), %rsi
movq 0x48(%rbx), %rdi
callq 0x7300
testl %eax, %eax
je 0x205f5
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x48(%r14), %rsi
addq %rsi, %r15
leaq 0x8(%rsp), %rdi
movq %r15, %rdx
callq 0xc1f4
jmp 0x20616
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x1fe7f(%rip), %rsi     # 0x40484
leaq 0x1fe79(%rip), %rdx     # 0x40485
leaq 0x8(%rsp), %rdi
callq 0xc2e4
leaq 0xa8(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x7170
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x20642
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72f0
testb %bpl, %bpl
je 0x20651
movl 0x70(%r14), %eax
movl %eax, 0xe0(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2067a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72f0
movq %rbx, %rdi
callq 0x7600
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2ba74
movq 0x20(%rbx), %rcx
movq 0x28(%rbx), %rdx
movl 0xc(%rcx), %eax
subq %rcx, %rdx
sarq $0x4, %rdx
cmpq $0x2, %rdx
jb 0x226a8
movl 0x8(%rcx), %esi
addl %eax, %esi
decl %esi
decq %rdx
addq $0x1c, %rcx
movl %esi, %edi
leal 0x1(%rdi), %r8d
movl -0x4(%rcx), %esi
movl (%rcx), %r9d
cmpl %r8d, %esi
cmovgl %esi, %r8d
addl %r9d, %esi
decl %esi
cmpl %esi, %edi
cmovgl %edi, %esi
movl %esi, %edi
subl %r8d, %edi
jns 0x2269b
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
addl %edi, %eax
incl %eax
addq $0x10, %rcx
decq %rdx
jne 0x22672
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x72e0
movq %rax, %rbx
movq %rax, %rdi
callq 0x2c5b6
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 0x7170
movl 0x98(%r14), %eax
movl %eax, 0x98(%rbx)
movl 0x70(%r14), %eax
movl %eax, 0x70(%rbx)
movq 0x40(%r14), %rax
andl $0x10, %eax
movq 0x40(%rbx), %rcx
andq $-0x11, %rcx
orq %rax, %rcx
movq %rcx, 0x40(%rbx)
movq 0xe8(%r14), %rsi
cmpq %rsi, 0xf0(%r14)
je 0x259b3
movq %rbx, %r15
addq $0xe8, %r15
xorl %r12d, %r12d
xorl %r13d, %r13d
addq %r12, %rsi
movq %r15, %rdi
callq 0x2ba28
incq %r13
movq 0xe8(%r14), %rsi
movq 0xf0(%r14), %rax
subq %rsi, %rax
sarq $0x4, %rax
addq $0x10, %r12
cmpq %rax, %r13
jb 0x25987
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 0x72f0
movq %r14, %rdi
callq 0x7600
// File: /workspace/github_cpp_makefile_star2_O1/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, 0x14(%rsp)
movl %r8d, %r12d
movl %ecx, %r13d
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbp
movslq %ecx, %rbx
movq 0xb0(%rsi), %rax
movq (%rax,%rbx,8), %rdi
movq %rbp, %rsi
callq 0x2b8ec
movl $0xb0, %eax
addq %r14, %rax
movq %rax, 0x20(%rsp)
movslq %r12d, %rcx
movq 0xb0(%r14), %rax
movq %rcx, 0x18(%rsp)
movq (%rax,%rcx,8), %rdi
movq %rbp, %rsi
callq 0x2b8ec
movq 0xb0(%r15), %rax
movq (%rax,%rbx,8), %rcx
testb $0x1, 0x40(%rcx)
je 0x25ace
movq (%rax,%rbx,8), %rdi
callq 0x258f8
movq %rax, 0x8(%rsp)
movq 0xb8(%r15), %rsi
cmpq 0xc0(%r15), %rsi
je 0x25aa7
movq %rax, (%rsi)
addq $0x8, 0xb8(%r15)
jmp 0x25ab9
movl $0xb0, %edi
addq %r15, %rdi
leaq 0x8(%rsp), %rdx
callq 0x309b8
movq 0xb8(%r15), %r13
subq 0xb0(%r15), %r13
shrq $0x3, %r13
decl %r13d
movq 0x20(%rsp), %rbx
movq (%rbx), %rax
movq 0x18(%rsp), %rdx
movq (%rax,%rdx,8), %rcx
testb $0x1, 0x40(%rcx)
je 0x25b32
movq (%rax,%rdx,8), %rdi
callq 0x258f8
movq %rax, 0x8(%rsp)
movq 0xb8(%r14), %rsi
cmpq 0xc0(%r14), %rsi
je 0x25b10
movq %rax, (%rsi)
addq $0x8, 0xb8(%r14)
jmp 0x25b1d
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x309b8
movq 0xb8(%r14), %r12
subq 0xb0(%r14), %r12
shrq $0x3, %r12
decl %r12d
incl 0xc8(%r15)
incl 0xc8(%r14)
movslq %r13d, %rax
movq 0xb0(%r15), %rcx
movq (%rcx,%rax,8), %rdi
movslq %r12d, %rax
movq 0xb0(%r14), %rcx
movq (%rcx,%rax,8), %rsi
movzbl 0x14(%rsp), %edx
callq 0x259d8
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
movq 0x28(%rsp), %r10
testl %ecx, %ecx
movq %rsi, %r11
cmovneq %rdi, %r11
movl 0x18(%r9), %eax
testl %eax, %eax
je 0x25fbf
cmpl $0x2, %eax
jne 0x25fc6
xorb %cl, %dl
xorb $0x1, %dl
movl %ecx, %ebx
movl %edx, %ecx
jmp 0x25fcb
movl %ecx, %ebx
xorb $0x1, %bl
jmp 0x25fcb
xorb $0x1, %cl
movl %ecx, %ebx
movq 0x20(%rsp), %rdx
movq 0x18(%rsp), %rax
movb %bl, (%r10)
testb %cl, %cl
je 0x25fee
movslq (%r9), %rbx
addq %r11, %rbx
movq %rbx, (%rax)
movslq 0x4(%r9), %rbx
addq %r11, %rbx
jmp 0x26004
movslq 0x4(%r9), %rbx
movq %r11, %r14
subq %rbx, %r14
movq %r14, (%rax)
movslq (%r9), %rbx
subq %rbx, %r11
movq %r11, %rbx
movq %rbx, (%rdx)
movslq %r8d, %r8
cmpb $0x1, (%r10)
jne 0x26018
addq %r8, %rbx
movq %rbx, (%rdx)
jmp 0x2601b
subq %r8, (%rax)
cmpb $0x0, 0xc(%r9)
jne 0x26042
testb %cl, %cl
je 0x26035
movq (%rax), %r8
cmpq %rsi, %r8
cmovleq %rsi, %r8
movq %r8, (%rax)
jmp 0x26042
movq (%rdx), %r8
cmpq %rdi, %r8
cmovgeq %rdi, %r8
movq %r8, (%rdx)
cmpb $0x0, 0xa(%r9)
jne 0x26069
testb %cl, %cl
je 0x2605c
movq (%rax), %rcx
cmpq %rdi, %rcx
cmovgq %rcx, %rdi
movq %rdi, (%rax)
jmp 0x26069
movq (%rdx), %rcx
cmpq %rsi, %rcx
cmovlq %rcx, %rsi
movq %rsi, (%rdx)
movq (%rdx), %rcx
cmpq (%rax), %rcx
setg %al
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
movq (%rsi), %r10
movq 0x8(%rsi), %rax
subq %r10, %rax
je 0x26106
pushq %rbp
pushq %r14
pushq %rbx
sarq $0x2, %rax
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rsi
xorl %r11d, %r11d
subl 0x28(%rdi), %r11d
movq 0xb0(%rdi), %rdi
cmpq $0x1, %rsi
adcq $0x0, %rsi
addq $0x4, %r10
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpb %dl, -0x4(%r10)
je 0x260f8
movslq (%r10), %rbx
movq (%rdi,%rbx,8), %r14
cmpq %rcx, (%r14)
jl 0x260f8
cmpq %r8, 0x8(%r14)
jg 0x260f8
movb 0x40(%r14), %bpl
andb $0x10, %bpl
shrb $0x4, %bpl
cmpb %r9b, %bpl
je 0x260f8
movl 0x70(%r14), %ebp
cmpl %r11d, %ebp
cmovgl %ebp, %r11d
cmovgl %ebx, %eax
addq $0xc, %r10
decq %rsi
jne 0x260c1
popq %rbx
popq %r14
popq %rbp
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2b918
leaq 0x14776(%rip), %rsi     # 0x40082
movq %rbx, %rdi
callq 0x70f0
testl %eax, %eax
jne 0x2b949
movq (%r15), %rsi
incq %rsi
movq %rsi, (%r15)
leaq 0x18(%r15), %rcx
movq %rsp, %r12
movq %r14, %rdi
movq %r12, %rdx
callq 0x2e85a
decq (%r15)
movq (%r12), %rsi
shlq $0x5, %rsi
addq (%r14), %rsi
movq %rbx, %rdi
callq 0x7170
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2b9a2
movl %edx, %eax
movl 0x18(%rsp), %r10d
movq 0x10(%rsp), %rdx
leaq 0x1938f(%rip), %r11     # 0x44d00
movslq (%r11,%rcx,4), %rcx
addq %r11, %rcx
jmpq *%rcx
movl %eax, %ecx
popq %rax
jmp 0x14cda
movl %eax, %ecx
popq %rax
jmp 0x14d44
movl %r10d, (%rsp)
movl %eax, %ecx
callq 0x154f0
jmp 0x2b9a2
movl %r10d, (%rsp)
movl %eax, %ecx
callq 0x14dbe
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2e85a
movq (%r12), %rax
movq 0x18(%r15), %rcx
leaq (%rcx,%rax,8), %rdx
addq $0x8, %rdx
movq -0x8(%rdx), %rsi
movq %rsi, (%r14)
movq 0x20(%r15), %rsi
subq %rcx, %rsi
sarq $0x3, %rsi
leaq -0x1(%rsi), %rcx
addq $0x38, %r15
cmpq %rcx, %rax
cmovgeq %r15, %rdx
cmpq $0x2, %rsi
cmovbq %r15, %rdx
movq (%rdx), %rax
decq %rax
movq %rax, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/readmapping[P]alfalfa/src/performanceUtils.cpp
// Function: summaryLine_t::addAlignment(int, bool)
void summaryLine_t::addAlignment(int flag, bool mateFound){
    int score = 0;
    //set fields
    tempAlnCount++;
    alignmentCnt++;
    if(!(flag & (1<<2))){
        mappedAln++;
        score++;
        if(mateFound){
            mappedPaired++;
            score++;
            if(flag & (1<<1)){
                mappedPairedCorrect++;
                score++;
            }
        }
        if(flag & (1<<8)){
            secondAln++;
        }
    }
    tempReadResult = max(tempReadResult, score);
}

// Assembly:
incl 0x1dc(%rdi)
incq 0x38(%rdi)
xorl %eax, %eax
testb $0x4, %sil
jne 0x32ea5
incq 0x30(%rdi)
movl $0x1, %eax
testb %dl, %dl
je 0x32e9b
incq 0x28(%rdi)
movl $0x2, %eax
testb $0x2, %sil
je 0x32e9b
incq 0x20(%rdi)
movl $0x3, %eax
btl $0x8, %esi
jae 0x32ea5
incq 0x18(%rdi)
movl 0x1d8(%rdi), %ecx
cmpl %eax, %ecx
cmovgl %ecx, %eax
movl %eax, 0x1d8(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/readmapping[P]alfalfa/src/performanceUtils.cpp
// Function: summaryLine_t::finishRead()
void summaryLine_t::finishRead(){
    if(tempReadResult==3)
        readPairedCorrect++;
    else if(tempReadResult ==2)
        readPaired++;
    else if(tempReadResult ==1)
        readMapped++;
    tempReadResult = 0;
    alnPerRead[min(tempAlnCount,101)]++;
    tempAlnCount = 0;
}

// Assembly:
movl 0x1d8(%rdi), %eax
movq %rdi, %rcx
cmpl $0x1, %eax
je 0x32eda
cmpl $0x2, %eax
je 0x32ed6
cmpl $0x3, %eax
jne 0x32edd
leaq 0x10(%rdi), %rcx
jmp 0x32eda
leaq 0x8(%rdi), %rcx
incq (%rcx)
xorl %eax, %eax
movl %eax, 0x1d8(%rdi)
movl 0x1dc(%rdi), %ecx
cmpl $0x65, %ecx
movl $0x65, %edx
cmovll %ecx, %edx
movslq %edx, %rcx
incl 0x40(%rdi,%rcx,4)
movl %eax, 0x1dc(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/readmapping[P]alfalfa/src/performanceUtils.cpp
// Function: nextField(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char, int&)
string nextField(const string & line, char delimeter, int& beginPos){
    int tabPos = line.find(delimeter,beginPos);
    string substring = line.substr(beginPos, tabPos-beginPos);
    beginPos = tabPos+1;
    return substring;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movslq (%rcx), %rax
movq %rsi, %rdi
movl %edx, %esi
movq %rax, %rdx
callq 0x7410
movslq (%rbx), %rdx
movslq %eax, %r12
movq %r12, %rcx
subq %rdx, %rcx
movq %r15, %rdi
movq %r14, %rsi
callq 0x7310
incl %r12d
movl %r12d, (%rbx)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/readmapping[P]alfalfa/src/performanceUtils.cpp
// Function: previousField(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, char, int&)
string previousField(string & line, char delimeter, int& endPos){
    int tabPos = line.rfind(delimeter,endPos);
    string substring = line.substr(tabPos+1, endPos-tabPos);
    endPos = tabPos-1;
    return substring;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movslq (%rcx), %rax
movq %rsi, %rdi
movl %edx, %esi
movq %rax, %rdx
callq 0x76a0
leal 0x1(%rax), %ecx
movslq %ecx, %rdx
movslq (%rbx), %rcx
movslq %eax, %r12
subq %r12, %rcx
movq %r15, %rdi
movq %r14, %rsi
callq 0x7310
decl %r12d
movl %r12d, (%rbx)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/readmapping[P]alfalfa/src/performanceUtils.cpp
// Function: getlijn2(std::basic_ifstream<char, std::char_traits<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void getlijn2(ifstream & input, string & lijn){
    //write windows version of getline
    getline(input, lijn, '\n'); // Load one line at a time.
    if(lijn.length() > 0 && lijn[lijn.length()-1]=='\r')
        lijn.erase(--lijn.end());
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
movl $0xa, %edx
callq 0x7650
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0x34c1b
movq (%rbx), %rax
cmpb $0xd, -0x1(%rax,%rsi)
jne 0x34c1b
decq %rsi
movl $0x1, %edx
movq %rbx, %rdi
popq %rbx
jmp 0x7370
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/readmapping[P]alfalfa/src/performanceUtils.cpp
// Function: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> printVector<int>(std::vector<int, std::allocator<int>>)
string printVector(vector<T> vec){
    stringstream ss;
    if(!vec.empty()){
        ss << vec[0];
        for(size_t i=1; i < vec.size(); i++)
            ss << "," << vec[i];
    }
    return ss.str();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
callq 0x71e0
movq (%r14), %rax
cmpq 0x8(%r14), %rax
je 0x3dd4b
leaq 0x18(%rsp), %r15
movl (%rax), %esi
movq %r15, %rdi
callq 0x75d0
movq 0x8(%r14), %rax
subq (%r14), %rax
cmpq $0x5, %rax
jb 0x3dd4b
movl $0x1, %r13d
leaq 0x7177(%rip), %r12      # 0x44e90
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x7340
movq (%r14), %rax
movl (%rax,%r13,4), %esi
movq %r15, %rdi
callq 0x75d0
incq %r13
movq 0x8(%r14), %rax
subq (%r14), %rax
sarq $0x2, %rax
cmpq %rax, %r13
jb 0x3dd19
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x7540
movq 0x16239(%rip), %rsi     # 0x53f98
leaq 0x8(%rsp), %rdi
callq 0x7210
leaq 0x88(%rsp), %rdi
callq 0x7100
movq %rbx, %rax
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x3dd8c
movq %rax, %rbx
movq 0x16202(%rip), %rsi     # 0x53f98
leaq 0x8(%rsp), %rdi
callq 0x7210
leaq 0x88(%rsp), %rdi
callq 0x7100
movq %rbx, %rdi
callq 0x7600
nop
// File: /workspace/github_cpp_makefile_star2_O1/readmapping[P]alfalfa/src/kthread.c
// Function: kt_for
void kt_for(int n_threads, int n, void (*func)(void*,int,int), void *data)
{
	int i;
	kt_for_t t;
	pthread_t *tid;
	t.func = func, t.data = data, t.n_threads = n_threads, t.n = n;
	t.w = (ktf_worker_t*)alloca(n_threads * sizeof(ktf_worker_t));
	tid = (pthread_t*)alloca(n_threads * sizeof(pthread_t));
	for (i = 0; i < n_threads; ++i)
		t.w[i].t = &t, t.w[i].i = i;
	for (i = 0; i < n_threads; ++i) pthread_create(&tid[i], 0, ktf_worker, &t.w[i]);
	for (i = 0; i < n_threads; ++i) pthread_join(tid[i], 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, -0x48(%rbp)
movq %rcx, -0x40(%rbp)
movl %edi, -0x58(%rbp)
movl %esi, -0x54(%rbp)
movslq %edi, %rcx
movq %rcx, %rdx
shlq $0x4, %rdx
movq %rsp, %rax
subq %rdx, %rax
movq %rax, %rsp
movq %rax, -0x50(%rbp)
movq %rsp, %rsi
leaq 0xf(,%rcx,8), %rdx
andq $-0x10, %rdx
subq %rdx, %rsi
movq %rsi, -0x38(%rbp)
movq %rsi, %rsp
movl %edi, %ebx
testl %ecx, %ecx
jle 0x3fa09
addq $0x8, %rax
xorl %ecx, %ecx
leaq -0x58(%rbp), %rdx
movq %rdx, -0x8(%rax)
movl %ecx, (%rax)
incq %rcx
addq $0x10, %rax
cmpq %rcx, %rbx
jne 0x3f9f7
movl %edi, -0x2c(%rbp)
testl %edi, %edi
jle 0x3fa46
movq %rbx, %r13
shlq $0x4, %r13
xorl %r12d, %r12d
leaq 0x54(%rip), %r14        # 0x3fa75
movq -0x38(%rbp), %r15
movq -0x50(%rbp), %rcx
addq %r12, %rcx
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x7630
addq $0x10, %r12
addq $0x8, %r15
cmpq %r12, %r13
jne 0x3fa25
cmpl $0x0, -0x2c(%rbp)
movq -0x38(%rbp), %r15
jle 0x3fa66
xorl %r14d, %r14d
movq (%r15,%r14,8), %rdi
xorl %esi, %esi
callq 0x7290
incq %r14
cmpq %r14, %rbx
jne 0x3fa53
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/readmapping[P]alfalfa/src/kthread.c
// Function: ktf_worker
static void *ktf_worker(void *data)
{
	ktf_worker_t *w = (ktf_worker_t*)data;
	int i;
	for (;;) {
		i = __sync_fetch_and_add(&w->i, w->t->n_threads);
		if (i >= w->t->n) break;
		w->t->func(w->t->data, i, w - w->t->w);
	}
	while ((i = ktf_steal_work(w->t)) >= 0)
		w->t->func(w->t->data, i, w - w->t->w);
	pthread_exit(0);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movl (%rax), %esi
lock
xaddl %esi, 0x8(%rdi)
movq (%rdi), %rax
cmpl 0x4(%rax), %esi
jge 0x3fac1
movq 0x18(%rax), %rdi
movq %rbx, %rdx
subq 0x8(%rax), %rdx
shrq $0x4, %rdx
callq *0x10(%rax)
movq (%rbx), %rax
movl (%rax), %esi
lock
xaddl %esi, 0x8(%rbx)
movq (%rbx), %rax
jmp 0x3fa86
movq (%rbx), %rax
movq 0x18(%rax), %rdi
movq %rbx, %rdx
subq 0x8(%rax), %rdx
shrq $0x4, %rdx
callq *0x10(%rax)
movq (%rbx), %rcx
movslq (%rcx), %rax
xorl %edx, %edx
testq %rax, %rax
jle 0x3fafb
movq 0x8(%rcx), %rsi
addq $0x8, %rsi
movl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
xorl %r8d, %r8d
movl (%rsi), %r9d
cmpl %r9d, %edi
cmovgel %r9d, %edi
cmovgl %r8d, %edx
incq %r8
addq $0x10, %rsi
cmpq %r8, %rax
jne 0x3fade
movslq %edx, %rdx
movq 0x8(%rcx), %rsi
shlq $0x4, %rdx
lock
xaddl %eax, 0x8(%rsi,%rdx)
cmpl 0x4(%rcx), %eax
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
cmovll %eax, %esi
testl %esi, %esi
jns 0x3faac
xorl %edi, %edi
callq 0x7610