LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: xbai0624[P]dnn/src/Layer.cpp
// Function: operator<<(std::ostream&, ActuationFuncType const&)
std::ostream & operator<<(std::ostream &os, const ActuationFuncType & t)
{
    if(t == ActuationFuncType::Sigmoid)
        os<<"Sigmoid_Actuation_Func";
    else if(t == ActuationFuncType::SoftMax)
        os<<"Softmax_Actuation_Func";
    else if(t == ActuationFuncType::Tanh)
        os<<"Tanh_Actuation_Func";
    else if(t == ActuationFuncType::Relu)
        os<<"Relu_Actuation_Func";
    else 
        os<<"Undefined_Actuation_Func";
    return os;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x3ab1b
movq 0x10(%rsp), %rdi
leaq 0x1a257(%rip), %rsi     # 0x54d6b
callq 0x4230
jmp 0x3ab89
movq 0x8(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x3ab38
movq 0x10(%rsp), %rdi
leaq 0x1a251(%rip), %rsi     # 0x54d82
callq 0x4230
jmp 0x3ab87
movq 0x8(%rsp), %rax
cmpl $0x2, (%rax)
jne 0x3ab55
movq 0x10(%rsp), %rdi
leaq 0x1a24b(%rip), %rsi     # 0x54d99
callq 0x4230
jmp 0x3ab85
movq 0x8(%rsp), %rax
cmpl $0x3, (%rax)
jne 0x3ab72
movq 0x10(%rsp), %rdi
leaq 0x1a242(%rip), %rsi     # 0x54dad
callq 0x4230
jmp 0x3ab83
movq 0x10(%rsp), %rdi
leaq 0x1a243(%rip), %rsi     # 0x54dc1
callq 0x4230
jmp 0x3ab85
jmp 0x3ab87
jmp 0x3ab89
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: xbai0624[P]dnn/src/Layer.cpp
// Function: operator<<(std::ostream&, LayerDimension const&)
std::ostream & operator<<(std::ostream &os, const LayerDimension &dim)
{
    if(dim == LayerDimension::_1D)
        os<<"__LayerDimension=_1D__";
    else if(dim == LayerDimension::_2D)
        os<<"__LayerDimension=_2D__";
    else if(dim == LayerDimension::Undefined)
        os<<"__LayerDimension=Undefined__";
    return os;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x3abcb
movq 0x10(%rsp), %rdi
leaq 0x1a216(%rip), %rsi     # 0x54dda
callq 0x4230
jmp 0x3ac07
movq 0x8(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x3abe8
movq 0x10(%rsp), %rdi
leaq 0x1a210(%rip), %rsi     # 0x54df1
callq 0x4230
jmp 0x3ac05
movq 0x8(%rsp), %rax
cmpl $0x2, (%rax)
jne 0x3ac03
movq 0x10(%rsp), %rdi
leaq 0x1a20a(%rip), %rsi     # 0x54e08
callq 0x4230
jmp 0x3ac05
jmp 0x3ac07
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: xbai0624[P]dnn/src/Layer.cpp
// Function: operator<<(std::ostream&, Filter2D const&)
std::ostream & operator<<(std::ostream &os, const Filter2D &t)
{
    for(size_t i=0;i<t.__filter.size();i++)
    {
        for(size_t j=0;j<t.__filter[i].size();j++)
        {
            os<<std::setfill(' ')<<std::setw(4)<<t.__filter[i][j];
        }
        os<<std::endl;
    }
    return os;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq $0x0, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x48(%rsp), %rdi
callq 0x22a60
movq %rax, %rcx
movq 0x28(%rsp), %rax
cmpq %rcx, %rax
jae 0x3ad47
movq $0x0, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x3b010
movq %rax, %rdi
callq 0x239f0
movq %rax, %rcx
movq 0x20(%rsp), %rax
cmpq %rcx, %rax
jae 0x3ad23
movq 0x50(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x20, %edi
callq 0x3b030
movq 0x8(%rsp), %rdi
movb %al, 0x37(%rsp)
movzbl 0x37(%rsp), %esi
callq 0x4350
movq %rax, 0x10(%rsp)
movl $0x4, %edi
callq 0x3b050
movq 0x10(%rsp), %rdi
movl %eax, 0x30(%rsp)
movl 0x30(%rsp), %esi
callq 0x4280
movq %rax, 0x18(%rsp)
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x3b010
movq %rax, %rdi
movq 0x38(%rsp), %rsi
callq 0x3b070
movq 0x18(%rsp), %rdi
movzbl %al, %esi
andl $0x1, %esi
callq 0x4410
movq 0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0x3ac65
movq 0x50(%rsp), %rdi
movq 0x30281(%rip), %rsi     # 0x6afb0
callq 0x4260
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
jmp 0x3ac37
movq 0x50(%rsp), %rax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
// File: xbai0624[P]dnn/src/Layer.cpp
// Function: operator<<(std::ostream&, NeuronCoord const&)
std::ostream & operator<<(std::ostream& os, const NeuronCoord &c)
{
    os<<std::setfill(' ')<<std::setw(4)<<c.i
        <<std::setfill(' ')<<std::setw(4)<<c.j
        <<std::setfill(' ')<<std::setw(4)<<c.k
        <<std::endl;
    return os;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x50(%rsp), %rax
movq %rax, (%rsp)
movl $0x20, %edi
callq 0x3b030
movq (%rsp), %rdi
movb %al, 0x47(%rsp)
movzbl 0x47(%rsp), %esi
callq 0x4350
movq %rax, 0x8(%rsp)
movl $0x4, %edi
callq 0x3b050
movq 0x8(%rsp), %rdi
movl %eax, 0x40(%rsp)
movl 0x40(%rsp), %esi
callq 0x4280
movq %rax, %rdi
movq 0x48(%rsp), %rax
movq (%rax), %rsi
callq 0x4080
movq %rax, 0x10(%rsp)
movl $0x20, %edi
callq 0x3b030
movq 0x10(%rsp), %rdi
movb %al, 0x3f(%rsp)
movzbl 0x3f(%rsp), %esi
callq 0x4350
movq %rax, 0x18(%rsp)
movl $0x4, %edi
callq 0x3b050
movq 0x18(%rsp), %rdi
movl %eax, 0x38(%rsp)
movl 0x38(%rsp), %esi
callq 0x4280
movq %rax, %rdi
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rsi
callq 0x4080
movq %rax, 0x20(%rsp)
movl $0x20, %edi
callq 0x3b030
movq 0x20(%rsp), %rdi
movb %al, 0x37(%rsp)
movzbl 0x37(%rsp), %esi
callq 0x4350
movq %rax, 0x28(%rsp)
movl $0x4, %edi
callq 0x3b050
movq 0x28(%rsp), %rdi
movl %eax, 0x30(%rsp)
movl 0x30(%rsp), %esi
callq 0x4280
movq %rax, %rdi
movq 0x48(%rsp), %rax
movq 0x10(%rax), %rsi
callq 0x4080
movq %rax, %rdi
movq 0x3013a(%rip), %rsi     # 0x6afb0
callq 0x4260
movq 0x50(%rsp), %rax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
// File: xbai0624[P]dnn/src/Layer.cpp
// Function: operator<<(std::ostream&, Images const&)
std::ostream & operator<<(std::ostream &os, const Images & images)
{
    os<<"images from all kernels during one training sample:"<<std::endl;
    for(size_t i=0;i<images.OutputImageFromKernel.size();i++)
    {
        os<<"kernel: "<<i<<std::endl;
        Matrix m = (images.OutputImageFromKernel)[i];
        os<<m<<std::endl;
    }
    return os;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x50(%rsp), %rdi
leaq 0x19f7b(%rip), %rsi     # 0x54e25
callq 0x4230
movq %rax, %rdi
movq 0x300f7(%rip), %rsi     # 0x6afb0
callq 0x4260
movq $0x0, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x48(%rsp), %rdi
callq 0x1f9c0
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
jae 0x3af98
movq 0x50(%rsp), %rdi
leaq 0x1b885(%rip), %rsi     # 0x5677d
callq 0x4230
movq %rax, %rdi
movq 0x40(%rsp), %rsi
callq 0x4080
movq %rax, %rdi
movq 0x3009c(%rip), %rsi     # 0x6afb0
callq 0x4260
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x29840
movq %rax, %rsi
leaq 0x28(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x3b810
movq (%rsp), %rsi
movq 0x50(%rsp), %rdi
callq 0x3d640
movq %rax, 0x8(%rsp)
jmp 0x3af4e
movq 0x8(%rsp), %rdi
movq 0x30056(%rip), %rsi     # 0x6afb0
callq 0x4260
jmp 0x3af61
leaq 0x28(%rsp), %rdi
callq 0x3bb80
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
jmp 0x3aec7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x3bb80
jmp 0x3afa2
movq 0x50(%rsp), %rax
addq $0x58, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x43f0
nopl (%rax)
// File: xbai0624[P]dnn/src/Matrix.cpp
// Function: operator<<(std::ostream&, std::pair<unsigned long, unsigned long> const&)
std::ostream &operator<<(std::ostream &os, const std::pair<size_t, size_t> &d)
{
    os<<std::setfill(' ')<<std::setw(6)<<d.first
        <<std::setfill(' ')<<std::setw(6)<<d.second
        <<std::endl;
    return os;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x20, %edi
callq 0x3b030
movq 0x8(%rsp), %rdi
movb %al, 0x37(%rsp)
movzbl 0x37(%rsp), %esi
callq 0x4350
movq %rax, 0x10(%rsp)
movl $0x6, %edi
callq 0x3b050
movq 0x10(%rsp), %rdi
movl %eax, 0x30(%rsp)
movl 0x30(%rsp), %esi
callq 0x4280
movq %rax, %rdi
movq 0x38(%rsp), %rax
movq (%rax), %rsi
callq 0x4080
movq %rax, 0x18(%rsp)
movl $0x20, %edi
callq 0x3b030
movq 0x18(%rsp), %rdi
movb %al, 0x2f(%rsp)
movzbl 0x2f(%rsp), %esi
callq 0x4350
movq %rax, 0x20(%rsp)
movl $0x6, %edi
callq 0x3b050
movq 0x20(%rsp), %rdi
movl %eax, 0x28(%rsp)
movl 0x28(%rsp), %esi
callq 0x4280
movq %rax, %rdi
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rsi
callq 0x4080
movq %rax, %rdi
movq 0x2fcec(%rip), %rsi     # 0x6afb0
callq 0x4260
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: xbai0624[P]dnn/src/Matrix.cpp
// Function: Matrix::Matrix(std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>&)
Matrix::Matrix(std::vector<std::vector<double>> &vv)
{
    // constructor and initilize matrix with a 2D vector vv
    size_t nRow = vv.size();
    for(size_t i=0;i<nRow;i++)
        __M.push_back(vv[i]);
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x30(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x21e70
movq 0x28(%rsp), %rdi
callq 0x21e80
movq %rax, 0x20(%rsp)
movq $0x0, 0x18(%rsp)
movq 0x18(%rsp), %rax
cmpq 0x20(%rsp), %rax
jae 0x3b7f8
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x42670
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x21f00
jmp 0x3b7cd
jmp 0x3b7cf
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x3b7a4
movq (%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x10(%rsp)
movl %eax, 0xc(%rsp)
callq 0x21f70
jmp 0x3b7fd
addq $0x38, %rsp
retq
movq 0x10(%rsp), %rdi
callq 0x43f0
nopw (%rax,%rax)
// File: xbai0624[P]dnn/src/Matrix.cpp
// Function: Matrix::Matrix(Matrix const&)
Matrix::Matrix(const Matrix &m)
{
    // copy constructor
    auto dim = m.Dimension();
    __M.clear();
    __M.resize(dim.first, std::vector<double>(dim.second, 0));
    for(size_t i=0;i<dim.first;i++){
        for(size_t j=0;j<dim.second;j++)
        {
            __M[i][j] = m.GetElement(i, j);
        }
    }

    assert(Dimension() == dim); // make sure copy is correct
}

// Assembly:
subq $0xe8, %rsp
movq %rdi, 0xe0(%rsp)
movq %rsi, 0xd8(%rsp)
movq 0xe0(%rsp), %rdi
movq %rdi, 0x40(%rsp)
movq %rdi, %rax
movq %rax, 0x48(%rsp)
callq 0x21e70
movq 0xd8(%rsp), %rdi
callq 0x3bae0
movq %rdx, 0x50(%rsp)
movq %rax, 0x58(%rsp)
jmp 0x3b85a
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rax
movq 0x58(%rsp), %rcx
movq %rcx, 0xc8(%rsp)
movq %rax, 0xd0(%rsp)
callq 0x21ea0
movq 0x48(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x30(%rsp)
movq $0x0, 0x98(%rsp)
leaq 0x97(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x222f0
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rcx
leaq 0xa0(%rsp), %rdi
leaq 0x98(%rsp), %rdx
callq 0x425f0
jmp 0x3b8e1
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rdi
leaq 0xa0(%rsp), %rdx
callq 0x42530
jmp 0x3b8fa
leaq 0xa0(%rsp), %rdi
callq 0x1f190
leaq 0x97(%rsp), %rdi
callq 0x26280
movq $0x0, 0x88(%rsp)
movq 0x88(%rsp), %rax
cmpq 0xc8(%rsp), %rax
jae 0x3ba3c
movq $0x0, 0x80(%rsp)
movq 0x80(%rsp), %rax
cmpq 0xd0(%rsp), %rax
jae 0x3ba21
movq 0xd8(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0x80(%rsp), %rdx
callq 0x3bb40
movsd %xmm0, 0x18(%rsp)
jmp 0x3b97d
movq 0x48(%rsp), %rdi
movq 0x88(%rsp), %rsi
callq 0x42670
movq %rax, %rdi
movq 0x80(%rsp), %rsi
callq 0x1fd60
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x80(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x80(%rsp)
jmp 0x3b942
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc0(%rsp)
movl %eax, 0xbc(%rsp)
jmp 0x3bac8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc0(%rsp)
movl %eax, 0xbc(%rsp)
jmp 0x3ba0f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc0(%rsp)
movl %eax, 0xbc(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x1f190
leaq 0x97(%rsp), %rdi
callq 0x26280
jmp 0x3bac8
jmp 0x3ba23
movq 0x88(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x88(%rsp)
jmp 0x3b920
movq 0x48(%rsp), %rdi
callq 0x3bae0
movq %rdx, 0x8(%rsp)
movq %rax, 0x10(%rsp)
jmp 0x3ba52
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
movq %rcx, 0x70(%rsp)
movq %rax, 0x78(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x70(%rsp), %rdi
movq 0x78(%rsp), %rsi
movq 0x60(%rsp), %rdx
movq 0x68(%rsp), %rcx
callq 0x3b180
testb $0x1, %al
jne 0x3ba9f
jmp 0x3baa1
jmp 0x3bac0
leaq 0x193d0(%rip), %rdi     # 0x54e78
leaq 0x193dc(%rip), %rsi     # 0x54e8b
movl $0x85, %edx
leaq 0x193df(%rip), %rcx     # 0x54e9a
callq 0x4170
addq $0xe8, %rsp
retq
movq 0x40(%rsp), %rdi
callq 0x21f70
movq 0xc0(%rsp), %rdi
callq 0x43f0
nop
// File: xbai0624[P]dnn/src/Matrix.cpp
// Function: Matrix::_mul_Multiply(Matrix&, Matrix&)
void Matrix::_mul_Multiply(Matrix &B, Matrix &C)
{
    // AxB = C; A is this matrix
    if(C.size() != this->size() || C[0].size() != B[0].size()) {
        std::cout<<"Error: Matrix not match."<<std::endl;
        exit(0);
    }
#ifdef MULTITHREAD_MATRIX
    auto jobs = DivideJobs(this->size(), B[0].size(), NCORES);
    std::vector<std::thread> th;
    for(auto &i: jobs)
    {
        //std::cout<<"("<<i.first.first<<", "<<i.first.second<<"), ";
        //std::cout<<"("<<i.second.first<<", "<<i.second.second<<"), "<<std::endl;
        th.push_back( std::thread( [this, &B, &C, &i](){
                    _mul_ComputeSection(B, C, i.first.first, i.first.second, i.second.first, i.second.second);
                    }
                    ) 
                );
    }
    for(auto &j: th){
        j.join();
    }
#else
    _mul_ComputeSection(B, C, 0, this->size(), 0, B[0].size());
#endif
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x40(%rsp), %rdi
callq 0x3be40
movq 0x30(%rsp), %rdi
movq %rax, 0x38(%rsp)
callq 0x3be40
movq %rax, %rcx
movq 0x38(%rsp), %rax
cmpq %rcx, %rax
jne 0x3bf01
movq 0x40(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3be50
movq %rax, %rdi
callq 0x21e20
movq %rax, 0x28(%rsp)
movq 0x48(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3be50
movq %rax, %rdi
callq 0x21e20
movq %rax, %rcx
movq 0x28(%rsp), %rax
cmpq %rcx, %rax
je 0x3bf2a
movq 0x2f0d0(%rip), %rdi     # 0x6afd8
leaq 0x18ffc(%rip), %rsi     # 0x54f0b
callq 0x4230
movq %rax, %rdi
movq 0x2f092(%rip), %rsi     # 0x6afb0
callq 0x4260
xorl %edi, %edi
callq 0x4290
movq 0x30(%rsp), %rdi
movq 0x48(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x18(%rsp)
callq 0x3be40
movq %rax, 0x20(%rsp)
movq 0x48(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3be50
movq %rax, %rdi
callq 0x21e20
movq 0x30(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %r8
xorl %ecx, %ecx
movl %ecx, %r9d
movq %r9, %rcx
movq %rax, (%rsp)
callq 0x3d2b0
addq $0x58, %rsp
retq
nopl (%rax)
// File: xbai0624[P]dnn/src/Matrix.cpp
// Function: Matrix::operator+(Matrix&)
Matrix Matrix::operator+(Matrix &B)
{
    // matrix plus operation +: A+B = C
    if(B.Dimension() != this->Dimension()){
        std::cout<<"Error: Matrix not match in + ops."<<std::endl;
        exit(0);
    }

    Matrix C(B.Dimension());
#ifdef MULTITHREAD_MATRIX
    auto jobs = DivideJobs(this->size(), B[0].size(), NCORES);
    std::vector<std::thread> th;
    for(auto &i: jobs)
    {
        th.push_back( std::thread( [this, &B, &C, &i](){
                    _hadamard_ComputeSection(HadamardOps::plus, B, C, i.first.first, i.first.second, i.second.first, i.second.second);
                    }
                    ) 
                );
    }
    for(auto &j: th){
        j.join();
    }
#else
    _hadamard_ComputeSection(HadamardOps::plus, B, C, 0, B.Dimension().first, 0, B.Dimension().second);
#endif
    return C;
}

// Assembly:
subq $0xd8, %rsp
movq %rdi, 0x40(%rsp)
movq %rdi, %rax
movq %rax, 0x48(%rsp)
movq %rdi, 0xd0(%rsp)
movq %rsi, 0xc8(%rsp)
movq %rdx, 0xc0(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0xc0(%rsp), %rdi
callq 0x3bae0
movq 0x50(%rsp), %rdi
movq %rax, 0xb0(%rsp)
movq %rdx, 0xb8(%rsp)
callq 0x3bae0
movq %rax, 0xa0(%rsp)
movq %rdx, 0xa8(%rsp)
movq 0xb0(%rsp), %rdi
movq 0xb8(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movq 0xa8(%rsp), %rcx
callq 0x3b1c0
testb $0x1, %al
jne 0x3c02b
jmp 0x3c054
movq 0x2efa6(%rip), %rdi     # 0x6afd8
leaq 0x18f0c(%rip), %rsi     # 0x54f45
callq 0x4230
movq %rax, %rdi
movq 0x2ef68(%rip), %rsi     # 0x6afb0
callq 0x4260
xorl %edi, %edi
callq 0x4290
movb $0x0, 0x9f(%rsp)
movq 0xc0(%rsp), %rdi
callq 0x3bae0
movq 0x40(%rsp), %rdi
movq %rax, 0x88(%rsp)
movq %rdx, 0x90(%rsp)
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
callq 0x3b4a0
movq 0xc0(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x3bae0
movq %rdx, 0x30(%rsp)
movq %rax, 0x38(%rsp)
jmp 0x3c0b1
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
movq %rcx, 0x78(%rsp)
movq %rax, 0x80(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0xc0(%rsp), %rdi
callq 0x3bae0
movq %rdx, 0x18(%rsp)
movq %rax, 0x20(%rsp)
jmp 0x3c0eb
movq 0x10(%rsp), %r9
movq 0x40(%rsp), %rcx
movq 0x28(%rsp), %rdx
movq 0x50(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rsi
movq %rsi, 0x58(%rsp)
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rsi
movq %rsp, %rax
movq %rsi, 0x8(%rax)
movq $0x0, (%rax)
xorl %esi, %esi
movl %esi, %r8d
callq 0x3c190
jmp 0x3c132
movb $0x1, 0x9f(%rsp)
testb $0x1, 0x9f(%rsp)
jne 0x3c16a
jmp 0x3c160
movq 0x40(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
callq 0x3bb80
jmp 0x3c177
movq 0x40(%rsp), %rdi
callq 0x3bb80
movq 0x48(%rsp), %rax
addq $0xd8, %rsp
retq
movq 0x70(%rsp), %rdi
callq 0x43f0
nopw %cs:(%rax,%rax)
// File: xbai0624[P]dnn/src/Matrix.cpp
// Function: Matrix::operator+(double)
Matrix Matrix::operator+(double v)
{
    // scalar plus operation: A+v = C
    Matrix C(this->Dimension());
#ifdef MULTITHREAD_MATRIX
    auto jobs = DivideJobs(this->size(), (*this)[0].size(), NCORES);
    std::vector<std::thread> th;
    for(auto &i: jobs)
    {
        th.push_back( std::thread( [this, v, &C, &i](){
                    _scalar_ComputeSection(HadamardOps::plus, v, C, i.first.first, i.first.second, i.second.first, i.second.second);
                    }
                    ) 
                );
    }
    for(auto &j: th){
        j.join();
    }
#else
    _scalar_ComputeSection(HadamardOps::plus, v, C, 0, (*this).Dimension().first, 0, (*this).Dimension().second);
#endif
    return C;
}

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0x30(%rsp)
movq %rdi, %rax
movq %rax, 0x28(%rsp)
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movsd %xmm0, 0xa0(%rsp)
movq 0xa8(%rsp), %rdi
movq %rdi, 0x38(%rsp)
movb $0x0, 0x9f(%rsp)
callq 0x3bae0
movq 0x30(%rsp), %rdi
movq %rax, 0x88(%rsp)
movq %rdx, 0x90(%rsp)
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
callq 0x3b4a0
movq 0x38(%rsp), %rdi
movsd 0xa0(%rsp), %xmm0
movsd %xmm0, 0x40(%rsp)
callq 0x3bae0
movq %rdx, 0x48(%rsp)
movq %rax, 0x50(%rsp)
jmp 0x3cb16
movq 0x38(%rsp), %rdi
movq 0x48(%rsp), %rax
movq 0x50(%rsp), %rcx
movq %rcx, 0x78(%rsp)
movq %rax, 0x80(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0x3bae0
movq %rdx, 0x18(%rsp)
movq %rax, 0x20(%rsp)
jmp 0x3cb4d
movq 0x10(%rsp), %r8
movq 0x30(%rsp), %rdx
movsd 0x40(%rsp), %xmm0
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
movq %rcx, 0x58(%rsp)
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rcx
movq %rsp, %rax
movq %rcx, (%rax)
xorl %esi, %esi
movl %esi, %r9d
movq %r9, %rcx
callq 0x3cbe0
jmp 0x3cb90
movb $0x1, 0x9f(%rsp)
testb $0x1, 0x9f(%rsp)
jne 0x3cbc8
jmp 0x3cbbe
movq 0x30(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
callq 0x3bb80
jmp 0x3cbd5
movq 0x30(%rsp), %rdi
callq 0x3bb80
movq 0x28(%rsp), %rax
addq $0xb8, %rsp
retq
movq 0x70(%rsp), %rdi
callq 0x43f0
nop
// File: xbai0624[P]dnn/src/Matrix.cpp
// Function: Matrix::operator-(double)
Matrix Matrix::operator-(double v)
{
    // scalar subtraction operation: A-v = C
    Matrix C(this->Dimension());
#ifdef MULTITHREAD_MATRIX
    auto jobs = DivideJobs(this->size(), (*this)[0].size(), NCORES);
    std::vector<std::thread> th;
    for(auto &i: jobs)
    {
        th.push_back( std::thread( [this, v, &C, &i](){
                    _scalar_ComputeSection(HadamardOps::subtract, v, C, i.first.first, i.first.second, i.second.first, i.second.second);
                    }
                    ) 
                );
    }
    for(auto &j: th){
        j.join();
    }
#else
    _scalar_ComputeSection(HadamardOps::subtract, v, C, 0, (*this).Dimension().first, 0, (*this).Dimension().second);
#endif
    return C;
}

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0x30(%rsp)
movq %rdi, %rax
movq %rax, 0x28(%rsp)
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movsd %xmm0, 0xa0(%rsp)
movq 0xa8(%rsp), %rdi
movq %rdi, 0x38(%rsp)
movb $0x0, 0x9f(%rsp)
callq 0x3bae0
movq 0x30(%rsp), %rdi
movq %rax, 0x88(%rsp)
movq %rdx, 0x90(%rsp)
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
callq 0x3b4a0
movq 0x38(%rsp), %rdi
movsd 0xa0(%rsp), %xmm0
movsd %xmm0, 0x40(%rsp)
callq 0x3bae0
movq %rdx, 0x48(%rsp)
movq %rax, 0x50(%rsp)
jmp 0x3cef6
movq 0x38(%rsp), %rdi
movq 0x48(%rsp), %rax
movq 0x50(%rsp), %rcx
movq %rcx, 0x78(%rsp)
movq %rax, 0x80(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0x3bae0
movq %rdx, 0x18(%rsp)
movq %rax, 0x20(%rsp)
jmp 0x3cf2d
movq 0x10(%rsp), %r8
movq 0x30(%rsp), %rdx
movsd 0x40(%rsp), %xmm0
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
movq %rcx, 0x58(%rsp)
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rcx
movq %rsp, %rax
movq %rcx, (%rax)
xorl %eax, %eax
movl %eax, %r9d
movl $0x1, %esi
movq %r9, %rcx
callq 0x3cbe0
jmp 0x3cf75
movb $0x1, 0x9f(%rsp)
testb $0x1, 0x9f(%rsp)
jne 0x3cfad
jmp 0x3cfa3
movq 0x30(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
callq 0x3bb80
jmp 0x3cfba
movq 0x30(%rsp), %rdi
callq 0x3bb80
movq 0x28(%rsp), %rax
addq $0xb8, %rsp
retq
movq 0x70(%rsp), %rdi
callq 0x43f0
nopw %cs:(%rax,%rax)
// File: xbai0624[P]dnn/src/Matrix.cpp
// Function: Matrix::operator*(double)
Matrix Matrix::operator*(double v)
{
    // scalar multiply operation: A*v = C
    Matrix C(this->Dimension());
#ifdef MULTITHREAD_MATRIX
    auto jobs = DivideJobs(this->size(), (*this)[0].size(), NCORES);
    std::vector<std::thread> th;
    for(auto &i: jobs)
    {
        th.push_back( std::thread( [this, v, &C, &i](){
                    _scalar_ComputeSection(HadamardOps::multiply, v, C, i.first.first, i.first.second, i.second.first, i.second.second);
                    }
                    ) 
                );
    }
    for(auto &j: th){
        j.join();
    }
#else
    _scalar_ComputeSection(HadamardOps::multiply, v, C, 0, (*this).Dimension().first, 0, (*this).Dimension().second);
#endif
    return C;
}

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0x30(%rsp)
movq %rdi, %rax
movq %rax, 0x28(%rsp)
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movsd %xmm0, 0xa0(%rsp)
movq 0xa8(%rsp), %rdi
movq %rdi, 0x38(%rsp)
movb $0x0, 0x9f(%rsp)
callq 0x3bae0
movq 0x30(%rsp), %rdi
movq %rax, 0x88(%rsp)
movq %rdx, 0x90(%rsp)
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
callq 0x3b4a0
movq 0x38(%rsp), %rdi
movsd 0xa0(%rsp), %xmm0
movsd %xmm0, 0x40(%rsp)
callq 0x3bae0
movq %rdx, 0x48(%rsp)
movq %rax, 0x50(%rsp)
jmp 0x3d066
movq 0x38(%rsp), %rdi
movq 0x48(%rsp), %rax
movq 0x50(%rsp), %rcx
movq %rcx, 0x78(%rsp)
movq %rax, 0x80(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0x3bae0
movq %rdx, 0x18(%rsp)
movq %rax, 0x20(%rsp)
jmp 0x3d09d
movq 0x10(%rsp), %r8
movq 0x30(%rsp), %rdx
movsd 0x40(%rsp), %xmm0
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
movq %rcx, 0x58(%rsp)
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rcx
movq %rsp, %rax
movq %rcx, (%rax)
xorl %eax, %eax
movl %eax, %r9d
movl $0x2, %esi
movq %r9, %rcx
callq 0x3cbe0
jmp 0x3d0e5
movb $0x1, 0x9f(%rsp)
testb $0x1, 0x9f(%rsp)
jne 0x3d11d
jmp 0x3d113
movq 0x30(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
callq 0x3bb80
jmp 0x3d12a
movq 0x30(%rsp), %rdi
callq 0x3bb80
movq 0x28(%rsp), %rax
addq $0xb8, %rsp
retq
movq 0x70(%rsp), %rdi
callq 0x43f0
nopw %cs:(%rax,%rax)
// File: xbai0624[P]dnn/src/Matrix.cpp
// Function: Matrix::operator/(double)
Matrix Matrix::operator/(double v)
{
    // scalar division operation: A/v = C
    Matrix C(this->Dimension());
#ifdef MULTITHREAD_MATRIX
    auto jobs = DivideJobs(this->size(), (*this)[0].size(), NCORES);
    std::vector<std::thread> th;
    for(auto &i: jobs)
    {
        th.push_back( std::thread( [this, v, &C, &i](){
                    _scalar_ComputeSection(HadamardOps::divide, v, C, i.first.first, i.first.second, i.second.first, i.second.second);
                    }
                    ) 
                );
    }
    for(auto &j: th){
        j.join();
    }
#else
    _scalar_ComputeSection(HadamardOps::divide, v, C, 0, (*this).Dimension().first, 0, (*this).Dimension().second);
#endif
    return C;
}

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0x30(%rsp)
movq %rdi, %rax
movq %rax, 0x28(%rsp)
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movsd %xmm0, 0xa0(%rsp)
movq 0xa8(%rsp), %rdi
movq %rdi, 0x38(%rsp)
movb $0x0, 0x9f(%rsp)
callq 0x3bae0
movq 0x30(%rsp), %rdi
movq %rax, 0x88(%rsp)
movq %rdx, 0x90(%rsp)
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
callq 0x3b4a0
movq 0x38(%rsp), %rdi
movsd 0xa0(%rsp), %xmm0
movsd %xmm0, 0x40(%rsp)
callq 0x3bae0
movq %rdx, 0x48(%rsp)
movq %rax, 0x50(%rsp)
jmp 0x3d1d6
movq 0x38(%rsp), %rdi
movq 0x48(%rsp), %rax
movq 0x50(%rsp), %rcx
movq %rcx, 0x78(%rsp)
movq %rax, 0x80(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0x3bae0
movq %rdx, 0x18(%rsp)
movq %rax, 0x20(%rsp)
jmp 0x3d20d
movq 0x10(%rsp), %r8
movq 0x30(%rsp), %rdx
movsd 0x40(%rsp), %xmm0
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
movq %rcx, 0x58(%rsp)
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rcx
movq %rsp, %rax
movq %rcx, (%rax)
xorl %eax, %eax
movl %eax, %r9d
movl $0x3, %esi
movq %r9, %rcx
callq 0x3cbe0
jmp 0x3d255
movb $0x1, 0x9f(%rsp)
testb $0x1, 0x9f(%rsp)
jne 0x3d28d
jmp 0x3d283
movq 0x30(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
callq 0x3bb80
jmp 0x3d29a
movq 0x30(%rsp), %rdi
callq 0x3bb80
movq 0x28(%rsp), %rax
addq $0xb8, %rsp
retq
movq 0x70(%rsp), %rdi
callq 0x43f0
nopw %cs:(%rax,%rax)
// File: xbai0624[P]dnn/src/Matrix.cpp
// Function: Matrix::_mul_ComputeSection(Matrix&, Matrix&, unsigned long, unsigned long, unsigned long, unsigned long)
void Matrix::_mul_ComputeSection(Matrix &B, Matrix &C, size_t r1, size_t r2, size_t c1, size_t c2)
{
    // compute a section of C
    if(r1 >= r2 || c1 >= c2) {
        return;
    }
    if( (int)r1<0 || r2>this->size() || (int)c1<0 || c2>B[0].size()) {
        std::cout<<"Error: matrix out of range."<<std::endl;
        exit(0);
    }
    if(C.size() != this->size() || C[0].size() != B[0].size() ) {
        std::cout<<"Error: matrix not match."<<std::endl;
        exit(0);
    }

    for(size_t i=r1; i<r2;i++){
        for(size_t j=c1;j<c2;j++){
            C[i][j] = _mul_ComputeElement(B, i, j);
        }
    }
}

// Assembly:
subq $0x78, %rsp
movq 0x80(%rsp), %rax
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movq %rdx, 0x60(%rsp)
movq %rcx, 0x58(%rsp)
movq %r8, 0x50(%rsp)
movq %r9, 0x48(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x58(%rsp), %rax
cmpq 0x50(%rsp), %rax
jae 0x3d2ff
movq 0x48(%rsp), %rax
cmpq 0x80(%rsp), %rax
jb 0x3d304
jmp 0x3d4bc
movq 0x58(%rsp), %rax
cmpl $0x0, %eax
jl 0x3d369
movq 0x30(%rsp), %rdi
movq 0x50(%rsp), %rax
movq %rax, 0x28(%rsp)
callq 0x3be40
movq %rax, %rcx
movq 0x28(%rsp), %rax
cmpq %rcx, %rax
ja 0x3d369
movq 0x48(%rsp), %rax
cmpl $0x0, %eax
jl 0x3d369
movq 0x80(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x68(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3be50
movq %rax, %rdi
callq 0x21e20
movq %rax, %rcx
movq 0x20(%rsp), %rax
cmpq %rcx, %rax
jbe 0x3d392
movq 0x2dc68(%rip), %rdi     # 0x6afd8
leaq 0x17c9d(%rip), %rsi     # 0x55014
callq 0x4230
movq %rax, %rdi
movq 0x2dc2a(%rip), %rsi     # 0x6afb0
callq 0x4260
xorl %edi, %edi
callq 0x4290
movq 0x60(%rsp), %rdi
callq 0x3be40
movq 0x30(%rsp), %rdi
movq %rax, 0x18(%rsp)
callq 0x3be40
movq %rax, %rcx
movq 0x18(%rsp), %rax
cmpq %rcx, %rax
jne 0x3d3f6
movq 0x60(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3be50
movq %rax, %rdi
callq 0x21e20
movq %rax, 0x10(%rsp)
movq 0x68(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3be50
movq %rax, %rdi
callq 0x21e20
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
je 0x3d41f
movq 0x2dbdb(%rip), %rdi     # 0x6afd8
leaq 0x17c2c(%rip), %rsi     # 0x55030
callq 0x4230
movq %rax, %rdi
movq 0x2db9d(%rip), %rsi     # 0x6afb0
callq 0x4260
xorl %edi, %edi
callq 0x4290
movq 0x58(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
cmpq 0x50(%rsp), %rax
jae 0x3d4bc
movq 0x48(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
cmpq 0x80(%rsp), %rax
jae 0x3d4a7
movq 0x30(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
callq 0x3d4d0
movsd %xmm0, 0x8(%rsp)
movq 0x60(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x3be50
movq %rax, %rdi
movq 0x38(%rsp), %rsi
callq 0x1fd60
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0x3d443
jmp 0x3d4a9
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
jmp 0x3d429
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)
// File: xbai0624[P]dnn/src/Matrix.cpp
// Function: Matrix::_mul_ComputeElement(Matrix&, unsigned long, unsigned long)
double Matrix::_mul_ComputeElement(Matrix &B, size_t r, size_t c)
{
    // compute an element in the result matrix, 
    // B is multiplied to this matrix: AxB = C
    double s = 0;
    for(size_t i=0;i<(*this)[0].size();i++){
        s += (*this)[r][i] * B[i][c];
    }
    return s;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x20(%rsp)
movq $0x0, 0x18(%rsp)
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
xorl %eax, %eax
movl %eax, %esi
callq 0x3be50
movq %rax, %rdi
callq 0x21e20
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
jae 0x3d5a2
movq 0x10(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x3be50
movq %rax, %rdi
movq 0x18(%rsp), %rsi
callq 0x1fd60
movsd (%rax), %xmm0
movsd %xmm0, (%rsp)
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x3be50
movq %rax, %rdi
movq 0x28(%rsp), %rsi
callq 0x1fd60
movsd (%rsp), %xmm0
movsd (%rax), %xmm2
movsd 0x20(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rsp)
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x3d504
movsd 0x20(%rsp), %xmm0
addq $0x48, %rsp
retq
nopl (%rax)
// File: xbai0624[P]dnn/src/Matrix.cpp
// Function: operator<<(std::ostream&, Matrix&)
std::ostream& operator<<(std::ostream &os, Matrix& A)
{
    // overload cout for Matrix
    for(size_t i=0;i<A.size();i++){
        os<<A[i];
    }
    return os;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
callq 0x3be40
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
jae 0x3d6ac
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x3be50
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x3d6c0
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x3d657
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: xbai0624[P]dnn/src/Matrix.cpp
// Function: operator<<(std::ostream&, std::vector<double, std::allocator<double>>&)
std::ostream& operator<<(std::ostream &os, std::vector<double>& A)
{
    // overload cout for vector
    for(size_t i=0;i<A.size();i++){
        os<<std::setfill(' ')<<std::setw(18)<<std::setprecision(6)<<A[i];
    }
    os<<std::endl;
    return os;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq $0x0, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x48(%rsp), %rdi
callq 0x21e20
movq %rax, %rcx
movq 0x28(%rsp), %rax
cmpq %rcx, %rax
jae 0x3d79a
movq 0x50(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x20, %edi
callq 0x3b030
movq 0x8(%rsp), %rdi
movb %al, 0x3f(%rsp)
movzbl 0x3f(%rsp), %esi
callq 0x4350
movq %rax, 0x10(%rsp)
movl $0x12, %edi
callq 0x3b050
movq 0x10(%rsp), %rdi
movl %eax, 0x38(%rsp)
movl 0x38(%rsp), %esi
callq 0x4280
movq %rax, 0x18(%rsp)
movl $0x6, %edi
callq 0x426d0
movq 0x18(%rsp), %rdi
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %esi
callq 0x4360
movq %rax, 0x20(%rsp)
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x1fd60
movq 0x20(%rsp), %rdi
movsd (%rax), %xmm0
callq 0x4440
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
jmp 0x3d6d7
movq 0x50(%rsp), %rdi
movq 0x2d80a(%rip), %rsi     # 0x6afb0
callq 0x4260
movq 0x50(%rsp), %rax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
// File: xbai0624[P]dnn/src/Matrix.cpp
// Function: Matrix::Random()
void Matrix::Random()
{
    // fill with random numbers
    // uniform (0,1) distribution
    //std::cout<<"Filling matrix using flat (0, 1) distribution"<<std::endl;
    std::random_device rd;
    std::mt19937 mt(rd());
    //unsigned int SEED = seed;
    //std::mt19937 mt(SEED);
    //seed = seed + 1;
    std::uniform_real_distribution<double> dist(0, 1.);

    for(size_t i=0;i<__M.size();i++){
        for(size_t j=0;j<__M[0].size();j++){
            __M[i][j] = dist(mt);
        }
    }
    //std::cout<<"Fill finished."<<std::endl;
}

// Assembly:
subq $0x2778, %rsp           # imm = 0x2778
movq %rdi, 0x2770(%rsp)
movq 0x2770(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x13e8(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x21140
movq 0x20(%rsp), %rdi
callq 0x211e0
movl %eax, 0x2c(%rsp)
jmp 0x3d7fe
movl 0x2c(%rsp), %eax
movl %eax, %eax
movl %eax, %esi
leaq 0x60(%rsp), %rdi
callq 0x211f0
jmp 0x3d812
leaq 0x40(%rsp), %rdi
xorps %xmm0, %xmm0
movsd 0x147e6(%rip), %xmm1    # 0x52008
callq 0x426f0
jmp 0x3d829
movq $0x0, 0x38(%rsp)
movq 0x18(%rsp), %rdi
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0x21e80
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
jae 0x3d90a
movq $0x0, 0x30(%rsp)
movq 0x18(%rsp), %rdi
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
xorl %eax, %eax
movl %eax, %esi
callq 0x42670
movq %rax, %rdi
callq 0x21e20
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
jae 0x3d8f5
leaq 0x40(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x42720
movsd %xmm0, (%rsp)
jmp 0x3d8a3
movq 0x18(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x42670
movq %rax, %rdi
movq 0x30(%rsp), %rsi
callq 0x1fd60
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
jmp 0x3d860
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x13e8(%rsp), %rdi
callq 0x21490
jmp 0x3d91f
jmp 0x3d8f7
movq 0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0x3d832
leaq 0x13e8(%rsp), %rdi
callq 0x21490
addq $0x2778, %rsp           # imm = 0x2778
retq
movq 0x58(%rsp), %rdi
callq 0x43f0
nopl (%rax)
// File: xbai0624[P]dnn/src/Matrix.cpp
// Function: Matrix::Random(double, double)
void Matrix::Random(double min, double max)
{
    // fill with random numbers
    // uniform (0,1) distribution
    //std::cout<<"Filling matrix using flat (0, 1) distribution"<<std::endl;
    std::random_device rd;
    std::mt19937 mt(rd());
    //unsigned int SEED = seed;
    //std::mt19937 mt(SEED);
    //seed = seed+1;
    std::uniform_real_distribution<double> dist(min, max);

    for(size_t i=0;i<__M.size();i++){
        for(size_t j=0;j<__M[0].size();j++){
            __M[i][j] = dist(mt);
        }
    }
    //std::cout<<"Fill finished."<<std::endl;
}

// Assembly:
subq $0x2788, %rsp           # imm = 0x2788
movq %rdi, 0x2780(%rsp)
movsd %xmm0, 0x2778(%rsp)
movsd %xmm1, 0x2770(%rsp)
movq 0x2780(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x13e8(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x21140
movq 0x20(%rsp), %rdi
callq 0x211e0
movl %eax, 0x2c(%rsp)
jmp 0x3d980
movl 0x2c(%rsp), %eax
movl %eax, %eax
movl %eax, %esi
leaq 0x60(%rsp), %rdi
callq 0x211f0
jmp 0x3d994
movsd 0x2778(%rsp), %xmm0
movsd 0x2770(%rsp), %xmm1
leaq 0x40(%rsp), %rdi
callq 0x426f0
jmp 0x3d9b2
movq $0x0, 0x38(%rsp)
movq 0x18(%rsp), %rdi
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0x21e80
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
jae 0x3da93
movq $0x0, 0x30(%rsp)
movq 0x18(%rsp), %rdi
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
xorl %eax, %eax
movl %eax, %esi
callq 0x42670
movq %rax, %rdi
callq 0x21e20
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
jae 0x3da7e
leaq 0x40(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x42720
movsd %xmm0, (%rsp)
jmp 0x3da2c
movq 0x18(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x42670
movq %rax, %rdi
movq 0x30(%rsp), %rsi
callq 0x1fd60
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
jmp 0x3d9e9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x13e8(%rsp), %rdi
callq 0x21490
jmp 0x3daa8
jmp 0x3da80
movq 0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0x3d9bb
leaq 0x13e8(%rsp), %rdi
callq 0x21490
addq $0x2788, %rsp           # imm = 0x2788
retq
movq 0x58(%rsp), %rdi
callq 0x43f0
nopw %cs:(%rax,%rax)
// File: xbai0624[P]dnn/src/Matrix.cpp
// Function: Matrix::RandomGaus(double, double)
void Matrix::RandomGaus(double mu, double sigma)
{
    // fill with random numbers
    // uniform (0,1) distribution
    //std::cout<<"Filling matrix using flat (0, 1) distribution"<<std::endl;
    //std::random_device rd;
    //std::mt19937 mt(rd());

    unsigned int SEED = seed;
    std::mt19937 mt(SEED);
    seed = seed + 1;

    std::normal_distribution<double> dist(mu, sigma);
    for(size_t i=0;i<__M.size();i++){
        for(size_t j=0;j<__M[0].size();j++){
            __M[i][j] = dist(mt);
        }
    }
    //std::cout<<"Fill finished."<<std::endl;
}

// Assembly:
subq $0x13f8, %rsp           # imm = 0x13F8
movq %rdi, 0x13f0(%rsp)
movsd %xmm0, 0x13e8(%rsp)
movsd %xmm1, 0x13e0(%rsp)
movq 0x13f0(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x2d753(%rip), %rdi     # 0x6b248
callq 0x42750
movl %eax, 0x13dc(%rsp)
movl 0x13dc(%rsp), %eax
movl %eax, %esi
leaq 0x50(%rsp), %rdi
callq 0x211f0
leaq 0x2d72d(%rip), %rdi     # 0x6b248
callq 0x42750
movl %eax, %esi
addl $0x1, %esi
leaq 0x2d71c(%rip), %rdi     # 0x6b248
callq 0x427f0
movsd 0x13e8(%rsp), %xmm0
movsd 0x13e0(%rsp), %xmm1
leaq 0x30(%rsp), %rdi
callq 0x42890
movq $0x0, 0x28(%rsp)
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0x21e80
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
jae 0x3dc0f
movq $0x0, 0x20(%rsp)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
xorl %eax, %eax
movl %eax, %esi
callq 0x42670
movq %rax, %rdi
callq 0x21e20
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
jae 0x3dbfa
leaq 0x30(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x428e0
movq 0x18(%rsp), %rdi
movsd %xmm0, (%rsp)
movq 0x28(%rsp), %rsi
callq 0x42670
movq %rax, %rdi
movq 0x20(%rsp), %rsi
callq 0x1fd60
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x3db84
jmp 0x3dbfc
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x3db56
addq $0x13f8, %rsp           # imm = 0x13F8
retq
nopw (%rax,%rax)
// File: xbai0624[P]dnn/src/Matrix.cpp
// Function: Matrix::operator()(double (*)(double), unsigned long, unsigned long, unsigned long, unsigned long)
void Matrix::operator()(double(*functor)(double), size_t r1, size_t r2, size_t c1, size_t c2)
{
    // pass a functor, apply to a region of the matrix
    if( (int)r1<0 || r2>(*this).size() || r2 <= r1 || c2 <= c1
            || (int)c1<0 || c2 > (*this)[0].size()
      ) 
        return;

    for(size_t i=r1;i<r2;i++){
        for(size_t j=c1;j<c2;j++){
            (*this)[i][j] = (*functor)( (*this)[i][j] );
        }
    }
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x50(%rsp)
movq %rcx, 0x48(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x38(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x50(%rsp), %rax
cmpl $0x0, %eax
jl 0x3dd36
movq 0x20(%rsp), %rdi
movq 0x48(%rsp), %rax
movq %rax, 0x18(%rsp)
callq 0x3be40
movq %rax, %rcx
movq 0x18(%rsp), %rax
cmpq %rcx, %rax
ja 0x3dd36
movq 0x48(%rsp), %rax
cmpq 0x50(%rsp), %rax
jbe 0x3dd36
movq 0x38(%rsp), %rax
cmpq 0x40(%rsp), %rax
jbe 0x3dd36
movq 0x40(%rsp), %rax
cmpl $0x0, %eax
jl 0x3dd36
movq 0x20(%rsp), %rdi
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
xorl %eax, %eax
movl %eax, %esi
callq 0x3be50
movq %rax, %rdi
callq 0x21e20
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
jbe 0x3dd3b
jmp 0x3ddee
movq 0x50(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
cmpq 0x48(%rsp), %rax
jae 0x3ddee
movq 0x40(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x38(%rsp), %rax
jae 0x3ddd9
movq 0x20(%rsp), %rdi
movq 0x58(%rsp), %rax
movq %rax, (%rsp)
movq 0x30(%rsp), %rsi
callq 0x3be50
movq %rax, %rdi
movq 0x28(%rsp), %rsi
callq 0x1fd60
movq %rax, %rcx
movq (%rsp), %rax
movsd (%rcx), %xmm0
callq *%rax
movq 0x20(%rsp), %rdi
movsd %xmm0, 0x8(%rsp)
movq 0x30(%rsp), %rsi
callq 0x3be50
movq %rax, %rdi
movq 0x28(%rsp), %rsi
callq 0x1fd60
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x3dd5f
jmp 0x3dddb
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
jmp 0x3dd45
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
// File: xbai0624[P]dnn/src/Matrix.cpp
// Function: Matrix::operator==(Matrix&)
bool Matrix::operator==(Matrix &m)
{
    auto dim = m.Dimension();
    if(Dimension() != dim) return false;

    for(size_t i=0;i<dim.first;i++)
        for(size_t j=0;j<dim.second;j++)
        {
            //if(m[i][j] != (*this)[i][j]) return false;
            if(abs(m[i][j] - (*this)[i][j]) > 1.e-6) return false;
        }

    return true;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movq %rsi, 0x50(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x50(%rsp), %rdi
callq 0x3bae0
movq 0x8(%rsp), %rdi
movq %rax, 0x40(%rsp)
movq %rdx, 0x48(%rsp)
callq 0x3bae0
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rcx
callq 0x3b1c0
testb $0x1, %al
jne 0x3de73
jmp 0x3de7d
movb $0x0, 0x67(%rsp)
jmp 0x3df4c
movq $0x0, 0x18(%rsp)
movq 0x18(%rsp), %rax
cmpq 0x40(%rsp), %rax
jae 0x3df47
movq $0x0, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x48(%rsp), %rax
jae 0x3df32
movq 0x50(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x3be50
movq %rax, %rdi
movq 0x10(%rsp), %rsi
callq 0x1fd60
movq 0x8(%rsp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, (%rsp)
movq 0x18(%rsp), %rsi
callq 0x3be50
movq %rax, %rdi
movq 0x10(%rsp), %rsi
callq 0x1fd60
movsd (%rsp), %xmm0
subsd (%rax), %xmm0
cvttsd2si %xmm0, %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cvtsi2sd %eax, %xmm0
movsd 0x16f50(%rip), %xmm1    # 0x54e60
ucomisd %xmm1, %xmm0
jbe 0x3df1d
movb $0x0, 0x67(%rsp)
jmp 0x3df4c
jmp 0x3df1f
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x3de9f
jmp 0x3df34
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x3de86
movb $0x1, 0x67(%rsp)
movb 0x67(%rsp), %al
andb $0x1, %al
addq $0x68, %rsp
retq
nopw (%rax,%rax)
// File: xbai0624[P]dnn/src/Matrix.cpp
// Function: Matrix::Reshape(unsigned long, unsigned long) const
Matrix Matrix::Reshape(size_t m, size_t n) const
{
    // reshape matrix from original (p, q) to (m, n)
    size_t p = this->size();
    size_t q = (*(const_cast<Matrix*>(this)))[0].size();
    size_t T = p*q; // total # of elements

    if(m==0 || n==0 || p==0 || q==0 || T != m*n) {
        std::cout<<"Error: Reshape matrix dimension not match"<<std::endl;
        exit(0);
    }

    Matrix res(m, n);
    for(size_t i=0;i<T;i++){
        size_t new_x = i/n, new_y = i%n;
        size_t old_x = i/q, old_y = i%q;

        res[new_x][new_y] = (*(const_cast<Matrix*>(this)))[old_x][old_y];
    }

    return res;
}

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq %rdx, 0x70(%rsp)
movq %rcx, 0x68(%rsp)
movq 0x78(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x3be40
movq 0x18(%rsp), %rdi
movq %rax, 0x60(%rsp)
xorl %eax, %eax
movl %eax, %esi
callq 0x3be50
movq %rax, %rdi
callq 0x21e20
movq %rax, 0x58(%rsp)
movq 0x60(%rsp), %rax
imulq 0x58(%rsp), %rax
movq %rax, 0x50(%rsp)
cmpq $0x0, 0x70(%rsp)
je 0x3dfff
cmpq $0x0, 0x68(%rsp)
je 0x3dfff
cmpq $0x0, 0x60(%rsp)
je 0x3dfff
cmpq $0x0, 0x58(%rsp)
je 0x3dfff
movq 0x50(%rsp), %rax
movq 0x70(%rsp), %rcx
imulq 0x68(%rsp), %rcx
cmpq %rcx, %rax
je 0x3e028
movq 0x2cfd2(%rip), %rdi     # 0x6afd8
leaq 0x1703c(%rip), %rsi     # 0x55049
callq 0x4230
movq %rax, %rdi
movq 0x2cf94(%rip), %rsi     # 0x6afb0
callq 0x4260
xorl %edi, %edi
callq 0x4290
movq 0x8(%rsp), %rdi
movb $0x0, 0x4f(%rsp)
movq 0x70(%rsp), %rsi
movq 0x68(%rsp), %rdx
callq 0x3b3b0
movq $0x0, 0x40(%rsp)
movq 0x40(%rsp), %rax
cmpq 0x50(%rsp), %rax
jae 0x3e103
movq 0x18(%rsp), %rdi
movq 0x40(%rsp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq 0x68(%rsp)
movq %rax, 0x38(%rsp)
movq 0x40(%rsp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq 0x68(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x40(%rsp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq 0x58(%rsp)
movq %rax, 0x28(%rsp)
movq 0x40(%rsp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq 0x58(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x28(%rsp), %rsi
callq 0x3be50
movq %rax, %rdi
movq 0x20(%rsp), %rsi
callq 0x1fd60
movq 0x8(%rsp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, (%rsp)
movq 0x38(%rsp), %rsi
callq 0x3be50
movq %rax, %rdi
movq 0x30(%rsp), %rsi
callq 0x1fd60
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
jmp 0x3e04a
movb $0x1, 0x4f(%rsp)
testb $0x1, 0x4f(%rsp)
jne 0x3e119
movq 0x8(%rsp), %rdi
callq 0x3bb80
movq 0x10(%rsp), %rax
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)
// File: xbai0624[P]dnn/src/Matrix.cpp
// Function: Matrix::MinInSection(unsigned long, unsigned long, unsigned long, unsigned long)
double Matrix::MinInSection(size_t i_start, size_t i_end, size_t j_start, size_t j_end)
{
    // find max element in section [i_start, i_end), and [j_start, j_end)
    // in this code, we all follow the rule: close front and open end
    // and all counters start from 0
    auto dim = Dimension();
    if((int)i_start < 0 || (int)j_start < 0 || i_end <= i_start || j_end <= j_start || i_end > dim.first || j_end > dim.second){
        std::cout<<"Error: Min in matrix section: exceeded range."<<std::endl;
        exit(0);
    }
    double res = __M[i_start][j_start];
    for(size_t i=i_start;i<i_end;i++){
        for(size_t j=j_start;j<j_end;j++){
            if(res > __M[i][j])
                res = __M[i][j];
        }
    }
    return res;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x50(%rsp)
movq %rcx, 0x48(%rsp)
movq %r8, 0x40(%rsp)
movq 0x60(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x3bae0
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x58(%rsp), %rax
cmpl $0x0, %eax
jl 0x3e74a
movq 0x48(%rsp), %rax
cmpl $0x0, %eax
jl 0x3e74a
movq 0x50(%rsp), %rax
cmpq 0x58(%rsp), %rax
jbe 0x3e74a
movq 0x40(%rsp), %rax
cmpq 0x48(%rsp), %rax
jbe 0x3e74a
movq 0x50(%rsp), %rax
cmpq 0x30(%rsp), %rax
ja 0x3e74a
movq 0x40(%rsp), %rax
cmpq 0x38(%rsp), %rax
jbe 0x3e773
movq 0x2c887(%rip), %rdi     # 0x6afd8
leaq 0x16c03(%rip), %rsi     # 0x5535b
callq 0x4230
movq %rax, %rdi
movq 0x2c849(%rip), %rsi     # 0x6afb0
callq 0x4260
xorl %edi, %edi
callq 0x4290
movq 0x10(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x42670
movq %rax, %rdi
movq 0x48(%rsp), %rsi
callq 0x1fd60
movsd (%rax), %xmm0
movsd %xmm0, 0x28(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x50(%rsp), %rax
jae 0x3e84a
movq 0x48(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
cmpq 0x40(%rsp), %rax
jae 0x3e835
movq 0x10(%rsp), %rdi
movsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x20(%rsp), %rsi
callq 0x42670
movq %rax, %rdi
movq 0x18(%rsp), %rsi
callq 0x1fd60
movsd 0x8(%rsp), %xmm0
ucomisd (%rax), %xmm0
jbe 0x3e823
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x42670
movq %rax, %rdi
movq 0x18(%rsp), %rsi
callq 0x1fd60
movsd (%rax), %xmm0
movsd %xmm0, 0x28(%rsp)
jmp 0x3e825
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x3e7bd
jmp 0x3e837
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x3e7a3
movsd 0x28(%rsp), %xmm0
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)