LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/memstate.cc
// Function: MemoryPageOverlay::setPage(unsigned long, unsigned char const*, int, int)
void MemoryPageOverlay::setPage(uintb addr,const uint1 *val,int4 skip,int4 size)

{
  map<uintb,uint1 *>::iterator iter;
  uint1 *pageptr;

  iter = page.find(addr);
  if (iter == page.end()) {
    pageptr = new uint1[getPageSize()];
    page[addr] = pageptr;
    if (size != getPageSize()) {
      if (underlie == (MemoryBank *)0) {
	for(int4 i=0;i<getPageSize();++i)
	  pageptr[i] = 0;
      }
      else
	underlie->getPage(addr,pageptr,0,getPageSize());
    }
  }
  else
    pageptr = (*iter).second;

  memcpy(pageptr+skip,val,size);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movl %ecx, %r14d
movq %rdx, %rbx
movq %rdi, %r15
movq %rsi, (%rsp)
movq 0x30(%rdi), %rdx
leaq 0x28(%rdi), %rax
movq %rax, %rcx
testq %rdx, %rdx
je 0x7386c
movq %rax, %rcx
xorl %edi, %edi
cmpq %rsi, 0x20(%rdx)
setb %dil
cmovaeq %rdx, %rcx
movq 0x10(%rdx,%rdi,8), %rdx
testq %rdx, %rdx
jne 0x73854
movq %rax, %rdx
cmpq %rax, %rcx
je 0x7387f
cmpq %rsi, 0x20(%rcx)
cmovaq %rax, %rcx
movq %rcx, %rdx
cmpq %rax, %rdx
je 0x7388a
movq 0x28(%rdx), %r12
jmp 0x738dd
leaq 0x20(%r15), %r13
movslq 0xc(%r15), %rdi
callq 0x3f060
movq %rax, %r12
movq %rsp, %rsi
movq %r13, %rdi
callq 0x403b0
movq %r12, (%rax)
movl 0xc(%r15), %r8d
cmpl %ebp, %r8d
je 0x738dd
movq 0x18(%r15), %rdi
testq %rdi, %rdi
je 0x738cb
movq (%rsp), %rsi
movq (%rdi), %rax
movq %r12, %rdx
xorl %ecx, %ecx
callq *0x10(%rax)
jmp 0x738dd
testl %r8d, %r8d
jle 0x738dd
movq %r12, %rdi
xorl %esi, %esi
movq %r8, %rdx
callq 0x3fca0
movslq %r14d, %rdi
addq %r12, %rdi
movslq %ebp, %rdx
movq %rbx, %rsi
callq 0x40370
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/memstate.cc
// Function: MemoryHashOverlay::MemoryHashOverlay(AddrSpace*, int, int, int, MemoryBank*)
MemoryHashOverlay::MemoryHashOverlay(AddrSpace *spc,int4 ws,int4 ps,int4 hashsize,MemoryBank *ul)
  : MemoryBank(spc,ws,ps), address(hashsize,0xBADBEEF), value(hashsize,0)
{
  underlie = ul;
  collideskip = 1023;

  uint4 tmp = ws - 1;
  alignshift = 0;
  while(tmp != 0) {
    alignshift += 1;
    tmp >>= 1;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r14
movl %edx, %ebp
movq %rdi, %rbx
movq %rsi, 0x10(%rdi)
movl %edx, 0x8(%rdi)
movl %ecx, 0xc(%rdi)
movq 0x2f451(%rip), %rax     # 0xa2f80
addq $0x10, %rax
movq %rax, (%rdi)
leaq 0x30(%rdi), %r15
movslq %r8d, %r12
leaq 0x10(%rsp), %r13
movq $0xbadbeef, (%r13)      # imm = 0xBADBEEF
leaq 0xf(%rsp), %rcx
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x3f4a0
leaq 0x48(%rbx), %rdi
movq $0x0, (%r13)
leaq 0x10(%rsp), %rdx
leaq 0xf(%rsp), %rcx
movq %r12, %rsi
callq 0x3f4a0
movq %r14, 0x18(%rbx)
movq $0x3ff, 0x28(%rbx)      # imm = 0x3FF
decl %ebp
bsrl %ebp, %eax
xorl $-0x20, %eax
addl $0x21, %eax
testl %ebp, %ebp
cmovel %ebp, %eax
movl %eax, 0x20(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%r15), %rdi
testq %rdi, %rdi
je 0x73bc0
movq 0x40(%rbx), %rsi
subq %rdi, %rsi
callq 0x40870
movq %r14, %rdi
callq 0x41f00
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/memstate.cc
// Function: MemoryState::setMemoryBank(MemoryBank*)
void MemoryState::setMemoryBank(MemoryBank *bank)

{
  AddrSpace *spc = bank->getSpace();
  int4 index = spc->getIndex();

  while(index >= memspace.size())
    memspace.push_back((MemoryBank *)0);

  memspace[index] = bank;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq 0x10(%rsi), %rax
movslq 0x60(%rax), %r13
movq 0x8(%rdi), %rax
movq 0x10(%rdi), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r13, %rcx
ja 0x73c28
movq %rdi, %r14
leaq 0x8(%rdi), %r15
leaq 0x8(%rsp), %r12
movq $0x0, 0x8(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x404e0
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r13, %rcx
jbe 0x73c00
movq %rbx, (%rax,%r13,8)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/memstate.cc
// Function: MemoryState::setValue(AddrSpace*, unsigned long, int, unsigned long)
void MemoryState::setValue(AddrSpace *spc,uintb off,int4 size,uintb cval)

{
  MemoryBank *mspace = getMemoryBank(spc);
  if (mspace == (MemoryBank *)0)
    throw LowlevelError("Setting value for unmapped memory space: "+spc->getName());
  mspace->setValue(off,size,cval);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movslq 0x60(%rsi), %rax
movq 0x8(%rdi), %rsi
movq 0x10(%rdi), %rdi
subq %rsi, %rdi
sarq $0x3, %rdi
cmpq %rax, %rdi
jbe 0x73c83
movq (%rsi,%rax,8), %rdi
jmp 0x73c85
xorl %edi, %edi
testq %rdi, %rdi
je 0x73c9f
movq %rdx, %rsi
movl %ecx, %edx
movq %r8, %rcx
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x40890
movl $0x20, %edi
callq 0x3fb00
movq %rax, %rbx
addq $0x38, %r14
leaq 0xdecc(%rip), %rsi      # 0x81b83
movq %rsp, %rdi
movq %r14, %rdx
callq 0x40500
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x3f890
xorl %ebp, %ebp
movq 0x2f1cf(%rip), %rsi     # 0xa2ea8
movq 0x2ef58(%rip), %rdx     # 0xa2c38
movq %rbx, %rdi
callq 0x41d60
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x73d0e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x40870
jmp 0x73d0e
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x73d1b
movq %rbx, %rdi
callq 0x40080
movq %r14, %rdi
callq 0x41f00
nop
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/memstate.cc
// Function: MemoryState::getValue(AddrSpace*, unsigned long, int) const
uintb MemoryState::getValue(AddrSpace *spc,uintb off,int4 size) const

{
  if (spc->getType() == IPTR_CONSTANT) return off;
  MemoryBank *mspace = getMemoryBank(spc);
  if (mspace == (MemoryBank *)0)
    throw LowlevelError("Getting value from unmapped memory space: "+spc->getName());
  return mspace->getValue(off,size);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
cmpl $0x0, 0x8(%rsi)
je 0x73d53
movq %rsi, %r14
movslq 0x60(%rsi), %rax
movq 0x8(%rdi), %rsi
movq 0x10(%rdi), %rdi
subq %rsi, %rdi
sarq $0x3, %rdi
cmpq %rax, %rdi
jbe 0x73d5f
movq (%rsi,%rax,8), %rdi
jmp 0x73d61
movq %rdx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
xorl %edi, %edi
testq %rdi, %rdi
je 0x73d78
movq %rdx, %rsi
movl %ecx, %edx
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x41770
movl $0x20, %edi
callq 0x3fb00
movq %rax, %rbx
addq $0x38, %r14
leaq 0xde1d(%rip), %rsi      # 0x81bad
movq %rsp, %rdi
movq %r14, %rdx
callq 0x40500
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x3f890
xorl %ebp, %ebp
movq 0x2f0f6(%rip), %rsi     # 0xa2ea8
movq 0x2ee7f(%rip), %rdx     # 0xa2c38
movq %rbx, %rdi
callq 0x41d60
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x73de7
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x40870
jmp 0x73de7
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x73df4
movq %rbx, %rdi
callq 0x40080
movq %r14, %rdi
callq 0x41f00
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/memstate.cc
// Function: MemoryState::getChunk(unsigned char*, AddrSpace*, unsigned long, int) const
void MemoryState::getChunk(uint1 *res,AddrSpace *spc,uintb off,int4 size) const

{
  MemoryBank *mspace = getMemoryBank(spc);
  if (mspace == (MemoryBank *)0)
    throw LowlevelError("Getting chunk from unmapped memory space: "+spc->getName());
  mspace->getChunk(off,size,res);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rsi, %rax
movslq 0x60(%rdx), %rdx
movq 0x8(%rdi), %rsi
movq 0x10(%rdi), %rdi
subq %rsi, %rdi
sarq $0x3, %rdi
cmpq %rdx, %rdi
jbe 0x73e78
movq (%rsi,%rdx,8), %rdi
jmp 0x73e7a
xorl %edi, %edi
testq %rdi, %rdi
je 0x73e95
movq %rcx, %rsi
movl %r8d, %edx
movq %rax, %rcx
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x40790
movl $0x20, %edi
callq 0x3fb00
movq %rax, %rbx
addq $0x38, %r14
leaq 0xdd2b(%rip), %rsi      # 0x81bd8
movq %rsp, %rdi
movq %r14, %rdx
callq 0x40500
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x3f890
xorl %ebp, %ebp
movq 0x2efd9(%rip), %rsi     # 0xa2ea8
movq 0x2ed62(%rip), %rdx     # 0xa2c38
movq %rbx, %rdi
callq 0x41d60
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x73f04
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x40870
jmp 0x73f04
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x73f11
movq %rbx, %rdi
callq 0x40080
movq %r14, %rdi
callq 0x41f00
nop
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/memstate.cc
// Function: MemoryState::setChunk(unsigned char const*, AddrSpace*, unsigned long, int)
void MemoryState::setChunk(const uint1 *val,AddrSpace *spc,uintb off,int4 size)

{
  MemoryBank *mspace = getMemoryBank(spc);
  if (mspace == (MemoryBank *)0)
    throw LowlevelError("Setting chunk of unmapped memory space: "+spc->getName());
  mspace->setChunk(off,size,val);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rsi, %rax
movslq 0x60(%rdx), %rdx
movq 0x8(%rdi), %rsi
movq 0x10(%rdi), %rdi
subq %rsi, %rdi
sarq $0x3, %rdi
cmpq %rdx, %rdi
jbe 0x73f46
movq (%rsi,%rdx,8), %rdi
jmp 0x73f48
xorl %edi, %edi
testq %rdi, %rdi
je 0x73f63
movq %rcx, %rsi
movl %r8d, %edx
movq %rax, %rcx
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x40e70
movl $0x20, %edi
callq 0x3fb00
movq %rax, %rbx
addq $0x38, %r14
leaq 0xdc88(%rip), %rsi      # 0x81c03
movq %rsp, %rdi
movq %r14, %rdx
callq 0x40500
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x3f890
xorl %ebp, %ebp
movq 0x2ef0b(%rip), %rsi     # 0xa2ea8
movq 0x2ec94(%rip), %rdx     # 0xa2c38
movq %rbx, %rdi
callq 0x41d60
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x73fd2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x40870
jmp 0x73fd2
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x73fdf
movq %rbx, %rdi
callq 0x40080
movq %r14, %rdi
callq 0x41f00
nop
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/opbehavior.cc
// Function: OpBehaviorIntSless::evaluateBinary(int, int, unsigned long, unsigned long) const
uintb OpBehaviorIntSless::evaluateBinary(int4 sizeout,int4 sizein,uintb in1,uintb in2) const

{
  uintb res,mask,bit1,bit2;

  if (sizein<=0)
    res = 0;
  else {
    mask = 0x80;
    mask <<= 8*(sizein-1);
    bit1 = in1 & mask;		// Get the sign bits
    bit2 = in2 & mask;
    if (bit1 != bit2)
      res = (bit1 != 0) ? 1 : 0;
    else
      res = (in1 < in2) ? 1 : 0;
  }
  return res;
}

// Assembly:
testl %edx, %edx
jle 0x75559
movq %rcx, %rax
shll $0x3, %edx
addb $-0x8, %dl
movl $0x80, %esi
movl %edx, %ecx
shlq %cl, %rsi
movq %rsi, %rcx
andq %rax, %rcx
andq %r8, %rsi
cmpq %rsi, %rcx
jne 0x7555d
cmpq %r8, %rax
setb %al
jmp 0x75563
xorl %eax, %eax
jmp 0x75563
testq %rcx, %rcx
setne %al
movzbl %al, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/opbehavior.cc
// Function: OpBehaviorIntSext::recoverInputUnary(int, unsigned long, int) const
uintb OpBehaviorIntSdiv::evaluateBinary(int4 sizeout,int4 sizein,uintb in1,uintb in2) const

{
  if (in2 == 0)
    throw EvaluationError("Divide by 0");
  intb num = in1;		// Convert to signed
  intb denom = in2;
  sign_extend(num,8*sizein-1);
  sign_extend(denom,8*sizein-1);
  intb sres = num/denom;	// Do the signed division
  zero_extend(sres,8*sizeout-1); // Cut to appropriate size
  return (uintb)sres;		// Recast as unsigned
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
cmpl $0x8, %ecx
movl $0x8, %edi
cmovgel %edi, %ecx
movslq %ecx, %rax
movq 0x2d521(%rip), %rcx     # 0xa2bd0
movq (%rcx,%rax,8), %rax
movq %rax, %r8
shrq %r8
xorq %rax, %r8
testq %rdx, %r8
je 0x75734
cmpl $0x8, %esi
cmovll %esi, %edi
movslq %edi, %rsi
movq (%rcx,%rsi,8), %rcx
xorq %rax, %rcx
movq %rdx, %rsi
notq %rsi
testq %rsi, %rcx
je 0x7573f
movl $0x20, %edi
callq 0x3fb00
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xc641(%rip), %rsi      # 0x81d3a
leaq 0xc662(%rip), %rdx      # 0x81d62
leaq 0x8(%rsp), %rdi
callq 0x3f8a0
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x3f890
xorl %ebp, %ebp
movq 0x2d705(%rip), %rsi     # 0xa2e28
movq 0x2d50e(%rip), %rdx     # 0xa2c38
movq %rbx, %rdi
callq 0x41d60
jmp 0x757a3
movq %rax, %rcx
notq %rcx
testq %rcx, %rdx
jne 0x7574d
andq %rdx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x3fb00
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xc5d0(%rip), %rsi      # 0x81d3a
leaq 0xc5f1(%rip), %rdx      # 0x81d62
leaq 0x8(%rsp), %rdi
callq 0x3f8a0
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x3f890
xorl %ebp, %ebp
movq 0x2d694(%rip), %rsi     # 0xa2e28
movq 0x2d49d(%rip), %rdx     # 0xa2c38
movq %rbx, %rdi
callq 0x41d60
jmp 0x757a7
jmp 0x757c3
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x757c9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x40870
jmp 0x757c9
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x757d6
movq %rbx, %rdi
callq 0x40080
movq %r14, %rdi
callq 0x41f00
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/opbehavior.cc
// Function: OpBehaviorIntSub::recoverInputBinary(int, int, unsigned long, int, unsigned long) const
uintb OpBehaviorIntSub::recoverInputBinary(int4 slot,int4 sizeout,uintb out,int4 sizein,uintb in) const

{
  uintb res;
  if (slot==0)
    res = in + out;
  else
    res = in - out;
  res &= calc_mask(sizeout);
  return res;
}

// Assembly:
movq %rcx, %rax
negq %rax
testl %esi, %esi
cmoveq %rcx, %rax
addq %r9, %rax
cmpl $0x8, %edx
movl $0x8, %ecx
cmovll %edx, %ecx
movslq %ecx, %rcx
movq 0x2d370(%rip), %rdx     # 0xa2bd0
andq (%rdx,%rcx,8), %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/opbehavior.cc
// Function: OpBehaviorIntLeft::recoverInputBinary(int, int, unsigned long, int, unsigned long) const
uintb OpBehaviorIntLeft::recoverInputBinary(int4 slot,int4 sizeout,uintb out,int4 sizein,uintb in) const

{
  if (slot!=0)
    return OpBehavior::recoverInputBinary(slot,sizeout,out,sizein,in);
  
  int4 sa = in;
  if (((out<<(8*sizeout-sa))&calc_mask(sizeout))!=0)
    throw EvaluationError("Output is not in range of left shift operation");
  return out >> sa;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
testl %esi, %esi
jne 0x75973
movq %rcx, %rax
leal (,%rdx,8), %ecx
subl %r9d, %ecx
movq %rax, %rsi
shlq %cl, %rsi
cmpl $0x8, %edx
movl $0x8, %ecx
cmovll %edx, %ecx
movslq %ecx, %rcx
movq 0x2d274(%rip), %rdx     # 0xa2bd0
testq %rsi, (%rdx,%rcx,8)
jne 0x75978
movl %r9d, %ecx
shrq %cl, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x41a00
movl $0x20, %edi
callq 0x3fb00
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xc3ce(%rip), %rsi      # 0x81d63
leaq 0xc3f5(%rip), %rdx      # 0x81d91
leaq 0x8(%rsp), %rdi
callq 0x3f8a0
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x3f890
xorl %ebp, %ebp
movq 0x2d469(%rip), %rsi     # 0xa2e28
movq 0x2d272(%rip), %rdx     # 0xa2c38
movq %rbx, %rdi
callq 0x41d60
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x759f0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x40870
jmp 0x759f0
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x759fd
movq %rbx, %rdi
callq 0x40080
movq %r14, %rdi
callq 0x41f00
nop
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/opbehavior.cc
// Function: OpBehaviorIntRight::recoverInputBinary(int, int, unsigned long, int, unsigned long) const
uintb OpBehaviorIntRight::recoverInputBinary(int4 slot,int4 sizeout,uintb out,int4 sizein,uintb in) const

{
  if (slot!=0)
    return OpBehavior::recoverInputBinary(slot,sizeout,out,sizein,in);
  
  int4 sa = in;
  if ((out>>(8*sizein-sa))!=0)
    throw EvaluationError("Output is not in range of right shift operation");
  return out << sa;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
testl %esi, %esi
jne 0x75a61
movq %rcx, %rax
shll $0x3, %r8d
subl %r9d, %r8d
movq %rcx, %rdx
movl %r8d, %ecx
shrq %cl, %rdx
testq %rdx, %rdx
jne 0x75a66
movl %r9d, %ecx
shlq %cl, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x41a00
movl $0x20, %edi
callq 0x3fb00
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xc30f(%rip), %rsi      # 0x81d92
leaq 0xc337(%rip), %rdx      # 0x81dc1
leaq 0x8(%rsp), %rdi
callq 0x3f8a0
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x3f890
xorl %ebp, %ebp
movq 0x2d37b(%rip), %rsi     # 0xa2e28
movq 0x2d184(%rip), %rdx     # 0xa2c38
movq %rbx, %rdi
callq 0x41d60
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x75ade
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x40870
jmp 0x75ade
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x75aeb
movq %rbx, %rdi
callq 0x40080
movq %r14, %rdi
callq 0x41f00
nop
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/opbehavior.cc
// Function: OpBehaviorIntSright::evaluateBinary(int, int, unsigned long, unsigned long) const
uintb OpBehaviorIntSright::evaluateBinary(int4 sizeout,int4 sizein,uintb in1,uintb in2) const

{
  uintb res;
  if (signbit_negative(in1,sizein)) {
    res = in1 >> in2;
    uintb mask = calc_mask(sizein);
    mask = (mask >> in2) ^ mask;
    res |= mask;
  }
  else {
    res = in1 >> in2;
  }
  return res;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %r8, %r14
movq %rcx, %rbx
movl %edx, %ebp
movq %rcx, %rdi
movl %edx, %esi
callq 0x3f5e0
movl %r14d, %ecx
shrq %cl, %rbx
testb %al, %al
je 0x75b3b
cmpl $0x8, %ebp
movl $0x8, %eax
cmovll %ebp, %eax
cltq
movq 0x2d0a8(%rip), %rcx     # 0xa2bd0
movq (%rcx,%rax,8), %rax
movq %rax, %rdx
movl %r14d, %ecx
shrq %cl, %rdx
xorq %rax, %rdx
orq %rdx, %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/opbehavior.cc
// Function: OpBehaviorIntSright::recoverInputBinary(int, int, unsigned long, int, unsigned long) const
uintb OpBehaviorIntSright::recoverInputBinary(int4 slot,int4 sizeout,uintb out,int4 sizein,uintb in) const

{
  if (slot!=0)
    return OpBehavior::recoverInputBinary(slot,sizeout,out,sizein,in);
  
  int4 sa = in;
  uintb testval = out>>(sizein*8-sa-1);
  int4 count=0;
  for(int4 i=0;i<=sa;++i) {
    if ((testval&1)!=0) count += 1;
    testval >>= 1;
  }
  if (count != sa+1)
    throw EvaluationError("Output is not in range of right shift operation");
  return out<<sa;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
testl %esi, %esi
jne 0x75b9a
movq %rcx, %rax
testl %r9d, %r9d
js 0x75b7f
movl %r9d, %ecx
notl %ecx
leal (%rcx,%r8,8), %ecx
movq %rax, %rdx
shrq %cl, %rdx
leal 0x1(%r9), %esi
xorl %ecx, %ecx
movl %edx, %edi
andl $0x1, %edi
addl %edi, %ecx
shrq %rdx
decl %esi
jne 0x75b6f
jmp 0x75b81
xorl %ecx, %ecx
leal 0x1(%r9), %edx
cmpl %edx, %ecx
jne 0x75b9f
movl %r9d, %ecx
shlq %cl, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x41a00
movl $0x20, %edi
callq 0x3fb00
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xc1d6(%rip), %rsi      # 0x81d92
leaq 0xc1fe(%rip), %rdx      # 0x81dc1
leaq 0x8(%rsp), %rdi
callq 0x3f8a0
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x3f890
xorl %ebp, %ebp
movq 0x2d242(%rip), %rsi     # 0xa2e28
movq 0x2d04b(%rip), %rdx     # 0xa2c38
movq %rbx, %rdi
callq 0x41d60
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x75c17
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x40870
jmp 0x75c17
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x75c24
movq %rbx, %rdi
callq 0x40080
movq %r14, %rdi
callq 0x41f00
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/opbehavior.cc
// Function: OpBehaviorIntRem::evaluateBinary(int, int, unsigned long, unsigned long) const
uintb OpBehaviorIntRem::evaluateBinary(int4 sizeout,int4 sizein,uintb in1,uintb in2) const

{
  if (in2 == 0)
    throw EvaluationError("Remainder by 0");
  
  uintb res = in1 % in2;
  return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
testq %r8, %r8
je 0x75e19
movq %rcx, %rax
xorl %edx, %edx
divq %r8
movq %rdx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x3fb00
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xbf98(%rip), %rsi      # 0x81dce
leaq 0xbf9f(%rip), %rdx      # 0x81ddc
leaq 0x8(%rsp), %rdi
callq 0x3f8a0
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x3f890
xorl %ebp, %ebp
movq 0x2cfc8(%rip), %rsi     # 0xa2e28
movq 0x2cdd1(%rip), %rdx     # 0xa2c38
movq %rbx, %rdi
callq 0x41d60
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x75e91
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x40870
jmp 0x75e91
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x75e9e
movq %rbx, %rdi
callq 0x40080
movq %r14, %rdi
callq 0x41f00
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/opbehavior.cc
// Function: OpBehaviorIntSrem::evaluateBinary(int, int, unsigned long, unsigned long) const
uintb OpBehaviorIntSrem::evaluateBinary(int4 sizeout,int4 sizein,uintb in1,uintb in2) const

{
  if (in2 == 0)
    throw EvaluationError("Remainder by 0");
  intb val = in1;
  intb mod = in2;
  sign_extend(val,8*sizein-1);	// Convert inputs to signed values
  sign_extend(mod,8*sizein-1);
  intb sres = in1 % in2;	// Do the remainder
  zero_extend(sres,8*sizeout-1); // Convert back to unsigned
  return (uintb)sres;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
testq %r8, %r8
je 0x75f15
movq %r8, %r14
movq %rcx, %r15
movl %esi, %ebx
movq %rsp, %rdi
movq %rcx, (%rdi)
leaq 0x28(%rsp), %r12
movq %r8, (%r12)
leal -0x1(,%rdx,8), %ebp
movl %ebp, %esi
callq 0x40540
movq %r12, %rdi
movl %ebp, %esi
callq 0x40540
movq %r15, %rax
xorl %edx, %edx
divq %r14
leaq 0x20(%rsp), %r14
movq %rdx, (%r14)
leal -0x1(,%rbx,8), %esi
movq %r14, %rdi
callq 0x41bc0
movq (%r14), %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x3fb00
movq %rax, %rbx
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xbe9c(%rip), %rsi      # 0x81dce
leaq 0xbea3(%rip), %rdx      # 0x81ddc
movq %rsp, %rdi
callq 0x3f8a0
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x3f890
xorl %ebp, %ebp
movq 0x2ced0(%rip), %rsi     # 0xa2e28
movq 0x2ccd9(%rip), %rdx     # 0xa2c38
movq %rbx, %rdi
callq 0x41d60
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x75f88
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x40870
jmp 0x75f88
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x75f95
movq %rbx, %rdi
callq 0x40080
movq %r14, %rdi
callq 0x41f00
nop
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/opbehavior.cc
// Function: OpBehaviorFloatEqual::evaluateBinary(int, int, unsigned long, unsigned long) const
uintb OpBehaviorFloatEqual::evaluateBinary(int4 sizeout,int4 sizein,uintb in1,uintb in2) const

{
  const FloatFormat *format = translate->getFloatFormat(sizein);
  if (format == (const FloatFormat *)0)
    return OpBehavior::evaluateBinary(sizeout,sizein,in1,in2);

  return format->opEqual(in1,in2);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %r8, %rbx
movq %rcx, %r14
movq %rdi, %r15
movq 0x10(%rdi), %rdi
movl %edx, %esi
callq 0x40450
testq %rax, %rax
je 0x75fef
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x41af0
movq %r15, %rdi
callq 0x3f620
nop
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/opbehavior.cc
// Function: OpBehaviorFloatNotEqual::evaluateBinary(int, int, unsigned long, unsigned long) const
uintb OpBehaviorFloatNotEqual::evaluateBinary(int4 sizeout,int4 sizein,uintb in1,uintb in2) const

{
  const FloatFormat *format = translate->getFloatFormat(sizein);
  if (format == (const FloatFormat *)0)
    return OpBehavior::evaluateBinary(sizeout,sizein,in1,in2);

  return format->opNotEqual(in1,in2);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %r8, %rbx
movq %rcx, %r14
movq %rdi, %r15
movq 0x10(%rdi), %rdi
movl %edx, %esi
callq 0x40450
testq %rax, %rax
je 0x76029
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x40bf0
movq %r15, %rdi
callq 0x3f620
nop
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/opbehavior.cc
// Function: OpBehaviorFloatLess::evaluateBinary(int, int, unsigned long, unsigned long) const
uintb OpBehaviorFloatLess::evaluateBinary(int4 sizeout,int4 sizein,uintb in1,uintb in2) const

{
  const FloatFormat *format = translate->getFloatFormat(sizein);
  if (format == (const FloatFormat *)0)
    return OpBehavior::evaluateBinary(sizeout,sizein,in1,in2);

  return format->opLess(in1,in2);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %r8, %rbx
movq %rcx, %r14
movq %rdi, %r15
movq 0x10(%rdi), %rdi
movl %edx, %esi
callq 0x40450
testq %rax, %rax
je 0x76063
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x3fa60
movq %r15, %rdi
callq 0x3f620
nop
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/opbehavior.cc
// Function: OpBehaviorFloatLessEqual::evaluateBinary(int, int, unsigned long, unsigned long) const
uintb OpBehaviorFloatLessEqual::evaluateBinary(int4 sizeout,int4 sizein,uintb in1,uintb in2) const

{
  const FloatFormat *format = translate->getFloatFormat(sizein);
  if (format == (const FloatFormat *)0)
    return OpBehavior::evaluateBinary(sizeout,sizein,in1,in2);

  return format->opLessEqual(in1,in2);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %r8, %rbx
movq %rcx, %r14
movq %rdi, %r15
movq 0x10(%rdi), %rdi
movl %edx, %esi
callq 0x40450
testq %rax, %rax
je 0x7609d
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x41e40
movq %r15, %rdi
callq 0x3f620
nop
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/opbehavior.cc
// Function: OpBehaviorFloatNan::evaluateUnary(int, int, unsigned long) const
uintb OpBehaviorFloatNan::evaluateUnary(int4 sizeout,int4 sizein,uintb in1) const

{
  const FloatFormat *format = translate->getFloatFormat(sizein);
  if (format == (const FloatFormat *)0)
    return OpBehavior::evaluateUnary(sizeout,sizein,in1);

  return format->opNan(in1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rdi
movl %edx, %esi
callq 0x40450
testq %rax, %rax
je 0x760d2
movq %rax, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x409c0
movq %r14, %rdi
callq 0x42150
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/opbehavior.cc
// Function: OpBehaviorFloatAdd::evaluateBinary(int, int, unsigned long, unsigned long) const
uintb OpBehaviorFloatAdd::evaluateBinary(int4 sizeout,int4 sizein,uintb in1,uintb in2) const

{
  const FloatFormat *format = translate->getFloatFormat(sizein);
  if (format == (const FloatFormat *)0)
    return OpBehavior::evaluateBinary(sizeout,sizein,in1,in2);

  return format->opAdd(in1,in2);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %r8, %rbx
movq %rcx, %r14
movq %rdi, %r15
movq 0x10(%rdi), %rdi
movl %edx, %esi
callq 0x40450
testq %rax, %rax
je 0x7610b
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x3f9c0
movq %r15, %rdi
callq 0x3f620
nop
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/opbehavior.cc
// Function: OpBehaviorFloatDiv::evaluateBinary(int, int, unsigned long, unsigned long) const
uintb OpBehaviorFloatDiv::evaluateBinary(int4 sizeout,int4 sizein,uintb in1,uintb in2) const

{
  const FloatFormat *format = translate->getFloatFormat(sizein);
  if (format == (const FloatFormat *)0)
    return OpBehavior::evaluateBinary(sizeout,sizein,in1,in2);

  return format->opDiv(in1,in2);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %r8, %rbx
movq %rcx, %r14
movq %rdi, %r15
movq 0x10(%rdi), %rdi
movl %edx, %esi
callq 0x40450
testq %rax, %rax
je 0x76145
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x40dc0
movq %r15, %rdi
callq 0x3f620
nop
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/opbehavior.cc
// Function: OpBehaviorFloatSub::evaluateBinary(int, int, unsigned long, unsigned long) const
uintb OpBehaviorFloatSub::evaluateBinary(int4 sizeout,int4 sizein,uintb in1,uintb in2) const

{
  const FloatFormat *format = translate->getFloatFormat(sizein);
  if (format == (const FloatFormat *)0)
    return OpBehavior::evaluateBinary(sizeout,sizein,in1,in2);

  return format->opSub(in1,in2);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %r8, %rbx
movq %rcx, %r14
movq %rdi, %r15
movq 0x10(%rdi), %rdi
movl %edx, %esi
callq 0x40450
testq %rax, %rax
je 0x761b9
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x41010
movq %r15, %rdi
callq 0x3f620
nop
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/opbehavior.cc
// Function: OpBehaviorFloatNeg::evaluateUnary(int, int, unsigned long) const
uintb OpBehaviorFloatNeg::evaluateUnary(int4 sizeout,int4 sizein,uintb in1) const

{
  const FloatFormat *format = translate->getFloatFormat(sizein);
  if (format == (const FloatFormat *)0)
    return OpBehavior::evaluateUnary(sizeout,sizein,in1);

  return format->opNeg(in1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rdi
movl %edx, %esi
callq 0x40450
testq %rax, %rax
je 0x761ee
movq %rax, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x42090
movq %r14, %rdi
callq 0x42150
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/opbehavior.cc
// Function: OpBehaviorFloatAbs::evaluateUnary(int, int, unsigned long) const
uintb OpBehaviorFloatAbs::evaluateUnary(int4 sizeout,int4 sizein,uintb in1) const

{
  const FloatFormat *format = translate->getFloatFormat(sizein);
  if (format == (const FloatFormat *)0)
    return OpBehavior::evaluateUnary(sizeout,sizein,in1);

  return format->opAbs(in1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rdi
movl %edx, %esi
callq 0x40450
testq %rax, %rax
je 0x76222
movq %rax, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x41a60
movq %r14, %rdi
callq 0x42150
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/opbehavior.cc
// Function: OpBehaviorFloatSqrt::evaluateUnary(int, int, unsigned long) const
uintb OpBehaviorFloatSqrt::evaluateUnary(int4 sizeout,int4 sizein,uintb in1) const

{
  const FloatFormat *format = translate->getFloatFormat(sizein);
  if (format == (const FloatFormat *)0)
    return OpBehavior::evaluateUnary(sizeout,sizein,in1);

  return format->opSqrt(in1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rdi
movl %edx, %esi
callq 0x40450
testq %rax, %rax
je 0x76256
movq %rax, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x40c60
movq %r14, %rdi
callq 0x42150
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/opbehavior.cc
// Function: OpBehaviorFloatInt2Float::evaluateUnary(int, int, unsigned long) const
uintb OpBehaviorFloatInt2Float::evaluateUnary(int4 sizeout,int4 sizein,uintb in1) const

{
  const FloatFormat *format = translate->getFloatFormat(sizeout);
  if (format == (const FloatFormat *)0)
    return OpBehavior::evaluateUnary(sizeout,sizein,in1);

  return format->opInt2Float(in1,sizein);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %r14
movl %edx, %ebx
movq %rdi, %r15
movq 0x10(%rdi), %rdi
callq 0x40450
testq %rax, %rax
je 0x7628b
movq %rax, %rdi
movq %r14, %rsi
movl %ebx, %edx
popq %rbx
popq %r14
popq %r15
jmp 0x3f5d0
movq %r15, %rdi
callq 0x42150
nop
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/opbehavior.cc
// Function: OpBehaviorFloatFloat2Float::evaluateUnary(int, int, unsigned long) const
uintb OpBehaviorFloatFloat2Float::evaluateUnary(int4 sizeout,int4 sizein,uintb in1) const

{
  const FloatFormat *formatout = translate->getFloatFormat(sizeout);
  if (formatout == (const FloatFormat *)0)
    return OpBehavior::evaluateUnary(sizeout,sizein,in1);
  const FloatFormat *formatin = translate->getFloatFormat(sizein);
  if (formatin == (const FloatFormat *)0)
    return OpBehavior::evaluateUnary(sizeout,sizein,in1);

  return formatin->opFloat2Float(in1,*formatout);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
movq %rdi, %r14
movq 0x10(%rdi), %rdi
callq 0x40450
testq %rax, %rax
je 0x762dc
movq %rax, %r15
movq 0x10(%r14), %rdi
movl %ebp, %esi
callq 0x40450
testq %rax, %rax
je 0x762dc
movq %rax, %rdi
movq %rbx, %rsi
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3f460
movq %r14, %rdi
callq 0x42150
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/opbehavior.cc
// Function: OpBehaviorFloatTrunc::evaluateUnary(int, int, unsigned long) const
uintb OpBehaviorFloatTrunc::evaluateUnary(int4 sizeout,int4 sizein,uintb in1) const

{
  const FloatFormat *format = translate->getFloatFormat(sizein);
  if (format == (const FloatFormat *)0)
    return OpBehavior::evaluateUnary(sizeout,sizein,in1);

  return format->opTrunc(in1,sizeout);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rcx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movq 0x10(%rdi), %rdi
movl %edx, %esi
callq 0x40450
testq %rax, %rax
je 0x76311
movq %rax, %rdi
movq %rbx, %rsi
movl %ebp, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0x3f1d0
movq %r14, %rdi
callq 0x42150
nop
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/opbehavior.cc
// Function: OpBehaviorFloatCeil::evaluateUnary(int, int, unsigned long) const
uintb OpBehaviorFloatCeil::evaluateUnary(int4 sizeout,int4 sizein,uintb in1) const

{
  const FloatFormat *format = translate->getFloatFormat(sizein);
  if (format == (const FloatFormat *)0)
    return OpBehavior::evaluateUnary(sizeout,sizein,in1);

  return format->opCeil(in1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rdi
movl %edx, %esi
callq 0x40450
testq %rax, %rax
je 0x76346
movq %rax, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x406d0
movq %r14, %rdi
callq 0x42150
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/opbehavior.cc
// Function: OpBehaviorFloatFloor::evaluateUnary(int, int, unsigned long) const
uintb OpBehaviorFloatFloor::evaluateUnary(int4 sizeout,int4 sizein,uintb in1) const

{
  const FloatFormat *format = translate->getFloatFormat(sizein);
  if (format == (const FloatFormat *)0)
    return OpBehavior::evaluateUnary(sizeout,sizein,in1);

  return format->opFloor(in1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rdi
movl %edx, %esi
callq 0x40450
testq %rax, %rax
je 0x7637a
movq %rax, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x42320
movq %r14, %rdi
callq 0x42150
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/hutch.cpp
// Function: bytePosition(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned char*, unsigned long)
uintmax_t bytePosition (string byte, uint1* buf, size_t sz)
{
    static uint1* sbufp = nullptr;
    static uintmax_t spos = 0;  // i.e., s(aved)pos(ition)

    sbufp = (buf != nullptr) ? buf : sbufp;
    spos = (buf != nullptr) ? 0 : spos;

    for (; spos <= sz; ++spos) {
        if (0 == memcmp((uint1*)byte.c_str(), &sbufp[spos], sizeof(uint1))) {
            return spos++;      // Post increment side effect is important here.
        }
    }

    return 0;
}

// Assembly:
xorl %eax, %eax
testq %rsi, %rsi
cmoveq 0x2e073(%rip), %rsi     # 0xa4af0
movq %rsi, 0x2e06c(%rip)     # 0xa4af0
movq 0x2e06d(%rip), %rcx     # 0xa4af8
cmovneq %rax, %rcx
cmpq %rdx, %rcx
ja 0x76ab9
movq (%rdi), %rax
movb (%rax), %r8b
xorl %eax, %eax
movq %rcx, %rdi
cmpb (%rsi,%rcx), %r8b
je 0x76ab0
leaq 0x1(%rdi), %rcx
cmpq %rdx, %rcx
jbe 0x76a9c
jmp 0x76ab3
movq %rdi, %rax
incq %rdi
movq %rdi, %rcx
movq %rcx, 0x2e038(%rip)     # 0xa4af8
retq
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/hutch.cpp
// Function: printVarnodeData(std::ostream&, VarnodeData*)
void printVarnodeData (ostream& s, VarnodeData* data)
{
    if (data == nullptr)
        return;

    s << '(' << data->space->getName () << ',';

    const Translate* trans = data->space->getTrans ();

    if (data->space->getName () == "register") {
        s << trans->getRegisterName (data->space, data->offset, data->size);
    } else {
        data->space->printOffset (s, data->offset);
    }
    s << ',' << dec << data->size << ')';
    return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
testq %rsi, %rsi
je 0x76bdd
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rsp), %r15
movb $0x28, (%r15)
movl $0x1, %edx
movq %r15, %rsi
callq 0x40b80
movq (%rbx), %rcx
movq 0x38(%rcx), %rsi
movq 0x40(%rcx), %rdx
movq %rax, %rdi
callq 0x40b80
movb $0x2c, (%r15)
leaq 0x8(%rsp), %rsi
movl $0x1, %edx
movq %rax, %rdi
callq 0x40b80
movq (%rbx), %rdi
movq 0x18(%rdi), %r15
addq $0x38, %rdi
leaq 0x8e20(%rip), %rsi      # 0x7f94c
callq 0x3f590
testl %eax, %eax
je 0x76b46
movq (%rbx), %rdi
movq 0x8(%rbx), %rdx
movq %r14, %rsi
callq 0x40380
jmp 0x76b8e
movq (%rbx), %rdx
movq 0x8(%rbx), %rcx
movl 0x10(%rbx), %r8d
movq (%r15), %rax
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq *0x40(%rax)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %r14, %rdi
callq 0x40b80
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x76b8e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x40870
leaq 0x8(%rsp), %r15
movb $0x2c, (%r15)
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x40b80
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
movl 0x10(%rbx), %esi
movq %rax, %rdi
callq 0x3ffb0
movb $0x29, (%r15)
leaq 0x8(%rsp), %rsi
movl $0x1, %edx
movq %rax, %rdi
callq 0x40b80
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x76c07
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x40870
movq %rbx, %rdi
callq 0x41f00
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/hutch.cpp
// Function: printPcode(PcodeData)
void printPcode (PcodeData pcode)
{
    if (pcode.outvar) {
        printVarnodeData(cout, pcode.outvar);
        cout << " =  ";
    }
    cout << get_opname(pcode.opc);
    for (auto i = 0; i < pcode.isize; ++i) {
        cout << ' ';
        printVarnodeData(cout, &pcode.invar[i]);
    }
    cout << endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rsi
testq %rsi, %rsi
je 0x76c4b
movq 0x2c1d1(%rip), %r14     # 0xa2e00
movq %r14, %rdi
callq 0x40b40
leaq 0xb626(%rip), %rsi      # 0x82264
movl $0x4, %edx
movq %r14, %rdi
callq 0x40b80
movl (%rbx), %edi
callq 0x402e0
testq %rax, %rax
je 0x76c76
movq %rax, %r14
movq %rax, %rdi
callq 0x3f9e0
movq 0x2c197(%rip), %rdi     # 0xa2e00
movq %r14, %rsi
movq %rax, %rdx
callq 0x40b80
jmp 0x76c94
movq 0x2c183(%rip), %rax     # 0xa2e00
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
leaq (%rax,%rcx), %rdi
movl 0x20(%rax,%rcx), %esi
orl $0x1, %esi
callq 0x41d20
cmpl $0x0, 0x18(%rbx)
jle 0x76ce0
xorl %r12d, %r12d
movq 0x2c15c(%rip), %r14     # 0xa2e00
leaq 0xf(%rsp), %r15
xorl %r13d, %r13d
movb $0x20, 0xf(%rsp)
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x40b80
movq 0x10(%rbx), %rsi
addq %r12, %rsi
movq %r14, %rdi
callq 0x40b40
incq %r13
movslq 0x18(%rbx), %rax
addq $0x18, %r12
cmpq %rax, %r13
jl 0x76cac
movq 0x2c119(%rip), %rbx     # 0xa2e00
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x40740
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3f0a0
movq %rax, %rdi
callq 0x3ffc0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/hutch.cpp
// Function: DefaultLoadImage::loadFill(unsigned char*, int, Address const&)
void DefaultLoadImage::loadFill (uint1* ptr, int4 size,
                                 const Address& addr)
{
    auto start = addr.getOffset ();
    auto max = baseaddr + (bufsize - 1);
    for (auto i = 0; i < size; ++i) { // For every byte request
        auto curoff = start + i;      // Calculate offset of byte.
        if ((curoff < this->baseaddr) ||
            (curoff > max)) { // if byte does not fall in window,
            ptr[i] = 0;       // return 0
            continue;
        }
        // Otherwise return data from our window.
        auto diff = curoff - baseaddr;
        ptr[i] = this->buf[(int4)diff];
    }
}

// Assembly:
testl %edx, %edx
jle 0x76d88
pushq %r14
pushq %rbx
movq 0x8(%rcx), %rax
movq 0x28(%rdi), %rcx
movq 0x38(%rdi), %r8
addq %r8, %rcx
decq %rcx
movl %edx, %edx
movq %rax, %r8
shlq $0x20, %r8
xorl %r9d, %r9d
movabsq $0x100000000, %r10      # imm = 0x100000000
leaq (%rax,%r9), %r14
movq 0x28(%rdi), %rbx
xorl %r11d, %r11d
cmpq %rbx, %r14
jb 0x76d76
cmpq %rcx, %r14
ja 0x76d76
movq 0x30(%rdi), %r11
shlq $0x20, %rbx
movq %r8, %r14
subq %rbx, %r14
sarq $0x20, %r14
movb (%r11,%r14), %r11b
movb %r11b, (%rsi,%r9)
incq %r9
addq %r10, %r8
cmpq %r9, %rdx
jne 0x76d4b
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/hutch.cpp
// Function: Hutch::initialize(unsigned char const*, unsigned long, unsigned long)
void Hutch::initialize (const uint1* buf, uintb bufsize, uintb begaddr)
{
    this->loader = make_unique<DefaultLoadImage>(begaddr, buf, bufsize);
    this->trans = make_unique<Sleigh>(this->loader.get(), &this->context);
    this->trans->initialize (this->docstorage);

    for (auto [option, setting] : this->cpucontext)
        this->context.setVariableDefault (option, setting);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r14
movl $0x40, %edi
callq 0x40800
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq %r12, %rcx
callq 0x3fdc0
movq 0x140(%r14), %rdi
movq %r15, 0x140(%r14)
testq %rdi, %rdi
je 0x771be
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x140(%r14), %r12
leaq 0x70(%r14), %rbx
movl $0x260, %edi            # imm = 0x260
callq 0x40800
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x3f140
movq 0x148(%r14), %rdi
movq %r15, 0x148(%r14)
testq %rdi, %rdi
je 0x771fd
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x148(%r14), %rdi
leaq 0x28(%r14), %rsi
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x150(%r14), %r15
movq 0x158(%r14), %r12
cmpq %r12, %r15
je 0x77275
leaq 0x18(%rsp), %r13
leaq 0x8(%rsp), %r14
movq %r13, 0x8(%rsp)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x3f8e0
movl 0x20(%r15), %edx
movl %edx, 0x28(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3fa50
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x7726c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x40870
addq $0x28, %r15
cmpq %r12, %r15
jne 0x7722b
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movl $0x260, %esi            # imm = 0x260
jmp 0x77295
movq %rax, %rbx
movl $0x40, %esi
movq %r15, %rdi
jmp 0x772af
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x772b4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x40870
movq %rbx, %rdi
callq 0x41f00
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/hutch.cpp
// Function: Hutch::printInstructionBytes(Instruction const&)
void Hutch::printInstructionBytes (const Instruction& insn)
{
    for (auto i = 0; i < insn.bytelength; ++i) {
        cout << "0x" << hex << (int)insn.raw[i] << " ";
    }
    cout << endl;
    return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
cmpq $0x0, 0x8(%rsi)
je 0x773a1
movq %rsi, %rbx
xorl %r13d, %r13d
movq 0x2babb(%rip), %r14     # 0xa2e00
leaq 0x9d68(%rip), %r15      # 0x810b4
leaq 0x91ea(%rip), %r12      # 0x8053d
movl $0x2, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x40b80
movq (%r14), %rax
movq -0x18(%rax), %rax
movl 0x18(%r14,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%r14,%rax)
movzbl 0x48(%rbx,%r13), %esi
movq %r14, %rdi
callq 0x41da0
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x40b80
incq %r13
cmpq %r13, 0x8(%rbx)
ja 0x77353
movq 0x2ba58(%rip), %rbx     # 0xa2e00
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x40740
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3f0a0
movq %rax, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x3ffc0
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/hutch.cpp
// Function: Hutch::printInstructionBytes(__gnu_cxx::__normal_iterator<Instruction*, std::vector<Instruction, std::allocator<Instruction>>>)
void Hutch::printInstructionBytes (vector<Instruction>::iterator instr)
{
    for (auto i = 0; i < instr->bytelength; ++i) {
        cout << "0x" << hex << (int)instr->raw[i] << " ";
    }
    cout << endl;
    return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
cmpq $0x0, 0x8(%rsi)
je 0x77451
movq %rsi, %rbx
xorl %r13d, %r13d
movq 0x2ba0b(%rip), %r14     # 0xa2e00
leaq 0x9cb8(%rip), %r15      # 0x810b4
leaq 0x913a(%rip), %r12      # 0x8053d
movl $0x2, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x40b80
movq (%r14), %rax
movq -0x18(%rax), %rax
movl 0x18(%r14,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%r14,%rax)
movzbl 0x48(%rbx,%r13), %esi
movq %r14, %rdi
callq 0x41da0
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x40b80
incq %r13
cmpq %r13, 0x8(%rbx)
ja 0x77403
movq 0x2b9a8(%rip), %rbx     # 0xa2e00
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x40740
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3f0a0
movq %rax, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x3ffc0
// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/hutch.cpp
// Function: Hutch::disassemble_iter(unsigned long, Hutch_Emit*)
uint Hutch::disassemble_iter(uintb offset, Hutch_Emit* emitter)
{
    uintb baseaddr = this->loader->getBaseAddr ();

    Address addr (this->trans->getDefaultSpace (), baseaddr);
    Address lastaddr (this->trans->getDefaultSpace (),
                      baseaddr + this->loader->getBufferSize ());

    addr = addr + offset;

    if (lastaddr <= addr) {
        // cout << "exceeded last available address\n";
        return 0;
    }
    auto len = 0;

    try {
        len = this->trans->printAssembly(*emitter, addr);
        this->trans->oneInstruction(*emitter, addr);
    } catch (const BadDataError&) {
        len = 0;
        emitter->removeBadInstruction ();
    }

    if (auto e = dynamic_cast<Hutch_Instructions*>(emitter))
        storeRawInstructionBytes(*e->currentinsn);

    return len;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movq 0x140(%rdi), %rax
movq 0x28(%rax), %rdx
movq 0x148(%rdi), %rdi
movq 0xa0(%rdi), %rcx
movq %rcx, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x38(%rax), %r8
addq %rdx, %r8
movslq %esi, %rax
addq %rdx, %rax
movq 0x28(%rcx), %rsi
cmpq %rax, %rsi
jae 0x774e6
incq %rsi
cqto
idivq %rsi
movq %rdx, %rax
sarq $0x3f, %rax
andq %rsi, %rax
addq %rdx, %rax
movq %rcx, 0x8(%rsp)
movq %rax, 0x10(%rsp)
xorl %ebp, %ebp
cmpq %rax, %r8
jbe 0x7756d
leaq 0x8(%r14), %rsi
movq (%rdi), %rax
leaq 0x8(%rsp), %rdx
callq *0x68(%rax)
movl %eax, %ebp
movq 0x148(%rbx), %rdi
movq (%rdi), %rax
leaq 0x8(%rsp), %rdx
movq %r14, %rsi
callq *0x60(%rax)
testq %r14, %r14
je 0x7753c
movq 0x2b94f(%rip), %rsi     # 0xa2e78
movq 0x2b8b0(%rip), %rdx     # 0xa2de0
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x40b50
jmp 0x7753e
xorl %eax, %eax
testq %rax, %rax
je 0x7756d
movq 0x28(%rax), %rdx
movq 0x148(%rbx), %rdi
movq 0xa0(%rdi), %rax
movq (%rdx), %rcx
leaq 0x18(%rsp), %rsi
movq %rax, (%rsi)
movq %rcx, 0x8(%rsi)
addq $0x48, %rdx
callq 0x3f8b0
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
cmpl $0x1, %edx
jne 0x775a4
movq %r15, %rdi
callq 0x3f910
movq (%r14), %rax
movq %r14, %rdi
callq *0x20(%rax)
callq 0x41a90
xorl %ebp, %ebp
jmp 0x7751d
movq %rax, %r15
callq 0x41a90
movq %r15, %rdi
callq 0x41f00
movq %rax, %rdi
callq 0x477f0