LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/Matrix.cpp
// Function: Matrix::Rot_180()
Matrix Matrix::Rot_180()
{
    // rotate matrix by 180 degree
    auto dim = this->Dimension();
    Matrix _m(dim);

    for(size_t i=0;i<dim.first;i++){
        for(size_t j=0;j<dim.second;j++){
            _m[i][j] = (*this)[dim.first - i -1][dim.second - j-1];
        }
    }

    return _m;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq (%rsi), %rcx
movq %rsi, (%rsp)
movq 0x8(%rsi), %r13
movq %r13, %rax
movq %rcx, 0x10(%rsp)
subq %rcx, %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %r14 # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %r14
movq (%rcx), %rbp
movq 0x8(%rcx), %rbx
movq %rbx, %r12
subq %rbp, %r12
movq %r12, %r15
sarq $0x3, %r15
movq %r14, %rsi
movq %r15, %rdx
callq 0x1a8c0
movq 0x8(%rsp), %rax
subq 0x10(%rsp), %r13
je 0x1dcac
movq (%rsp), %rcx
addq (%rcx), %r13
movq (%rax), %r8
cmpq $0x1, %r15
adcq $0x0, %r15
cmpq $0x1, %r14
adcq $0x0, %r14
addq $-0x8, %r12
xorl %ecx, %ecx
cmpq %rbp, %rbx
je 0x1dca4
movq %rcx, %rdx
notq %rdx
leaq (%rdx,%rdx,2), %rsi
leaq (%rcx,%rcx,2), %rdx
movq (%r8,%rdx,8), %rdx
movq (%r13,%rsi,8), %rsi
addq %r12, %rsi
xorl %edi, %edi
movsd (%rsi), %xmm0
movsd %xmm0, (%rdx,%rdi,8)
incq %rdi
addq $-0x8, %rsi
cmpq %rdi, %r15
jne 0x1dc8f
incq %rcx
cmpq %r14, %rcx
jne 0x1dc6e
addq $0x18, %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::Convolution(Matrix&, unsigned long, bool, double)
Matrix Matrix::Convolution(Matrix &T, size_t stride, bool pad_front, double padding_value)
{
    // matrix convolution
    // convolution is correlation with T rotated 180 degree
    Matrix _T = T.Rot_180();
    Matrix r = Correlation(_T, stride, pad_front, padding_value);
    return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movsd %xmm0, 0x18(%rsp)
movl %r8d, %ebp
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsp, %r12
movq %r12, %rdi
movq %rdx, %rsi
callq 0x1dbe8
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
movl %ebp, %r8d
movsd 0x18(%rsp), %xmm0
callq 0x1dcbc
movq (%rsp), %r14
movq 0x8(%rsp), %r15
cmpq %r14, %r15
je 0x1e1bf
movq %r14, %r12
movq (%r12), %rdi
testq %rdi, %rdi
je 0x1e1b1
callq 0x4230
addq $0x18, %r12
cmpq %r15, %r12
jne 0x1e1a3
movq %r14, 0x8(%rsp)
movq %rsp, %rdi
callq 0x146b8
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %r14
movq 0x8(%rsp), %r15
cmpq %r14, %r15
je 0x1e207
movq %r14, %r12
movq (%r12), %rdi
testq %rdi, %rdi
je 0x1e1f9
callq 0x4230
addq $0x18, %r12
cmpq %r15, %r12
jne 0x1e1eb
movq %r14, 0x8(%rsp)
movq %rsp, %rdi
callq 0x146b8
movq %rbx, %rdi
callq 0x43e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/Matrix.cpp
// Function: Matrix::GetCorrelationValue(Matrix&, Matrix&, unsigned long, unsigned long)
double Matrix::GetCorrelationValue(Matrix &A, Matrix &B, size_t i, size_t j)
{
    // get the element (i, j) of the correlated matrix, A is input matrix, B is kernel
    // keep in mind this one does not care about matrix dimension, it will fill with 0 value
    // for non-exist matrix elements
    if( (int)i<0 || (int)j<0) {
        std::cout<<"Error: wrong index in get correlation value."<<std::endl;
        exit(0);
    }

    auto dimA = A.Dimension();
    auto dimB = B.Dimension();

    double res = 0;
    for(size_t p = 0; p<dimB.first;p++)
    {
        for(size_t q=0; q<dimB.second;q++){
            int index_i_A = (int)i + (int)p;
            int index_j_A = (int)j + (int)q;

            if(index_i_A < 0 || index_i_A >= (int)dimA.first || index_j_A < 0 || index_j_A >= (int)dimA.second) {
                res += 0.; // 0*B[p][q];
            } else {
                res += A[index_i_A][index_j_A] * B[p][q];
            }
        }
    }
    return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %eax
movq %rdx, 0x10(%rsp)
orl %edx, %eax
js 0x1e328
movq (%rsi), %rax
movq 0x8(%rsi), %rbx
subq %rax, %rbx
je 0x1e315
movq (%rdi), %rdx
movq (%rax), %r8
movq %rax, 0x8(%rsp)
movq 0x8(%rax), %r9
movq %r9, %r10
subq %r8, %r10
sarq $0x3, %r10
sarq $0x3, %rbx
movabsq $-0x5555555555555555, %r11 # imm = 0xAAAAAAAAAAAAAAAB
imulq %rbx, %r11
movq 0x8(%rdx), %rbx
subq (%rdx), %rbx
shrq $0x3, %rbx
movq 0x8(%rdi), %rsi
movq %rdx, %rax
subq %rdx, %rsi
shrq $0x3, %rsi
imull $0xaaaaaaab, %esi, %edi # imm = 0xAAAAAAAB
cmpq $0x1, %r10
adcq $0x0, %r10
cmpq $0x1, %r11
adcq $0x0, %r11
xorpd %xmm1, %xmm1
xorl %r14d, %r14d
xorpd %xmm0, %xmm0
cmpq %r8, %r9
je 0x1e30b
movq 0x10(%rsp), %rdx
leal (%r14,%rdx), %r15d
leaq (%r15,%r15,2), %rsi
leaq (%rax,%rsi,8), %r12
leaq (%r14,%r14,2), %rsi
movq 0x8(%rsp), %rdx
leaq (%rdx,%rsi,8), %r13
xorl %ebp, %ebp
testl %r15d, %r15d
js 0x1e2ff
cmpl %edi, %r15d
jge 0x1e2ff
leaq (%rcx,%rbp), %rsi
testl %esi, %esi
js 0x1e2ff
cmpl %ebx, %esi
jge 0x1e2ff
movl %esi, %esi
movq (%r12), %rdx
movsd (%rdx,%rsi,8), %xmm2
movq (%r13), %rdx
mulsd (%rdx,%rbp,8), %xmm2
addsd %xmm2, %xmm0
jmp 0x1e303
addsd %xmm1, %xmm0
incq %rbp
cmpq %rbp, %r10
jne 0x1e2cf
incq %r14
cmpq %r11, %r14
jne 0x1e2aa
jmp 0x1e319
xorpd %xmm0, %xmm0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x18ca9(%rip), %rdi     # 0x36fd8
leaq 0xc4a8(%rip), %rsi      # 0x2a7de
callq 0x4260
movq %rax, %rdi
callq 0x4100
xorl %edi, %edi
callq 0x4290
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/Matrix.cpp
// Function: Matrix::DeleteRow(unsigned long)
void Matrix::DeleteRow(size_t i)
{
    // delete a row
    auto dim = Dimension();
    if(i>= dim.first || (int)i<0) {
        std::cout<<"Warning: deleting matrix row, index out of range."<<std::endl;
        return;
    }

    __M.erase(__M.begin() + i);
}

// Assembly:
testl %esi, %esi
js 0x1e6c6
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
cmpq %rsi, %rdx
jbe 0x1e6c6
leaq (%rsi,%rsi,2), %rcx
leaq (%rax,%rcx,8), %rsi
jmp 0x1f364
pushq %rbx
movq 0x1890a(%rip), %rbx     # 0x36fd8
leaq 0xc163(%rip), %rsi      # 0x2a838
movl $0x31, %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
popq %rbx
jmp 0x4190
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/Matrix.cpp
// Function: Matrix::DeleteCollum(unsigned long)
void Matrix::DeleteCollum(size_t i)
{
    // delete a collum
    auto dim = Dimension();
    if((int)i<0 || i>= dim.second){
        std::cout<<"Warning: deleting matrix collum, index out of range."<<std::endl;
        return;
    }
    for(size_t j=0;j<dim.first;j++){
        __M[j].erase(__M[j].begin()+i);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
testl %ebx, %ebx
js 0x1e79f
movq %rdi, %r14
movq (%rdi), %rax
movq 0x8(%rax), %rcx
subq (%rax), %rcx
sarq $0x3, %rcx
cmpq %rbx, %rcx
jbe 0x1e79f
movq 0x8(%r14), %rcx
cmpq %rax, %rcx
je 0x1e795
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %r15 # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %r15
cmpq $0x1, %r15
adcq $0x0, %r15
movl $0x8, %r12d
movq (%r14), %r13
movq -0x8(%r13,%r12), %rax
movq (%r13,%r12), %rdx
leaq (%rax,%rbx,8), %rsi
addq $0x8, %rsi
cmpq %rdx, %rsi
je 0x1e786
leaq (%rax,%rbx,8), %rdi
subq %rsi, %rdx
callq 0x4350
addq $-0x8, (%r13,%r12)
addq $0x18, %r12
decq %r15
jne 0x1e760
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x18832(%rip), %rbx     # 0x36fd8
leaq 0xc0bd(%rip), %rsi      # 0x2a86a
movl $0x34, %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
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x4190
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/Matrix.cpp
// Function: Matrix::InsertRow(unsigned long, std::vector<double, std::allocator<double>>*)
void Matrix::InsertRow(size_t i, std::vector<double>* vec)
{
    // insert vec to matrix at position i
    auto dim = Dimension();
    if(vec!=nullptr && vec->size() != dim.second){
        std::cout<<"Error: inserting row to matrix, dimension not match."<<std::endl;
        exit(0);
    }
    if((int)i<0 || i>dim.first){
        std::cout<<"Error: insert row to matrix, wrong position."<<std::endl;
        exit(0);
    }
    if(vec == nullptr){
        std::vector<double> v(dim.second, 0);
        __M.insert(__M.begin()+i, v);
    } else {
        __M.insert(__M.begin()+i, (*vec));
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movq 0x8(%rax), %rsi
subq (%rax), %rsi
testq %rdx, %rdx
je 0x1e81c
movq 0x8(%rdx), %rdi
subq (%rdx), %rdi
cmpq %rsi, %rdi
jne 0x1e8be
testl %r14d, %r14d
js 0x1e8ae
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rdi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdi
cmpq %r14, %rdi
jb 0x1e8ae
testq %rdx, %rdx
je 0x1e85d
leaq (%r14,%r14,2), %rcx
leaq (%rax,%rcx,8), %rsi
movq %rbx, %rdi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x1ebc8
sarq $0x3, %rsi
leaq 0x10(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x18(%rsp), %r15
leaq 0xf(%rsp), %rcx
movq %r15, %rdi
callq 0x1eab0
leaq (%r14,%r14,2), %rsi
shlq $0x3, %rsi
addq (%rbx), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x1ebc8
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1e8a4
callq 0x4230
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x18723(%rip), %rdi     # 0x36fd8
leaq 0xc018(%rip), %rsi      # 0x2a8d4
jmp 0x1e8cc
movq 0x18713(%rip), %rdi     # 0x36fd8
leaq 0xbfd3(%rip), %rsi      # 0x2a89f
callq 0x4260
movq %rax, %rdi
callq 0x4100
xorl %edi, %edi
callq 0x4290
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1e8f2
callq 0x4230
movq %rbx, %rdi
callq 0x43e0
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/Matrix.cpp
// Function: Matrix::InsertCollum(unsigned long, std::vector<double, std::allocator<double>>*)
void Matrix::InsertCollum(size_t i, std::vector<double>* vec)
{
    // insert vec to matrix at position i
    auto dim=Dimension();
    if(vec!=nullptr && vec->size() != dim.first){
        std::cout<<"Error: inserting col to matrix, dimension not match."<<std::endl;
        exit(0);
    }
    if((int)i<0 || i>dim.second){
        std::cout<<"Error: insert col to matrix, wrong position."<<std::endl;
        exit(0);
    }
    for(size_t ii=0;ii<dim.first;ii++){
        if(vec == nullptr){
            __M[ii].insert(__M[ii].begin() + i, 0);
        } else {
            __M[ii].insert(__M[ii].begin() + i, (*vec)[ii]);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %r13 # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %r13
movq 0x8(%rax), %rdx
subq (%rax), %rdx
testq %rbx, %rbx
je 0x1e949
movq 0x8(%rbx), %rsi
subq (%rbx), %rsi
sarq $0x3, %rsi
cmpq %r13, %rsi
jne 0x1e9c8
testl %r14d, %r14d
js 0x1e9b8
sarq $0x3, %rdx
cmpq %r14, %rdx
jb 0x1e9b8
cmpq %rax, %rcx
je 0x1e9a9
cmpq $0x1, %r13
adcq $0x0, %r13
xorl %ebp, %ebp
shlq $0x3, %r14
xorl %r12d, %r12d
movq (%r15), %rdi
movq (%rdi,%r12), %rsi
addq %r14, %rsi
addq %r12, %rdi
testq %rbx, %rbx
je 0x1e98c
movq (%rbx), %rdx
addq %rbp, %rdx
callq 0x1ec6e
jmp 0x1e99c
movq $0x0, (%rsp)
movq %rsp, %rdx
callq 0x1f476
addq $0x18, %r12
addq $0x8, %rbp
decq %r13
jne 0x1e96d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x18619(%rip), %rdi     # 0x36fd8
leaq 0xbf70(%rip), %rsi      # 0x2a936
jmp 0x1e9d6
movq 0x18609(%rip), %rdi     # 0x36fd8
leaq 0xbf2b(%rip), %rsi      # 0x2a901
callq 0x4260
movq %rax, %rdi
callq 0x4100
xorl %edi, %edi
callq 0x4290
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/Network.cpp
// Function: Network::UpdateEpoch()
void Network::UpdateEpoch()
{
    int numberofBatches = __dataInterface -> GetNumberOfBatches();
    cout<<"......Info: "<<numberofBatches<<" batches in this epoch"<<endl;
    numberofBatches = 1; // test QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQqq

    __dataInterface->Reset();
    __dataInterface->Shuffle();

    // initializations for epoch
    for(auto &i: __middleAndOutputLayers)
    {
        i->EpochInit();
    }

    for(int i=0;i<numberofBatches;i++)
    {
        cout<<"......... training for batch: "<<i<<"/"<<numberofBatches<<endl;
        UpdateBatch();
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
callq 0x198f2
movl %eax, %ebp
movq 0x17464(%rip), %r14     # 0x36fd8
leaq 0xaf34(%rip), %rsi      # 0x2aaaf
movl $0xc, %edx
movq %r14, %rdi
callq 0x4280
movq %r14, %rdi
movl %ebp, %esi
callq 0x43c0
movq %rax, %r14
leaq 0xaf20(%rip), %rsi      # 0x2aabc
movl $0x16, %edx
movq %rax, %rdi
callq 0x4280
movq (%r14), %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 0x28(%rbx), %rdi
callq 0x19e38
movq 0x28(%rbx), %rdi
callq 0x19e42
movq (%rbx), %r14
movq 0x8(%rbx), %r15
cmpq %r15, %r14
je 0x1fbfd
movq (%r14), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
addq $0x8, %r14
jmp 0x1fbe9
movq 0x173d4(%rip), %r14     # 0x36fd8
leaq 0xaec8(%rip), %rsi      # 0x2aad3
movl $0x1e, %edx
movq %r14, %rdi
callq 0x4280
movq %r14, %rdi
xorl %esi, %esi
callq 0x43c0
movq %rax, %r14
leaq 0xae71(%rip), %rsi      # 0x2aa9d
movl $0x1, %edx
movq %rax, %rdi
callq 0x4280
movq %r14, %rdi
movl $0x1, %esi
callq 0x43c0
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, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1fc82
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/Network.cpp
// Function: Network::UpdateBatch()
void Network::UpdateBatch()
{
    // initializations for batch
    for(auto &i: __middleAndOutputLayers)
        i->BatchInit();

    auto t1 = std::chrono::high_resolution_clock::now();
    ForwardPropagateForBatch();
    //auto t2 = std::chrono::high_resolution_clock::now();
    //auto dt1 = std::chrono::duration_cast<std::chrono::milliseconds>(t2-t1);
    //std::cout<<"forward propagation cost: "<<dt1.count()<<" milliseconds"<<endl;

    BackwardPropagateForBatch();
    //auto t3 = std::chrono::high_resolution_clock::now();
    //auto dt2 = std::chrono::duration_cast<std::chrono::milliseconds>(t3-t2);
    //std::cout<<"backward propagation cost: "<<dt2.count()<<" milliseconds"<<endl;

    UpdateWeightsAndBiasForBatch();
    auto t4 = std::chrono::high_resolution_clock::now();
    auto dt3 = std::chrono::duration_cast<std::chrono::milliseconds>(t4-t1);
    std::cout<<"        batch training cost: "<<dt3.count()<<" milliseconds"<<endl;

    // save training accuracy for batch
    __outputLayer -> SaveAccuracyAndCostForBatch();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
movq 0x8(%rdi), %r15
cmpq %r15, %r14
je 0x1fcab
movq (%r14), %rdi
movq (%rdi), %rax
callq *0x88(%rax)
addq $0x8, %r14
jmp 0x1fc94
callq 0x4050
movq %rax, %r14
movq %rbx, %rdi
callq 0x1fda6
movq 0x8(%rbx), %r15
subq (%rbx), %r15
shrq $0x3, %r15
testl %r15d, %r15d
jle 0x1fcec
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
incq %r15
movq (%rbx), %rax
movq -0x10(%rax,%r15,8), %rdi
movq (%rdi), %rax
callq *0x48(%rax)
decq %r15
cmpq $0x1, %r15
jg 0x1fcd5
movq (%rbx), %r15
movq 0x8(%rbx), %r12
cmpq %r12, %r15
je 0x1fd07
movq (%r15), %rdi
movq (%rdi), %rax
callq *0x50(%rax)
addq $0x8, %r15
jmp 0x1fcf3
callq 0x4050
subq %r14, %rax
movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB
imulq %rcx
movq %rdx, %r14
shrq $0x3f, %r14
sarq $0x12, %rdx
addq %rdx, %r14
movq 0x172a7(%rip), %r15     # 0x36fd8
leaq 0xadba(%rip), %rsi      # 0x2aaf2
movl $0x1d, %edx
movq %r15, %rdi
callq 0x4280
movq %r15, %rdi
movq %r14, %rsi
callq 0x4240
movq %rax, %r14
leaq 0xadb6(%rip), %rsi      # 0x2ab10
movl $0xd, %edx
movq %rax, %rdi
callq 0x4280
movq (%r14), %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 0x20(%rbx), %rdi
movq (%rdi), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmpq *0x2d0(%rax)
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/Network.cpp
// Function: Network::ForwardPropagateForBatch()
void Network::ForwardPropagateForBatch()
{
    // prepare new batch data and label in Datainterface class
    __dataInterface->GetNewBatchData();
    __dataInterface->GetNewBatchLabel();

    // fill data to input layer
    __inputLayer->FillBatchDataToInputLayerA();

    // forward propagation
    for(auto &i: __middleAndOutputLayers)
    {
        i->ForwardPropagateForBatch();
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
callq 0x19948
movq 0x28(%rbx), %rdi
callq 0x19c74
movq 0x18(%rbx), %rdi
movq (%rdi), %rax
callq *0x180(%rax)
movq (%rbx), %r14
movq 0x8(%rbx), %rbx
cmpq %rbx, %r14
je 0x1fde7
movq (%r14), %rdi
movq (%rdi), %rax
callq *0x40(%rax)
addq $0x8, %r14
jmp 0x1fdd3
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/Neuron.cpp
// Function: Neuron::UpdateZ(int)
void Neuron::UpdateZ(int sample_index)
{
    // update z for current layer
    if(__layer->GetType() == LayerType::fullyConnected || __layer->GetType() == LayerType::output)
    {
        //std::cout<<__func__<<" fully connected layer update z"<<std::endl;
        UpdateZFC(sample_index);
    } 
    else if(__layer->GetType() == LayerType::cnn)
    {
        //std::cout<<__func__<<" cnn layer update z"<<std::endl;
        UpdateZCNN(sample_index);
    } 
    else if(__layer->GetType() == LayerType::pooling)
    {
        //std::cout<<__func__<<" pooling layer update z"<<std::endl;
        UpdateZPooling(sample_index);
    } 
    else 
    {
        std::cout<<"Error: unsupported layer type."<<std::endl;
        exit(0);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq 0x78(%rdi), %rdi
movq (%rdi), %rax
callq *0x250(%rax)
testl %eax, %eax
je 0x202e4
movq 0x78(%r14), %rdi
movq (%rdi), %rax
callq *0x250(%rax)
cmpl $0x4, %eax
jne 0x202f5
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x20a4a
movq 0x78(%r14), %rdi
movq (%rdi), %rax
callq *0x250(%rax)
cmpl $0x1, %eax
jne 0x20318
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x20c7e
movq 0x78(%r14), %rdi
movq (%rdi), %rax
callq *0x250(%rax)
cmpl $0x2, %eax
jne 0x2033b
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x20e6c
movq 0x16c96(%rip), %rdi     # 0x36fd8
leaq 0xa8d6(%rip), %rsi      # 0x2ac1f
callq 0x4260
movq %rax, %rdi
callq 0x4100
xorl %edi, %edi
callq 0x4290
nop
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/Neuron.cpp
// Function: Neuron::UpdateA(int)
void Neuron::UpdateA(int sample_index)
{
    // update a for current training sample
    double v = __z[sample_index];
    //cout<<"debug: sample_id: "<<sample_index<<": z = "<<v<<endl;
    double a = -100.; // theorectially, a>=-1
    if(__funcType == ActuationFuncType::Sigmoid)
    {
        a = __sigmoid(v);
        //cout<<"sigmoid"<<endl;
    }
    else if(__funcType == ActuationFuncType::SoftMax)
    {
        auto & images  = __layer->GetImagesActiveZ();
        assert(images[sample_index].OutputImageFromKernel.size() == 1); // make sure it is 1D layer
        Matrix & m_z = images[sample_index].OutputImageFromKernel[0];

        a = __softmax(m_z);
    }
    else if(__funcType == ActuationFuncType::Tanh)
    {
        a = __tanh(v);
        //cout<<"tanh"<<endl;
    }
    else if(__funcType == ActuationFuncType::Relu)
    {
        a = __relu(v);
        //cout<<"relu"<<endl;
    }
    else
        std::cout<<"Error: unsupported actuation function type."<<std::endl;

    if(a < -1) 
    {
        std::cout<<"Error: Neuron::UpdateA(int sample_index), a<-1? something wrong."
            <<endl;
        exit(0);
    }
    //cout<<"debug: sample_id: "<<sample_index<<": a = "<<a<<endl;
    //getchar();
    //__a.push_back(a);
    __a[sample_index] = a;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movslq %esi, %r15
movl 0x84(%rdi), %eax
cmpq $0x3, %rax
ja 0x20422
movq 0x48(%rbx), %rcx
movsd (%rcx,%r15,8), %xmm1
leaq 0xa7b6(%rip), %rcx      # 0x2ab40
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
xorpd 0x6cf5(%rip), %xmm1     # 0x27090
movapd %xmm1, %xmm0
callq 0x43f0
movapd %xmm0, %xmm1
movsd 0x71d0(%rip), %xmm0     # 0x27580
addsd %xmm0, %xmm1
jmp 0x203db
addsd %xmm1, %xmm1
movapd %xmm1, %xmm0
callq 0x43f0
movapd %xmm0, %xmm1
movsd 0x71d9(%rip), %xmm0     # 0x275a8
addsd %xmm1, %xmm0
addsd 0x71a5(%rip), %xmm1     # 0x27580
divsd %xmm1, %xmm0
jmp 0x2046c
xorpd %xmm0, %xmm0
maxsd %xmm1, %xmm0
jmp 0x2046c
movq 0x78(%rbx), %rdi
movq (%rdi), %rax
callq *0xd8(%rax)
movq (%rax), %rax
leaq (%r15,%r15,2), %rcx
movq (%rax,%rcx,8), %rsi
movq 0x8(%rax,%rcx,8), %rax
subq %rsi, %rax
cmpq $0x18, %rax
jne 0x204ac
movq %rbx, %rdi
callq 0x20802
jmp 0x2046c
movq 0x16baf(%rip), %r14     # 0x36fd8
leaq 0xa9d0(%rip), %rsi      # 0x2ae00
movl $0x2b, %edx
movq %r14, %rdi
callq 0x4280
movq (%r14), %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
movsd 0xa6b4(%rip), %xmm0     # 0x2ab20
movsd 0x7134(%rip), %xmm1     # 0x275a8
ucomisd %xmm0, %xmm1
ja 0x2048a
movq 0x18(%rbx), %rax
movsd %xmm0, (%rax,%r15,8)
popq %rbx
popq %r14
popq %r15
retq
movq 0x16b47(%rip), %rdi     # 0x36fd8
leaq 0xa994(%rip), %rsi      # 0x2ae2c
callq 0x4260
movq %rax, %rdi
callq 0x4100
xorl %edi, %edi
callq 0x4290
leaq 0xa8fc(%rip), %rdi      # 0x2adaf
leaq 0xa6dc(%rip), %rsi      # 0x2ab96
leaq 0xa925(%rip), %rcx      # 0x2ade6
movl $0x167, %edx            # imm = 0x167
callq 0x4160
nop
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/Neuron.cpp
// Function: Neuron::UpdateDelta(int)
void Neuron::UpdateDelta(int sample_index)
{
    // update delta for current layer
    if(__layer->GetType() == LayerType::output)
    {
        UpdateDeltaOutputLayer(sample_index);
    } 
    else if(__layer->GetType() == LayerType::fullyConnected)
    {
        UpdateDeltaFC(sample_index);
    } 
    else if(__layer->GetType() == LayerType::cnn)
    {
        UpdateDeltaCNN(sample_index);
    } 
    else if(__layer->GetType() == LayerType::pooling)
    {
        UpdateDeltaPooling(sample_index);
    } 
    else 
    {
        std::cout<<"Error: unsupported layer type."<<std::endl;
        exit(0);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq 0x78(%rdi), %rdi
movq (%rdi), %rax
callq *0x250(%rax)
cmpl $0x4, %eax
jne 0x20754
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x20fa2
movq 0x78(%r14), %rdi
movq (%rdi), %rax
callq *0x250(%rax)
testl %eax, %eax
je 0x20788
movq 0x78(%r14), %rdi
movq (%rdi), %rax
callq *0x250(%rax)
cmpl $0x1, %eax
jne 0x20799
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x21348
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x21182
movq 0x78(%r14), %rdi
movq (%rdi), %rax
callq *0x250(%rax)
cmpl $0x2, %eax
jne 0x207bc
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x219bc
movq 0x16815(%rip), %rdi     # 0x36fd8
leaq 0xa455(%rip), %rsi      # 0x2ac1f
callq 0x4260
movq %rax, %rdi
callq 0x4100
xorl %edi, %edi
callq 0x4290
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/Neuron.cpp
// Function: Neuron::__softmax(Matrix&)
double Neuron::__softmax(Matrix &m_z)
{
    if(__layer->GetType() != LayerType::output)
    {
        // soft max is usually used in output layer, it is rare in hidden layer
        // print a warning if the neuron detected layertype not = output
        std::cout<<__func__<<" Warning: using softmax in hidden layers? please make sure."
            <<std::endl;
    }
    auto dim = m_z.Dimension();
    assert(dim.second == 1);

    size_t i = __coord.i;
    assert(dim.first > i);

    double sum = 0;
    for(size_t k = 0;k<dim.first;k++)
    {
        sum += exp((double)m_z[k][0]);
    }

    return exp(m_z[i][0])/sum;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x78(%rdi), %rdi
movq (%rdi), %rax
callq *0x250(%rax)
cmpl $0x4, %eax
je 0x20878
movq 0x167af(%rip), %r15     # 0x36fd8
leaq 0xa320(%rip), %rsi      # 0x2ab50
movl $0x9, %edx
movq %r15, %rdi
callq 0x4280
leaq 0xa316(%rip), %rsi      # 0x2ab5a
movl $0x3b, %edx
movq %r15, %rdi
callq 0x4280
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq %r15, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4190
movq %rbx, %rdi
callq 0x1ac7c
cmpq $0x1, %rdx
jne 0x208fa
movq %rax, %r15
movq 0x88(%r14), %r14
cmpq %r14, %rax
jbe 0x20919
xorpd %xmm0, %xmm0
movsd %xmm0, (%rsp)
xorl %r12d, %r12d
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1ae76
movq (%rax), %rax
movsd (%rax), %xmm0
callq 0x43f0
movsd (%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
incq %r12
cmpq %r12, %r15
jne 0x208a5
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1ae76
movq (%rax), %rax
movsd (%rax), %xmm0
callq 0x43f0
divsd (%rsp), %xmm0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x77b9(%rip), %rdi      # 0x280ba
leaq 0xa28e(%rip), %rsi      # 0x2ab96
leaq 0xa296(%rip), %rcx      # 0x2aba5
movl $0x45, %edx
callq 0x4160
leaq 0xa2a8(%rip), %rdi      # 0x2abc8
leaq 0xa26f(%rip), %rsi      # 0x2ab96
leaq 0xa277(%rip), %rcx      # 0x2aba5
movl $0x48, %edx
callq 0x4160
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/Neuron.cpp
// Function: Neuron::Reset()
void Neuron::Reset()
{
    if(__layer == nullptr)
    {
        std::cout<<"Error: Neuron::Reset(): the layer info has not been set for this neuron."
            <<endl;
        exit(0);
    }
    int batch_size = __layer->GetBatchSize();
    // after updateing weights and biase, 
    // namely after one training (one sample or one batch depends on user)
    // reset neurons for next computation
    __a.clear();
    __a.resize(batch_size); // reset a
    __delta.clear();
    __delta.resize(batch_size); // reset delta
    __z.clear();
    __z.resize(batch_size); // reset z
    __sigmaPrime.clear();
    __sigmaPrime.resize(batch_size);

    //__wGradient.clear(); // reset weight gradient
    //__bGradient.clear(); // reset bias gradient
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x78(%rdi), %rdi
testq %rdi, %rdi
je 0x20a11
movq (%rdi), %rax
callq *0x2a0(%rax)
leaq 0x18(%rbx), %rdi
movq 0x18(%rbx), %rcx
cmpq %rcx, 0x20(%rbx)
je 0x209b1
movq %rcx, 0x20(%rbx)
movslq %eax, %r14
movq %r14, %rsi
callq 0x13848
leaq 0x30(%rbx), %rdi
movq 0x30(%rbx), %rax
cmpq %rax, 0x38(%rbx)
je 0x209ce
movq %rax, 0x38(%rbx)
movq %r14, %rsi
callq 0x13848
leaq 0x48(%rbx), %rdi
movq 0x48(%rbx), %rax
cmpq %rax, 0x50(%rbx)
je 0x209e8
movq %rax, 0x50(%rbx)
movq %r14, %rsi
callq 0x13848
leaq 0x60(%rbx), %rdi
movq 0x60(%rbx), %rax
cmpq %rax, 0x68(%rbx)
je 0x20a02
movq %rax, 0x68(%rbx)
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x13848
movq 0x165c0(%rip), %rdi     # 0x36fd8
leaq 0xa1b7(%rip), %rsi      # 0x2abd6
callq 0x4260
movq %rax, %rdi
callq 0x4100
xorl %edi, %edi
callq 0x4290
nop
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/Neuron.cpp
// Function: Neuron::ClearPreviousBatch()
void Neuron::ClearPreviousBatch()
{
    __a.clear();           // necessary, since resize won't overwrite old contents
    __delta.clear();       // 
    __z.clear();           // 
    __sigmaPrime.clear();  // 

    if(__layer == nullptr)
    {
        std::cout<<"Error: Neuron::ClearPreviousBatch(): the layer info has not been set for this neuron."
            <<endl;
        exit(0);
    }
    int batch_size = __layer->GetBatchSize();
    __a.resize(batch_size); // reset a
    __delta.resize(batch_size); // reset delta
    __z.resize(batch_size); // reset z
    __sigmaPrime.resize(batch_size);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rax
cmpq %rax, 0x20(%rdi)
je 0x21eec
movq %rax, 0x20(%rbx)
movq 0x30(%rbx), %rax
cmpq %rax, 0x38(%rbx)
je 0x21efa
movq %rax, 0x38(%rbx)
movq 0x48(%rbx), %rax
cmpq %rax, 0x50(%rbx)
je 0x21f08
movq %rax, 0x50(%rbx)
movq 0x60(%rbx), %rax
cmpq %rax, 0x68(%rbx)
je 0x21f16
movq %rax, 0x68(%rbx)
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0x21f70
leaq 0x18(%rbx), %r14
leaq 0x30(%rbx), %r15
leaq 0x48(%rbx), %r12
addq $0x60, %rbx
movq (%rdi), %rax
callq *0x2a0(%rax)
movslq %eax, %r13
movq %r14, %rdi
movq %r13, %rsi
callq 0x13848
movq %r15, %rdi
movq %r13, %rsi
callq 0x13848
movq %r12, %rdi
movq %r13, %rsi
callq 0x13848
movq %rbx, %rdi
movq %r13, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x13848
movq 0x15061(%rip), %rdi     # 0x36fd8
leaq 0x9549(%rip), %rsi      # 0x2b4c7
callq 0x4260
movq %rax, %rdi
callq 0x4100
xorl %edi, %edi
callq 0x4290
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/Neuron.cpp
// Function: Neuron::Print()
void Neuron::Print()
{
    std::cout<<"--------------------------------------"<<std::endl;
    std::cout<<"neuron id: "<<__neuron_id<<std::endl;
    std::cout<<"active status: "<<__active_status<<std::endl;
    if(!__active_status) return;
    std::cout<<"w matrix: "<<std::endl;
    std::cout<<(*__w);
    std::cout<<"bias: "<<std::endl;
    std::cout<<(*__b);
    std::cout<<"Neruon Coord: "<<endl;
    std::cout<<__coord<<endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x15037(%rip), %r14     # 0x36fd8
leaq 0x9575(%rip), %rsi      # 0x2b51d
movl $0x26, %edx
movq %r14, %rdi
callq 0x4280
movq (%r14), %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
leaq 0x9561(%rip), %rsi      # 0x2b544
movl $0xb, %edx
movq %r14, %rdi
callq 0x4280
movq (%rbx), %rsi
movq %r14, %rdi
callq 0x4240
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq %r15, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4190
leaq 0x9524(%rip), %rsi      # 0x2b550
movl $0xf, %edx
movq %r14, %rdi
callq 0x4280
movzbl 0x80(%rbx), %esi
movq %r14, %rdi
callq 0x4370
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq %r15, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4190
cmpb $0x1, 0x80(%rbx)
jne 0x22189
leaq 0x94da(%rip), %rsi      # 0x2b560
movl $0xa, %edx
movq %r14, %rdi
callq 0x4280
movq (%r14), %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 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x1bb59
leaq 0x949e(%rip), %rsi      # 0x2b56b
movl $0x6, %edx
movq %r14, %rdi
callq 0x4280
movq (%r14), %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 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x1bb59
leaq 0x945e(%rip), %rsi      # 0x2b572
movl $0xe, %edx
movq %r14, %rdi
callq 0x4280
movq (%r14), %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
addq $0x88, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1a3c1
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x4190
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/xbai0624[P]dnn/src/main.cpp
// Function: main
int main(int argc, char* argv[])
{
    feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
    Network *net_work = new Network();
    net_work->Init();

    net_work->Train();
    //net_work->Classify();

    // test
    //UnitTest *test = new UnitTest();
    //test->Test();

    cout<<"MAIN TEST SUCCESS!!!"<<endl;
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl $0xd, %edi
callq 0x40d0
movl $0x38, %edi
callq 0x4270
movq %rax, %rbx
movq %rax, %rdi
callq 0x1f508
movq %rbx, %rdi
callq 0x1f52c
movq %rbx, %rdi
callq 0x1f918
movq 0x10206(%rip), %rbx     # 0x36fd8
leaq 0x4e03(%rip), %rsi      # 0x2bbdc
movl $0x14, %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
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x4230
movq %r14, %rdi
callq 0x43e0
// File: /workspace/github_cpp_makefile_star2_O1/fuad00[P]wifitool/code.cpp
// Function: progress(int)
bool progress(int progress) {
	system("clear");
	cout << "\n[";
	int pos = progress / 2;
	for (int i = 0; i < 50; ++i) {
		if (i < pos) cout << "=";
		else if (i == pos) cout << ">";
		else cout << " ";
	}
	cout << "] " << int(progress) << " %\r";
	cout.flush();
	current_progress = progress; // Запоминаем значение аргумента полосы прогресса
	cout << endl;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebp
leaq 0x2fb6(%rip), %rdi      # 0x5b7d
callq 0x20f0
movq 0x53fd(%rip), %rbx      # 0x7fd0
leaq 0x2fb1(%rip), %rsi      # 0x5b8b
movl $0x2, %edx
movq %rbx, %rdi
callq 0x2150
movl %ebp, %r14d
shrl $0x1f, %r14d
movl %ebp, 0x4(%rsp)
addl %ebp, %r14d
sarl %r14d
xorl %r15d, %r15d
leaq 0x2f8e(%rip), %r12      # 0x5b90
leaq 0x2bf3(%rip), %r13      # 0x57fc
leaq 0x2f7e(%rip), %rbp      # 0x5b8e
cmpl %r15d, %r14d
movq %r13, %rsi
cmoveq %r12, %rsi
cmovgq %rbp, %rsi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2150
incl %r15d
cmpl $0x32, %r15d
jne 0x2c10
leaq 0x2f57(%rip), %rsi      # 0x5b92
movl $0x2, %edx
movq %rbx, %rdi
callq 0x2150
movq %rbx, %rdi
movl 0x4(%rsp), %ebp
movl %ebp, %esi
callq 0x21a0
leaq 0x2f38(%rip), %rsi      # 0x5b95
movl $0x3, %edx
movq %rax, %rdi
callq 0x2150
movq %rbx, %rdi
callq 0x20b0
movl %ebp, 0x54b4(%rip)      # 0x812c
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/fuad00[P]wifitool/code.cpp
// Function: help_func()
int help_func()	{
	progress(current_progress);    // Выводим АКТУАЛЬНУЮ строку прогресса

	cout << "\n[1] Для проверки и установки необходимых компонентов." << endl;
	cout << "[2] Для перевода сетевой карты в режим монитора." << endl;
	cout << "[3] Для прослушки сетей." << endl;
	cout << "[4] Для перехвата хендшейка." << endl;
	cout << "[5] Для перебора пароля\n" << endl;
	return 0;
}

// Assembly:
pushq %rbx
movl 0x5475(%rip), %edi      # 0x812c
callq 0x2bb3
movq 0x530d(%rip), %rbx      # 0x7fd0
leaq 0x267e(%rip), %rsi      # 0x5348
movl $0x61, %edx
movq %rbx, %rdi
callq 0x2150
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
leaq 0x26a5(%rip), %rsi      # 0x53aa
movl $0x55, %edx
movq %rbx, %rdi
callq 0x2150
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
leaq 0x26c0(%rip), %rsi      # 0x5400
movl $0x29, %edx
movq %rbx, %rdi
callq 0x2150
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
leaq 0x26af(%rip), %rsi      # 0x542a
movl $0x31, %edx
movq %rbx, %rdi
callq 0x2150
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
leaq 0x26a6(%rip), %rsi      # 0x545c
movl $0x29, %edx
movq %rbx, %rdi
callq 0x2150
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/fuad00[P]wifitool/code.cpp
// Function: check_func()
bool check_func()	{
	progress(5);              // Выводим строку прогресса
	cout << "\nПроверка необходимых компонентов....." << endl;
	if (system("which aircrack-ng > /dev/null 2>&1"))	{      // Если компонент отсутствует в системе
		system("apt-get update && apt-get install -y aircrack-ng");         // Устанавливаем компонент
		check_func();     // Перезапускаем функцию проверки чтобы убедиться, что компонент установился
	}

	else if (system("which xterm > /dev/null 2>&1"))	{
		system("apt-get update && apt-get install -y xterm");
		check_func();
	}
	else	{
	progress(10);             // Выводим строку прогресса
	cout << "\n[!] Все компоненты уже установлены! Можете продолжать работу.\n" << endl;
	}
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %ebx, %ebx
movq 0x51ce(%rip), %r14      # 0x7fd0
leaq 0x267d(%rip), %r15      # 0x5486
leaq 0x26bb(%rip), %r12      # 0x54cb
leaq 0x26d7(%rip), %rbp      # 0x54ee
movl $0x5, %edi
callq 0x2bb3
movl $0x44, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2150
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq %r12, %rdi
callq 0x20f0
testl %eax, %eax
je 0x2e69
movq %rbp, %rdi
jmp 0x2e80
leaq 0x26af(%rip), %rdi      # 0x551f
callq 0x20f0
testl %eax, %eax
je 0x2e8f
leaq 0x26bc(%rip), %rdi      # 0x553c
callq 0x20f0
xorb $0x1, %bl
orb %bl, %r13b
movb $0x1, %bl
jmp 0x2e17
movl $0xa, %edi
callq 0x2bb3
leaq 0x26c7(%rip), %rsi      # 0x5567
movl $0x70, %edx
movq %r14, %rdi
callq 0x2150
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
notb %bl
orb %r13b, %bl
andb $0x1, %bl
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/fuad00[P]wifitool/code.cpp
// Function: monitor_func()
bool monitor_func()	{
	progress(15);      // Выводим строку прогресса
	system("xterm -title 'Переводим карту в режим монитора...' -e sudo airmon-ng check kill > /dev/null 2>&1"); // Убиваем все процессы (демоны), которые используются на данный момент сетевой картой
	progress(20);      // Выводим строку прогресса
	string monitor_mode = "xterm -title 'Переводим карту в режим монитора...' -e sudo airmon-ng start " + wireless_card + " > /dev/null 2>&1"; //пробуем перевести выбранную? карту в режим монитора
	const char *firing_command_monitor_mode = monitor_mode.c_str();
	system(firing_command_monitor_mode);
	progress(25);      // Выводим строку прогресса
	cout << "\n[+] Готово! Используйте [3] чтобы понюхать WiFi.\n" << endl;
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movl $0xf, %edi
callq 0x2bb3
leaq 0x26d3(%rip), %rdi      # 0x55d8
callq 0x20f0
movl $0x14, %edi
callq 0x2bb3
leaq 0x273a(%rip), %rsi      # 0x5655
leaq 0x521e(%rip), %rdx      # 0x8140
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
callq 0x4031
leaq 0x25a6(%rip), %rsi      # 0x54dc
movq %rbx, %rdi
callq 0x2200
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2f65
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x2f6c
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f9f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x8(%rsp), %rdi
callq 0x20f0
movl $0x19, %edi
callq 0x2bb3
movq 0x5016(%rip), %rbx      # 0x7fd0
leaq 0x26fc(%rip), %rsi      # 0x56bd
movl $0x50, %edx
movq %rbx, %rdi
callq 0x2150
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq 0x4fe4(%rip), %rdi      # 0x7fd0
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x3010
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2140
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x304c
movq 0x38(%rsp), %rsi
jmp 0x3044
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x304c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2140
movq %rbx, %rdi
callq 0x21c0
// File: /workspace/github_cpp_makefile_star2_O1/fuad00[P]wifitool/code.cpp
// Function: sniff_real_func()
bool sniff_real_func()	{
	string airodump1 = "timeout 9 xterm -title 'Поиск WiFi...' -e sudo airodump-ng " + wireless_card_monitormode + " --output-format=csv -w nets.csv --write-interval 3";
	const char *airodump_init1 = airodump1.c_str();
	system(airodump_init1);
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
leaq 0x2a63(%rip), %rsi      # 0x5ac5
leaq 0x5117(%rip), %rdx      # 0x8180
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
callq 0x4031
leaq 0x2a89(%rip), %rsi      # 0x5b06
movq %rbx, %rdi
callq 0x2200
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x30ac
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x30b3
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x30e6
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x8(%rsp), %rdi
callq 0x20f0
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x3107
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2140
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x3143
movq 0x18(%rsp), %rsi
jmp 0x313b
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3143
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2140
movq %rbx, %rdi
callq 0x21c0
// File: /workspace/github_cpp_makefile_star2_O1/fuad00[P]wifitool/code.cpp
// Function: animation()
bool animation() {

	for(int t=0; t<15; t++)	{
		string channel_anim = " Настраиваем сетевой канал";

		cout << "[)]" << channel_anim << "." << endl;
		system("sleep 0.1 && clear");
		cout << "[|]" << channel_anim << ".." << endl;
		system("sleep 0.1 && clear");
		cout << "[(]" << channel_anim << "..." << endl;
		system("sleep 0.1 && clear");
		cout << "[|]" << channel_anim << ".." << endl;
		system("sleep 0.1 && clear");

	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl $0xf, %ebp
movq 0x43d2(%rip), %r12      # 0x7fd0
leaq 0x1f6b(%rip), %rbx      # 0x5b70
leaq 0x1f77(%rip), %r14      # 0x5b83
leaq 0x18b5(%rip), %r15      # 0x54c8
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x8(%rsp), %rdi
leaq 0x1f11(%rip), %rsi      # 0x5b3a
leaq 0x1f3b(%rip), %rdx      # 0x5b6b
callq 0x4134
movl $0x3, %edx
movq %r12, %rdi
leaq 0x1f28(%rip), %rsi      # 0x5b6c
callq 0x2150
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r12, %rdi
callq 0x2150
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
leaq 0x1e43(%rip), %rsi      # 0x5ab0
callq 0x2150
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x20f0
movl $0x3, %edx
movq %r12, %rdi
movq %r14, %rsi
callq 0x2150
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r12, %rdi
callq 0x2150
movq %rax, %r13
movl $0x2, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2150
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x20f0
movl $0x3, %edx
movq %r12, %rdi
leaq 0x1e71(%rip), %rsi      # 0x5b87
callq 0x2150
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r12, %rdi
callq 0x2150
movq %rax, %r13
movl $0x3, %edx
movq %rax, %rdi
leaq 0x1788(%rip), %rsi      # 0x54c7
callq 0x2150
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x20f0
movl $0x3, %edx
movq %r12, %rdi
movq %r14, %rsi
callq 0x2150
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r12, %rdi
callq 0x2150
movq %rax, %r13
movl $0x2, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2150
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x20f0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x3df5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2140
decl %ebp
jne 0x3c13
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x3e2d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2140
movq %rbx, %rdi
callq 0x21c0
// File: /workspace/github_cpp_makefile_star2_O1/fuad00[P]wifitool/code.cpp
// Function: deauth_func2()
bool deauth_func2()	{
	string airplay_deauth = "xterm -title 'Глушим сеть...' -e sudo aireplay-ng --deauth 7 -a " + target_bssid + " " + wireless_card_monitormode; // -c Client_MAC
	const char *deauther = airplay_deauth.c_str();
	system(deauther); // Запуск команды для деаута клиентов
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
leaq 0x1bb5(%rip), %rsi      # 0x59fa
leaq 0x441c(%rip), %rdx      # 0x8268
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
callq 0x4031
leaq 0x199c(%rip), %rsi      # 0x57fc
movq %rbx, %rdi
callq 0x2200
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3e8f
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x3e96
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x20(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x42c7(%rip), %rsi      # 0x8180
movq 0x42c8(%rip), %rdx      # 0x8188
callq 0x2080
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3eeb
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x3ef2
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x3f21
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2140
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3f3c
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2140
movq (%rsp), %rdi
callq 0x20f0
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x3f5b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2140
xorl %eax, %eax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x3fb4
movq 0x10(%rsp), %rsi
jmp 0x3fac
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x3f99
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x3f99
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3fb4
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2140
movq %rbx, %rdi
callq 0x21c0