LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/sleighbase.cc
// Function: SleighBase::getRegisterName[abi:cxx11](AddrSpace*, unsigned long, int) const
string SleighBase::getRegisterName(AddrSpace *base,uintb off,int4 size) const

{
  VarnodeData sym;
  sym.space = base;
  sym.offset = off;
  sym.size = size;
  map<VarnodeData,string>::const_iterator iter = varnode_xref.upper_bound(sym); // First point greater than offset
  if (iter == varnode_xref.begin()) return "";
  iter--;
  const VarnodeData &point((*iter).first);
  if (point.space != base) return "";
  uintb offbase = point.offset;
  if (point.offset+point.size >= off+size)
    return (*iter).second;
  
  while(iter != varnode_xref.begin()) {
    --iter;
    const VarnodeData &point((*iter).first);
    if ((point.space != base)||(point.offset != offbase)) return "";
    if (point.offset+point.size >= off+size)
      return (*iter).second;
  }
  return "";
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebp
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x10(%rsp), %rsi
movq %rdx, (%rsi)
movq %rcx, 0x8(%rsi)
movl %r8d, 0x10(%rsi)
leaq 0x160(%r12), %rdi
callq 0x4e2a0
movq 0x178(%r12), %r12
cmpq %r12, %rax
je 0x65945
movq %rax, %rdi
callq 0x4e740
cmpq %r14, 0x20(%rax)
je 0x6596b
leaq 0x22874(%rip), %rsi     # 0x881c0
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
callq 0x515e0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x28(%rax), %r13
movl 0x30(%rax), %ecx
addq %r13, %rcx
movslq %ebp, %rbp
addq %r15, %rbp
cmpq %rbp, %rcx
jae 0x659a1
cmpq %r12, %rax
je 0x65945
movq %rax, %rdi
callq 0x4e740
cmpq %r14, 0x20(%rax)
jne 0x65945
cmpq %r13, 0x28(%rax)
jne 0x65945
movl 0x30(%rax), %ecx
addq %r13, %rcx
jmp 0x6597b
addq $0x38, %rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x50630
jmp 0x65959
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghpatexpress.cc
// Function: TokenPattern::buildSingle(int, int, unsigned int)
PatternBlock *TokenPattern::buildSingle(int4 startbit,int4 endbit,uintm byteval)

{				// Create a mask/value pattern within a single word
				// The field is given by the bitrange [startbit,endbit]
				// bit 0 is the MOST sig bit of the word
				// use the least sig bits of byteval to fill in
				// the field's value
  uintm mask;
  int4 offset = 0;
  int4 size = endbit-startbit+1;
  while(startbit >= 8) {
    offset += 1;
    startbit -= 8;
    endbit -= 8;
  }    
  mask = (~((uintm)0)) << (sizeof(uintm)*8-size);
  byteval = (byteval << (sizeof(uintm)*8-size))& mask;
  mask >>= startbit;
  byteval >>= startbit;
  return new PatternBlock(offset,mask,byteval);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
cmpl $0x8, %edi
pushq $0x7
popq %rax
cmovgel %edi, %eax
movl %eax, %ebp
shrl $0x3, %ebp
andl $0xf8, %eax
movl %edi, %ecx
subl %esi, %ecx
subl %eax, %edi
addb $0x1f, %cl
pushq $-0x1
popq %r15
shll %cl, %r15d
shll %cl, %ebx
movl %edi, %ecx
shrl %cl, %r15d
shrl %cl, %ebx
pushq $0x38
popq %rdi
callq 0x4f5d0
movq %rax, %r14
movq %rax, %rdi
movl %ebp, %esi
movl %r15d, %edx
movl %ebx, %ecx
callq 0x4d170
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
pushq $0x38
popq %rsi
movq %r14, %rdi
callq 0x4f670
movq %rbx, %rdi
callq 0x518c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghpatexpress.cc
// Function: TokenPattern::buildBigBlock(int, int, int, long)
PatternBlock *TokenPattern::buildBigBlock(int4 size,int4 bitstart,int4 bitend,intb value)

{				// Build pattern block given a bigendian contiguous
				// range of bits and a value for those bits
  int4 tmpstart,startbit,endbit;
  PatternBlock *tmpblock,*block;

  startbit = 8*size - 1 - bitend;
  endbit = 8*size - 1 - bitstart;
  
  block = (PatternBlock *)0;
  while(endbit >= startbit) {
    tmpstart = endbit - (endbit & 7);
    if (tmpstart < startbit)
      tmpstart = startbit;
    tmpblock = buildSingle(tmpstart,endbit,(uintm)value);
    if (block == (PatternBlock *)0)
      block = tmpblock;
    else {
      PatternBlock *newblock = block->intersect(tmpblock);
      delete block;
      delete tmpblock;
      block = newblock;
    }
    value >>= (endbit-tmpstart+1);
    endbit = tmpstart - 1;
  }
  return block;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
leal -0x1(,%rdi,8), %ebp
movl %ebp, %ebx
subl %edx, %ebx
subl %esi, %ebp
xorl %r12d, %r12d
cmpl %ebx, %ebp
jl 0x670f2
movl %ebp, %r15d
andl $-0x8, %r15d
cmpl %ebx, %r15d
cmovlel %ebx, %r15d
movl %r15d, %edi
movl %ebp, %esi
movl %r14d, %edx
callq 0x51d40
movq %rax, %r13
testq %r12, %r12
je 0x670dc
movq %r12, %rdi
movq %r13, %rsi
callq 0x501a0
movq %r14, (%rsp)
movq %rax, %r14
movq %r12, %rdi
callq 0x4e1e0
movq %r12, %rdi
pushq $0x38
popq %r12
movq %r12, %rsi
callq 0x4f670
movq %r13, %rdi
callq 0x4e1e0
movq %r13, %rdi
movq %r12, %rsi
callq 0x4f670
movq %r14, %r13
movq (%rsp), %r14
subl %r15d, %ebp
incb %bpl
movl %ebp, %ecx
sarq %cl, %r14
decl %r15d
movl %r15d, %ebp
movq %r13, %r12
jmp 0x67072
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghpatexpress.cc
// Function: TokenPattern::TokenPattern(bool)
TokenPattern::TokenPattern(bool tf)

{				// TRUE or FALSE pattern
  leftellipsis = false;
  rightellipsis = false;
  pattern = new InstructionPattern(tf);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x12(%rdi)
movups %xmm0, 0x8(%rdi)
pushq $0x10
popq %rdi
callq 0x4f5d0
movq %rax, %r14
movzbl %bpl, %esi
movq %rax, %rdi
callq 0x50360
movq %r14, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
pushq $0x10
popq %rsi
movq %r14, %rdi
callq 0x4f670
jmp 0x672fb
movq %rax, %r15
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x4dcf0
movq %r15, %rdi
callq 0x518c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghpatexpress.cc
// Function: TokenPattern::TokenPattern(Token*)
TokenPattern::TokenPattern(Token *tok)

{
  leftellipsis = false;
  rightellipsis = false;
  pattern = new InstructionPattern(true);
  toklist.push_back(tok);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
movq %rsi, 0x8(%rsp)
leaq 0x8(%rdi), %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x12(%rdi)
movups %xmm0, 0x8(%rdi)
pushq $0x10
popq %rdi
callq 0x4f5d0
movq %rax, %r15
pushq $0x1
popq %rsi
movq %rax, %rdi
callq 0x50360
movq %r15, (%r14)
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x50ab0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
pushq $0x10
popq %rsi
movq %r15, %rdi
callq 0x4f670
jmp 0x67373
movq %rax, %r14
movq %rbx, %rdi
callq 0x4dcf0
movq %r14, %rdi
callq 0x518c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghpatexpress.cc
// Function: TokenPattern::TokenPattern(Token*, long, int, int)
TokenPattern::TokenPattern(Token *tok,intb value,int4 bitstart,int4 bitend)

{				// A basic instruction pattern

  toklist.push_back(tok);
  leftellipsis = false;
  rightellipsis = false;
  PatternBlock *block;

  if (tok->isBigEndian())
    block = buildBigBlock(tok->getSize(),bitstart,bitend,value);
  else
    block = buildLittleBlock(tok->getSize(),bitstart,bitend,value);
  pattern = new InstructionPattern(block);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %r8d, %ebp
movl %ecx, %r12d
movq %rdx, %r15
movq %rdi, %r14
leaq 0x8(%rsp), %rax
movq %rsi, (%rax)
leaq 0x8(%rdi), %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
andq $0x0, 0x18(%rdi)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x50ab0
andw $0x0, 0x20(%r14)
movq 0x8(%rsp), %rax
cmpb $0x1, 0x28(%rax)
jne 0x673e2
movl 0x20(%rax), %edi
movl %r12d, %esi
movl %ebp, %edx
movq %r15, %rcx
callq 0x50a70
jmp 0x673ef
movl %r12d, %esi
movl %ebp, %edx
movq %r15, %rcx
callq 0x4d3d0
movq %rax, %r15
pushq $0x10
popq %rdi
callq 0x4f5d0
movq 0x4787f(%rip), %rcx     # 0xaec80
addq $0x10, %rcx
movq %rcx, (%rax)
movq %r15, 0x8(%rax)
movq %rax, (%r14)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6741e
movq %rax, %r14
movq %rbx, %rdi
callq 0x4dcf0
movq %r14, %rdi
callq 0x518c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghpatexpress.cc
// Function: TokenPattern::TokenPattern(long, int, int)
TokenPattern::TokenPattern(intb value,int4 startbit,int4 endbit)

{				// A basic context pattern
  leftellipsis = false;
  rightellipsis = false;
  PatternBlock *block;
  int4 size = (endbit/8) + 1;

  block = buildBigBlock(size,size*8-1-endbit,size*8-1-startbit,value);
  pattern = new ContextPattern(block);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %ecx, %r9d
movl %edx, %r8d
movq %rsi, %rcx
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
pushq $0x8
popq %rsi
movl %r9d, %eax
cltd
idivl %esi
leal 0x1(%rax), %edi
leal 0x7(,%rax,8), %edx
movl %edx, %esi
subl %r9d, %esi
subl %r8d, %edx
xorps %xmm0, %xmm0
movups %xmm0, 0x12(%rbx)
movups %xmm0, 0x8(%rbx)
callq 0x50a70
movq %rax, %r15
pushq $0x10
popq %rdi
callq 0x4f5d0
movq 0x4770c(%rip), %rcx     # 0xaeb90
addq $0x10, %rcx
movq %rcx, (%rax)
movq %r15, 0x8(%rax)
movq %rax, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %r14, %rdi
callq 0x4dcf0
movq %rbx, %rdi
callq 0x518c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghpatexpress.cc
// Function: TokenPattern::TokenPattern(TokenPattern const&)
TokenPattern::TokenPattern(const TokenPattern &tokpat)

{
  pattern = tokpat.pattern->simplifyClone();
  toklist = tokpat.toklist;
  leftellipsis = tokpat.leftellipsis;
  rightellipsis = tokpat.rightellipsis;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rdi), %r15
andq $0x0, 0x18(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movq (%rsi), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq %rax, (%rbx)
leaq 0x8(%r14), %rsi
movq %r15, %rdi
callq 0x50190
movb 0x20(%r14), %al
movb %al, 0x20(%rbx)
movb 0x21(%r14), %al
movb %al, 0x21(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %r15, %rdi
callq 0x4dcf0
movq %rbx, %rdi
callq 0x518c0
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghpatexpress.cc
// Function: TokenPattern::operator=(TokenPattern const&)
const TokenPattern &TokenPattern::operator=(const TokenPattern &tokpat)

{
  delete pattern;

  pattern = tokpat.pattern->simplifyClone();
  toklist = tokpat.toklist;
  leftellipsis = tokpat.leftellipsis;
  rightellipsis = tokpat.rightellipsis;
  return *this;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x6751e
movq (%rdi), %rax
callq *0x8(%rax)
movq (%r14), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq %rax, (%rbx)
leaq 0x8(%r14), %rsi
leaq 0x8(%rbx), %rdi
callq 0x50190
movb 0x20(%r14), %al
movb %al, 0x20(%rbx)
movb 0x21(%r14), %al
movb %al, 0x21(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghpatexpress.cc
// Function: TokenPattern::doAnd(TokenPattern const&) const
TokenPattern TokenPattern::doAnd(const TokenPattern &tokpat) const

{				// Return -this- AND tokpat
  TokenPattern res((Pattern *)0);
  int4 sa = res.resolveTokens(*this,tokpat);

  res.pattern = pattern->doAnd(tokpat.pattern,sa);
  return res;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
andw $0x0, 0x20(%rdi)
callq 0x51320
movq (%r15), %rdi
movq (%r14), %rsi
movq (%rdi), %rcx
movl %eax, %edx
callq *0x28(%rcx)
movq %rax, (%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x4e060
movq %r14, %rdi
callq 0x518c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghpatexpress.cc
// Function: TokenPattern::getMinimumLength() const
int4 TokenPattern::getMinimumLength(void) const

{				// Add up length of concatenated tokens
  int4 length = 0;
  for(int4 i=0;i<toklist.size();++i)
    length += toklist[i]->getSize();
  return length;
}

// Assembly:
movq 0x8(%rdi), %rcx
movq 0x10(%rdi), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
xorl %esi, %esi
xorl %eax, %eax
cmpq %rsi, %rdx
je 0x67a4c
movq (%rcx,%rsi,8), %rdi
addl 0x20(%rdi), %eax
incq %rsi
jmp 0x67a3b
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghpatexpress.cc
// Function: TokenField::getValue(ParserWalker&) const
intb TokenField::getValue(ParserWalker &walker) const

{				// Construct value given specific instruction stream
  intb res = getInstructionBytes(walker,bytestart,byteend,bigendian);
  
  res >>= shift;
  if (signbit)
    sign_extend(res,bitend-bitstart);
  else
    zero_extend(res,bitend-bitstart);
  return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movl 0x24(%rdi), %r15d
movl 0x28(%rdi), %eax
movq %rdi, 0x20(%rsp)
movb 0x18(%rdi), %cl
movb %cl, 0xf(%rsp)
subl %r15d, %eax
leal 0x8(,%rax,8), %r12d
movl %eax, %r13d
incl %r13d
xorl %ebx, %ebx
pushq $0x4
popq %rbp
movl %r13d, 0x1c(%rsp)
cmpl $0x4, %r13d
jb 0x67eb1
movq %r14, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x4ee00
shlq $0x20, %rbx
movl %eax, %eax
orq %rax, %rbx
addl $0x4, %r15d
addl $-0x4, %r13d
addl $-0x20, %r12d
jmp 0x67e87
movq %rbx, 0x10(%rsp)
testl %r13d, %r13d
je 0x67ed9
movq %r14, %rdi
movl %r15d, %esi
movl %r13d, %edx
callq 0x4ee00
movl %r12d, %ecx
shlq %cl, %rbx
movl %eax, %eax
orq %rax, %rbx
movq %rbx, 0x10(%rsp)
cmpb $0x0, 0xf(%rsp)
jne 0x67ef4
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl 0x1c(%rsp), %esi
callq 0x50500
movq (%r14), %rbx
movq 0x20(%rsp), %rax
movb 0x2c(%rax), %cl
sarq %cl, %rbx
movq %rbx, 0x10(%rsp)
movl 0x20(%rax), %esi
subl 0x1c(%rax), %esi
cmpb $0x1, 0x19(%rax)
jne 0x67f1c
leaq 0x10(%rsp), %rdi
callq 0x4f200
jmp 0x67f26
leaq 0x10(%rsp), %rdi
callq 0x51430
movq 0x10(%rsp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghpatexpress.cc
// Function: TokenField::saveXml(std::ostream&) const
void TokenField::saveXml(ostream &s) const

{
  s << "<tokenfield";
  s << " bigendian=\"";
  if (bigendian)
    s << "true\"";
  else
    s << "false\"";
  s << " signbit=\"";
  if (signbit)
    s << "true\"";
  else
    s << "false\"";
  s << " bitstart=\"" << dec << bitstart << "\"";
  s << " bitend=\"" << bitend << "\"";
  s << " bytestart=\"" << bytestart << "\"";
  s << " byteend=\"" << byteend << "\"";
  s << " shift=\"" << shift << "\"/>\n";
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x1f827(%rip), %rsi     # 0x87792
movq %r14, %rdi
callq 0x4f5b0
leaq 0x1f824(%rip), %rsi     # 0x8779e
movq %r14, %rdi
callq 0x4f5b0
leaq 0x2043c(%rip), %r12     # 0x883c5
cmpb $0x0, 0x18(%rbx)
leaq 0x1f817(%rip), %r15     # 0x877ab
movq %r15, %rsi
cmovneq %r12, %rsi
movq %r14, %rdi
callq 0x4f5b0
leaq 0x1f808(%rip), %rsi     # 0x877b2
movq %r14, %rdi
callq 0x4f5b0
cmpb $0x0, 0x19(%rbx)
cmovneq %r12, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x4f5b0
leaq 0x1f7f1(%rip), %rsi     # 0x877bd
movq %r14, %rdi
callq 0x4f5b0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
movl 0x1c(%rbx), %esi
movq %rax, %rdi
callq 0x51690
leaq 0x205c1(%rip), %r15     # 0x885bc
movq %rax, %rdi
movq %r15, %rsi
callq 0x4f5b0
leaq 0x1f7bc(%rip), %rsi     # 0x877c9
movq %r14, %rdi
callq 0x4f5b0
movl 0x20(%rbx), %esi
movq %rax, %rdi
callq 0x51690
movq %rax, %rdi
movq %r15, %rsi
callq 0x4f5b0
leaq 0x1f7a1(%rip), %rsi     # 0x877d3
movq %r14, %rdi
callq 0x4f5b0
movl 0x24(%rbx), %esi
movq %rax, %rdi
callq 0x51690
movq %rax, %rdi
movq %r15, %rsi
callq 0x4f5b0
leaq 0x1f789(%rip), %rsi     # 0x877e0
movq %r14, %rdi
callq 0x4f5b0
movl 0x28(%rbx), %esi
movq %rax, %rdi
callq 0x51690
movq %rax, %rdi
movq %r15, %rsi
callq 0x4f5b0
leaq 0x1f76f(%rip), %rsi     # 0x877eb
movq %r14, %rdi
callq 0x4f5b0
movl 0x2c(%rbx), %esi
movq %rax, %rdi
callq 0x51690
leaq 0x1f75e(%rip), %rsi     # 0x877f4
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x4f5b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghpatexpress.cc
// Function: ContextField::ContextField(bool, int, int)
ContextField::ContextField(bool s,int4 sbit,int4 ebit)

{
  signbit = s;
  startbit = sbit;
  endbit = ebit;
  startbyte = startbit/8;
  endbyte = endbit/8;
  shift = 7 - (endbit%8);
}

// Assembly:
movl %ecx, %eax
andl $0x0, 0x8(%rdi)
movq 0x46b8f(%rip), %rcx     # 0xaef10
addq $0x10, %rcx
movq %rcx, (%rdi)
movb %sil, 0x20(%rdi)
movl %edx, 0xc(%rdi)
movl %eax, 0x10(%rdi)
movd %eax, %xmm0
movd %edx, %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movdqa %xmm1, %xmm0
psrad $0x1f, %xmm0
psrld $0x1d, %xmm0
paddd %xmm1, %xmm0
psrad $0x3, %xmm0
movq %xmm0, 0x14(%rdi)
pushq $0x8
popq %rcx
cltd
idivl %ecx
pushq $0x7
popq %rax
subl %edx, %eax
movl %eax, 0x1c(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghpatexpress.cc
// Function: ContextField::getValue(ParserWalker&) const
intb ContextField::getValue(ParserWalker &walker) const

{
  intb res = getContextBytes(walker,startbyte,endbyte);
  res >>= shift;
  if (signbit)
    sign_extend(res,endbit-startbit);
  else
    zero_extend(res,endbit-startbit);
  return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movl 0x14(%rdi), %ebp
movq %rdi, 0x10(%rsp)
movl 0x18(%rdi), %eax
subl %ebp, %eax
leal 0x8(,%rax,8), %r15d
movl %eax, %r12d
incl %r12d
xorl %ebx, %ebx
pushq $0x4
popq %r13
cmpl $0x4, %r12d
jb 0x68425
movq %r14, %rdi
movl %ebp, %esi
movl %r13d, %edx
callq 0x4fe90
shlq $0x20, %rbx
movl %eax, %eax
orq %rax, %rbx
addl $0x4, %ebp
addl $-0x20, %r15d
addl $-0x4, %r12d
jmp 0x683fc
testl %r12d, %r12d
je 0x68442
movq %r14, %rdi
movl %ebp, %esi
movl %r12d, %edx
callq 0x4fe90
movl %r15d, %ecx
shlq %cl, %rbx
movl %eax, %eax
orq %rax, %rbx
movq 0x10(%rsp), %rax
movb 0x1c(%rax), %cl
sarq %cl, %rbx
movq %rbx, 0x8(%rsp)
movl 0x10(%rax), %esi
subl 0xc(%rax), %esi
cmpb $0x1, 0x20(%rax)
jne 0x6846a
leaq 0x8(%rsp), %rdi
callq 0x4f200
jmp 0x68474
leaq 0x8(%rsp), %rdi
callq 0x51430
movq 0x8(%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghpatexpress.cc
// Function: ContextField::saveXml(std::ostream&) const
void ContextField::saveXml(ostream &s) const

{
  s << "<contextfield";
  s << " signbit=\"";
  if (signbit)
    s << "true\"";
  else
    s << "false\"";
  s << " startbit=\"" << dec << startbit << "\"";
  s << " endbit=\"" << endbit << "\"";
  s << " startbyte=\"" << startbyte << "\"";
  s << " endbyte=\"" << endbyte << "\"";
  s << " shift=\"" << shift << "\"/>\n";
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x1f375(%rip), %rsi     # 0x87829
movq %r14, %rdi
callq 0x4f5b0
leaq 0x1f2ef(%rip), %rsi     # 0x877b2
movq %r14, %rdi
callq 0x4f5b0
leaq 0x1fef3(%rip), %rax     # 0x883c5
leaq 0x1f2d2(%rip), %rsi     # 0x877ab
cmpb $0x0, 0x20(%rbx)
cmovneq %rax, %rsi
movq %r14, %rdi
callq 0x4f5b0
leaq 0x1f347(%rip), %rsi     # 0x87837
movq %r14, %rdi
callq 0x4f5b0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
movl 0xc(%rbx), %esi
movq %rax, %rdi
callq 0x51690
leaq 0x2009d(%rip), %r15     # 0x885bc
movq %rax, %rdi
movq %r15, %rsi
callq 0x4f5b0
leaq 0x1f312(%rip), %rsi     # 0x87843
movq %r14, %rdi
callq 0x4f5b0
movl 0x10(%rbx), %esi
movq %rax, %rdi
callq 0x51690
movq %rax, %rdi
movq %r15, %rsi
callq 0x4f5b0
leaq 0x1f2f7(%rip), %rsi     # 0x8784d
movq %r14, %rdi
callq 0x4f5b0
movl 0x14(%rbx), %esi
movq %rax, %rdi
callq 0x51690
movq %rax, %rdi
movq %r15, %rsi
callq 0x4f5b0
leaq 0x1f2df(%rip), %rsi     # 0x8785a
movq %r14, %rdi
callq 0x4f5b0
movl 0x18(%rbx), %esi
movq %rax, %rdi
callq 0x51690
movq %rax, %rdi
movq %r15, %rsi
callq 0x4f5b0
leaq 0x1f24b(%rip), %rsi     # 0x877eb
movq %r14, %rdi
callq 0x4f5b0
movl 0x1c(%rbx), %esi
movq %rax, %rdi
callq 0x51690
leaq 0x1f23a(%rip), %rsi     # 0x877f4
movq %rax, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x4f5b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghpatexpress.cc
// Function: OperandValue::genPattern(long) const
TokenPattern OperandValue::genPattern(intb val) const

{
  // In general an operand cannot be interpreted as any sort
  // of static constraint in an equation, and if it is being
  // defined by the equation, it should be on the left hand side.
  // If the operand has a defining expression already, use
  // of the operand in the equation makes sense, its defining
  // expression would become a subexpression in the full
  // expression. However, since this can be accomplished
  // by explicitly copying the subexpression into the full
  // expression, we don't support operands as placeholders.
  throw SleighError("Operand used in pattern expression");
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
pushq $0x20
popq %rdi
callq 0x4e180
movq %rax, %rbx
leaq 0x1ef39(%rip), %rsi     # 0x87893
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x515e0
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x4ddf0
xorl %ebp, %ebp
movq 0x46506(%rip), %rsi     # 0xaee88
movq 0x462af(%rip), %rdx     # 0xaec38
movq %rbx, %rdi
callq 0x51630
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x4e020
testb %bpl, %bpl
jne 0x689a8
jmp 0x689b0
movq %rax, %r14
movq %rbx, %rdi
callq 0x4ea60
movq %r14, %rdi
callq 0x518c0
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghpatexpress.cc
// Function: OperandValue::getValue(ParserWalker&) const
intb OperandValue::getValue(ParserWalker &walker) const

{				// Get the value of an operand when it is used in
				// an expression. 
  OperandSymbol *sym = ct->getOperand(index);
  PatternExpression *patexp = sym->getDefiningExpression();
  if (patexp == (PatternExpression *)0) {
    TripleSymbol *defsym = sym->getDefiningSymbol();
    if (defsym != (TripleSymbol *)0)
      patexp = defsym->getPatternExpression();
    if (patexp == (PatternExpression *)0)
      return 0;
  }
  ConstructState tempstate;
  ParserWalker newwalker(walker.getParserContext());
  newwalker.setOutOfBandState(ct,index,&tempstate,walker);
  intb res = patexp->getValue(newwalker);
  return res;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
movq %rsi, %rbx
movq 0x10(%rdi), %rsi
movslq 0xc(%rdi), %rdx
movq 0x18(%rsi), %rax
movq (%rax,%rdx,8), %rax
movq 0x50(%rax), %r15
testq %r15, %r15
je 0x68b19
leaq 0x48(%rsp), %r14
andq $0x0, 0x10(%r14)
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq (%rbx), %rax
leaq 0x70(%rsp), %rdi
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
leaq 0x8(%rsp), %rcx
movq %rbx, %r8
callq 0x4eed0
movq (%r15), %rax
leaq 0x70(%rsp), %rsi
movq %r15, %rdi
callq *0x10(%rax)
movq %rax, %rbx
movq %r14, %rdi
callq 0x4f0c0
jmp 0x68b3f
movq %rdi, %r14
movq 0x48(%rax), %rdi
testq %rdi, %rdi
je 0x68b3d
movq (%rdi), %rax
callq *0x38(%rax)
testq %rax, %rax
je 0x68b3d
movq %rax, %r15
movq 0x10(%r14), %rsi
movl 0xc(%r14), %edx
jmp 0x68ad0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r14
popq %r15
retq
jmp 0x68b51
movq %rax, %rbx
movq %r14, %rdi
callq 0x4f0c0
movq %rbx, %rdi
callq 0x518c0
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghpatexpress.cc
// Function: OperandValue::saveXml(std::ostream&) const
void OperandValue::saveXml(ostream &s) const

{
  s << "<operand_exp";
  s << " index=\"" << dec << index << "\"";
  s << " table=\"0x" << hex << ct->getParent()->getId() << "\"";
  s << " ct=\"0x" << ct->getId() << "\"/>\n"; // Save id of our constructor
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x1ecf4(%rip), %rsi     # 0x878b6
movq %r14, %rdi
callq 0x4f5b0
leaq 0x1ecf2(%rip), %rsi     # 0x878c3
movq %r14, %rdi
callq 0x4f5b0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
movl 0xc(%rbx), %esi
movq %rax, %rdi
callq 0x51690
leaq 0x1f9bc(%rip), %r15     # 0x885bc
movq %rax, %rdi
movq %r15, %rsi
callq 0x4f5b0
leaq 0x1ecba(%rip), %rsi     # 0x878cc
movq %r14, %rdi
callq 0x4f5b0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
movq 0x10(%rbx), %rcx
movq 0x8(%rcx), %rcx
movl 0x28(%rcx), %esi
movq %rax, %rdi
callq 0x4e990
movq %rax, %rdi
movq %r15, %rsi
callq 0x4f5b0
leaq 0x1ec83(%rip), %rsi     # 0x878d7
movq %r14, %rdi
callq 0x4f5b0
movq 0x10(%rbx), %rcx
movl 0x84(%rcx), %esi
movq %rax, %rdi
callq 0x4e990
leaq 0x1eb7f(%rip), %rsi     # 0x877f4
movq %rax, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x4f5b0
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghpatexpress.cc
// Function: OperandValue::restoreXml(Element const*, Translate*)
void OperandValue::restoreXml(const Element *el,Translate *trans)

{
  uintm ctid,tabid;
  {
    istringstream s(el->getAttributeValue("index"));
    s.unsetf(ios::dec | ios::hex | ios::oct);
    s >> index;
  }
  {
    istringstream s(el->getAttributeValue("table"));
    s.unsetf(ios::dec | ios::hex | ios::oct);
    s >> tabid;
  }
  {
    istringstream s(el->getAttributeValue("ct"));
    s.unsetf(ios::dec | ios::hex | ios::oct);
    s >> ctid;
  }
  SleighBase *sleigh = (SleighBase *)trans;
  SubtableSymbol *tab = dynamic_cast<SubtableSymbol *>(sleigh->findSymbol(tabid));
  ct = tab->getConstructor(ctid);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x1da88(%rip), %rsi     # 0x86726
leaq 0x10(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x515e0
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x50230
leaq 0x30(%rsp), %rdi
pushq $0x8
popq %rdx
movq %rax, %rsi
callq 0x51500
leaq 0x10(%rsp), %rdi
callq 0x4e020
leaq 0x30(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
andl $-0x4b, 0x48(%rsp,%rax)
leaq 0xc(%rbx), %rsi
callq 0x4e750
leaq 0x30(%rsp), %rdi
callq 0x4e070
leaq 0x1f635(%rip), %rsi     # 0x88334
leaq 0x10(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x515e0
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x50230
leaq 0x30(%rsp), %rdi
pushq $0x8
popq %rdx
movq %rax, %rsi
callq 0x51500
leaq 0x10(%rsp), %rdi
callq 0x4e020
leaq 0x30(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
andl $-0x4b, 0x48(%rsp,%rax)
leaq 0x8(%rsp), %rsi
callq 0x51830
leaq 0x30(%rsp), %rdi
callq 0x4e070
leaq 0x1f8bb(%rip), %rsi     # 0x8861c
leaq 0x10(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x515e0
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x50230
leaq 0x30(%rsp), %rdi
pushq $0x8
popq %rdx
movq %rax, %rsi
callq 0x51500
leaq 0x10(%rsp), %rdi
callq 0x4e020
leaq 0x30(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
andl $-0x4b, 0x48(%rsp,%rax)
leaq 0xc(%rsp), %rsi
callq 0x51830
leaq 0x30(%rsp), %rdi
callq 0x4e070
movl 0x8(%rsp), %eax
movq 0x198(%r14), %rcx
movq (%rcx,%rax,8), %rdi
movq 0x45d76(%rip), %rsi     # 0xaeb48
movq 0x46117(%rip), %rdx     # 0xaeef0
xorl %ecx, %ecx
callq 0x4fa60
movl 0xc(%rsp), %ecx
movq 0x40(%rax), %rax
movq (%rax,%rcx,8), %rax
movq %rax, 0x10(%rbx)
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r14
popq %r15
retq
jmp 0x68e05
jmp 0x68e14
jmp 0x68e05
jmp 0x68e14
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x4e070
jmp 0x68e2a
movq %rax, %rbx
jmp 0x68e2a
jmp 0x68e1d
jmp 0x68e1d
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x4e020
movq %rbx, %rdi
callq 0x518c0
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghpatexpress.cc
// Function: BinaryExpression::restoreXml(Element const*, Translate*)
void BinaryExpression::restoreXml(const Element *el,Translate *trans)

{
  const List &list(el->getChildren());
  List::const_iterator iter;
  iter = list.begin();
  left = PatternExpression::restoreExpression(*iter,trans);
  ++iter;
  right = PatternExpression::restoreExpression(*iter,trans);
  left->layClaim();
  right->layClaim();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
movq 0x78(%rsi), %r15
movq (%r15), %rdi
movq %rdx, %rsi
callq 0x4f580
movq %rax, 0x10(%r14)
movq 0x8(%r15), %rdi
movq %rbx, %rsi
callq 0x4f580
movq %rax, 0x18(%r14)
movq 0x10(%r14), %rcx
incl 0x8(%rcx)
incl 0x8(%rax)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghpatexpress.cc
// Function: OperandEquation::resolveOperandLeft(OperandResolve&) const
bool OperandEquation::resolveOperandLeft(OperandResolve &state) const

{
  OperandSymbol *sym = state.operands[ index ];
  if (sym->isOffsetIrrelevant()) {
    sym->offsetbase = -1;
    sym->reloffset = 0;
    return true;
  }
  if (state.base == -2)		// We have no base
    return false;
  sym->offsetbase = state.base;
  sym->reloffset = state.offset;
  state.cur_rightmost = index;
  state.size = 0;		// Distance from right edge
  return true;
}

// Assembly:
movq (%rsi), %rcx
movslq 0x38(%rdi), %rax
movq (%rcx), %rcx
movq (%rcx,%rax,8), %rcx
testb $0x2, 0x58(%rcx)
jne 0x69617
movl 0x8(%rsi), %edx
cmpl $-0x2, %edx
jne 0x69627
xorl %eax, %eax
retq
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %rax, 0x30(%rcx)
jmp 0x69637
movl %edx, 0x34(%rcx)
movl 0xc(%rsi), %edx
movl %edx, 0x30(%rcx)
movl %eax, 0x10(%rsi)
andl $0x0, 0x14(%rsi)
movb $0x1, %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghpatexpress.cc
// Function: OperandEquation::operandOrder(Constructor*, std::vector<OperandSymbol*, std::allocator<OperandSymbol*>>&) const
void OperandEquation::operandOrder(Constructor *ct,vector<OperandSymbol *> &order) const

{
  OperandSymbol *sym = ct->getOperand(index);
  if (!sym->isMarked()) {
    order.push_back(sym);
    sym->setMark();
  }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movslq 0x38(%rdi), %rax
movq 0x18(%rsi), %rcx
movq (%rcx,%rax,8), %rax
movq %rax, 0x8(%rsp)
testb $0x8, 0x58(%rax)
jne 0x6966d
leaq 0x8(%rsp), %rbx
movq %rdx, %rdi
movq %rbx, %rsi
callq 0x509f0
movq (%rbx), %rax
orl $0x8, 0x58(%rax)
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghpatexpress.cc
// Function: UnconstrainedEquation::resolveOperandLeft(OperandResolve&) const
bool UnconstrainedEquation::resolveOperandLeft(OperandResolve &state) const

{
  state.cur_rightmost = -1;
  if (resultpattern.getLeftEllipsis()||resultpattern.getRightEllipsis()) // don't know length
    state.size = -1;
  else
    state.size = resultpattern.getMinimumLength();
  return true;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
orl $-0x1, 0x10(%rsi)
pushq $-0x1
popq %rax
cmpb $0x0, 0x30(%rdi)
jne 0x69762
cmpb $0x0, 0x31(%rdi)
jne 0x69762
addq $0x10, %rdi
callq 0x51b80
movl %eax, 0x14(%rbx)
movb $0x1, %al
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghpatexpress.cc
// Function: buildPattern(PatternValue*, long, std::vector<PatternValue const*, std::allocator<PatternValue const*>>&, std::vector<long, std::allocator<long>>&)
static TokenPattern buildPattern(PatternValue *lhs,intb lhsval,vector<const PatternValue *> &semval,
				 vector<intb> &val)

{
  TokenPattern respattern = lhs->genPattern(lhsval);

  for(int4 i=0;i<semval.size();++i)
    respattern = respattern.doAnd(semval[i]->genPattern(val[i]));
  return respattern;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, %r14
movq %rcx, %r15
movq %rdi, %rbx
movq (%rsi), %rax
callq *0x48(%rax)
xorl %ebp, %ebp
leaq 0x8(%rsp), %r12
leaq 0x30(%rsp), %r13
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rbp, %rcx
jbe 0x69ad8
movq (%rax,%rbp,8), %rsi
movq (%r14), %rax
movq (%rax,%rbp,8), %rdx
movq (%rsi), %rax
movq %r12, %rdi
callq *0x48(%rax)
movq %r13, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x51b40
movq %rbx, %rdi
movq %r13, %rsi
callq 0x50980
movq %r13, %rdi
callq 0x4e060
movq %r12, %rdi
callq 0x4e060
incq %rbp
jmp 0x69a83
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x4e060
jmp 0x69afc
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x4e060
jmp 0x69b0b
movq %rax, %r14
movq %rbx, %rdi
callq 0x4e060
movq %r14, %rdi
callq 0x518c0
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghpatexpress.cc
// Function: advance_combo(std::vector<long, std::allocator<long>>&, std::vector<long, std::allocator<long>> const&, std::vector<long, std::allocator<long>>&)
static bool advance_combo(vector<intb> &val,const vector<intb> &min,vector<intb> &max)

{
  int4 i;

  i = 0;
  while(i<val.size()) {
    val[i] += 1;
    if (val[i] <= max[i])	// maximum is inclusive
      return true;
    val[i] = min[i];
    i += 1;
  }
  return false;
}

// Assembly:
movq (%rdi), %rcx
movq 0x8(%rdi), %rax
subq %rcx, %rax
sarq $0x3, %rax
movq (%rdx), %rdx
movq (%rsi), %rdi
xorl %esi, %esi
cmpq %rsi, %rax
je 0x69b55
movq (%rcx,%rsi,8), %r8
leaq 0x1(%r8), %r9
movq %r9, (%rcx,%rsi,8)
cmpq (%rdx,%rsi,8), %r8
jl 0x69b55
movq (%rdi,%rsi,8), %r8
movq %r8, (%rcx,%rsi,8)
incq %rsi
jmp 0x69b31
cmpq %rsi, %rax
seta %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghpatexpress.cc
// Function: EquationAnd::resolveOperandLeft(OperandResolve&) const
bool EquationAnd::resolveOperandLeft(OperandResolve &state) const

{
  int4 cur_rightmost = -1;	// Initially we don't know our rightmost
  int4 cur_size = -1;		//   or size traversed since rightmost
  bool res = right->resolveOperandLeft(state);
  if (!res) return false;
  if ((state.cur_rightmost != -1)&&(state.size != -1)) {
    cur_rightmost = state.cur_rightmost;
    cur_size = state.size;
  }
  res = left->resolveOperandLeft(state);
  if (!res) return false;
  if ((state.cur_rightmost == -1)||(state.size == -1)) {
    state.cur_rightmost = cur_rightmost;
    state.size = cur_size;
  }
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x40(%rdi), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
testb %al, %al
je 0x6aab9
movl 0x10(%rbx), %eax
movl 0x14(%rbx), %ebp
cmpl $-0x1, %ebp
movl %eax, %r15d
cmovel %ebp, %r15d
cmpl $-0x1, %eax
cmovel %eax, %r15d
cmovel %eax, %ebp
movq 0x38(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
testb %al, %al
je 0x6aab9
cmpl $-0x1, 0x10(%rbx)
movb $0x1, %al
je 0x6aab0
cmpl $-0x1, 0x14(%rbx)
jne 0x6aabb
movl %r15d, 0x10(%rbx)
movl %ebp, 0x14(%rbx)
jmp 0x6aabb
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghpatexpress.cc
// Function: EquationCat::resolveOperandLeft(OperandResolve&) const
bool EquationCat::resolveOperandLeft(OperandResolve &state) const

{
  bool res = left->resolveOperandLeft(state);
  if (!res) return false;
  int4 cur_base = state.base;
  int4 cur_offset = state.offset;
  if ((!left->getTokenPattern().getLeftEllipsis())&&(!left->getTokenPattern().getRightEllipsis())) {
    // Keep the same base
    state.offset += left->getTokenPattern().getMinimumLength(); // But add to its size
  }
  else if (state.cur_rightmost != -1) {
    state.base = state.cur_rightmost;
    state.offset = state.size;
  }
  else if (state.size != -1) {
    state.offset += state.size;
  }
  else {
    state.base = -2;		// We have no anchor
  }
  int4 cur_rightmost = state.cur_rightmost;
  int4 cur_size = state.size;
  res = right->resolveOperandLeft(state);
  if (!res) return false;
  state.base = cur_base;	// Restore base and offset
  state.offset = cur_offset;
  if (state.cur_rightmost == -1) {
    if ((state.size != -1)&&(cur_rightmost != -1)&&(cur_size != -1)) {
      state.cur_rightmost = cur_rightmost;
      state.size += cur_size;
    }
  }
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x38(%rdi), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
testb %al, %al
je 0x6ae77
movl 0x8(%rbx), %ebp
movl 0xc(%rbx), %r15d
movq 0x38(%r14), %rdi
cmpb $0x0, 0x30(%rdi)
jne 0x6add2
cmpb $0x0, 0x31(%rdi)
je 0x6ae01
movl 0x10(%rbx), %r13d
cmpl $-0x1, %r13d
je 0x6adea
movl %r13d, 0x8(%rbx)
movl 0x14(%rbx), %r12d
movl %r12d, 0xc(%rbx)
jmp 0x6ae28
movl 0x14(%rbx), %r12d
cmpl $-0x1, %r12d
je 0x6ae1a
leal (%r12,%r15), %eax
movl %eax, 0xc(%rbx)
pushq $-0x1
popq %r13
jmp 0x6ae28
addq $0x10, %rdi
callq 0x51b80
addl %r15d, %eax
movl %eax, 0xc(%rbx)
movl 0x10(%rbx), %r13d
movl 0x14(%rbx), %r12d
jmp 0x6ae28
movl $0xfffffffe, 0x8(%rbx)  # imm = 0xFFFFFFFE
pushq $-0x1
popq %r12
movl %r12d, %r13d
movq 0x40(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
testb %al, %al
je 0x6ae77
movl %ebp, 0x8(%rbx)
movl %r15d, 0xc(%rbx)
movb $0x1, %al
cmpl $-0x1, 0x10(%rbx)
jne 0x6ae79
movl 0x14(%rbx), %ecx
cmpl $-0x1, %ecx
setne %dl
cmpl $-0x1, %r13d
setne %sil
andb %dl, %sil
cmpl $-0x1, %r12d
setne %dl
andb %sil, %dl
cmpb $0x1, %dl
jne 0x6ae79
movl %r13d, 0x10(%rbx)
addl %r12d, %ecx
movl %ecx, 0x14(%rbx)
jmp 0x6ae79
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghpatexpress.cc
// Function: EquationLeftEllipsis::resolveOperandLeft(OperandResolve&) const
bool EquationLeftEllipsis::resolveOperandLeft(OperandResolve &state) const

{
  int4 cur_base = state.base;
  state.base = -2;
  bool res = eq->resolveOperandLeft(state);
  if (!res) return false;
  state.base = cur_base;
  
  return true;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl 0x8(%rsi), %ebp
movl $0xfffffffe, 0x8(%rsi)  # imm = 0xFFFFFFFE
movq 0x38(%rdi), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
testb %al, %al
je 0x6aeff
movl %ebp, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghpatexpress.cc
// Function: BinaryExpression::~BinaryExpression()
BinaryExpression::~BinaryExpression(void)

{				// Delete only non-pattern values
  if (left != (PatternExpression *)0)
    PatternExpression::release(left);
  if (right != (PatternExpression *)0)
    PatternExpression::release(right);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x43ef5(%rip), %rax     # 0xaee60
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x6af80
callq 0x4e2e0
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x6af8f
popq %rbx
jmp 0x4e2e0
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghpattern.cc
// Function: PatternBlock::getMask(int, int) const
uintm PatternBlock::getMask(int4 startbit,int4 size) const

{
  startbit -= 8*offset;
  // Note the division and remainder here is unsigned.  Then it is recast to signed. 
  // If startbit is negative, then wordnum1 is either negative or very big,
  // if (unsigned size is same as sizeof int)
  // In either case, shift should come out between 0 and 8*sizeof(uintm)-1
  int4 wordnum1 = startbit/(8*sizeof(uintm));
  int4 shift = startbit % (8*sizeof(uintm));
  int4 wordnum2 = (startbit+size-1)/(8*sizeof(uintm));
  uintm res;

  if ((wordnum1<0)||(wordnum1>=maskvec.size()))
    res = 0;
  else
    res = maskvec[wordnum1];

  res <<= shift;
  if (wordnum1 != wordnum2) {
    uintm tmp;
    if ((wordnum2<0)||(wordnum2>=maskvec.size()))
      tmp = 0;
    else
      tmp = maskvec[wordnum2];
    res |= (tmp>>(8*sizeof(uintm)-shift));
  }
  res >>= (8*sizeof(uintm) - size);
  
  return res;
}

// Assembly:
movl (%rdi), %eax
shll $0x3, %eax
subl %eax, %esi
movl %esi, %ecx
leal (%rdx,%rsi), %r8d
decl %r8d
sarl $0x5, %esi
andl $0x1f, %ecx
sarl $0x5, %r8d
xorl %eax, %eax
testl %esi, %esi
js 0x6bee3
movl %esi, %r9d
movq 0x8(%rdi), %r10
movq 0x10(%rdi), %r11
subq %r10, %r11
sarq $0x2, %r11
cmpq %r9, %r11
jbe 0x6bee3
movl (%r10,%r9,4), %eax
shll %cl, %eax
cmpl %r8d, %esi
je 0x6bf12
xorl %esi, %esi
testl %r8d, %r8d
js 0x6bf0c
movl %r8d, %r8d
movq 0x8(%rdi), %r9
movq 0x10(%rdi), %rdi
subq %r9, %rdi
sarq $0x2, %rdi
cmpq %r8, %rdi
jbe 0x6bf0c
movl (%r9,%r8,4), %esi
negb %cl
shrl %cl, %esi
orl %esi, %eax
negb %dl
movl %edx, %ecx
shrl %cl, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghpattern.cc
// Function: PatternBlock::getValue(int, int) const
uintm PatternBlock::getValue(int4 startbit,int4 size) const

{
  startbit -= 8*offset;
  int4 wordnum1 = startbit/(8*sizeof(uintm));
  int4 shift = startbit % (8*sizeof(uintm));
  int4 wordnum2 = (startbit+size-1)/(8*sizeof(uintm));
  uintm res;

  if ((wordnum1<0)||(wordnum1>=valvec.size()))
    res = 0;
  else
    res = valvec[wordnum1];
  res <<= shift;
  if (wordnum1 != wordnum2) {
    uintm tmp;
    if ((wordnum2<0)||(wordnum2>=valvec.size()))
      tmp = 0;
    else
      tmp = valvec[wordnum2];
    res |= (tmp>>(8*sizeof(uintm)-shift));
  }
  res >>= (8*sizeof(uintm) - size);
  
  return res;
}

// Assembly:
movl (%rdi), %eax
shll $0x3, %eax
subl %eax, %esi
movl %esi, %ecx
leal (%rdx,%rsi), %r8d
decl %r8d
sarl $0x5, %esi
andl $0x1f, %ecx
sarl $0x5, %r8d
xorl %eax, %eax
testl %esi, %esi
js 0x6bf85
movl %esi, %r9d
movq 0x20(%rdi), %r10
movq 0x28(%rdi), %r11
subq %r10, %r11
sarq $0x2, %r11
cmpq %r9, %r11
jbe 0x6bf85
movl (%r10,%r9,4), %eax
shll %cl, %eax
cmpl %r8d, %esi
je 0x6bfb4
xorl %esi, %esi
testl %r8d, %r8d
js 0x6bfae
movl %r8d, %r8d
movq 0x20(%rdi), %r9
movq 0x28(%rdi), %rdi
subq %r9, %rdi
sarq $0x2, %rdi
cmpq %r8, %rdi
jbe 0x6bfae
movl (%r9,%r8,4), %esi
negb %cl
shrl %cl, %esi
orl %esi, %eax
negb %dl
movl %edx, %ecx
shrl %cl, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghpattern.cc
// Function: DisjointPattern::specializes(DisjointPattern const*) const
bool DisjointPattern::specializes(const DisjointPattern *op2) const

{				// Return true, if everywhere this's mask is non-zero
				// op2's mask is non-zero and op2's value match this's
  PatternBlock *a,*b;

  a = getBlock(false);
  b = op2->getBlock(false);
  if ((b != (PatternBlock *)0)&&(!b->alwaysTrue())) {	// a must match existing block
    if (a == (PatternBlock *)0) return false;
    if (!a->specializes(b)) return false;
  }
  a = getBlock(true);
  b = op2->getBlock(true);
  if ((b != (PatternBlock *)0)&&(!b->alwaysTrue())) {	// a must match existing block
    if (a == (PatternBlock *)0) return false;
    if (!a->specializes(b)) return false;
  }
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
xorl %esi, %esi
callq *0x78(%rax)
movq %rax, %r15
movq (%rbx), %rax
movq %rbx, %rdi
xorl %esi, %esi
callq *0x78(%rax)
testq %rax, %rax
je 0x6c018
cmpl $0x0, 0x4(%rax)
je 0x6c018
testq %r15, %r15
je 0x6c057
movq %r15, %rdi
movq %rax, %rsi
callq 0x4e000
testb %al, %al
je 0x6c057
movq (%r14), %rax
pushq $0x1
popq %rbp
movq %r14, %rdi
movl %ebp, %esi
callq *0x78(%rax)
movq %rax, %r14
movq (%rbx), %rax
movq %rbx, %rdi
movl %ebp, %esi
callq *0x78(%rax)
testq %rax, %rax
je 0x6c053
cmpl $0x0, 0x4(%rax)
je 0x6c053
testq %r14, %r14
je 0x6c057
movq %r14, %rdi
movq %rax, %rsi
callq 0x4e000
testb %al, %al
je 0x6c057
movb $0x1, %al
jmp 0x6c059
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghpattern.cc
// Function: PatternBlock::specializes(PatternBlock const*) const
bool PatternBlock::specializes(const PatternBlock *op2) const

{				// does every masked bit in -this- match the corresponding
				// masked bit in -op2-
  int4 length = 8*op2->getLength();
  int4 tmplength;
  uintm mask1,mask2,value1,value2;
  int4 sbit = 0;
  while(sbit < length) {
    tmplength = length-sbit;
    if (tmplength > 8*sizeof(uintm))
      tmplength = 8*sizeof(uintm);
    mask1 = getMask(sbit,tmplength);
    value1 = getValue(sbit,tmplength);
    mask2 = op2->getMask(sbit,tmplength);
    value2 = op2->getValue(sbit,tmplength);
    if ((mask1 & mask2) != mask2) return false;
    if ((value1 & mask2) != (value2 & mask2)) return false;
    sbit += tmplength;
  }
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl 0x4(%rsi), %eax
addl (%rsi), %eax
movq %rdi, %r14
shll $0x3, %eax
movl %eax, 0x4(%rsp)
xorl %ebp, %ebp
movl %ebp, %r15d
movl 0x4(%rsp), %ebp
subl %r15d, %ebp
jle 0x6c0e8
cmpl $0x20, %ebp
pushq $0x20
popq %rax
cmovael %eax, %ebp
movq %r14, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x511f0
movl %eax, %r13d
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x511f0
notl %r13d
testl %r13d, %eax
jne 0x6c0e8
movl %eax, %r12d
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x4f4b0
movl %eax, %r13d
movq %r14, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x4f4b0
xorl %r13d, %eax
addl %r15d, %ebp
testl %r12d, %eax
je 0x6c083
cmpl %r15d, 0x4(%rsp)
setle %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/slghpattern.cc
// Function: DisjointPattern::identical(DisjointPattern const*) const
bool DisjointPattern::identical(const DisjointPattern *op2) const

{				// Return true if patterns match exactly
  PatternBlock *a,*b;
  
  a = getBlock(false);
  b = op2->getBlock(false);
  if (b != (PatternBlock *)0) {	// a must match existing block
    if (a == (PatternBlock *)0) {
      if (!b->alwaysTrue())
	return false;
    }
    else if (!a->identical(b))
      return false;
  }
  else {
    if ((a != (PatternBlock *)0)&&(!a->alwaysTrue()))
      return false;
  }
  a = getBlock(true);
  b = op2->getBlock(true);
  if (b != (PatternBlock *)0) {	// a must match existing block
    if (a == (PatternBlock *)0) {
      if (!b->alwaysTrue())
	return false;
    }
    else if (!a->identical(b))
      return false;
  }
  else {
    if ((a != (PatternBlock *)0)&&(!a->alwaysTrue()))
      return false;
  }
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
xorl %esi, %esi
callq *0x78(%rax)
movq %rax, %r15
movq (%rbx), %rax
movq %rbx, %rdi
xorl %esi, %esi
callq *0x78(%rax)
testq %rax, %rax
je 0x6c13e
testq %r15, %r15
je 0x6c14c
movq %r15, %rdi
movq %rax, %rsi
callq 0x4e930
testb %al, %al
jne 0x6c152
jmp 0x6c195
testq %r15, %r15
je 0x6c152
cmpl $0x0, 0x4(%r15)
jne 0x6c195
jmp 0x6c152
cmpl $0x0, 0x4(%rax)
jne 0x6c195
movq (%r14), %rax
pushq $0x1
popq %rbp
movq %r14, %rdi
movl %ebp, %esi
callq *0x78(%rax)
movq %rax, %r14
movq (%rbx), %rax
movq %rbx, %rdi
movl %ebp, %esi
callq *0x78(%rax)
testq %rax, %rax
je 0x6c189
testq %r14, %r14
je 0x6c199
movq %r14, %rdi
movq %rax, %rsi
callq 0x4e930
testb %al, %al
je 0x6c195
jmp 0x6c19f
testq %r14, %r14
je 0x6c19f
cmpl $0x0, 0x4(%r14)
je 0x6c19f
xorl %eax, %eax
jmp 0x6c1a1
cmpl $0x0, 0x4(%rax)
jne 0x6c195
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq