// File: /workspace/github_c_makefile_star2_O1/SimpleDoger[P]Darknet_CPU_Only/go.c
// Function: predict_move2
float predict_move2(network *net, float *board, float *move, int multi)
{
    float *output = network_predict(net, board);
    copy_cpu(19*19+1, output, 1, move, 1);
    float result = output[19*19 + 1];
    int i;
    if(multi){
        image bim = float_to_image(19, 19, 3, board);
        for(i = 1; i < 8; ++i){
            rotate_image_cw(bim, i);
            if(i >= 4) flip_image(bim);

            float *output = network_predict(net, board);
            image oim = float_to_image(19, 19, 1, output);
            result += output[19*19 + 1];

            if(i >= 4) flip_image(oim);
            rotate_image_cw(oim, -i);

            axpy_cpu(19*19+1, 1, output, 1, move, 1);

            if(i >= 4) flip_image(bim);
            rotate_image_cw(bim, -i);
        }
        result = result/8;
        scal_cpu(19*19+1, 1./8., move, 1);
    }
    for(i = 0; i < 19*19; ++i){
        if(board[i] || board[i+19*19]) move[i] = 0;
    }
    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %ecx, %r12d
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x307ea
movq %rax, %r13
movl $0x1, %ebp
movl $0x16a, %edi            # imm = 0x16A
movq %rax, %rsi
movl $0x1, %edx
movq %rbx, %rcx
movl $0x1, %r8d
callq 0x2879c
movss 0x5a8(%r13), %xmm0
testl %r12d, %r12d
je 0x43e54
movss %xmm0, 0x24(%rsp)
leaq 0x28(%rsp), %rdi
movl $0x13, %esi
movl $0x13, %edx
movl $0x3, %ecx
movq %r14, %r8
callq 0x1675b
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x28(%rsp), %xmm0
movups %xmm0, (%rsp)
movl %ebp, %edi
callq 0x16d91
cmpl $0x4, %ebp
jb 0x43d43
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x28(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x16f91
movq %r15, %rdi
movq %r14, %rsi
callq 0x307ea
movq %rax, %r13
leaq 0x40(%rsp), %rdi
movl $0x13, %esi
movl $0x13, %edx
movl $0x1, %ecx
movq %rax, %r8
callq 0x1675b
movss 0x24(%rsp), %xmm0
addss 0x5a8(%r13), %xmm0
movss %xmm0, 0x24(%rsp)
cmpl $0x4, %ebp
jb 0x43d9f
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x40(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x16f91
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x40(%rsp), %xmm0
movups %xmm0, (%rsp)
movl %r12d, %edi
callq 0x16d91
movl $0x16a, %edi            # imm = 0x16A
movss 0xf241(%rip), %xmm0     # 0x53008
movq %r13, %rsi
movl $0x1, %edx
movq %rbx, %rcx
movl $0x1, %r8d
callq 0x285e9
cmpl $0x4, %ebp
jb 0x43dfa
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x28(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x16f91
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x28(%rsp), %xmm0
movups %xmm0, (%rsp)
movl %r12d, %edi
callq 0x16d91
incl %ebp
decl %r12d
cmpl $-0x8, %r12d
jne 0x43d0c
movss 0x144bc(%rip), %xmm0    # 0x582e8
movss 0x24(%rsp), %xmm1
mulss %xmm0, %xmm1
movss %xmm1, 0x24(%rsp)
movl $0x16a, %edi            # imm = 0x16A
movq %rbx, %rsi
movl $0x1, %edx
callq 0x28619
movss 0x24(%rsp), %xmm0
xorl %eax, %eax
xorps %xmm2, %xmm2
movss (%r14,%rax,4), %xmm1
ucomiss %xmm2, %xmm1
jne 0x43e77
jp 0x43e77
movss 0x5a4(%r14,%rax,4), %xmm1
ucomiss %xmm2, %xmm1
jne 0x43e77
jnp 0x43e7e
movl $0x0, (%rbx,%rax,4)
incq %rax
cmpq $0x169, %rax            # imm = 0x169
jne 0x43e59
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq