// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x14(%rbp)
imull $0x43b, -0x14(%rbp), %eax # imm = 0x43B
movslq %eax, %rdi
movl $0x4, %esi
callq 0x3220
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %r8
leaq -0x38(%rbp), %rdi
movl $0x13, %edx
movl $0x3, %ecx
movl %edx, %esi
callq 0xfbb0
xorl %edi, %edi
movl $0x8, %esi
callq 0x4470
movq %rax, -0x48(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x5a04b
movq -0x48(%rbp), %rax
movslq -0x40(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %edi
leaq -0x38(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x10240
cmpl $0x4, -0x3c(%rbp)
jl 0x59fcc
leaq -0x38(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x104c0
movq -0x20(%rbp), %rdi
imull $0x43b, -0x40(%rbp), %eax # imm = 0x43B
cltq
shlq $0x2, %rax
addq %rax, %rdi
movq -0x28(%rbp), %rsi
movl $0x10ec, %edx           # imm = 0x10EC
callq 0x3280
cmpl $0x4, -0x3c(%rbp)
jl 0x5a016
leaq -0x38(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x104c0
xorl %edi, %edi
subl -0x3c(%rbp), %edi
leaq -0x38(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x10240
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x59f65
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x3b160
movq %rax, -0x50(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x5a12e
movq -0x48(%rbp), %rax
movslq -0x40(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x3c(%rbp)
movq -0x50(%rbp), %r8
imull $0x16b, -0x40(%rbp), %eax # imm = 0x16B
cltq
shlq $0x2, %rax
addq %rax, %r8
leaq -0x68(%rbp), %rdi
movl $0x13, %edx
movl $0x1, %ecx
movl %edx, %esi
callq 0xfbb0
cmpl $0x4, -0x3c(%rbp)
jl 0x5a0ce
leaq -0x68(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x104c0
xorl %edi, %edi
subl -0x3c(%rbp), %edi
leaq -0x68(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x10240
cmpl $0x0, -0x40(%rbp)
jle 0x5a11e
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rcx
movl $0x16b, %edi            # imm = 0x16B
movss 0x16efc(%rip), %xmm0    # 0x7100c
movl $0x1, %r8d
movl %r8d, %edx
callq 0x2f680
jmp 0x5a120
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x5a063
movq -0x20(%rbp), %rdi
callq 0x3030
movq -0x48(%rbp), %rdi
callq 0x3030
cvtsi2sdl -0x14(%rbp), %xmm1
movsd 0x16f13(%rip), %xmm0    # 0x71060
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x50(%rbp), %rsi
movl $0x16b, %edi            # imm = 0x16B
movl $0x1, %edx
callq 0x2f6f0
movq -0x50(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)