// File: /workspace/github_c_makefile_star2_O2/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 $0x68, %rsp
movq %rsi, %rbx
movq %rdi, %r15
movslq 0x4(%rdi), %r12
imulq $0x43b, %r12, %rdi      # imm = 0x43B
pushq $0x4
popq %rsi
callq 0x3250
movq %rax, %rbp
leaq 0x20(%rsp), %rdi
pushq $0x13
popq %rdx
pushq $0x3
popq %rcx
movl %edx, %esi
movq %rbx, %r8
callq 0xc3de
xorl %r13d, %r13d
pushq $0x8
popq %rsi
xorl %edi, %edi
callq 0x3f24
movq %rax, 0x18(%rsp)
testl %r12d, %r12d
movl $0x0, %r14d
movq %r12, 0x48(%rsp)
cmovgl %r12d, %r14d
movq %rbp, %r12
cmpq %r13, %r14
je 0x3a9bf
movq 0x18(%rsp), %rax
movl (%rax,%r13,4), %ebx
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movl %ebx, %edi
callq 0xc9b3
cmpl $0x4, %ebx
jl 0x3a982
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0xcb93
movq 0x30(%rsp), %rsi
movl $0x10ec, %edx           # imm = 0x10EC
movq %r12, %rdi
callq 0x32b0
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0xcb93
jmp 0x3a994
movq 0x30(%rsp), %rsi
movl $0x10ec, %edx           # imm = 0x10EC
movq %r12, %rdi
callq 0x32b0
negl %ebx
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movl %ebx, %edi
callq 0xc9b3
incq %r13
addq $0x10ec, %r12           # imm = 0x10EC
jmp 0x3a90d
movq %r15, %rdi
movq %rbp, 0x40(%rsp)
movq %rbp, %rsi
callq 0x233e2
movq %rax, %r15
xorl %ebx, %ebx
pushq $0x13
popq %rbp
pushq $0x1
popq %r13
movq %rax, 0x38(%rsp)
cmpq %rbx, %r14
je 0x3aa78
movq 0x18(%rsp), %rax
movl (%rax,%rbx,4), %r12d
leaq 0x50(%rsp), %rdi
movl %ebp, %esi
movl %ebp, %edx
movl %r13d, %ecx
movq %r15, %r8
callq 0xc3de
cmpl $0x4, %r12d
jl 0x3aa24
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x50(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0xcb93
negl %r12d
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x50(%rsp), %xmm0
movups %xmm0, (%rsp)
movl %r12d, %edi
callq 0xc9b3
testq %rbx, %rbx
je 0x3aa69
movq 0x60(%rsp), %rsi
movl $0x16b, %edi            # imm = 0x16B
movss 0x115af(%rip), %xmm0    # 0x4c008
movl %r13d, %edx
movq 0x38(%rsp), %rcx
movl %r13d, %r8d
callq 0x1b3ed
incq %rbx
addq $0x5ac, %r15            # imm = 0x5AC
jmp 0x3a9e0
movq 0x40(%rsp), %rdi
callq 0x3040
movq 0x18(%rsp), %rdi
callq 0x3040
cvtsi2sdl 0x48(%rsp), %xmm0
movsd 0x1168e(%rip), %xmm1    # 0x4c128
divsd %xmm0, %xmm1
cvtsd2ss %xmm1, %xmm0
pushq $0x1
popq %rdx
movl $0x16b, %edi            # imm = 0x16B
movq 0x38(%rsp), %rbx
movq %rbx, %rsi
callq 0x1b423
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq