// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/network.c
// Function: network_predict_data_multi
matrix network_predict_data_multi(network *net, data test, int n)
{
    int i,j,b,m;
    int k = net->outputs;
    matrix pred = make_matrix(test.X.rows, k);
    float *X = calloc(net->batch*test.X.rows, sizeof(float));
    for(i = 0; i < test.X.rows; i += net->batch){
        for(b = 0; b < net->batch; ++b){
            if(i+b == test.X.rows) break;
            memcpy(X+b*test.X.cols, test.X.vals[i+b], test.X.cols*sizeof(float));
        }
        for(m = 0; m < n; ++m){
            float *out = network_predict(net, X);
            for(b = 0; b < net->batch; ++b){
                if(i+b == test.X.rows) break;
                for(j = 0; j < k; ++j){
                    pred.vals[i+b][j] += out[j+b*k]/n;
                }
            }
        }
    }
    free(X);
    return pred;   
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq %rdi, -0x18(%rbp)
movl %esi, -0x1c(%rbp)
movq -0x18(%rbp), %rcx
movl 0x84(%rcx), %ecx
movl %ecx, -0x30(%rbp)
movl 0x8(%rax), %edi
movl -0x30(%rbp), %esi
callq 0x39450
movq -0x48(%rbp), %rcx
movq %rax, -0x10(%rbp)
movq %rdx, -0x8(%rbp)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
imull 0x8(%rcx), %eax
movslq %eax, %rdi
movl $0x4, %esi
callq 0x3220
movq %rax, -0x38(%rbp)
movl $0x0, -0x20(%rbp)
movq -0x48(%rbp), %rcx
movl -0x20(%rbp), %eax
cmpl 0x8(%rcx), %eax
jge 0x3b9ba
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x3b8e4
movq -0x48(%rbp), %rcx
movl -0x20(%rbp), %eax
addl -0x28(%rbp), %eax
cmpl 0x8(%rcx), %eax
jne 0x3b8a2
jmp 0x3b8e4
movq -0x48(%rbp), %rax
movq -0x38(%rbp), %rdi
movl -0x28(%rbp), %ecx
imull 0xc(%rax), %ecx
movslq %ecx, %rcx
shlq $0x2, %rcx
addq %rcx, %rdi
movq 0x10(%rax), %rcx
movl -0x20(%rbp), %edx
addl -0x28(%rbp), %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rsi
movslq 0xc(%rax), %rdx
shlq $0x2, %rdx
callq 0x3280
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x3b885
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x3b9a6
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x3b160
movq %rax, -0x40(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x3b996
movq -0x48(%rbp), %rcx
movl -0x20(%rbp), %eax
addl -0x28(%rbp), %eax
cmpl 0x8(%rcx), %eax
jne 0x3b92c
jmp 0x3b996
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x30(%rbp), %eax
jge 0x3b986
movq -0x40(%rbp), %rax
movl -0x24(%rbp), %ecx
movl -0x28(%rbp), %edx
imull -0x30(%rbp), %edx
addl %edx, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
cvtsi2ssl -0x1c(%rbp), %xmm1
divss %xmm1, %xmm0
movq -0x8(%rbp), %rax
movl -0x20(%rbp), %ecx
addl -0x28(%rbp), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x24(%rbp), %rcx
addss (%rax,%rcx,4), %xmm0
movss %xmm0, (%rax,%rcx,4)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x3b933
jmp 0x3b988
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x3b90f
jmp 0x3b998
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x3b8eb
jmp 0x3b9a8
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
jmp 0x3b86e
movq -0x38(%rbp), %rdi
callq 0x3030
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)