// File: /workspace/github_c_makefile_star2_O1/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, %r14
movq %rdi, %r15
movslq 0x4(%rdi), %rbx
imulq $0x43b, %rbx, %rdi      # imm = 0x43B
movl $0x4, %esi
callq 0x3260
movq %rax, 0x20(%rsp)
leaq 0x28(%rsp), %rdi
movl $0x13, %esi
movl $0x13, %edx
movl $0x3, %ecx
movq %r14, %r8
callq 0x1675b
xorl %edi, %edi
movl $0x8, %esi
callq 0xe374
movq %rax, %r14
testq %rbx, %rbx
jle 0x44435
xorl %r13d, %r13d
movq 0x20(%rsp), %r12
movl (%r14,%r13,4), %ebp
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x28(%rsp), %xmm0
movups %xmm0, (%rsp)
movl %ebp, %edi
callq 0x16d91
cmpl $0x4, %ebp
jl 0x443f4
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x28(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x16f91
movq 0x38(%rsp), %rsi
movl $0x10ec, %edx           # imm = 0x10EC
movq %r12, %rdi
callq 0x32c0
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x28(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x16f91
jmp 0x44406
movq 0x38(%rsp), %rsi
movl $0x10ec, %edx           # imm = 0x10EC
movq %r12, %rdi
callq 0x32c0
negl %ebp
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x28(%rsp), %xmm0
movups %xmm0, (%rsp)
movl %ebp, %edi
callq 0x16d91
incq %r13
addq $0x10ec, %r12           # imm = 0x10EC
cmpq %r13, %rbx
jne 0x4438d
movq %r15, %rdi
movq 0x20(%rsp), %rsi
callq 0x307ea
movq %rax, %r15
testl %ebx, %ebx
jle 0x444e9
xorl %r12d, %r12d
movq %r15, %r13
movl (%r14,%r12,4), %ebp
leaq 0x40(%rsp), %rdi
movl $0x13, %esi
movl $0x13, %edx
movl $0x1, %ecx
movq %r13, %r8
callq 0x1675b
cmpl $0x4, %ebp
jl 0x44490
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x40(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x16f91
negl %ebp
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x40(%rsp), %xmm0
movups %xmm0, (%rsp)
movl %ebp, %edi
callq 0x16d91
testq %r12, %r12
je 0x444d6
movq 0x50(%rsp), %rsi
movl $0x16b, %edi            # imm = 0x16B
movss 0xeb45(%rip), %xmm0     # 0x53008
movl $0x1, %edx
movq %r15, %rcx
movl $0x1, %r8d
callq 0x285e9
incq %r12
addq $0x5ac, %r13            # imm = 0x5AC
cmpq %r12, %rbx
jne 0x44453
movq 0x20(%rsp), %rdi
callq 0x3040
movq %r14, %rdi
callq 0x3040
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
movsd 0xec1e(%rip), %xmm1     # 0x53128
divsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
movl $0x16b, %edi            # imm = 0x16B
movq %r15, %rsi
movl $0x1, %edx
callq 0x28619
movq %r15, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq