// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: load_go
data load_go(char *filename)
{
    FILE *fp = fopen(filename, "rb");
    matrix X = make_matrix(3363059, 361);
    matrix y = make_matrix(3363059, 361);
    int row, col;

    if(!fp) file_error(filename);
    char *label;
    int count = 0;
    while((label = fgetl(fp))){
        int i;
        if(count == X.rows){
            X = resize_matrix(X, count*2);
            y = resize_matrix(y, count*2);
        }
        sscanf(label, "%d %d", &row, &col);
        char *board = fgetl(fp);

        int index = row*19 + col;
        y.vals[count][index] = 1;

        for(i = 0; i < 19*19; ++i){
            float val = 0;
            if(board[i] == '1') val = 1;
            else if(board[i] == '2') val = -1;
            X.vals[count][i] = val;
        }
        ++count;
        free(label);
        free(board);
    }
    X = resize_matrix(X, count);
    y = resize_matrix(y, count);

    data d = {0};
    d.shallow = 0;
    d.X = X;
    d.y = y;


    fclose(fp);

    return d;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0xa8(%rbp)
movq %rdi, -0xa0(%rbp)
movq %rsi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x38954(%rip), %rsi     # 0x710bc
callq 0x3360
movq %rax, -0x10(%rbp)
movl $0x3350f3, %edi         # imm = 0x3350F3
movl $0x169, %esi            # imm = 0x169
callq 0x39450
movq %rax, -0x20(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x3350f3, %edi         # imm = 0x3350F3
movl $0x169, %esi            # imm = 0x169
callq 0x39450
movq %rax, -0x30(%rbp)
movq %rdx, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x387af
movq -0x8(%rbp), %rdi
callq 0x4110
movl $0x0, -0x44(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4140
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
je 0x38914
movl -0x44(%rbp), %eax
cmpl -0x20(%rbp), %eax
jne 0x38829
movl -0x44(%rbp), %edx
shll %edx
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x391e0
movq %rax, -0x58(%rbp)
movq %rdx, -0x50(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x18(%rbp)
movl -0x44(%rbp), %edx
shll %edx
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x391e0
movq %rax, -0x68(%rbp)
movq %rdx, -0x60(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x40(%rbp), %rdi
leaq 0x3d56f(%rip), %rsi     # 0x75da3
leaq -0x34(%rbp), %rdx
leaq -0x38(%rbp), %rcx
movb $0x0, %al
callq 0x32f0
movq -0x10(%rbp), %rdi
callq 0x4140
movq %rax, -0x70(%rbp)
imull $0x13, -0x34(%rbp), %eax
addl -0x38(%rbp), %eax
movl %eax, -0x74(%rbp)
movq -0x28(%rbp), %rax
movslq -0x44(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x74(%rbp), %rcx
movss 0x3879a(%rip), %xmm0    # 0x7100c
movss %xmm0, (%rax,%rcx,4)
movl $0x0, -0x48(%rbp)
cmpl $0x169, -0x48(%rbp)     # imm = 0x169
jge 0x388f4
xorps %xmm0, %xmm0
movss %xmm0, -0x78(%rbp)
movq -0x70(%rbp), %rax
movslq -0x48(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x31, %eax
jne 0x388af
movss 0x38764(%rip), %xmm0    # 0x7100c
movss %xmm0, -0x78(%rbp)
jmp 0x388cf
movq -0x70(%rbp), %rax
movslq -0x48(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x32, %eax
jne 0x388cd
movss 0x3b814(%rip), %xmm0    # 0x740dc
movss %xmm0, -0x78(%rbp)
jmp 0x388cf
movss -0x78(%rbp), %xmm0
movq -0x18(%rbp), %rax
movslq -0x44(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x48(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x3887e
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
movq -0x40(%rbp), %rdi
callq 0x3030
movq -0x70(%rbp), %rdi
callq 0x3030
jmp 0x387b6
movl -0x44(%rbp), %edx
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x391e0
movq %rax, -0x88(%rbp)
movq %rdx, -0x80(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x18(%rbp)
movl -0x44(%rbp), %edx
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x391e0
movq -0xa8(%rbp), %rdi
movq %rax, -0x98(%rbp)
movq %rdx, -0x90(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x28(%rbp)
xorl %esi, %esi
movl $0x40, %edx
callq 0x3190
movq -0xa8(%rbp), %rax
movl $0x0, 0x28(%rax)
movq -0x20(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rcx
movq %rcx, 0x18(%rax)
movq -0x28(%rbp), %rcx
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rdi
callq 0x3100
movq -0xa0(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq