LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/btbujiangjun[P]abcdl/src/algebra/MatrixHelper.cpp
// Function: abcdl::algebra::MatrixHelper<int>::exp(abcdl::algebra::Matrix<int>&, abcdl::algebra::Matrix<int> const&)
void MatrixHelper<T>::exp(Matrix<T>& mat, const Matrix<T>& mat_a){
    auto lambda = [](T* a, const T& b){ *a = std::exp(std::min(b, (T)EXP_MAX));};
    if(mat.get_size() != mat_a.get_size()){
        mat.reset(0, mat_a.rows(), mat_a.cols());
    }
    _po.parallel_mul2one_copy(mat.data(), mat_a.data(), mat_a.get_size(), lambda);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rsi), %rsi
imulq (%r15), %rsi
movq (%rdx), %rdx
movq 0x8(%r14), %rax
movq %rax, %rcx
imulq %rdx, %rcx
cmpq %rcx, %rsi
je 0x2ec89
movq %rsp, %rsi
movl $0x0, (%rsi)
movq %r15, %rdi
movq %rax, %rcx
callq 0x193cc
movq 0x8(%r14), %rcx
imulq (%r14), %rcx
movq 0x10(%r15), %rsi
movq 0x10(%r14), %rdx
xorps %xmm0, %xmm0
movq %rsp, %r8
movaps %xmm0, (%r8)
leaq 0x7454(%rip), %rax      # 0x360f6
movq %rax, 0x18(%r8)
leaq 0x746b(%rip), %rax      # 0x36118
movq %rax, 0x10(%r8)
movq %rbx, %rdi
callq 0xa72a
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x2ecd0
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x2ecfe
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x2ecf6
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x95d0
movq %rax, %rdi
callq 0x10f91
// File: /workspace/github_cpp_makefile_star2_O3/btbujiangjun[P]abcdl/src/algebra/MatrixHelper.cpp
// Function: abcdl::algebra::MatrixHelper<int>::sqrt(abcdl::algebra::Matrix<int>&, abcdl::algebra::Matrix<int> const&)
void MatrixHelper<T>::sqrt(Matrix<T>& mat, const Matrix<T>& mat_a){
    auto lambda = [](T* a, const T& b){ *a = std::sqrt(b);};
    if(mat.get_size() != mat_a.get_size()){
        mat.reset(0, mat_a.rows(), mat_a.cols());
    }
    _po.parallel_mul2one_copy(mat.data(), mat_a.data(), mat_a.get_size(), lambda);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rsi), %rsi
imulq (%r15), %rsi
movq (%rdx), %rdx
movq 0x8(%r14), %rax
movq %rax, %rcx
imulq %rdx, %rcx
cmpq %rcx, %rsi
je 0x2ed4f
movq %rsp, %rsi
movl $0x0, (%rsi)
movq %r15, %rdi
movq %rax, %rcx
callq 0x193cc
movq 0x8(%r14), %rcx
imulq (%r14), %rcx
movq 0x10(%r15), %rsi
movq 0x10(%r14), %rdx
xorps %xmm0, %xmm0
movq %rsp, %r8
movaps %xmm0, (%r8)
leaq 0x73c8(%rip), %rax      # 0x36130
movq %rax, 0x18(%r8)
leaq 0x73e3(%rip), %rax      # 0x36156
movq %rax, 0x10(%r8)
movq %rbx, %rdi
callq 0xa72a
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x2ed96
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x2edc4
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x2edbc
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x95d0
movq %rax, %rdi
callq 0x10f91
// File: /workspace/github_cpp_makefile_star2_O3/btbujiangjun[P]abcdl/src/algebra/MatrixHelper.cpp
// Function: abcdl::algebra::MatrixHelper<int>::sin(abcdl::algebra::Matrix<int>&, abcdl::algebra::Matrix<int> const&)
void MatrixHelper<T>::sin(Matrix<T>& mat, const Matrix<T>& mat_a){
    auto lambda = [](T* a, const T& b){ *a = std::sin(b);};
    if(mat.get_size() != mat_a.get_size()){
        mat.reset(0, mat_a.rows(), mat_a.cols());
    }
    _po.parallel_mul2one_copy(mat.data(), mat_a.data(), mat_a.get_size(), lambda);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rsi), %rsi
imulq (%r15), %rsi
movq (%rdx), %rdx
movq 0x8(%r14), %rax
movq %rax, %rcx
imulq %rdx, %rcx
cmpq %rcx, %rsi
je 0x2ee15
movq %rsp, %rsi
movl $0x0, (%rsi)
movq %r15, %rdi
movq %rax, %rcx
callq 0x193cc
movq 0x8(%r14), %rcx
imulq (%r14), %rcx
movq 0x10(%r15), %rsi
movq 0x10(%r14), %rdx
xorps %xmm0, %xmm0
movq %rsp, %r8
movaps %xmm0, (%r8)
leaq 0x7340(%rip), %rax      # 0x3616e
movq %rax, 0x18(%r8)
leaq 0x734b(%rip), %rax      # 0x36184
movq %rax, 0x10(%r8)
movq %rbx, %rdi
callq 0xa72a
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x2ee5c
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x2ee8a
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x2ee82
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x95d0
movq %rax, %rdi
callq 0x10f91
// File: /workspace/github_cpp_makefile_star2_O3/btbujiangjun[P]abcdl/src/algebra/MatrixHelper.cpp
// Function: abcdl::algebra::MatrixHelper<int>::cos(abcdl::algebra::Matrix<int>&, abcdl::algebra::Matrix<int> const&)
void MatrixHelper<T>::cos(Matrix<T>& mat, const Matrix<T>& mat_a){
    auto lambda = [](T* a, const T& b){ *a = std::cos(b);};
    if(mat.get_size() != mat_a.get_size()){
        mat.reset(0, mat_a.rows(), mat_a.cols());
    }
    _po.parallel_mul2one_copy(mat.data(), mat_a.data(), mat_a.get_size(), lambda);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rsi), %rsi
imulq (%r15), %rsi
movq (%rdx), %rdx
movq 0x8(%r14), %rax
movq %rax, %rcx
imulq %rdx, %rcx
cmpq %rcx, %rsi
je 0x2eedb
movq %rsp, %rsi
movl $0x0, (%rsi)
movq %r15, %rdi
movq %rax, %rcx
callq 0x193cc
movq 0x8(%r14), %rcx
imulq (%r14), %rcx
movq 0x10(%r15), %rsi
movq 0x10(%r14), %rdx
xorps %xmm0, %xmm0
movq %rsp, %r8
movaps %xmm0, (%r8)
leaq 0x72a8(%rip), %rax      # 0x3619c
movq %rax, 0x18(%r8)
leaq 0x72b3(%rip), %rax      # 0x361b2
movq %rax, 0x10(%r8)
movq %rbx, %rdi
callq 0xa72a
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x2ef22
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x2ef50
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x2ef48
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x95d0
movq %rax, %rdi
callq 0x10f91
// File: /workspace/github_cpp_makefile_star2_O3/btbujiangjun[P]abcdl/src/algebra/MatrixHelper.cpp
// Function: abcdl::algebra::MatrixHelper<int>::sigmoid(abcdl::algebra::Matrix<int>&, abcdl::algebra::Matrix<int> const&)
void MatrixHelper<T>::sigmoid(Matrix<T>& mat, const Matrix<T>& mat_a){
    auto lambda = [](T* a, const T& b){ *a = 1 / (1 + std::exp(-(std::min((T)SIGMOID_MAX, std::max(b, (T)SIGMOID_MIN)))));};
    if(mat.get_size() != mat_a.get_size()){
        mat.reset(0, mat_a.rows(), mat_a.cols());
    }
    _po.parallel_mul2one_copy(mat.data(), mat_a.data(), mat_a.get_size(), lambda);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rsi), %rsi
imulq (%r15), %rsi
movq (%rdx), %rdx
movq 0x8(%r14), %rax
movq %rax, %rcx
imulq %rdx, %rcx
cmpq %rcx, %rsi
je 0x2efa1
movq %rsp, %rsi
movl $0x0, (%rsi)
movq %r15, %rdi
movq %rax, %rcx
callq 0x193cc
movq 0x8(%r14), %rcx
imulq (%r14), %rcx
movq 0x10(%r15), %rsi
movq 0x10(%r14), %rdx
xorps %xmm0, %xmm0
movq %rsp, %r8
movaps %xmm0, (%r8)
leaq 0x7210(%rip), %rax      # 0x361ca
movq %rax, 0x18(%r8)
leaq 0x7245(%rip), %rax      # 0x3620a
movq %rax, 0x10(%r8)
movq %rbx, %rdi
callq 0xa72a
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x2efe8
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x2f016
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x2f00e
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x95d0
movq %rax, %rdi
callq 0x10f91
// File: /workspace/github_cpp_makefile_star2_O3/btbujiangjun[P]abcdl/src/algebra/MatrixHelper.cpp
// Function: abcdl::algebra::MatrixHelper<int>::sigmoid_derivative(abcdl::algebra::Matrix<int>&, abcdl::algebra::Matrix<int> const&)
void MatrixHelper<T>::sigmoid_derivative(Matrix<T>& mat, const Matrix<T>& mat_a){
    auto lambda = [](T* a, const T& b){ *a = b * (1 - b);};
    if(mat.get_size() != mat_a.get_size()){
        mat.reset(0, mat_a.rows(), mat_a.cols());
    }
    _po.parallel_mul2one_copy(mat.data(), mat_a.data(), mat_a.get_size(), lambda);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rsi), %rsi
imulq (%r15), %rsi
movq (%rdx), %rdx
movq 0x8(%r14), %rax
movq %rax, %rcx
imulq %rdx, %rcx
cmpq %rcx, %rsi
je 0x2f067
movq %rsp, %rsi
movl $0x0, (%rsi)
movq %r15, %rdi
movq %rax, %rcx
callq 0x193cc
movq 0x8(%r14), %rcx
imulq (%r14), %rcx
movq 0x10(%r15), %rsi
movq 0x10(%r14), %rdx
xorps %xmm0, %xmm0
movq %rsp, %r8
movaps %xmm0, (%r8)
leaq 0x71a2(%rip), %rax      # 0x36222
movq %rax, 0x18(%r8)
leaq 0x71a9(%rip), %rax      # 0x36234
movq %rax, 0x10(%r8)
movq %rbx, %rdi
callq 0xa72a
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x2f0ae
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x2f0dc
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x2f0d4
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x95d0
movq %rax, %rdi
callq 0x10f91
// File: /workspace/github_cpp_makefile_star2_O3/btbujiangjun[P]abcdl/src/algebra/MatrixHelper.cpp
// Function: abcdl::algebra::MatrixHelper<int>::softmax(abcdl::algebra::Matrix<int>&, abcdl::algebra::Matrix<int> const&)
void MatrixHelper<T>::softmax(Matrix<T>& mat, const Matrix<T>& mat_a){
    T max = mat_a.max();
    if(&mat != &mat_a){
        mat.set_data(mat_a.data(), mat_a.rows(), mat_a.cols());
    }

    auto lambda = [](T* a, const T& max){*a = std::exp(std::max((*a - max), (T)SOFTMAX_MIN));};
    _po.parallel_mul2one(mat.data(), mat.get_size(), max, lambda);
    mat /=  mat.sum();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movq %rdx, %rdi
callq 0x29738
movl %eax, 0xc(%rsp)
cmpq %r12, %rbx
je 0x2f178
movq 0x10(%r12), %r15
movq (%r12), %r13
movq 0x8(%r12), %rbp
movq 0x8(%rbx), %rax
imulq (%rbx), %rax
movq 0x10(%rbx), %rdi
movq %rbp, %r12
imulq %r13, %r12
cmpq %r12, %rax
je 0x2f162
testq %rdi, %rdi
je 0x2f13c
callq 0x9420
movq %r12, %rax
shrq $0x3e, %rax
leaq (,%r12,4), %rcx
xorl %edi, %edi
negq %rax
sbbq %rdi, %rdi
orq %rcx, %rdi
callq 0x9030
movq %rax, %rdi
movq %rax, 0x10(%rbx)
movq %r13, (%rbx)
movq %rbp, 0x8(%rbx)
shlq $0x2, %r12
movq %r15, %rsi
movq %r12, %rdx
callq 0x92b0
movq 0x8(%rbx), %rdx
imulq (%rbx), %rdx
movq 0x10(%rbx), %rsi
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r8
movaps %xmm0, (%r8)
leaq 0x70b5(%rip), %rax      # 0x3624c
movq %rax, 0x18(%r8)
leaq 0x70ce(%rip), %rax      # 0x36270
movq %rax, 0x10(%r8)
leaq 0xc(%rsp), %rcx
movq %r14, %rdi
callq 0xa56a
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x2f1cc
leaq 0x10(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x29dc2
leaq 0x10(%rsp), %rsi
movl %eax, (%rsi)
movq %rbx, %rdi
callq 0x20994
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2f218
movq %rax, %rbx
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x2f210
leaq 0x10(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x95d0
movq %rax, %rdi
callq 0x10f91
// File: /workspace/github_cpp_makefile_star2_O3/btbujiangjun[P]abcdl/src/algebra/MatrixHelper.cpp
// Function: abcdl::algebra::MatrixHelper<int>::tanh(abcdl::algebra::Matrix<int>&, abcdl::algebra::Matrix<int> const&)
void MatrixHelper<T>::tanh(Matrix<T>& mat, const Matrix<T>& mat_a){
    auto lambda = [](T* a, const T& b){ *a = 2.0 /(1.0 + std::exp(std::min((T)EXP_MAX, -2 * b))) - 1.0;};
    if(mat.get_size() != mat_a.get_size()){
        mat.reset(0, mat_a.rows(), mat_a.cols());
    }
    _po.parallel_mul2one_copy(mat.data(), mat_a.data(), mat_a.get_size(), lambda);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rsi), %rsi
imulq (%r15), %rsi
movq (%rdx), %rdx
movq 0x8(%r14), %rax
movq %rax, %rcx
imulq %rdx, %rcx
cmpq %rcx, %rsi
je 0x2f269
movq %rsp, %rsi
movl $0x0, (%rsi)
movq %r15, %rdi
movq %rax, %rcx
callq 0x193cc
movq 0x8(%r14), %rcx
imulq (%r14), %rcx
movq 0x10(%r15), %rsi
movq 0x10(%r14), %rdx
xorps %xmm0, %xmm0
movq %rsp, %r8
movaps %xmm0, (%r8)
leaq 0x7006(%rip), %rax      # 0x36288
movq %rax, 0x18(%r8)
leaq 0x703d(%rip), %rax      # 0x362ca
movq %rax, 0x10(%r8)
movq %rbx, %rdi
callq 0xa72a
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x2f2b0
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x2f2de
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x2f2d6
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x95d0
movq %rax, %rdi
callq 0x10f91
// File: /workspace/github_cpp_makefile_star2_O3/btbujiangjun[P]abcdl/src/algebra/MatrixHelper.cpp
// Function: abcdl::algebra::MatrixHelper<int>::tanh_derivative(abcdl::algebra::Matrix<int>&, abcdl::algebra::Matrix<int> const&)
void MatrixHelper<T>::tanh_derivative(Matrix<T>& mat, const Matrix<T>& mat_a){
    auto lambda = [](T* a, const T& b){ T tanh = std::exp(std::min((T)EXP_MAX, -2 * b)); *a = 1 - tanh * tanh;};
    if(mat.get_size() != mat_a.get_size()){
        mat.reset(0, mat_a.rows(), mat_a.cols());
    }
    _po.parallel_mul2one_copy(mat.data(), mat_a.data(), mat_a.get_size(), lambda);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rsi), %rsi
imulq (%r15), %rsi
movq (%rdx), %rdx
movq 0x8(%r14), %rax
movq %rax, %rcx
imulq %rdx, %rcx
cmpq %rcx, %rsi
je 0x2f32f
movq %rsp, %rsi
movl $0x0, (%rsi)
movq %r15, %rdi
movq %rax, %rcx
callq 0x193cc
movq 0x8(%r14), %rcx
imulq (%r14), %rcx
movq 0x10(%r15), %rsi
movq 0x10(%r14), %rdx
xorps %xmm0, %xmm0
movq %rsp, %r8
movaps %xmm0, (%r8)
leaq 0x6f9a(%rip), %rax      # 0x362e2
movq %rax, 0x18(%r8)
leaq 0x6fbf(%rip), %rax      # 0x36312
movq %rax, 0x10(%r8)
movq %rbx, %rdi
callq 0xa72a
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x2f376
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x2f3a4
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x2f39c
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x95d0
movq %rax, %rdi
callq 0x10f91
// File: /workspace/github_cpp_makefile_star2_O3/btbujiangjun[P]abcdl/src/algebra/MatrixHelper.cpp
// Function: abcdl::algebra::MatrixHelper<int>::relu(abcdl::algebra::Matrix<int>&, abcdl::algebra::Matrix<int> const&)
void MatrixHelper<T>::relu(Matrix<T>& mat, const Matrix<T>& mat_a){
    auto lambda = [](T* a, const T& b){ if(b < 0) {*a = 0;} };
    if(&mat != &mat_a){
        mat.set_data(mat_a.data(), mat_a.rows(), mat_a.cols());
    }
    _po.parallel_mul2one_copy(mat.data(), mat_a.data(), mat_a.get_size(), lambda);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
cmpq %rdx, %rsi
je 0x2f438
movq 0x10(%r14), %rsi
movq (%r14), %rbp
movq 0x8(%r14), %r12
movq 0x8(%r15), %rax
imulq (%r15), %rax
movq 0x10(%r15), %rdi
movq %r12, %r13
imulq %rbp, %r13
cmpq %r13, %rax
je 0x2f425
movq %rsi, 0x8(%rsp)
testq %rdi, %rdi
je 0x2f3fa
callq 0x9420
movq %r13, %rax
shrq $0x3e, %rax
leaq (,%r13,4), %rcx
xorl %edi, %edi
negq %rax
sbbq %rdi, %rdi
orq %rcx, %rdi
callq 0x9030
movq %rax, %rdi
movq %rax, 0x10(%r15)
movq 0x8(%rsp), %rsi
movq %rbp, (%r15)
movq %r12, 0x8(%r15)
shlq $0x2, %r13
movq %r13, %rdx
callq 0x92b0
movq 0x10(%r15), %rsi
movq 0x8(%r14), %rcx
imulq (%r14), %rcx
movq 0x10(%r14), %rdx
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r8
movaps %xmm0, (%r8)
leaq 0x6ecf(%rip), %rax      # 0x3632a
movq %rax, 0x18(%r8)
leaq 0x6ed4(%rip), %rax      # 0x3633a
movq %rax, 0x10(%r8)
movq %rbx, %rdi
callq 0xa72a
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x2f48b
leaq 0x10(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2f4c0
movq %rax, %rbx
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x2f4b8
leaq 0x10(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x95d0
movq %rax, %rdi
callq 0x10f91
// File: /workspace/github_cpp_makefile_star2_O3/btbujiangjun[P]abcdl/src/algebra/MatrixHelper.cpp
// Function: abcdl::algebra::MatrixHelper<int>::relu_derivative(abcdl::algebra::Matrix<int>&, abcdl::algebra::Matrix<int> const&)
void MatrixHelper<T>::relu_derivative(Matrix<T>& mat, const Matrix<T>& mat_a){
    auto lambda = [](T* a, const T& b){ if(b > 0) {*a = 1;} };
    if(&mat != &mat_a){
        mat.reset(0, mat_a.rows(), mat_a.cols());
    }
    _po.parallel_mul2one_copy(mat.data(), mat_a.data(), mat_a.get_size(), lambda);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
cmpq %rdx, %rsi
je 0x2f4f7
movq %rsp, %rsi
movl $0x0, (%rsi)
movq (%r14), %rdx
movq 0x8(%r14), %rcx
movq %r15, %rdi
callq 0x193cc
movq 0x10(%r15), %rsi
movq 0x8(%r14), %rcx
imulq (%r14), %rcx
movq 0x10(%r14), %rdx
xorps %xmm0, %xmm0
movq %rsp, %r8
movaps %xmm0, (%r8)
leaq 0x6e3a(%rip), %rax      # 0x36352
movq %rax, 0x18(%r8)
leaq 0x6e3f(%rip), %rax      # 0x36362
movq %rax, 0x10(%r8)
movq %rbx, %rdi
callq 0xa72a
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x2f546
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x2f574
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x2f56c
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x95d0
movq %rax, %rdi
callq 0x10f91
// File: /workspace/github_cpp_makefile_star2_O3/btbujiangjun[P]abcdl/src/algebra/MatrixHelper.cpp
// Function: abcdl::algebra::MatrixHelper<int>::leaky_relu(abcdl::algebra::Matrix<int>&, abcdl::algebra::Matrix<int> const&)
void MatrixHelper<T>::leaky_relu(Matrix<T>& mat, const Matrix<T>& mat_a){
    auto lambda = [](T* a, const T& b){ if(b < 0) {*a = (T)(0.01 * b);} };
    if(&mat != &mat_a){
        mat.set_data(mat_a.data(), mat_a.rows(), mat_a.cols());
    }
    _po.parallel_mul2one_copy(mat.data(), mat_a.data(), mat_a.get_size(), lambda);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
cmpq %rdx, %rsi
je 0x2f608
movq 0x10(%r14), %rsi
movq (%r14), %rbp
movq 0x8(%r14), %r12
movq 0x8(%r15), %rax
imulq (%r15), %rax
movq 0x10(%r15), %rdi
movq %r12, %r13
imulq %rbp, %r13
cmpq %r13, %rax
je 0x2f5f5
movq %rsi, 0x8(%rsp)
testq %rdi, %rdi
je 0x2f5ca
callq 0x9420
movq %r13, %rax
shrq $0x3e, %rax
leaq (,%r13,4), %rcx
xorl %edi, %edi
negq %rax
sbbq %rdi, %rdi
orq %rcx, %rdi
callq 0x9030
movq %rax, %rdi
movq %rax, 0x10(%r15)
movq 0x8(%rsp), %rsi
movq %rbp, (%r15)
movq %r12, 0x8(%r15)
shlq $0x2, %r13
movq %r13, %rdx
callq 0x92b0
movq 0x10(%r15), %rsi
movq 0x8(%r14), %rcx
imulq (%r14), %rcx
movq 0x10(%r14), %rdx
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r8
movaps %xmm0, (%r8)
leaq 0x6d4f(%rip), %rax      # 0x3637a
movq %rax, 0x18(%r8)
leaq 0x6d62(%rip), %rax      # 0x36398
movq %rax, 0x10(%r8)
movq %rbx, %rdi
callq 0xa72a
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x2f65b
leaq 0x10(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2f690
movq %rax, %rbx
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x2f688
leaq 0x10(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x95d0
movq %rax, %rdi
callq 0x10f91
// File: /workspace/github_cpp_makefile_star2_O3/btbujiangjun[P]abcdl/src/algebra/MatrixHelper.cpp
// Function: abcdl::algebra::MatrixHelper<int>::leaky_relu_derivative(abcdl::algebra::Matrix<int>&, abcdl::algebra::Matrix<int> const&)
void MatrixHelper<T>::leaky_relu_derivative(Matrix<T>& mat, const Matrix<T>& mat_a){
    auto lambda = [](T* a, const T& b){ if(b >= 0){*a = (T)1;} else{*a = (T)0.01;} };
    if(&mat != &mat_a){
        mat.reset(0, mat_a.rows(), mat_a.cols());
    }
    _po.parallel_mul2one_copy(mat.data(), mat_a.data(), mat_a.get_size(), lambda);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
cmpq %rdx, %rsi
je 0x2f6c7
movq %rsp, %rsi
movl $0x0, (%rsi)
movq (%r14), %rdx
movq 0x8(%r14), %rcx
movq %r15, %rdi
callq 0x193cc
movq 0x10(%r15), %rsi
movq 0x8(%r14), %rcx
imulq (%r14), %rcx
movq 0x10(%r14), %rdx
xorps %xmm0, %xmm0
movq %rsp, %r8
movaps %xmm0, (%r8)
leaq 0x6cc8(%rip), %rax      # 0x363b0
movq %rax, 0x18(%r8)
leaq 0x6ccb(%rip), %rax      # 0x363be
movq %rax, 0x10(%r8)
movq %rbx, %rdi
callq 0xa72a
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x2f716
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x2f744
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x2f73c
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x95d0
movq %rax, %rdi
callq 0x10f91
// File: /workspace/github_cpp_makefile_star2_O3/btbujiangjun[P]abcdl/src/algebra/MatrixHelper.cpp
// Function: abcdl::algebra::MatrixHelper<int>::elu(abcdl::algebra::Matrix<int>&, abcdl::algebra::Matrix<int> const&)
void MatrixHelper<T>::elu(Matrix<T>& mat, const Matrix<T>& mat_a){
    auto lambda = [](T* a, const T& b){ if(b >= 0) {*a = b;} else{*a = std::exp(std::min((T)EXP_MAX, b)) - 1;} };
    if(&mat != &mat_a){
        mat.reset(0, mat_a.rows(), mat_a.cols());
    }
    _po.parallel_mul2one_copy(mat.data(), mat_a.data(), mat_a.get_size(), lambda);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
cmpq %rdx, %rsi
je 0x2f77b
movq %rsp, %rsi
movl $0x0, (%rsi)
movq (%r14), %rdx
movq 0x8(%r14), %rcx
movq %r15, %rdi
callq 0x193cc
movq 0x10(%r15), %rsi
movq 0x8(%r14), %rcx
imulq (%r14), %rcx
movq 0x10(%r14), %rdx
xorps %xmm0, %xmm0
movq %rsp, %r8
movaps %xmm0, (%r8)
leaq 0x6c3a(%rip), %rax      # 0x363d6
movq %rax, 0x18(%r8)
leaq 0x6c53(%rip), %rax      # 0x363fa
movq %rax, 0x10(%r8)
movq %rbx, %rdi
callq 0xa72a
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x2f7ca
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x2f7f8
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x2f7f0
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x95d0
movq %rax, %rdi
callq 0x10f91
// File: /workspace/github_cpp_makefile_star2_O3/btbujiangjun[P]abcdl/src/algebra/MatrixHelper.cpp
// Function: abcdl::algebra::MatrixHelper<int>::elu_derivative(abcdl::algebra::Matrix<int>&, abcdl::algebra::Matrix<int> const&)
void MatrixHelper<T>::elu_derivative(Matrix<T>& mat, const Matrix<T>& mat_a){
    auto lambda = [](T* a, const T& b){ if(b >= 0) {*a = 1;} else{*a = std::exp(std::min((T)EXP_MAX, b));} };
    if(&mat != &mat_a){
        mat.reset(0, mat_a.rows(), mat_a.cols());
    }
    _po.parallel_mul2one_copy(mat.data(), mat_a.data(), mat_a.get_size(), lambda);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
cmpq %rdx, %rsi
je 0x2f82f
movq %rsp, %rsi
movl $0x0, (%rsi)
movq (%r14), %rdx
movq 0x8(%r14), %rcx
movq %r15, %rdi
callq 0x193cc
movq 0x10(%r15), %rsi
movq 0x8(%r14), %rcx
imulq (%r14), %rcx
movq 0x10(%r14), %rdx
xorps %xmm0, %xmm0
movq %rsp, %r8
movaps %xmm0, (%r8)
leaq 0x6bc2(%rip), %rax      # 0x36412
movq %rax, 0x18(%r8)
leaq 0x6bd7(%rip), %rax      # 0x36432
movq %rax, 0x10(%r8)
movq %rbx, %rdi
callq 0xa72a
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x2f87e
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x2f8ac
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x2f8a4
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x95d0
movq %rax, %rdi
callq 0x10f91
// File: /workspace/github_cpp_makefile_star2_O3/btbujiangjun[P]abcdl/src/utils/Log.cpp
// Function: abcdl::utils::log::LogMessage::generate_log_message()
void LogMessage::generate_log_message(){
    time_t timep;
    time(&timep);
    char time_data[64];
    strftime(time_data, sizeof(time_data), "%Y-%m-%d %H:%M:%S", localtime(&timep));
    if(!g_log_inited){
        fprintf(stderr, "[%s] [%s] [%s:%d] %s\n", g_log_level_name[_severity].c_str(), time_data,  _name, _line, str().c_str());
    }else{
        for(auto& fd : g_log_fds[this->_severity]){
            dprintf(fd, "[%s] [%s] [%s:%d] %s\n", g_log_level_name[_severity].c_str(), time_data, _name, _line, str().c_str());
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
leaq 0x38(%rsp), %r14
movq %r14, %rdi
callq 0x9330
movq %r14, %rdi
callq 0x9260
leaq 0x71a6(%rip), %rdx      # 0x3fa86
leaq 0x40(%rsp), %rdi
movl $0x40, %esi
movq %rax, %rcx
callq 0x92a0
cmpb $0x0, 0x1fb07(%rip)     # 0x58400
je 0x389af
movslq 0x7c(%rbx), %rax
movq 0x1fac6(%rip), %rcx     # 0x583d0
leaq (%rax,%rax,2), %rax
movq (%rcx,%rax,8), %r14
movq 0x8(%rcx,%rax,8), %rax
movq %rax, 0x10(%rsp)
cmpq %rax, %r14
je 0x3899d
leaq 0x8(%rbx), %rax
movq %rax, 0x8(%rsp)
movl (%r14), %ebp
movslq 0x7c(%rbx), %rax
movq 0x1fa78(%rip), %rcx     # 0x583b0
shlq $0x5, %rax
movq (%rcx,%rax), %r15
movq 0x70(%rbx), %r12
movl 0x78(%rbx), %r13d
leaq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x9530
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
movl %ebp, %edi
leaq 0x712f(%rip), %rsi      # 0x3fa98
movq %r15, %rdx
leaq 0x40(%rsp), %rcx
movq %r12, %r8
movl %r13d, %r9d
xorl %eax, %eax
callq 0x91e0
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x38992
callq 0x9350
addq $0x4, %r14
cmpq 0x10(%rsp), %r14
jne 0x3892a
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
callq 0x97bd
jmp 0x3899d
movq %rax, %rbx
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x389d5
callq 0x9350
movq %rbx, %rdi
callq 0x95d0
nop
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/khashl/test.c
// Function: test_int
KHASHL_MAP_INIT(, intmap_t, intmap, uint32_t, int, hash_fn, kh_eq_generic)

uint32_t test_int(uint32_t n, uint32_t x0)
{
	uint32_t i, x, z = 0;
	intmap_t *h;
	h = intmap_init();
	for (i = 0, x = x0; i < n; ++i) {
		khint_t k;
		int absent;
		x = hash32(x);
		k = intmap_put(h, get_key(n, x), &absent);
#ifndef UDB2_TEST_DEL
		if (absent) kh_val(h, k) = 0;
		z += ++kh_val(h, k);
#else
		if (absent) ++z;
		else intmap_del(h, k);
#endif
	}
	fprintf(stderr, "# unique keys: %d; checksum: %u; capacity: %u\n", kh_size(h), z, kh_capacity(h));
	x = kh_size(h);
	intmap_destroy(h);
	return x;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r15d
movl %edi, %r14d
pushq $0x1
popq %rdi
pushq $0x18
popq %rsi
callq 0x1050
movq %rax, %rbx
xorl %ebp, %ebp
movl $0x0, %edx
movl $0x0, %r8d
testl %r14d, %r14d
je 0x14a2
movl %r14d, %r13d
shrl $0x2, %r13d
xorl %ebp, %ebp
leaq 0x4(%rsp), %r12
movl %r15d, %eax
shll $0xf, %eax
notl %eax
addl %r15d, %eax
movl %eax, %ecx
shrl $0xa, %ecx
xorl %eax, %ecx
leal (%rcx,%rcx,8), %eax
movl %eax, %ecx
shrl $0x6, %ecx
xorl %eax, %ecx
movl %ecx, %eax
shll $0xb, %eax
notl %eax
addl %ecx, %eax
movl %eax, %r15d
shrl $0x10, %r15d
xorl %eax, %r15d
movl %r15d, %eax
xorl %edx, %edx
divl %r13d
movl %edx, %eax
shll $0xf, %eax
notl %eax
addl %edx, %eax
movl %eax, %ecx
shrl $0xa, %ecx
xorl %eax, %ecx
leal (%rcx,%rcx,8), %eax
movl %eax, %ecx
shrl $0x6, %ecx
xorl %eax, %ecx
movl %ecx, %eax
shll $0xb, %eax
notl %eax
addl %ecx, %eax
movl %eax, %esi
shrl $0x10, %esi
xorl %eax, %esi
movq %rbx, %rdi
movq %r12, %rdx
callq 0x175f
cmpl $0x0, 0x4(%rsp)
movq 0x10(%rbx), %rcx
movl %eax, %eax
je 0x1481
andl $0x0, 0x4(%rcx,%rax,8)
pushq $0x1
popq %rdx
jmp 0x1487
movl 0x4(%rcx,%rax,8), %edx
incl %edx
movl %edx, 0x4(%rcx,%rax,8)
addl %edx, %ebp
decl %r14d
jne 0x13fe
movl 0x4(%rbx), %edx
movb (%rbx), %cl
pushq $0x1
popq %r8
shll %cl, %r8d
movq 0x2b4f(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xbc2(%rip), %rsi       # 0x2075
movl %ebp, %ecx
xorl %eax, %eax
callq 0x1060
movl 0x4(%rbx), %ebp
movq %rbx, %rdi
callq 0x1652
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_cpp_makefile_star2_O3/daniel5151[P]mips241/src/bus.cc
// Function: MIPS::BUS::load(unsigned int)
uint32_t MIPS::BUS::load(uint32_t addr) {
  // Check if we are using any memory mapped I/O
  if (addr == 0xFFFF0004) {
    if (inputBuffer.empty()) {
      std::string input;
      getline(std::cin, input);
      input += "\n";
      for (int i = 0; i < input.length(); i++)
        inputBuffer.push_back(input[i]);
    }
    char in = inputBuffer.front();
    inputBuffer.pop_front();
    return in;
  } else {
    return ram.load(addr);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %r14
cmpl $0xffff0004, %esi       # imm = 0xFFFF0004
jne 0x3709
leaq 0x8(%r14), %rbx
movq 0x18(%r14), %rax
cmpq %rax, 0x38(%r14)
jne 0x36ef
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
movq 0x9973(%rip), %rdi      # 0xcfd8
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x31e0
movsbl %al, %edx
movq 0x9958(%rip), %rdi      # 0xcfd8
movq %rsp, %rsi
callq 0x33c0
leaq 0x5975(%rip), %rsi      # 0x9004
movq %rsp, %rdi
callq 0x33d0
cmpq $0x0, 0x8(%rsp)
je 0x36d5
xorl %r12d, %r12d
movq (%rsp), %rsi
addq %r12, %rsi
movq 0x38(%r14), %rax
movq 0x48(%r14), %rcx
decq %rcx
cmpq %rcx, %rax
je 0x36c3
movb (%rsi), %cl
movb %cl, (%rax)
incq 0x38(%r14)
jmp 0x36cb
movq %rbx, %rdi
callq 0x3b72
incq %r12
cmpq %r12, 0x8(%rsp)
ja 0x36a2
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x36eb
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x18(%r14), %rax
movsbl (%rax), %ebp
movq %rbx, %rdi
callq 0x3820
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %rdi
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x837e
jmp 0x371f
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x3738
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3200
movq %rbx, %rdi
callq 0x33a0
// File: /workspace/github_cpp_makefile_star2_O3/daniel5151[P]mips241/src/bus.cc
// Function: MIPS::BUS::store(unsigned int, unsigned int)
void MIPS::BUS::store(uint32_t addr, uint32_t data) {
  // Check if we are using any memory mapped I/O
  if (addr == 0xFFFF000C) {
    outputBuffer = std::string(1, (char)data);
  } else {
    ram.store(addr, data);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
cmpl $0xffff000c, %esi       # imm = 0xFFFF000C
jne 0x379e
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movsbl %dl, %edx
movq %rsp, %r14
movl $0x1, %esi
movq %r14, %rdi
callq 0x3270
addq $0x58, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3280
movq (%r14), %rdi
cmpq %r15, %rdi
je 0x3794
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3200
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq (%rbx), %rdi
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x8186
nop
// File: /workspace/github_cpp_makefile_star2_O3/daniel5151[P]mips241/src/cpu.cc
// Function: MIPS::CPU::CPU(MIPS::BUS&)
MIPS::CPU::CPU(MIPS::BUS & bus) : MEM(bus)
{
  // Internal flags and tracking vars
  isExecuting = true;
  cycles = 0;
  stage = S_FETCH;

  // Setup registers
  PC = 0x00000000;
  hi = lo = 0;
  RA = RB = RZ = RM = RY = 0;
  for (int i = 0; i < 32; i++) R[i] = 0;

  R[31] = 0x8123456C; // Exit address
  R[30] = 0x01000000; // Start of Stack
}

// Assembly:
movq %rsi, 0x98(%rdi)
movb $0x1, (%rdi)
xorl %eax, %eax
movq %rax, 0x8c(%rdi)
movl $0x0, 0x94(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%rdi)
movups %xmm0, 0x14(%rdi)
movups %xmm0, 0x24(%rdi)
movups %xmm0, 0x34(%rdi)
movups %xmm0, 0x44(%rdi)
movups %xmm0, 0x54(%rdi)
movups %xmm0, 0x64(%rdi)
movups %xmm0, 0x70(%rdi)
movups %xmm0, 0xa0(%rdi)
movq %rax, 0xb0(%rdi)
movabsq $-0x7edcba93ff000000, %rax # imm = 0x8123456C01000000
movq %rax, 0x80(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/daniel5151[P]mips241/src/cpu.cc
// Function: MIPS::CPU::setiRegister(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned int)
void MIPS::CPU::setiRegister(std::string reg, uint32_t val) {
  #define IREG(name_str, var) if (reg == name_str) var = val;
    IREG("RA", RA);
    IREG("RB", RB);
    IREG("RZ", RZ);
    IREG("RM", RM);
    IREG("RY", RY);
    IREG("IR", IR);
    IREG("PC", PC);
    IREG("hi", hi);
    IREG("lo", lo);
  #undef IREG
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x52e2(%rip), %rsi      # 0x90e0
movq %r15, %rdi
callq 0x3090
testl %eax, %eax
jne 0x3e11
movl %ebx, 0xa4(%r14)
leaq 0x52cb(%rip), %rsi      # 0x90e3
movq %r15, %rdi
callq 0x3090
testl %eax, %eax
jne 0x3e2b
movl %ebx, 0xa8(%r14)
leaq 0x52b4(%rip), %rsi      # 0x90e6
movq %r15, %rdi
callq 0x3090
testl %eax, %eax
jne 0x3e45
movl %ebx, 0xac(%r14)
leaq 0x529d(%rip), %rsi      # 0x90e9
movq %r15, %rdi
callq 0x3090
testl %eax, %eax
jne 0x3e5f
movl %ebx, 0xb0(%r14)
leaq 0x5286(%rip), %rsi      # 0x90ec
movq %r15, %rdi
callq 0x3090
testl %eax, %eax
jne 0x3e79
movl %ebx, 0xb4(%r14)
leaq 0x526f(%rip), %rsi      # 0x90ef
movq %r15, %rdi
callq 0x3090
testl %eax, %eax
jne 0x3e93
movl %ebx, 0x88(%r14)
leaq 0x5258(%rip), %rsi      # 0x90f2
movq %r15, %rdi
callq 0x3090
testl %eax, %eax
jne 0x3ead
movl %ebx, 0x8c(%r14)
leaq 0x5241(%rip), %rsi      # 0x90f5
movq %r15, %rdi
callq 0x3090
testl %eax, %eax
jne 0x3ec7
movl %ebx, 0x90(%r14)
leaq 0x522a(%rip), %rsi      # 0x90f8
movq %r15, %rdi
callq 0x3090
testl %eax, %eax
jne 0x3ee1
movl %ebx, 0x94(%r14)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/daniel5151[P]mips241/src/cpu.cc
// Function: MIPS::CPU::getiRegister(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
uint32_t MIPS::CPU::getiRegister(std::string reg) {
  #define IREG(name_str, var) if (reg == name_str) return var;
    IREG("RA", RA);
    IREG("RB", RB);
    IREG("RZ", RZ);
    IREG("RM", RM);
    IREG("RY", RY);
    IREG("IR", IR);
    IREG("PC", PC);
    IREG("hi", hi);
    IREG("lo", lo);
  #undef IREG

  return 0xBADA5555;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x51cb(%rip), %rsi      # 0x90e0
movq %r14, %rdi
callq 0x3090
testl %eax, %eax
je 0x3fd8
leaq 0x51b7(%rip), %rsi      # 0x90e3
movq %r14, %rdi
callq 0x3090
testl %eax, %eax
je 0x3fe0
leaq 0x51a3(%rip), %rsi      # 0x90e6
movq %r14, %rdi
callq 0x3090
testl %eax, %eax
je 0x3fe8
leaq 0x518f(%rip), %rsi      # 0x90e9
movq %r14, %rdi
callq 0x3090
testl %eax, %eax
je 0x3ff0
leaq 0x517b(%rip), %rsi      # 0x90ec
movq %r14, %rdi
callq 0x3090
testl %eax, %eax
je 0x3ff8
leaq 0x516b(%rip), %rsi      # 0x90ef
movq %r14, %rdi
callq 0x3090
testl %eax, %eax
je 0x4000
leaq 0x515b(%rip), %rsi      # 0x90f2
movq %r14, %rdi
callq 0x3090
testl %eax, %eax
je 0x4008
leaq 0x514b(%rip), %rsi      # 0x90f5
movq %r14, %rdi
callq 0x3090
testl %eax, %eax
je 0x4010
leaq 0x513b(%rip), %rsi      # 0x90f8
movq %r14, %rdi
callq 0x3090
movl %eax, %ecx
movl $0xbada5555, %eax       # imm = 0xBADA5555
testl %ecx, %ecx
jne 0x4016
movl 0x94(%rbx), %eax
jmp 0x4016
movl 0xa4(%rbx), %eax
jmp 0x4016
movl 0xa8(%rbx), %eax
jmp 0x4016
movl 0xac(%rbx), %eax
jmp 0x4016
movl 0xb0(%rbx), %eax
jmp 0x4016
movl 0xb4(%rbx), %eax
jmp 0x4016
movl 0x88(%rbx), %eax
jmp 0x4016
movl 0x8c(%rbx), %eax
jmp 0x4016
movl 0x90(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/daniel5151[P]mips241/src/cpu.cc
// Function: MIPS::CPU::do_cycle()
void MIPS::CPU::do_cycle() {
  switch (stage) {
    case S_FETCH : fetch (); break;
    case S_DECODE: decode(); break;
    case S_EXEC  : exec  (); break;
    case S_MEMORY: memory(); break;
    case S_WBACK : wback (); break;
  }
  cycles++;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0xa0(%rdi), %eax
cmpq $0x4, %rax
ja 0x40ae
leaq 0x5015(%rip), %rcx      # 0x9060
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
callq 0x40b4
jmp 0x40ae
movq %rbx, %rdi
callq 0x43b6
jmp 0x40ae
movq %rbx, %rdi
callq 0x4124
jmp 0x40ae
movq %rbx, %rdi
callq 0x433e
jmp 0x40ae
movl 0x88(%rbx), %eax
movl %eax, %ecx
shrl $0x13, %ecx
andl $0x7c, %ecx
movl 0x8(%rbx,%rcx), %ecx
movl %ecx, 0xa4(%rbx)
shrl $0xe, %eax
andl $0x7c, %eax
movl 0x8(%rbx,%rax), %eax
movl %eax, 0xa8(%rbx)
movl $0x2, 0xa0(%rbx)
incl 0x4(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/daniel5151[P]mips241/src/cpu.cc
// Function: MIPS::CPU::memory()
void MIPS::CPU::memory() {
  switch (decodeOPcode(IR)) {
    case OP_LIS:
    case OP_LW:
      RY = MEM.load(RZ);
      break;
    case OP_SW:
      MEM.store(RZ, RM);
      break;
    default:
      RY = RZ;
      break;
  }

  stage = S_WBACK;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x88(%rdi), %ecx
cmpl $0x4000000, %ecx        # imm = 0x4000000
movl $0x3f, %edx
movl $0xfc000000, %eax       # imm = 0xFC000000
cmovbl %edx, %eax
andl %ecx, %eax
cmpl $0x14, %eax
je 0x4370
cmpl $0xac000000, %eax       # imm = 0xAC000000
je 0x4384
cmpl $0x8c000000, %eax       # imm = 0x8C000000
jne 0x439e
movq 0x98(%rbx), %rdi
movl 0xac(%rbx), %esi
callq 0x361c
jmp 0x43a4
movq 0x98(%rbx), %rdi
movl 0xac(%rbx), %esi
movl 0xb0(%rbx), %edx
callq 0x3740
jmp 0x43aa
movl 0xac(%rbx), %eax
movl %eax, 0xb4(%rbx)
movl $0x4, 0xa0(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/daniel5151[P]mips241/src/debug.cc
// Function: MIPS::Debugger::Debugger(MIPS::CPU&, MIPS::RAM&, MIPS::BUS&)
Debugger::Debugger(CPU & cpu, RAM & ram, BUS & bus)
: cpu(cpu), ram(ram), bus(bus)
{
  prevInput = "step";

  cycleStep = false;

  step = false;

  // Break at the start of the program
  breakpoints.insert(0x00000000);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %rsi, (%rdi)
movq %rdx, 0x8(%rdi)
movq %rcx, 0x10(%rdi)
leaq 0x20(%rdi), %rax
xorl %ecx, %ecx
movl %ecx, 0x20(%rdi)
movq %rcx, 0x28(%rdi)
movq %rax, 0x30(%rdi)
movq %rax, 0x38(%rdi)
movq %rcx, 0x40(%rdi)
leaq 0x50(%rdi), %r14
leaq 0x58(%rdi), %rax
movl %ecx, 0x58(%rdi)
movq %rcx, 0x60(%rdi)
movq %rax, 0x68(%rdi)
movq %rax, 0x70(%rdi)
movq %rcx, 0x78(%rdi)
leaq 0x88(%rdi), %rax
movl %ecx, 0x88(%rdi)
movq %rcx, 0x90(%rdi)
movq %rax, 0x98(%rdi)
movq %rax, 0xa0(%rdi)
movq %rcx, 0xa8(%rdi)
leaq 0xb0(%rdi), %r15
leaq 0xc0(%rdi), %r13
movq %r13, 0xb0(%rdi)
movq %rcx, 0xb8(%rdi)
movb $0x0, 0xc0(%rdi)
leaq 0x4c44(%rip), %rcx      # 0x910a
movl $0x4, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3300
movw $0x0, 0x48(%rbx)
leaq 0xc(%rsp), %rsi
movl $0x0, (%rsi)
movq %r14, %rdi
callq 0x65f6
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x4501
movq %rax, %r12
movq (%r15), %rdi
cmpq %r13, %rdi
je 0x4518
movq (%r13), %rsi
incq %rsi
callq 0x3200
leaq 0x80(%rbx), %rdi
addq $0x18, %rbx
callq 0x6556
movq %r14, %rdi
callq 0x6556
movq %rbx, %rdi
callq 0x65a6
movq %r12, %rdi
callq 0x33a0
// File: /workspace/github_cpp_makefile_star2_O3/daniel5151[P]mips241/src/debug.cc
// Function: MIPS::Debugger::print_stackRAM()
void Debugger::print_stackRAM() {
  bool oldHiglight_existed;
  char oldHiglight;

  cerr << "  ----------====== Stack RAM ======---------" << endl;
  uint32_t stackPtr = cpu.getRegister(30);

  oldHiglight_existed = (higlight.count(stackPtr) != 0);
  oldHiglight = (oldHiglight_existed) ? higlight[stackPtr] : ' ';

  higlight[stackPtr] = '>';
  printRAMFrom(stackPtr - 0x10, 12);

  if (oldHiglight_existed) higlight[stackPtr] = oldHiglight;
  else higlight.erase(stackPtr);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x7a64(%rip), %r14      # 0xcff0
leaq 0x3c2e(%rip), %rsi      # 0x91c1
movl $0x2c, %edx
movq %r14, %rdi
callq 0x3250
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x31e0
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3160
movq (%rbx), %rdi
movl $0x1e, %esi
callq 0x3efc
movl %eax, 0xc(%rsp)
leaq 0x18(%rbx), %r14
movq 0x28(%rbx), %rcx
movb $0x20, %bpl
movb $0x1, %r12b
testq %rcx, %rcx
je 0x5626
leaq 0x20(%rbx), %rsi
movq %rsi, %rdx
xorl %edi, %edi
cmpl %eax, 0x20(%rcx)
setb %dil
cmovaeq %rcx, %rdx
movq 0x10(%rcx,%rdi,8), %rcx
testq %rcx, %rcx
jne 0x55f2
cmpq %rsi, %rdx
je 0x5626
cmpl 0x20(%rdx), %eax
jb 0x5626
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
callq 0x63e0
movb (%rax), %bpl
xorl %r12d, %r12d
leaq 0xc(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x63e0
movb $0x3e, (%rax)
movl (%r15), %esi
addl $-0x10, %esi
movq %rbx, %rdi
movl $0xc, %edx
callq 0x4584
leaq 0xc(%rsp), %rsi
testb %r12b, %r12b
je 0x566b
movq %r14, %rdi
callq 0x6904
movq %r14, %rdi
movq %rax, %rsi
callq 0x6982
jmp 0x5676
movq %r14, %rdi
callq 0x63e0
movb %bpl, (%rax)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/daniel5151[P]mips241/src/debug.cc
// Function: MIPS::Debugger::print_progRAM()
void Debugger::print_progRAM() {
  bool oldHiglight_existed;
  char oldHiglight;

  cerr << "  ---------====== Program RAM ======--------" << endl;
  uint32_t currentPC = cpu.getPC();

  oldHiglight_existed = (higlight.count(currentPC) != 0);
  oldHiglight = (oldHiglight_existed) ? higlight[currentPC] : ' ';

  higlight[currentPC] = '>';
  uint32_t startAddr = ((int)currentPC - 0x20 >= 0x0)
    ? currentPC - 0x20
    : 0x0;
  printRAMFrom(startAddr, 16);

  if (oldHiglight_existed) higlight[currentPC] = oldHiglight;
  else higlight.erase(currentPC);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x7956(%rip), %r14      # 0xcff0
leaq 0x3b4d(%rip), %rsi      # 0x91ee
movl $0x2c, %edx
movq %r14, %rdi
callq 0x3250
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x31e0
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3160
movq (%rbx), %rdi
callq 0x3ef4
movl %eax, 0xc(%rsp)
leaq 0x18(%rbx), %r14
movq 0x28(%rbx), %rcx
movb $0x20, %bpl
movb $0x1, %r12b
testq %rcx, %rcx
je 0x572f
leaq 0x20(%rbx), %rsi
movq %rsi, %rdx
xorl %edi, %edi
cmpl %eax, 0x20(%rcx)
setb %dil
cmovaeq %rcx, %rdx
movq 0x10(%rcx,%rdi,8), %rcx
testq %rcx, %rcx
jne 0x56fb
cmpq %rsi, %rdx
je 0x572f
cmpl 0x20(%rdx), %eax
jb 0x572f
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
callq 0x63e0
movb (%rax), %bpl
xorl %r12d, %r12d
leaq 0xc(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x63e0
movb $0x3e, (%rax)
movl (%r15), %eax
leal -0x20(%rax), %ecx
xorl %esi, %esi
cmpl $0x20, %eax
cmovgel %ecx, %esi
movq %rbx, %rdi
movl $0x10, %edx
callq 0x4584
leaq 0xc(%rsp), %rsi
testb %r12b, %r12b
je 0x577c
movq %r14, %rdi
callq 0x6904
movq %r14, %rdi
movq %rax, %rsi
callq 0x6982
jmp 0x5787
movq %r14, %rdi
callq 0x63e0
movb %bpl, (%rax)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/daniel5151[P]mips241/src/disasm.cc
// Function: opcode2str[abi:cxx11](unsigned int)
std::string opcode2str(uint32_t opcode) {
  switch (opcode) {
    case OP_ADD:   return "add  ";
    case OP_SUB:   return "sub  ";
    case OP_SLT:   return "slt  ";
    case OP_SLTU:  return "sltu ";
    case OP_MFHI:  return "mfhi ";
    case OP_MFLO:  return "mflo ";
    case OP_MULT:  return "mult ";
    case OP_MULTU: return "multu";
    case OP_DIV:   return "div  ";
    case OP_DIVU:  return "divu ";
    case OP_LIS:   return "lis  ";
    case OP_JR:    return "jr   ";
    case OP_JALR:  return "jalr ";
    case OP_BEQ:   return "beq  ";
    case OP_BNE:   return "bne  ";
    case OP_LW:    return "lw   ";
    case OP_SW:    return "sw   ";
  }
  return "INVALID";
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
cmpl $0x29, %esi
jg 0x6c33
leal -0x8(%rsi), %eax
cmpl $0x1a, %eax
ja 0x6c5c
leaq 0x286d(%rip), %rcx      # 0x9484
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x2977(%rip), %rsi      # 0x959e
leaq 0x2975(%rip), %rdx      # 0x95a3
jmp 0x6d97
cmpl $0xfffffff, %esi        # imm = 0xFFFFFFF
jg 0x6c83
cmpl $0x2a, %esi
je 0x6d69
cmpl $0x2b, %esi
jne 0x6caa
leaq 0x291e(%rip), %rsi      # 0x956e
leaq 0x291c(%rip), %rdx      # 0x9573
jmp 0x6d97
cmpl $0x8c000000, %esi       # imm = 0x8C000000
je 0x6d89
cmpl $0xac000000, %esi       # imm = 0xAC000000
jne 0x6caa
leaq 0x2945(%rip), %rsi      # 0x95bc
leaq 0x2943(%rip), %rdx      # 0x95c1
jmp 0x6d97
cmpl $0x10000000, %esi       # imm = 0x10000000
je 0x6d79
cmpl $0x14000000, %esi       # imm = 0x14000000
jne 0x6caa
leaq 0x2912(%rip), %rsi      # 0x95b0
leaq 0x2910(%rip), %rdx      # 0x95b5
jmp 0x6d97
leaq 0x2911(%rip), %rsi      # 0x95c2
leaq 0x2911(%rip), %rdx      # 0x95c9
jmp 0x6d97
leaq 0x289e(%rip), %rsi      # 0x9562
leaq 0x289c(%rip), %rdx      # 0x9567
jmp 0x6d97
leaq 0x28bb(%rip), %rsi      # 0x9592
leaq 0x28b9(%rip), %rdx      # 0x9597
jmp 0x6d97
leaq 0x28a2(%rip), %rsi      # 0x958c
leaq 0x28a0(%rip), %rdx      # 0x9591
jmp 0x6d97
leaq 0x285f(%rip), %rsi      # 0x955c
leaq 0x285d(%rip), %rdx      # 0x9561
jmp 0x6d97
leaq 0x2870(%rip), %rsi      # 0x9580
leaq 0x286e(%rip), %rdx      # 0x9585
jmp 0x6d97
leaq 0x2878(%rip), %rsi      # 0x9598
leaq 0x2876(%rip), %rdx      # 0x959d
jmp 0x6d97
leaq 0x2844(%rip), %rsi      # 0x9574
leaq 0x2842(%rip), %rdx      # 0x9579
jmp 0x6d97
leaq 0x283a(%rip), %rsi      # 0x957a
leaq 0x2838(%rip), %rdx      # 0x957f
jmp 0x6d97
leaq 0x2854(%rip), %rsi      # 0x95a4
leaq 0x2852(%rip), %rdx      # 0x95a9
jmp 0x6d97
leaq 0x2826(%rip), %rsi      # 0x9586
leaq 0x2824(%rip), %rdx      # 0x958b
jmp 0x6d97
leaq 0x27f8(%rip), %rsi      # 0x9568
leaq 0x27f6(%rip), %rdx      # 0x956d
jmp 0x6d97
leaq 0x282a(%rip), %rsi      # 0x95aa
leaq 0x2828(%rip), %rdx      # 0x95af
jmp 0x6d97
leaq 0x2826(%rip), %rsi      # 0x95b6
leaq 0x2824(%rip), %rdx      # 0x95bb
movq %rbx, %rdi
callq 0x3a84
movq %rbx, %rax
popq %rbx
retq