// File: /workspace/github_c_makefile_star2_O2/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, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, 0x38(%rsp)
callq 0x233e2
movq %rax, %r12
pushq $0x1
popq %r15
movl $0x16a, %edi            # imm = 0x16A
movq %rax, %rsi
movl %r15d, %edx
movq %rbx, %rcx
movl %r15d, %r8d
callq 0x1b5a3
movss 0x5a8(%r12), %xmm0
testl %ebp, %ebp
je 0x3a476
movss %xmm0, 0x1c(%rsp)
leaq 0x20(%rsp), %rdi
pushq $0x13
popq %rdx
pushq $0x3
popq %rcx
movl %edx, %esi
movq %r14, %r8
callq 0xc3de
pushq $-0x1
popq %r13
movl %r15d, %ebp
cmpl $-0x8, %r13d
je 0x3a448
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movl %ebp, %edi
callq 0xc9b3
cmpl $0x4, %ebp
jb 0x3a375
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0xcb93
movq 0x38(%rsp), %rdi
movq %r14, %rsi
callq 0x233e2
movq %rax, %r12
leaq 0x40(%rsp), %rdi
pushq $0x13
popq %rdx
movl %edx, %esi
movl %r15d, %ecx
movq %rax, %r8
callq 0xc3de
movss 0x1c(%rsp), %xmm0
addss 0x5a8(%r12), %xmm0
movss %xmm0, 0x1c(%rsp)
cmpl $0x4, %ebp
jb 0x3a3cd
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x40(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0xcb93
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x40(%rsp), %xmm0
movups %xmm0, (%rsp)
movl %r13d, %edi
callq 0xc9b3
movl $0x16a, %edi            # imm = 0x16A
movss 0x11c13(%rip), %xmm0    # 0x4c008
movq %r12, %rsi
movl %r15d, %edx
movq %rbx, %rcx
movl %r15d, %r8d
callq 0x1b3ed
cmpl $0x4, %ebp
jb 0x3a423
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0xcb93
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movl %r13d, %edi
callq 0xc9b3
incl %ebp
decl %r13d
jmp 0x3a334
movss 0x16ed0(%rip), %xmm0    # 0x51320
movss 0x1c(%rsp), %xmm1
mulss %xmm0, %xmm1
movss %xmm1, 0x1c(%rsp)
pushq $0x1
popq %rdx
movl $0x16a, %edi            # imm = 0x16A
movq %rbx, %rsi
callq 0x1b423
movss 0x1c(%rsp), %xmm0
xorl %eax, %eax
xorps %xmm2, %xmm2
cmpq $0x169, %rax            # imm = 0x169
je 0x3a4aa
movss (%r14,%rax,4), %xmm1
ucomiss %xmm2, %xmm1
jne 0x3a4a1
jp 0x3a4a1
movss 0x5a4(%r14,%rax,4), %xmm1
ucomiss %xmm2, %xmm1
jne 0x3a4a1
jnp 0x3a4a5
andl $0x0, (%rbx,%rax,4)
incq %rax
jmp 0x3a47b
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq