LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/matteotiziano[P]simple-wavelet/matrix.cpp
// Function: Matrix<double>::SetRow(std::vector<double, std::allocator<double>> const&, unsigned long)
void Matrix<T>::SetRow(const std::vector<T>& row, size_t i) {
  if (i >= num_rows_ || num_cols_ != row.size()) {
    throw std::invalid_argument("Matrix::SetRow");
  }
  for (size_t j = 0; j < num_cols_; j++) {
    operator()(i, j) = row.at(j);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpq %rdx, (%rdi)
jbe 0x670c
movq %rsi, %r14
movq %rdi, %r15
movq 0x8(%rdi), %rax
movq 0x8(%rsi), %rcx
subq (%rsi), %rcx
sarq $0x3, %rcx
cmpq %rcx, %rax
jne 0x670c
testq %rax, %rax
je 0x66ef
movq %rdx, %rbx
xorl %r12d, %r12d
movq (%r14), %rax
movq 0x8(%r14), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %r12, %rdx
jbe 0x66fb
movsd (%rax,%r12,8), %xmm0
movsd %xmm0, (%rsp)
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x64e8
movq %r15, %rdi
movq %rax, %rsi
callq 0x6564
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
incq %r12
cmpq 0x8(%r15), %r12
jb 0x66a6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x2b96(%rip), %rdi      # 0x9298
movq %r12, %rsi
xorl %eax, %eax
callq 0x2240
movl $0x10, %edi
callq 0x20c0
movq %rax, %rbx
leaq 0x2ceb(%rip), %rsi      # 0x940b
movq %rax, %rdi
callq 0x22f0
movq 0x78b1(%rip), %rsi      # 0xdfe0
movq 0x788a(%rip), %rdx      # 0xdfc0
movq %rbx, %rdi
callq 0x22b0
movq %rax, %r14
movq %rbx, %rdi
callq 0x2140
movq %r14, %rdi
callq 0x22d0
nop
// File: /workspace/github_cpp_makefile_star2_O3/matteotiziano[P]simple-wavelet/matrix.cpp
// Function: Matrix<double>::SetColumn(std::vector<double, std::allocator<double>> const&, unsigned long)
void Matrix<T>::SetColumn(const std::vector<T>& column, size_t j) {
  if (j >= num_cols_ || num_rows_ != column.size()) {
    throw std::invalid_argument("Matrix::SetColumn");
  }
  const ptrdiff_t idx = static_cast<ptrdiff_t>(Subscripts2Index(0, j));
  std::copy(column.begin(), column.end(), data_.begin() + idx);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpq %rdx, 0x8(%rdi)
jbe 0x67a7
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %rax
subq (%rsi), %rax
sarq $0x3, %rax
cmpq %rax, (%rdi)
jne 0x67a7
movq %rbx, %rdi
xorl %esi, %esi
callq 0x64e8
movq (%r14), %rsi
movq 0x8(%r14), %rdx
subq %rsi, %rdx
je 0x679f
shlq $0x3, %rax
addq 0x10(%rbx), %rax
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2270
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x20c0
movq %rax, %rbx
leaq 0x2c5f(%rip), %rsi      # 0x941a
movq %rax, %rdi
callq 0x22f0
movq 0x7816(%rip), %rsi      # 0xdfe0
movq 0x77ef(%rip), %rdx      # 0xdfc0
movq %rbx, %rdi
callq 0x22b0
movq %rax, %r14
movq %rbx, %rdi
callq 0x2140
movq %r14, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O3/matteotiziano[P]simple-wavelet/matrix.cpp
// Function: Matrix<double>::GetRow(unsigned long) const
std::vector<T> Matrix<T>::GetRow(size_t i) const {
  std::vector<T> row;
  row.reserve(num_cols_);
  for (size_t j = 0; j < num_cols_; j++) {
    const T& value = operator()(i, j);
    row.push_back(value);
  }
  return row;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x8(%rsi), %rsi
callq 0x58a4
cmpq $0x0, 0x8(%r15)
je 0x68e1
xorl %r12d, %r12d
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x64e8
movq %r15, %rdi
movq %rax, %rsi
callq 0x65e6
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x68cd
movsd (%rax), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x68d8
movq %rbx, %rdi
movq %rax, %rdx
callq 0x5e56
incq %r12
cmpq 0x8(%r15), %r12
jb 0x6898
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x68f2
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x6909
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x21d0
movq %r14, %rdi
callq 0x22d0
nop
// File: /workspace/github_cpp_makefile_star2_O3/matteotiziano[P]simple-wavelet/matrix.cpp
// Function: Matrix<double>::DeleteRow(unsigned long)
void Matrix<T>::DeleteRow(size_t i) {
  for (size_t j = 0; j < num_cols_; j++) {
    const ptrdiff_t idx = static_cast<ptrdiff_t>(Subscripts2Index(i, num_cols_ - j - 1));
    data_.erase(data_.begin() + idx);
  }
  num_rows_--;
  assert(Numel() == data_.size());
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdx
testq %rdx, %rdx
je 0x6a0b
movq %rsi, %r14
movq $-0x1, %r15
xorl %r12d, %r12d
addq %r15, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x64e8
movq 0x10(%rbx), %rcx
movq 0x18(%rbx), %rdx
leaq (%rcx,%rax,8), %rsi
addq $0x8, %rsi
cmpq %rdx, %rsi
je 0x69f4
leaq (%rcx,%rax,8), %rdi
subq %rsi, %rdx
callq 0x2270
movq 0x18(%rbx), %rdx
addq $-0x8, %rdx
movq %rdx, 0x18(%rbx)
incq %r12
movq 0x8(%rbx), %rdx
decq %r15
cmpq %rdx, %r12
jb 0x69c1
decq (%rbx)
movq %rbx, %rdi
callq 0x640a
movq 0x18(%rbx), %rcx
subq 0x10(%rbx), %rcx
sarq $0x3, %rcx
cmpq %rcx, %rax
jne 0x6a33
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x2a02(%rip), %rdi      # 0x943c
leaq 0x2a13(%rip), %rsi      # 0x9454
leaq 0x2a17(%rip), %rcx      # 0x945f
movl $0xb8, %edx
callq 0x2110
// File: /workspace/github_cpp_makefile_star2_O3/matteotiziano[P]simple-wavelet/matrix.cpp
// Function: Matrix<double>::DeleteColumn(unsigned long)
void Matrix<T>::DeleteColumn(size_t j) {
  const ptrdiff_t idx_start = static_cast<ptrdiff_t>(Subscripts2Index(0, j));
  const ptrdiff_t idx_end = static_cast<ptrdiff_t>(Subscripts2Index(0, j + 1));
  data_.erase(data_.begin() + idx_start, data_.begin() + idx_end);
  num_cols_--;
  assert(Numel() == data_.size());
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
xorl %esi, %esi
movq %r15, %rdx
callq 0x64e8
movq %rax, %r14
incq %r15
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x64e8
cmpq %rax, %r14
je 0x6abd
movq 0x10(%rbx), %rcx
leaq (%rcx,%r14,8), %r14
leaq (%rcx,%rax,8), %r15
movq 0x18(%rbx), %rdx
subq %r15, %rdx
je 0x6aa8
movq %r14, %rdi
movq %r15, %rsi
callq 0x2270
movq 0x18(%rbx), %rax
movq %rax, %rcx
jmp 0x6aae
movq %r15, %rax
movq %r15, %rcx
subq %r15, %rax
addq %rax, %r14
cmpq %r14, %rcx
je 0x6abd
movq %r14, 0x18(%rbx)
decq 0x8(%rbx)
movq %rbx, %rdi
callq 0x640a
movq 0x18(%rbx), %rcx
subq 0x10(%rbx), %rcx
sarq $0x3, %rcx
cmpq %rcx, %rax
jne 0x6ae0
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2955(%rip), %rdi      # 0x943c
leaq 0x2966(%rip), %rsi      # 0x9454
leaq 0x299e(%rip), %rcx      # 0x9493
movl $0xc1, %edx
callq 0x2110
nop
// File: /workspace/github_cpp_makefile_star2_O3/matteotiziano[P]simple-wavelet/matrix.cpp
// Function: Matrix<double>::Diag() const
std::vector<T> Matrix<T>::Diag() const {
  std::vector<T> diag;
  const size_t diag_length = std::min(num_rows_, num_cols_);
  diag.reserve(diag_length);
  for (size_t k = 0; k < diag_length; k++) {
    const T& value = operator()(k, k);
    diag.push_back(value);
  }
  return diag;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rsi), %r15
movq 0x8(%rsi), %rax
cmpq %r15, %rax
cmovbq %rax, %r15
movq %r15, %rsi
callq 0x58a4
testq %r15, %r15
je 0x6b82
xorl %r12d, %r12d
movq %r14, %rdi
movq %r12, %rsi
movq %r12, %rdx
callq 0x64e8
movq %r14, %rdi
movq %rax, %rsi
callq 0x65e6
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x6b6f
movsd (%rax), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x6b7a
movq %rbx, %rdi
movq %rax, %rdx
callq 0x5e56
incq %r12
cmpq %r12, %r15
jne 0x6b3a
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x6b93
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x6baa
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x21d0
movq %r14, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O3/matteotiziano[P]simple-wavelet/matrix.cpp
// Function: Matrix<double>::Rand(unsigned int)
void Matrix<T>::Rand(unsigned int seed) {
  std::mt19937 gen;
  gen.seed(seed);
  std::uniform_real_distribution<T> dis(0, 1);
  std::generate(data_.begin(), data_.end(), [&dis, &gen]() {
    return dis(gen);
  });
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x1390, %rsp           # imm = 0x1390
movl $0x1, %eax
movl $0x1571, %ecx           # imm = 0x1571
movq %rcx, %rdx
shrq $0x1e, %rdx
xorl %ecx, %edx
imull $0x6c078965, %edx, %ecx # imm = 0x6C078965
addl %eax, %ecx
movq %rcx, 0x8(%rsp,%rax,8)
incq %rax
cmpq $0x270, %rax            # imm = 0x270
jne 0x6c76
movl %esi, %eax
movq %rax, 0x8(%rsp)
movl $0x1, %ecx
movq %rax, %rdx
shrq $0x1e, %rdx
xorl %eax, %edx
imull $0x6c078965, %edx, %eax # imm = 0x6C078965
addl %ecx, %eax
movq %rax, 0x8(%rsp,%rcx,8)
incq %rcx
cmpq $0x270, %rcx            # imm = 0x270
jne 0x6ca3
movq $0x270, 0x1388(%rsp) # imm = 0x270
movq 0x10(%rdi), %r14
movq 0x18(%rdi), %r15
cmpq %r15, %r14
je 0x6d01
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x834f
addsd 0x268d(%rip), %xmm0     # 0x9380
movsd %xmm0, (%r14)
addq $0x8, %r14
cmpq %r15, %r14
jne 0x6ce3
addq $0x1390, %rsp           # imm = 0x1390
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/matteotiziano[P]simple-wavelet/matrix.cpp
// Function: Matrix<double>::Identity()
void Matrix<T>::Identity() {
  if (num_rows_ != num_cols_) {
    throw std::logic_error("Matrix::Identity");
  }
  for (size_t j = 0; j < num_cols_; j++) {
    for (size_t i = 0; i < num_rows_; i++) {
      operator()(i, j) = (i == j)? static_cast<T>(1) : static_cast<T>(0);
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq (%rdi), %rax
cmpq 0x8(%rdi), %rax
jne 0x6e6a
testq %rax, %rax
je 0x6e60
movq %rdi, %rbx
movl $0x1, %ecx
xorl %r14d, %r14d
testq %rcx, %rcx
je 0x6e56
xorl %r15d, %r15d
movsd 0x2574(%rip), %xmm0     # 0x9388
cmpq %r15, %r14
je 0x6e1c
xorps %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x64e8
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6564
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax)
incq %r15
movq (%rbx), %rcx
cmpq %rcx, %r15
jb 0x6e0c
movq 0x8(%rbx), %rax
jmp 0x6e58
xorl %ecx, %ecx
incq %r14
cmpq %rax, %r14
jb 0x6e04
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x20c0
movq %rax, %rbx
leaq 0x264c(%rip), %rsi      # 0x94ca
movq %rax, %rdi
callq 0x2210
movq 0x714b(%rip), %rsi      # 0xdfd8
movq 0x7114(%rip), %rdx      # 0xdfa8
movq %rbx, %rdi
callq 0x22b0
movq %rax, %r14
movq %rbx, %rdi
callq 0x2140
movq %r14, %rdi
callq 0x22d0
nop
// File: /workspace/github_cpp_makefile_star2_O3/matteotiziano[P]simple-wavelet/matrix.cpp
// Function: Matrix<double>::Transpose()
void Matrix<T>::Transpose() {
  // TODO: inplace tranposition
  std::vector<T> transposed_data;
  transposed_data.reserve(num_rows_ * num_cols_);
  for (size_t i = 0; i < num_rows_; i++) {
    for (size_t j = 0; j < num_cols_; j++) {
      const T& value = operator()(i, j);
      transposed_data.push_back(value);
    }
  }
  data_ = transposed_data;
  std::swap(num_rows_, num_cols_);
  assert(Numel() == data_.size());
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
pxor %xmm0, %xmm0
movq %rsp, %rdi
movdqa %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x8(%rbx), %rsi
imulq (%rbx), %rsi
callq 0x58a4
movq (%rbx), %rax
testq %rax, %rax
je 0x6f56
movq 0x8(%rbx), %rcx
xorl %r14d, %r14d
movq %rsp, %r15
testq %rcx, %rcx
je 0x6f4c
xorl %r12d, %r12d
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x64e8
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6564
movq 0x8(%rsp), %rsi
cmpq 0x10(%rsp), %rsi
je 0x6f30
movq (%rax), %xmm0
movq %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rsp)
jmp 0x6f3b
movq %r15, %rdi
movq %rax, %rdx
callq 0x5e56
incq %r12
movq 0x8(%rbx), %rcx
cmpq %rcx, %r12
jb 0x6ef8
movq (%rbx), %rax
jmp 0x6f4e
xorl %ecx, %ecx
incq %r14
cmpq %rax, %r14
jb 0x6ef0
leaq 0x10(%rbx), %rdi
movq %rsp, %rsi
callq 0x354e
movdqu (%rbx), %xmm0
pshufd $0x4e, %xmm0, %xmm0     # xmm0 = xmm0[2,3,0,1]
movdqu %xmm0, (%rbx)
movq %rbx, %rdi
callq 0x640a
movq 0x18(%rbx), %rcx
subq 0x10(%rbx), %rcx
sarq $0x3, %rcx
cmpq %rcx, %rax
jne 0x6faa
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x6f9e
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x21d0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x248b(%rip), %rdi      # 0x943c
leaq 0x249c(%rip), %rsi      # 0x9454
leaq 0x251c(%rip), %rcx      # 0x94db
movl $0x101, %edx            # imm = 0x101
callq 0x2110
jmp 0x6fcb
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x6fe4
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x21d0
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O3/matteotiziano[P]simple-wavelet/matrix.cpp
// Function: Matrix<double>::Reshape(unsigned long, unsigned long)
void Matrix<T>::Reshape(size_t num_rows, size_t num_cols) {
  if (num_rows * num_cols != Numel()) {
    throw std::invalid_argument("Matrix::Reshape");
  }
  num_rows_ = num_rows;
  num_cols_ = num_cols;
  assert(Numel() == data_.size());
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rdx, %r12
imulq %rsi, %r12
callq 0x640a
cmpq %rax, %r12
jne 0x703a
movq %r15, (%rbx)
movq %r14, 0x8(%rbx)
movq %rbx, %rdi
callq 0x640a
movq 0x18(%rbx), %rcx
subq 0x10(%rbx), %rcx
sarq $0x3, %rcx
cmpq %rcx, %rax
jne 0x706c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x20c0
movq %rax, %rbx
leaq 0x24bb(%rip), %rsi      # 0x9509
movq %rax, %rdi
callq 0x22f0
movq 0x6f83(%rip), %rsi      # 0xdfe0
movq 0x6f5c(%rip), %rdx      # 0xdfc0
movq %rbx, %rdi
callq 0x22b0
leaq 0x23c9(%rip), %rdi      # 0x943c
leaq 0x23da(%rip), %rsi      # 0x9454
leaq 0x2498(%rip), %rcx      # 0x9519
movl $0x10b, %edx            # imm = 0x10B
callq 0x2110
movq %rax, %r14
movq %rbx, %rdi
callq 0x2140
movq %r14, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O3/matteotiziano[P]simple-wavelet/matrix.cpp
// Function: Matrix<double>::operator+(Matrix<double>) const
Matrix<T> Matrix<T>::operator+(Matrix<T> rhs) const {
  if (Size() != rhs.Size()) {
    throw std::invalid_argument("Matrix::operator+");
  }
  rhs.GetData() += data_;
  return rhs;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x639a
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq %r14, %rdi
callq 0x639a
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movdqu 0x18(%rsp), %xmm0
movdqu 0x8(%rsp), %xmm1
pcmpeqb %xmm0, %xmm1
pmovmskb %xmm1, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x73cb
addq $0x10, %r15
leaq 0x10(%r14), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x7410
movups (%r14), %xmm0
movups %xmm0, (%rbx)
movq %rbx, %rdi
addq $0x10, %rdi
movq %r12, %rsi
callq 0x3034
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x20c0
movq %rax, %rbx
leaq 0x2186(%rip), %rsi      # 0x9565
movq %rax, %rdi
callq 0x22f0
movq 0x6bf2(%rip), %rsi      # 0xdfe0
movq 0x6bcb(%rip), %rdx      # 0xdfc0
movq %rbx, %rdi
callq 0x22b0
movq %rax, %r14
movq %rbx, %rdi
callq 0x2140
movq %r14, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O3/matteotiziano[P]simple-wavelet/matrix.cpp
// Function: Matrix<double>::ElementProduct(Matrix<double>) const
Matrix<T> Matrix<T>::ElementProduct(Matrix<T> rhs) const {
  if (Size() != rhs.Size()) {
    throw std::invalid_argument("Matrix::ElementProduct");
  }
  rhs.GetData() *= data_;
  return rhs;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x639a
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq %r14, %rdi
callq 0x639a
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movdqu 0x18(%rsp), %xmm0
movdqu 0x8(%rsp), %xmm1
pcmpeqb %xmm0, %xmm1
pmovmskb %xmm1, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x7683
addq $0x10, %r15
leaq 0x10(%r14), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x76c8
movups (%r14), %xmm0
movups %xmm0, (%rbx)
movq %rbx, %rdi
addq $0x10, %rdi
movq %r12, %rsi
callq 0x3034
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x20c0
movq %rax, %rbx
leaq 0x1ef2(%rip), %rsi      # 0x9589
movq %rax, %rdi
callq 0x22f0
movq 0x693a(%rip), %rsi      # 0xdfe0
movq 0x6913(%rip), %rdx      # 0xdfc0
movq %rbx, %rdi
callq 0x22b0
movq %rax, %r14
movq %rbx, %rdi
callq 0x2140
movq %r14, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O3/matteotiziano[P]simple-wavelet/matrix.cpp
// Function: Matrix<double>::ElementQuotient(Matrix<double>) const
Matrix<T> Matrix<T>::ElementQuotient(Matrix<T> rhs) const {
  if (Size() != rhs.Size()) {
    throw std::invalid_argument("Matrix::ElementQuotient");
  }
  rhs.GetData() /= data_;
  return rhs;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x639a
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq %r14, %rdi
callq 0x639a
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movdqu 0x18(%rsp), %xmm0
movdqu 0x8(%rsp), %xmm1
pcmpeqb %xmm0, %xmm1
pmovmskb %xmm1, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x77df
addq $0x10, %r15
leaq 0x10(%r14), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x7824
movups (%r14), %xmm0
movups %xmm0, (%rbx)
movq %rbx, %rdi
addq $0x10, %rdi
movq %r12, %rsi
callq 0x3034
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x20c0
movq %rax, %rbx
leaq 0x1dad(%rip), %rsi      # 0x95a0
movq %rax, %rdi
callq 0x22f0
movq 0x67de(%rip), %rsi      # 0xdfe0
movq 0x67b7(%rip), %rdx      # 0xdfc0
movq %rbx, %rdi
callq 0x22b0
movq %rax, %r14
movq %rbx, %rdi
callq 0x2140
movq %r14, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O3/t0mm4rx[P]piscine_cpp/day04/ex01/Character.cpp
// Function: Character::attack(Enemy*)
void Character::attack(Enemy *enemy)
{
	if (this->weapon == NULL)
	{
		std::cout << "No weapon, cannot attack" << std::endl;
		return ;
	}
	if (this->ap < this->weapon->getAPCost())
	{
		std::cout << "No AP, cannot attack" << std::endl;
		return ;
	}
	std::cout << this->name << " attack " << enemy->getType() << " with a " << this->weapon->getName() << std::endl;
	this->weapon->attack();
	enemy->takeDamage(this->weapon->getDamage());
	this->ap -= this->weapon->getAPCost();
	this->ap = (this->ap < 0 ? 0 : this->ap);
	if (enemy->getHP() <= 0)
		delete enemy;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
movq 0x28(%rdi), %rdi
testq %rdi, %rdi
je 0x273b
movq %rsi, %rbx
movl 0x20(%r14), %r15d
callq 0x24f2
cmpl %eax, %r15d
jge 0x2789
movq 0x48ab(%rip), %rbx      # 0x6fd8
leaq 0x1939(%rip), %rsi      # 0x406d
movl $0x14, %edx
jmp 0x274e
movq 0x4896(%rip), %rbx      # 0x6fd8
leaq 0x190b(%rip), %rsi      # 0x4054
movl $0x18, %edx
movq %rbx, %rdi
callq 0x20e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x20b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2070
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq 0x4841(%rip), %rdi      # 0x6fd8
callq 0x20e0
movq %rax, %r15
leaq 0x18dc(%rip), %rsi      # 0x4082
movl $0x8, %edx
movq %rax, %rdi
callq 0x20e0
leaq -0x60(%rbp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2b8c
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %r15, %rdi
callq 0x20e0
movq %rax, %r15
leaq 0x18ae(%rip), %rsi      # 0x408b
movl $0x8, %edx
movq %rax, %rdi
callq 0x20e0
movq 0x28(%r14), %rsi
leaq -0x40(%rbp), %rdi
callq 0x24fc
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq %r15, %rdi
callq 0x20e0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x20b0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2070
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x284a
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x20d0
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2863
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x20d0
movq 0x28(%r14), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x28(%r14), %rdi
callq 0x252a
movq (%rbx), %rcx
movq %rbx, %rdi
movl %eax, %esi
callq *0x10(%rcx)
movq 0x28(%r14), %rdi
callq 0x24f2
movl 0x20(%r14), %ecx
subl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
cmovgl %ecx, %eax
movl %eax, 0x20(%r14)
movq %rbx, %rdi
callq 0x2bba
testl %eax, %eax
jg 0x28b0
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x28bf
movq %rax, %rbx
jmp 0x28e0
movq %rax, %rbx
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x28e0
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x20d0
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x28f9
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x20d0
movq %rbx, %rdi
callq 0x2120
nop
// File: /workspace/github_cpp_makefile_star2_O3/t0mm4rx[P]piscine_cpp/day04/ex01/Character.cpp
// Function: operator<<(std::ostream&, Character const&)
std::ostream& operator<<(std::ostream& os, const Character& c)
{
	(void) c;
    os << c.getName() << " has " << c.getAP() << " AP and ";
	if (c.getWeapon() == NULL)
		os << "is unarmed";
	else
		os << "carries " << c.getWeapon()->getName();
	os << std::endl;
	return (os);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%rsi), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq -0x40(%rbp), %r15
movq %r15, %rdi
callq 0x2534
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x20e0
movq %rax, %r15
leaq 0x1731(%rip), %rsi      # 0x4094
movl $0x5, %edx
movq %rax, %rdi
callq 0x20e0
movl 0x20(%r14), %esi
movq %r15, %rdi
callq 0x2110
leaq 0x1717(%rip), %rsi      # 0x409a
movl $0x8, %edx
movq %rax, %rdi
callq 0x20e0
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x29a5
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x20d0
cmpq $0x0, 0x28(%r14)
je 0x29f6
leaq 0x16fb(%rip), %rsi      # 0x40ae
movl $0x8, %edx
movq %rbx, %rdi
callq 0x20e0
movq 0x28(%r14), %rsi
leaq -0x40(%rbp), %r14
movq %r14, %rdi
callq 0x24fc
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x20e0
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x2a0a
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x20d0
jmp 0x2a0a
leaq 0x16a6(%rip), %rsi      # 0x40a3
movl $0xa, %edx
movq %rbx, %rdi
callq 0x20e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x20b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2070
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2a43
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x2a5b
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x20d0
movq %rbx, %rdi
callq 0x2120
nop
// File: /workspace/github_cpp_makefile_star2_O3/t0mm4rx[P]piscine_cpp/day04/ex01/SuperMutant.cpp
// Function: SuperMutant::takeDamage(int)
void SuperMutant::takeDamage(int damage)
{
	(void)damage;
	this->hp -= 3;
	this->hp = (this->hp < 0 ? 0 : this->hp);
	std::cout << this->hp << " HP remaining for " << this->type << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x8(%rdi), %eax
leal -0x3(%rax), %ecx
xorl %esi, %esi
cmpl $0x3, %eax
cmovgel %ecx, %esi
movl %esi, 0x8(%rdi)
movq 0x39fa(%rip), %rdi      # 0x6fd8
callq 0x2110
movq %rax, %r14
leaq 0xaca(%rip), %rsi       # 0x40b7
movl $0x12, %edx
movq %rax, %rdi
callq 0x20e0
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rdx
movq %r14, %rdi
callq 0x20e0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x20b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2070
// File: /workspace/github_cpp_makefile_star2_O3/rapirent[P]JPEG/encoder.c
// Function: write_one_bit(_IO_FILE*, int, bool)
void write_one_bit(FILE *fp, int value, bool mode)
{
    static byte buffer = 0x00;
    static byte count = 0;
    if(mode==true) {
        for (int i = count; i<7; i++) {
            buffer = (buffer << 1);
        }
        fwrite(&buffer,1,1,fp);
        return;
    }
    if (value != 1 && value != 0) {
        printf("bit number should be a binary\n");
        exit(1);
    }
    buffer = (buffer << 1) | value;
    if(count==7) {
        fwrite(&buffer,1,1,fp);
        if(buffer == 0xff) {
            byte c = 0x00;
            fwrite(&c,1,1,fp);
        }
        buffer = 0x00;
    }
    count = (count == 7 ? 0 : count + 1);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testl %edx, %edx
je 0x5514
movzbl 0x7453(%rip), %ecx      # 0xc941
movb 0x744c(%rip), %al       # 0xc940
cmpl $0x6, %ecx
ja 0x5508
addl $-0x7, %ecx
addb %al, %al
incl %ecx
jne 0x54fc
movb %al, 0x7438(%rip)       # 0xc940
movsbl %al, %edi
movq %rbx, %rsi
popq %rbx
jmp 0x5190
cmpl $0x2, %esi
jae 0x5573
movzbl 0x7420(%rip), %eax      # 0xc940
leal (%rsi,%rax,2), %ecx
movb %cl, 0x7417(%rip)       # 0xc940
movb 0x7412(%rip), %al       # 0xc941
cmpb $0x7, %al
jne 0x555e
movsbl %cl, %edi
movq %rbx, %rsi
callq 0x5190
cmpb $-0x1, 0x73fb(%rip)     # 0xc940
jne 0x5551
xorl %edi, %edi
movq %rbx, %rsi
callq 0x5190
movb $0x0, 0x73e8(%rip)      # 0xc940
movb 0x73e3(%rip), %al       # 0xc941
leal 0x1(%rax), %ecx
xorl %edx, %edx
cmpb $0x7, %al
movzbl %cl, %eax
cmovel %edx, %eax
movb %al, 0x73d0(%rip)       # 0xc941
popq %rbx
retq
leaq 0x35b4(%rip), %rdi      # 0x8b2e
callq 0x51e0
movl $0x1, %edi
callq 0x5180
// File: /workspace/github_cpp_makefile_star2_O3/rapirent[P]JPEG/encoder.c
// Function: find_length(int*)
byte find_length (int* value)
{
    byte need_write_length = 0;
    int tmp = (*value);
    if (*value < 0) {
        tmp = -(*value);
    }
    for (; tmp ; tmp = tmp >> 1) {
        need_write_length++;
    }
    *value = (*value) > 0 ? (*value) : ((0x1 << need_write_length) + (*value) -1);
    return need_write_length;
}

// Assembly:
movl (%rdi), %edx
testl %edx, %edx
je 0x55e5
movl %edx, %ecx
negl %ecx
cmovsl %edx, %ecx
xorl %eax, %eax
movl %ecx, %esi
incb %al
shrl %esi
cmpl $0x1, %ecx
movl %esi, %ecx
ja 0x55d8
jmp 0x55e7
xorl %eax, %eax
movl $0x1, %esi
movl %eax, %ecx
shll %cl, %esi
testl %edx, %edx
leal -0x1(%rdx,%rsi), %ecx
cmovgl %edx, %ecx
movl %ecx, (%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/rapirent[P]JPEG/./bitmap_image.hpp
// Function: bitmap_image::operator=(bitmap_image const&)
bitmap_image& operator=(const bitmap_image& image)
   {
      if (this != &image)
      {
         file_name_       = image.file_name_;
         bytes_per_pixel_ = image.bytes_per_pixel_;
         width_           = image.width_;
         height_          = image.height_;
         row_increment_   = 0;
         channel_mode_    = image.channel_mode_;
         create_bitmap();
         data_ = image.data_;
      }

      return *this;
   }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq %rsi, %rdi
je 0x66c6
movq %rsi, %r14
movq %rbx, %rdi
callq 0x50b0
movl 0x20(%r14), %eax
movl %eax, 0x20(%rbx)
movl 0x24(%r14), %ecx
movl %ecx, 0x24(%rbx)
movq 0x2c(%r14), %rsi
movq %rsi, 0x2c(%rbx)
imull %eax, %esi
movl %esi, 0x28(%rbx)
leaq 0x38(%rbx), %r15
imull %ecx, %esi
movq %r15, %rdi
callq 0x6d34
addq $0x38, %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x6e64
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/wcochran[P]pano_to_cube/pano2cube.cpp
// Function: main
int main(int argc, char *argv[]) {
  if (argc != 3) {
    std::cerr << "usage: " << argv[0] << " pano.ppm cube.ppm" << std::endl;
    exit(1);
  }

  try {
    PPM inImage(argv[1]);
    PPM outImage(inImage.W, inImage.H);
    cylindricalPanoramaToCube(inImage, outImage);
    outImage.write(argv[2]);
  } catch (BogusPPM &e) {
    std::cerr << e.what() << std::endl;
    exit(2);
  }

  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
cmpl $0x3, %edi
jne 0x2738
movq 0x8(%rbx), %rsi
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x284e
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x2a08
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x26a2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21a0
movl 0x28(%rsp), %esi
movl 0x2c(%rsp), %edx
leaq 0x8(%rsp), %rdi
callq 0x288c
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x240c
movq 0x10(%rbx), %rsi
leaq 0x48(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x284e
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x2f50
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2700
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x21a0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x2717
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x272e
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r14
retq
movq 0x38b1(%rip), %rdi      # 0x5ff0
leaq 0x1902(%rip), %rsi      # 0x4048
callq 0x2170
movq (%rbx), %rsi
movq %rax, %rdi
callq 0x2170
leaq 0x18f3(%rip), %rsi      # 0x4050
movq %rax, %rdi
callq 0x2170
movq %rax, %rdi
callq 0x20c0
movl $0x1, %edi
callq 0x21d0
movq %rdx, %r14
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x27a2
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x21a0
jmp 0x27a2
jmp 0x279c
movq %rdx, %r14
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x27c1
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
jmp 0x27c1
movq %rdx, %r14
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x27fe
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
jmp 0x27f1
movq %rdx, %r14
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x27fe
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21a0
jmp 0x27fe
movq %rdx, %r14
movq %rax, %rbx
cmpl $0x1, %r14d
jne 0x283e
movq %rbx, %rdi
callq 0x20a0
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
movq 0x37d4(%rip), %rdi      # 0x5ff0
movq %rax, %rsi
callq 0x2170
movq %rax, %rdi
callq 0x20c0
movl $0x2, %edi
callq 0x21d0
movq %rax, %rbx
callq 0x2250
movq %rbx, %rdi
callq 0x2270
movq %rax, %rdi
callq 0x28cd
// File: /workspace/github_cpp_makefile_star2_O3/iZhangHui[P]CppPrimer/CH12_DynamicMemory/examples/unique.cc
// Function: main
int main() {
	shared_ptr<string> p(new string("Hello"));
	shared_ptr<string> p2(p);    // two users of the allocated string
	string newVal = " World!";
	if (!p.unique())
		p.reset(new string(*p)); // we aren't alone; allocate a new copy
	*p += newVal; // now that we know we're the only pointer, okay to change this object
	cout << *p << endl;
	cout << *p2 << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl $0x20, %edi
callq 0x10c0
movq %rax, %rbx
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0xd3c(%rip), %rsi       # 0x2004
leaq 0xd3a(%rip), %rdx       # 0x2009
movq %rbx, %rdi
callq 0x1610
leaq -0x30(%rbp), %r14
movq %rbx, -0x8(%r14)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x16ae
movq -0x8(%r14), %r13
movq (%r14), %rbx
testq %rbx, %rbx
je 0x130b
movq 0x2cd3(%rip), %rax      # 0x3fd0
cmpb $0x0, (%rax)
je 0x1307
incl 0x8(%rbx)
jmp 0x130b
lock
incl 0x8(%rbx)
leaq -0x48(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0xcef(%rip), %rsi       # 0x200a
leaq 0xcef(%rip), %rdx       # 0x2011
leaq -0x58(%rbp), %rdi
callq 0x1610
movq -0x30(%rbp), %rax
testq %rax, %rax
je 0x133c
movl 0x8(%rax), %eax
cmpl $0x1, %eax
je 0x1375
movl $0x20, %edi
callq 0x10c0
movq %rax, %r15
movq -0x38(%rbp), %rax
movq %r15, %rcx
addq $0x10, %rcx
movq %rcx, (%r15)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x1572
leaq -0x38(%rbp), %rdi
movq %r15, %rsi
callq 0x14aa
movq -0x38(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
callq 0x1050
movq -0x38(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq 0x2c40(%rip), %rdi      # 0x3fd8
callq 0x10e0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x10b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1070
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq 0x2c02(%rip), %rdi      # 0x3fd8
callq 0x10e0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x10b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1070
movq -0x58(%rbp), %rdi
cmpq %r12, %rdi
je 0x141a
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x10d0
testq %rbx, %rbx
je 0x1427
movq %rbx, %rdi
callq 0x1506
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x1435
callq 0x1506
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movl $0x20, %esi
movq %r15, %rdi
callq 0x10d0
jmp 0x1472
movq %rax, %r14
jmp 0x1487
movq %rax, %r14
movl $0x20, %esi
movq %rbx, %rdi
callq 0x10d0
jmp 0x14a2
movq %rax, %r14
movq -0x58(%rbp), %rdi
cmpq %r12, %rdi
je 0x1487
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x10d0
testq %rbx, %rbx
je 0x1494
movq %rbx, %rdi
callq 0x1506
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x14a2
callq 0x1506
movq %r14, %rdi
callq 0x1120
// File: /workspace/github_cpp_makefile_star2_O3/obliviousram[P]oblivious-avl-tree/src/Block.cpp
// Function: Block::Block(Block const&)
Block::Block(const Block& b) {
    for (int i = 0; i<BLOCK_SIZE; i++) {
		this->data[i] = b.data[i];
	}
    this->leaf_id = b.leaf_id;
    this->id = b.id;
    this->leftChildPos = b.leftChildPos;
    this->leftChildId = b.leftChildId;
    this->rightChildPos = b.rightChildPos;
    this->rightChildId = b.rightChildId;
}

// Assembly:
leaq 0xa59d(%rip), %rax      # 0xcb80
movq %rax, (%rdi)
movq $-0x1, 0x8(%rdi)
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x20(%rdi)
xorl %eax, %eax
movl 0x10(%rsi,%rax,4), %ecx
movl %ecx, 0x10(%rdi,%rax,4)
incq %rax
cmpq $0x4, %rax
jne 0x25f9
movq 0x8(%rsi), %rax
movq %rax, 0x8(%rdi)
movups 0x20(%rsi), %xmm0
movups %xmm0, 0x20(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/obliviousram[P]oblivious-avl-tree/src/Bucket.cpp
// Function: Bucket::Bucket(Bucket*)
Bucket::Bucket(Bucket *other){
    if(other == NULL){
        throw new runtime_error("the other bucket is not malloced.");
    }
    blocks = vector<Block>(max_size);
    for(int i = 0; i < max_size; i++){
        blocks[i] = Block(other->blocks[i]);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
testq %rsi, %rsi
je 0x2cec
movq %rsi, %r14
movslq 0xa562(%rip), %rsi      # 0xd188
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x3038
movq 0x10(%rbx), %rax
leaq 0x10(%rsp), %r15
movaps (%r15), %xmm0
movq 0x10(%r15), %rcx
movq %rcx, 0x10(%rbx)
movups (%rbx), %xmm1
movups %xmm0, (%rbx)
leaq 0x30(%rsp), %rdi
movaps %xmm1, (%rdi)
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
movq $0x0, 0x10(%r15)
callq 0x2ff0
movq %r15, %rdi
callq 0x2ff0
cmpl $0x0, 0xa509(%rip)      # 0xd188
jle 0x2cdd
leaq 0x38(%rsp), %r12
xorl %r13d, %r13d
leaq 0x30(%rsp), %r15
xorl %ebp, %ebp
movq (%r14), %rsi
addq %r13, %rsi
movq %r15, %rdi
callq 0x25dc
movq (%rbx), %rax
movq 0x20(%r12), %rcx
movq %rcx, 0x28(%rax,%r13)
movups (%r12), %xmm0
movups 0x10(%r12), %xmm1
movups %xmm1, 0x18(%rax,%r13)
movups %xmm0, 0x8(%rax,%r13)
movq %r15, %rdi
callq 0x2638
incq %rbp
movslq 0xa4b4(%rip), %rax      # 0xd188
addq $0x30, %r13
cmpq %rax, %rbp
jl 0x2c90
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x8, %edi
callq 0x20c0
movq %rax, %r14
movl $0x10, %edi
callq 0x2180
movq %rax, %r12
leaq 0x643c(%rip), %rsi      # 0x9149
movq %rax, %rdi
callq 0x2090
movq %r12, (%r14)
leaq 0x9e81(%rip), %rsi      # 0xcba0
movq %r14, %rdi
xorl %edx, %edx
callq 0x2280
jmp 0x2d4c
movq %rax, %r15
movl $0x10, %esi
movq %r12, %rdi
callq 0x2190
jmp 0x2d40
movq %rax, %r15
movq %r14, %rdi
callq 0x2110
jmp 0x2d4f
jmp 0x2d4c
movq %rax, %r15
movq %rbx, %rdi
callq 0x2ff0
movq %r15, %rdi
callq 0x22a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/obliviousram[P]oblivious-avl-tree/src/Bucket.cpp
// Function: Bucket::getBlockByIndex(int)
Block Bucket::getBlockByIndex(int id) {
    Block *copy_block = NULL;
    for(Block b: blocks){
        if(b.id == id){
            copy_block = new Block(b);
            break;
        }
    }
    return *copy_block;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebp
movq %rdi, %rbx
movq (%rsi), %r14
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x25dc
cmpl %ebp, 0xc(%r15)
je 0x2dae
addq $0x30, %r14
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x2638
movq %r15, %rdi
movq %r14, %rsi
callq 0x25dc
addq $0x30, %r14
cmpl %ebp, 0x14(%rsp)
jne 0x2d91
movl $0x30, %edi
callq 0x2180
movq %rax, %r14
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x25dc
leaq 0x8(%rsp), %rdi
callq 0x2638
movq %rbx, %rdi
movq %r14, %rsi
callq 0x25dc
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x30, %esi
movq %r14, %rdi
callq 0x2190
jmp 0x2e00
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2638
movq %rbx, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O3/obliviousram[P]oblivious-avl-tree/src/Bucket.cpp
// Function: Bucket::removeBlock(Block)
bool Bucket::removeBlock(Block rm_blk){
    bool removed = false;
    for(int i = 0; i < blocks.size(); i++){
        if(blocks[i].id == rm_blk.id){
            blocks.erase(blocks.begin() + i);
            removed = true;
            break;
        }
    }
    return removed;
}

// Assembly:
pushq %rbx
movq (%rdi), %rax
movq 0x8(%rdi), %rdx
subq %rax, %rdx
je 0x2ebb
sarq $0x4, %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
cmpq $0x1, %rcx
movq %rcx, %rdx
adcq $0x0, %rdx
movl 0xc(%rsi), %r8d
movb $0x1, %bl
cmpl %r8d, 0xc(%rax)
jne 0x2ebf
movq %rax, %rsi
jmp 0x2ee3
xorl %ebx, %ebx
jmp 0x2ef0
movl $0x1, %r9d
cmpq %r9, %rdx
je 0x2eea
incq %r9
leaq 0x30(%rax), %rsi
cmpl %r8d, 0x3c(%rax)
movq %rsi, %rax
jne 0x2ec5
decq %r9
cmpq %r9, %rcx
seta %bl
callq 0x30fa
jmp 0x2ef0
cmpq %r9, %rcx
seta %bl
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/obliviousram[P]oblivious-avl-tree/src/Bucket.cpp
// Function: Bucket::setMaxSize(int)
void Bucket::setMaxSize(int maximumSize){
    if(is_init == true){
        throw new runtime_error("Max Bucket Size was already set");
    }
    max_size = maximumSize;
    is_init = true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpb $0x1, 0xa285(%rip)      # 0xd193
je 0x2f23
movl %edi, 0xa272(%rip)      # 0xd188
movb $0x1, 0xa276(%rip)      # 0xd193
popq %rbx
popq %r14
popq %r15
retq
movl $0x8, %edi
callq 0x20c0
movq %rax, %rbx
movl $0x10, %edi
callq 0x2180
movq %rax, %r14
leaq 0x6227(%rip), %rsi      # 0x916b
movq %rax, %rdi
callq 0x2090
movq %r14, (%rbx)
leaq 0x9c4a(%rip), %rsi      # 0xcba0
movq %rbx, %rdi
xorl %edx, %edx
callq 0x2280
movq %rax, %r15
movl $0x10, %esi
movq %r14, %rdi
callq 0x2190
jmp 0x2f75
movq %rax, %r15
movq %rbx, %rdi
callq 0x2110
movq %r15, %rdi
callq 0x22a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/obliviousram[P]oblivious-avl-tree/src/OAVLTreeDeterministicEviction.cpp
// Function: OAVLTreeDeterministicEviction::performDummyFinds(int)
void OAVLTreeDeterministicEviction::performDummyFinds(int num) {
    for (int i = 0; i < num; ++i) {
        auto leaf = rand_gen->getRandomLeaf();
        for (int i = 0; i < num_levels; i++) {
            vector<Block> blocks = storage->readBucket(P(leaf, i)).getBlocks();
            Bucket writeBack;
            for (Block &b: blocks) {
                writeBack.addBlock(b);
            }
            storage->writeBucket(P(leaf, i), writeBack);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %esi, 0x10(%rsp)
testl %esi, %esi
jle 0x50ad
movq %rdi, %r14
xorl %eax, %eax
leaq 0x30(%rsp), %r15
leaq 0x48(%rsp), %r13
movl %eax, 0x14(%rsp)
movq 0x10(%r14), %rdi
movq (%rdi), %rax
callq *(%rax)
movl %eax, 0xc(%rsp)
cmpl $0x0, 0x20(%r14)
jle 0x509d
xorl %ebx, %ebx
movq (%r14), %rax
movq 0x8(%r14), %r12
movq %r14, %rdi
movl 0xc(%rsp), %esi
movl %ebx, %edx
callq *0x10(%rax)
movq (%r12), %rcx
movq %r15, %rdi
movq %r12, %rsi
movl %eax, %edx
callq *0x8(%rcx)
leaq 0x18(%rsp), %rdi
movq %r15, %rsi
callq 0x2ef4
movq %r15, %rdi
callq 0x2ff0
movq %r15, %rdi
callq 0x2b28
movq 0x18(%rsp), %r12
movq 0x20(%rsp), %rbp
cmpq %rbp, %r12
je 0x505d
movq %r13, %rdi
movq %r12, %rsi
callq 0x25dc
movq %r15, %rdi
movq %r13, %rsi
callq 0x2e12
movq %r13, %rdi
callq 0x2638
addq $0x30, %r12
jmp 0x5034
movq (%r14), %rax
movq 0x8(%r14), %r12
movq %r14, %rdi
movl 0xc(%rsp), %esi
movl %ebx, %edx
callq *0x10(%rax)
movq (%r12), %rcx
movq %r12, %rdi
movl %eax, %esi
movq %r15, %rdx
callq *0x10(%rcx)
movq %r15, %rdi
callq 0x2ff0
leaq 0x18(%rsp), %rdi
callq 0x2ff0
incl %ebx
cmpl 0x20(%r14), %ebx
jl 0x4feb
movl 0x14(%rsp), %eax
incl %eax
cmpl 0x10(%rsp), %eax
jne 0x4fcd
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
jmp 0x50ee
movq %rax, %rbx
jmp 0x50e9
jmp 0x50cd
movq %rax, %rbx
jmp 0x50df
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x2638
leaq 0x30(%rsp), %rdi
callq 0x2ff0
leaq 0x18(%rsp), %rdi
callq 0x2ff0
movq %rbx, %rdi
callq 0x22a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/obliviousram[P]oblivious-avl-tree/src/OAVLTreeDeterministicEviction.cpp
// Function: OAVLTreeDeterministicEviction::evictTwoPaths()
void OAVLTreeDeterministicEviction::evictTwoPaths() {
    int g_1 = ReverseBits(this->G, num_levels - 1);
    this->G += 1;
    this->evictByLeaf(g_1);
    int g_2 = ReverseBits(this->G, num_levels - 1);
    this->G += 1;
    this->evictByLeaf(g_2);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x18(%rdi), %edi
movl 0x20(%rbx), %ecx
movl %edi, %eax
cltd
idivl 0x24(%rbx)
decl %ecx
xorl %r14d, %r14d
xorl %esi, %esi
testl %edx, %edx
je 0x5132
movl %edx, %eax
movl %edx, %r8d
andl $0x1, %r8d
leal (%r8,%rsi,2), %esi
sarl %eax
decl %ecx
cmpl $0x1, %edx
movl %eax, %edx
ja 0x511c
shll %cl, %esi
incl %edi
movl %edi, 0x18(%rbx)
movq %rbx, %rdi
callq 0x544c
movl 0x18(%rbx), %esi
movl 0x20(%rbx), %ecx
decl %ecx
movl %esi, %eax
cltd
idivl 0x24(%rbx)
testl %edx, %edx
je 0x516c
xorl %r14d, %r14d
movl %edx, %eax
movl %edx, %edi
andl $0x1, %edi
leal (%rdi,%r14,2), %r14d
sarl %eax
decl %ecx
cmpl $0x1, %edx
movl %eax, %edx
ja 0x5158
shll %cl, %r14d
incl %esi
movl %esi, 0x18(%rbx)
movq %rbx, %rdi
movl %r14d, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x544c
// File: /workspace/github_cpp_makefile_star2_O3/obliviousram[P]oblivious-avl-tree/src/OAVLTreeDeterministicEviction.cpp
// Function: OAVLTreeDeterministicEviction::search(int)
int OAVLTreeDeterministicEviction::search(int key) {
    if (root.id == -1) throw SearchFailureException();
    moveToLocal(root.leaf_id, root.id);
    Block b = local[0];
    while (b.data[0] != key) {
        if (b.data[0] < key) {
            if (b.rightChildId != -1) {
                moveToLocal(b.rightChildPos, b.rightChildId);
            } else {
                evictAfterSearch();
                throw SearchFailureException();
            }
        } else {
            if (b.leftChildId != -1) {
                moveToLocal(b.leftChildPos, b.leftChildId);
            } else {
                evictAfterSearch();
                throw SearchFailureException();
            }
        }
        b = local[local.size() - 1];
    }
    int val = b.data[1];
    int l = local.size();
    performDummyFinds(num_levels - l);
    evictAfterSearch();
    performDummyEvictions(num_levels - l);
    return val;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl 0x68(%rdi), %edx
cmpl $-0x1, %edx
je 0x5315
movl %esi, %ebp
movq %rdi, %rbx
movl 0x6c(%rdi), %esi
callq 0x4548
movq 0x48(%rbx), %rsi
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x25dc
movl 0x10(%r14), %ecx
cmpl %ebp, %ecx
jne 0x5242
movq 0x50(%rbx), %rax
subq 0x48(%rbx), %rax
jmp 0x52a0
leaq 0x28(%rsp), %r14
leaq 0x30(%rsp), %r15
cmpl %ebp, %ecx
jge 0x5259
movl 0x34(%rsp), %edx
movq %r15, %rax
jmp 0x5260
movl 0x2c(%rsp), %edx
movq %r14, %rax
cmpl $-0x1, %edx
je 0x52f2
movl (%rax), %esi
movq %rbx, %rdi
callq 0x4548
movq 0x50(%rbx), %rcx
movq %rcx, %rax
subq 0x48(%rbx), %rax
movq -0x8(%rcx), %rdx
movq %rdx, 0x8(%r14)
movups -0x28(%rcx), %xmm0
movups -0x18(%rcx), %xmm1
movups %xmm1, -0x8(%r14)
movups %xmm0, -0x18(%r14)
movl 0x18(%rsp), %ecx
cmpl %ebp, %ecx
jne 0x524c
movl 0x1c(%rsp), %ebp
shrq $0x4, %rax
imull $0xaaaaaaab, %eax, %r14d # imm = 0xAAAAAAAB
movl 0x20(%rbx), %esi
subl %r14d, %esi
movq %rbx, %rdi
callq 0x4fa4
movq %rbx, %rdi
callq 0x534c
movl 0x20(%rbx), %r15d
subl %r14d, %r15d
jle 0x52db
movq %rbx, %rdi
callq 0x50fc
decl %r15d
jne 0x52ce
leaq 0x8(%rsp), %rdi
callq 0x2638
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x534c
movl $0x1, %edi
callq 0x20c0
leaq 0x792d(%rip), %rsi      # 0xcc38
movq %rax, %rdi
xorl %edx, %edx
callq 0x2280
movl $0x1, %edi
callq 0x20c0
leaq 0x7912(%rip), %rsi      # 0xcc38
movq %rax, %rdi
xorl %edx, %edx
callq 0x2280
jmp 0x5336
jmp 0x5336
jmp 0x5336
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2638
movq %rbx, %rdi
callq 0x22a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/obliviousram[P]oblivious-avl-tree/src/OAVLTreeDeterministicEviction.cpp
// Function: OAVLTreeDeterministicEviction::evictAfterSearch()
void OAVLTreeDeterministicEviction::evictAfterSearch() {
    while (local.size() > 1)
    {
        local[local.size()-1].leaf_id = rand_gen->getRandomLeaf();
        if (local[local.size()-2].leftChildId == local[local.size()-1].id) {
            local[local.size()-2].leftChildPos = local[local.size()-1].leaf_id;
        } else local[local.size()-2].rightChildPos = local[local.size()-1].leaf_id;
        stash.push_back(local[local.size()-1]);
        local.pop_back();
        evictTwoPaths();
    }
    local[0].leaf_id = rand_gen->getRandomLeaf();
    stash.push_back(local[0]);
    root.id = local[0].id;
    root.leaf_id = local[0].leaf_id;
    local.pop_back();
    evictTwoPaths();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x50(%rdi), %rax
subq 0x48(%rdi), %rax
sarq $0x4, %rax
movabsq $-0x5555555555555555, %r15 # imm = 0xAAAAAAAAAAAAAAAB
imulq %r15, %rax
cmpq $0x2, %rax
jb 0x53da
leaq 0x30(%rbx), %r14
movq 0x10(%rbx), %rdi
movq (%rdi), %rax
callq *(%rax)
movq 0x50(%rbx), %rcx
leaq -0x30(%rcx), %rsi
movl %eax, -0x28(%rcx)
movl -0x3c(%rcx), %edx
xorl %edi, %edi
cmpl -0x24(%rcx), %edx
setne %dil
shll $0x3, %edi
orq $-0x40, %rdi
movl %eax, (%rcx,%rdi)
movq %r14, %rdi
callq 0x30ce
movq 0x50(%rbx), %rax
leaq -0x30(%rax), %rdi
movq %rdi, 0x50(%rbx)
movq -0x30(%rax), %rax
callq *(%rax)
movq %rbx, %rdi
callq 0x50fc
movq 0x50(%rbx), %rax
subq 0x48(%rbx), %rax
sarq $0x4, %rax
imulq %r15, %rax
cmpq $0x1, %rax
ja 0x5378
movq 0x10(%rbx), %rdi
movq (%rdi), %rax
callq *(%rax)
movq 0x48(%rbx), %rsi
movl %eax, 0x8(%rsi)
leaq 0x30(%rbx), %rdi
callq 0x30ce
movq 0x48(%rbx), %rax
movq 0x50(%rbx), %rcx
movq 0x8(%rax), %xmm0
pshufd $0xe1, %xmm0, %xmm0     # xmm0 = xmm0[1,0,2,3]
movq %xmm0, 0x68(%rbx)
leaq -0x30(%rcx), %rdi
movq %rdi, 0x50(%rbx)
movq -0x30(%rcx), %rax
callq *(%rax)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x50fc
nop
// File: /workspace/github_cpp_makefile_star2_O3/obliviousram[P]oblivious-avl-tree/src/OAVLTreeDeterministicEviction.cpp
// Function: OAVLTreeDeterministicEviction::ReverseBits(int, int)
int OAVLTreeDeterministicEviction::ReverseBits(int g, int bits_length) {
    /*
    INPUT: Integers g and bits_length.
    OUTPUT: Integer reverse of length bits_length consisting of reversed bits of g.
    To be used to traverse the leaves and run eviction in reverse lexicographical order.
    */
    int g_mod = g % num_leaves;
    int reverse = 0;
    while(g_mod) {
        reverse <<= 1;
        reverse |= g_mod & 1;
        g_mod >>= 1;
        bits_length--;
    }
    
    reverse <<= bits_length;
    return reverse;
}

// Assembly:
movl %edx, %ecx
movl %esi, %eax
cltd
idivl 0x24(%rdi)
xorl %eax, %eax
testl %edx, %edx
je 0x5449
movl %edx, %esi
movl %edx, %edi
andl $0x1, %edi
leal (%rdi,%rax,2), %eax
sarl %esi
decl %ecx
cmpl $0x1, %edx
movl %esi, %edx
ja 0x5436
shll %cl, %eax
retq