// File: /workspace/github_c_makefile_star2_O3/SimpleDoger[P]Darknet_CPU_Only/deconvolutional_layer.c
// Function: forward_deconvolutional_layer
void forward_deconvolutional_layer(const layer l, network net)
{
    int i;

    int m = l.size*l.size*l.n;
    int n = l.h*l.w;
    int k = l.c;

    fill_cpu(l.outputs*l.batch, 0, l.output, 1);

    for(i = 0; i < l.batch; ++i){
        float *a = l.weights;
        float *b = net.input + i*l.c*l.h*l.w;
        float *c = net.workspace;

        gemm_cpu(1,0,m,n,k,1,a,m,b,n,0,c,n);

        col2im_cpu(net.workspace, l.out_c, l.out_h, l.out_w, l.size, l.stride, l.pad, l.output+i*l.outputs);
    }
    if (l.batch_normalize) {
        forward_batchnorm_layer(l, net);
    } else {
        add_bias(l.output, l.biases, l.batch, l.n, l.out_w*l.out_h);
    }
    activate_array(l.output, l.batch*l.n*l.out_w*l.out_h, l.activation);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
leaq 0x90(%rsp), %rax
movl 0x90(%rax), %ecx
movl %ecx, 0x8(%rsp)
movl 0x84(%rax), %ecx
movl %ecx, (%rsp)
movl 0x6c(%rax), %r15d
movl 0x70(%rax), %r14d
movl 0x74(%rax), %ecx
movl %ecx, 0x4(%rsp)
movl 0x48(%rax), %ebx
movl 0x58(%rax), %ebp
movl %ebx, %edi
imull %ebp, %edi
movq 0x268(%rax), %rsi
xorps %xmm0, %xmm0
movq %rsi, 0x20(%rsp)
movl $0x1, %edx
callq 0x29d83
movl %ebx, %esi
testl %ebx, %ebx
jle 0xffc7
movl 0x8(%rsp), %eax
imull %eax, %eax
imull (%rsp), %eax
movq %rax, 0x50(%rsp)
movl %r14d, %eax
movl %r15d, %edx
imull %r15d, %eax
movq %rax, 0x30(%rsp)
leaq 0x90(%rsp), %rax
movq 0x250(%rax), %rcx
movq %rcx, 0x48(%rsp)
leaq 0x530(%rsp), %rcx
movq 0xd8(%rcx), %rdi
movq %rdi, 0x40(%rsp)
movq 0xf0(%rcx), %rcx
movq %rcx, 0x38(%rsp)
movl 0x80(%rax), %ecx
movl %ecx, 0x18(%rsp)
movl 0x78(%rax), %ecx
movl %ecx, 0x14(%rsp)
movl 0x7c(%rax), %ecx
movl %ecx, 0x10(%rsp)
movl 0x98(%rax), %ecx
movl %ecx, 0xc(%rsp)
movl 0xa8(%rax), %eax
movq %rax, 0x28(%rsp)
imull 0x4(%rsp), %edx
imull %r14d, %edx
movl %edx, 0x1c(%rsp)
xorl %r14d, %r14d
xorl %r12d, %r12d
xorl %r13d, %r13d
movq 0x38(%rsp), %rbx
movslq %r12d, %r12
movq 0x40(%rsp), %rax
leaq (%rax,%r12,4), %rax
subq $0x8, %rsp
xorps %xmm1, %xmm1
movl %ebp, %r15d
movl %esi, %ebp
movl $0x1, %edi
xorl %esi, %esi
movq 0x58(%rsp), %rdx
movq 0x38(%rsp), %rcx
movl 0xc(%rsp), %r8d
movss 0x450a0(%rip), %xmm0    # 0x55008
movq 0x50(%rsp), %r9
pushq %rcx
pushq %rbx
pushq %rcx
pushq %rax
pushq %rdx
callq 0xe40a
addq $0x30, %rsp
movslq %r14d, %r14
movq 0x20(%rsp), %rax
leaq (%rax,%r14,4), %rax
movq %rbx, %rdi
movl 0x18(%rsp), %esi
movl 0x14(%rsp), %edx
movl 0x10(%rsp), %ecx
movl 0x8(%rsp), %r8d
movl 0xc(%rsp), %r9d
pushq %rax
pushq 0x30(%rsp)
callq 0x29125
movl %ebp, %esi
movl %r15d, %ebp
addq $0x10, %rsp
incl %r13d
addl 0x1c(%rsp), %r12d
addl %r15d, %r14d
cmpl %esi, %r13d
jl 0xff32
movq 0x20(%rsp), %r12
leaq 0x90(%rsp), %r14
cmpl $0x0, 0x40(%r14)
je 0x10030
subq $0x5b0, %rsp            # imm = 0x5B0
movl $0x94, %ecx
movq %rsp, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x4a0(%rsp), %rdi
movl $0x22, %ecx
leaq 0xae0(%rsp), %rsi
rep  movsq (%rsi), %es:(%rdi)
callq 0x3c630
addq $0x5b0, %rsp            # imm = 0x5B0
movq 0x268(%r14), %r12
movl 0x48(%r14), %r13d
movl 0x78(%r14), %ebx
movl 0x84(%r14), %r15d
movl 0x7c(%r14), %ebp
jmp 0x1005b
movl %esi, %r13d
movq 0x230(%r14), %rsi
movl 0x78(%r14), %ebx
movl 0x7c(%r14), %ebp
movl %ebx, %r8d
imull %ebp, %r8d
movq %r12, %rdi
movl %r13d, %edx
movl (%rsp), %r15d
movl %r15d, %ecx
callq 0x1131e
imull %ebp, %ebx
imull %r13d, %r15d
imull %ebx, %r15d
movl 0x4(%r14), %edx
movq %r12, %rdi
movl %r15d, %esi
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x28c99