LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/semantics.cc
// Function: ConstructTpl::fillinBuild(std::vector<int, std::allocator<int>>&, AddrSpace*)
int4 ConstructTpl::fillinBuild(vector<int4> &check,AddrSpace *const_space)

{ // Make sure there is a build statement for all subtable params
  // Return 0 upon success, 1 if there is a duplicate BUILD, 2 if there is a build for a non-subtable
  vector<OpTpl *>::iterator iter;
  OpTpl *op;
  VarnodeTpl *indvn;

  for(iter=vec.begin();iter!=vec.end();++iter) {
    op = *iter;
    if (op->getOpcode() == BUILD) {
      int4 index = op->getIn(0)->getOffset().getReal();
      if (check[index] != 0)
	return check[index];	// Duplicate BUILD statement or non-subtable
      check[index] = 1;		// Mark to avoid future duplicate build
    }
  }
  for(int4 i=0;i<check.size();++i) {
    if (check[i] == 0) {	// Didn't see a BUILD statement
      op = new OpTpl(BUILD);
      indvn = new VarnodeTpl(ConstTpl(const_space),
			      ConstTpl(ConstTpl::real,i),
			      ConstTpl(ConstTpl::real,4));
      op->addInput(indvn);
      vec.insert(vec.begin(),op);
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, 0x10(%rsp)
movq %rsi, %r14
leaq 0x8(%rdi), %r15
movq 0x8(%rdi), %rcx
movq 0x10(%rdi), %rdx
movq (%rsi), %rax
cmpq %rdx, %rcx
je 0x62874
movq (%rcx), %rsi
cmpl $0x3c, 0x8(%rsi)
jne 0x6286e
movq 0x10(%rsi), %rsi
movq (%rsi), %rsi
movslq 0x30(%rsi), %rsi
movl (%rax,%rsi,4), %r12d
testl %r12d, %r12d
jne 0x62935
shlq $0x2, %rsi
movl $0x1, (%rax,%rsi)
addq $0x8, %rcx
jmp 0x6283d
xorl %r12d, %r12d
leaq 0x58(%rsp), %rbx
xorl %r13d, %r13d
movq 0x8(%r14), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r13, %rcx
jbe 0x62935
cmpl $0x0, (%rax,%r13,4)
jne 0x6292d
pushq $0x28
popq %rdi
callq 0x4f5d0
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
andq $0x0, 0x20(%rax)
movl $0x3c, 0x8(%rax)
andq $0x0, (%rax)
movq %rax, 0x8(%rsp)
pushq $0x68
popq %rdi
callq 0x4f5d0
movq %rax, %rbp
leaq 0x38(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x4ef60
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x4fa20
movq %rbx, %rdi
xorl %esi, %esi
pushq $0x4
popq %rdx
callq 0x4fa20
movq %rbp, %rdi
leaq 0x38(%rsp), %rsi
leaq 0x18(%rsp), %rdx
movq %rbx, %rcx
callq 0x51230
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0x51a50
movq (%r15), %rsi
movq %r15, %rdi
leaq 0x8(%rsp), %rdx
callq 0x4e390
movq (%r14), %rax
incq %r13
jmp 0x6287f
movl %r12d, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6294b
jmp 0x6294b
movq %rax, %rbx
pushq $0x68
popq %rsi
movq %rbp, %rdi
callq 0x4f670
movq %rbx, %rdi
callq 0x518c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/semantics.cc
// Function: ConstructTpl::changeHandleIndex(std::vector<int, std::allocator<int>> const&)
void ConstructTpl::changeHandleIndex(const vector<int4> &handmap)

{
  vector<OpTpl *>::const_iterator iter;
  OpTpl *op;

  for(iter=vec.begin();iter!=vec.end();++iter) {
    op = *iter;
    if (op->getOpcode() == BUILD) {
      int4 index = op->getIn(0)->getOffset().getReal();
      index = handmap[index];
      op->getIn(0)->setOffset(index);
    }
    else
      op->changeHandleIndex(handmap);
  }
  if (result != (HandleTpl *)0)
    result->changeHandleIndex(handmap);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %r12
movq %rsp, %r15
cmpq 0x10(%r14), %r12
je 0x629ef
movq (%r12), %rdi
cmpl $0x3c, 0x8(%rdi)
jne 0x629e1
movq 0x10(%rdi), %rax
movq (%rax), %r13
movslq 0x30(%r13), %rax
movq (%rbx), %rcx
movslq (%rcx,%rax,4), %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x4fa20
movups (%rsp), %xmm0
movups 0xc(%rsp), %xmm1
movups %xmm1, 0x2c(%r13)
movups %xmm0, 0x20(%r13)
jmp 0x629e9
movq %rbx, %rsi
callq 0x4f1f0
addq $0x8, %r12
jmp 0x629a0
movq 0x20(%r14), %rdi
testq %rdi, %rdi
je 0x62a00
movq %rbx, %rsi
callq 0x4e690
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/semantics.cc
// Function: ConstructTpl::setInput(VarnodeTpl*, int, int)
void ConstructTpl::setInput(VarnodeTpl *vn,int4 index,int4 slot)

{ // set the VarnodeTpl input for a particular op
  // for use with optimization routines
  OpTpl *op = vec[index];
  VarnodeTpl *oldvn = op->getIn(slot);
  op->setInput(vn,slot);
  if (oldvn != (VarnodeTpl *)0)
    delete oldvn;
}

// Assembly:
movslq %edx, %rax
movq 0x8(%rdi), %rdx
movq (%rdx,%rax,8), %rax
movslq %ecx, %rcx
movq 0x10(%rax), %rax
movq (%rax,%rcx,8), %rdi
movq %rsi, (%rax,%rcx,8)
testq %rdi, %rdi
je 0x62a35
pushq $0x68
popq %rsi
jmp 0x4f670
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/semantics.cc
// Function: ConstructTpl::setOutput(VarnodeTpl*, int)
void ConstructTpl::setOutput(VarnodeTpl *vn,int4 index)

{ // set the VarnodeTpl output for a particular op
  // for use with optimization routines
  OpTpl *op = vec[index];
  VarnodeTpl *oldvn = op->getOut();
  op->setOutput(vn);
  if (oldvn != (VarnodeTpl *)0)
    delete oldvn;
}

// Assembly:
movslq %edx, %rax
movq 0x8(%rdi), %rcx
movq (%rcx,%rax,8), %rax
movq (%rax), %rdi
movq %rsi, (%rax)
testq %rdi, %rdi
je 0x62a54
pushq $0x68
popq %rsi
jmp 0x4f670
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/semantics.cc
// Function: ConstructTpl::deleteOps(std::vector<int, std::allocator<int>> const&)
void ConstructTpl::deleteOps(const vector<int4> &indices)

{ // delete a particular set of ops
  for(uint4 i=0;i<indices.size();++i) {
    delete vec[indices[i]];
    vec[indices[i]] = (OpTpl *)0;
  }
  uint4 poscur = 0;
  for(uint4 i=0;i<vec.size();++i) {
    OpTpl *op = vec[i];
    if (op != (OpTpl *)0) {
      vec[poscur] = op;
      poscur += 1;
    }
  }
  while(vec.size() > poscur)
    vec.pop_back();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
xorl %eax, %eax
pushq $0x28
popq %r15
movl %eax, %r13d
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r13, %rcx
jbe 0x62abb
movslq (%rax,%r13,4), %rax
movq 0x8(%rbx), %rcx
movq (%rcx,%rax,8), %r12
testq %r12, %r12
je 0x62a9a
movq %r12, %rdi
callq 0x4d290
movq %r12, %rdi
movq %r15, %rsi
callq 0x4f670
movq (%r14), %rax
movslq (%rax,%r13,4), %rax
movq 0x8(%rbx), %rcx
andq $0x0, (%rcx,%rax,8)
leal 0x1(%r13), %eax
jmp 0x62a6b
xorl %eax, %eax
xorl %ecx, %ecx
movl %ecx, %ecx
movq 0x8(%rbx), %r8
movq 0x10(%rbx), %rsi
movq %rsi, %rdi
subq %r8, %rdi
movq %rdi, %r9
sarq $0x3, %r9
movl %eax, %edx
cmpq %rcx, %r9
jbe 0x62af8
movq (%r8,%rcx,8), %rsi
testq %rsi, %rsi
je 0x62aec
movq %rsi, (%r8,%rdx,8)
incl %eax
incl %ecx
jmp 0x62abf
movq %rsi, 0x10(%rbx)
addq $-0x8, %rdi
addq $-0x8, %rsi
movq %rdi, %rax
sarq $0x3, %rax
cmpq %rdx, %rax
ja 0x62af0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/semantics.cc
// Function: ConstructTpl::saveXml(std::ostream&, int) const
void ConstructTpl::saveXml(ostream &s,int4 sectionid) const

{
  s << "<construct_tpl";
  if (sectionid >=0 )
    s << " section=\"" << dec << sectionid << "\"";
  if (delayslot != 0)
    s << " delay=\"" << dec << delayslot << "\"";
  if (numlabels != 0)
    s << " labels=\"" << dec << numlabels << "\"";
  s << ">\n";
  if (result != (HandleTpl *)0)
    result->saveXml(s);
  else
    s << "<null/>";
  for(int4 i=0;i<vec.size();++i)
    vec[i]->saveXml(s);
  s << "</construct_tpl>\n";
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x24861(%rip), %rsi     # 0x87389
movq %rbx, %rdi
callq 0x4f5b0
testl %ebp, %ebp
js 0x62b71
leaq 0x2485d(%rip), %rsi     # 0x87398
movq %rbx, %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)
movq %rax, %rdi
movl %ebp, %esi
callq 0x51690
leaq 0x25a53(%rip), %rsi     # 0x885bc
movq %rax, %rdi
callq 0x4f5b0
cmpl $0x0, (%r14)
je 0x62bb5
leaq 0x24825(%rip), %rsi     # 0x873a3
movq %rbx, %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 (%r14), %esi
movq %rax, %rdi
callq 0x4e990
leaq 0x25a0f(%rip), %rsi     # 0x885bc
movq %rax, %rdi
callq 0x4f5b0
cmpl $0x0, 0x4(%r14)
je 0x62bfb
leaq 0x247e9(%rip), %rsi     # 0x873ac
movq %rbx, %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 0x4(%r14), %esi
movq %rax, %rdi
callq 0x4e990
leaq 0x259c9(%rip), %rsi     # 0x885bc
movq %rax, %rdi
callq 0x4f5b0
leaq 0x25b9c(%rip), %rsi     # 0x8879e
movq %rbx, %rdi
callq 0x4f5b0
movq 0x20(%r14), %rdi
testq %rdi, %rdi
je 0x62c1d
movq %rbx, %rsi
callq 0x4fdb0
jmp 0x62c2c
leaq 0x24792(%rip), %rsi     # 0x873b6
movq %rbx, %rdi
callq 0x4f5b0
xorl %r15d, %r15d
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r15, %rcx
jbe 0x62c54
movq (%rax,%r15,8), %rdi
movq %rbx, %rsi
callq 0x514d0
incq %r15
jmp 0x62c2f
leaq 0x24763(%rip), %rsi     # 0x873be
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4f5b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/semantics.cc
// Function: PcodeBuilder::build(ConstructTpl*, int)
void PcodeBuilder::build(ConstructTpl *construct,int4 secnum)

{
  if (construct == (ConstructTpl *)0)
    throw UnimplError("",0);	// Pcode is not implemented for this constructor

  uint4 oldbase = labelbase;	// Recursively store old labelbase
  labelbase = labelcount;	// Set the newbase
  labelcount += construct->numLabels();	// Add labels from this template

  vector<OpTpl *>::const_iterator iter;
  OpTpl *op;
  const vector<OpTpl *> &ops(construct->getOpvec());

  for(iter=ops.begin();iter!=ops.end();++iter) {
    op = *iter;
    switch(op->getOpcode()) {
    case BUILD:
      appendBuild( op, secnum );
      break;
    case DELAY_SLOT:
      delaySlot( op );
      break;
    case LABELBUILD:
      setLabel( op );
      break;
    case CROSSBUILD:
      appendCrossBuild(op,secnum);
      break;
    default:
      dump( op );
      break;
    }
  }
  labelbase = oldbase;		// Restore old labelbase
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
testq %rsi, %rsi
je 0x62f17
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movl 0x8(%rdi), %ebp
movl 0xc(%rdi), %eax
movl %eax, 0x8(%rdi)
addl 0x4(%rsi), %eax
movl %eax, 0xc(%rdi)
movq 0x8(%rsi), %r12
leaq 0x242a5(%rip), %r13     # 0x87158
cmpq 0x10(%r15), %r12
je 0x62f04
movq (%r12), %rsi
movl 0x8(%rsi), %ecx
movq (%r14), %rax
addl $-0x3c, %ecx
cmpl $0x6, %ecx
ja 0x62ef9
movslq (%r13,%rcx,4), %rcx
addq %r13, %rcx
jmpq *%rcx
movq %r14, %rdi
movl %ebx, %edx
callq *0x18(%rax)
jmp 0x62efe
movq %r14, %rdi
callq *0x28(%rax)
jmp 0x62efe
movq %r14, %rdi
callq *0x20(%rax)
jmp 0x62efe
movq %r14, %rdi
movl %ebx, %edx
callq *0x30(%rax)
jmp 0x62efe
movq %r14, %rdi
callq *(%rax)
addq $0x8, %r12
jmp 0x62eb3
movl %ebp, 0x8(%r14)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x28
popq %rdi
callq 0x4e180
movq %rax, %rbx
leaq 0x25297(%rip), %rsi     # 0x881c0
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x515e0
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x4ddf0
andl $0x0, 0x20(%rbx)
xorl %ebp, %ebp
movq 0x4bfcb(%rip), %rsi     # 0xaef20
movq 0x4bcdc(%rip), %rdx     # 0xaec38
movq %rbx, %rdi
callq 0x51630
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x4e020
testb %bpl, %bpl
jne 0x62f7b
jmp 0x62f83
movq %rax, %r14
movq %rbx, %rdi
callq 0x4ea60
movq %r14, %rdi
callq 0x518c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/sleigh.cc
// Function: PcodeCacher::PcodeCacher()
PcodeCacher::PcodeCacher (void)

{
    // We aim to allocate this array only once
    uint4 maxsize = 600;
    poolstart = new VarnodeData[maxsize];
    endpool = poolstart + maxsize;
    curpool = poolstart;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x18(%rdi), %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
andq $0x0, 0x28(%rdi)
leaq 0x30(%rdi), %r15
movq %r15, 0x38(%rdi)
movq %r15, 0x30(%rdi)
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x50(%rdi)
movl $0x3840, %edi           # imm = 0x3840
callq 0x4d060
movq %rax, (%r14)
movq %rax, %rcx
addq $0x3840, %rcx           # imm = 0x3840
movq %rcx, 0x10(%r14)
movq %rax, 0x8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r12
addq $0x48, %r14
movq %r14, %rdi
callq 0x4d320
movq %r15, %rdi
callq 0x4f760
movq %rbx, %rdi
callq 0x4ffe0
movq %r12, %rdi
callq 0x518c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/sleigh.cc
// Function: PcodeCacher::addLabelRef(VarnodeData*)
void PcodeCacher::addLabelRef (VarnodeData* ptr)

{ // Store off a reference to a label and the next instruction
    // address
    label_refs.push_back (RelativeRecord ());
    label_refs.back ().dataptr = ptr;
    label_refs.back ().calling_index = issued.size ();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
addq $0x30, %rdi
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
callq 0x518f0
movq 0x38(%r14), %rax
movq %rbx, 0x10(%rax)
movq 0x20(%r14), %rcx
subq 0x18(%r14), %rcx
sarq $0x5, %rcx
movq %rcx, 0x18(%rax)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/sleigh.cc
// Function: PcodeCacher::addLabel(unsigned int)
void PcodeCacher::addLabel (uint4 id)

{ // Attach a label to the address of the next instruction
    while (labels.size () <= id)
        labels.push_back (0xbadbeef);
    labels[id] = issued.size ();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x48(%rdi), %r14
movl %esi, %r12d
movq %rsp, %r15
movq 0x48(%rbx), %rax
movq 0x50(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r12, %rcx
ja 0x63310
movq $0xbadbeef, (%rsp)      # imm = 0xBADBEEF
movq %r14, %rdi
movq %r15, %rsi
callq 0x4f170
jmp 0x632e7
movq 0x20(%rbx), %rcx
subq 0x18(%rbx), %rcx
sarq $0x5, %rcx
movq %rcx, (%rax,%r12,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/sleigh.cc
// Function: PcodeCacher::clear()
void PcodeCacher::clear (void)

{
    curpool = poolstart;
    issued.clear ();
    label_refs.clear ();
    labels.clear ();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rcx
movq 0x18(%rdi), %rax
movq %rcx, 0x8(%rdi)
cmpq %rax, 0x20(%rdi)
je 0x63345
movq %rax, 0x20(%rbx)
leaq 0x30(%rbx), %rdi
callq 0x51020
movq 0x48(%rbx), %rax
cmpq %rax, 0x50(%rbx)
je 0x6335c
movq %rax, 0x50(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/sleigh.cc
// Function: PcodeCacher::resolveRelatives()
void PcodeCacher::resolveRelatives (void)

{ // Assuming all the PcodeData has been generated for an
    // instruction, go resolve any relative offsets and back
    // patch their value(s) into the PcodeData
    list<RelativeRecord>::const_iterator iter;
    for (iter = label_refs.begin (); iter != label_refs.end (); ++iter) {
        VarnodeData* ptr = (*iter).dataptr;
        uint4 id = ptr->offset;
        if ((id >= labels.size ()) || (labels[id] == 0xbadbeef))
            throw LowlevelError ("Reference to non-existant sleigh label");
        // Calculate the relative index given the two absolute indices
        uintb res = labels[id] - (*iter).calling_index;
        res &= calc_mask (ptr->size);
        ptr->offset = res;
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
leaq 0x30(%rdi), %rax
movq 0x48(%rdi), %rcx
movq 0x50(%rdi), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
pushq $0x8
popq %rsi
movq 0x4b84d(%rip), %rdi     # 0xaebd0
movq %rax, %r8
movq (%r8), %r8
cmpq %rax, %r8
je 0x633c5
movq 0x10(%r8), %r9
movl 0x8(%r9), %r10d
cmpq %rdx, %r10
jae 0x633ce
movq (%rcx,%r10,8), %r10
cmpq $0xbadbeef, %r10        # imm = 0xBADBEEF
je 0x633ce
subq 0x18(%r8), %r10
movl 0x10(%r9), %r11d
cmpl $0x8, %r11d
cmovgel %esi, %r11d
movslq %r11d, %r11
andq (%rdi,%r11,8), %r10
movq %r10, 0x8(%r9)
jmp 0x63386
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x4e180
movq %rax, %rbx
leaq 0x24005(%rip), %rsi     # 0x873e5
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 0x4ba98(%rip), %rsi     # 0xaeea0
movq 0x4b829(%rip), %rdx     # 0xaec38
movq %rbx, %rdi
callq 0x51630
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x4e020
testb %bpl, %bpl
jne 0x6342e
jmp 0x63436
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/sleigh.cc
// Function: PcodeCacher::emit(Address const&, PcodeEmit*) const
void PcodeCacher::emit (const Address& addr, PcodeEmit* emt) const
// Emit any cached pcode
{
    vector<PcodeData>::const_iterator iter;

    for (iter = issued.begin (); iter != issued.end (); ++iter)
        emt->dump (addr, (*iter).opc, (*iter).outvar, (*iter).invar,
                   (*iter).isize);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x18(%rdi), %r12
cmpq 0x20(%r15), %r12
je 0x6347e
movl (%r12), %edx
movq 0x8(%r12), %rcx
movq 0x10(%r12), %r8
movl 0x18(%r12), %r9d
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *0x10(%rax)
addq $0x20, %r12
jmp 0x63453
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/sleigh.cc
// Function: PcodeCacher::hutch_emitIR() const
vector<struct PcodeData> PcodeCacher::hutch_emitIR () const

{
    vector<PcodeData> result;
    struct PcodeData tmp;
    vector<PcodeData>::const_iterator iter;

    for (iter = issued.begin (); iter != issued.end (); ++iter) {
        tmp.outvar = (*iter).outvar;
        tmp.invar = (*iter).invar;
        tmp.isize = (*iter).isize;
        tmp.opc = (*iter).opc;

        result.push_back (tmp);
    }
    return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
andq $0x0, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq 0x18(%rsi), %r12
leaq 0x8(%rsp), %r15
cmpq 0x20(%r14), %r12
je 0x634e2
movups 0x8(%r12), %xmm0
movups %xmm0, 0x10(%rsp)
movl 0x18(%r12), %eax
movl %eax, 0x20(%rsp)
movl (%r12), %eax
movl %eax, 0x8(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x50620
addq $0x20, %r12
jmp 0x634af
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x4ffe0
movq %r14, %rdi
callq 0x518c0
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/sleigh.cc
// Function: SleighBuilder::generateLocation(VarnodeTpl const*, VarnodeData&)
void SleighBuilder::generateLocation (const VarnodeTpl* vntpl, VarnodeData& vn)

{ // Generate a concrete varnode -vn- from the template -vntpl-
    vn.space = vntpl->getSpace ().fixSpace (*walker);
    vn.size = vntpl->getSize ().fix (*walker);
    if (vn.space == const_space)
        vn.offset = vntpl->getOffset ().fix (*walker) & calc_mask (vn.size);
    else if (vn.space == uniq_space) {
        vn.offset = vntpl->getOffset ().fix (*walker);
        vn.offset |= uniqueoffset;
    } else
        vn.offset = vn.space->wrapOffset (vntpl->getOffset ().fix (*walker));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x10(%rdi), %rsi
movq %r15, %rdi
callq 0x4e940
movq %rax, (%rbx)
leaq 0x40(%r15), %rdi
movq 0x10(%r14), %rsi
callq 0x4ea00
movl %eax, 0x10(%rbx)
movq (%rbx), %r12
cmpq 0x18(%r14), %r12
je 0x63578
movq 0x20(%r14), %r13
addq $0x20, %r15
movq 0x10(%r14), %rsi
movq %r15, %rdi
callq 0x4ea00
cmpq %r13, %r12
je 0x635a8
movq 0x28(%r12), %rcx
cmpq %rax, %rcx
jae 0x635a2
incq %rcx
cqto
idivq %rcx
movq %rdx, %rax
sarq $0x3f, %rax
andq %rcx, %rax
addq %rdx, %rax
jmp 0x635a2
addq $0x20, %r15
movq 0x10(%r14), %rsi
movq %r15, %rdi
callq 0x4ea00
movl 0x10(%rbx), %ecx
cmpl $0x8, %ecx
pushq $0x8
popq %rdx
cmovll %ecx, %edx
movslq %edx, %rcx
movq 0x4b632(%rip), %rdx     # 0xaebd0
andq (%rdx,%rcx,8), %rax
movq %rax, 0x8(%rbx)
jmp 0x635b3
movq 0x30(%r14), %rcx
orq %rax, %rcx
movq %rcx, 0x8(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/sleigh.cc
// Function: SleighBuilder::generatePointer(VarnodeTpl const*, VarnodeData&)
AddrSpace* SleighBuilder::generatePointer (const VarnodeTpl* vntpl,
                                           VarnodeData& vn)

{ // Generate the pointer varnode -vn- from a dynamic template -vntpl-
    const FixedHandle& hand (
        walker->getFixedHandle (vntpl->getOffset ().getHandleIndex ()));
    vn.space = hand.offset_space;
    vn.size = hand.offset_size;
    if (vn.space == const_space)
        vn.offset = hand.offset_offset & calc_mask (vn.size);
    else if (vn.space == uniq_space)
        vn.offset = hand.offset_offset | uniqueoffset;
    else
        vn.offset = vn.space->wrapOffset (hand.offset_offset);
    return hand.space;
}

// Assembly:
movq %rdx, %rcx
movq 0x10(%rdi), %rax
movslq 0x28(%rsi), %rdx
movq 0x10(%rax), %rax
movq 0x40(%rax), %rax
movq (%rax,%rdx,8), %rsi
movq 0x18(%rsi), %rdx
movq %rdx, (%rcx)
movl 0x28(%rsi), %eax
movl %eax, 0x10(%rcx)
cmpq 0x18(%rdi), %rdx
je 0x63612
movq 0x20(%rsi), %rax
cmpq 0x20(%rdi), %rdx
je 0x6362f
movq 0x28(%rdx), %rdi
cmpq %rax, %rdi
jae 0x63633
incq %rdi
cqto
idivq %rdi
movq %rdx, %rax
sarq $0x3f, %rax
andq %rdi, %rax
addq %rdx, %rax
jmp 0x63633
cmpl $0x8, %eax
pushq $0x8
popq %rdx
cmovll %eax, %edx
movslq %edx, %rax
movq 0x4b5ab(%rip), %rdx     # 0xaebd0
movq (%rdx,%rax,8), %rax
andq 0x20(%rsi), %rax
jmp 0x63633
orq 0x30(%rdi), %rax
movq %rax, 0x8(%rcx)
movq 0x8(%rsi), %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/sleigh.cc
// Function: SleighBuilder::buildEmpty(Constructor*, int)
void SleighBuilder::buildEmpty (Constructor* ct, int4 secnum)
// Build a named p-code section of a constructor that contains only implied
// BUILD directives
{
    int4 numops = ct->getNumOperands ();

    for (int4 i = 0; i < numops; ++i) {
        SubtableSymbol* sym =
            (SubtableSymbol*)ct->getOperand (i)->getDefiningSymbol ();
        if (sym == (SubtableSymbol*)0)
            continue;
        if (sym->getType () != SleighSymbol::subtable_symbol)
            continue;

        walker->pushOperand (i);
        ConstructTpl* construct =
            walker->getConstructor ()->getNamedTempl (secnum);
        if (construct == (ConstructTpl*)0)
            buildEmpty (walker->getConstructor (), secnum);
        else
            build (construct, secnum);
        walker->popOperand ();
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movq 0x20(%rsi), %r13
subq 0x18(%rsi), %r13
shrq $0x3, %r13
xorl %r12d, %r12d
testl %r13d, %r13d
cmovlel %r12d, %r13d
cmpq %r12, %r13
je 0x638bb
movq 0x18(%r14), %rax
movq (%rax,%r12,8), %rax
movq 0x48(%rax), %rdi
testq %rdi, %rdi
je 0x638b6
movq (%rdi), %rax
callq *0x10(%rax)
cmpl $0xb, %eax
jne 0x638b6
movq 0x10(%r15), %rdi
movl %r12d, %esi
callq 0x4d570
movq 0x10(%r15), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdi
movl %ebx, %esi
callq 0x51920
testq %rax, %rax
je 0x6388e
movq %r15, %rdi
movq %rax, %rsi
movl %ebx, %edx
callq 0x4d920
jmp 0x638a3
movq 0x10(%r15), %rax
movq 0x10(%rax), %rax
movq (%rax), %rsi
movq %r15, %rdi
movl %ebx, %edx
callq 0x50e00
movq 0x10(%r15), %rax
movq 0x10(%rax), %rcx
movq 0x58(%rcx), %rcx
movq %rcx, 0x10(%rax)
decl 0x18(%rax)
incq %r12
jmp 0x6383b
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/sleigh.cc
// Function: SleighBuilder::appendBuild(OpTpl*, int)
void SleighBuilder::appendBuild (OpTpl* bld, int4 secnum)
// Append pcode for a particular build statement
{
    // Recover operand index from build statement
    int4 index = bld->getIn (0)->getOffset ().getReal ();
    // Check if operand is a subtable
    SubtableSymbol* sym = (SubtableSymbol*)walker->getConstructor ()
                              ->getOperand (index)
                              ->getDefiningSymbol ();
    if ((sym == (SubtableSymbol*)0) ||
        (sym->getType () != SleighSymbol::subtable_symbol))
        return;

    walker->pushOperand (index);
    Constructor* ct = walker->getConstructor ();
    if (secnum >= 0) {
        ConstructTpl* construct = ct->getNamedTempl (secnum);
        if (construct == (ConstructTpl*)0)
            buildEmpty (ct, secnum);
        else
            build (construct, secnum);
    } else {
        ConstructTpl* construct = ct->getTempl ();
        build (construct, -1);
    }
    walker->popOperand ();
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rsi), %rax
movq (%rax), %rax
movq 0x30(%rax), %r14
movq 0x10(%rdi), %rax
movq 0x10(%rax), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movslq %r14d, %rcx
movq (%rax,%rcx,8), %rax
movq 0x48(%rax), %rdi
testq %rdi, %rdi
je 0x639c2
movl %edx, %ebp
movq (%rdi), %rax
callq *0x10(%rax)
cmpl $0xb, %eax
jne 0x639c2
movq 0x10(%rbx), %rdi
movl %r14d, %esi
callq 0x4d570
movq 0x10(%rbx), %rax
movq 0x10(%rax), %rax
movq (%rax), %r14
testl %ebp, %ebp
js 0x63994
movq %r14, %rdi
movl %ebp, %esi
callq 0x51920
movq %rbx, %rdi
testq %rax, %rax
je 0x639a5
movq %rax, %rsi
movl %ebp, %edx
jmp 0x6399e
movq 0x60(%r14), %rsi
pushq $-0x1
popq %rdx
movq %rbx, %rdi
callq 0x4d920
jmp 0x639af
movq %r14, %rsi
movl %ebp, %edx
callq 0x50e00
movq 0x10(%rbx), %rax
movq 0x10(%rax), %rcx
movq 0x58(%rcx), %rcx
movq %rcx, 0x10(%rax)
decl 0x18(%rax)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/sleigh.cc
// Function: SleighBuilder::delaySlot(OpTpl*)
void SleighBuilder::delaySlot (OpTpl* op)

{ // Append pcode for an entire instruction (delay slot)
    // in the middle of the current instruction
    ParserWalker* tmp = walker;
    uintb olduniqueoffset = uniqueoffset;

    Address baseaddr = tmp->getAddr ();
    int4 fallOffset = tmp->getLength ();
    int4 delaySlotByteCnt = tmp->getParserContext ()->getDelaySlot ();
    int4 bytecount = 0;
    do {
        Address newaddr = baseaddr + fallOffset;
        setUniqueOffset (newaddr);
        const ParserContext* pos = discache->getParserContext (newaddr);
        if (pos->getParserState () != ParserContext::pcode)
            throw LowlevelError (
                "Could not obtain cached delay slot instruction");
        int4 len = pos->getLength ();

        ParserWalker newwalker (pos);
        walker = &newwalker;
        walker->baseState ();
        build (walker->getConstructor ()->getTempl (),
               -1); // Build the whole delay slot
        fallOffset += len;
        bytecount += len;
    } while (bytecount < delaySlotByteCnt);
    walker = tmp; // Restore original context
    uniqueoffset = olduniqueoffset;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
movq 0x10(%rdi), %rcx
movq 0x30(%rdi), %rax
movq %rax, 0x8(%rsp)
movq (%rcx), %rax
movq %rcx, 0x10(%rsp)
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
cmoveq %rax, %rcx
movq 0x50(%rcx), %rdx
leaq 0x28(%rsp), %rsi
movq %rdx, (%rsi)
movq 0x58(%rcx), %rcx
movq %rcx, 0x8(%rsi)
movq 0x98(%rax), %rcx
movl 0x60(%rcx), %ebp
movl 0xa4(%rax), %r13d
xorl %r14d, %r14d
leaq 0x18(%rsp), %r15
movq %r15, %rdi
leaq 0x28(%rsp), %rsi
movl %ebp, %edx
callq 0x4f560
movq 0x28(%rbx), %rax
movq 0x38(%rbx), %rdi
andq 0x20(%rsp), %rax
shlq $0x4, %rax
movq %rax, 0x30(%rbx)
movq %r15, %rsi
callq 0x4e5a0
cmpl $0x2, (%rax)
jne 0x63ac5
movq 0x98(%rax), %rcx
movl 0x60(%rcx), %r12d
movq %rax, 0x38(%rsp)
andq $0x0, 0x40(%rsp)
leaq 0x38(%rsp), %rax
movq %rax, 0x10(%rbx)
movq %rcx, 0x48(%rsp)
andq $0x0, 0x50(%rsp)
movq (%rcx), %rax
movq 0x60(%rax), %rsi
movq %rbx, %rdi
pushq $-0x1
popq %rdx
callq 0x4d920
addl %r12d, %ebp
addl %r12d, %r14d
cmpl %r13d, %r14d
jl 0x63a29
movq 0x10(%rsp), %rax
movq %rax, 0x10(%rbx)
movq 0x8(%rsp), %rax
movq %rax, 0x30(%rbx)
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x4e180
movq %rax, %rbx
leaq 0x23935(%rip), %rsi     # 0x8740c
leaq 0x38(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x515e0
movb $0x1, %bpl
leaq 0x38(%rsp), %rsi
movq %rbx, %rdi
callq 0x4ddf0
xorl %ebp, %ebp
movq 0x4b3a1(%rip), %rsi     # 0xaeea0
movq 0x4b132(%rip), %rdx     # 0xaec38
movq %rbx, %rdi
callq 0x51630
movq %rax, %r14
leaq 0x38(%rsp), %rdi
callq 0x4e020
testb %bpl, %bpl
jne 0x63b25
jmp 0x63b2d
movq %rax, %r14
movq %rbx, %rdi
callq 0x4ea60
movq %r14, %rdi
callq 0x518c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/sleigh.cc
// Function: DisassemblyCache::initialize(int, int)
void DisassemblyCache::initialize (int4 min, int4 hashsize)

{
    minimumreuse = min;
    mask = hashsize - 1;
    uintb masktest = coveringmask ((uintb)mask);
    if (masktest != (uintb)mask) // -hashsize- must be a power of 2
        throw LowlevelError ("Bad windowsize for disassembly cache");
    list = new ParserContext*[minimumreuse];
    nextfree = 0;
    hashtable = new ParserContext*[hashsize];
    for (int4 i = 0; i < minimumreuse; ++i) {
        ParserContext* pos = new ParserContext (contextcache);
        pos->initialize (75, 20, constspace);
        list[i] = pos;
    }
    // Make sure all hashtable positions point to a real ParserContext
    ParserContext* pos = list[0];
    for (int4 i = 0; i < hashsize; ++i)
        hashtable[i] = pos;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebx
movq %rdi, %r14
movl %esi, 0x10(%rdi)
leal -0x1(%rbx), %edi
movl %edi, 0x14(%r14)
callq 0x4db30
movl 0x14(%r14), %ecx
cmpq %rcx, %rax
jne 0x63e4c
movslq 0x10(%r14), %r12
leaq (,%r12,8), %rdi
testq %r12, %r12
pushq $-0x1
popq %r15
cmovsq %r15, %rdi
callq 0x4d060
movq %rax, 0x18(%r14)
andl $0x0, 0x20(%r14)
movl %ebx, %edi
shlq $0x3, %rdi
testl %ebx, %ebx
cmovsq %r15, %rdi
callq 0x4d060
movq %rax, 0x28(%r14)
xorl %r13d, %r13d
pushq $0x4b
popq %rbp
pushq $0x14
popq %r15
movslq %r12d, %rax
cmpq %rax, %r13
jge 0x63e1d
movl $0xa8, %edi
callq 0x4f5d0
movq %rax, %r12
movq (%r14), %rsi
movq %rax, %rdi
callq 0x50f50
movq 0x8(%r14), %rcx
movq %r12, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0x4f8d0
movq 0x18(%r14), %rax
movq %r12, (%rax,%r13,8)
incq %r13
movl 0x10(%r14), %r12d
jmp 0x63ddb
movq 0x18(%r14), %rax
movq (%rax), %rax
xorl %ecx, %ecx
testl %ebx, %ebx
cmovlel %ecx, %ebx
cmpq %rcx, %rbx
je 0x63e3d
movq 0x28(%r14), %rdx
movq %rax, (%rdx,%rcx,8)
incq %rcx
jmp 0x63e2b
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x4e180
movq %rax, %rbx
leaq 0x23638(%rip), %rsi     # 0x87496
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x515e0
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x4ddf0
xorl %ebp, %ebp
movq 0x4b01a(%rip), %rsi     # 0xaeea0
movq 0x4adab(%rip), %rdx     # 0xaec38
movq %rbx, %rdi
callq 0x51630
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x4e020
testb %bpl, %bpl
jne 0x63eac
jmp 0x63ec6
movq %rax, %r14
movq %rbx, %rdi
callq 0x4ea60
jmp 0x63ec6
movq %rax, %r14
movl $0xa8, %esi
movq %r12, %rdi
callq 0x4f670
movq %r14, %rdi
callq 0x518c0
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/sleigh.cc
// Function: DisassemblyCache::free()
void DisassemblyCache::free (void)

{
    for (int4 i = 0; i < minimumreuse; ++i)
        delete list[i];
    delete[] list;
    delete[] hashtable;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r15d, %r15d
movslq 0x10(%rbx), %rax
movq 0x18(%rbx), %rdi
cmpq %rax, %r15
jge 0x63f09
movq (%rdi,%r15,8), %r14
testq %r14, %r14
je 0x63ef7
movq %r14, %rdi
callq 0x50140
movl $0xa8, %esi
movq %r14, %rdi
callq 0x4f670
incq %r15
jmp 0x63ed9
testq %rdi, %rdi
je 0x63f13
callq 0x50170
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x63f26
popq %rbx
popq %r14
popq %r15
jmp 0x50170
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/sleigh.cc
// Function: Sleigh::Sleigh(LoadImage*, ContextDatabase*)
Sleigh::Sleigh (LoadImage* ld, ContextDatabase* c_db) : SleighBase ()

{
    loader = ld;
    context_db = c_db;
    cache = new ContextCache (c_db);
    discache = (DisassemblyCache*)0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
callq 0x4f300
movq 0x4aca5(%rip), %rax     # 0xaec00
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x200(%rbx), %r14
movq %r14, %rdi
callq 0x50540
movq %r12, 0x1e0(%rbx)
movq %r15, 0x1e8(%rbx)
pushq $0x30
popq %rdi
callq 0x4f5d0
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
callq 0x4ee90
movq %r12, 0x1f0(%rbx)
andq $0x0, 0x1f8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r15
pushq $0x30
popq %rsi
movq %r12, %rdi
callq 0x4f670
jmp 0x63fc3
movq %rax, %r15
movq %r14, %rdi
callq 0x51480
jmp 0x63fd0
movq %rax, %r15
movq %rbx, %rdi
callq 0x50e10
movq %r15, %rdi
callq 0x518c0
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/sleigh.cc
// Function: Sleigh::reset(LoadImage*, ContextDatabase*)
void Sleigh::reset (LoadImage* ld, ContextDatabase* c_db)

{ // Completely clear everything except the base and reconstruct
    // with a new loader and context
    clearForDelete ();
    pcode_cache.clear ();
    loader = ld;
    context_db = c_db;
    cache = new ContextCache (c_db);
    discache = (DisassemblyCache*)0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
callq 0x51080
leaq 0x200(%rbx), %rdi
callq 0x4d100
movq %r14, 0x1e0(%rbx)
movq %r15, 0x1e8(%rbx)
pushq $0x30
popq %rdi
callq 0x4f5d0
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0x4ee90
movq %r14, 0x1f0(%rbx)
andq $0x0, 0x1f8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
pushq $0x30
popq %rsi
movq %r14, %rdi
callq 0x4f670
movq %rbx, %rdi
callq 0x518c0
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/sleigh.cc
// Function: Sleigh::initialize(DocumentStorage&)
void Sleigh::initialize (DocumentStorage& store)

{
    if (!isInitialized ()) { // Initialize the base if not already
        const Element* el = store.getTag ("sleigh");
        if (el == (const Element*)0)
            throw LowlevelError ("Could not find sleigh tag");
        restoreXml (el);
    } else
        reregisterContext ();
    uint4 parser_cachesize = 2;
    uint4 parser_windowsize = 32;
    if ((maxdelayslotbytes > 1) || (unique_allocatemask != 0)) {
        parser_cachesize = 8;
        parser_windowsize = 256;
    }
    discache = new DisassemblyCache (cache, getConstantSpace (),
                                     parser_cachesize, parser_windowsize);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
cmpq $0x0, 0x190(%rdi)
je 0x640e9
movq %rbx, %rdi
callq 0x4dc60
jmp 0x6412c
movq %rsi, %r14
leaq 0x234cd(%rip), %rsi     # 0x875c0
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x515e0
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x4e9b0
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x4e020
testq %r14, %r14
je 0x64190
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4f9c0
cmpl $0x2, 0x1d0(%rbx)
setb %al
cmpl $0x0, 0x1d4(%rbx)
sete %cl
testb %cl, %al
pushq $0x2
popq %rax
pushq $0x8
popq %rbp
cmovnel %eax, %ebp
pushq $0x20
popq %rax
movl $0x100, %r14d           # imm = 0x100
cmovnel %eax, %r14d
pushq $0x30
popq %rdi
callq 0x4f5d0
movq %rax, %r15
movq 0x98(%rbx), %rdx
movq 0x1f0(%rbx), %rsi
movq %rax, %rdi
movl %ebp, %ecx
movl %r14d, %r8d
callq 0x4e5b0
movq %r15, 0x1f8(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x4e180
movq %rax, %rbx
leaq 0x23319(%rip), %rsi     # 0x874bb
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x515e0
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x4ddf0
xorl %ebp, %ebp
movq 0x4acd6(%rip), %rsi     # 0xaeea0
movq 0x4aa67(%rip), %rdx     # 0xaec38
movq %rbx, %rdi
callq 0x51630
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x4e020
testb %bpl, %bpl
jne 0x641f0
jmp 0x6421c
movq %rax, %r14
movq %rbx, %rdi
callq 0x4ea60
jmp 0x6421c
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x4e020
jmp 0x6421c
movq %rax, %r14
jmp 0x6421c
movq %rax, %r14
pushq $0x30
popq %rsi
movq %r15, %rdi
callq 0x4f670
movq %r14, %rdi
callq 0x518c0
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/sleigh.cc
// Function: Sleigh::obtainContext(Address const&, int) const
ParserContext* Sleigh::obtainContext (const Address& addr, int4 state) const
// Obtain a ParserContext for the instruction at the given -addr-. This may be
// cached.
{
    // Make sure parsing has proceeded to at least the given -state.
    ParserContext* pos = discache->getParserContext (addr);
    int4 curstate = pos->getParserState ();
    if (curstate >= state)
        return pos;
    if (curstate == ParserContext::uninitialized) {
        resolve (*pos);
        if (state == ParserContext::disassembly)
            return pos;
    }
    // If we reach here,  state must be ParserContext::pcode
    resolveHandles (*pos);
    return pos;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rdi, %r14
movq 0x1f8(%rdi), %rdi
callq 0x4e5a0
movq %rax, %rbx
movl (%rax), %eax
cmpl %ebp, %eax
jge 0x6425e
testl %eax, %eax
jne 0x64256
movq %r14, %rdi
movq %rbx, %rsi
callq 0x50510
cmpl $0x1, %ebp
je 0x6425e
movq %rbx, %rsi
callq 0x4e4e0
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/sleigh.cc
// Function: Sleigh::getInstructionBytes(Address const&, unsigned char*) const
void Sleigh::getInstructionBytes (const Address& baseaddr, uint1* buf) const

{
    ParserContext* pos = obtainContext (baseaddr, ParserContext::disassembly);
    ParserWalker walker(pos);
    walker.baseState();

    auto len = pos->getLength();

    uintm tmp;
    int4 bytestart = 0;
    do {
        tmp = walker.getInstructionBytes(bytestart,sizeof(uint1));
        memcpy(&buf[bytestart], (uint1*)&tmp, sizeof(uint1));
    } while (bytestart += 1, bytestart != len);

    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movq %rdx, %rbx
pushq $0x1
popq %rbp
movl %ebp, %edx
callq 0x4e680
movq %rsp, %r14
movq %rax, (%r14)
andq $0x0, 0x8(%r14)
movq 0x98(%rax), %rax
movq %rax, 0x10(%r14)
andq $0x0, 0x18(%r14)
movl 0x60(%rax), %r12d
xorl %r15d, %r15d
movq %r14, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x4ee00
movb %al, (%rbx,%r15)
incq %r15
cmpq %r15, %r12
jne 0x64622
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/sleigh.cc
// Function: Sleigh::printAssembly(AssemblyEmit&, Address const&) const
int4 Sleigh::printAssembly (AssemblyEmit& emit, const Address& baseaddr) const

{
    int4 sz;

    ParserContext* pos = obtainContext (baseaddr, ParserContext::disassembly);
    ParserWalker walker (pos);
    walker.baseState ();

    Constructor* ct = walker.getConstructor ();
    ostringstream mons;
    ct->printMnemonic (mons, walker);
    ostringstream body;
    ct->printBody (body, walker);
    emit.dump (baseaddr, mons.str (), body.str ());
    sz = pos->getLength ();
    return sz;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3d8, %rsp            # imm = 0x3D8
movq %rdx, %r14
movq %rsi, %r15
pushq $0x1
popq %rdx
movq %r14, %rsi
callq 0x4e680
movq %rax, %rbx
leaq 0x1c0(%rsp), %r13
movq %rax, (%r13)
andq $0x0, 0x8(%r13)
movq 0x98(%rax), %rax
movq %rax, 0x10(%r13)
andq $0x0, 0x18(%r13)
movq (%rax), %r12
leaq 0x260(%rsp), %rbp
movq %rbp, %rdi
callq 0x504a0
movq %r12, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x4e380
leaq 0x48(%rsp), %rdi
callq 0x504a0
leaq 0x48(%rsp), %rsi
leaq 0x1c0(%rsp), %rdx
movq %r12, %rdi
callq 0x4ffd0
leaq 0x268(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x50fb0
leaq 0x50(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x50fb0
movq (%r15), %rax
leaq 0x28(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %r15, %rdi
movq %r14, %rsi
callq *0x10(%rax)
leaq 0x8(%rsp), %rdi
callq 0x4e020
leaq 0x28(%rsp), %rdi
callq 0x4e020
movq 0x98(%rbx), %rax
movl 0x60(%rax), %ebx
leaq 0x48(%rsp), %rdi
callq 0x4d7c0
leaq 0x260(%rsp), %rdi
callq 0x4d7c0
movl %ebx, %eax
addq $0x3d8, %rsp            # imm = 0x3D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4e020
jmp 0x64764
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x4e020
jmp 0x64775
jmp 0x64772
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x4d7c0
jmp 0x64786
jmp 0x64783
movq %rax, %rbx
leaq 0x260(%rsp), %rdi
callq 0x4d7c0
movq %rbx, %rdi
callq 0x518c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/include/sleigh.hh
// Function: PcodeCacher::allocateInstruction()
PcodeData *allocateInstruction(void)
    {
        issued.push_back(PcodeData());
        PcodeData *res = &issued.back();
        res->outvar = (VarnodeData *)0;
        res->invar = (VarnodeData *)0;
        return res;
    }

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
addq $0x18, %rdi
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
callq 0x51ff0
movq 0x20(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, -0x18(%rax)
addq $-0x20, %rax
addq $0x20, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/include/context.hh
// Function: ParserContext::allocateOperand(int, ParserWalkerChange&)
inline void ParserContext::allocateOperand(int4 i,ParserWalkerChange &walker) {
  ConstructState *opstate = &state[alloc++];
  opstate->parent = walker.point;
  opstate->ct = (Constructor *)0;
  walker.point->resolve[i] = opstate;
  walker.breadcrumb[walker.depth++] += 1;
  walker.point = opstate;
  walker.breadcrumb[walker.depth] = 0;
}

// Assembly:
movslq 0xa0(%rdi), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0xa0(%rdi)
movq 0x80(%rdi), %rcx
imulq $0x68, %rax, %rax
movq 0x10(%rdx), %rdi
movq %rdi, 0x58(%rcx,%rax)
andq $0x0, (%rcx,%rax)
addq %rcx, %rax
movslq %esi, %rcx
movq 0x40(%rdi), %rsi
movq %rax, (%rsi,%rcx,8)
movslq 0x18(%rdx), %rcx
leal 0x1(%rcx), %esi
movl %esi, 0x18(%rdx)
incl 0x1c(%rdx,%rcx,4)
movq %rax, 0x10(%rdx)
movslq 0x18(%rdx), %rax
andl $0x0, 0x1c(%rdx,%rax,4)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/include/sleigh.hh
// Function: PcodeData::store(VarnodeData*, VarnodeData*)
void store (VarnodeData* outv, VarnodeData* inv)
    {
        if (outv != nullptr) {
            this->outvar = new VarnodeData;
            *this->outvar = *outv;
        }
        invar = new VarnodeData[isize];
        for (auto i = 0; i != isize; ++i)
            this->invar[i] = inv[i];
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
pushq $0x18
popq %r12
testq %rsi, %rsi
je 0x64f2f
movq %rsi, %r15
pushq $0x18
popq %rdi
callq 0x4f5d0
movq %rax, 0x8(%r14)
movups (%r15), %xmm0
movups %xmm0, (%rax)
movq 0x10(%r15), %rcx
movq %rcx, 0x10(%rax)
movslq 0x18(%r14), %r15
movq %r15, %rax
mulq %r12
pushq $-0x1
popq %rdi
cmovnoq %rax, %rdi
callq 0x4d060
movq %rax, 0x10(%r14)
xorl %eax, %eax
xorl %ecx, %ecx
movl %r15d, %edx
cmpq %rdx, %rcx
je 0x64f78
movq 0x10(%r14), %rdx
movq 0x10(%rbx,%rax), %rsi
movq %rsi, 0x10(%rdx,%rax)
movups (%rbx,%rax), %xmm0
movups %xmm0, (%rdx,%rax)
incq %rcx
movl 0x18(%r14), %r15d
addq $0x18, %rax
jmp 0x64f4d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/sleighbase.cc
// Function: SleighBase::SleighBase()
SleighBase::SleighBase(void)

{
  root = (SubtableSymbol *)0;
  maxdelayslotbytes = 0;
  unique_allocatemask = 0;
  numSections = 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x506b0
movq 0x496f4(%rip), %rax     # 0xaeb40
addq $0x10, %rax
movq %rax, (%rbx)
xorps %xmm0, %xmm0
andq $0x0, 0x158(%rbx)
movups %xmm0, 0x148(%rbx)
andl $0x0, 0x168(%rbx)
andq $0x0, 0x170(%rbx)
leaq 0x168(%rbx), %rax
movq %rax, 0x178(%rbx)
movq %rax, 0x180(%rbx)
movups %xmm0, 0x188(%rbx)
movups %xmm0, 0x198(%rbx)
movups %xmm0, 0x1a8(%rbx)
movups %xmm0, 0x1b8(%rbx)
movups %xmm0, 0x1c8(%rbx)
andl $0x0, 0x1d8(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/sleighbase.cc
// Function: SleighBase::reregisterContext()
void SleighBase::reregisterContext(void)

{
  SymbolScope *glb = symtab.getGlobalScope();
  SymbolTree::const_iterator iter;
  SleighSymbol *sym;
  for(iter=glb->begin();iter!=glb->end();++iter) {
    sym = *iter;
    if (sym->getType() == SleighSymbol::context_symbol) {
      ContextSymbol *csym = (ContextSymbol *)sym;
      ContextField *field = (ContextField *)csym->getPatternValue();
      int4 startbit = field->getStartBit();
      int4 endbit = field->getEndBit();
      registerContext(csym->getName(),startbit,endbit);
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x1b0(%rdi), %rax
movq (%rax), %r12
movq 0x20(%r12), %r14
addq $0x10, %r12
cmpq %r12, %r14
je 0x65785
movq 0x20(%r14), %r15
movq (%r15), %rax
movq %r15, %rdi
callq *0x10(%rax)
cmpl $0xf, %eax
jne 0x65778
movq (%r15), %rax
movq %r15, %rdi
callq *0x60(%rax)
movl 0xc(%rax), %edx
movl 0x10(%rax), %ecx
addq $0x8, %r15
movq (%rbx), %rax
movq %rbx, %rdi
movq %r15, %rsi
callq *0x18(%rax)
movq %r14, %rdi
callq 0x4fb80
movq %rax, %r14
jmp 0x65742
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/sleighbase.cc
// Function: SleighBase::getRegister(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
const VarnodeData &SleighBase::getRegister(const string &nm) const

{
  VarnodeSymbol *sym = (VarnodeSymbol *)findSymbol(nm);
  if (sym == (VarnodeSymbol *)0)
    throw SleighError("Unknown register name: "+nm);
  if (sym->getType() != SleighSymbol::varnode_symbol)
    throw SleighError("Symbol is not a register: "+nm);
  return sym->getFixedVarnode();
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
addq $0x198, %rdi            # imm = 0x198
callq 0x51b20
testq %rax, %rax
je 0x6583f
movq %rax, %rbx
movq (%rax), %rax
movq %rbx, %rdi
callq *0x10(%rax)
cmpl $0x6, %eax
jne 0x65884
addq $0x38, %rbx
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x4e180
movq %rax, %rbx
leaq 0x21d3b(%rip), %rsi     # 0x8758c
movq %rsp, %rdi
movq %r14, %rdx
callq 0x4f1c0
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x4ddf0
xorl %ebp, %ebp
movq 0x49615(%rip), %rsi     # 0xaee88
movq 0x493be(%rip), %rdx     # 0xaec38
movq %rbx, %rdi
callq 0x51630
jmp 0x658c7
pushq $0x20
popq %rdi
callq 0x4e180
movq %rax, %rbx
leaq 0x21d0e(%rip), %rsi     # 0x875a4
movq %rsp, %rdi
movq %r14, %rdx
callq 0x4f1c0
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x4ddf0
xorl %ebp, %ebp
movq 0x495d0(%rip), %rsi     # 0xaee88
movq 0x49379(%rip), %rdx     # 0xaec38
movq %rbx, %rdi
callq 0x51630
jmp 0x658cb
jmp 0x658dd
movq %rax, %r14
movq %rsp, %rdi
callq 0x4e020
testb %bpl, %bpl
jne 0x658e0
jmp 0x658e8
movq %rax, %r14
movq %rbx, %rdi
callq 0x4ea60
movq %r14, %rdi
callq 0x518c0