// File: /workspace/github_c_makefile_star2_O3/SimpleDoger[P]Darknet_CPU_Only/go.c
// Function: network_predict_rotations
float *network_predict_rotations(network *net, float *next)
{
    int n = net->batch;
    float *in = calloc(19*19*3*n, sizeof(float));
    image im = float_to_image(19, 19, 3, next);
    int i,j;
    int *inds = random_index_order(0, 8);
    for(j = 0; j < n; ++j){
        i = inds[j];
        rotate_image_cw(im, i);
        if(i >= 4) flip_image(im);
        memcpy(in + 19*19*3*j, im.data, 19*19*3*sizeof(float));
        if(i >= 4) flip_image(im);
        rotate_image_cw(im, -i);
    }
    float *pred = network_predict(net, in);
    for(j = 0; j < n; ++j){
        i = inds[j];
        image im = float_to_image(19, 19, 1, pred + j*(19*19 + 2));
        if(i >= 4) flip_image(im);
        rotate_image_cw(im, -i);
        if(j > 0){
            axpy_cpu(19*19+2, 1, im.data, 1, pred, 1);
        }
    }
    free(in);
    free(inds);
    scal_cpu(19*19+2, 1./n, pred, 1);
    return pred;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r12
movq %rdi, %r14
movslq 0x4(%rdi), %r13
imulq $0x43b, %r13, %rdi      # imm = 0x43B
movl $0x4, %esi
callq 0x3250
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
movl $0x13, %esi
movl $0x13, %edx
movl $0x3, %ecx
movq %r12, %r8
callq 0x170ea
xorl %edi, %edi
movl $0x8, %esi
callq 0xeb5e
movq %rax, %rbp
testq %r13, %r13
jle 0x467a2
movq %r14, 0x38(%rsp)
movq %r13, %r14
imulq $0x10ec, %r13, %r12     # imm = 0x10EC
xorl %r13d, %r13d
movq %rbp, 0x18(%rsp)
movq %rbp, %r15
movl (%r15), %ebp
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movl %ebp, %edi
callq 0x1766f
cmpl $0x4, %ebp
jl 0x46697
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x1786a
leaq (%rbx,%r13), %rdi
movq 0x30(%rsp), %rsi
movl $0x10ec, %edx           # imm = 0x10EC
callq 0x32b0
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x1786a
jmp 0x466aa
leaq (%rbx,%r13), %rdi
movq 0x30(%rsp), %rsi
movl $0x10ec, %edx           # imm = 0x10EC
callq 0x32b0
negl %ebp
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movl %ebp, %edi
callq 0x1766f
addq $0x10ec, %r13           # imm = 0x10EC
addq $0x4, %r15
cmpq %r13, %r12
jne 0x46630
movq 0x38(%rsp), %rdi
movq %rbx, %rsi
callq 0x32690
movq %rax, %r15
movq %r14, %r13
testl %r13d, %r13d
jle 0x467b2
xorl %r12d, %r12d
movq %r15, %r13
movq 0x18(%rsp), %rbp
movl (%rbp,%r12,4), %ebp
leaq 0x40(%rsp), %rdi
movl $0x13, %esi
movl $0x13, %edx
movl $0x1, %ecx
movq %r13, %r8
callq 0x170ea
cmpl $0x4, %ebp
jl 0x4673f
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x40(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x1786a
negl %ebp
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x40(%rsp), %xmm0
movups %xmm0, (%rsp)
movl %ebp, %edi
callq 0x1766f
testq %r12, %r12
je 0x46785
movq 0x50(%rsp), %rsi
movl $0x16b, %edi            # imm = 0x16B
movss 0xe896(%rip), %xmm0     # 0x55008
movl $0x1, %edx
movq %r15, %rcx
movl $0x1, %r8d
callq 0x29d31
incq %r12
addq $0x5ac, %r13            # imm = 0x5AC
cmpq %r12, %r14
movq 0x18(%rsp), %rbp
jne 0x46701
movq %r14, %r13
jmp 0x467b7
movq %r14, %rdi
movq %rbx, %rsi
callq 0x32690
movq %rax, %r15
jmp 0x467b7
movq 0x18(%rsp), %rbp
movq %rbx, %rdi
callq 0x3040
movq %rbp, %rdi
callq 0x3040
xorps %xmm0, %xmm0
cvtsi2sd %r13d, %xmm0
movsd 0xe979(%rip), %xmm1     # 0x55150
divsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
movl $0x16b, %edi            # imm = 0x16B
movq %r15, %rsi
movl $0x1, %edx
callq 0x29d61
movq %r15, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq