LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/emulate.cc
// Function: EmulatePcodeCache::executeBranch()
void EmulatePcodeCache::executeBranch(void)

{
  const Address &destaddr( currentOp->getInput(0)->getAddr() );
  if (destaddr.isConstant()) {
    uintm id = destaddr.getOffset();
    id = id + (uintm)current_op;
    current_op = id;
    if (current_op == opcache.size())
      fallthruOp();
    else if ((current_op < 0)||(current_op >= opcache.size()))
      throw LowlevelError("Bad intra-instruction branch");
  }
  else
    setExecuteAddress(destaddr);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq 0x20(%rdi), %rax
movq 0x28(%rax), %rax
movq (%rax), %rax
movq (%rax), %rcx
movq 0x8(%rax), %rax
movq %rcx, 0x10(%rsp)
movq %rax, 0x18(%rsp)
cmpl $0x0, 0x8(%rcx)
je 0x79e4e
movq (%rdi), %rax
leaq 0x10(%rsp), %rsi
callq *0x90(%rax)
jmp 0x79e87
addl 0x94(%rdi), %eax
movl %eax, 0x94(%rdi)
movslq %eax, %rdx
movq 0x38(%rdi), %rcx
subq 0x30(%rdi), %rcx
sarq $0x3, %rcx
cmpq %rdx, %rcx
jne 0x79e7c
movq (%rdi), %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
jmpq *0x78(%rax)
testl %eax, %eax
js 0x79e90
movl %eax, %eax
cmpq %rax, %rcx
jbe 0x79e90
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x4e180
movq %rax, %rbx
leaq 0xec45(%rip), %rsi      # 0x88ae7
leaq 0x20(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x515e0
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x4ddf0
xorl %ebp, %ebp
movq 0x34fd6(%rip), %rsi     # 0xaeea0
movq 0x34d67(%rip), %rdx     # 0xaec38
movq %rbx, %rdi
callq 0x51630
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x4e020
testb %bpl, %bpl
jne 0x79ef0
jmp 0x79ef8
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/emulate.cc
// Function: EmulatePcodeCache::setExecuteAddress(Address const&)
void EmulatePcodeCache::setExecuteAddress(const Address &addr)

{
  current_address = addr;	// Copy -addr- BEFORE calling createInstruction
                                // as it calls clear and may delete -addr-
  createInstruction(current_address);
  establishOp();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x80(%rdi), %rax
movq (%rsi), %rcx
movq %rcx, 0x80(%rdi)
movq 0x8(%rsi), %rcx
movq %rcx, 0x88(%rdi)
movq %rax, %rsi
callq 0x4f1d0
movq %rbx, %rdi
popq %rbx
jmp 0x4f7a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/emulate.cc
// Function: EmulatePcodeCache::executeInstruction()
void EmulatePcodeCache::executeInstruction(void)

{
  if (instruction_start) {
    if (breaktable->doAddressBreak(current_address))
      return;
  }
  do {
    executeCurrentOp();
  } while(!instruction_start);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpb $0x1, 0x90(%rdi)
jne 0x79ff2
movq 0x78(%rbx), %rdi
leaq 0x80(%rbx), %rsi
movq (%rdi), %rax
callq *0x20(%rax)
testb %al, %al
jne 0x7a003
movq %rbx, %rdi
callq 0x4d250
cmpb $0x1, 0x90(%rbx)
jne 0x79ff2
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/memstate.cc
// Function: MemoryBank::constructValue(unsigned char const*, int, bool)
uintb MemoryBank::constructValue(const uint1 *ptr,int4 size,bool bigendian)

{
  uintb res = 0;

  if (bigendian) {
    for(int4 i=0;i<size;++i) {
      res <<= 8;
      res += (uintb) ptr[i];
    }
  }
  else {
    for(int4 i=size-1;i>=0;--i) {
      res <<= 8;
      res += (uintb) ptr[i];
    }
  }
  return res;
}

// Assembly:
testl %edx, %edx
je 0x7abd2
xorl %ecx, %ecx
testl %esi, %esi
cmovlel %ecx, %esi
xorl %eax, %eax
cmpq %rcx, %rsi
je 0x7abeb
shlq $0x8, %rax
movzbl (%rdi,%rcx), %edx
orq %rdx, %rax
incq %rcx
jmp 0x7abbd
movl %esi, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jle 0x7abeb
shlq $0x8, %rax
movzbl -0x1(%rdi,%rcx), %edx
decq %rcx
orq %rdx, %rax
jmp 0x7abd6
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/memstate.cc
// Function: MemoryBank::deconstructValue(unsigned char*, unsigned long, int, bool)
void MemoryBank::deconstructValue(uint1 *ptr,uintb val,int4 size,bool bigendian)

{
  if (bigendian) {
    for(int4 i=size-1;i>=0;--i) {
      ptr[i] = (uint1) (val & 0xff);
      val >>= 8;
    }
  }
  else {
    for(int4 i=0;i<size;++i) {
      ptr[i] = (uint1) (val & 0xff);
      val >>= 8;
    }
  }
}

// Assembly:
testl %ecx, %ecx
je 0x7ac04
movl %edx, %eax
testl %eax, %eax
jle 0x7ac1d
movb %sil, -0x1(%rdi,%rax)
decq %rax
shrq $0x8, %rsi
jmp 0x7abf2
xorl %eax, %eax
testl %edx, %edx
cmovlel %eax, %edx
cmpq %rax, %rdx
je 0x7ac1d
movb %sil, (%rdi,%rax)
shrq $0x8, %rsi
incq %rax
jmp 0x7ac0b
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/memstate.cc
// Function: MemoryBank::getPage(unsigned long, unsigned char*, int, int) const
void MemoryBank::getPage(uintb addr,uint1 *res,int4 skip,int4 size) const

{ // Default implementation just iterates using find
  // but could be optimized
  uintb ptraddr = addr + skip;
  uintb endaddr = ptraddr + size;
  uintb startalign = ptraddr & ~((uintb)(wordsize-1));
  uintb endalign = endaddr & ~((uintb)(wordsize-1));
  if ((endaddr & ((uintb)(wordsize-1))) != 0)
    endalign += wordsize;

  uintb curval;
  bool bswap = ((HOST_ENDIAN==1) != space->isBigEndian());
  uint1 *ptr;
  do {
    curval = find(startalign);
    if (bswap)
      curval = byte_swap(curval,wordsize);
    ptr = (uint1 *)&curval;
    int4 sz = wordsize;
    if (startalign < addr) {
      ptr += (addr-startalign);
      sz = wordsize - (addr-startalign);
    }
    if (startalign + wordsize > endaddr)
      sz -= (startalign + wordsize -endaddr);
    memcpy(res,ptr,sz);
    res += sz;
    startalign += wordsize;
  } while(startalign != endalign);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movslq %ecx, %r12
addq %rsi, %r12
movslq %r8d, %rdx
addq %r12, %rdx
movslq 0x8(%rdi), %rax
leaq -0x1(%rax), %rbp
movq %rax, %rcx
negq %rcx
andq %rcx, %r12
andq %rdx, %rcx
movq %rdx, 0x10(%rsp)
andq %rdx, %rbp
cmovneq %rax, %rbp
addq %rcx, %rbp
movq 0x10(%rdi), %rax
movl 0x24(%rax), %eax
movl %eax, 0x4(%rsp)
movq (%r15), %rax
movq %r15, %rdi
movq %r12, %rsi
callq *0x8(%rax)
movq %rax, 0x8(%rsp)
testb $0x1, 0x4(%rsp)
je 0x7acb2
movl 0x8(%r15), %esi
movq %rax, %rdi
callq 0x4daf0
movq %rax, 0x8(%rsp)
movslq 0x8(%r15), %rax
movq %r14, %rcx
subq %r12, %rcx
movl $0x0, %edx
cmovaeq %rcx, %rdx
movq %r12, %rcx
subq %r14, %rcx
leaq 0x8(%rsp,%rdx), %rsi
movl $0x0, %edi
cmovael %edi, %ecx
addl %eax, %ecx
addq %r12, %rax
movq 0x10(%rsp), %rdx
subq %rax, %rdx
cmovael %edi, %edx
addl %ecx, %edx
movslq %edx, %r13
movq %rbx, %rdi
movq %r13, %rdx
callq 0x4ef20
addq %r13, %rbx
movslq 0x8(%r15), %rax
addq %rax, %r12
cmpq %rbp, %r12
jne 0x7ac89
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/memstate.cc
// Function: MemoryBank::setPage(unsigned long, unsigned char const*, int, int)
void MemoryBank::setPage(uintb addr,const uint1 *val,int4 skip,int4 size)
  
{  // Default implementation just iterates using insert
   // but could be optimized
  uintb ptraddr = addr + skip;
  uintb endaddr = ptraddr + size;
  uintb startalign = ptraddr & ~((uintb)(wordsize-1));
  uintb endalign = endaddr & ~((uintb)(wordsize-1));
  if ((endaddr & ((uintb)(wordsize-1))) != 0)
    endalign += wordsize;

  uintb curval;
  bool bswap = ((HOST_ENDIAN==1) != space->isBigEndian());
  uint1 *ptr;
  do {
    ptr = (uint1 *)&curval;
    int4 sz = wordsize;
    if (startalign < addr) {
      ptr += (addr-startalign);
      sz = wordsize - (addr-startalign);
    }
    if (startalign + wordsize > endaddr)
      sz -= (startalign + wordsize - endaddr);
    if (sz != wordsize) {
      curval = find(startalign); // Part of word is copied from underlying
      memcpy(ptr,val,sz);	 // Rest is taken from -val-
    }
    else
      curval = *((const uintb *)val); // -val- supplies entire word
    if (bswap)
      curval = byte_swap(curval,wordsize);
    insert(startalign,curval);
    val += sz;
    startalign += wordsize;
  } while(startalign != endalign);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movslq %ecx, %r12
addq %rsi, %r12
movslq %r8d, %rbp
addq %r12, %rbp
movslq 0x8(%rdi), %rax
leaq -0x1(%rax), %rdx
movq %rax, %rcx
negq %rcx
andq %rcx, %r12
andq %rbp, %rcx
andq %rbp, %rdx
cmovneq %rax, %rdx
addq %rcx, %rdx
movq %rdx, 0x20(%rsp)
movq 0x10(%rdi), %rcx
movl 0x24(%rcx), %ecx
movl %ecx, 0x14(%rsp)
movq %rsi, 0x18(%rsp)
movq %r12, %rcx
subq %r14, %rcx
movl $0x0, %edi
cmovael %edi, %ecx
addl %eax, %ecx
cltq
leaq (%r12,%rax), %rdx
movq %rbp, %rsi
subq %rdx, %rsi
cmovael %edi, %esi
addl %ecx, %esi
movslq %esi, %r13
cmpl %eax, %esi
jne 0x7ad9e
movq (%rbx), %rdx
movq %rdx, 0x8(%rsp)
jmp 0x7ade1
movq %r14, %rax
subq %r12, %rax
movl $0x0, %ecx
cmovaeq %rax, %rcx
movq %rbp, %r14
leaq 0x8(%rsp,%rcx), %rbp
movq (%r15), %rax
movq %r15, %rdi
movq %r12, %rsi
callq *0x8(%rax)
movq %rax, 0x8(%rsp)
movq %rbp, %rdi
movq %r14, %rbp
movq 0x18(%rsp), %r14
movq %rbx, %rsi
movq %r13, %rdx
callq 0x4ef20
movq 0x8(%rsp), %rdx
testb $0x1, 0x14(%rsp)
je 0x7adfc
movl 0x8(%r15), %esi
movq %rdx, %rdi
callq 0x4daf0
movq %rax, %rdx
movq %rax, 0x8(%rsp)
movq (%r15), %rax
movq %r15, %rdi
movq %r12, %rsi
callq *(%rax)
addq %r13, %rbx
movslq 0x8(%r15), %rax
addq %rax, %r12
cmpq 0x20(%rsp), %r12
jne 0x7ad6c
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/memstate.cc
// Function: MemoryBank::getValue(unsigned long, int) const
uintb MemoryBank::getValue(uintb offset,int4 size) const

{
    uintb res;

    uintb alignmask = (uintb) (wordsize - 1);
    uintb ind = offset & (~alignmask);
    int4 skip = offset & alignmask;
    int4 size1 = wordsize - skip;
    int4 size2;
    int4 gap;
    uintb val1, val2;
    if (size > size1) { // We have spill over
        size2 = size - size1;
        val1 = find (ind);
        val2 = find (ind + wordsize);
        gap = wordsize - size2;
    } else {
        val1 = find (ind);
        val2 = 0;
        if (size == wordsize)
            return val1;
        gap = size1 - size;
        size1 = size;
        size2 = 0;
    }

    if (space->isBigEndian ()) {
        if (size2 == 0)
            res = val1 >> (8 * gap);
        else
            res = (val1 << (8 * size2)) | (val2 >> (8 * gap));
    } else {
        if (size2 == 0)
            res = val1 >> (skip * 8);
        else
            res = (val1 >> (skip * 8)) | (val2 << (size1 * 8));
    }
    res &= (uintb)calc_mask (size);
    return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r13
movl 0x8(%rdi), %r12d
leal -0x1(%r12), %eax
movl %r12d, %ecx
negl %ecx
movslq %ecx, %rbp
andq %rsi, %rbp
andl %eax, %r15d
subl %r15d, %r12d
movl %r12d, %ebx
subl %edx, %ebx
movl %edx, 0x4(%rsp)
jge 0x7b06f
movl %edx, %ebx
subl %r12d, %ebx
movq (%r13), %rax
movq %r13, %rdi
movq %rbp, %rsi
callq *0x8(%rax)
movq %rax, %r14
movslq 0x8(%r13), %rsi
addq %rbp, %rsi
movq (%r13), %rax
movq %r13, %rdi
callq *0x8(%rax)
movq %rbx, %rsi
movl 0x8(%r13), %ebx
subl %esi, %ebx
jmp 0x7b090
movq (%r13), %rax
movq %r13, %rdi
movq %rbp, %rsi
callq *0x8(%rax)
movl 0x4(%rsp), %ecx
movq %rax, %r14
cmpl %ecx, 0x8(%r13)
je 0x7b0f3
xorl %esi, %esi
movl %ecx, %r12d
xorl %eax, %eax
movq 0x10(%r13), %rcx
testb $0x1, 0x24(%rcx)
jne 0x7b0b8
shll $0x3, %r15d
movl %r15d, %ecx
shrq %cl, %r14
testl %esi, %esi
movl 0x4(%rsp), %edx
je 0x7b0dd
shll $0x3, %r12d
movl %r12d, %ecx
shlq %cl, %rax
jmp 0x7b0d0
testl %esi, %esi
movl 0x4(%rsp), %edx
je 0x7b0d5
shll $0x3, %esi
movl %esi, %ecx
shlq %cl, %r14
shll $0x3, %ebx
movl %ebx, %ecx
shrq %cl, %rax
orq %rax, %r14
jmp 0x7b0dd
shll $0x3, %ebx
movl %ebx, %ecx
shrq %cl, %r14
cmpl $0x8, %edx
pushq $0x8
popq %rax
cmovll %edx, %eax
cltq
movq 0x33ae1(%rip), %rcx     # 0xaebd0
andq (%rcx,%rax,8), %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/memstate.cc
// Function: MemoryBank::setChunk(unsigned long, int, unsigned char const*)
void MemoryBank::setChunk(uintb offset,int4 size,const uint1 *val)

{
  int4 cursize;
  int4 count;
  uintb pagemask = (uintb) (pagesize - 1);
  uintb offalign;
  int4 skip;

  count = 0;
  while(count < size) {
    cursize = pagesize;
    offalign = offset & ~pagemask;
    skip = 0;
    if (offalign != offset) {
      skip = offset - offalign;
      cursize -= skip;
    }
    if (size - count < cursize)
      cursize = size - count;
    setPage(offalign,val,skip,cursize);
    count += cursize;
    offset += cursize;
    val += cursize;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, 0x4(%rsp)
movq %rsi, %r14
movq %rdi, %r15
xorl %r13d, %r13d
xorl %eax, %eax
subl 0xc(%rdi), %eax
movslq %eax, %rbp
movl 0x4(%rsp), %eax
subl %r13d, %eax
jle 0x7b168
movl 0xc(%r15), %r12d
movq %r14, %rsi
andq %rbp, %rsi
movl %r14d, %ecx
subl %esi, %ecx
subl %ecx, %r12d
cmpl %r12d, %eax
cmovll %eax, %r12d
movq (%r15), %rax
movq %r15, %rdi
movq %rbx, %rdx
movl %r12d, %r8d
callq *0x18(%rax)
addl %r12d, %r13d
movslq %r12d, %rax
addq %rax, %r14
addq %rax, %rbx
jmp 0x7b129
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/memstate.cc
// Function: MemoryImage::find(unsigned long) const
uintb MemoryImage::find(uintb addr) const

{ // Assume that -addr- is word aligned
  uintb res = 0;		// Make sure all bytes start as 0, as load may not fill all bytes
  AddrSpace *spc = getSpace();
  try {
    uint1 *ptr = (uint1 *)&res;
    ptr += (HOST_ENDIAN==1) ? (sizeof(uintb) - getWordSize()) : 0;
    loader->loadFill(ptr,getWordSize(),Address(spc,addr));
  } catch(DataUnavailError &err) {
    // Pages not mapped in the load image, are assumed to be zero
    res = 0;
  }
  if ((HOST_ENDIAN==1) != spc->isBigEndian())
    res = byte_swap(res,getWordSize());
  return res;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsp, %rax
andq $0x0, (%rax)
movq %rdi, %rbx
movq 0x10(%rdi), %r14
movq 0x18(%rdi), %rdi
movl 0x8(%rbx), %edx
leaq 0x8(%rsp), %rcx
movq %r14, (%rcx)
movq %rsi, 0x8(%rcx)
movq (%rdi), %r8
movq %rax, %rsi
callq *0x10(%r8)
testb $0x1, 0x24(%r14)
movq (%rsp), %rax
je 0x7b232
movl 0x8(%rbx), %esi
movq %rax, %rdi
callq 0x4daf0
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rdi
cmpl $0x1, %edx
jne 0x7b253
callq 0x4de70
andq $0x0, (%rsp)
callq 0x51210
jmp 0x7b21c
callq 0x518c0
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/memstate.cc
// Function: MemoryImage::getPage(unsigned long, unsigned char*, int, int) const
void MemoryImage::getPage(uintb addr,uint1 *res,int4 skip,int4 size) const

{  // Assume that -addr- is page aligned
  AddrSpace *spc = getSpace();

  try {
    loader->loadFill(res,size,Address(spc,addr+skip));
  }
  catch(DataUnavailError &err) {
    // Pages not mapped in the load image, are assumed to be zero
    for(int4 i=0;i<size;++i)
      res[i] = 0;
  }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %r8d, %ebx
movq %rdx, %r14
movq 0x10(%rdi), %rax
movq 0x18(%rdi), %rdi
movslq %ecx, %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rcx
movq %rax, (%rcx)
movq %rdx, 0x8(%rcx)
movq (%rdi), %rax
movq %r14, %rsi
movl %r8d, %edx
callq *0x10(%rax)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rdi
cmpl $0x1, %edx
jne 0x7b2bd
callq 0x4de70
xorl %eax, %eax
testl %ebx, %ebx
cmovlel %eax, %ebx
cmpq %rax, %rbx
je 0x7b2b6
movb $0x0, (%r14,%rax)
incq %rax
jmp 0x7b2a7
callq 0x51210
jmp 0x7b28b
callq 0x518c0
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/memstate.cc
// Function: MemoryPageOverlay::insert(unsigned long, unsigned long)
void MemoryPageOverlay::insert(uintb addr,uintb val)

{
  uintb pageaddr = addr & ~((uintb)(getPageSize()-1));
  map<uintb,uint1 *>::iterator iter;

  uint1 *pageptr;

  iter = page.find(pageaddr);
  if (iter != page.end())
    pageptr = (*iter).second;
  else {
    pageptr = new uint1[getPageSize()];
    page[pageaddr] = pageptr;
    if (underlie == (MemoryBank *)0) {
      for(int4 i=0;i<getPageSize();++i)
	pageptr[i] = 0;
    }
    else
      underlie->getPage(pageaddr,pageptr,0,getPageSize());
  }
  
  uintb pageoffset = addr & ((uintb)(getPageSize()-1));
  deconstructValue(pageptr + pageoffset,val,getWordSize(),getSpace()->isBigEndian());
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
xorl %eax, %eax
subl 0xc(%rdi), %eax
cltq
andq %rsi, %rax
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x20(%rdi), %r13
movq %r13, %rdi
callq 0x50640
leaq 0x28(%r14), %rcx
cmpq %rcx, %rax
je 0x7b323
movq 0x28(%rax), %r12
jmp 0x7b35c
movslq 0xc(%r14), %rdi
callq 0x4d060
movq %rax, %r12
leaq 0x8(%rsp), %rsi
movq %r13, %rdi
callq 0x4ef80
movq %r12, (%rax)
movq 0x18(%r14), %rdi
testq %rdi, %rdi
je 0x7b38d
movq 0x8(%rsp), %rsi
movl 0xc(%r14), %r8d
movq (%rdi), %rax
movq %r12, %rdx
xorl %ecx, %ecx
callq *0x10(%rax)
movslq 0xc(%r14), %rdi
decq %rdi
andq %r15, %rdi
addq %r12, %rdi
movl 0x8(%r14), %edx
movq 0x10(%r14), %rax
movl 0x24(%rax), %ecx
andl $0x1, %ecx
movq %rbx, %rsi
callq 0x4e0c0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl 0xc(%r14), %eax
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
cmpq %rcx, %rax
je 0x7b35c
movb $0x0, (%r12,%rcx)
incq %rcx
jmp 0x7b398
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/memstate.cc
// Function: MemoryPageOverlay::find(unsigned long) const
uintb MemoryPageOverlay::find(uintb addr) const

{
  uintb pageaddr = addr & ~((uintb)(getPageSize()-1));
  map<uintb,uint1 *>::const_iterator iter;

  iter = page.find(pageaddr);
  if (iter == page.end()) {
    if (underlie == (MemoryBank *)0)
      return (uintb)0;
    return underlie->find(addr);
  }

  const uint1 *pageptr = (*iter).second;

  uintb pageoffset = addr & ((uintb)(getPageSize()-1));
  return constructValue(pageptr+pageoffset,getWordSize(),getSpace()->isBigEndian());
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %eax, %eax
subl 0xc(%rdi), %eax
cltq
andq %rsi, %rax
movq %rsp, %rsi
movq %rax, (%rsi)
addq $0x20, %rdi
callq 0x4e630
leaq 0x28(%r14), %rcx
cmpq %rcx, %rax
je 0x7b3f7
movslq 0xc(%r14), %rdi
decq %rdi
andq %rbx, %rdi
addq 0x28(%rax), %rdi
movl 0x8(%r14), %esi
movq 0x10(%r14), %rax
movl 0x24(%rax), %edx
andl $0x1, %edx
callq 0x4fbf0
jmp 0x7b40d
movq 0x18(%r14), %rdi
testq %rdi, %rdi
je 0x7b40b
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x8(%rax)
jmp 0x7b40d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/memstate.cc
// Function: MemoryPageOverlay::getPage(unsigned long, unsigned char*, int, int) const
void MemoryPageOverlay::getPage(uintb addr,uint1 *res,int4 skip,int4 size) const

{
  map<uintb,uint1 *>::const_iterator iter;

  iter = page.find(addr);
  if (iter == page.end()) {
    if (underlie == (MemoryBank *)0) {
      for(int4 i=0;i<size;++i)
	res[i] = 0;
      return;
    }
    underlie->getPage(addr,res,skip,size);
    return;
  }
  const uint1 *pageptr = (*iter).second;
  memcpy(res,pageptr+skip,size);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %r8d, %ebx
movl %ecx, %ebp
movq %rdx, %r14
movq %rdi, %r15
movq %rsp, %rax
movq %rsi, (%rax)
addq $0x20, %rdi
movq %rax, %rsi
callq 0x4e630
leaq 0x28(%r15), %rcx
cmpq %rcx, %rax
je 0x7b457
movslq %ebp, %rsi
addq 0x28(%rax), %rsi
movslq %ebx, %rdx
movq %r14, %rdi
callq 0x4ef20
jmp 0x7b472
movq 0x18(%r15), %rdi
testq %rdi, %rdi
je 0x7b47d
movq (%rsp), %rsi
movq (%rdi), %rax
movq %r14, %rdx
movl %ebp, %ecx
movl %ebx, %r8d
callq *0x10(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
testl %ebx, %ebx
cmovlel %eax, %ebx
cmpq %rax, %rbx
je 0x7b472
movb $0x0, (%r14,%rax)
incq %rax
jmp 0x7b484
nop
// File: /workspace/github_cpp_makefile_star2_O2/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, %r12
movq %rsp, %rax
movq %rsi, (%rax)
leaq 0x20(%rdi), %r13
movq %r13, %rdi
movq %rax, %rsi
callq 0x50640
leaq 0x28(%r12), %rcx
cmpq %rcx, %rax
je 0x7b4d0
movq 0x28(%rax), %r15
jmp 0x7b50e
movslq 0xc(%r12), %rdi
callq 0x4d060
movq %rax, %r15
movq %rsp, %rsi
movq %r13, %rdi
callq 0x4ef80
movq %r15, (%rax)
movl 0xc(%r12), %r8d
cmpl %ebp, %r8d
je 0x7b50e
movq 0x18(%r12), %rdi
testq %rdi, %rdi
je 0x7b52e
movq (%rsp), %rsi
movq (%rdi), %rax
movq %r15, %rdx
xorl %ecx, %ecx
callq *0x10(%rax)
movslq %r14d, %rdi
addq %r15, %rdi
movslq %ebp, %rdx
movq %rbx, %rsi
callq 0x4ef20
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
testl %r8d, %r8d
cmovlel %eax, %r8d
cmpq %rax, %r8
je 0x7b50e
movb $0x0, (%r15,%rax)
incq %rax
jmp 0x7b537
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/memstate.cc
// Function: MemoryHashOverlay::insert(unsigned long, unsigned long)
void MemoryHashOverlay::insert(uintb addr,uintb val)

{
  int4 size = address.size();
  uintb offset = (addr>>alignshift) % size;
  for(int4 i=0;i<size;++i) {
    if (address[offset] == addr) { // Address has been seen before
      value[offset] = val;	   // Replace old value
      return;
    }
    else if (address[offset] == (uintb)0xBADBEEF) { // Address not seen before
      address[offset] = addr;			    // Claim this hash slot
      value[offset] = val;			    // Set value
      return;
    }
    offset = (offset + collideskip) % size;
  }
  throw LowlevelError("Memory state hash_table is full");
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdx, %r8
movq 0x38(%rdi), %rax
movq 0x30(%rdi), %r9
movb 0x20(%rdi), %cl
movq %rsi, %rdx
shrq %cl, %rdx
subq %r9, %rax
shrq $0x3, %rax
movslq %eax, %rcx
movq 0x28(%rdi), %r10
xorl %r11d, %r11d
testl %ecx, %ecx
cmovgl %ecx, %r11d
movq %rdx, %rax
xorl %edx, %edx
divq %rcx
subl $0x1, %r11d
jb 0x7b650
movq (%r9,%rdx,8), %rax
cmpq %rsi, %rax
je 0x7b63f
cmpq $0xbadbeef, %rax        # imm = 0xBADBEEF
je 0x7b63b
addq %r10, %rdx
jmp 0x7b617
movq %rsi, (%r9,%rdx,8)
movq 0x48(%rdi), %rax
movq %r8, (%rax,%rdx,8)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x4e180
movq %rax, %rbx
leaq 0xd4d5(%rip), %rsi      # 0x88b37
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 0x33816(%rip), %rsi     # 0xaeea0
movq 0x335a7(%rip), %rdx     # 0xaec38
movq %rbx, %rdi
callq 0x51630
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x4e020
testb %bpl, %bpl
jne 0x7b6b0
jmp 0x7b6b8
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/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, %r15
movl %edx, %ebx
movq %rdi, %r14
movq %rsi, 0x10(%rdi)
movl %edx, 0x8(%rdi)
movl %ecx, 0xc(%rdi)
movq 0x33827(%rip), %rax     # 0xaef78
addq $0x10, %rax
movq %rax, (%rdi)
leaq 0x30(%rdi), %r12
movslq %r8d, %r13
leaq 0x10(%rsp), %rbp
movq $0xbadbeef, (%rbp)      # imm = 0xBADBEEF
leaq 0xf(%rsp), %rcx
movq %r12, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x4d760
leaq 0x48(%r14), %rdi
andq $0x0, (%rbp)
leaq 0x10(%rsp), %rdx
leaq 0xf(%rsp), %rcx
movq %r13, %rsi
callq 0x4d760
movq %r15, 0x18(%r14)
movq $0x3ff, 0x28(%r14)      # imm = 0x3FF
decl %ebx
andl $0x0, 0x20(%r14)
pushq $0x1
popq %rax
testl %ebx, %ebx
je 0x7b7be
movl %eax, 0x20(%r14)
shrl %ebx
incl %eax
jmp 0x7b7b0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r12, %rdi
callq 0x4d320
movq %rbx, %rdi
callq 0x518c0
// File: /workspace/github_cpp_makefile_star2_O2/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 %rdi, %r14
movq 0x10(%rsi), %rax
movslq 0x60(%rax), %r13
leaq 0x8(%rdi), %r15
leaq 0x8(%rsp), %r12
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r13, %rcx
ja 0x7b82b
andq $0x0, 0x8(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x4f180
jmp 0x7b804
movq %rbx, (%rax,%r13,8)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7b89f
movq (%rsi,%rax,8), %rdi
testq %rdi, %rdi
je 0x7b89f
movq %rdx, %rsi
movl %ecx, %edx
movq %r8, %rcx
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x4f6e0
pushq $0x20
popq %rdi
callq 0x4e180
movq %rax, %rbx
addq $0x38, %r14
leaq 0xd2a2(%rip), %rsi      # 0x88b57
movq %rsp, %rdi
movq %r14, %rdx
callq 0x4f1c0
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x4ddf0
xorl %ebp, %ebp
movq 0x335c9(%rip), %rsi     # 0xaeea0
movq 0x3335a(%rip), %rdx     # 0xaec38
movq %rbx, %rdi
callq 0x51630
movq %rax, %r14
movq %rsp, %rdi
callq 0x4e020
testb %bpl, %bpl
jne 0x7b8fb
jmp 0x7b903
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/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 0x7b950
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 0x7b95c
movq (%rsi,%rax,8), %rdi
testq %rdi, %rdi
je 0x7b95c
movq %rdx, %rsi
movl %ecx, %edx
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x50da0
movq %rdx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x4e180
movq %rax, %rbx
addq $0x38, %r14
leaq 0xd20f(%rip), %rsi      # 0x88b81
movq %rsp, %rdi
movq %r14, %rdx
callq 0x4f1c0
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x4ddf0
xorl %ebp, %ebp
movq 0x3350c(%rip), %rsi     # 0xaeea0
movq 0x3329d(%rip), %rdx     # 0xaec38
movq %rbx, %rdi
callq 0x51630
movq %rax, %r14
movq %rsp, %rdi
callq 0x4e020
testb %bpl, %bpl
jne 0x7b9b8
jmp 0x7b9c0
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/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 0x7ba5d
movq (%rsi,%rdx,8), %rdi
testq %rdi, %rdi
je 0x7ba5d
movq %rcx, %rsi
movl %r8d, %edx
movq %rax, %rcx
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x4f520
pushq $0x20
popq %rdi
callq 0x4e180
movq %rax, %rbx
addq $0x38, %r14
leaq 0xd139(%rip), %rsi      # 0x88bac
movq %rsp, %rdi
movq %r14, %rdx
callq 0x4f1c0
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x4ddf0
xorl %ebp, %ebp
movq 0x3340b(%rip), %rsi     # 0xaeea0
movq 0x3319c(%rip), %rdx     # 0xaec38
movq %rbx, %rdi
callq 0x51630
movq %rax, %r14
movq %rsp, %rdi
callq 0x4e020
testb %bpl, %bpl
jne 0x7bab9
jmp 0x7bac1
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/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 0x7bb0f
movq (%rsi,%rdx,8), %rdi
testq %rdi, %rdi
je 0x7bb0f
movq %rcx, %rsi
movl %r8d, %edx
movq %rax, %rcx
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x50030
pushq $0x20
popq %rdi
callq 0x4e180
movq %rax, %rbx
addq $0x38, %r14
leaq 0xd0b2(%rip), %rsi      # 0x88bd7
movq %rsp, %rdi
movq %r14, %rdx
callq 0x4f1c0
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x4ddf0
xorl %ebp, %ebp
movq 0x33359(%rip), %rsi     # 0xaeea0
movq 0x330ea(%rip), %rdx     # 0xaec38
movq %rbx, %rdi
callq 0x51630
movq %rax, %r14
movq %rsp, %rdi
callq 0x4e020
testb %bpl, %bpl
jne 0x7bb6b
jmp 0x7bb73
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/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 0x7d05d
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 0x7d061
cmpq %r8, %rax
setb %al
jmp 0x7d067
xorl %eax, %eax
jmp 0x7d067
testq %rcx, %rcx
setne %al
movzbl %al, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x30, %rsp
cmpl $0x8, %ecx
pushq $0x8
popq %rdi
cmovgel %edi, %ecx
movslq %ecx, %rax
movq 0x31a45(%rip), %rcx     # 0xaebd0
movq (%rcx,%rax,8), %rax
movq %rax, %r8
shrq %r8
xorq %rax, %r8
testq %rdx, %r8
je 0x7d1bd
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
jne 0x7d1ce
andq %rdx, %rax
jmp 0x7d1c5
andq %rdx, %rax
cmpq %rdx, %rax
jne 0x7d219
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x4e180
movq %rax, %rbx
leaq 0xbb2e(%rip), %rsi      # 0x88d0e
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 0x31c08(%rip), %rsi     # 0xaee10
movq 0x31a29(%rip), %rdx     # 0xaec38
movq %rbx, %rdi
callq 0x51630
jmp 0x7d262
pushq $0x20
popq %rdi
callq 0x4e180
movq %rax, %rbx
leaq 0xbae3(%rip), %rsi      # 0x88d0e
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 0x31bbd(%rip), %rsi     # 0xaee10
movq 0x319de(%rip), %rdx     # 0xaec38
movq %rbx, %rdi
callq 0x51630
jmp 0x7d266
jmp 0x7d27a
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x4e020
testb %bpl, %bpl
jne 0x7d27d
jmp 0x7d285
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/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
pushq $0x8
popq %rcx
cmovll %edx, %ecx
movslq %ecx, %rcx
movq 0x318c8(%rip), %rdx     # 0xaebd0
andq (%rdx,%rcx,8), %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x30, %rsp
testl %esi, %esi
jne 0x7d411
movq %rcx, %rax
leal (,%rdx,8), %ecx
subl %r9d, %ecx
movq %rax, %rsi
shlq %cl, %rsi
cmpl $0x8, %edx
pushq $0x8
popq %rcx
cmovll %edx, %ecx
movslq %ecx, %rcx
movq 0x317d4(%rip), %rdx     # 0xaebd0
testq %rsi, (%rdx,%rcx,8)
jne 0x7d416
movl %r9d, %ecx
shrq %cl, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x51180
pushq $0x20
popq %rdi
callq 0x4e180
movq %rax, %rbx
leaq 0xb90f(%rip), %rsi      # 0x88d37
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 0x319c0(%rip), %rsi     # 0xaee10
movq 0x317e1(%rip), %rdx     # 0xaec38
movq %rbx, %rdi
callq 0x51630
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x4e020
testb %bpl, %bpl
jne 0x7d476
jmp 0x7d47e
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/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 %r14
pushq %rbx
subq $0x30, %rsp
testl %esi, %esi
jne 0x7d4db
movq %rcx, %rax
shll $0x3, %r8d
subl %r9d, %r8d
movq %rcx, %rdx
movl %r8d, %ecx
shrq %cl, %rdx
testq %rdx, %rdx
jne 0x7d4e0
movl %r9d, %ecx
shlq %cl, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x51180
pushq $0x20
popq %rdi
callq 0x4e180
movq %rax, %rbx
leaq 0xb874(%rip), %rsi      # 0x88d66
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 0x318f6(%rip), %rsi     # 0xaee10
movq 0x31717(%rip), %rdx     # 0xaec38
movq %rbx, %rdi
callq 0x51630
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x4e020
testb %bpl, %bpl
jne 0x7d540
jmp 0x7d548
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/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 0x4d990
movl %r14d, %ecx
shrq %cl, %rbx
testb %al, %al
je 0x7d595
cmpl $0x8, %ebp
pushq $0x8
popq %rax
cmovll %ebp, %eax
cltq
movq 0x3164e(%rip), %rcx     # 0xaebd0
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_O2/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 %r14
pushq %rbx
subq $0x30, %rsp
testl %esi, %esi
jne 0x7d5ea
movq %rcx, %rax
movl %r9d, %ecx
notl %ecx
leal (%rcx,%r8,8), %ecx
movq %rax, %rdx
shrq %cl, %rdx
xorl %ecx, %ecx
xorl %esi, %esi
cmpl %r9d, %esi
jg 0x7d5d3
movl %edx, %edi
andl $0x1, %edi
addl %edi, %ecx
shrq %rdx
incl %esi
jmp 0x7d5c0
leal 0x1(%r9), %edx
cmpl %edx, %ecx
jne 0x7d5ef
movl %r9d, %ecx
shlq %cl, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x51180
pushq $0x20
popq %rdi
callq 0x4e180
movq %rax, %rbx
leaq 0xb765(%rip), %rsi      # 0x88d66
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 0x317e7(%rip), %rsi     # 0xaee10
movq 0x31608(%rip), %rdx     # 0xaec38
movq %rbx, %rdi
callq 0x51630
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x4e020
testb %bpl, %bpl
jne 0x7d64f
jmp 0x7d657
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/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 %r14
pushq %rbx
subq $0x30, %rsp
testq %r8, %r8
je 0x7d809
movq %rcx, %rax
xorl %edx, %edx
divq %r8
movq %rdx, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x4e180
movq %rax, %rbx
leaq 0xb587(%rip), %rsi      # 0x88da2
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 0x315cd(%rip), %rsi     # 0xaee10
movq 0x313ee(%rip), %rdx     # 0xaec38
movq %rbx, %rdi
callq 0x51630
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x4e020
testb %bpl, %bpl
jne 0x7d869
jmp 0x7d871
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/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 0x7d8e9
movq %r8, %r14
movq %rcx, %r15
movl %esi, %ebx
leaq 0x10(%rsp), %rdi
movq %rcx, (%rdi)
movq %rsp, %r12
movq %r8, (%r12)
leal -0x1(,%rdx,8), %ebp
movl %ebp, %esi
callq 0x4f200
movq %r12, %rdi
movl %ebp, %esi
callq 0x4f200
movq %r15, %rax
xorl %edx, %edx
divq %r14
leaq 0x8(%rsp), %r14
movq %rdx, (%r14)
leal -0x1(,%rbx,8), %esi
movq %r14, %rdi
callq 0x51430
movq (%r14), %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x4e180
movq %rax, %rbx
leaq 0xb4a7(%rip), %rsi      # 0x88da2
leaq 0x10(%rsp), %rdi
movq %rsp, %rdx
callq 0x515e0
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x4ddf0
xorl %ebp, %ebp
movq 0x314ef(%rip), %rsi     # 0xaee10
movq 0x31310(%rip), %rdx     # 0xaec38
movq %rbx, %rdi
callq 0x51630
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x4e020
testb %bpl, %bpl
jne 0x7d947
jmp 0x7d94f
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/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 0x4f020
testq %rax, %rax
je 0x7d9a9
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x512a0
movq %r15, %rdi
callq 0x4d9f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x4f020
testq %rax, %rax
je 0x7d9e3
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x4fc00
movq %r15, %rdi
callq 0x4d9f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x4f020
testq %rax, %rax
je 0x7da1d
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x4e040
movq %r15, %rdi
callq 0x4d9f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x4f020
testq %rax, %rax
je 0x7da57
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x517a0
movq %r15, %rdi
callq 0x4d9f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x4f020
testq %rax, %rax
je 0x7da8c
movq %rax, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4f880
movq %r14, %rdi
callq 0x51c30
// File: /workspace/github_cpp_makefile_star2_O2/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 0x4f020
testq %rax, %rax
je 0x7dac5
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x4df70
movq %r15, %rdi
callq 0x4d9f0
nop