LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/ConstructLayer.cpp
// Function: ConstructLayer::GetBatchSize()
int ConstructLayer::GetBatchSize()
{
    if( __p_data_interface == nullptr)
    {
        std::cout<<"Error: ConstructLayer::GetBatchSize() data interface is nullptr."
            <<std::endl;
        exit(0);
    }

    int batch_size = __p_data_interface -> GetBatchSize();
    if(batch_size <= 0)
    {
        std::cout<<"Error: ConstructLayer::GetBatchSize() batch size is 0, seems data interface is not implemented."
            <<std::endl;
        exit(0);
    }
    return batch_size;
}

// Assembly:
pushq %rax
movq 0x400(%rdi), %rax
testq %rax, %rax
je 0xea31
movl (%rax), %eax
testl %eax, %eax
jle 0xea41
popq %rcx
retq
movq 0x285a0(%rip), %rdi     # 0x36fd8
leaq 0x19cee(%rip), %rsi     # 0x2872d
jmp 0xea4f
movq 0x28590(%rip), %rdi     # 0x36fd8
leaq 0x19d1f(%rip), %rsi     # 0x2876e
callq 0x4260
movq %rax, %rdi
callq 0x4100
xorl %edi, %edi
callq 0x4290
nop
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/ConstructLayer.cpp
// Function: ConstructLayer::GetCostFuncType()
CostFuncType ConstructLayer::GetCostFuncType()
{
    if(__type != LayerType::output)
    {
        std::cout<<"Error: ConstructLayer::GetCostFuncType() only works for output layer"
            <<std::endl;
        exit(0);
    }
    return __cost_func_type;
}

// Assembly:
cmpl $0x4, 0xc(%rdi)
jne 0xea71
movl 0x3e8(%rdi), %eax
retq
pushq %rax
movq 0x2855f(%rip), %rdi     # 0x36fd8
leaq 0x19d4e(%rip), %rsi     # 0x287ce
callq 0x4260
movq %rax, %rdi
callq 0x4100
xorl %edi, %edi
callq 0x4290
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/ConstructLayer.cpp
// Function: ConstructLayer::GetDataInterface()
DataInterface * ConstructLayer::GetDataInterface()
{
    if(__p_data_interface == nullptr)
    {
        std::cout<<"Error: ConstructLayer::GetDataInterface() data interface is nullptr."
            <<std::endl;
        exit(0);
    }
    return __p_data_interface;
}

// Assembly:
movq 0x400(%rdi), %rax
testq %rax, %rax
je 0xeaa5
retq
pushq %rax
movq 0x2852b(%rip), %rdi     # 0x36fd8
leaq 0x19d5f(%rip), %rsi     # 0x28813
callq 0x4260
movq %rax, %rdi
callq 0x4100
xorl %edi, %edi
callq 0x4290
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/ConstructLayer.cpp
// Function: ConstructLayer::GetNextLayer()
Layer* ConstructLayer::GetNextLayer()
{
    if(__nextLayer == nullptr)
    {
        std::cout<<"Error: ConstructLayer::GetNextLayer(): __nextLayer is not setup"
            <<std::endl;
        exit(0);
    }
    return __nextLayer;
}

// Assembly:
movq 0x3f8(%rdi), %rax
testq %rax, %rax
je 0xead5
retq
pushq %rax
movq 0x284fb(%rip), %rdi     # 0x36fd8
leaq 0x19d74(%rip), %rsi     # 0x28858
callq 0x4260
movq %rax, %rdi
callq 0x4100
xorl %edi, %edi
callq 0x4290
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/ConstructLayer.cpp
// Function: ConstructLayer::GetPrevLayer()
Layer* ConstructLayer::GetPrevLayer()
{
    if(__prevLayer == nullptr)
    {
        std::cout<<"Error: ConstructLayer::GetNextLayer(): __prevLayer is not setup"
            <<std::endl;
        exit(0);
    }

    return __prevLayer;
}

// Assembly:
movq 0x3f0(%rdi), %rax
testq %rax, %rax
je 0xeb05
retq
pushq %rax
movq 0x284cb(%rip), %rdi     # 0x36fd8
leaq 0x19d84(%rip), %rsi     # 0x28898
callq 0x4260
movq %rax, %rdi
callq 0x4100
xorl %edi, %edi
callq 0x4290
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/ConstructLayer.cpp
// Function: ConstructLayer::UpdateWeightsAndBias()
void ConstructLayer::UpdateWeightsAndBias()
{
    // after finishing one training batch, update weights and bias

    // 1) first update w&b graidents
    UpdateWeightsAndBiasGradients();

    // 2) then update weights and bias
    auto layerType = this->GetType();

    if(layerType == LayerType::fullyConnected || layerType == LayerType::output)  // output is also a fc layer
    {
        UpdateWeightsAndBiasFC();
    }
    else if(layerType == LayerType::cnn) 
    {
        UpdateWeightsAndBiasCNN();
    }
    else if(layerType == LayerType::pooling) 
    {
        UpdateWeightsAndBiasPooling();
    }
    else 
    {
        std::cout<<__func__<<" Error: update weights and bias, unsupported layer type."<<std::endl;
        exit(0);
    }

    // 3) if use batch normalization, update \gamma and \beta
    if(__use_batch_normalization)
        BatchNormalization_UpdateGammaBeta();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0xeba6
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x250(%rax)
testl $0xfffffffb, %eax       # imm = 0xFFFFFFFB
je 0xeb58
cmpl $0x2, %eax
je 0xeb60
cmpl $0x1, %eax
jne 0xeb74
movq %rbx, %rdi
callq 0xf78c
jmp 0xeb60
movq %rbx, %rdi
callq 0xec0a
cmpb $0x1, 0x210(%rbx)
jne 0xeb72
movq %rbx, %rdi
popq %rbx
jmp 0xff74
popq %rbx
retq
movq 0x2845d(%rip), %rdi     # 0x36fd8
leaq 0x19d56(%rip), %rsi     # 0x288d8
callq 0x4260
leaq 0x19d5f(%rip), %rsi     # 0x288ed
movq %rax, %rdi
callq 0x4260
movq %rax, %rdi
callq 0x4100
xorl %edi, %edi
callq 0x4290
nop
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/ConstructLayer.cpp
// Function: ConstructLayer::UpdateWeightsAndBiasGradients()
void ConstructLayer::UpdateWeightsAndBiasGradients()
{
    // after finishing one training batch, update weights and bias gradients
    auto layerType = this->GetType();

    if(layerType == LayerType::fullyConnected || layerType == LayerType::output)  // output is also a fully connected layer
    {
        UpdateWeightsAndBiasGradientsFC();
    }
    else if(layerType == LayerType::cnn) 
    {
        UpdateWeightsAndBiasGradientsCNN();
    }
    else if(layerType == LayerType::pooling) 
    {
        UpdateWeightsAndBiasGradientsPooling();
    }
    else 
    {
        std::cout<<__func__<<" Error: update weights and bias gradients, unsupported layer type."<<std::endl;
        exit(0);
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x250(%rax)
testl $0xfffffffb, %eax       # imm = 0xFFFFFFFB
je 0xebcd
cmpl $0x2, %eax
je 0xebd6
cmpl $0x1, %eax
jne 0xebd8
movq %rbx, %rdi
popq %rbx
jmp 0x106c4
movq %rbx, %rdi
popq %rbx
jmp 0x101d6
popq %rbx
retq
movq 0x283f9(%rip), %rdi     # 0x36fd8
leaq 0x19d40(%rip), %rsi     # 0x28926
callq 0x4260
leaq 0x19d52(%rip), %rsi     # 0x28944
movq %rax, %rdi
callq 0x4260
movq %rax, %rdi
callq 0x4100
xorl %edi, %edi
callq 0x4290
nop
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/ConstructLayer.cpp
// Function: ConstructLayer::GetNumberOfNeurons()
int ConstructLayer::GetNumberOfNeurons()
{
    if(__type == LayerType::fullyConnected || __type == LayerType::output ) // output layer is also a fully connected layer
    {
        // used for setup fc layer
        return __n_neurons_fc;
    }
    else if(__type == LayerType::input)
    {
        auto dim = __neurons[0].Dimension();
        return static_cast<int>((dim.first * dim.second));
    }
    else if(__type == LayerType::cnn || __type == LayerType::pooling)
    {
        auto dim = GetOutputImageSize();
        return static_cast<int>((dim.first * dim.second * __n_kernels_cnn));
    }
    else
    {
        std::cout<<"Warning: GetNumberOfNeurons only work for fc and input layer."<<std::endl;
        return 0;
    }
}

// Assembly:
pushq %rbx
movl 0xc(%rdi), %eax
cmpq $0x4, %rax
ja 0x110ce
movq %rdi, %rbx
leaq 0x160c2(%rip), %rcx     # 0x27140
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x10(%rbx), %eax
jmp 0x11112
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x270(%rax)
imull %edx, %eax
imull 0x18(%rbx), %eax
jmp 0x11112
movq 0x40(%rbx), %rax
movq (%rax), %rcx
movq 0x8(%rax), %rax
subq %rcx, %rax
je 0x11110
movq 0x8(%rcx), %rdx
subq (%rcx), %rdx
shrq $0x3, %rax
shrq $0x3, %rdx
imull %eax, %edx
imull $0xaaaaaaab, %edx, %eax # imm = 0xAAAAAAAB
jmp 0x11112
movq 0x25f03(%rip), %rbx     # 0x36fd8
leaq 0x17f3e(%rip), %rsi     # 0x2901a
movl $0x3d, %edx
movq %rbx, %rdi
callq 0x4280
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4190
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/./include/Layer.h
// Function: Images::Vectorization() const
Images Vectorization() const
    {
        // combine outputs from all kernels into a one-collum matrix
        // this is for feedforward from 2D layer to 1D layer 
        //     (2D layer can have multiple kernels, 1D layer should only have 1 "kernel");
        assert(OutputImageFromKernel.size() > 0);
        auto dim = OutputImageFromKernel[0].Dimension();

        Images tmp = ReshapeKernels(dim.first*dim.second, 1);
        Matrix large_vector = Matrix::ConcatenateMatrixByI(tmp.OutputImageFromKernel);

        tmp.OutputImageFromKernel.clear();
        tmp.OutputImageFromKernel.push_back(large_vector);
        return tmp;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq (%rsi), %rdi
cmpq %rdi, 0x8(%rsi)
je 0x14478
movq %rsi, %r14
callq 0x1ac7c
imulq %rax, %rdx
movl $0x1, %ecx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x15bac
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x1d17e
movq (%rbx), %r15
movq 0x8(%rbx), %r12
cmpq %r15, %r12
je 0x14456
movq %r15, %r14
movq %r14, %rdi
callq 0x1acb6
addq $0x18, %r14
cmpq %r12, %r14
jne 0x14441
movq %r15, 0x8(%rbx)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x13a14
movq %rsp, %rdi
callq 0x1acb6
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x155a9(%rip), %rdi     # 0x29a28
leaq 0x151dc(%rip), %rsi     # 0x29662
leaq 0x155bc(%rip), %rcx     # 0x29a49
movl $0x159, %edx            # imm = 0x159
callq 0x4160
movq %rax, %r14
movq %rsp, %rdi
callq 0x1acb6
jmp 0x144a7
movq %rax, %r14
movq %rbx, %rdi
callq 0x136aa
movq %r14, %rdi
callq 0x43e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/DataInterface.cpp
// Function: DataInterface::DataInterface(LayerDimension)
DataInterface::DataInterface(LayerDimension ld)
{
    // 1)
    __gLayerDimension = ld;
    // place holder
    // currently only accepts 2D image format
    test();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %r14
movq $0x64, (%rdi)
movl $0x0, 0x8(%rdi)
leaq 0x10(%rdi), %rbx
movl $0xb0, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4140
movl %ebp, 0xc0(%r14)
movq %r14, %rdi
callq 0x19100
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
leaq 0xa8(%r14), %rdi
leaq 0x90(%r14), %r12
leaq 0x58(%r14), %r13
leaq 0x40(%r14), %rbp
addq $0x28, %r14
callq 0x136aa
movq %r12, %rdi
callq 0x136aa
movq %r13, %rdi
callq 0x136e4
movq %rbp, %rdi
callq 0x136e4
movq %r14, %rdi
callq 0x136aa
movq %rbx, %rdi
callq 0x136aa
movq %r15, %rdi
callq 0x43e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/DataInterface.cpp
// Function: DataInterface::test()
void DataInterface::test()
{
    // only one image
    Matrix image(std::pair<int, int>(10, 10), 1);
    //std::cout<<"input image: "<<std::endl<<image<<std::endl;

    Matrix image2 = image.Reshape(100, 1);
    //std::cout<<"input image: "<<std::endl<<image2<<std::endl;


    __data.push_back(image2);

    // label for this image
    Matrix label1(std::pair<int, int>(10, 1), 0);
    label1[0][0] = 1.;
    __label.push_back(label1);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x30(%rsp), %r14
movsd 0xe469(%rip), %xmm0     # 0x27580
movl $0xa, %esi
movl $0xa, %edx
movq %r14, %rdi
callq 0x1a9ec
leaq 0x18(%rsp), %rdi
movl $0x64, %edx
movl $0x1, %ecx
movq %r14, %rsi
callq 0x1c1c4
leaq 0x10(%rbx), %rdi
leaq 0x18(%rsp), %rsi
callq 0x13a14
movq %rsp, %rdi
movl $0xa, %esi
movl $0x1, %edx
xorps %xmm0, %xmm0
callq 0x1a9ec
movq %rsp, %rdi
xorl %esi, %esi
callq 0x1ae76
movq (%rax), %rax
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, (%rax)
addq $0x28, %rbx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x13a14
movq %rsp, %rdi
callq 0x1acb6
leaq 0x18(%rsp), %rdi
callq 0x1acb6
leaq 0x30(%rsp), %rdi
callq 0x1acb6
addq $0x48, %rsp
popq %rbx
popq %r14
retq
jmp 0x191b2
movq %rax, %rbx
jmp 0x191c7
movq %rax, %rbx
jmp 0x191d1
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1acb6
leaq 0x18(%rsp), %rdi
callq 0x1acb6
leaq 0x30(%rsp), %rdi
callq 0x1acb6
movq %rbx, %rdi
callq 0x43e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/DataInterface.cpp
// Function: DataInterface::DataInterface(char const*, char const*, LayerDimension)
DataInterface::DataInterface(const char* p_signal, const char* p_cosmic, LayerDimension ld)
{
    // 1) first need to set layer dimension
    __gLayerDimension = ld;

    // 2) then load data to memory
    // for code development
    loadFile(p_signal, test_training_signal);
    loadFile(p_cosmic, test_training_cosmic);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %r14
movq $0x64, (%rdi)
movl $0x0, 0x8(%rdi)
addq $0x10, %rdi
leaq 0x90(%r14), %r15
leaq 0xa8(%r14), %r12
movl $0xb0, %edx
movq %rdi, (%rsp)
xorl %esi, %esi
callq 0x4140
movl %ebp, 0xc0(%r14)
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x192a4
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x192a4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x58(%r14), %r13
leaq 0x40(%r14), %rbp
addq $0x28, %r14
movq %r12, %rdi
callq 0x136aa
movq %r15, %rdi
callq 0x136aa
movq %r13, %rdi
callq 0x136e4
movq %rbp, %rdi
callq 0x136e4
movq %r14, %rdi
callq 0x136aa
movq (%rsp), %rdi
callq 0x136aa
movq %rbx, %rdi
callq 0x43e0
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/DataInterface.cpp
// Function: DataInterface::DataInterface(char const*, char const*, LayerDimension, std::pair<int, int>, int)
DataInterface::DataInterface(const char* p_signal, const char* p_cosmic, LayerDimension ld, std::pair<int, int> dim, int batch_size)
{
    // 1) first need to set layer dimension
    __gLayerDimension = ld;

    // set data dimension
    gBatchSize = batch_size;
    __dataDimensionFromParameter.first = dim.first;
    __dataDimensionFromParameter.second = dim.second;

    // 2) then load data to memory
    // for code development
    loadFile(p_signal, test_training_signal);
    loadFile(p_cosmic, test_training_cosmic);

    //cout<<"data dimension from parameter: "<<__dataDimensionFromParameter<<endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %r12d
movq %r8, %rbx
movl %ecx, %r15d
movq %rdx, 0x8(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdi, %r14
movq $0x64, (%rdi)
movl $0x0, 0x8(%rdi)
addq $0x10, %rdi
leaq 0x90(%r14), %rbp
leaq 0xa8(%r14), %r13
movl $0xb0, %edx
movq %rdi, (%rsp)
xorl %esi, %esi
callq 0x4140
movl %r15d, 0xc0(%r14)
movl %r12d, (%r14)
movslq %ebx, %rax
movq %rax, 0x80(%r14)
sarq $0x20, %rbx
movq %rbx, 0x88(%r14)
movq %r14, %rdi
movq 0x10(%rsp), %rsi
movq %rbp, %rdx
callq 0x192a4
movq %r14, %rdi
movq 0x8(%rsp), %rsi
movq %r13, %rdx
callq 0x192a4
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x58(%r14), %r15
leaq 0x40(%r14), %r12
addq $0x28, %r14
movq %r13, %rdi
callq 0x136aa
movq %rbp, %rdi
callq 0x136aa
movq %r15, %rdi
callq 0x136e4
movq %r12, %rdi
callq 0x136e4
movq %r14, %rdi
callq 0x136aa
movq (%rsp), %rdi
callq 0x136aa
movq %rbx, %rdi
callq 0x43e0
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/DataInterface.cpp
// Function: DataInterface::GetNewBatchLabel()
std::vector<Matrix>& DataInterface::GetNewBatchLabel()
{
    if(gLabelIndex + 1 != gDataIndex) // this is to make sure one access data first, then label
    {
        cout<<"Error: DataInterface data & label are not aligned."<<endl;
        exit(0);
    }
    gLabelIndex++;

    return __label;
}

// Assembly:
movl 0x8(%rdi), %eax
incl %eax
cmpl 0x4(%rdi), %eax
jne 0x19c89
movl %eax, 0x8(%rdi)
addq $0x28, %rdi
movq %rdi, %rax
retq
pushq %rax
movq 0x1d347(%rip), %rdi     # 0x36fd8
leaq 0xffae(%rip), %rsi      # 0x29c46
callq 0x4260
movq %rax, %rdi
callq 0x4100
xorl %edi, %edi
callq 0x4290
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/DataInterface.cpp
// Function: DataInterface::GetNewBatchDataImage()
std::vector<Images>& DataInterface::GetNewBatchDataImage()
{
    // return data in Images form

    // 1) update batch
    UpdateBatch(__data, __label);
    assert(__data.size() == __label.size());

    // 2) reform
    for(size_t i=0;i<__data.size();i++)
    {
        // reform it in Images format
        Images _image;
        _image.OutputImageFromKernel.push_back(__data[i]);
        __data_image.push_back(_image);

        Images _image_label;
        _image_label.OutputImageFromKernel.push_back(__label[i]);
        __label_image.push_back(_image_label);
    }

    return __data_image;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %rsi
leaq 0x28(%rdi), %rdx
movq %rdx, 0x8(%rsp)
callq 0x1995e
movq 0x18(%rbx), %rax
subq 0x10(%rbx), %rax
movq 0x30(%rbx), %rcx
subq 0x28(%rbx), %rcx
cmpq %rcx, %rax
jne 0x19dbc
movq 0x10(%rbx), %rsi
cmpq %rsi, 0x18(%rbx)
je 0x19da6
leaq 0x40(%rbx), %rax
movq %rax, (%rsp)
leaq 0x58(%rbx), %r12
xorl %r14d, %r14d
leaq 0x30(%rsp), %r13
leaq 0x10(%rsp), %rbp
xorl %r15d, %r15d
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
addq %r14, %rsi
movq %r13, %rdi
callq 0x13a14
movq (%rsp), %rdi
movq %r13, %rsi
callq 0x13a74
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x8(%rsp), %rax
movq (%rax), %rsi
addq %r14, %rsi
movq %rbp, %rdi
callq 0x13a14
movq %r12, %rdi
movq %rbp, %rsi
callq 0x13a74
movq %rbp, %rdi
callq 0x136aa
movq %r13, %rdi
callq 0x136aa
incq %r15
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rax
subq %rsi, %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
addq $0x18, %r14
cmpq %rax, %r15
jb 0x19d12
addq $0x40, %rbx
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xfeb6(%rip), %rdi      # 0x29c79
leaq 0xfe3e(%rip), %rsi      # 0x29c08
leaq 0xfec8(%rip), %rcx      # 0x29c99
movl $0x76, %edx
callq 0x4160
movq %rax, %rbx
jmp 0x19ded
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x136aa
leaq 0x30(%rsp), %rdi
callq 0x136aa
movq %rbx, %rdi
callq 0x43e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/DataInterface.cpp
// Function: DataInterface::GetNewBatchLabelImage()
std::vector<Images>& DataInterface::GetNewBatchLabelImage()
{
    if(gLabelIndex + 1 != gDataIndex) // this is to make sure one access data first, then label
    {
        cout<<"Error: DataInterface data & label are not aligned."<<endl;
        exit(0);
    }
    gLabelIndex++;

    return __label_image;
}

// Assembly:
movl 0x8(%rdi), %eax
incl %eax
cmpl 0x4(%rdi), %eax
jne 0x19e15
movl %eax, 0x8(%rdi)
addq $0x58, %rdi
movq %rdi, %rax
retq
pushq %rax
movq 0x1d1bb(%rip), %rdi     # 0x36fd8
leaq 0xfe22(%rip), %rsi      # 0x29c46
callq 0x4260
movq %rax, %rdi
callq 0x4100
xorl %edi, %edi
callq 0x4290
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/Layer.cpp
// Function: operator<<(std::ostream&, LayerType const&)
std::ostream & operator<<(std::ostream &os, const LayerType &t)
{
    if(t == LayerType::fullyConnected)
        os<<"____layer_type=fully_connected____";
    else if(t == LayerType::cnn)
        os<<"____layer_type=cnn____";
    else if(t == LayerType::pooling)
        os<<"____layer_type=pooling____";
    else if(t == LayerType::input)
        os<<"____layer_type=input____";
    else if(t == LayerType::output)
        os<<"____layer_type=output____";
    else if(t == LayerType::Undefined)
        os<<"____layer_type=undefined____";
    return os;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl (%rsi), %eax
cmpq $0x5, %rax
ja 0x1a19a
leaq 0xfcfd(%rip), %rcx      # 0x29e34
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xfd1c(%rip), %rsi      # 0x29e63
movl $0x22, %edx
jmp 0x1a192
leaq 0xfd7c(%rip), %rsi      # 0x29ed1
movl $0x19, %edx
jmp 0x1a192
leaq 0xfd3a(%rip), %rsi      # 0x29e9d
movl $0x1a, %edx
jmp 0x1a192
leaq 0xfd47(%rip), %rsi      # 0x29eb8
movl $0x18, %edx
jmp 0x1a192
leaq 0xfd07(%rip), %rsi      # 0x29e86
movl $0x16, %edx
jmp 0x1a192
leaq 0xfd5e(%rip), %rsi      # 0x29eeb
movl $0x1c, %edx
movq %rbx, %rdi
callq 0x4280
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %rbx
movq %rdi, %rbx
movl (%rsi), %eax
cmpq $0x3, %rax
ja 0x1a1e9
leaq 0xfc9a(%rip), %rcx      # 0x29e4c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xfd46(%rip), %rsi      # 0x29f08
jmp 0x1a1e2
leaq 0xfd6b(%rip), %rsi      # 0x29f36
jmp 0x1a1d4
leaq 0xfd76(%rip), %rsi      # 0x29f4a
movl $0x13, %edx
jmp 0x1a1f5
leaq 0xfd3d(%rip), %rsi      # 0x29f1f
movl $0x16, %edx
jmp 0x1a1f5
leaq 0xfd6e(%rip), %rsi      # 0x29f5e
movl $0x18, %edx
movq %rbx, %rdi
callq 0x4280
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %rbx
movq %rdi, %rbx
movl (%rsi), %eax
cmpl $0x2, %eax
je 0x1a22d
cmpl $0x1, %eax
je 0x1a21f
testl %eax, %eax
jne 0x1a241
leaq 0xfd5a(%rip), %rsi      # 0x29f77
jmp 0x1a226
leaq 0xfd68(%rip), %rsi      # 0x29f8e
movl $0x16, %edx
jmp 0x1a239
leaq 0xfd71(%rip), %rsi      # 0x29fa5
movl $0x1c, %edx
movq %rbx, %rdi
callq 0x4280
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rsi), %rax
cmpq (%rsi), %rax
je 0x1a3af
movq %rsi, %r14
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
xorl %ecx, %ecx
leaq 0x3f(%rax), %rbp
movq (%r14), %rax
movq %rcx, (%rsp)
leaq (%rcx,%rcx,4), %rcx
movq 0x10(%rax,%rcx,8), %rdx
movl 0x18(%rax,%rcx,8), %esi
subq (%rax,%rcx,8), %rdx
shlq $0x3, %rdx
addq %rsi, %rdx
je 0x1a35f
movq (%rsp), %rax
leaq (,%rax,8), %rax
leaq (%rax,%rax,4), %r12
xorl %r13d, %r13d
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %r15
cmpb $0x0, 0xe1(%rbx,%rax)
jne 0x1a2dd
movq %r15, %rdi
movl $0x20, %esi
callq 0x4250
movb %al, 0xe0(%r15)
movb $0x1, 0xe1(%r15)
movb $0x20, 0xe0(%r15)
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq $0x4, 0x10(%rbx,%rax)
movq (%r14), %rax
leaq 0x3f(%r13), %rcx
testq %r13, %r13
cmovnsq %r13, %rcx
sarq $0x6, %rcx
shlq $0x3, %rcx
addq (%rax,%r12), %rcx
movq %r13, %rax
andq %rbp, %rax
xorl %edx, %edx
movabsq $-0x8000000000000000, %rsi # imm = 0x8000000000000000
cmpq %rsi, %rax
setbe %dl
movq -0x8(%rcx,%rdx,8), %rax
xorl %esi, %esi
btq %r13, %rax
setb %sil
movq %rbx, %rdi
callq 0x4370
incq %r13
movq (%r14), %rax
movq 0x10(%rax,%r12), %rcx
movl 0x18(%rax,%r12), %edx
subq (%rax,%r12), %rcx
leaq (%rdx,%rcx,8), %rax
cmpq %rax, %r13
jb 0x1a2ac
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4190
movq 0x8(%r14), %rax
subq (%r14), %rax
movq (%rsp), %rcx
incq %rcx
sarq $0x3, %rax
movabsq $-0x3333333333333333, %rdx # imm = 0xCCCCCCCCCCCCCCCD
imulq %rdx, %rax
cmpq %rax, %rcx
jb 0x1a274
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
movq -0x18(%rax), %rax
leaq (%rdi,%rax), %r15
cmpb $0x0, 0xe1(%rdi,%rax)
jne 0x1a400
movq %r15, %rdi
movl $0x20, %esi
callq 0x4250
movb %al, 0xe0(%r15)
movb $0x1, 0xe1(%r15)
movb $0x20, 0xe0(%r15)
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq $0x4, 0x10(%rbx,%rax)
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x4180
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rax
leaq (%r15,%rax), %r12
cmpb $0x0, 0xe1(%r15,%rax)
jne 0x1a45a
movq %r12, %rdi
movl $0x20, %esi
callq 0x4250
movb %al, 0xe0(%r12)
movb $0x1, 0xe1(%r12)
movb $0x20, 0xe0(%r12)
movq (%r15), %rax
movq -0x18(%rax), %rax
movq $0x4, 0x10(%r15,%rax)
movq 0x8(%r14), %rsi
movq %r15, %rdi
callq 0x4180
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rax
leaq (%r15,%rax), %r12
cmpb $0x0, 0xe1(%r15,%rax)
jne 0x1a4b6
movq %r12, %rdi
movl $0x20, %esi
callq 0x4250
movb %al, 0xe0(%r12)
movb $0x1, 0xe1(%r12)
movb $0x20, 0xe0(%r12)
movq (%r15), %rax
movq -0x18(%rax), %rax
movq $0x4, 0x10(%r15,%rax)
movq 0x10(%r14), %rsi
movq %r15, %rdi
callq 0x4180
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq %r14, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4190
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xfa93(%rip), %rsi      # 0x29fc2
movl $0x33, %edx
callq 0x4280
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4190
movq 0x8(%r14), %rax
cmpq (%r14), %rax
je 0x1a633
xorl %r15d, %r15d
movq %rsp, %r12
xorl %r13d, %r13d
movl $0x8, %edx
movq %rbx, %rdi
leaq 0x113c7(%rip), %rsi     # 0x2b94c
callq 0x4280
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4180
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq %rbp, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4190
movq (%r14), %rsi
addq %r15, %rsi
movq %r12, %rdi
callq 0x1aafe
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1bb59
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq %rbp, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4190
movq %r12, %rdi
callq 0x1acb6
incq %r13
movq 0x8(%r14), %rax
subq (%r14), %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
addq $0x18, %r15
cmpq %rax, %r13
jb 0x1a576
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1acb6
movq %rbx, %rdi
callq 0x43e0
// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
movq -0x18(%rax), %rax
leaq (%rdi,%rax), %r15
cmpb $0x0, 0xe1(%rdi,%rax)
jne 0x1a6d9
movq %r15, %rdi
movl $0x20, %esi
callq 0x4250
movb %al, 0xe0(%r15)
movb $0x1, 0xe1(%r15)
movb $0x20, 0xe0(%r15)
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq $0x6, 0x10(%rbx,%rax)
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x4180
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rax
leaq (%r15,%rax), %r12
cmpb $0x0, 0xe1(%r15,%rax)
jne 0x1a733
movq %r12, %rdi
movl $0x20, %esi
callq 0x4250
movb %al, 0xe0(%r12)
movb $0x1, 0xe1(%r12)
movb $0x20, 0xe0(%r12)
movq (%r15), %rax
movq -0x18(%rax), %rax
movq $0x6, 0x10(%r15,%rax)
movq 0x8(%r14), %rsi
movq %r15, %rdi
callq 0x4180
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq %r14, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4190
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %r12
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movq (%rsi), %rbx
movq %rsi, 0x18(%rsp)
movq 0x8(%rsi), %r15
movq (%rbx), %rbp
movq 0x8(%rbx), %r13
movq %r13, %r14
subq %rbp, %r14
movq %r14, 0x30(%rsp)
sarq $0x3, %r14
callq 0x1e9ea
leaq 0x50(%rsp), %rdx
xorl %eax, %eax
movq %rax, (%rdx)
leaq 0x38(%rsp), %rdi
leaq 0xf(%rsp), %rcx
movq %r14, %rsi
movq %r12, 0x10(%rsp)
callq 0x1eab0
movq %r15, 0x20(%rsp)
subq %rbx, %r15
movq %r15, 0x28(%rsp)
movq %r15, %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %r15 # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %r15
leaq 0x38(%rsp), %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x1ea2c
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x1aba4
callq 0x4230
cmpq %rbx, 0x20(%rsp)
movq 0x10(%rsp), %r9
je 0x1ac05
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq (%r9), %rcx
cmpq $0x1, %r14
adcq $0x0, %r14
cmpq $0x1, %r15
adcq $0x0, %r15
xorl %edx, %edx
cmpq %rbp, %r13
je 0x1abfd
leaq (,%rdx,8), %rsi
leaq (%rsi,%rsi,2), %rdi
movq (%rax,%rdi), %rsi
movq (%rcx,%rdi), %rdi
xorl %r8d, %r8d
movsd (%rsi,%r8,8), %xmm0
movsd %xmm0, (%rdi,%r8,8)
incq %r8
cmpq %r8, %r14
jne 0x1abe9
incq %rdx
cmpq %r15, %rdx
jne 0x1abcd
movq (%r9), %rax
movq 0x8(%r9), %rcx
subq %rax, %rcx
cmpq 0x28(%rsp), %rcx
jne 0x1ac33
movq 0x8(%rax), %rcx
subq (%rax), %rcx
cmpq 0x30(%rsp), %rcx
jne 0x1ac33
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xf3ea(%rip), %rdi      # 0x2a024
leaq 0xf3f6(%rip), %rsi      # 0x2a037
leaq 0xf3fe(%rip), %rcx      # 0x2a046
movl $0x85, %edx
callq 0x4160
movq %rax, %r14
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x1ac69
callq 0x4230
jmp 0x1ac69
movq %rax, %r14
movq 0x10(%rsp), %rdi
callq 0x146b8
movq %r14, %rdi
callq 0x43e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/Matrix.cpp
// Function: Matrix::operator*(Matrix&)
Matrix Matrix::operator*(Matrix &B)
{
    // matrix multiply operation *: A*B = C
    if(this->size() == 0 || B.size() == 0) {
        std::cout<<__func__<<" Error: 0 Matrix."<<std::endl;
        std::cout<<"    "<<this->size()<<" rows in left Matrix [times] "<<B.size()<<" rows in right Matrix."<<std::endl;
        exit(0);
    }

    if((*this)[0].size() != B.size() ) {
        std::cout<<__func__<<" Error: Matrix not match."<<std::endl;
        std::cout<<"    "<<(*this)[0].size()<<" collums in left Matrix [times] "<<B.size()<<" rows in right Matrix."<<std::endl;
        exit(0);
    }

    Matrix _r((*this).size(), B[0].size());

    _mul_Multiply(B, _r);

    return _r;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq (%rsi), %rcx
movq 0x8(%rsi), %rsi
movabsq $-0x5555555555555555, %r12 # imm = 0xAAAAAAAAAAAAAAAB
subq %rcx, %rsi
je 0x1ad4f
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
subq %rax, %rdx
je 0x1ad4f
movq %rdi, %r15
sarq $0x3, %rdx
imulq %r12, %rdx
movq 0x8(%rcx), %rdi
subq (%rcx), %rdi
sarq $0x3, %rdi
cmpq %rdx, %rdi
jne 0x1adab
sarq $0x3, %rsi
imulq %r12, %rsi
movq 0x8(%rax), %rdx
subq (%rax), %rdx
sarq $0x3, %rdx
movq %r15, %rdi
callq 0x1a82e
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1ae82
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x1c282(%rip), %r15     # 0x36fd8
leaq 0xf308(%rip), %rsi      # 0x2a065
movq %r15, %rdi
callq 0x4260
leaq 0xf303(%rip), %rsi      # 0x2a06f
movq %rax, %rdi
callq 0x4260
movq %rax, %rdi
callq 0x4100
leaq 0x10203(%rip), %rsi     # 0x2af86
movq %r15, %rdi
callq 0x4260
movq 0x8(%r14), %rsi
subq (%r14), %rsi
sarq $0x3, %rsi
imulq %r12, %rsi
movq %rax, %rdi
callq 0x4090
leaq 0xf2d8(%rip), %rsi      # 0x2a081
jmp 0x1ae04
movq 0x1c226(%rip), %r15     # 0x36fd8
leaq 0xf2ac(%rip), %rsi      # 0x2a065
movq %r15, %rdi
callq 0x4260
leaq 0xf2ee(%rip), %rsi      # 0x2a0b6
movq %rax, %rdi
callq 0x4260
movq %rax, %rdi
callq 0x4100
leaq 0x101a7(%rip), %rsi     # 0x2af86
movq %r15, %rdi
callq 0x4260
movq (%r14), %rcx
movq 0x8(%rcx), %rsi
subq (%rcx), %rsi
sarq $0x3, %rsi
movq %rax, %rdi
callq 0x4090
leaq 0xf2cc(%rip), %rsi      # 0x2a0d0
movq %rax, %rdi
callq 0x4260
movq 0x8(%rbx), %rsi
subq (%rbx), %rsi
sarq $0x3, %rsi
imulq %r12, %rsi
movq %rax, %rdi
callq 0x4090
leaq 0xf275(%rip), %rsi      # 0x2a09f
movq %rax, %rdi
callq 0x4260
movq %rax, %rdi
callq 0x4100
xorl %edi, %edi
callq 0x4290
movq %rax, %rbx
movq %r15, %rdi
callq 0x1e9ea
movq %r15, %rdi
callq 0x146b8
movq %rbx, %rdi
callq 0x43e0
// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %rax
movq (%rdx), %rcx
movq 0x8(%rdx), %r8
subq %rcx, %r8
movq 0x8(%rdi), %rax
subq (%rdi), %rax
cmpq %rax, %r8
jne 0x1aed5
movq 0x8(%rcx), %r8
subq (%rcx), %r8
movq (%rsi), %r9
movq 0x8(%r9), %rcx
subq (%r9), %rcx
cmpq %rcx, %r8
jne 0x1aed5
sarq $0x3, %rcx
sarq $0x3, %rax
movabsq $-0x5555555555555555, %r8 # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %r8
movq %rcx, (%rsp)
xorl %ecx, %ecx
xorl %r9d, %r9d
callq 0x1b932
popq %rax
retq
movq 0x1c0fc(%rip), %rdi     # 0x36fd8
leaq 0xf1d4(%rip), %rsi      # 0x2a0b7
callq 0x4260
movq %rax, %rdi
callq 0x4100
xorl %edi, %edi
callq 0x4290
nop
// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r14
movq (%rdx), %rax
movq 0x8(%rdx), %rsi
subq %rax, %rsi
movq (%r14), %rcx
movq 0x8(%r14), %rdx
subq %rcx, %rdx
cmpq %rdx, %rsi
jne 0x1afd7
movq 0x8(%rax), %rdx
subq (%rax), %rdx
movq 0x8(%rcx), %rax
subq (%rcx), %rax
cmpq %rax, %rdx
jne 0x1afd7
movq %rdi, %rbx
sarq $0x3, %rdx
sarq $0x3, %rsi
movabsq $-0x5555555555555555, %r12 # imm = 0xAAAAAAAAAAAAAAAB
imulq %r12, %rsi
callq 0x1a8c0
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
je 0x1afc8
sarq $0x3, %rcx
imulq %r12, %rcx
movq (%rax), %rdx
movq 0x8(%rax), %rsi
movq %rsi, %rdi
subq %rdx, %rdi
sarq $0x3, %rdi
movq (%r14), %r8
movq (%rbx), %r9
xorl %r10d, %r10d
cmpq %rdx, %rsi
je 0x1afc0
leaq (,%r10,8), %r11
leaq (%r11,%r11,2), %r15
movq (%r8,%r15), %r11
movq (%rax,%r15), %r14
movq (%r9,%r15), %r15
xorl %r12d, %r12d
movsd (%r11,%r12,8), %xmm0
addsd (%r14,%r12,8), %xmm0
movsd %xmm0, (%r15,%r12,8)
incq %r12
cmpq %r12, %rdi
jne 0x1afa6
incq %r10
cmpq %rcx, %r10
jne 0x1af86
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x1bffa(%rip), %rdi     # 0x36fd8
leaq 0xf10c(%rip), %rsi      # 0x2a0f1
callq 0x4260
movq %rax, %rdi
callq 0x4100
xorl %edi, %edi
callq 0x4290
nop
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/Matrix.cpp
// Function: Matrix::_hadamard_ComputeSection(HadamardOps, Matrix&, Matrix&, unsigned long, unsigned long, unsigned long, unsigned long)
void Matrix::_hadamard_ComputeSection(HadamardOps op, Matrix &B, Matrix &C, size_t r1, size_t r2, size_t c1, size_t c2)
{
    // compute a region inside C for hadamard operation
    for(size_t i=r1; i<r2; i++)
    {
        for(size_t j=c1; j<c2; j++){
            if(op == HadamardOps::plus)
                C[i][j] = (*this)[i][j] + B[i][j];
            else if (op == HadamardOps::subtract)
                C[i][j] = (*this)[i][j] - B[i][j];
            else if (op == HadamardOps::multiply)
                C[i][j] = (*this)[i][j] * B[i][j];
            else if (op == HadamardOps::divide)
                C[i][j] = (*this)[i][j] / B[i][j];
            else
                std::cout<<"Error: not supported hadamard operation."<<std::endl;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, 0x10(%rsp)
movq %r8, (%rsp)
cmpq %r9, %r8
jae 0x1b1a0
movq %rdx, %r10
movq 0x78(%rsp), %r8
movq 0x70(%rsp), %rdx
subq %rdx, %r8
leaq (,%rdx,8), %r14
movl %esi, %r12d
leaq 0xefbc(%rip), %rbx      # 0x29ff8
movq %rdi, 0x30(%rsp)
movl %esi, 0xc(%rsp)
movq %rcx, 0x28(%rsp)
movq %r10, 0x20(%rsp)
movq %r8, 0x18(%rsp)
movq 0x70(%rsp), %rax
cmpq %rax, 0x78(%rsp)
jbe 0x1b18a
movq (%rsp), %rax
leaq (,%rax,8), %rax
leaq (%rax,%rax,2), %r13
xorl %r15d, %r15d
cmpl $0x3, %esi
ja 0x1b12d
movslq (%rbx,%r12,4), %rax
addq %rbx, %rax
jmpq *%rax
movq (%rdi), %rax
movq (%rax,%r13), %rax
addq %r14, %rax
movsd (%rax,%r15,8), %xmm0
movq (%r10), %rax
movq (%rax,%r13), %rax
addq %r14, %rax
addsd (%rax,%r15,8), %xmm0
jmp 0x1b10f
movq (%rdi), %rax
movq (%rax,%r13), %rax
addq %r14, %rax
movsd (%rax,%r15,8), %xmm0
movq (%r10), %rax
movq (%rax,%r13), %rax
addq %r14, %rax
mulsd (%rax,%r15,8), %xmm0
jmp 0x1b10f
movq (%rdi), %rax
movq (%rax,%r13), %rax
addq %r14, %rax
movsd (%rax,%r15,8), %xmm0
movq (%r10), %rax
movq (%rax,%r13), %rax
addq %r14, %rax
divsd (%rax,%r15,8), %xmm0
jmp 0x1b10f
movq (%rdi), %rax
movq (%rax,%r13), %rax
addq %r14, %rax
movsd (%rax,%r15,8), %xmm0
movq (%r10), %rax
movq (%rax,%r13), %rax
addq %r14, %rax
subsd (%rax,%r15,8), %xmm0
movq (%rcx), %rax
movq (%rax,%r13), %rax
addq %r14, %rax
movsd %xmm0, (%rax,%r15,8)
incq %r15
cmpq %r15, %r8
jne 0x1b077
jmp 0x1b18a
movl $0x28, %edx
movq 0x1be9f(%rip), %rbp     # 0x36fd8
movq %rbp, %rdi
leaq 0xf036(%rip), %rsi      # 0x2a179
callq 0x4280
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq %rbp, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4190
movq 0x18(%rsp), %r8
movq 0x30(%rsp), %rdi
movl 0xc(%rsp), %esi
movq 0x20(%rsp), %r10
movq 0x28(%rsp), %rcx
jmp 0x1b11f
movq (%rsp), %rdx
incq %rdx
movq %rdx, (%rsp)
cmpq 0x10(%rsp), %rdx
jne 0x1b054
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movsd %xmm0, 0x8(%rsp)
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
movq 0x8(%rsi), %rsi
subq %rax, %rsi
sarq $0x3, %rsi
movabsq $-0x5555555555555555, %r15 # imm = 0xAAAAAAAAAAAAAAAB
imulq %r15, %rsi
movq 0x8(%rax), %rdx
subq (%rax), %rdx
sarq $0x3, %rdx
callq 0x1a8c0
movsd 0x8(%rsp), %xmm1
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
je 0x1b564
sarq $0x3, %rcx
imulq %r15, %rcx
movq (%rax), %rdx
movq 0x8(%rax), %rsi
movq %rsi, %rdi
subq %rdx, %rdi
sarq $0x3, %rdi
movq (%rbx), %r8
xorl %r9d, %r9d
cmpq %rdx, %rsi
je 0x1b55c
leaq (,%r9,8), %r10
leaq (%r10,%r10,2), %r11
movq (%rax,%r11), %r10
movq (%r8,%r11), %r11
xorl %r14d, %r14d
movsd (%r10,%r14,8), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%r11,%r14,8)
incq %r14
cmpq %r14, %rdi
jne 0x1b544
incq %r9
cmpq %rcx, %r9
jne 0x1b528
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/Matrix.cpp
// Function: Matrix::_scalar_ComputeSection(HadamardOps, double, Matrix&, unsigned long, unsigned long, unsigned long, unsigned long)
void Matrix::_scalar_ComputeSection(HadamardOps op, const double v, Matrix &C, size_t r1, size_t r2, size_t c1, size_t c2)
{
    // compute a region inside C for scalar operation
    for(size_t i=r1; i<r2; i++)
    {
        for(size_t j=c1; j<c2; j++){
            if(op == HadamardOps::plus)
                C[i][j] = (*this)[i][j] + v;
            else if (op == HadamardOps::subtract)
                C[i][j] = (*this)[i][j] - v;
            else if (op == HadamardOps::multiply)
                C[i][j] = (*this)[i][j] * v;
            else if (op == HadamardOps::divide)
                if( v != 0)
                    C[i][j] = (*this)[i][j] / v;
                else {
                    std::cout<<"Error: dividing a Matrix by 0"<<std::endl;
                }
            else
                std::cout<<"Error: not supported hadamard operation."<<std::endl;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, 0x8(%rsp)
movq %r8, 0x30(%rsp)
movq %rcx, (%rsp)
cmpq %r8, %rcx
jae 0x1b704
movl %esi, %ebp
movq 0x70(%rsp), %r14
movq 0x8(%rsp), %rax
subq %rax, %r14
leaq (,%rax,8), %r15
movl %esi, %esi
leaq 0xea51(%rip), %r8       # 0x2a008
movq %rdx, 0x28(%rsp)
movsd %xmm0, 0x20(%rsp)
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x70(%rsp), %rax
cmpq 0x8(%rsp), %rax
jbe 0x1b6ee
movq (%rsp), %rax
leaq (,%rax,8), %rax
leaq (%rax,%rax,2), %r13
xorl %ebx, %ebx
cmpl $0x3, %ebp
ja 0x1b66b
movslq (%r8,%rsi,4), %rax
addq %r8, %rax
jmpq *%rax
movq (%rdi), %rax
movq (%rax,%r13), %rax
addq %r15, %rax
movsd (%rax,%rbx,8), %xmm1
addsd %xmm0, %xmm1
jmp 0x1b65a
movq (%rdi), %rax
movq (%rax,%r13), %rax
addq %r15, %rax
movsd (%rax,%rbx,8), %xmm1
mulsd %xmm0, %xmm1
jmp 0x1b65a
ucomisd 0xbf62(%rip), %xmm0     # 0x27590
jne 0x1b632
jnp 0x1b683
movq (%rdi), %rax
movq (%rax,%r13), %rax
addq %r15, %rax
movsd (%rax,%rbx,8), %xmm1
divsd %xmm0, %xmm1
jmp 0x1b65a
movq (%rdi), %rax
movq (%rax,%r13), %rax
addq %r15, %rax
movsd (%rax,%rbx,8), %xmm1
subsd %xmm0, %xmm1
movq (%rdx), %rax
movq (%rax,%r13), %rax
addq %r15, %rax
movsd %xmm1, (%rax,%rbx,8)
jmp 0x1b6e2
movl $0x28, %edx
movq 0x1b961(%rip), %r12     # 0x36fd8
movq %r12, %rdi
leaq 0xeaf8(%rip), %rsi      # 0x2a179
jmp 0x1b699
movl $0x1d, %edx
movq 0x1b949(%rip), %r12     # 0x36fd8
movq %r12, %rdi
leaq 0xeb09(%rip), %rsi      # 0x2a1a2
callq 0x4280
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq %r12, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4190
leaq 0xe93b(%rip), %r8       # 0x2a008
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdi
movsd 0x20(%rsp), %xmm0
movq 0x28(%rsp), %rdx
incq %rbx
cmpq %rbx, %r14
jne 0x1b5ee
movq (%rsp), %rcx
incq %rcx
movq %rcx, (%rsp)
cmpq 0x30(%rsp), %rcx
jne 0x1b5cc
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movsd %xmm0, 0x8(%rsp)
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
movq 0x8(%rsi), %rsi
subq %rax, %rsi
sarq $0x3, %rsi
movabsq $-0x5555555555555555, %r15 # imm = 0xAAAAAAAAAAAAAAAB
imulq %r15, %rsi
movq 0x8(%rax), %rdx
subq (%rax), %rdx
sarq $0x3, %rdx
callq 0x1a8c0
movsd 0x8(%rsp), %xmm1
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
je 0x1b7c2
sarq $0x3, %rcx
imulq %r15, %rcx
movq (%rax), %rdx
movq 0x8(%rax), %rsi
movq %rsi, %rdi
subq %rdx, %rdi
sarq $0x3, %rdi
movq (%rbx), %r8
xorl %r9d, %r9d
cmpq %rdx, %rsi
je 0x1b7ba
leaq (,%r9,8), %r10
leaq (%r10,%r10,2), %r11
movq (%rax,%r11), %r10
movq (%r8,%r11), %r11
xorl %r14d, %r14d
movsd (%r10,%r14,8), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%r11,%r14,8)
incq %r14
cmpq %r14, %rdi
jne 0x1b7a2
incq %r9
cmpq %rcx, %r9
jne 0x1b786
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop