// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/network.c
// Function: compare_networks
void compare_networks(network *n1, network *n2, data test)
{
    matrix g1 = network_predict_data(n1, test);
    matrix g2 = network_predict_data(n2, test);
    int i;
    int a,b,c,d;
    a = b = c = d = 0;
    for(i = 0; i < g1.rows; ++i){
        int truth = max_index(test.y.vals[i], test.y.cols);
        int p1 = max_index(g1.vals[i], g1.cols);
        int p2 = max_index(g2.vals[i], g2.cols);
        if(p1 == truth){
            if(p2 == truth) ++d;
            else ++c;
        }else{
            if(p2 == truth) ++b;
            else ++a;
        }
    }
    printf("%5d %5d\n%5d %5d\n", a, b, c, d);
    float num = pow((abs(b - c) - 1.), 2.);
    float den = b + c;
    printf("%f\n", num/den); 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movups 0x30(%rax), %xmm3
movq %rsp, %rax
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x3b9e0
movq %rax, %rcx
movq -0x60(%rbp), %rax
movq %rcx, -0x20(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movups 0x30(%rax), %xmm3
movq %rsp, %rax
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x3b9e0
movq %rax, -0x30(%rbp)
movq %rdx, -0x28(%rbp)
movl $0x0, -0x44(%rbp)
movl $0x0, -0x40(%rbp)
movl $0x0, -0x3c(%rbp)
movl $0x0, -0x38(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x3be42
movq -0x60(%rbp), %rax
movq 0x20(%rax), %rcx
movslq -0x34(%rbp), %rdx
movq (%rcx,%rdx,8), %rdi
movl 0x1c(%rax), %esi
callq 0x5c30
movl %eax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl -0x1c(%rbp), %esi
callq 0x5c30
movl %eax, -0x4c(%rbp)
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl -0x2c(%rbp), %esi
callq 0x5c30
movl %eax, -0x50(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x48(%rbp), %eax
jne 0x3be14
movl -0x50(%rbp), %eax
cmpl -0x48(%rbp), %eax
jne 0x3be09
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x3be12
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x3be32
movl -0x50(%rbp), %eax
cmpl -0x48(%rbp), %eax
jne 0x3be27
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x3be30
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x3be32
jmp 0x3be34
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x3bd99
movl -0x38(%rbp), %esi
movl -0x3c(%rbp), %edx
movl -0x40(%rbp), %ecx
movl -0x44(%rbp), %r8d
leaq 0x3889b(%rip), %rdi     # 0x746f1
movb $0x0, %al
callq 0x3130
movl -0x3c(%rbp), %eax
subl -0x40(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cvtsi2sd %eax, %xmm0
movsd 0x351ea(%rip), %xmm1    # 0x71060
subsd %xmm1, %xmm0
movsd 0x351d6(%rip), %xmm1    # 0x71058
callq 0x30e0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x54(%rbp)
movl -0x3c(%rbp), %eax
addl -0x40(%rbp), %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x58(%rbp)
movss -0x54(%rbp), %xmm0
divss -0x58(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x3a2ae(%rip), %rdi     # 0x76162
movb $0x1, %al
callq 0x3130
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)