// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x3b160
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rsi
movq -0x18(%rbp), %rcx
movl $0x16a, %edi            # imm = 0x16A
movl $0x1, %r8d
movl %r8d, %edx
callq 0x2f960
movq -0x28(%rbp), %rax
movss 0x5a8(%rax), %xmm0
movss %xmm0, -0x2c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x59828
movq -0x10(%rbp), %r8
leaq -0x48(%rbp), %rdi
movl $0x13, %edx
movl $0x3, %ecx
movl %edx, %esi
callq 0xfbb0
movl $0x1, -0x30(%rbp)
cmpl $0x8, -0x30(%rbp)
jge 0x597f7
movl -0x30(%rbp), %edi
leaq -0x48(%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, -0x30(%rbp)
jl 0x596e8
leaq -0x48(%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 -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x3b160
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %r8
leaq -0x68(%rbp), %rdi
movl $0x13, %edx
movl $0x1, %ecx
movl %edx, %esi
callq 0xfbb0
movq -0x50(%rbp), %rax
movss 0x5a8(%rax), %xmm0
addss -0x2c(%rbp), %xmm0
movss %xmm0, -0x2c(%rbp)
cmpl $0x4, -0x30(%rbp)
jl 0x59750
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 -0x30(%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
movq -0x50(%rbp), %rsi
movq -0x18(%rbp), %rcx
movl $0x16a, %edi            # imm = 0x16A
movss 0x17880(%rip), %xmm0    # 0x7100c
movl $0x1, %r8d
movl %r8d, %edx
callq 0x2f680
cmpl $0x4, -0x30(%rbp)
jl 0x597c2
leaq -0x48(%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 -0x30(%rbp), %edi
leaq -0x48(%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 -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x59691
movss -0x2c(%rbp), %xmm0
movss 0x1c3c8(%rip), %xmm1    # 0x75bcc
divss %xmm1, %xmm0
movss %xmm0, -0x2c(%rbp)
movq -0x18(%rbp), %rsi
movl $0x16a, %edi            # imm = 0x16A
movss 0x1c3aa(%rip), %xmm0    # 0x75bc8
movl $0x1, %edx
callq 0x2f6f0
movl $0x0, -0x30(%rbp)
cmpl $0x169, -0x30(%rbp)     # imm = 0x169
jge 0x5988d
movq -0x10(%rbp), %rax
movslq -0x30(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x59870
jp 0x59870
movq -0x10(%rbp), %rax
movl -0x30(%rbp), %ecx
addl $0x169, %ecx            # imm = 0x169
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x59870
jp 0x59870
jmp 0x59880
movq -0x18(%rbp), %rax
movslq -0x30(%rbp), %rcx
xorps %xmm0, %xmm0
movss %xmm0, (%rax,%rcx,4)
jmp 0x59882
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x5982f
movss -0x2c(%rbp), %xmm0
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax,%rax)