LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/lukasz-wiecaszek[P]h264iframedecoder/picture_cabac.cpp
// Function: ymn::h264::picture_cabac::decode_transform_size_8x8_flag()
int picture_cabac::decode_transform_size_8x8_flag()
{
    const int ctxIdxOffset = 399;
    int ctxIdxInc = 0;
    mb* curr_mb = m_context_variables.curr_mb;

    ctxIdxInc += (curr_mb->A != nullptr) && (MB_IS_INTRA_8x8(curr_mb->A->type));
    ctxIdxInc += (curr_mb->B != nullptr) && (MB_IS_INTRA_8x8(curr_mb->B->type));

    return m_cabac_decoder.decode_decision(ctxIdxOffset + ctxIdxInc);
}

// Assembly:
movq 0x28(%rdi), %rax
movq 0x18(%rax), %rcx
testq %rcx, %rcx
je 0x17244
movl 0x10(%rcx), %ecx
andl $0x3, %ecx
xorl %esi, %esi
cmpl $0x2, %ecx
sete %sil
addl $0x18f, %esi            # imm = 0x18F
jmp 0x17249
movl $0x18f, %esi            # imm = 0x18F
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x17262
movl 0x10(%rax), %ecx
andl $0x3, %ecx
xorl %eax, %eax
cmpl $0x2, %ecx
sete %al
jmp 0x17264
xorl %eax, %eax
addl %eax, %esi
addq $0xdc0, %rdi            # imm = 0xDC0
jmp 0x7ac8
// File: /workspace/github_cpp_makefile_star2_O3/lukasz-wiecaszek[P]h264iframedecoder/picture_cabac.cpp
// Function: ymn::h264::picture_cabac::decode_cbp_luma()
int picture_cabac::decode_cbp_luma()
{
    const int ctxIdxOffset = 73;
    int cbp_a, cbp_b, cbp = 0;
    int ctxIdxInc = 0;
    mb* curr_mb = m_context_variables.curr_mb;

    if (curr_mb->left)
        cbp_a = (((curr_mb->left_pair[0]->cbp_luma >> (m_context_variables.left_blocks[0] & (~1))) & 2) << 0) |
                (((curr_mb->left_pair[1]->cbp_luma >> (m_context_variables.left_blocks[2] & (~1))) & 2) << 2);
    else
        cbp_a = 0x0F;

    if (curr_mb->top)
        cbp_b = curr_mb->top->cbp_luma;
    else
        cbp_b = 0x0F;

    ctxIdxInc = !(cbp_a & 0x02) + 2 * !(cbp_b & 0x04);
    cbp += m_cabac_decoder.decode_decision(ctxIdxOffset + ctxIdxInc);
    ctxIdxInc = !(cbp   & 0x01) + 2 * !(cbp_b & 0x08);
    cbp += m_cabac_decoder.decode_decision(ctxIdxOffset + ctxIdxInc) << 1;
    ctxIdxInc = !(cbp_a & 0x08) + 2 * !(cbp   & 0x01);
    cbp += m_cabac_decoder.decode_decision(ctxIdxOffset + ctxIdxInc) << 2;
    ctxIdxInc = !(cbp   & 0x04) + 2 * !(cbp   & 0x02);
    cbp += m_cabac_decoder.decode_decision(ctxIdxOffset + ctxIdxInc) << 3;

    return cbp;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x28(%rdi), %rax
movl $0xf, %r15d
cmpq $0x0, 0x38(%rax)
movl $0xf, %r12d
je 0x172c2
movq 0x40(%rax), %rcx
movl 0x6c(%rcx), %edx
movq 0x48(%rbx), %rsi
movb (%rsi), %cl
andb $-0x2, %cl
sarl %cl, %edx
movq 0x48(%rax), %rdi
movb 0x8(%rsi), %cl
movl 0x6c(%rdi), %esi
andb $-0x2, %cl
sarl %cl, %esi
andl $0x2, %edx
andl $0x2, %esi
leal (%rdx,%rsi,4), %r12d
movq 0x50(%rax), %rax
testq %rax, %rax
je 0x172cf
movl 0x6c(%rax), %r15d
movl %r12d, %esi
shll $0x1e, %esi
sarl $0x1f, %esi
movl %r15d, %eax
shrl %eax
andl $0x2, %eax
subl %eax, %esi
addq $0xdc0, %rbx            # imm = 0xDC0
movl $0x4c, %ebp
addl %ebp, %esi
movq %rbx, %rdi
callq 0x7ac8
movl %eax, %r14d
movl %eax, %r13d
andl $0x1, %r13d
shrl $0x2, %r15d
andl $0x2, %r15d
orl %r13d, %r15d
movl $0x4c, %esi
subl %r15d, %esi
movq %rbx, %rdi
callq 0x7ac8
leal (%r14,%rax,2), %r14d
shrl $0x3, %r12d
leal (%r12,%r13,2), %eax
subl %eax, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x7ac8
leal (%r14,%rax,4), %r15d
movl %r15d, %esi
shll $0x1d, %esi
sarl $0x1f, %esi
andl $0x2, %r14d
subl %r14d, %esi
addl $0x4c, %esi
movq %rbx, %rdi
callq 0x7ac8
leal (%r15,%rax,8), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/lukasz-wiecaszek[P]h264iframedecoder/picture_cabac.cpp
// Function: ymn::h264::picture_cabac::decode_cbp_chroma()
int picture_cabac::decode_cbp_chroma()
{
    const int ctxIdxOffset = 77;
    int cbp_a, cbp_b;
    int ctxIdxInc = 0;
    mb* curr_mb = m_context_variables.curr_mb;

    if (curr_mb->left)
        cbp_a = curr_mb->left->cbp_chroma & 0x03;
    else
        cbp_a = 0;

    if (curr_mb->top)
        cbp_b = curr_mb->top->cbp_chroma & 0x03;
    else
        cbp_b = 0;

    ctxIdxInc = 0;
    if (cbp_a > 0)
        ctxIdxInc++;
    if (cbp_b > 0)
        ctxIdxInc += 2;
    if (m_cabac_decoder.decode_decision(ctxIdxOffset + ctxIdxInc) == 0)
        return 0;

    ctxIdxInc = 4;
    if (cbp_a == 2)
        ctxIdxInc++;
    if (cbp_b == 2)
        ctxIdxInc += 2;
    return 1 + m_cabac_decoder.decode_decision(ctxIdxOffset + ctxIdxInc);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rax
movq 0x38(%rax), %rcx
testq %rcx, %rcx
je 0x17384
movl 0x70(%rcx), %ebp
andl $0x3, %ebp
jmp 0x17386
xorl %ebp, %ebp
movq 0x50(%rax), %rax
testq %rax, %rax
je 0x173ad
movl 0x70(%rax), %eax
andl $0x3, %eax
xorl %ecx, %ecx
testl %ebp, %ebp
setne %cl
leal 0x2(%rcx), %esi
testl %eax, %eax
cmovel %ecx, %esi
cmpl $0x2, %eax
sete %r14b
jmp 0x173b8
xorl %esi, %esi
testl %ebp, %ebp
setne %sil
xorl %r14d, %r14d
addq $0xdc0, %rbx            # imm = 0xDC0
addl $0x4d, %esi
movq %rbx, %rdi
callq 0x7ac8
testl %eax, %eax
je 0x173ec
xorl %eax, %eax
cmpl $0x2, %ebp
sete %al
movzbl %r14b, %ecx
leal (%rax,%rcx,2), %esi
addl $0x51, %esi
movq %rbx, %rdi
callq 0x7ac8
incl %eax
jmp 0x173ee
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/lukasz-wiecaszek[P]h264iframedecoder/picture_cabac.cpp
// Function: ymn::h264::picture_cabac::decode_mb_qp_delta()
int picture_cabac::decode_mb_qp_delta()
{
    const int ctxIdxOffset = 60;
    int qp_delta = 0;
    int ctxIdxInc;

    ctxIdxInc = (m_context_variables.lastQPdelta != 0) ? 1 : 0;
    if (m_cabac_decoder.decode_decision(ctxIdxOffset + ctxIdxInc)) {
        ctxIdxInc = 2;
        qp_delta = 1;
        while (m_cabac_decoder.decode_decision(ctxIdxOffset + ctxIdxInc)) {
            ctxIdxInc = 3;
            qp_delta++;
        }

        /* Table 9-3 Assignment of syntax element to codeNum for signed Exp-Golomb coded syntax elements se(v) */
        if (qp_delta & 0x01)
            qp_delta =  ((qp_delta + 1) >> 1);
        else
            qp_delta = -((qp_delta + 1) >> 1);
    }

    return qp_delta;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x1, 0x30(%rdi)
leaq 0xdc0(%rdi), %r14
movl $0x3d, %esi
sbbl $0x0, %esi
movq %r14, %rdi
callq 0x7ac8
testl %eax, %eax
je 0x1743c
movl $0x3e, %esi
xorl %ebx, %ebx
movq %r14, %rdi
callq 0x7ac8
incl %ebx
movl $0x3f, %esi
testl %eax, %eax
jne 0x1741e
testb $0x1, %bl
jne 0x17440
shrl %ebx
negl %ebx
jmp 0x17444
xorl %ebx, %ebx
jmp 0x17444
incl %ebx
shrl %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/lukasz-wiecaszek[P]h264iframedecoder/picture_cabac.cpp
// Function: ymn::h264::picture_cabac::decode_intra_chroma_pred_mode()
int picture_cabac::decode_intra_chroma_pred_mode()
{
    const int ctxIdxOffset = 64;
    int ctxIdxInc = 0;
    mb* curr_mb = m_context_variables.curr_mb;

    /* No need to test for MB_IS_INTRA_NxN and MB_IS_INTRA_16x16,
       as intra_chroma_pred_mode shall be set to 0 for those macroblocks */

    ctxIdxInc += (curr_mb->left != nullptr) && (curr_mb->left->intra_chroma_pred_mode != 0);
    ctxIdxInc += (curr_mb->top != nullptr) && (curr_mb->top->intra_chroma_pred_mode != 0);

    if (m_cabac_decoder.decode_decision(ctxIdxOffset + ctxIdxInc) == 0)
        return 0;

    ctxIdxInc = 3;

    if (m_cabac_decoder.decode_decision(ctxIdxOffset + ctxIdxInc) == 0)
        return 1;

    if (m_cabac_decoder.decode_decision(ctxIdxOffset + ctxIdxInc) == 0)
        return 2;
    else
        return 3;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rdx
movq 0x38(%rdx), %rsi
xorl %eax, %eax
movl $0x0, %ecx
testq %rsi, %rsi
je 0x1746f
xorl %ecx, %ecx
cmpb $0x0, 0x68(%rsi)
setne %cl
movq 0x50(%rdx), %rdx
testq %rdx, %rdx
je 0x17481
xorl %eax, %eax
cmpb $0x0, 0x68(%rdx)
setne %al
addq $0xdc0, %rbx            # imm = 0xDC0
leal (%rax,%rcx), %esi
addl $0x40, %esi
movq %rbx, %rdi
callq 0x7ac8
testl %eax, %eax
je 0x174c5
movq %rbx, %rdi
movl $0x43, %esi
callq 0x7ac8
testl %eax, %eax
je 0x174c9
movq %rbx, %rdi
movl $0x43, %esi
callq 0x7ac8
cmpl $0x1, %eax
movl $0x3, %eax
sbbl $0x0, %eax
jmp 0x174ce
xorl %eax, %eax
jmp 0x174ce
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/lukasz-wiecaszek[P]h264iframedecoder/picture_cabac.cpp
// Function: ymn::h264::picture_cabac::decode_coded_block_flag(ymn::h264::ctx_block_cat_e, int)
int picture_cabac::decode_coded_block_flag(const enum ctx_block_cat_e ctxBlockCat, int idx)
{
    /* Table 9-34 – Syntax elements and associated types of binarization, maxBinIdxCtx, and ctxIdxOffset
       Table 9-40 – Assignment of ctxIdxBlockCatOffset to ctxBlockCat for syntax elements coded_block_flag,
       significant_coeff_flag, last_significant_coeff_flag, and coeff_abs_level_minus1 */
    static const int base_ctx[CAT_NUM] =
    {
        85 + 0, 85 + 4, 85 + 8, 85 + 12, 85 + 16, // ctxBlockCat < 5
        1012,                                     // ctxBlockCat == 5
        460 + 0, 460 + 4, 460 + 8,                // 5 < ctxBlockCat < 9
        1012 + 4,                                 // ctxBlockCat == 9
        472 + 0, 472 + 4, 472 + 8,                // 9 < ctxBlockCat < 13
        1012 + 8                                  // ctxBlockCat == 13
    };

    int nza, nzb;
    int ctxIdxInc = 0;

    if (idx < 16 * CC_MAX) { /* ac */
        mb_cache& nzc_cache = m_context_variables.non_zero_count_cache[idx / 16];
        const int cache_idx = mb_cache_idx[idx % 16];

        nza = nzc_cache[cache_idx - 1];
        nzb = nzc_cache[cache_idx - 8];
    }
    else { /* dc */
        mb* curr_mb = m_context_variables.curr_mb;

        if (curr_mb->left)
            nza = curr_mb->left->non_zero_count[idx];
        else
            nza = MB_IS_INTRA(curr_mb->type);

        if (curr_mb->top)
            nzb = curr_mb->top->non_zero_count[idx];
        else
            nzb = MB_IS_INTRA(curr_mb->type);
    }

    if (nza > 0)
        ctxIdxInc += 1;

    if (nzb > 0)
        ctxIdxInc += 2;

    return m_cabac_decoder.decode_decision(base_ctx[ctxBlockCat] + ctxIdxInc);
}

// Assembly:
cmpl $0x2f, %edx
jg 0x1750c
leal 0xf(%rdx), %eax
testl %edx, %edx
cmovnsl %edx, %eax
movl %eax, %ecx
sarl $0x4, %ecx
movslq %ecx, %rcx
leaq (%rcx,%rcx,4), %rcx
leaq (%rdi,%rcx,8), %rcx
andl $-0x10, %eax
subl %eax, %edx
movslq %edx, %rax
leaq 0x58d4(%rip), %rdx      # 0x1cdd0
movzbl (%rax,%rdx), %edx
movzbl 0x7f(%rdx,%rcx), %eax
movzbl 0x78(%rdx,%rcx), %ecx
jmp 0x1753f
movq 0x28(%rdi), %rcx
movq 0x38(%rcx), %rax
movl %edx, %edx
testq %rax, %rax
je 0x17522
movzbl 0x78(%rax,%rdx), %eax
jmp 0x17528
movl 0x10(%rcx), %eax
andl $0xf, %eax
movq 0x50(%rcx), %r8
testq %r8, %r8
je 0x17539
movzbl 0x78(%r8,%rdx), %ecx
jmp 0x1753f
movl 0x10(%rcx), %ecx
andl $0xf, %ecx
xorl %edx, %edx
testl %eax, %eax
setne %dl
leal 0x2(%rdx), %eax
testl %ecx, %ecx
cmovel %edx, %eax
addq $0xdc0, %rdi            # imm = 0xDC0
movl %esi, %ecx
leaq 0x5882(%rip), %rdx      # 0x1cde0
addl (%rdx,%rcx,4), %eax
movl %eax, %esi
jmp 0x7ac8
// File: /workspace/github_cpp_makefile_star2_O3/lukasz-wiecaszek[P]h264iframedecoder/picture_cabac.cpp
// Function: ymn::h264::picture_cabac::decode_residual_dc(int*, ymn::h264::ctx_block_cat_e, int, unsigned char const*, int)
void picture_cabac::decode_residual_dc(dctcoeff* block,
                                       const enum ctx_block_cat_e ctxBlockCat,
                                       const int idx,
                                       const uint8_t* scantable,
                                       const int max_coeff)
{
    if (decode_coded_block_flag(ctxBlockCat, idx))
        decode_residual_block(block, ctxBlockCat, idx, scantable, max_coeff);
    else {
        mb_cache& nzc_cache = m_context_variables.non_zero_count_cache[idx - 16 * CC_MAX];
        nzc_cache[0] = 0;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebx
movq %r8, %r14
movl %ecx, %ebp
movl %edx, %r12d
movq %rsi, %r13
movq %rdi, %r15
movl %edx, %esi
movl %ecx, %edx
callq 0x174d0
testl %eax, %eax
je 0x17931
movq %r15, %rdi
movq %r13, %rsi
movl %r12d, %edx
movl %ebp, %ecx
movq %r14, %r8
movl %ebx, %r9d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x175ce
addl $-0x30, %ebp
movslq %ebp, %rax
leaq (%rax,%rax,4), %rax
movb $0x0, 0x80(%r15,%rax,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/lukasz-wiecaszek[P]h264iframedecoder/picture_cabac.cpp
// Function: ymn::h264::picture_cabac::decode_residual_ac(int*, ymn::h264::ctx_block_cat_e, int, unsigned char const*, int)
void picture_cabac::decode_residual_ac(dctcoeff* block,
                                       const enum ctx_block_cat_e ctxBlockCat,
                                       const int idx,
                                       const uint8_t* scantable,
                                       const int max_coeff)
{
    if (max_coeff != 64 || m_context_variables.chroma_array_type == 3) {
        if (decode_coded_block_flag(ctxBlockCat, idx))
            decode_residual_block(block, ctxBlockCat, idx, scantable, max_coeff);
        else {
            mb_cache& nzc_cache = m_context_variables.non_zero_count_cache[idx / 16];
            const int cache_idx = mb_cache_idx[idx % 16];
            if (max_coeff == 64)
                mb_cache_fill_rectangle_2x2(nzc_cache, cache_idx, 0);
            else
                nzc_cache[cache_idx] = 0;
        }
    }
    else {
        /* When coded_block_flag is not present, it shall be inferred to be equal to 1. */
        decode_residual_block(block, ctxBlockCat, idx, scantable, max_coeff);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebx
movq %r8, %r15
movl %ecx, %r14d
movl %edx, %ebp
movq %rsi, %r13
movq %rdi, %r12
cmpl $0x40, %r9d
jne 0x17994
cmpl $0x3, 0x40(%r12)
je 0x17994
movq %r12, %rdi
movq %r13, %rsi
movl %ebp, %edx
movl %r14d, %ecx
movq %r15, %r8
movl $0x40, %r9d
jmp 0x179b6
movq %r12, %rdi
movl %ebp, %esi
movl %r14d, %edx
callq 0x174d0
testl %eax, %eax
je 0x179c9
movq %r12, %rdi
movq %r13, %rsi
movl %ebp, %edx
movl %r14d, %ecx
movq %r15, %r8
movl %ebx, %r9d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x175ce
leal 0xf(%r14), %ecx
testl %r14d, %r14d
cmovnsl %r14d, %ecx
movl %ecx, %eax
sarl $0x4, %eax
cltq
leaq (%rax,%rax,4), %rax
leaq (%r12,%rax,8), %rax
addq $0x80, %rax
andl $-0x10, %ecx
subl %ecx, %r14d
movslq %r14d, %rcx
leaq 0x53d7(%rip), %rdx      # 0x1cdd0
movzbl (%rcx,%rdx), %ecx
cmpl $0x40, %ebx
jne 0x17a0f
xorl %edx, %edx
movw %dx, (%rax,%rcx)
movw %dx, 0x8(%rax,%rcx)
jmp 0x17a13
movb $0x0, (%rax,%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/btbujiangjun[P]abcdl/include/cnn/Layer.h
// Function: abcdl::cnn::Layer::~Layer()
virtual ~Layer(){
        for(auto& weight : _batch_weights){delete weight;}
        _batch_weights.clear();
        delete _batch_bias;

        for(auto& weight : _delta_weights){delete weight;}
        _delta_weights.clear();
        delete _delta_bias;

        for(auto& weight : _weights){delete weight;}
        _weights.clear();
        delete _bias;

        for(auto& delta : _deltas){delete delta;}
        _deltas.clear();

        for(auto& activation : _activations){delete activation;}
        _activations.clear();
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x440ec(%rip), %rax     # 0x53f10
movq %rax, (%rdi)
movq 0x98(%rdi), %r15
movq 0xa0(%rdi), %r12
cmpq %r12, %r15
je 0xfe72
movq (%r15), %r14
testq %r14, %r14
je 0xfe4a
movq %r14, %rdi
callq 0x1840e
movq %r14, %rdi
callq 0x8300
addq $0x8, %r15
cmpq %r12, %r15
jne 0xfe3a
movq 0x98(%rbx), %rax
cmpq %rax, 0xa0(%rbx)
je 0xfe72
movq %rax, 0xa0(%rbx)
movq 0xb0(%rbx), %r14
testq %r14, %r14
je 0xfe86
movq %r14, %rdi
callq 0x1840e
movq %r14, %rdi
callq 0x8300
movq 0x78(%rbx), %r15
movq 0x80(%rbx), %r12
cmpq %r12, %r15
je 0xfed3
movq (%r15), %r14
testq %r14, %r14
je 0xfeae
movq %r14, %rdi
callq 0x1840e
movq %r14, %rdi
callq 0x8300
addq $0x8, %r15
cmpq %r12, %r15
jne 0xfe9e
movq 0x78(%rbx), %rax
cmpq %rax, 0x80(%rbx)
je 0xfed3
movq %rax, 0x80(%rbx)
movq 0x90(%rbx), %r14
testq %r14, %r14
je 0xfee7
movq %r14, %rdi
callq 0x1840e
movq %r14, %rdi
callq 0x8300
movq 0x40(%rbx), %r15
movq 0x48(%rbx), %r12
cmpq %r12, %r15
je 0xff2b
movq (%r15), %r14
testq %r14, %r14
je 0xff0c
movq %r14, %rdi
callq 0x1840e
movq %r14, %rdi
callq 0x8300
addq $0x8, %r15
cmpq %r12, %r15
jne 0xfefc
movq 0x40(%rbx), %rax
cmpq %rax, 0x48(%rbx)
je 0xff2b
movq %rax, 0x48(%rbx)
movq 0x58(%rbx), %r14
testq %r14, %r14
je 0xff3c
movq %r14, %rdi
callq 0x1840e
movq %r14, %rdi
callq 0x8300
movq 0xb8(%rbx), %r15
movq 0xc0(%rbx), %r12
cmpq %r12, %r15
je 0xff8f
movq (%r15), %r14
testq %r14, %r14
je 0xff67
movq %r14, %rdi
callq 0x1840e
movq %r14, %rdi
callq 0x8300
addq $0x8, %r15
cmpq %r12, %r15
jne 0xff57
movq 0xb8(%rbx), %rax
cmpq %rax, 0xc0(%rbx)
je 0xff8f
movq %rax, 0xc0(%rbx)
movq 0x60(%rbx), %r15
movq 0x68(%rbx), %r12
cmpq %r12, %r15
je 0xffcb
movq (%r15), %r14
testq %r14, %r14
je 0xffac
movq %r14, %rdi
callq 0x1840e
movq %r14, %rdi
callq 0x8300
addq $0x8, %r15
cmpq %r12, %r15
jne 0xff9c
movq 0x60(%rbx), %rax
cmpq %rax, 0x68(%rbx)
je 0xffcb
movq %rax, 0x68(%rbx)
movq 0xb8(%rbx), %rdi
testq %rdi, %rdi
je 0xffdc
callq 0x8300
movq 0x98(%rbx), %rdi
testq %rdi, %rdi
je 0xffed
callq 0x8300
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0xfffb
callq 0x8300
movq 0x60(%rbx), %rdi
testq %rdi, %rdi
je 0x10009
callq 0x8300
movq 0x40(%rbx), %rdi
addq $0x8, %rsp
testq %rdi, %rdi
je 0x10022
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x8300
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/btbujiangjun[P]abcdl/src/cnn/Layer.cpp
// Function: abcdl::cnn::SubSamplingLayer::initialize(abcdl::cnn::Layer*)
void SubSamplingLayer::initialize(Layer* pre_layer){
    CHECK(pre_layer->get_rows() % _scale == 0 && pre_layer->get_cols() % _scale == 0);
	
    this->_rows = pre_layer->get_rows() / _scale;
    this->_cols = pre_layer->get_cols() / _scale;

    //can't change out_channel_size.
    this->_in_channel_size = this->_out_channel_size = pre_layer->get_out_channel_size();

    this->_deltas.reserve(this->_out_channel_size);
    for(size_t i = 0; i != this->_out_channel_size; i++){
        this->_deltas.push_back(new abcdl::algebra::Mat());
        this->_activations.push_back(new abcdl::algebra::Mat());
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %rcx
movq 0xd0(%rdi), %rdi
movq %rcx, %rax
xorl %edx, %edx
divq %rdi
testq %rdx, %rdx
jne 0x13b53
movq 0x10(%r14), %rsi
movq %rsi, %rax
xorl %edx, %edx
divq %rdi
testq %rdx, %rdx
jne 0x13b53
movq %rcx, %rax
xorl %edx, %edx
divq %rdi
movq %rax, 0x8(%rbx)
movq %rsi, %rax
xorl %edx, %edx
divq %rdi
movq %rax, 0x10(%rbx)
movq 0x20(%r14), %rsi
movq %rsi, 0x20(%rbx)
movq %rsi, 0x18(%rbx)
leaq 0xb8(%rbx), %r14
movq %r14, %rdi
callq 0x15000
cmpq $0x0, 0x20(%rbx)
je 0x13b41
leaq 0x60(%rbx), %r15
xorl %ebp, %ebp
movq %rsp, %r12
movl $0x28, %edi
callq 0x8320
movq %rax, %r13
movq %rax, %rdi
callq 0x181b8
movq %r13, (%rsp)
movq 0xc0(%rbx), %rsi
cmpq 0xc8(%rbx), %rsi
je 0x13af1
movq %r13, (%rsi)
addq $0x8, 0xc0(%rbx)
jmp 0x13afc
movq %r14, %rdi
movq %r12, %rdx
callq 0x10156
movl $0x28, %edi
callq 0x8320
movq %rax, %r13
movq %rax, %rdi
callq 0x181b8
movq %r13, (%rsp)
movq 0x68(%rbx), %rsi
cmpq 0x70(%rbx), %rsi
je 0x13b29
movq %r13, (%rsi)
addq $0x8, 0x68(%rbx)
jmp 0x13b34
movq %r15, %rdi
movq %r12, %rdx
callq 0x10156
incq %rbp
cmpq 0x20(%rbx), %rbp
jne 0x13abb
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x26232(%rip), %rsi     # 0x39d8c
movq %rsp, %r15
movq %r15, %rdi
movl $0xf, %edx
movl $0x3, %ecx
callq 0x37222
leaq 0x26228(%rip), %rsi     # 0x39d9e
movl $0x58, %edx
movq %r15, %rdi
callq 0x8350
movq %rsp, %rdi
callq 0x3744a
movq 0x8(%r14), %rcx
movq 0x10(%r14), %rsi
movq 0xd0(%rbx), %rdi
jmp 0x13a74
movq %rax, %rbx
movq %rsp, %rdi
callq 0x3744a
jmp 0x13bb9
jmp 0x13bae
movq %rax, %rbx
movq %r13, %rdi
callq 0x8300
movq %rbx, %rdi
callq 0x8500
nop
// File: /workspace/github_cpp_makefile_star2_O3/btbujiangjun[P]abcdl/src/cnn/Layer.cpp
// Function: abcdl::cnn::SubSamplingLayer::forward(abcdl::cnn::Layer*)
void SubSamplingLayer::forward(Layer* pre_layer){
	abcdl::algebra::Mat activation;
    for(size_t i = 0; i != this->_out_channel_size; i++){
        _pooling->pool(activation, pre_layer->get_activation(i), this->_rows, this->_cols, this->_scale);
        this->set_activation(i, activation);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rsp), %rdi
callq 0x181b8
cmpq $0x0, 0x20(%r14)
je 0x13c37
xorl %r15d, %r15d
leaq 0x8(%rsp), %r12
movq 0xd8(%r14), %r13
movq %rbx, %rdi
movq %r15, %rsi
callq 0x15092
movq 0x8(%r14), %rcx
movq 0x10(%r14), %r8
movq 0xd0(%r14), %r9
movq (%r13), %r10
movq %r13, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq *0x10(%r10)
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x15120
incq %r15
cmpq 0x20(%r14), %r15
jne 0x13bee
leaq 0x8(%rsp), %rdi
callq 0x1840e
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1840e
movq %rbx, %rdi
callq 0x8500
// File: /workspace/github_cpp_makefile_star2_O3/btbujiangjun[P]abcdl/src/cnn/Layer.cpp
// Function: abcdl::cnn::ConvolutionLayer::forward(abcdl::cnn::Layer*)
void ConvolutionLayer::forward(Layer* pre_layer){
    for(size_t i = 0; i != this->_out_channel_size; i++){
        abcdl::algebra::Mat activation;
        abcdl::algebra::Mat pre_activation;
        for(size_t j = 0; j != pre_layer->get_out_channel_size(); j++){
            pre_activation = pre_layer->get_activation(j);
            pre_activation.convn(this->get_weight(j, i), _stride, abcdl::algebra::VALID);
            activation += pre_activation;//sum all channels of pre_layer
        }
        //add shared bias of channel in current layer.
        activation += this->_bias->get_data(i, 0);

        _activate_func->activate(activation, activation);
        this->set_activation(i, activation);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1e8, %rsp            # imm = 0x1E8
cmpq $0x0, 0x20(%rdi)
je 0x143be
movq %rsi, %rbx
movq %rdi, %r14
movq $0x0, 0x8(%rsp)
leaq 0x38(%rsp), %r12
leaq 0x10(%rsp), %r13
movq %r12, %r15
movq %r12, %rdi
callq 0x181b8
movq %r13, %rdi
callq 0x181b8
cmpq $0x0, 0x20(%rbx)
je 0x142ff
xorl %ebp, %ebp
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x15092
movq %r13, %rdi
movq %rax, %rsi
callq 0x1fe8e
movq 0x20(%r14), %r12
imulq %rbp, %r12
addq 0x8(%rsp), %r12
movq 0x40(%r14), %rax
movq 0x48(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r12
jae 0x142be
movq (%rax,%r12,8), %rsi
movq 0xd0(%r14), %rdx
movq %r13, %rdi
movl $0x1, %ecx
callq 0x294b4
movq %r15, %rdi
movq %r13, %rsi
callq 0x20394
incq %rbp
cmpq 0x20(%rbx), %rbp
jne 0x14259
jmp 0x142ff
leaq 0x60(%rsp), %rdi
leaq 0x25b6e(%rip), %rsi     # 0x39e38
movl $0x56, %edx
movl $0x3, %ecx
callq 0x37222
movl $0x24, %edx
leaq 0x60(%rsp), %rdi
leaq 0x25bd0(%rip), %rsi     # 0x39eba
callq 0x8350
leaq 0x60(%rsp), %rdi
callq 0x3744a
movq 0x40(%r14), %rax
jmp 0x14290
movq 0x58(%r14), %r12
movq 0x8(%r12), %rax
movq %rax, %rbp
imulq 0x8(%rsp), %rbp
imulq (%r12), %rax
cmpq %rax, %rbp
jae 0x1437e
shlq $0x2, %rbp
addq 0x10(%r12), %rbp
movq %r15, %r12
movq %r15, %rdi
movq %rbp, %rsi
callq 0x20308
movq 0xe0(%r14), %rdi
movq (%rdi), %rax
movq %r12, %rsi
movq %r12, %rdx
callq *0x10(%rax)
movq %r14, %rdi
movq 0x8(%rsp), %rsi
movq %r12, %rdx
callq 0x15120
movq %r13, %rdi
callq 0x1840e
movq %r12, %rdi
callq 0x1840e
movq 0x8(%rsp), %rcx
incq %rcx
movq %rcx, 0x8(%rsp)
cmpq 0x20(%r14), %rcx
jne 0x14239
jmp 0x143be
leaq 0x60(%rsp), %rdi
leaq 0x25bba(%rip), %rsi     # 0x39f44
movl $0x44, %edx
movl $0x3, %ecx
callq 0x37222
movl $0x1f, %edx
leaq 0x60(%rsp), %rdi
leaq 0x25bb3(%rip), %rsi     # 0x39f5d
callq 0x8350
leaq 0x60(%rsp), %rdi
callq 0x3744a
jmp 0x1431b
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x143d2
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x3744a
jmp 0x143eb
movq %rax, %rbx
jmp 0x143f5
jmp 0x143e8
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1840e
leaq 0x38(%rsp), %rdi
callq 0x1840e
movq %rbx, %rdi
callq 0x8500
nop
// File: /workspace/github_cpp_makefile_star2_O3/btbujiangjun[P]abcdl/src/cnn/Layer.cpp
// Function: abcdl::cnn::OutputLayer::forward(abcdl::cnn::Layer*)
void OutputLayer::forward(Layer* pre_layer){
    //concatenate pre_layer's all channel mat into array
	size_t size = pre_layer->get_rows() * pre_layer->get_cols() * this->_in_channel_size;
    real* data = new real[size];
    size_t idx = 0;
    for(size_t i = 0; i != this->_in_channel_size; i++){
        size_t activation_size = pre_layer->get_activation(i).get_size();
        memcpy(&data[idx], pre_layer->get_activation(i).data(), sizeof(real) * activation_size);
        idx += activation_size;
    }

    _pre_activation_array.set_shallow_data(data, size, 1);

    auto activation = _helper.dot(this->get_weight(0, 0), _pre_activation_array) + (*this->_bias);
    _activate_func->activate(activation, activation);
    this->set_activation(0, activation);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1e8, %rsp            # imm = 0x1E8
movq %rsi, %r15
movq %rdi, %rbx
movq 0x10(%rsi), %rcx
imulq 0x8(%rsi), %rcx
movq 0x18(%rdi), %r14
imulq %r14, %rcx
movq %rcx, %rax
shrq $0x3e, %rax
movq %rcx, (%rsp)
leaq (,%rcx,4), %rcx
xorl %edi, %edi
negq %rax
sbbq %rdi, %rdi
orq %rcx, %rdi
callq 0x8030
movq %rax, %rbp
testq %r14, %r14
je 0x14b1c
xorl %r14d, %r14d
xorl %r13d, %r13d
movq %rbx, 0x8(%rsp)
movq %r15, %rdi
movq %r13, %rsi
callq 0x15092
movq 0x8(%rax), %rbx
imulq (%rax), %rbx
leaq (,%r14,4), %r12
addq %rbp, %r12
movq %r15, %rdi
movq %r13, %rsi
callq 0x15092
movq 0x10(%rax), %rsi
leaq (,%rbx,4), %rdx
movq %r12, %rdi
callq 0x8270
addq %rbx, %r14
movq 0x8(%rsp), %rbx
incq %r13
cmpq 0x18(%rbx), %r13
jne 0x14ace
leaq 0x100(%rbx), %r15
movl $0x1, %ecx
movq %r15, %rdi
movq %rbp, %rsi
movq (%rsp), %rdx
callq 0x1878a
movq 0x40(%rbx), %rax
cmpq %rax, 0x48(%rbx)
je 0x14bb3
leaq 0x30(%rbx), %rsi
movq (%rax), %rdx
leaq 0x38(%rsp), %r14
movq %r14, %rdi
movq %r15, %rcx
callq 0x2eed4
movq 0x58(%rbx), %rdx
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x1ffd4
leaq 0x38(%rsp), %rdi
callq 0x1840e
movq 0x130(%rbx), %rdi
movq (%rdi), %rax
leaq 0x10(%rsp), %rdx
movq %rdx, %rsi
callq *0x10(%rax)
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x15120
leaq 0x10(%rsp), %rdi
callq 0x1840e
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2527e(%rip), %rsi     # 0x39e38
leaq 0x60(%rsp), %r14
movq %r14, %rdi
movl $0x56, %edx
movl $0x3, %ecx
callq 0x37222
leaq 0x252e2(%rip), %rsi     # 0x39eba
movl $0x24, %edx
movq %r14, %rdi
callq 0x8350
leaq 0x60(%rsp), %rdi
callq 0x3744a
movq 0x40(%rbx), %rax
jmp 0x14b41
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x3744a
jmp 0x14c1e
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
jmp 0x14c19
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1840e
movq %rbx, %rdi
callq 0x8500
// File: /workspace/github_cpp_makefile_star2_O3/btbujiangjun[P]abcdl/src/cnn/CNN.cpp
// Function: abcdl::cnn::CNN::set_layers(std::vector<abcdl::cnn::Layer*, std::allocator<abcdl::cnn::Layer*>>)
void CNN::set_layers(std::vector<abcdl::cnn::Layer*> layers){
    CHECK(layers.size() > 0 && layers[0]->get_layer_type() == abcdl::framework::INPUT);
    CHECK(layers[layers.size() - 1]->get_layer_type() == abcdl::framework::OUTPUT);

    abcdl::cnn::Layer* pre_layer = nullptr;
    for(auto& layer : layers){
        layer->initialize(pre_layer);
        _layers.push_back(layer);
        pre_layer = layer;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %r15
movq 0x8(%rsi), %r12
cmpq %r15, %r12
je 0x157e1
movq (%r15), %rax
cmpl $0x0, 0x28(%rax)
jne 0x157e1
movq -0x8(%r12), %rax
cmpl $0x4, 0x28(%rax)
jne 0x15825
cmpq %r12, %r15
je 0x157d2
leaq 0x18(%rbx), %r14
xorl %esi, %esi
movq (%r15), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x20(%rbx), %rsi
cmpq 0x28(%rbx), %rsi
je 0x157bb
movq (%r15), %rax
movq %rax, (%rsi)
addq $0x8, 0x20(%rbx)
jmp 0x157c6
movq %r14, %rdi
movq %r15, %rdx
callq 0x16566
movq (%r15), %rsi
addq $0x8, %r15
cmpq %r12, %r15
jne 0x1579b
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x247ed(%rip), %rsi     # 0x39fd5
movq %rsp, %r15
movq %r15, %rdi
movl $0x13, %edx
movl $0x3, %ecx
callq 0x37222
leaq 0x247e1(%rip), %rsi     # 0x39fe5
movl $0x59, %edx
movq %r15, %rdi
callq 0x8350
movq %rsp, %rdi
callq 0x3744a
movq (%r14), %r15
movq 0x8(%r14), %r12
jmp 0x15781
leaq 0x247a9(%rip), %rsi     # 0x39fd5
movq %rsp, %r15
movq %r15, %rdi
movl $0x14, %edx
movl $0x3, %ecx
callq 0x37222
leaq 0x247f7(%rip), %rsi     # 0x3a03f
movl $0x55, %edx
movq %r15, %rdi
callq 0x8350
movq %rsp, %rdi
callq 0x3744a
movq (%r14), %r15
movq 0x8(%r14), %r12
jmp 0x15790
jmp 0x1586b
movq %rax, %rbx
movq %rsp, %rdi
callq 0x3744a
movq %rbx, %rdi
callq 0x8500
// File: /workspace/github_cpp_makefile_star2_O3/btbujiangjun[P]abcdl/src/cnn/CNN.cpp
// Function: abcdl::cnn::CNN::backward(abcdl::algebra::Matrix<float> const&)
void CNN::backward(const abcdl::algebra::Mat& mat){
    int layer_size = _layers.size();
    abcdl::cnn::Layer* back_layer = nullptr;
    abcdl::cnn::Layer* pre_layer = nullptr;

    for(int k = layer_size - 1; k >= 0; k--){
        auto layer = _layers[k];
        if(layer->get_layer_type() == abcdl::framework::OUTPUT){
            ((OutputLayer*)layer)->set_y(mat.clone().reshape(mat.cols(), mat.rows()));
        }

        pre_layer = (k > 0) ? _layers[k - 1] : nullptr;
        layer->backward(pre_layer, back_layer);
        back_layer = layer;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movq %rsi, 0x10(%rsp)
movq 0x20(%rdi), %r12
movq %rdi, 0x8(%rsp)
subq 0x18(%rdi), %r12
shrq $0x3, %r12
testl %r12d, %r12d
jle 0x15f53
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
incq %r12
xorl %r13d, %r13d
leaq 0x18(%rsp), %r14
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rax,%r12,8), %rbp
cmpl $0x4, 0x28(%rbp)
jne 0x15ed1
movq %r14, %rdi
movq 0x10(%rsp), %rbx
movq %rbx, %rsi
callq 0x192a8
movq (%rbx), %r15
movq 0x8(%rbx), %rbx
movq %r15, %rax
imulq %rbx, %rax
movq 0x20(%rsp), %rcx
imulq 0x18(%rsp), %rcx
cmpq %rcx, %rax
jne 0x15f0d
movq %rbx, 0x18(%rsp)
movq %r15, 0x20(%rsp)
movq %rbp, %rdi
movq %r14, %rsi
callq 0x1625c
movq %r14, %rdi
callq 0x1840e
cmpq $0x2, %r12
jne 0x15edb
xorl %esi, %esi
jmp 0x15ee9
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rax,%r12,8), %rsi
movq (%rbp), %rax
movq %rbp, %rdi
movq %r13, %rdx
callq *0x20(%rax)
decq %r12
movq %rbp, %r13
cmpq $0x1, %r12
leaq 0x18(%rsp), %r14
ja 0x15e72
jmp 0x15f53
leaq 0x40(%rsp), %rdi
leaq 0x2402b(%rip), %rsi     # 0x39f44
movl $0x88, %edx
movl $0x3, %ecx
callq 0x37222
movl $0x28, %edx
leaq 0x40(%rsp), %r14
movq %r14, %rdi
leaq 0x24394(%rip), %rsi     # 0x3a2d0
callq 0x8350
movq %r14, %rdi
callq 0x3744a
leaq 0x18(%rsp), %r14
jmp 0x15eb4
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x3744a
jmp 0x15f77
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x1840e
movq %rbx, %rdi
callq 0x8500
nop
// File: /workspace/github_cpp_makefile_star2_O3/btbujiangjun[P]abcdl/src/cnn/CNN.cpp
// Function: abcdl::cnn::CNN::evaluate(abcdl::algebra::MatrixSet<float> const&, abcdl::algebra::MatrixSet<float> const&)
size_t CNN::evaluate(const abcdl::algebra::MatSet& data_mat, const abcdl::algebra::MatSet& label_mat){
    size_t cnt = 0;
    size_t size = data_mat.size();
    for(size_t i = 0; i != size; i++){
        forward(data_mat[i]);
        if(label_mat[i].argmax() == _layers[_layers.size() - 1]->get_activation(0).argmax()){
            cnt++;
        }
    }
    return cnt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, 0x10(%rsp)
movq 0x8(%rsi), %rax
movq %rsi, 0x18(%rsp)
movq (%rsi), %rcx
subq %rcx, %rax
je 0x16091
movq %rdi, %r15
sarq $0x3, %rax
movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD
imulq %rax, %rcx
movq %rcx, 0x8(%rsp)
xorl %r13d, %r13d
leaq 0x20(%rsp), %rbp
xorl %r12d, %r12d
movq %rbp, %rdi
movq 0x18(%rsp), %rsi
movq %r13, %rdx
callq 0x1615c
movq %r15, %rdi
movq %rbp, %rsi
callq 0x15dc6
movq %rbp, %rdi
callq 0x1840e
movq %rbp, %rdi
movq 0x10(%rsp), %rsi
movq %r13, %rdx
callq 0x1615c
movq %rbp, %rdi
callq 0x295e6
movq %rax, %rbx
movq 0x20(%r15), %rax
movq -0x8(%rax), %rdi
xorl %esi, %esi
callq 0x15092
movq %rax, %rdi
callq 0x295e6
xorl %r14d, %r14d
cmpq %rax, %rbx
sete %r14b
movq %rbp, %rdi
callq 0x1840e
addq %r14, %r12
incq %r13
cmpq %r13, 0x8(%rsp)
jne 0x1601b
jmp 0x16094
xorl %r12d, %r12d
movq %r12, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x160a8
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x1840e
movq %rbx, %rdi
callq 0x8500
nop
// File: /workspace/github_cpp_makefile_star2_O3/btbujiangjun[P]abcdl/include/cnn/Layer.h
// Function: abcdl::cnn::Layer::update_gradient(unsigned long, float)
void update_gradient(const size_t batch_size,
                         const real alpha){
        real learning_rate = alpha / batch_size;
        for(size_t i = 0; i != _weights.size(); i++){
            _weights[i]->operator-=(_batch_weights[i]->operator*(learning_rate));
        }
        if(_bias->get_size() > 0){
            _bias->operator-=(_batch_bias->operator*(learning_rate));
        }

        for(auto& weight : _batch_weights){
            weight->reset();
        }
        _batch_bias->reset();
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
testq %rsi, %rsi
js 0x16306
cvtsi2ss %rsi, %xmm1
jmp 0x1631b
movq %rsi, %rax
shrq %rax
andl $0x1, %esi
orq %rax, %rsi
cvtsi2ss %rsi, %xmm1
addss %xmm1, %xmm1
divss %xmm1, %xmm0
movss %xmm0, 0x4(%rsp)
movq 0x40(%rbx), %rax
cmpq %rax, 0x48(%rbx)
je 0x16380
xorl %r13d, %r13d
leaq 0x8(%rsp), %r14
leaq 0x4(%rsp), %r15
movq (%rax,%r13,8), %r12
movq 0x98(%rbx), %rax
movq (%rax,%r13,8), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x20e44
movq %r12, %rdi
movq %r14, %rsi
callq 0x20b4e
movq %r14, %rdi
callq 0x1840e
incq %r13
movq 0x40(%rbx), %rax
movq 0x48(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r13
jne 0x1633c
movq 0x58(%rbx), %r14
movq 0x8(%r14), %rax
imulq (%r14), %rax
testq %rax, %rax
je 0x163bf
movq 0xb0(%rbx), %rsi
leaq 0x8(%rsp), %r15
leaq 0x4(%rsp), %rdx
movq %r15, %rdi
callq 0x20e44
movq %r14, %rdi
movq %r15, %rsi
callq 0x20b4e
leaq 0x8(%rsp), %rdi
callq 0x1840e
movq 0x98(%rbx), %r15
movq 0xa0(%rbx), %r12
cmpq %r12, %r15
je 0x163f3
leaq 0x8(%rsp), %r14
movq (%r15), %rdi
movl $0x0, 0x8(%rsp)
movq %r14, %rsi
callq 0x19342
addq $0x8, %r15
cmpq %r12, %r15
jne 0x163d7
movq 0xb0(%rbx), %rdi
leaq 0x8(%rsp), %rsi
movl $0x0, (%rsi)
callq 0x19342
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x1641a
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1840e
movq %rbx, %rdi
callq 0x8500
nop
// File: /workspace/github_cpp_makefile_star2_O3/btbujiangjun[P]abcdl/src/framework/Pool.cpp
// Function: abcdl::framework::MaxPooling::pool(abcdl::algebra::Matrix<float>&, abcdl::algebra::Matrix<float> const&, unsigned long, unsigned long, unsigned long)
void MaxPooling::pool(abcdl::algebra::Mat& pool,
                      const abcdl::algebra::Mat& mat,
                      const size_t rows,
                      const size_t cols,
                      const size_t scale){
    real* data = new real[rows * cols];
    for(size_t j = 0; j != rows; j++){
        for(size_t k = 0; k != cols; k++){
            real pooling_value = 0;
            for(size_t m = 0; m != scale; m++){
                for(size_t n = 0; n != scale; n++){
                    real value = mat.get_data(j * scale + m, k * scale + n);
                    if((m == 0 && n == 0) || value > pooling_value){
                        pooling_value = value;
                    }
                }
            }
            data[j * cols + k] = pooling_value;
        }
    }
    pool.set_shallow_data(data, rows, cols);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
movq %r9, %r15
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r13
movq %rsi, 0x20(%rsp)
movq %r8, %rax
imulq %rcx, %rax
movq %rax, %rcx
shrq $0x3e, %rcx
shlq $0x2, %rax
xorl %edi, %edi
negq %rcx
sbbq %rdi, %rdi
orq %rax, %rdi
callq 0x8030
movq %rbx, %rcx
movq %rax, 0x10(%rsp)
movq %r14, 0x18(%rsp)
testq %r14, %r14
je 0x169d2
movq %r15, %rsi
xorl %r8d, %r8d
leaq 0x50(%rsp), %rdi
movq $0x0, (%rsp)
movq %rcx, 0x30(%rsp)
movq %r15, 0x28(%rsp)
testq %rcx, %rcx
je 0x169b9
movq (%rsp), %rax
imulq %rcx, %rax
movq 0x10(%rsp), %rdx
leaq (%rdx,%rax,4), %r9
xorl %ebp, %ebp
xorl %r10d, %r10d
movq %r8, 0x40(%rsp)
movq %r9, 0x38(%rsp)
xorps %xmm0, %xmm0
testq %rsi, %rsi
je 0x169a4
movq %r8, %r15
xorl %r14d, %r14d
xorl %ebx, %ebx
movaps %xmm0, %xmm1
movq 0x8(%r13), %rax
movq %r15, %r12
imulq %rax, %r12
addq %rbp, %r12
addq %rbx, %r12
imulq (%r13), %rax
cmpq %rax, %r12
jae 0x1692b
movq 0x10(%r13), %rax
movss (%rax,%r12,4), %xmm0
movq %rbx, %rax
orq %r14, %rax
je 0x1691e
maxss %xmm1, %xmm0
incq %rbx
movaps %xmm0, %xmm1
cmpq %rbx, %rsi
jne 0x168ed
jmp 0x16995
movss %xmm1, 0xc(%rsp)
movq %r10, 0x48(%rsp)
leaq 0x23607(%rip), %rsi     # 0x39f44
movl $0x44, %edx
movl $0x3, %ecx
callq 0x37222
movl $0x1f, %edx
leaq 0x50(%rsp), %rdi
leaq 0x23600(%rip), %rsi     # 0x39f5d
callq 0x8350
leaq 0x50(%rsp), %rdi
callq 0x3744a
movq 0x30(%rsp), %rcx
movq 0x28(%rsp), %rsi
movq 0x40(%rsp), %r8
leaq 0x50(%rsp), %rdi
movq 0x38(%rsp), %r9
movq 0x48(%rsp), %r10
movss 0xc(%rsp), %xmm1
jmp 0x16908
incq %r14
incq %r15
cmpq %rsi, %r14
jne 0x168e8
movss %xmm0, (%r9,%r10,4)
incq %r10
addq %rsi, %rbp
cmpq %rcx, %r10
jne 0x168d6
movq (%rsp), %rdx
incq %rdx
addq %rsi, %r8
movq %rdx, (%rsp)
cmpq 0x18(%rsp), %rdx
jne 0x168ad
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x1878a
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x3744a
movq %rbx, %rdi
callq 0x8500
nop
// File: /workspace/github_cpp_makefile_star2_O3/sanaa-khan[P]mini-linux-shell/gbsh.cpp
// Function: printWorkingDirectory(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>)
void printWorkingDirectory(vector<string> tokens) {

	int len = 50;
	char cwd[len];

	getcwd(cwd, len);

	if (tokens.size() == 1)
		cout << cwd << "\n";

	// for redirecting output
	else if (tokens[1].size() == 1 and tokens[1][0] == '>') {
		if (tokens.size() == 3) {
			string filename = tokens[2];

			int file_desc = open(filename.c_str(), O_WRONLY | O_CREAT |  O_TRUNC, 0777);
			output = dup(1);

			close(1);
			dup(file_desc);
			close(file_desc);
			
			cout << cwd;
			
			fflush(stdout); 

			dup2(output, 1);
			close(output);
		}

		else if (tokens.size() < 3) {
			cout << "\033[1;31m" << "Error: ";
			cout << "\033[0;38m" << "Output file not provided.\n";
		}

		else {
			cout << "\033[1;31m" << "Error: ";
			cout << "\033[0;38m" << "Too many arguments.\n";
		}
	}
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %rdi
movl $0x32, %esi
callq 0x20a0
movq (%rbx), %rax
movq 0x8(%rbx), %r14
subq %rax, %r14
cmpq $0x20, %r14
jne 0x3097
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0x2090
movq 0x3f58(%rip), %r14      # 0x6fc8
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x21b0
leaq 0x20c4(%rip), %rsi      # 0x5149
movl $0x1, %edx
movq %r14, %rdi
callq 0x21b0
jmp 0x3175
cmpq $0x1, 0x28(%rax)
jne 0x3175
movq 0x20(%rax), %rcx
cmpb $0x3e, (%rcx)
jne 0x3175
cmpq $0x60, %r14
jne 0x317d
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
addq %rsi, %rdx
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x4532
movq (%rbx), %rdi
movl $0x241, %esi            # imm = 0x241
movl $0x1ff, %edx            # imm = 0x1FF
xorl %eax, %eax
callq 0x20e0
movl %eax, %ebx
movl $0x1, %edi
callq 0x2280
movl %eax, 0x40ba(%rip)      # 0x71b8
movl $0x1, %edi
callq 0x2320
movl %ebx, %edi
callq 0x2280
movl %ebx, %edi
callq 0x2320
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0x2090
movq 0x3e9e(%rip), %rdi      # 0x6fc8
movq %rbx, %rsi
movq %rax, %rdx
callq 0x21b0
movq 0x3e6c(%rip), %rax      # 0x6fa8
movq (%rax), %rdi
callq 0x21c0
movl 0x406e(%rip), %edi      # 0x71b8
movl $0x1, %esi
callq 0x2150
movl 0x405e(%rip), %edi      # 0x71b8
callq 0x2320
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x3175
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21a0
addq $0x58, %rsp
popq %rbx
popq %r14
retq
movq 0x3e44(%rip), %rbx      # 0x6fc8
leaq 0x1ef6(%rip), %rsi      # 0x5081
movl $0x7, %edx
movq %rbx, %rdi
callq 0x21b0
leaq 0x1eea(%rip), %rsi      # 0x5089
movl $0x7, %edx
movq %rbx, %rdi
callq 0x21b0
leaq 0x1ede(%rip), %rsi      # 0x5091
movl $0x7, %edx
movq %rbx, %rdi
callq 0x21b0
movq 0x3e01(%rip), %rdi      # 0x6fc8
cmpq $0x40, %r14
ja 0x31de
leaq 0x1ec5(%rip), %rsi      # 0x5099
movl $0x1a, %edx
jmp 0x308d
leaq 0x1ed1(%rip), %rsi      # 0x50b6
movl $0x14, %edx
jmp 0x308d
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x3208
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21a0
movq %rbx, %rdi
callq 0x22f0
// File: /workspace/github_cpp_makefile_star2_O3/sanaa-khan[P]mini-linux-shell/gbsh.cpp
// Function: changeDirectory(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>)
void changeDirectory(vector<string> tokens) {

	string temp;

	if (tokens.size() > 1)
		temp = tokens[1];
	else
		temp = "/home";

	if (tokens.size() > 3) {
		cout << "\033[1;31m" << "Error: ";
		cout << "\033[0;38m" << "Too many arguments.\n";
		return;
	}

	const char* path = temp.c_str();

	chdir(path);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
movq (%rdi), %rsi
movq 0x8(%rdi), %rax
subq %rsi, %rax
cmpq $0x21, %rax
jb 0x324f
addq $0x20, %rsi
leaq 0x8(%rsp), %rdi
callq 0x20c0
jmp 0x326a
leaq 0x1e88(%rip), %rcx      # 0x50de
leaq 0x8(%rsp), %rdi
movl $0x5, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x22b0
movq 0x8(%rbx), %rax
subq (%rbx), %rax
cmpq $0x61, %rax
jb 0x32d9
movq 0x3d4a(%rip), %rdi      # 0x6fc8
leaq 0x1dfc(%rip), %rsi      # 0x5081
movl $0x7, %edx
callq 0x21b0
movq 0x3d32(%rip), %rdi      # 0x6fc8
leaq 0x1dec(%rip), %rsi      # 0x5089
movl $0x7, %edx
callq 0x21b0
movq 0x3d1a(%rip), %rdi      # 0x6fc8
leaq 0x1ddc(%rip), %rsi      # 0x5091
movl $0x7, %edx
callq 0x21b0
movq 0x3d02(%rip), %rdi      # 0x6fc8
leaq 0x1de9(%rip), %rsi      # 0x50b6
movl $0x14, %edx
callq 0x21b0
jmp 0x32e3
movq 0x8(%rsp), %rdi
callq 0x2240
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x32fa
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21a0
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x331c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21a0
movq %rbx, %rdi
callq 0x22f0
// File: /workspace/github_cpp_makefile_star2_O3/sanaa-khan[P]mini-linux-shell/gbsh.cpp
// Function: unsetEnvVar(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>)
void unsetEnvVar(vector<string> tokens) {

	char cwd[100];
	getcwd(cwd, 100);

	setenv("SHELL", cwd, 1);

	string name;

	if (tokens.size() == 1) {
		cout << "\033[1;31m" << "Error: ";
		cout << "\033[0;38m" << "Name of environment variable not given.\n";
		return;
	}

	if (tokens.size() == 2)
		name = tokens[1];

	else {
		cout << "\033[1;31m" << "Error: ";
		cout << "\033[0;38m" << "Too many arguments provided.\n";
		return;
	}

	char* var = getenv(name.c_str());

	if (var == NULL)
		cout << "'" << name << "' is undefined.\n";

	else
		unsetenv(name.c_str());
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %r14
movl $0x64, %esi
movq %r14, %rdi
callq 0x20a0
leaq 0x1833(%rip), %rdi      # 0x5069
movq %r14, %rsi
movl $0x1, %edx
callq 0x2270
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
movq (%rbx), %rsi
movq 0x8(%rbx), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq $0x2, %rax
je 0x38cc
cmpq $0x1, %rax
jne 0x38f7
movq 0x374b(%rip), %rdi      # 0x6fc8
leaq 0x17fd(%rip), %rsi      # 0x5081
movl $0x7, %edx
callq 0x21b0
movq 0x3733(%rip), %rdi      # 0x6fc8
leaq 0x17ed(%rip), %rsi      # 0x5089
movl $0x7, %edx
callq 0x21b0
movq 0x371b(%rip), %rdi      # 0x6fc8
leaq 0x17dd(%rip), %rsi      # 0x5091
movl $0x7, %edx
callq 0x21b0
movl $0x28, %edx
leaq 0x183a(%rip), %rsi      # 0x5104
jmp 0x394b
addq $0x20, %rsi
movq %rsp, %rdi
callq 0x20c0
movq (%rsp), %rbx
movq %rbx, %rdi
callq 0x21f0
testq %rax, %rax
je 0x3978
movq %rbx, %rdi
callq 0x2220
jmp 0x3957
movq 0x36ca(%rip), %rdi      # 0x6fc8
leaq 0x177c(%rip), %rsi      # 0x5081
movl $0x7, %edx
callq 0x21b0
movq 0x36b2(%rip), %rdi      # 0x6fc8
leaq 0x176c(%rip), %rsi      # 0x5089
movl $0x7, %edx
callq 0x21b0
movq 0x369a(%rip), %rdi      # 0x6fc8
leaq 0x175c(%rip), %rsi      # 0x5091
movl $0x7, %edx
callq 0x21b0
movl $0x1d, %edx
leaq 0x17e2(%rip), %rsi      # 0x512d
movq 0x3676(%rip), %rdi      # 0x6fc8
callq 0x21b0
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x396d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21a0
addq $0x88, %rsp
popq %rbx
popq %r14
retq
movq 0x3649(%rip), %rdi      # 0x6fc8
leaq 0x17c5(%rip), %rsi      # 0x514b
movl $0x1, %edx
callq 0x21b0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x3628(%rip), %rdi      # 0x6fc8
callq 0x21b0
leaq 0x17b8(%rip), %rsi      # 0x5164
movl $0x10, %edx
movq %rax, %rdi
callq 0x21b0
jmp 0x3957
jmp 0x39bd
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x39d6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21a0
movq %rbx, %rdi
callq 0x22f0