// File: /workspace/github_cpp_makefile_star2_O1/btbujiangjun[P]abcdl/src/cnn/Layer.cpp
// Function: abcdl::cnn::OutputLayer::initialize(abcdl::cnn::Layer*)
void OutputLayer::initialize(Layer* pre_layer){
    this->_cols = pre_layer->get_rows() * pre_layer->get_cols() * pre_layer->get_out_channel_size();
    this->_in_channel_size = pre_layer->get_out_channel_size();

    this->_weights.push_back(new abcdl::algebra::RandomMatrix<real>(this->_rows, this->_cols, 0.0, 0.5));
    this->_bias = new abcdl::algebra::Mat(0.0, _rows, 1);
    this->_activations.push_back(new abcdl::algebra::Mat());
    this->_deltas.push_back(new abcdl::algebra::Mat());

    this->_delta_weights.push_back(new abcdl::algebra::Mat(this->_rows, this->_cols));
    this->_delta_bias = new abcdl::algebra::Mat(0.0, _rows, 1);
    this->_batch_weights.push_back(new abcdl::algebra::Mat(this->_rows, this->_cols));
    this->_batch_bias = new abcdl::algebra::Mat(0.0, _rows, 1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x10(%rsi), %r15
imulq 0x8(%rsi), %r15
movq 0x20(%rsi), %rax
imulq %rax, %r15
movq %r15, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movl $0x38, %edi
callq 0x8320
movq %rax, %r14
movq 0x8(%rbx), %rsi
xorl %eax, %eax
leaq 0x24(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x20(%rsp), %r8
movl $0x3f000000, (%r8)      # imm = 0x3F000000
leaq 0x1c(%rsp), %r9
movl %eax, (%r9)
leaq 0x18(%rsp), %rdx
movl %eax, (%rdx)
movb $0x1, %bpl
movq %rdx, (%rsp)
movq %r14, %rdi
movq %r15, %rdx
callq 0x1c51e
movq %r14, 0x10(%rsp)
movq 0x48(%rbx), %rsi
cmpq 0x50(%rbx), %rsi
je 0x14b18
movq %r14, (%rsi)
addq $0x8, 0x48(%rbx)
jmp 0x14b28
leaq 0x40(%rbx), %rdi
xorl %ebp, %ebp
leaq 0x10(%rsp), %rdx
callq 0x157b6
movl $0x28, %edi
callq 0x8320
movq %rax, %r14
leaq 0x10(%rsp), %rsi
movl $0x0, (%rsi)
movq 0x8(%rbx), %rdx
movl $0x1, %ecx
movq %rax, %rdi
callq 0x184b2
movq %r14, 0x58(%rbx)
movl $0x28, %edi
callq 0x8320
movq %rax, %r14
movq %rax, %rdi
callq 0x18440
movq %r14, 0x10(%rsp)
movq 0x68(%rbx), %rsi
cmpq 0x70(%rbx), %rsi
je 0x14b83
movq %r14, (%rsi)
addq $0x8, 0x68(%rbx)
jmp 0x14b91
leaq 0x60(%rbx), %rdi
leaq 0x10(%rsp), %rdx
callq 0x10430
movl $0x28, %edi
callq 0x8320
movq %rax, %r14
movq %rax, %rdi
callq 0x18440
movq %r14, 0x10(%rsp)
movq 0xc0(%rbx), %rsi
cmpq 0xc8(%rbx), %rsi
je 0x14bc8
movq %r14, (%rsi)
addq $0x8, 0xc0(%rbx)
jmp 0x14bd9
leaq 0xb8(%rbx), %rdi
leaq 0x10(%rsp), %rdx
callq 0x10430
movl $0x28, %edi
callq 0x8320
movq %rax, %r14
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
movq %rax, %rdi
callq 0x1845e
movq %r14, 0x10(%rsp)
movq 0x80(%rbx), %rsi
cmpq 0x88(%rbx), %rsi
je 0x14c18
movq %r14, (%rsi)
addq $0x8, 0x80(%rbx)
jmp 0x14c26
leaq 0x78(%rbx), %rdi
leaq 0x10(%rsp), %rdx
callq 0x10430
movl $0x28, %edi
callq 0x8320
movq %rax, %r14
leaq 0x10(%rsp), %rsi
movl $0x0, (%rsi)
movq 0x8(%rbx), %rdx
movl $0x1, %ecx
movq %rax, %rdi
callq 0x184b2
movq %r14, 0x90(%rbx)
movl $0x28, %edi
callq 0x8320
movq %rax, %r14
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
movq %rax, %rdi
callq 0x1845e
movq %r14, 0x10(%rsp)
movq 0xa0(%rbx), %rsi
cmpq 0xa8(%rbx), %rsi
je 0x14c95
movq %r14, (%rsi)
addq $0x8, 0xa0(%rbx)
jmp 0x14ca6
leaq 0x98(%rbx), %rdi
leaq 0x10(%rsp), %rdx
callq 0x10430
movl $0x28, %edi
callq 0x8320
movq %rax, %r14
leaq 0x10(%rsp), %rsi
movl $0x0, (%rsi)
movq 0x8(%rbx), %rdx
movl $0x1, %ecx
movq %rax, %rdi
callq 0x184b2
movq %r14, 0xb0(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x14ced
jmp 0x14ced
jmp 0x14ced
jmp 0x14ced
jmp 0x14ced
jmp 0x14ced
movq %rax, %rbx
movq %r14, %rdi
callq 0x8300
movq %rbx, %rdi
callq 0x8500
movq %rax, %rbx
testb %bpl, %bpl
jne 0x14cf0
jmp 0x14cf8