LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: obliviousram[P]PathOHeap/src/Block.cpp
// Function: operator<<(std::ostream&, Block const&)
std::ostream& operator<<(std::ostream& out, const Block& b) {
  if (b.leaf_id != -1) {
    out << "Block (leaf, t, k, v) = " << b.leaf_id << " " << b.t << " " << b.k << " [ ";
    for (std::byte byte : b.v) {
      out << std::to_integer<int>(byte) << " ";
    }
    out << "]";
  } else {
    out << "Dummy block";
  }
  return out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $-0x1, (%rax)
je 0x2902
movq -0x10(%rbp), %rdi
leaq 0xd7dc(%rip), %rsi      # 0x10004
callq 0x2180
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl (%rax), %esi
callq 0x2280
movq %rax, %rdi
leaq 0xdaa4(%rip), %rsi      # 0x102e9
callq 0x2180
movq %rax, %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x22d0
movq %rax, %rdi
leaq 0xda85(%rip), %rsi      # 0x102e9
callq 0x2180
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x10(%rax), %esi
callq 0x2280
movq %rax, %rdi
leaq 0xd79b(%rip), %rsi      # 0x1001d
callq 0x2180
movq -0x18(%rbp), %rax
addq $0x14, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x29b0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x29d0
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
je 0x28f0
movq -0x28(%rbp), %rax
movb (%rax), %al
movb %al, -0x31(%rbp)
movq -0x10(%rbp), %rdi
movb -0x31(%rbp), %al
movb %al, -0x1(%rbp)
movzbl -0x1(%rbp), %esi
callq 0x2280
movq %rax, %rdi
leaq 0xda0c(%rip), %rsi      # 0x102e9
callq 0x2180
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x28ad
movq -0x10(%rbp), %rdi
leaq 0xd726(%rip), %rsi      # 0x10021
callq 0x2180
jmp 0x2912
movq -0x10(%rbp), %rdi
leaq 0xd716(%rip), %rsi      # 0x10023
callq 0x2180
movq -0x10(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: obliviousram[P]PathOHeap/src/Bucket.cpp
// Function: Bucket::removeBlock(long)
std::optional<Block> Bucket::removeBlock(long t) {
  int removed_index = -1;
  for (int i = 0; i < this->blocks.size(); i++) {
    if (this->blocks.at(i).t == t) {
      removed_index = i;
      break;
    }
  }

  if (removed_index == -1) {
    return std::nullopt;
  } else {
    Block removed_copy = Block(this->blocks.at(removed_index));
    this->blocks.erase(this->blocks.begin() + removed_index);
    return std::optional<Block>{removed_copy};
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x90(%rbp)
movq %rdi, -0x88(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x18(%rbp)
movq -0x80(%rbp), %rdi
movslq -0x18(%rbp), %rax
movq %rax, -0x98(%rbp)
addq $0x38, %rdi
callq 0x3080
movq %rax, %rcx
movq -0x98(%rbp), %rax
cmpq %rcx, %rax
jae 0x2e8e
movq -0x80(%rbp), %rdi
addq $0x38, %rdi
movslq -0x18(%rbp), %rsi
callq 0x3120
movq 0x8(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x2e81
movl -0x18(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0x2e8e
jmp 0x2e83
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x2e37
cmpl $-0x1, -0x14(%rbp)
jne 0x2ea5
movq -0x90(%rbp), %rdi
callq 0x3160
jmp 0x2f28
movq -0x80(%rbp), %rdi
addq $0x38, %rdi
movslq -0x14(%rbp), %rsi
callq 0x3120
movq %rax, %rsi
leaq -0x58(%rbp), %rdi
movl $0x38, %edx
callq 0x2160
movq -0x80(%rbp), %rdi
movq %rdi, %rax
addq $0x38, %rax
movq %rax, -0xa0(%rbp)
addq $0x38, %rdi
callq 0x31f0
movq %rax, -0x70(%rbp)
movslq -0x14(%rbp), %rsi
leaq -0x70(%rbp), %rdi
callq 0x3220
movq %rax, -0x68(%rbp)
leaq -0x60(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x3260
movq -0xa0(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x3180
movq -0x90(%rbp), %rdi
movq %rax, -0x78(%rbp)
leaq -0x58(%rbp), %rsi
callq 0x32a0
movq -0x88(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: obliviousram[P]PathOHeap/src/Bucket.cpp
// Function: Bucket::setMaxSize(int)
void Bucket::setMaxSize(int maximum_size) {
  if (Bucket::is_init) {
    throw std::runtime_error("Max Bucket Size was already set");
  }
  Bucket::max_size = maximum_size;
  Bucket::is_init = true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
testb $0x1, 0x15241(%rip)     # 0x181b3
je 0x2fc4
movl $0x10, %edi
callq 0x20d0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x20(%rbp)
leaq 0xd0d0(%rip), %rsi      # 0x1005f
callq 0x20b0
jmp 0x2f96
movq -0x20(%rbp), %rdi
movq 0x1504f(%rip), %rsi     # 0x17ff0
movq 0x15018(%rip), %rdx     # 0x17fc0
callq 0x2270
movq -0x20(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x2130
jmp 0x2fda
movl -0x4(%rbp), %eax
movl %eax, 0x151d3(%rip)     # 0x181a0
movb $0x1, 0x151df(%rip)     # 0x181b3
addq $0x20, %rsp
popq %rbp
retq
movq -0x10(%rbp), %rdi
callq 0x22a0
nopw %cs:(%rax,%rax)
// File: obliviousram[P]PathOHeap/src/Job.cpp
// Function: Job::sampleData(int)
std::array<std::byte, Block::BLOCK_SIZE> Job::sampleData(int i) {
  std::array<std::byte, Block::BLOCK_SIZE> ret;
  ret.fill(std::byte{0});
  ret.at(0) = static_cast<std::byte>((i >> 24) & 0xFF);
  ret.at(1) = static_cast<std::byte>((i >> 16) & 0xFF);
  ret.at(2) = static_cast<std::byte>((i >> 8) & 0xFF);
  ret.at(3) = static_cast<std::byte>(i & 0xFF);
  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x20(%rbp)
movq %rdi, %rax
movq %rax, -0x10(%rbp)
movl %esi, -0x4(%rbp)
movb $0x0, -0x5(%rbp)
leaq -0x5(%rbp), %rsi
callq 0x2920
movq -0x20(%rbp), %rdi
movl -0x4(%rbp), %eax
sarl $0x18, %eax
andl $0xff, %eax
movb %al, -0x23(%rbp)
xorl %eax, %eax
movl %eax, %esi
callq 0x46c0
movb -0x23(%rbp), %cl
movq -0x20(%rbp), %rdi
movb %cl, (%rax)
movl -0x4(%rbp), %eax
sarl $0x10, %eax
andl $0xff, %eax
movb %al, -0x22(%rbp)
movl $0x1, %esi
callq 0x46c0
movb -0x22(%rbp), %cl
movq -0x20(%rbp), %rdi
movb %cl, (%rax)
movl -0x4(%rbp), %eax
sarl $0x8, %eax
andl $0xff, %eax
movb %al, -0x21(%rbp)
movl $0x2, %esi
callq 0x46c0
movb -0x21(%rbp), %cl
movq -0x20(%rbp), %rdi
movb %cl, (%rax)
movl -0x4(%rbp), %eax
andl $0xff, %eax
movb %al, -0x11(%rbp)
movl $0x3, %esi
callq 0x46c0
movb -0x11(%rbp), %dl
movq %rax, %rcx
movq -0x10(%rbp), %rax
movb %dl, (%rcx)
addq $0x30, %rsp
popq %rbp
retq
// File: obliviousram[P]PathOHeap/src/OHeapReadPathEviction.cpp
// Function: OHeapReadPathEviction::findMin()
Block OHeapReadPathEviction::findMin() {
  Block ret = this->onlyFindMin();

  if (this->type_hiding_security) {
    this->onlyDeleteBlock(-1, -1);
    this->insertDummyBlock();
  }

  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, %rax
movq %rax, -0x50(%rbp)
movq %rsi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x48(%rbp)
callq 0x7e10
movq -0x48(%rbp), %rax
testb $0x1, 0x28(%rax)
je 0x7dfc
movq -0x48(%rbp), %rsi
leaq -0x40(%rbp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq $-0x1, %rcx
callq 0x7f10
movq -0x48(%rbp), %rdi
callq 0x80f0
movq -0x50(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: obliviousram[P]PathOHeap/src/OHeapReadPathEviction.cpp
// Function: OHeapReadPathEviction::onlyFindMin()
Block OHeapReadPathEviction::onlyFindMin() {
  Block min = this->storage->readBucket(P(0,0)).subtree_min;
  if (this->stash.size() > 0) {
    const Block& stash_min = *std::min_element(this->stash.begin(), this->stash.end());
    if (stash_min < min) {
      min = stash_min;
    }
  }
  return min;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x88(%rbp)
movq %rdi, -0x98(%rbp)
movq %rsi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x80(%rbp)
movq 0x30(%rdi), %rax
movq %rax, -0x90(%rbp)
movq (%rdi), %rax
xorl %edx, %edx
movl %edx, %esi
callq *0x30(%rax)
movq -0x90(%rbp), %rsi
movl %eax, %edx
movq (%rsi), %rax
leaq -0x58(%rbp), %rdi
callq *0x8(%rax)
movq -0x88(%rbp), %rdi
leaq -0x58(%rbp), %rsi
movl $0x38, %edx
callq 0x2160
leaq -0x58(%rbp), %rdi
callq 0x9ae0
movq -0x80(%rbp), %rdi
addq $0x40, %rdi
callq 0x3080
cmpq $0x0, %rax
jbe 0x7efb
movq -0x80(%rbp), %rdi
addq $0x40, %rdi
callq 0x31f0
movq -0x80(%rbp), %rdi
movq %rax, -0x70(%rbp)
addq $0x40, %rdi
callq 0x3840
movq %rax, -0x78(%rbp)
movq -0x70(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x9b60
movq %rax, -0x68(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x9ba0
movq -0x88(%rbp), %rsi
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdi
callq 0x26f0
testb $0x1, %al
jne 0x7ee4
jmp 0x7ef9
movq -0x88(%rbp), %rdi
movq -0x60(%rbp), %rsi
movl $0x34, %edx
callq 0x2160
jmp 0x7efb
movq -0x98(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: obliviousram[P]PathOHeap/src/OHeapReadPathEviction.cpp
// Function: OHeapReadPathEviction::onlyDeleteBlock(int, long)
Block OHeapReadPathEviction::onlyDeleteBlock(int leaf, long t) {
  // try to delete from stash
  int removed_index = -1;
  for (int i = 0; i < stash.size(); i++) {
    Block& stash_block_ref = stash.at(i);
    if (stash_block_ref.leaf_id == leaf && stash_block_ref.t == t) {
      removed_index = i;
      break;
    }
  }

  Block stash_block = Block();
  if (removed_index != -1) {
    stash_block = Block(stash.at(removed_index));
    stash.erase(stash.begin() + removed_index);
  }

  // try to delete from storage (dummy ops if block was found in stash)
  Block storage_block = this->readAndRemove(leaf, t);
  this->evictAndUpdateMin(leaf);

  if (stash_block.t != -1) {
    return stash_block;
  } else {
    return storage_block;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0x108(%rbp)
movq %rdi, -0x100(%rbp)
movq %rsi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movq %rcx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xf8(%rbp)
movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x20(%rbp)
movq -0xf8(%rbp), %rdi
movslq -0x20(%rbp), %rax
movq %rax, -0x110(%rbp)
addq $0x40, %rdi
callq 0x3080
movq %rax, %rcx
movq -0x110(%rbp), %rax
cmpq %rcx, %rax
jae 0x7fbd
movq -0xf8(%rbp), %rdi
addq $0x40, %rdi
movslq -0x20(%rbp), %rsi
callq 0x3120
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl (%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x7fb0
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x18(%rbp), %rax
jne 0x7fb0
movl -0x20(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0x7fbd
jmp 0x7fb2
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x7f4d
leaq -0x60(%rbp), %rdi
callq 0x26b0
cmpl $-0x1, -0x1c(%rbp)
je 0x8076
movq -0xf8(%rbp), %rdi
addq $0x40, %rdi
movslq -0x1c(%rbp), %rsi
callq 0x3120
movq %rax, %rsi
leaq -0x98(%rbp), %rdi
movl $0x34, %edx
callq 0x2160
leaq -0x60(%rbp), %rdi
leaq -0x98(%rbp), %rsi
movl $0x34, %edx
callq 0x2160
movq -0xf8(%rbp), %rdi
movq %rdi, %rax
addq $0x40, %rax
movq %rax, -0x118(%rbp)
addq $0x40, %rdi
callq 0x31f0
movq %rax, -0xb0(%rbp)
movslq -0x1c(%rbp), %rsi
leaq -0xb0(%rbp), %rdi
callq 0x3220
movq %rax, -0xa8(%rbp)
leaq -0xa0(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x3260
movq -0x118(%rbp), %rdi
movq -0xa0(%rbp), %rsi
callq 0x3180
movq %rax, -0xb8(%rbp)
movq -0xf8(%rbp), %rsi
movl -0xc(%rbp), %edx
movq -0x18(%rbp), %rcx
leaq -0xf0(%rbp), %rdi
callq 0x8df0
movq -0xf8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x8670
cmpq $-0x1, -0x58(%rbp)
je 0x80bd
movq -0x108(%rbp), %rdi
leaq -0x60(%rbp), %rsi
movl $0x38, %edx
callq 0x2160
jmp 0x80d5
movq -0x108(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
movl $0x38, %edx
callq 0x2160
movq -0x100(%rbp), %rax
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: obliviousram[P]PathOHeap/src/OHeapReadPathEviction.cpp
// Function: OHeapReadPathEviction::deleteBlock(int, long)
Block OHeapReadPathEviction::deleteBlock(int leaf, long t) {
  if (this->type_hiding_security) {
    this->onlyFindMin();
  }
    
  Block ret = this->onlyDeleteBlock(leaf, t);
    
  if (this->type_hiding_security) {
    this->insertDummyBlock();
  }

  this->t++;
  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x68(%rbp)
movq %rdi, -0x60(%rbp)
movq %rsi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movq %rcx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
testb $0x1, 0x28(%rax)
je 0x8146
movq -0x58(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x7e10
movq -0x58(%rbp), %rsi
movq -0x68(%rbp), %rdi
movl -0xc(%rbp), %edx
movq -0x18(%rbp), %rcx
callq 0x7f10
movq -0x58(%rbp), %rax
testb $0x1, 0x28(%rax)
je 0x816d
movq -0x58(%rbp), %rdi
callq 0x80f0
movq -0x60(%rbp), %rax
movq -0x58(%rbp), %rcx
movq 0x20(%rcx), %rdx
addq $0x1, %rdx
movq %rdx, 0x20(%rcx)
addq $0x70, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: obliviousram[P]PathOHeap/src/OHeapReadPathEviction.cpp
// Function: OHeapReadPathEviction::insertBlock(int, std::array<std::byte, 32ul>)
std::pair<int, int> OHeapReadPathEviction::insertBlock(int k, std::array<std::byte, Block::BLOCK_SIZE> v) {
  if (this->type_hiding_security) {
    this->onlyFindMin();
    this->onlyDeleteBlock(-1, -1);
  }

  auto ret = std::pair<int, int>(-1, -1);

  if (k != INT_MAX) {
    ret = this->onlyInsertBlock(k, v);
  } else {
    this->insertDummyBlock();
  }

  this->t++;
  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xc0(%rbp)
testb $0x1, 0x28(%rax)
je 0x81ed
movq -0xc0(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x7e10
movq -0xc0(%rbp), %rsi
leaq -0x88(%rbp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq $-0x1, %rcx
callq 0x7f10
movl $0xffffffff, -0x8c(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x90(%rbp) # imm = 0xFFFFFFFF
leaq -0x8(%rbp), %rdi
leaq -0x8c(%rbp), %rsi
leaq -0x90(%rbp), %rdx
callq 0x9b00
cmpl $0x7fffffff, -0x14(%rbp) # imm = 0x7FFFFFFF
je 0x82a8
movq -0xc0(%rbp), %rdi
movq -0xc8(%rbp), %rax
movl -0x14(%rbp), %esi
movq (%rax), %rcx
movq %rcx, -0xb8(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0xb0(%rbp)
movq 0x10(%rax), %rcx
movq %rcx, -0xa8(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0xa0(%rbp)
leaq -0xb8(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0x82e0
movq %rax, -0x98(%rbp)
leaq -0x8(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x9b30
jmp 0x82b4
movq -0xc0(%rbp), %rdi
callq 0x80f0
movq -0xc0(%rbp), %rax
movq 0x20(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
addq $0xf0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: obliviousram[P]PathOHeap/src/OHeapReadPathEviction.cpp
// Function: OHeapReadPathEviction::onlyInsertBlock(int, std::array<std::byte, 32ul>)
std::pair<int, int> OHeapReadPathEviction::onlyInsertBlock(int k, std::array<std::byte, Block::BLOCK_SIZE> v) {
  auto ret = std::pair<int, int>();

  int leaf = this->rand_gen->getRandomLeaf();
  stash.push_back(Block(leaf, this->t, k, v));
  
  ret.first = leaf;
  ret.second = this->t;

  this->evictAfterInsert();

  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x9bc0
movq -0x78(%rbp), %rax
movq 0x38(%rax), %rdi
movq (%rdi), %rax
callq *(%rax)
movq -0x78(%rbp), %rcx
movl %eax, %edx
movq -0x88(%rbp), %rax
movl %edx, -0x18(%rbp)
movq %rcx, %rdx
addq $0x40, %rdx
movq %rdx, -0x80(%rbp)
movl -0x18(%rbp), %esi
movq 0x20(%rcx), %rdx
movl -0x14(%rbp), %ecx
movq (%rax), %rdi
movq %rdi, -0x70(%rbp)
movq 0x8(%rax), %rdi
movq %rdi, -0x68(%rbp)
movq 0x10(%rax), %rdi
movq %rdi, -0x60(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x58(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rax
movq (%rax), %r8
movq %r8, (%rsp)
movq 0x8(%rax), %r8
movq %r8, 0x8(%rsp)
movq 0x10(%rax), %r8
movq %r8, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0x2660
movq -0x80(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x9be0
movq -0x78(%rbp), %rdi
movl -0x18(%rbp), %eax
movl %eax, -0x8(%rbp)
movq 0x20(%rdi), %rax
movl %eax, -0x4(%rbp)
callq 0x85f0
movq -0x8(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
nop
// File: obliviousram[P]PathOHeap/src/OHeapReadPathEviction.cpp
// Function: OHeapReadPathEviction::extractMin()
Block OHeapReadPathEviction::extractMin() {
  Block min_block = this->onlyFindMin();
  Block ret = this->onlyDeleteBlock(min_block.leaf_id, min_block.t);

  if (this->type_hiding_security) {
    this->insertDummyBlock();
  }

  this->t++;
  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x50(%rbp)
movq %rdi, -0x58(%rbp)
movq %rsi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x48(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x7e10
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
movl -0x40(%rbp), %edx
movq -0x38(%rbp), %rcx
callq 0x7f10
movq -0x48(%rbp), %rax
testb $0x1, 0x28(%rax)
je 0x840c
movq -0x48(%rbp), %rdi
callq 0x80f0
movq -0x58(%rbp), %rax
movq -0x48(%rbp), %rcx
movq 0x20(%rcx), %rdx
addq $0x1, %rdx
movq %rdx, 0x20(%rcx)
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: obliviousram[P]PathOHeap/src/OHeapReadPathEviction.cpp
// Function: OHeapReadPathEviction::decreaseKey(int, long)
std::pair<int, int> OHeapReadPathEviction::decreaseKey(int leaf, long t) {
  if (this->type_hiding_security) {
    this->onlyFindMin();
  }

  Block old_block = this->onlyDeleteBlock(leaf, t);
  auto ret = this->onlyInsertBlock(old_block.k - 1, old_block.v);

  this->t++;
  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xb8(%rbp)
testb $0x1, 0x28(%rax)
je 0x8467
movq -0xb8(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x7e10
movq -0xb8(%rbp), %rsi
movl -0x14(%rbp), %edx
movq -0x20(%rbp), %rcx
leaq -0x90(%rbp), %rdi
callq 0x7f10
movq -0xb8(%rbp), %rdi
movl -0x80(%rbp), %esi
subl $0x1, %esi
movq -0x7c(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x74(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x6c(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x64(%rbp), %rax
movq %rax, -0x98(%rbp)
leaq -0xb0(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0x82e0
movq %rax, %rcx
movq -0xb8(%rbp), %rax
movq %rcx, -0x8(%rbp)
movq 0x20(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
addq $0xe0, %rsp
popq %rbp
retq
nop
// File: obliviousram[P]PathOHeap/src/OHeapReadPathEviction.cpp
// Function: OHeapReadPathEviction::increaseKey(int, long)
std::pair<int, int> OHeapReadPathEviction::increaseKey(int leaf, long t) {
  if (this->type_hiding_security) {
    this->onlyFindMin();
  }

  Block old_block = this->onlyDeleteBlock(leaf, t);
  auto ret = this->onlyInsertBlock(old_block.k + 1, old_block.v);

  this->t++;
  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xb8(%rbp)
testb $0x1, 0x28(%rax)
je 0x8547
movq -0xb8(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x7e10
movq -0xb8(%rbp), %rsi
movl -0x14(%rbp), %edx
movq -0x20(%rbp), %rcx
leaq -0x90(%rbp), %rdi
callq 0x7f10
movq -0xb8(%rbp), %rdi
movl -0x80(%rbp), %esi
addl $0x1, %esi
movq -0x7c(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x74(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x6c(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x64(%rbp), %rax
movq %rax, -0x98(%rbp)
leaq -0xb0(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0x82e0
movq %rax, %rcx
movq -0xb8(%rbp), %rax
movq %rcx, -0x8(%rbp)
movq 0x20(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
addq $0xe0, %rsp
popq %rbp
retq
nop
// File: obliviousram[P]PathOHeap/src/OHeapReadPathEviction.cpp
// Function: OHeapReadPathEviction::evictAfterInsert()
void OHeapReadPathEviction::evictAfterInsert() {
  // two random paths non-overlapping except at the root
  // = random leaf_id in the first half and random leaf_id in the second half (over all leaf_ids)
  int random_leaf_one = this->rand_gen->getRandomLeaf()/2;
  int random_leaf_two = this->rand_gen->getRandomLeaf()/2 + this->num_leaves/2;

  this->evictAndUpdateMin(random_leaf_one);
  this->evictAndUpdateMin(random_leaf_two);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0x38(%rax), %rdi
movq (%rdi), %rax
callq *(%rax)
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, -0xc(%rbp)
movq 0x38(%rax), %rdi
movq (%rdi), %rax
callq *(%rax)
movq -0x18(%rbp), %rdi
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x1c(%rbp)
movl 0x10(%rdi), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x1c(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %esi
callq 0x8670
movq -0x18(%rbp), %rdi
movl -0x10(%rbp), %esi
callq 0x8670
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: obliviousram[P]PathOHeap/src/PlainHeapComparisonTest.cpp
// Function: PlainHeapComparisonTest::randomOp()
std::pair<PlainHeapComparisonTest::Operation, int> PlainHeapComparisonTest::randomOp() {
  // Bias towards push over pop so the heap eventually fills up, but never push if
  // full or pop if empty.
  Operation op;
  if (this->plain_heap.size() == 0) {
    op = PUSH;
  } else if (this->plain_heap.size() == this->max_heap_size) {
    op = POP;
  } else {
    int r = rand() % 3;
    op = (r >= 1) ? PUSH : POP;
  }

  return std::make_pair(op, rand() % 1000000);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x28(%rbp)
callq 0x53a0
cmpq $0x0, %rax
jne 0xc798
movl $0x0, -0x14(%rbp)
jmp 0xc7dc
movq -0x28(%rbp), %rdi
callq 0x53a0
movq -0x28(%rbp), %rcx
movslq 0x18(%rcx), %rcx
cmpq %rcx, %rax
jne 0xc7b7
movl $0x1, -0x14(%rbp)
jmp 0xc7da
callq 0x2080
movl $0x3, %ecx
cltd
idivl %ecx
movl %edx, -0x18(%rbp)
movl -0x18(%rbp), %edx
movl $0x1, %eax
xorl %ecx, %ecx
cmpl $0x1, %edx
cmovgel %ecx, %eax
movl %eax, -0x14(%rbp)
jmp 0xc7dc
callq 0x2080
movl $0xf4240, %ecx          # imm = 0xF4240
cltd
idivl %ecx
movl %edx, -0x1c(%rbp)
leaq -0x14(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
callq 0xcc30
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: obliviousram[P]PathOHeap/src/RandomForOHeap.cpp
// Function: RandomForOHeap::RandomForOHeap()
RandomForOHeap::RandomForOHeap() {
  if (RandomForOHeap::is_initialized) {
    throw std::runtime_error("Only one random instance can be used at a time!");
  }

  this->bound = -1;
  rnd_generator.seed(0L);
  this->seed = (seed ^ 0x5DEECE66DL) & ((1L << 48) - 1);
  RandomForOHeap::is_initialized  = true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
callq 0xd470
movq -0x20(%rbp), %rdi
leaq 0xaa94(%rip), %rax      # 0x17cb8
addq $0x10, %rax
movq %rax, (%rdi)
addq $0x10, %rdi
callq 0xd490
movq -0x20(%rbp), %rax
movq $0x0, 0x18(%rax)
testb $0x1, 0xaf72(%rip)      # 0x181b9
je 0xd299
movl $0x10, %edi
callq 0x20d0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x28(%rbp)
leaq 0x30c9(%rip), %rsi      # 0x1032d
callq 0x20b0
jmp 0xd26b
movq -0x28(%rbp), %rdi
movq 0xad7a(%rip), %rsi      # 0x17ff0
movq 0xad43(%rip), %rdx      # 0x17fc0
callq 0x2270
movq -0x28(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x2130
jmp 0xd2e1
movq -0x20(%rbp), %rdi
movl $0xffffffff, 0x8(%rdi)  # imm = 0xFFFFFFFF
addq $0x10, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xd4b0
movq -0x20(%rbp), %rax
movabsq $0x5deece66d, %rcx      # imm = 0x5DEECE66D
xorq 0x18(%rax), %rcx
movabsq $0xffffffffffff, %rdx   # imm = 0xFFFFFFFFFFFF
andq %rdx, %rcx
movq %rcx, 0x18(%rax)
movb $0x1, 0xaede(%rip)      # 0x181b9
addq $0x30, %rsp
popq %rbp
retq
movq -0x10(%rbp), %rdi
callq 0x22a0
nopw (%rax,%rax)
// File: obliviousram[P]PathOHeap/src/RandomForOHeap.cpp
// Function: RandomForOHeap::getRandomLeaf()
int RandomForOHeap::getRandomLeaf() {
  if (this->bound == -1) {
    throw std::runtime_error("Bound is not set.");
  }

  long next = (seed * 0x5DEECE66DL + 0xBL) & ((1L << 48) - 1);
  this->seed = next;
  int bits = next >> (48 - 31);
  if ((this->bound & -this->bound) == this->bound) {  // if bound is a power of 2
    return (int)((this->bound * (long)bits) >> 31);
  }
  int val = bits % this->bound;
  while (bits - val + (this->bound-1) < 0) {
    next = (seed * 0x5DEECE66DL + 0xBL) & ((1L << 48) - 1);
    this->seed = next;
    bits = next >> (48 - 31);
    val = bits % this->bound;
  }
  return val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpl $-0x1, 0x8(%rax)
jne 0xd35d
movl $0x10, %edi
callq 0x20d0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x40(%rbp)
leaq 0x3038(%rip), %rsi      # 0x1035d
callq 0x20b0
jmp 0xd32c
movq -0x40(%rbp), %rdi
movq 0xacb9(%rip), %rsi      # 0x17ff0
movq 0xac82(%rip), %rdx      # 0x17fc0
callq 0x2270
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x2130
jmp 0xd43b
movq -0x38(%rbp), %rcx
movabsq $0x5deece66d, %rax      # imm = 0x5DEECE66D
imulq 0x18(%rcx), %rax
addq $0xb, %rax
movabsq $0xffffffffffff, %rdx   # imm = 0xFFFFFFFFFFFF
andq %rdx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, 0x18(%rcx)
movq -0x28(%rbp), %rax
sarq $0x11, %rax
movl %eax, -0x2c(%rbp)
movl 0x8(%rcx), %eax
xorl %edx, %edx
subl 0x8(%rcx), %edx
andl %edx, %eax
cmpl 0x8(%rcx), %eax
jne 0xd3c0
movq -0x38(%rbp), %rax
movslq 0x8(%rax), %rax
movslq -0x2c(%rbp), %rcx
imulq %rcx, %rax
sarq $0x1f, %rax
movl %eax, -0x4(%rbp)
jmp 0xd432
movq -0x38(%rbp), %rcx
movl -0x2c(%rbp), %eax
cltd
idivl 0x8(%rcx)
movl %edx, -0x30(%rbp)
movq -0x38(%rbp), %rcx
movl -0x2c(%rbp), %eax
subl -0x30(%rbp), %eax
movl 0x8(%rcx), %ecx
subl $0x1, %ecx
addl %ecx, %eax
cmpl $0x0, %eax
jge 0xd42c
movq -0x38(%rbp), %rcx
movabsq $0x5deece66d, %rax      # imm = 0x5DEECE66D
imulq 0x18(%rcx), %rax
addq $0xb, %rax
movabsq $0xffffffffffff, %rdx   # imm = 0xFFFFFFFFFFFF
andq %rdx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, 0x18(%rcx)
movq -0x28(%rbp), %rax
sarq $0x11, %rax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cltd
idivl 0x8(%rcx)
movl %edx, -0x30(%rbp)
jmp 0xd3ce
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x22a0
nopw %cs:(%rax,%rax)
// File: obliviousram[P]PathOHeap/src/ServerStorage.cpp
// Function: ServerStorage::setCapacity(int)
void ServerStorage::setCapacity(int total_num_of_buckets) {
  if (this->is_capacity_set) {
    throw std::runtime_error("Capacity of ServerStorage cannot be changed");
  }
  this->is_capacity_set = true;
  this->capacity = total_num_of_buckets;
  this->buckets.assign(total_num_of_buckets, Bucket());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
testb $0x1, 0xab2b(%rip)      # 0x181bc
je 0xd6e3
movl $0x10, %edi
callq 0x20d0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x80(%rbp)
leaq 0x2d2f(%rip), %rsi      # 0x103dd
callq 0x20b0
jmp 0xd6b5
movq -0x80(%rbp), %rdi
movq 0xa930(%rip), %rsi      # 0x17ff0
movq 0xa8f9(%rip), %rdx      # 0x17fc0
callq 0x2270
movq -0x80(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x2130
jmp 0xd75d
movq -0x78(%rbp), %rax
movb $0x1, 0xaace(%rip)      # 0x181bc
movl -0xc(%rbp), %ecx
movl %ecx, 0x8(%rax)
addq $0x10, %rax
movq %rax, -0x98(%rbp)
movslq -0xc(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq -0x70(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x2cf0
movq -0x98(%rbp), %rdi
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
callq 0xda90
jmp 0xd736
leaq -0x70(%rbp), %rdi
callq 0x9ae0
addq $0xa0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x9ae0
movq -0x18(%rbp), %rdi
callq 0x22a0
nopw %cs:(%rax,%rax)
// File: obliviousram[P]PathOHeap/src/ServerStorage.cpp
// Function: ServerStorage::checkRWValid(int)
void ServerStorage::checkRWValid(int position) {
  if (!this->is_capacity_set) {
    throw std::runtime_error("Please call setCapacity before reading or writing any block");
  }
  if (position >= this->capacity || position < 0) {
    throw std::runtime_error("You are trying to access Bucket " + std::to_string(position) +
        ", but this Server contains only " + std::to_string(this->capacity) + " buckets.");
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xf0(%rbp)
testb $0x1, 0xaa28(%rip)      # 0x181bc
jne 0xd7f2
movl $0x10, %edi
callq 0x20d0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xf8(%rbp)
leaq 0x2c55(%rip), %rsi      # 0x10409
callq 0x20b0
jmp 0xd7bb
movq -0xf8(%rbp), %rdi
movq 0xa827(%rip), %rsi      # 0x17ff0
movq 0xa7f0(%rip), %rdx      # 0x17fc0
callq 0x2270
movq -0xf8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x2130
jmp 0xd9a9
movq -0xf0(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0x8(%rcx), %eax
jge 0xd80b
cmpl $0x0, -0xc(%rbp)
jge 0xd9a0
movb $0x1, -0xe1(%rbp)
movl $0x10, %edi
callq 0x20d0
movq %rax, -0x100(%rbp)
movl -0xc(%rbp), %esi
leaq -0xc0(%rbp), %rdi
callq 0xdc30
jmp 0xd834
leaq 0x2c0a(%rip), %rsi      # 0x10445
leaq -0xa0(%rbp), %rdi
leaq -0xc0(%rbp), %rdx
callq 0xdbe0
jmp 0xd850
leaq 0x2c0f(%rip), %rdx      # 0x10466
leaq -0x80(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0xdac0
jmp 0xd869
movq -0xf0(%rbp), %rax
movl 0x8(%rax), %esi
leaq -0xe0(%rbp), %rdi
callq 0xdc30
jmp 0xd881
leaq -0x60(%rbp), %rdi
leaq -0x80(%rbp), %rsi
leaq -0xe0(%rbp), %rdx
callq 0xdb10
jmp 0xd897
leaq 0x2be9(%rip), %rdx      # 0x10487
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0xdac0
jmp 0xd8ad
movq -0x100(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x2240
jmp 0xd8bf
movq -0x100(%rbp), %rdi
movb $0x0, -0xe1(%rbp)
movq 0xa71c(%rip), %rsi      # 0x17ff0
movq 0xa6e5(%rip), %rdx      # 0x17fc0
callq 0x2270
jmp 0xd9b2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0xd987
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0xd97b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0xd96f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0xd966
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0xd95a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0xd951
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x2110
leaq -0x60(%rbp), %rdi
callq 0x2110
leaq -0xe0(%rbp), %rdi
callq 0x2110
leaq -0x80(%rbp), %rdi
callq 0x2110
leaq -0xa0(%rbp), %rdi
callq 0x2110
leaq -0xc0(%rbp), %rdi
callq 0x2110
testb $0x1, -0xe1(%rbp)
jne 0xd992
jmp 0xd99e
movq -0x100(%rbp), %rdi
callq 0x2130
jmp 0xd9a9
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x22a0
nopw %cs:(%rax,%rax)
// File: NGageMegaman[P]NEScutre/src/cpu.cpp
// Function: Cpu::Cpu()
Cpu::Cpu() {
    regX = regY = regA = 0x00;
    regPC = mem.read_word(0xFFFC);
    regSP = 0x01ff;
    regP.C = regP.Z = regP.I = regP.D = regP.B = regP.V = regP.N = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
addq $0x8, %rdi
callq 0x48c0
movq -0x10(%rbp), %rdi
movb $0x0, 0x10020(%rdi)
movb $0x0, 0x10022(%rdi)
movb $0x0, 0x10021(%rdi)
addq $0x8, %rdi
movl $0xfffc, %esi           # imm = 0xFFFC
callq 0x4bb0
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x10024(%rax)
movw $0x1ff, 0x10026(%rax)   # imm = 0x1FF
movb $0x0, 0x1002e(%rax)
movb $0x0, 0x1002d(%rax)
movb $0x0, 0x1002c(%rax)
movb $0x0, 0x1002b(%rax)
movb $0x0, 0x1002a(%rax)
movb $0x0, 0x10029(%rax)
movb $0x0, 0x10028(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: NGageMegaman[P]NEScutre/src/cpu.cpp
// Function: Cpu::ADC_execute(unsigned char)
void Cpu::ADC_execute(uint8_t operand) {
    // Add with carry
    // A,Z,C,N = A+M+C
    uint8_t result_part = regA + operand;
    bool signResult, signRegA, signOperand;
    bool isCarry = false;

    if (result_part < regA) isCarry = true;
    
    uint8_t result = result_part + regP.C;

    if (result < result_part) isCarry = true;
    

    signResult = (result >> 7) & 1; //Mask to eliminate the carry
    signRegA = (regA >> 7) & 1;
    signOperand = (operand >> 7) & 1;

    regP.Z = result == 0;
    regP.C = isCarry;
    regP.V = ((signRegA == signOperand) && (signResult != signRegA));
    regP.N = signResult;

    regA = result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movzbl 0x10020(%rcx), %eax
movzbl -0x9(%rbp), %edx
addl %edx, %eax
movb %al, -0xa(%rbp)
movb $0x0, -0xe(%rbp)
movzbl -0xa(%rbp), %eax
movzbl 0x10020(%rcx), %ecx
cmpl %ecx, %eax
jge 0x1c2d
movb $0x1, -0xe(%rbp)
movq -0x18(%rbp), %rcx
movzbl -0xa(%rbp), %eax
movb 0x10028(%rcx), %cl
andb $0x1, %cl
movzbl %cl, %ecx
addl %ecx, %eax
movb %al, -0xf(%rbp)
movzbl -0xf(%rbp), %eax
movzbl -0xa(%rbp), %ecx
cmpl %ecx, %eax
jge 0x1c56
movb $0x1, -0xe(%rbp)
movq -0x18(%rbp), %rax
movzbl -0xf(%rbp), %ecx
sarl $0x7, %ecx
andl $0x1, %ecx
cmpl $0x0, %ecx
setne %cl
andb $0x1, %cl
movb %cl, -0xb(%rbp)
movzbl 0x10020(%rax), %ecx
sarl $0x7, %ecx
andl $0x1, %ecx
cmpl $0x0, %ecx
setne %cl
andb $0x1, %cl
movb %cl, -0xc(%rbp)
movzbl -0x9(%rbp), %ecx
sarl $0x7, %ecx
andl $0x1, %ecx
cmpl $0x0, %ecx
setne %cl
andb $0x1, %cl
movb %cl, -0xd(%rbp)
movzbl -0xf(%rbp), %ecx
cmpl $0x0, %ecx
sete %cl
andb $0x1, %cl
movb %cl, 0x10029(%rax)
movb -0xe(%rbp), %cl
andb $0x1, %cl
movb %cl, 0x10028(%rax)
movb -0xc(%rbp), %al
andb $0x1, %al
movzbl %al, %ecx
movb -0xd(%rbp), %al
andb $0x1, %al
movzbl %al, %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x19(%rbp)
jne 0x1cf0
movb -0xb(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb -0xc(%rbp), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
setne %al
movb %al, -0x19(%rbp)
movq -0x18(%rbp), %rax
movb -0x19(%rbp), %cl
andb $0x1, %cl
movb %cl, 0x1002d(%rax)
movb -0xb(%rbp), %cl
andb $0x1, %cl
movb %cl, 0x1002e(%rax)
movb -0xf(%rbp), %cl
movb %cl, 0x10020(%rax)
popq %rbp
retq
nopw (%rax,%rax)
// File: NGageMegaman[P]NEScutre/src/cpu.cpp
// Function: Cpu::AND_execute(unsigned char)
void Cpu::AND_execute(uint8_t operand) {
    // Logical AND
    // A,Z,N = A&M
    uint8_t result = regA & operand;

    regA = result;

    regP.Z = result == 0;
    regP.N = (result >> 7) & 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x10020(%rax), %ecx
movzbl -0x9(%rbp), %edx
andl %edx, %ecx
movb %cl, -0xa(%rbp)
movb -0xa(%rbp), %cl
movb %cl, 0x10020(%rax)
movzbl -0xa(%rbp), %ecx
cmpl $0x0, %ecx
sete %cl
andb $0x1, %cl
movb %cl, 0x10029(%rax)
movzbl -0xa(%rbp), %ecx
sarl $0x7, %ecx
andl $0x1, %ecx
cmpl $0x0, %ecx
setne %cl
andb $0x1, %cl
movb %cl, 0x1002e(%rax)
popq %rbp
retq
nopl (%rax)
// File: NGageMegaman[P]NEScutre/src/cpu.cpp
// Function: Cpu::ASL_A_execute()
void Cpu::ASL_A_execute() {
    // Arithmetic shift left (Accumulator content)
    // A,Z,C,N = A*2

    uint8_t result = regA << 1;

    regP.Z = result == 0;
    regP.C = (regA >> 7) & 1;
    regP.N = (result >> 7) & 1;

    regA = result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x10020(%rax), %ecx
shll %ecx
movb %cl, -0x9(%rbp)
movzbl -0x9(%rbp), %ecx
cmpl $0x0, %ecx
sete %cl
andb $0x1, %cl
movb %cl, 0x10029(%rax)
movzbl 0x10020(%rax), %ecx
sarl $0x7, %ecx
andl $0x1, %ecx
cmpl $0x0, %ecx
setne %cl
andb $0x1, %cl
movb %cl, 0x10028(%rax)
movzbl -0x9(%rbp), %ecx
sarl $0x7, %ecx
andl $0x1, %ecx
cmpl $0x0, %ecx
setne %cl
andb $0x1, %cl
movb %cl, 0x1002e(%rax)
movb -0x9(%rbp), %cl
movb %cl, 0x10020(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: NGageMegaman[P]NEScutre/src/cpu.cpp
// Function: Cpu::ASL_mem_execute(unsigned short, unsigned char)
void Cpu::ASL_mem_execute(uint16_t address, uint8_t operand) {
    // Arithmetic shift left (Memory content)
    // M,Z,C,N = M*2

    uint8_t result = operand << 1;

    mem.write_byte(address, result);

    regP.Z = result == 0;
    regP.C = (operand >> 7) & 1;
    regP.N = (result >> 7) & 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dl, %al
movw %si, %cx
movq %rdi, -0x8(%rbp)
movw %cx, -0xa(%rbp)
movb %al, -0xb(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movzbl -0xb(%rbp), %eax
shll %eax
movb %al, -0xc(%rbp)
addq $0x8, %rdi
movw -0xa(%rbp), %ax
movzwl %ax, %esi
movzbl -0xc(%rbp), %edx
callq 0x4c90
movq -0x18(%rbp), %rax
movzbl -0xc(%rbp), %ecx
cmpl $0x0, %ecx
sete %cl
andb $0x1, %cl
movb %cl, 0x10029(%rax)
movzbl -0xb(%rbp), %ecx
sarl $0x7, %ecx
andl $0x1, %ecx
cmpl $0x0, %ecx
setne %cl
andb $0x1, %cl
movb %cl, 0x10028(%rax)
movzbl -0xc(%rbp), %ecx
sarl $0x7, %ecx
andl $0x1, %ecx
cmpl $0x0, %ecx
setne %cl
andb $0x1, %cl
movb %cl, 0x1002e(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: NGageMegaman[P]NEScutre/src/cpu.cpp
// Function: Cpu::BIT_execute(unsigned char)
void Cpu::BIT_execute(uint8_t operand) {
    // Bit test
    // tmp = A & M, N = tmp[7], V = tmp[6]

    uint8_t tmp =regA & operand;

    regP.Z = tmp == 0;
    regP.V = (tmp >> 6) & 1;
    regP.N = (tmp >> 7) & 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x10020(%rax), %ecx
movzbl -0x9(%rbp), %edx
andl %edx, %ecx
movb %cl, -0xa(%rbp)
movzbl -0xa(%rbp), %ecx
cmpl $0x0, %ecx
sete %cl
andb $0x1, %cl
movb %cl, 0x10029(%rax)
movzbl -0xa(%rbp), %ecx
sarl $0x6, %ecx
andl $0x1, %ecx
cmpl $0x0, %ecx
setne %cl
andb $0x1, %cl
movb %cl, 0x1002d(%rax)
movzbl -0xa(%rbp), %ecx
sarl $0x7, %ecx
andl $0x1, %ecx
cmpl $0x0, %ecx
setne %cl
andb $0x1, %cl
movb %cl, 0x1002e(%rax)
popq %rbp
retq
nopl (%rax)
// File: NGageMegaman[P]NEScutre/src/cpu.cpp
// Function: Cpu::BRK_execute()
void Cpu::BRK_execute() {
    // Force interrupt

    uint8_t lowPC, highPC;
    lowPC = regPC;
    highPC = (regPC >> 8);
    
    uint8_t procStat;
    procStat =  (regP.N) << 6 |
		(regP.V) << 5 |
		(regP.B) << 4 |
		(regP.D) << 3 |
		(regP.I) << 2 |
		(regP.Z) << 1 |
		(regP.C);
    
    //We push the PC and Processor Status into the stack
    pushStack(highPC);
    pushStack(lowPC);
    pushStack(procStat);

    //We set the PC to the interrupt vector and the Break command
    regPC = mem.read_word(BRK_INT_VECTOR_ADDR);
    regP.B = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movw 0x10024(%rdi), %ax
movb %al, -0x9(%rbp)
movzwl 0x10024(%rdi), %eax
sarl $0x8, %eax
movb %al, -0xa(%rbp)
movb 0x1002e(%rdi), %al
andb $0x1, %al
movzbl %al, %eax
shll $0x6, %eax
movb 0x1002d(%rdi), %cl
andb $0x1, %cl
movzbl %cl, %ecx
shll $0x5, %ecx
orl %ecx, %eax
movb 0x1002c(%rdi), %cl
andb $0x1, %cl
movzbl %cl, %ecx
shll $0x4, %ecx
orl %ecx, %eax
movb 0x1002b(%rdi), %cl
andb $0x1, %cl
movzbl %cl, %ecx
shll $0x3, %ecx
orl %ecx, %eax
movb 0x1002a(%rdi), %cl
andb $0x1, %cl
movzbl %cl, %ecx
shll $0x2, %ecx
orl %ecx, %eax
movb 0x10029(%rdi), %cl
andb $0x1, %cl
movzbl %cl, %ecx
shll %ecx
orl %ecx, %eax
movb 0x10028(%rdi), %cl
andb $0x1, %cl
movzbl %cl, %ecx
orl %ecx, %eax
movb %al, -0xb(%rbp)
movzbl -0xa(%rbp), %esi
callq 0x42b0
movq -0x18(%rbp), %rdi
movzbl -0x9(%rbp), %esi
callq 0x42b0
movq -0x18(%rbp), %rdi
movzbl -0xb(%rbp), %esi
callq 0x42b0
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
movl $0xfffe, %esi           # imm = 0xFFFE
callq 0x4bb0
movw %ax, %cx
movq -0x18(%rbp), %rax
movw %cx, 0x10024(%rax)
movb $0x1, 0x1002c(%rax)
addq $0x20, %rsp
popq %rbp
retq
nop
// File: NGageMegaman[P]NEScutre/src/cpu.cpp
// Function: Cpu::CMP_execute(unsigned char)
void Cpu::CMP_execute(uint8_t operand) {
    //Compare
    //Z,C,N = A-M

    uint8_t comp = regA - operand;

    regP.C = regA >= operand;
    regP.Z = regA == operand;
    regP.N = (comp >> 7) & 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x10020(%rax), %ecx
movzbl -0x9(%rbp), %edx
subl %edx, %ecx
movb %cl, -0xa(%rbp)
movzbl 0x10020(%rax), %ecx
movzbl -0x9(%rbp), %edx
cmpl %edx, %ecx
setge %cl
andb $0x1, %cl
movb %cl, 0x10028(%rax)
movzbl 0x10020(%rax), %ecx
movzbl -0x9(%rbp), %edx
cmpl %edx, %ecx
sete %cl
andb $0x1, %cl
movb %cl, 0x10029(%rax)
movzbl -0xa(%rbp), %ecx
sarl $0x7, %ecx
andl $0x1, %ecx
cmpl $0x0, %ecx
setne %cl
andb $0x1, %cl
movb %cl, 0x1002e(%rax)
popq %rbp
retq
nop
// File: NGageMegaman[P]NEScutre/src/cpu.cpp
// Function: Cpu::CPX_execute(unsigned char)
void Cpu::CPX_execute(uint8_t operand) {
    //Compare X register
    //Z,C,N = X-M

    uint8_t comp = regX - operand;

    regP.C = regX >= operand;
    regP.Z = regX == operand;
    regP.N = comp >> 7;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x10021(%rax), %ecx
movzbl -0x9(%rbp), %edx
subl %edx, %ecx
movb %cl, -0xa(%rbp)
movzbl 0x10021(%rax), %ecx
movzbl -0x9(%rbp), %edx
cmpl %edx, %ecx
setge %cl
andb $0x1, %cl
movb %cl, 0x10028(%rax)
movzbl 0x10021(%rax), %ecx
movzbl -0x9(%rbp), %edx
cmpl %edx, %ecx
sete %cl
andb $0x1, %cl
movb %cl, 0x10029(%rax)
movzbl -0xa(%rbp), %ecx
sarl $0x7, %ecx
cmpl $0x0, %ecx
setne %cl
andb $0x1, %cl
movb %cl, 0x1002e(%rax)
popq %rbp
retq
nopl (%rax)
// File: NGageMegaman[P]NEScutre/src/cpu.cpp
// Function: Cpu::CPY_execute(unsigned char)
void Cpu::CPY_execute(uint8_t operand) {
    //Compare Y register
    //Z,C,N = Y-M

    uint8_t comp = regY - operand;

    regP.C = regY >= operand;
    regP.Z = regY == operand;
    regP.N = comp >> 7;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x10022(%rax), %ecx
movzbl -0x9(%rbp), %edx
subl %edx, %ecx
movb %cl, -0xa(%rbp)
movzbl 0x10022(%rax), %ecx
movzbl -0x9(%rbp), %edx
cmpl %edx, %ecx
setge %cl
andb $0x1, %cl
movb %cl, 0x10028(%rax)
movzbl 0x10022(%rax), %ecx
movzbl -0x9(%rbp), %edx
cmpl %edx, %ecx
sete %cl
andb $0x1, %cl
movb %cl, 0x10029(%rax)
movzbl -0xa(%rbp), %ecx
sarl $0x7, %ecx
cmpl $0x0, %ecx
setne %cl
andb $0x1, %cl
movb %cl, 0x1002e(%rax)
popq %rbp
retq
nopl (%rax)
// File: NGageMegaman[P]NEScutre/src/cpu.cpp
// Function: Cpu::DEC_execute(unsigned short, unsigned char)
void Cpu::DEC_execute(uint16_t address, uint8_t operand) {
    //Decrement memory
    //M,Z,N = M-1

    int8_t result = operand-1;
    mem.write_byte(address, result);

    regP.Z = result == 0;
    regP.N = result >> 7;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dl, %al
movw %si, %cx
movq %rdi, -0x8(%rbp)
movw %cx, -0xa(%rbp)
movb %al, -0xb(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movzbl -0xb(%rbp), %eax
subl $0x1, %eax
movb %al, -0xc(%rbp)
addq $0x8, %rdi
movw -0xa(%rbp), %ax
movzwl %ax, %esi
movzbl -0xc(%rbp), %edx
callq 0x4c90
movq -0x18(%rbp), %rax
movsbl -0xc(%rbp), %ecx
cmpl $0x0, %ecx
sete %cl
andb $0x1, %cl
movb %cl, 0x10029(%rax)
movsbl -0xc(%rbp), %ecx
sarl $0x7, %ecx
cmpl $0x0, %ecx
setne %cl
andb $0x1, %cl
movb %cl, 0x1002e(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: NGageMegaman[P]NEScutre/src/cpu.cpp
// Function: Cpu::DEX_execute()
void Cpu::DEX_execute() {
    //Decrement X register
    //X,Z,N = X-1

    uint8_t result = regX-1;
    regX = result;

    regP.Z = result == 0;
    regP.N = result >> 7;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x10021(%rax), %ecx
subl $0x1, %ecx
movb %cl, -0x9(%rbp)
movb -0x9(%rbp), %cl
movb %cl, 0x10021(%rax)
movzbl -0x9(%rbp), %ecx
cmpl $0x0, %ecx
sete %cl
andb $0x1, %cl
movb %cl, 0x10029(%rax)
movzbl -0x9(%rbp), %ecx
sarl $0x7, %ecx
cmpl $0x0, %ecx
setne %cl
andb $0x1, %cl
movb %cl, 0x1002e(%rax)
popq %rbp
retq
nopl (%rax)
// File: NGageMegaman[P]NEScutre/src/cpu.cpp
// Function: Cpu::DEY_execute()
void Cpu::DEY_execute() {
    //Decrement Y register
    //Y,Z,N = Y-1

    uint8_t result = regY-1;
    regY = result;

    regP.Z = result == 0;
    regP.N = result >> 7;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x10022(%rax), %ecx
subl $0x1, %ecx
movb %cl, -0x9(%rbp)
movb -0x9(%rbp), %cl
movb %cl, 0x10022(%rax)
movzbl -0x9(%rbp), %ecx
cmpl $0x0, %ecx
sete %cl
andb $0x1, %cl
movb %cl, 0x10029(%rax)
movzbl -0x9(%rbp), %ecx
sarl $0x7, %ecx
cmpl $0x0, %ecx
setne %cl
andb $0x1, %cl
movb %cl, 0x1002e(%rax)
popq %rbp
retq
nopl (%rax)
// File: NGageMegaman[P]NEScutre/src/cpu.cpp
// Function: Cpu::EOR_execute(unsigned char)
void Cpu::EOR_execute(uint8_t operand) {
    //Exclusive OR
    //A,Z,N = A^M

    uint8_t result = regA ^ operand;
    regA = result;

    regP.Z = result == 0;
    regP.N = result >> 7;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x10020(%rax), %ecx
movzbl -0x9(%rbp), %edx
xorl %edx, %ecx
movb %cl, -0xa(%rbp)
movb -0xa(%rbp), %cl
movb %cl, 0x10020(%rax)
movzbl -0xa(%rbp), %ecx
cmpl $0x0, %ecx
sete %cl
andb $0x1, %cl
movb %cl, 0x10029(%rax)
movzbl -0xa(%rbp), %ecx
sarl $0x7, %ecx
cmpl $0x0, %ecx
setne %cl
andb $0x1, %cl
movb %cl, 0x1002e(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: NGageMegaman[P]NEScutre/src/cpu.cpp
// Function: Cpu::INC_execute(unsigned short, unsigned char)
void Cpu::INC_execute(uint16_t address, uint8_t operand) {
    //Increment memory
    //M,Z,N = M+1

    uint8_t result = operand + 1;
    mem.write_byte(address, result);

    regP.Z = result == 0;
    regP.N = result >> 7;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dl, %al
movw %si, %cx
movq %rdi, -0x8(%rbp)
movw %cx, -0xa(%rbp)
movb %al, -0xb(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movzbl -0xb(%rbp), %eax
addl $0x1, %eax
movb %al, -0xc(%rbp)
addq $0x8, %rdi
movw -0xa(%rbp), %ax
movzwl %ax, %esi
movzbl -0xc(%rbp), %edx
callq 0x4c90
movq -0x18(%rbp), %rax
movzbl -0xc(%rbp), %ecx
cmpl $0x0, %ecx
sete %cl
andb $0x1, %cl
movb %cl, 0x10029(%rax)
movzbl -0xc(%rbp), %ecx
sarl $0x7, %ecx
cmpl $0x0, %ecx
setne %cl
andb $0x1, %cl
movb %cl, 0x1002e(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: NGageMegaman[P]NEScutre/src/cpu.cpp
// Function: Cpu::JSR_execute(unsigned short)
void Cpu::JSR_execute(uint16_t address) {
    //Jump to subroutine

    uint16_t returnAddr = regPC - 1; //Last byte of the instruction
    pushStack((returnAddr >> 8) & 0x00ff); //high
    pushStack(returnAddr & 0x00ff); //low
    regPC = address;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movzwl 0x10024(%rdi), %eax
subl $0x1, %eax
movw %ax, -0xc(%rbp)
movzwl -0xc(%rbp), %eax
sarl $0x8, %eax
andl $0xff, %eax
movzbl %al, %esi
callq 0x42b0
movq -0x18(%rbp), %rdi
movzwl -0xc(%rbp), %eax
andl $0xff, %eax
movzbl %al, %esi
callq 0x42b0
movq -0x18(%rbp), %rax
movw -0xa(%rbp), %cx
movw %cx, 0x10024(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: NGageMegaman[P]NEScutre/src/cpu.cpp
// Function: Cpu::LDA_execute(unsigned char)
void Cpu::LDA_execute(uint8_t operand) {
    //Load accumulator
    //A,Z,N = M

    regA = operand;

    regP.Z = regA == 0;
    regP.N = regA >> 7;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movb -0x9(%rbp), %cl
movb %cl, 0x10020(%rax)
movzbl 0x10020(%rax), %ecx
cmpl $0x0, %ecx
sete %cl
andb $0x1, %cl
movb %cl, 0x10029(%rax)
movzbl 0x10020(%rax), %ecx
sarl $0x7, %ecx
cmpl $0x0, %ecx
setne %cl
andb $0x1, %cl
movb %cl, 0x1002e(%rax)
popq %rbp
retq
nopl (%rax)
// File: NGageMegaman[P]NEScutre/src/cpu.cpp
// Function: Cpu::LDX_execute(unsigned char)
void Cpu::LDX_execute(uint8_t operand) {
    //Load X register
    //X,Z,N = M

    regX = operand;

    regP.Z = regX == 0;
    regP.N = regX >> 7;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movb -0x9(%rbp), %cl
movb %cl, 0x10021(%rax)
movzbl 0x10021(%rax), %ecx
cmpl $0x0, %ecx
sete %cl
andb $0x1, %cl
movb %cl, 0x10029(%rax)
movzbl 0x10021(%rax), %ecx
sarl $0x7, %ecx
cmpl $0x0, %ecx
setne %cl
andb $0x1, %cl
movb %cl, 0x1002e(%rax)
popq %rbp
retq
nopl (%rax)