LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/matteotiziano[P]simple-wavelet/./vector.h
// Function: std::vector<double, std::allocator<double>>& Vector::operator-=<double>(std::vector<double, std::allocator<double>>&, std::vector<double, std::allocator<double>> const&)
std::vector<T>& operator-=(std::vector<T>& vector1, const std::vector<T>& vector2) {
    if(vector1.size()!=vector2.size()) {
      throw std::invalid_argument("std::vector operator-=");
    }
    std::transform(vector1.begin(), vector1.end(), vector2.begin(), vector1.begin(), std::minus<T>());
    return vector1;
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %rbx
movq (%rdi), %rcx
movq 0x8(%rdi), %rsi
movq %rsi, %rdi
subq %rcx, %rdi
movq (%rax), %rdx
movq 0x8(%rax), %rax
subq %rdx, %rax
cmpq %rax, %rdi
jne 0x69c8
movq %rcx, %rdi
callq 0x2e02
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $0x10
popq %rdi
callq 0x20e0
movq %rax, %rbx
leaq 0x1bb8(%rip), %rsi      # 0x8592
movq %rax, %rdi
callq 0x22e0
movq 0x65f7(%rip), %rsi      # 0xcfe0
movq 0x65d0(%rip), %rdx      # 0xcfc0
movq %rbx, %rdi
callq 0x22a0
movq %rax, %r14
movq %rbx, %rdi
callq 0x2140
movq %r14, %rdi
callq 0x22c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x5a9e
leaq 0x18(%rsp), %r12
movq %rax, (%r12)
movq %rdx, 0x8(%r12)
movq %r14, %rdi
callq 0x5a9e
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %rdx, 0x8(%rsi)
movq %r12, %rdi
callq 0x6851
testb %al, %al
jne 0x6a80
addq $0x10, %r15
leaq 0x10(%r14), %rdi
movq %r15, %rsi
callq 0x6ac3
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2b7e
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
pushq $0x10
popq %rdi
callq 0x20e0
movq %rax, %rbx
leaq 0x1a9b(%rip), %rsi      # 0x852d
movq %rax, %rdi
callq 0x22e0
movq 0x653f(%rip), %rsi      # 0xcfe0
movq 0x6518(%rip), %rdx      # 0xcfc0
movq %rbx, %rdi
callq 0x22a0
movq %rax, %r14
movq %rbx, %rdi
callq 0x2140
movq %r14, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O2/matteotiziano[P]simple-wavelet/./vector.h
// Function: std::vector<double, std::allocator<double>>& Vector::operator*=<double>(std::vector<double, std::allocator<double>>&, std::vector<double, std::allocator<double>> const&)
std::vector<T>& operator*=(std::vector<T>& vector1, const std::vector<T>& vector2) {
    if(vector1.size() != vector2.size()) {
      throw std::invalid_argument("std::vector operator*=");
    }
    std::transform(vector1.begin(), vector1.end(), vector2.begin(), vector1.begin(), std::multiplies<T>());
    return vector1;
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %rbx
movq (%rdi), %rcx
movq 0x8(%rdi), %rsi
movq %rsi, %rdi
subq %rcx, %rdi
movq (%rax), %rdx
movq 0x8(%rax), %rax
subq %rdx, %rax
cmpq %rax, %rdi
jne 0x6afc
movq %rcx, %rdi
callq 0x2f58
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $0x10
popq %rdi
callq 0x20e0
movq %rax, %rbx
leaq 0x1a9b(%rip), %rsi      # 0x85a9
movq %rax, %rdi
callq 0x22e0
movq 0x64c3(%rip), %rsi      # 0xcfe0
movq 0x649c(%rip), %rdx      # 0xcfc0
movq %rbx, %rdi
callq 0x22a0
movq %rax, %r14
movq %rbx, %rdi
callq 0x2140
movq %r14, %rdi
callq 0x22c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x5a9e
leaq 0x18(%rsp), %r12
movq %rax, (%r12)
movq %rdx, 0x8(%r12)
movq %r14, %rdi
callq 0x5a9e
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %rdx, 0x8(%rsi)
movq %r12, %rdi
callq 0x6851
testb %al, %al
jne 0x6bb4
addq $0x10, %r15
leaq 0x10(%r14), %rdi
movq %r15, %rsi
callq 0x6bf7
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2b7e
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
pushq $0x10
popq %rdi
callq 0x20e0
movq %rax, %rbx
leaq 0x197e(%rip), %rsi      # 0x8544
movq %rax, %rdi
callq 0x22e0
movq 0x640b(%rip), %rsi      # 0xcfe0
movq 0x63e4(%rip), %rdx      # 0xcfc0
movq %rbx, %rdi
callq 0x22a0
movq %rax, %r14
movq %rbx, %rdi
callq 0x2140
movq %r14, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O2/matteotiziano[P]simple-wavelet/./vector.h
// Function: std::vector<double, std::allocator<double>>& Vector::operator/=<double>(std::vector<double, std::allocator<double>>&, std::vector<double, std::allocator<double>> const&)
std::vector<T>& operator/=(std::vector<T>& vector1, const std::vector<T>& vector2) {
    if(vector1.size() != vector2.size()) {
      throw std::invalid_argument("std::vector operator/=");
    }
    std::transform(vector1.begin(), vector1.end(), vector2.begin(), vector1.begin(), std::divides<T>());
    return vector1;
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %rbx
movq (%rdi), %rcx
movq 0x8(%rdi), %rsi
movq %rsi, %rdi
subq %rcx, %rdi
movq (%rax), %rdx
movq 0x8(%rax), %rax
subq %rdx, %rax
cmpq %rax, %rdi
jne 0x6c30
movq %rcx, %rdi
callq 0x7818
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $0x10
popq %rdi
callq 0x20e0
movq %rax, %rbx
leaq 0x197e(%rip), %rsi      # 0x85c0
movq %rax, %rdi
callq 0x22e0
movq 0x638f(%rip), %rsi      # 0xcfe0
movq 0x6368(%rip), %rdx      # 0xcfc0
movq %rbx, %rdi
callq 0x22a0
movq %rax, %r14
movq %rbx, %rdi
callq 0x2140
movq %r14, %rdi
callq 0x22c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/matteotiziano[P]simple-wavelet/./vector.h
// Function: std::vector<double, std::allocator<double>> Vector::operator+<double>(std::vector<double, std::allocator<double>>, double)
std::vector<T> operator+(std::vector<T> vector, T scalar) {
    std::transform(vector.begin(), vector.end(), vector.begin(), [&scalar](T value) {
      return scalar + value;
    });
    return vector;
  }

// Assembly:
movq %rdi, %rax
movq (%rsi), %rcx
movq 0x8(%rsi), %rdx
movq %rcx, %rdi
cmpq %rdx, %rdi
je 0x6d2f
movsd (%rdi), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%rdi)
addq $0x8, %rdi
jmp 0x6d18
movq %rcx, (%rax)
movq %rdx, 0x8(%rax)
movq 0x10(%rsi), %rcx
movq %rcx, 0x10(%rax)
xorpd %xmm0, %xmm0
movupd %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/matteotiziano[P]simple-wavelet/./vector.h
// Function: std::vector<double, std::allocator<double>> Vector::operator-<double>(std::vector<double, std::allocator<double>>, double)
std::vector<T> operator-(std::vector<T> vector, T scalar) {
    std::transform(vector.begin(), vector.end(), vector.begin(), [&scalar](T value) {
      return value - scalar;
    });
    return vector;
  }

// Assembly:
movq %rdi, %rax
movq (%rsi), %rcx
movq 0x8(%rsi), %rdx
movq %rcx, %rdi
cmpq %rdx, %rdi
je 0x6e07
movsd (%rdi), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, (%rdi)
addq $0x8, %rdi
jmp 0x6df0
movq %rcx, (%rax)
movq %rdx, 0x8(%rax)
movq 0x10(%rsi), %rcx
movq %rcx, 0x10(%rax)
xorpd %xmm0, %xmm0
movupd %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/matteotiziano[P]simple-wavelet/./vector.h
// Function: std::vector<double, std::allocator<double>> Vector::operator^<double>(std::vector<double, std::allocator<double>>, double)
std::vector<T> operator^(std::vector<T> vector, T scalar) {
    std::transform(vector.begin(), vector.end(), vector.begin(), [&scalar](T value) {
      return std::pow(value, scalar);
    });
    return vector;
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movsd %xmm0, (%rsp)
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %r15
movq 0x8(%rsi), %r12
cmpq %r12, %r15
je 0x70a4
movsd (%r15), %xmm0
movsd (%rsp), %xmm1
callq 0x22b0
movsd %xmm0, (%r15)
addq $0x8, %r15
jmp 0x7085
movups (%rbx), %xmm0
movups %xmm0, (%r14)
movq 0x10(%rbx), %rax
movq %rax, 0x10(%r14)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/rupc[P]xor-secret-sharing-scheme/main.cpp
// Function: XORSecretShares::generate_random_secret[abi:cxx11]()
std::string XORSecretShares::generate_random_secret(void)
{
    if (_init == false) {
        return "ERROR";
    }

    std::string randSecret(key_size, '0');

    for (int i = 0; i < key_size; i++) {
        randSecret[i] = std::to_string(rand() % 2)[0];
    }

    std::string res;
    switch (key_size) {
        case 64: {
            std::bitset<64> _secret_64(randSecret);
            res = _secret_64.to_string();
        }
            break;
        case 128: {
            std::bitset<128> _secret_128(randSecret);
            res = _secret_128.to_string();
        }
            break;
        case 256: {
            std::bitset<256> _secret_256(randSecret);
            res = _secret_256.to_string();
        }
            break;
        default: {
            std::bitset<32> _secret_32(randSecret);
            res = _secret_32.to_string();
        }
            break;
    }
    this->secret = res;
    return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
cmpb $0x0, 0x4(%rsi)
je 0x23c7
movq %rsi, %r14
movslq (%rsi), %rsi
leaq -0x58(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0x68(%rbp), %rdi
pushq $0x30
popq %rdx
callq 0x2150
xorl %r12d, %r12d
pushq $0x2
popq %r13
leaq -0x48(%rbp), %r15
movslq (%r14), %rax
cmpq %rax, %r12
jge 0x2375
callq 0x2030
cltd
idivl %r13d
movq %r15, %rdi
movl %edx, %esi
callq 0x2bd1
movq -0x48(%rbp), %rax
movb (%rax), %al
movq -0x68(%rbp), %rcx
movb %al, (%rcx,%r12)
movq %r15, %rdi
callq 0x2080
incq %r12
jmp 0x233f
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
andq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
cmpl $0x40, %eax
je 0x2403
cmpl $0x80, %eax
je 0x23df
cmpl $0x100, %eax            # imm = 0x100
jne 0x2427
leaq -0x48(%rbp), %rdi
leaq -0x68(%rbp), %rsi
xorl %edx, %edx
callq 0x2cb4
leaq -0x88(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x31cc
leaq -0x88(%rbp), %r15
jmp 0x244d
leaq 0x1c36(%rip), %rsi      # 0x4004
leaq -0x68(%rbp), %rdx
movq %rbx, %rdi
callq 0x2060
jmp 0x2478
leaq -0x88(%rbp), %rdi
leaq -0x68(%rbp), %rsi
xorl %edx, %edx
callq 0x2c72
leaq -0x48(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x306a
jmp 0x2449
leaq -0x88(%rbp), %rdi
leaq -0x68(%rbp), %rsi
xorl %edx, %edx
callq 0x2c32
leaq -0x48(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x2f16
jmp 0x2449
leaq -0x88(%rbp), %rdi
leaq -0x68(%rbp), %rsi
xorl %edx, %edx
callq 0x2cfa
leaq -0x48(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x3312
leaq -0x48(%rbp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2160
movq %r15, %rdi
callq 0x2080
addq $0x8, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x20b0
leaq -0x68(%rbp), %rdi
callq 0x2080
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x249a
jmp 0x249a
jmp 0x249a
jmp 0x249a
jmp 0x249a
jmp 0x249a
jmp 0x249a
jmp 0x249a
movq %rax, %r14
movq %rbx, %rdi
callq 0x2080
jmp 0x24aa
movq %rax, %r14
leaq -0x68(%rbp), %rdi
callq 0x2080
movq %r14, %rdi
callq 0x21b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/Manu343726[P]Polyop/main.cpp
// Function: main
int main()
{
    using pop::trigger::_;
    
    auto op = _( 1.0f ) == 1.0f;
    
    std::cout << std::boolalpha << op() << std::endl;
    std::cout << std::boolalpha << op( floating_point_context_tag{} ) << std::endl;
    std::cout << std::boolalpha << (_(1.0f) == 2.0f)( floating_point_context_tag{} ) << std::endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
leaq 0x8(%rsp), %r15
leaq 0x20(%rsp), %r14
movq %r15, 0x8(%r14)
leaq 0x4(%rsp), %r12
movq %r12, 0x10(%r14)
movq 0x2e01(%rip), %rbx      # 0x3fd8
movq (%rbx), %rax
movq -0x18(%rax), %rax
orl $0x1, 0x18(%rbx,%rax)
movq %r14, %rdi
callq 0x12c0
movzbl %al, %esi
movq %rbx, %rdi
callq 0x1070
movq %rax, %rdi
callq 0x1030
movq (%rbx), %rax
movq -0x18(%rax), %rax
orl $0x1, 0x18(%rbx,%rax)
movq %r14, %rdi
callq 0x1276
movzbl %al, %esi
movq %rbx, %rdi
callq 0x1070
movq %rax, %rdi
callq 0x1030
movq (%rbx), %rax
movq -0x18(%rax), %rax
orl $0x1, 0x18(%rbx,%rax)
movl $0x3f800000, (%r12)     # imm = 0x3F800000
movq %rsp, %rax
movl $0x40000000, (%rax)     # imm = 0x40000000
movq %r12, 0x8(%r15)
movq %rax, 0x10(%r15)
leaq 0x8(%rsp), %rdi
callq 0x1276
movzbl %al, %esi
movq %rbx, %rdi
callq 0x1070
movq %rax, %rdi
callq 0x1030
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/t0mm4rx[P]piscine_cpp/day04/ex01/AWeapon.cpp
// Function: AWeapon::operator=(AWeapon const&)
AWeapon &AWeapon::operator=(const AWeapon &other)
{
	this->name = other.name;
	this->apCost = other.apCost;
	this->damage = other.damage;
	return (*this);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
addq $0x8, %rsi
addq $0x8, %rdi
callq 0x2080
movl 0x28(%rbx), %eax
movl %eax, 0x28(%r14)
movl 0x2c(%rbx), %eax
movl %eax, 0x2c(%r14)
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x25d4
movq %rsi, %rbx
movl 0x20(%r14), %r15d
callq 0x24b6
movq 0x4a12(%rip), %rdi      # 0x6fd8
cmpl %eax, %r15d
jge 0x25fb
leaq 0x1a71(%rip), %rsi      # 0x4043
jmp 0x25e2
movq 0x49fd(%rip), %rdi      # 0x6fd8
leaq 0x1a48(%rip), %rsi      # 0x402a
callq 0x20d0
movq %rax, %rdi
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2070
movq %r14, %rsi
callq 0x20c0
leaq 0x1a4e(%rip), %rsi      # 0x4058
movq %rax, %rdi
callq 0x20d0
movq %rax, %r15
leaq -0x60(%rbp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x28a0
movq %r15, %rdi
movq %r12, %rsi
callq 0x20c0
leaq 0x1a2b(%rip), %rsi      # 0x4061
movq %rax, %rdi
callq 0x20d0
movq %rax, %r15
movq 0x28(%r14), %rsi
leaq -0x40(%rbp), %rdi
callq 0x24c0
leaq -0x40(%rbp), %rsi
movq %r15, %rdi
callq 0x20c0
movq %rax, %rdi
callq 0x2070
leaq -0x40(%rbp), %rdi
callq 0x2060
leaq -0x60(%rbp), %rdi
callq 0x2060
movq 0x28(%r14), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x28(%r14), %rdi
callq 0x24dc
movq (%rbx), %rcx
movq %rbx, %rdi
movl %eax, %esi
callq *0x10(%rcx)
movq 0x28(%r14), %rdi
callq 0x24b6
movl 0x20(%r14), %ecx
subl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
cmovgl %ecx, %eax
movl %eax, 0x20(%r14)
movq %rbx, %rdi
callq 0x28bc
testl %eax, %eax
jg 0x26c1
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x26de
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x2060
jmp 0x26e1
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x2060
movq %rbx, %rdi
callq 0x2140
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x38(%rbp), %r15
movq %r15, %rdi
callq 0x2110
movq %rbx, %rdi
movq %r15, %rsi
callq 0x20c0
leaq 0x1933(%rip), %rsi      # 0x406a
movq %rax, %rdi
callq 0x20d0
movl 0x20(%r14), %esi
movq %rax, %rdi
callq 0x2130
leaq 0x191e(%rip), %rsi      # 0x4070
movq %rax, %rdi
callq 0x20d0
leaq -0x38(%rbp), %rdi
callq 0x2060
cmpq $0x0, 0x28(%r14)
je 0x27a2
leaq 0x1913(%rip), %rsi      # 0x4084
movq %rbx, %rdi
callq 0x20d0
movq %rax, %r15
movq 0x28(%r14), %rsi
leaq -0x38(%rbp), %r14
movq %r14, %rdi
callq 0x24c0
movq %r15, %rdi
movq %r14, %rsi
callq 0x20c0
leaq -0x38(%rbp), %rdi
callq 0x2060
jmp 0x27b1
leaq 0x18d0(%rip), %rsi      # 0x4079
movq %rbx, %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x2070
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x27c9
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x2060
movq %rbx, %rdi
callq 0x2140
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/t0mm4rx[P]piscine_cpp/day04/ex01/PlasmaRifle.cpp
// Function: PlasmaRifle::operator=(PlasmaRifle const&)
PlasmaRifle &PlasmaRifle::operator=(const PlasmaRifle &other)
{
	this->name = other.getName();
	this->apCost = other.getAPCost();
	this->damage = other.getDamage();
	return (*this);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x38(%rbp), %r15
movq %r15, %rdi
callq 0x24c0
leaq 0x8(%rbx), %rdi
movq %r15, %rsi
callq 0x2100
movq %r15, %rdi
callq 0x2060
movq %r14, %rdi
callq 0x24b6
movl %eax, 0x28(%rbx)
movq %r14, %rdi
callq 0x24dc
movl %eax, 0x2c(%rbx)
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
pushq %rax
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 0x3f5b(%rip), %rdi      # 0x6fd8
callq 0x2130
leaq 0x1004(%rip), %rsi      # 0x408d
movq %rax, %rdi
callq 0x20d0
addq $0x10, %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x20c0
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2070
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x54fa
movzbl 0x648a(%rip), %ecx      # 0xb961
movb 0x6483(%rip), %al       # 0xb960
cmpl $0x7, %ecx
jae 0x54ee
addb %al, %al
movb %al, 0x6476(%rip)       # 0xb960
incl %ecx
jmp 0x54dd
movsbl %al, %edi
movq %rbx, %rsi
popq %rbx
jmp 0x51b0
cmpl $0x2, %esi
jae 0x5559
movzbl 0x645a(%rip), %eax      # 0xb960
leal (%rsi,%rax,2), %ecx
movb %cl, 0x6451(%rip)       # 0xb960
movb 0x644c(%rip), %al       # 0xb961
cmpb $0x7, %al
jne 0x5544
movsbl %cl, %edi
movq %rbx, %rsi
callq 0x51b0
cmpb $-0x1, 0x6435(%rip)     # 0xb960
jne 0x5537
xorl %edi, %edi
movq %rbx, %rsi
callq 0x51b0
movb $0x0, 0x6422(%rip)      # 0xb960
movb 0x641d(%rip), %al       # 0xb961
leal 0x1(%rax), %ecx
xorl %edx, %edx
cmpb $0x7, %al
movzbl %cl, %eax
cmovel %edx, %eax
movb %al, 0x640a(%rip)       # 0xb961
popq %rbx
retq
leaq 0x25d6(%rip), %rdi      # 0x7b36
callq 0x5210
pushq $0x1
popq %rdi
callq 0x51a0
// File: /workspace/github_cpp_makefile_star2_O2/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
movl %edx, %ecx
negl %ecx
cmovsl %edx, %ecx
xorl %eax, %eax
testl %ecx, %ecx
je 0x55ad
shrl %ecx
incl %eax
jmp 0x55a3
pushq $0x1
popq %rsi
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_O2/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq %rsi, %rdi
je 0x630b
movq %rsi, %r14
movq %rbx, %rdi
callq 0x50e0
movq 0x2c(%r14), %rax
movq %rax, 0x2c(%rbx)
movq 0x20(%r14), %rax
movq %rax, 0x20(%rbx)
andl $0x0, 0x28(%rbx)
movq %rbx, %rdi
callq 0x6820
addq $0x38, %r14
leaq 0x38(%rbx), %rdi
movq %r14, %rsi
callq 0x69a4
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/rapirent[P]JPEG/./bitmap_image.hpp
// Function: bitmap_image::read_bih(std::basic_ifstream<char, std::char_traits<char>>&, bitmap_image::bitmap_information_header&)
inline void read_bih(std::ifstream& stream,bitmap_information_header& bih)
   {
      read_from_stream(stream,bih.size            );
      read_from_stream(stream,bih.width           );
      read_from_stream(stream,bih.height          );
      read_from_stream(stream,bih.planes          );
      read_from_stream(stream,bih.bit_count       );
      read_from_stream(stream,bih.compression     );
      read_from_stream(stream,bih.size_image      );
      read_from_stream(stream,bih.x_pels_per_meter);
      read_from_stream(stream,bih.y_pels_per_meter);
      read_from_stream(stream,bih.clr_used        );
      read_from_stream(stream,bih.clr_important   );

      if (big_endian())
      {
         bih.size        = flip(bih.size                 );
         bih.width       = flip(bih.width                );
         bih.height      = flip(bih.height               );
         bih.planes      = flip(bih.planes               );
         bih.bit_count   = flip(bih.bit_count            );
         bih.compression = flip(bih.compression          );
         bih.size_image  = flip(bih.size_image           );
         bih.x_pels_per_meter = flip(bih.x_pels_per_meter);
         bih.y_pels_per_meter = flip(bih.y_pels_per_meter);
         bih.clr_used      = flip(bih.clr_used           );
         bih.clr_important = flip(bih.clr_important      );
      }
   }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
pushq $0x4
popq %r15
movq %rsi, %rdi
movq %rdx, %rsi
movq %r15, %rdx
callq 0x51c0
leaq 0x4(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x51c0
leaq 0x8(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x51c0
leaq 0xc(%rbx), %rsi
pushq $0x2
popq %r12
movq %r14, %rdi
movq %r12, %rdx
callq 0x51c0
leaq 0xe(%rbx), %rsi
movq %r14, %rdi
movq %r12, %rdx
callq 0x51c0
leaq 0x10(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x51c0
leaq 0x14(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x51c0
leaq 0x18(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x51c0
leaq 0x1c(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x51c0
leaq 0x20(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x51c0
addq $0x24, %rbx
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x51c0
// File: /workspace/github_cpp_makefile_star2_O2/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 0x26c9
movq 0x8(%rbx), %rsi
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x27a4
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x29dc
leaq 0x8(%rsp), %rdi
callq 0x20b0
movl 0x28(%rsp), %esi
movl 0x2c(%rsp), %edx
leaq 0x8(%rsp), %rdi
callq 0x27e0
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x240c
movq 0x10(%rbx), %rsi
leaq 0x48(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x27a4
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x2e6c
leaq 0x48(%rsp), %rdi
callq 0x20b0
leaq 0x10(%rsp), %rdi
callq 0x28cc
leaq 0x30(%rsp), %rdi
callq 0x28cc
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r14
retq
movq 0x3920(%rip), %rdi      # 0x5ff0
leaq 0x1971(%rip), %rsi      # 0x4048
callq 0x2180
movq (%rbx), %rsi
movq %rax, %rdi
callq 0x2180
leaq 0x1962(%rip), %rsi      # 0x4050
movq %rax, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20c0
pushq $0x1
jmp 0x2785
movq %rdx, %r14
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x20b0
jmp 0x271f
jmp 0x2719
movq %rdx, %r14
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x28cc
jmp 0x2731
movq %rdx, %r14
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x28cc
jmp 0x2755
movq %rdx, %r14
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x20b0
jmp 0x2755
movq %rdx, %r14
movq %rax, %rbx
cmpl $0x1, %r14d
jne 0x2793
movq %rbx, %rdi
callq 0x2090
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
movq 0x387d(%rip), %rdi      # 0x5ff0
movq %rax, %rsi
callq 0x2180
movq %rax, %rdi
callq 0x20c0
pushq $0x2
popq %rdi
callq 0x21d0
movq %rax, %rbx
callq 0x2250
movq %rbx, %rdi
callq 0x2270
movq %rax, %rdi
callq 0x281f
nop
// File: /workspace/github_cpp_makefile_star2_O2/wcochran[P]pano_to_cube/PPM.cpp
// Function: PPM::write(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void PPM::write(const std::string& fname) { // throws BogusPPM
  FILE *f = fopen(fname.c_str(), "wb");
  if (f == nullptr) {
    std::stringstream ss;
    ss << fname << ":" << strerror(errno);
    throw BogusPPM(ss.str());
  }
  fprintf(f, "P6\n%d %d\n255\n", W, H);
  if (fwrite(&pixels[0], 3, W*H, f) != W*H) {
    std::stringstream ss;
    if (ferror(f))
      ss << fname << ":" << strerror(errno);
    else if (feof(f))
      ss << fname << ": unexpected EOF!";
    else
      ss << fname << ": unable to write pixels";
    fclose(f);
    throw BogusPPM(ss.str());
  }
  fclose(f);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rsi, %r14
movq %rdi, %r15
movq (%rsi), %rdi
leaq 0x12b9(%rip), %rsi      # 0x4142
callq 0x21c0
testq %rax, %rax
je 0x2ef1
movq %rax, %rbx
movl (%r15), %edx
movl 0x4(%r15), %ecx
leaq 0x12a1(%rip), %rsi      # 0x4145
movq %rax, %rdi
xorl %eax, %eax
callq 0x21e0
movq 0x8(%r15), %rdi
movslq (%r15), %rax
movslq 0x4(%r15), %rdx
imulq %rax, %rdx
pushq $0x3
popq %rsi
movq %rbx, %rcx
callq 0x22a0
movslq (%r15), %rcx
movslq 0x4(%r15), %rdx
imulq %rcx, %rdx
cmpq %rdx, %rax
jne 0x2f74
movq %rbx, %rdi
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2190
leaq 0x20(%rsp), %rdi
callq 0x2100
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x2160
leaq 0x11bc(%rip), %rsi      # 0x40cb
movq %rax, %rdi
callq 0x2180
movq %rax, %rbx
callq 0x2030
movl (%rax), %edi
callq 0x2060
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2180
pushq $0x10
popq %rdi
callq 0x20d0
movq %rax, %r14
leaq 0x38(%rsp), %rsi
movq %rsp, %rdi
callq 0x2230
movb $0x1, %bpl
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3206
xorl %ebp, %ebp
leaq 0x2e10(%rip), %rsi      # 0x5d70
movq 0x3071(%rip), %rdx      # 0x5fd8
movq %r14, %rdi
callq 0x2260
jmp 0x3041
leaq 0x20(%rsp), %rdi
callq 0x2100
movq %rbx, %rdi
callq 0x2290
testl %eax, %eax
jne 0x2fac
movq %rbx, %rdi
callq 0x2210
leaq 0x30(%rsp), %rdi
testl %eax, %eax
jne 0x2fe4
movq %r14, %rsi
callq 0x2160
leaq 0x11a9(%rip), %rsi      # 0x4153
jmp 0x2ff3
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x2160
leaq 0x110b(%rip), %rsi      # 0x40cb
movq %rax, %rdi
callq 0x2180
movq %rax, %r14
callq 0x2030
movl (%rax), %edi
callq 0x2060
movq %r14, %rdi
movq %rax, %rsi
callq 0x2180
jmp 0x2ffb
movq %r14, %rsi
callq 0x2160
leaq 0x1125(%rip), %rsi      # 0x4118
movq %rax, %rdi
callq 0x2180
movq %rbx, %rdi
callq 0x2190
pushq $0x10
popq %rdi
callq 0x20d0
movq %rax, %r14
leaq 0x38(%rsp), %rsi
movq %rsp, %rdi
callq 0x2230
movb $0x1, %bpl
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3206
xorl %ebp, %ebp
leaq 0x2d3e(%rip), %rsi      # 0x5d70
movq 0x2f9f(%rip), %rdx      # 0x5fd8
movq %r14, %rdi
callq 0x2260
jmp 0x3045
jmp 0x3057
movq %rax, %rbx
movq %rsp, %rdi
callq 0x20b0
testb %bpl, %bpl
jne 0x305a
jmp 0x3069
movq %rax, %rbx
movq %r14, %rdi
callq 0x2120
jmp 0x3069
jmp 0x3066
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2130
movq %rbx, %rdi
callq 0x2270
nop
// File: /workspace/github_cpp_makefile_star2_O2/wcochran[P]pano_to_cube/PPM.cpp
// Function: PPM::bilerp(float, float, float*) const
void PPM::bilerp(float r, float c, float pix[3]) const {
  if (r < 0 || r >= H || c < 0 || c >= W) { // clamp to black
    pix[0] = pix[1] = pix[2] = 0;
  } else {
    const int r0 = static_cast<int>(floorf(r));
    const int c0 = static_cast<int>(floorf(c));
    const int r1 = (r0 < H-1) ? (r0 + 1) : r0;
    const int c1 = (c0 < W-1) ? (c0 + 1) : c0;
    const unsigned char *pix00 = this->operator()(r0,c0);
    const unsigned char *pix01 = this->operator()(r0,c1);
    const unsigned char *pix10 = this->operator()(r1,c0);
    const unsigned char *pix11 = this->operator()(r1,c1);
    const float s = c - c0;
    const float t = r - r0;
    float pix0[3], pix1[3];
    for (int i = 0; i < 3; i++) {
      pix0[i] = (1-s)*pix00[i] + s*pix01[i];
      pix1[i] = (1-s)*pix10[i] + s*pix11[i];
    }
    for (int i = 0; i < 3; i++)
      pix[i] = (1-t)*pix0[i] + t*pix1[i];
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
xorps %xmm2, %xmm2
ucomiss %xmm0, %xmm2
jbe 0x30a8
andl $0x0, 0x8(%rbx)
andq $0x0, (%rbx)
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
ucomiss %xmm1, %xmm2
ja 0x3093
movq %rdi, %r14
movl 0x4(%rdi), %ebp
cvtsi2ss %ebp, %xmm2
ucomiss %xmm2, %xmm0
jae 0x3093
movl (%r14), %r15d
cvtsi2ss %r15d, %xmm2
ucomiss %xmm2, %xmm1
jae 0x3093
movss %xmm0, 0x4(%rsp)
movss %xmm1, (%rsp)
callq 0x2080
movaps %xmm0, 0x20(%rsp)
cvttss2si %xmm0, %r12d
movss (%rsp), %xmm0
callq 0x2080
movss (%rsp), %xmm5
cvttss2si %xmm0, %edx
decl %ebp
xorl %esi, %esi
cmpl %r12d, %ebp
setg %sil
addl %r12d, %esi
leal -0x1(%r15), %eax
xorl %edi, %edi
cmpl %edx, %eax
setg %dil
addl %edx, %edi
imull %r15d, %r12d
leal (%r12,%rdx), %eax
leal (%rax,%rax,2), %eax
cltq
movq 0x8(%r14), %r8
addq %r8, %rax
addl %edi, %r12d
leal (%r12,%r12,2), %ecx
movslq %ecx, %rcx
addq %r8, %rcx
imull %r15d, %esi
addl %esi, %edx
leal (%rdx,%rdx,2), %edx
movslq %edx, %rdx
addq %r8, %rdx
addl %edi, %esi
leal (%rsi,%rsi,2), %esi
movslq %esi, %rsi
addq %r8, %rsi
cvttps2dq %xmm0, %xmm0
cvtdq2ps %xmm0, %xmm0
subss %xmm0, %xmm5
cvttps2dq 0x20(%rsp), %xmm0
cvtdq2ps %xmm0, %xmm1
movss 0xed3(%rip), %xmm0      # 0x403c
movaps %xmm0, %xmm2
subss %xmm5, %xmm2
xorl %edi, %edi
cmpq $0x3, %rdi
je 0x31c9
movzbl (%rax,%rdi), %r8d
cvtsi2ss %r8d, %xmm3
movzbl (%rcx,%rdi), %r8d
cvtsi2ss %r8d, %xmm4
mulss %xmm5, %xmm4
mulss %xmm2, %xmm3
addss %xmm4, %xmm3
movss %xmm3, 0x14(%rsp,%rdi,4)
movzbl (%rdx,%rdi), %r8d
cvtsi2ss %r8d, %xmm3
movzbl (%rsi,%rdi), %r8d
cvtsi2ss %r8d, %xmm4
mulss %xmm5, %xmm4
mulss %xmm2, %xmm3
addss %xmm4, %xmm3
movss %xmm3, 0x8(%rsp,%rdi,4)
incq %rdi
jmp 0x3172
movss 0x4(%rsp), %xmm3
subss %xmm1, %xmm3
subss %xmm3, %xmm0
xorl %eax, %eax
cmpq $0x3, %rax
je 0x309b
movss 0x8(%rsp,%rax,4), %xmm1
mulss %xmm3, %xmm1
movss 0x14(%rsp,%rax,4), %xmm2
mulss %xmm0, %xmm2
addss %xmm1, %xmm2
movss %xmm2, (%rbx,%rax,4)
incq %rax
jmp 0x31d9
nop
// File: /workspace/github_cpp_makefile_star2_O2/mapequation[P]partition-validation/./partition-validation.h
// Function: tokenize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char)
vector<string> tokenize(const string &str, char delimiter) {
    vector<string> tokens;

    // skip delimiter at beginning.
    auto lastPos = str.find_first_not_of(delimiter, 0);

    // find first "non-delimiter".
    auto pos = str.find_first_of(delimiter, lastPos);

    while (string::npos != pos || string::npos != lastPos) {
        // found a token, add it to the vector.
        tokens.push_back(str.substr(lastPos, pos - lastPos));

        // skip delimiter.  Note the "not_of"
        lastPos = str.find_first_not_of(delimiter, pos);

        // find next "non-delimiter"
        pos = str.find_first_of(delimiter, lastPos);
    }

    return tokens;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movq %rsi, %rdi
movl %edx, %esi
xorl %edx, %edx
callq 0x3230
movq %rax, %r13
movq %r14, %rdi
movl %ebp, %esi
movq %rax, %rdx
callq 0x32f0
movq %rax, %r12
leaq 0x8(%rsp), %r15
movsbl %bpl, %ebp
movq %r12, %rax
andq %r13, %rax
cmpq $-0x1, %rax
je 0x360a
movq %r12, %rcx
subq %r13, %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x3270
movq %rbx, %rdi
movq %r15, %rsi
callq 0x683c
movq %r15, %rdi
callq 0x3110
movq %r14, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x3230
movq %rax, %r13
movq %r14, %rdi
movl %ebp, %esi
movq %rax, %rdx
callq 0x32f0
movq %rax, %r12
jmp 0x35b5
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x362e
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x3110
movq %rbx, %rdi
callq 0x5594
movq %r14, %rdi
callq 0x33e0
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x50, %rsp
pushq $0x20
popq %rdi
callq 0x10a0
movq %rax, %r14
leaq 0xd8b(%rip), %rsi       # 0x2004
leaq -0x58(%rbp), %rdx
movq %rax, %rdi
callq 0x1040
leaq -0x28(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1594
leaq -0x38(%rbp), %rdi
movq %rbx, %rsi
callq 0x13e0
leaq 0xd63(%rip), %rsi       # 0x200a
leaq -0x58(%rbp), %rdi
leaq -0x11(%rbp), %rdx
callq 0x1040
movq -0x20(%rbp), %rax
testq %rax, %rax
je 0x12c5
movl 0x8(%rax), %eax
cmpl $0x1, %eax
je 0x12e8
pushq $0x20
popq %rdi
callq 0x10a0
movq %rax, %r14
movq -0x28(%rbp), %rsi
movq %rax, %rdi
callq 0x10c0
leaq -0x28(%rbp), %rdi
movq %r14, %rsi
callq 0x139a
movq -0x28(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x1110
movq -0x28(%rbp), %rsi
movq 0x2cd8(%rip), %rdi      # 0x3fd8
callq 0x1090
movq %rax, %rdi
callq 0x1070
movq -0x38(%rbp), %rsi
movq 0x2cc0(%rip), %rdi      # 0x3fd8
callq 0x1090
movq %rax, %rdi
callq 0x1070
leaq -0x20(%rbp), %rbx
leaq -0x58(%rbp), %rdi
callq 0x1060
leaq -0x30(%rbp), %rdi
callq 0x142c
movq %rbx, %rdi
callq 0x142c
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
pushq $0x20
popq %rsi
movq %r14, %rdi
callq 0x10b0
jmp 0x1376
movq %rax, %rbx
jmp 0x137f
movq %rax, %rbx
pushq $0x20
popq %rsi
movq %r14, %rdi
callq 0x10b0
jmp 0x1391
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x1060
leaq -0x30(%rbp), %rdi
callq 0x142c
leaq -0x20(%rbp), %rdi
callq 0x142c
movq %rbx, %rdi
callq 0x1100
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0xa63d(%rip), %rax      # 0xcb80
movq %rax, (%rdi)
orq $-0x1, 0x8(%rdi)
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x20(%rdi)
xorl %eax, %eax
cmpq $0x4, %rax
je 0x2569
movl 0x10(%rsi,%rax,4), %ecx
movl %ecx, 0x10(%rdi,%rax,4)
incq %rax
jmp 0x2556
movq 0x8(%rsi), %rax
movq %rax, 0x8(%rdi)
movups 0x20(%rsi), %xmm0
movups %xmm0, 0x20(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/obliviousram[P]oblivious-avl-tree/src/Block.cpp
// Function: Block::printBlock()
void Block::printBlock(){
	string data_holder = "";
	for (int i = 0; i<BLOCK_SIZE; i++) {
		data_holder += to_string(this->data[i]);
		data_holder += " ";
	}
	cout << "id: " << to_string(this->id) << " leaf id: " << to_string(this->leaf_id) << " data: " << data_holder << endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rdi, %rbx
leaq 0x5a33(%rip), %rsi      # 0x8016
leaq 0x40(%rsp), %r14
movq %rsp, %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x2720
xorl %r13d, %r13d
leaq 0x5a15(%rip), %r12      # 0x8015
cmpq $0x4, %r13
je 0x2636
movl 0x10(%rbx,%r13,4), %esi
movq %r15, %rdi
callq 0x275b
movq %r14, %rdi
movq %r15, %rsi
callq 0x22f0
movq %r15, %rdi
callq 0x20b0
movq %r14, %rdi
movq %r12, %rsi
callq 0x22e0
incq %r13
jmp 0x2600
movq 0xa99b(%rip), %rdi      # 0xcfd8
leaq 0x59c6(%rip), %rsi      # 0x800a
callq 0x2170
movq %rax, %r14
movl 0xc(%rbx), %esi
movq %rsp, %rdi
callq 0x275b
movq %rsp, %rsi
movq %r14, %rdi
callq 0x2150
leaq 0x599b(%rip), %rsi      # 0x8004
movq %rax, %rdi
callq 0x2170
movq %rax, %r14
movl 0x8(%rbx), %esi
leaq 0x20(%rsp), %rdi
callq 0x275b
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x2150
leaq 0x597a(%rip), %rsi      # 0x800f
movq %rax, %rdi
callq 0x2170
leaq 0x40(%rsp), %rsi
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20c0
leaq 0x20(%rsp), %rdi
callq 0x20b0
movq %rsp, %rdi
callq 0x20b0
leaq 0x40(%rsp), %rdi
callq 0x20b0
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x26f5
jmp 0x2702
jmp 0x2702
jmp 0x26f5
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x20b0
jmp 0x26f8
jmp 0x2702
movq %rax, %rbx
movq %rsp, %rdi
callq 0x20b0
jmp 0x2705
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x22b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
testq %rsi, %rsi
je 0x2a50
movq %rsi, %r14
movslq 0xa7d0(%rip), %rsi      # 0xd198
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x2d2e
leaq 0x10(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2e7a
movq %r15, %rdi
callq 0x2d0c
xorl %r12d, %r12d
xorl %r13d, %r13d
movslq 0xa79c(%rip), %rax      # 0xd198
cmpq %rax, %r13
jge 0x2a42
movq (%r14), %rsi
addq %r12, %rsi
movq %r15, %rdi
callq 0x253c
movq (%rbx), %rax
movq 0x28(%r15), %rcx
movq %rcx, 0x28(%rax,%r12)
movups 0x8(%r15), %xmm0
movups 0x18(%r15), %xmm1
movups %xmm1, 0x18(%rax,%r12)
movups %xmm0, 0x8(%rax,%r12)
movq %r15, %rdi
callq 0x2594
incq %r13
addq $0x30, %r12
jmp 0x29f5
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
pushq $0x8
popq %rdi
callq 0x20d0
movq %rax, %r14
pushq $0x10
popq %rdi
callq 0x2190
movq %rax, %r12
leaq 0x56dc(%rip), %rsi      # 0x8149
movq %rax, %rdi
callq 0x2080
movq %r12, (%r14)
leaq 0xa121(%rip), %rsi      # 0xcba0
movq %r14, %rdi
xorl %edx, %edx
callq 0x2290
jmp 0x2aaa
movq %rax, %r15
pushq $0x10
popq %rsi
movq %r12, %rdi
callq 0x21a0
jmp 0x2a9e
movq %rax, %r15
movq %r14, %rdi
callq 0x2110
jmp 0x2aad
jmp 0x2aaa
movq %rax, %r15
movq %rbx, %rdi
callq 0x2d0c
movq %r15, %rdi
callq 0x22b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebp
movq %rdi, (%rsp)
movq (%rsi), %r15
movq 0x8(%rsi), %rbx
xorl %r14d, %r14d
leaq 0x8(%rsp), %r12
cmpq %rbx, %r15
je 0x2b22
movq %r12, %rdi
movq %r15, %rsi
callq 0x253c
movl 0x14(%rsp), %r13d
cmpl %ebp, %r13d
jne 0x2b11
pushq $0x30
popq %rdi
callq 0x2190
movq %rax, %r14
movq %rax, %rdi
movq %r12, %rsi
callq 0x253c
movq %r12, %rdi
callq 0x2594
addq $0x30, %r15
cmpl %ebp, %r13d
jne 0x2ae1
movq (%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x253c
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
pushq $0x30
popq %rsi
movq %r14, %rdi
callq 0x21a0
jmp 0x2b56
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2594
movq %rbx, %rdi
callq 0x22b0
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %rcx
movq (%rdi), %rsi
movq 0x8(%rdi), %rax
subq %rsi, %rax
pushq $0x30
popq %r8
cqto
idivq %r8
movq %rax, %rbx
addq $-0x30, %rsi
xorl %eax, %eax
movq %rax, %r14
cmpq %rax, %rbx
je 0x2c0c
movl 0x3c(%rsi), %edx
leaq 0x1(%r14), %rax
addq $0x30, %rsi
cmpl 0xc(%rcx), %edx
jne 0x2bef
callq 0x2dac
cmpq %r14, %rbx
seta %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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, 0xa56f(%rip)      # 0xd1a3
je 0x2c49
movl %edi, 0xa55c(%rip)      # 0xd198
movb $0x1, 0xa560(%rip)      # 0xd1a3
popq %rbx
popq %r14
popq %r15
retq
pushq $0x8
popq %rdi
callq 0x20d0
movq %rax, %rbx
pushq $0x10
popq %rdi
callq 0x2190
movq %rax, %r14
leaq 0x5505(%rip), %rsi      # 0x816b
movq %rax, %rdi
callq 0x2080
movq %r14, (%rbx)
leaq 0x9f28(%rip), %rsi      # 0xcba0
movq %rbx, %rdi
xorl %edx, %edx
callq 0x2290
movq %rax, %r15
pushq $0x10
popq %rsi
movq %r14, %rdi
callq 0x21a0
jmp 0x2c95
movq %rax, %r15
movq %rbx, %rdi
callq 0x2110
movq %r15, %rdi
callq 0x22b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/obliviousram[P]oblivious-avl-tree/src/CorrectnessTester.cpp
// Function: CorrectnessTester::runTester1()
void CorrectnessTester::runTester1() {
    int bucketSize = 4;
    int numBlocks = pow(2, 10);
    Bucket::setMaxSize(bucketSize);    

    UntrustedStorageInterface* storage = new ServerStorage();
    RandForOramInterface* random = new RandomForOram();
    OAVLTreeInterface* oavl = new OAVLTreePathEviction(storage, random, bucketSize, numBlocks);

    cout << "Test begins..." << endl;

    cout << "insert " << 9<< endl;
    oavl->insert(9,9);
    storage->dumpAllValidBlocks();
    
    for (int i = 7; i >= 1; i-=2){
        cout << "insert " << i<< endl;
        oavl->insert(i,i);
        storage->dumpAllValidBlocks();
        cout << "insert " << i+1<< endl;
        oavl->insert(i+1,i+1);
        storage->dumpAllValidBlocks();
    }
    int res = oavl->search(9);
    cout << res << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
pushq $0x4
popq %rdi
callq 0x2c28
pushq $0x28
popq %rdi
callq 0x2190
movq %rax, %rbx
movq %rax, %rdi
callq 0x6d98
movl $0x13d0, %edi           # imm = 0x13D0
callq 0x2190
movq %rax, %r12
movq %rax, %rdi
callq 0x6520
pushq $0x70
popq %rdi
callq 0x2190
movq %rax, %r14
pushq $0x4
popq %rcx
movq %rax, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movl $0x400, %r8d            # imm = 0x400
callq 0x50f4
movq 0x9cd0(%rip), %r15      # 0xcfd8
leaq 0x4eda(%rip), %rsi      # 0x81e9
movq %r15, %rdi
callq 0x2170
movq %rax, %rdi
callq 0x20c0
leaq 0x4ed5(%rip), %r12      # 0x81fb
movq %r15, %rdi
movq %r12, %rsi
callq 0x2170
pushq $0x9
popq %rbp
movq %rax, %rdi
movl %ebp, %esi
callq 0x22a0
movq %rax, %rdi
callq 0x20c0
movq (%r14), %rax
movq %r14, %rdi
movl %ebp, %esi
movl %ebp, %edx
callq *(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
pushq $0x7
popq %r13
testl %r13d, %r13d
jle 0x33d5
movq %r15, %rdi
movq %r12, %rsi
callq 0x2170
movq %rax, %rdi
movl %r13d, %esi
callq 0x22a0
movq %rax, %rdi
callq 0x20c0
movq (%r14), %rax
movq %r14, %rdi
movl %r13d, %esi
movl %r13d, %edx
callq *(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
movq %r15, %rdi
movq %r12, %rsi
callq 0x2170
leal 0x1(%r13), %ebp
movq %rax, %rdi
movl %ebp, %esi
callq 0x22a0
movq %rax, %rdi
callq 0x20c0
movq (%r14), %rax
movq %r14, %rdi
movl %ebp, %esi
movl %ebp, %edx
callq *(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
addl $-0x2, %r13d
jmp 0x335f
movq (%r14), %rax
pushq $0x9
popq %rsi
movq %r14, %rdi
callq *0x8(%rax)
movq 0x9bf0(%rip), %rdi      # 0xcfd8
movl %eax, %esi
callq 0x22a0
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20c0
movq %rax, %r15
pushq $0x70
popq %rsi
movq %r14, %rdi
jmp 0x3426
movq %rax, %r15
movl $0x13d0, %esi           # imm = 0x13D0
movq %r12, %rdi
jmp 0x3426
movq %rax, %r15
pushq $0x28
popq %rsi
movq %rbx, %rdi
callq 0x21a0
movq %r15, %rdi
callq 0x22b0
nop