// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: read_boxes
box_label *read_boxes(char *filename, int *n)
{
    FILE *file = fopen(filename, "r");
    if(!file) file_error(filename);
    float x, y, h, w;
    int id;
    int count = 0;
    int size = 64;
    box_label *boxes = calloc(size, sizeof(box_label));
    while(fscanf(file, "%d %f %f %f %f", &id, &x, &y, &w, &h) == 5){
        if(count == size) {
            size = size * 2;
            boxes = realloc(boxes, size*sizeof(box_label));
        }
        boxes[count].id = id;
        boxes[count].x = x;
        boxes[count].y = y;
        boxes[count].h = h;
        boxes[count].w = w;
        boxes[count].left   = x - w/2;
        boxes[count].right  = x + w/2;
        boxes[count].top    = y - h/2;
        boxes[count].bottom = y + h/2;
        ++count;
    }
    fclose(file);
    *n = count;
    return boxes;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x44bb2(%rip), %rsi     # 0x7656d
callq 0x3360
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x319d4
movq -0x8(%rbp), %rdi
callq 0x4110
movl $0x0, -0x30(%rbp)
movl $0x40, -0x34(%rbp)
movslq -0x34(%rbp), %rdi
movl $0x24, %esi
callq 0x3220
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x42931(%rip), %rsi     # 0x74330
leaq -0x2c(%rbp), %rdx
leaq -0x1c(%rbp), %rcx
leaq -0x20(%rbp), %r8
leaq -0x28(%rbp), %r9
leaq -0x24(%rbp), %rax
movq %rax, (%rsp)
movb $0x0, %al
callq 0x3080
cmpl $0x5, %eax
jne 0x31b8a
movl -0x30(%rbp), %eax
cmpl -0x34(%rbp), %eax
jne 0x31a4c
movl -0x34(%rbp), %eax
shll %eax
movl %eax, -0x34(%rbp)
movq -0x40(%rbp), %rdi
movslq -0x34(%rbp), %rax
imulq $0x24, %rax, %rsi
callq 0x3310
movq %rax, -0x40(%rbp)
movl -0x2c(%rbp), %ecx
movq -0x40(%rbp), %rax
movslq -0x30(%rbp), %rdx
imulq $0x24, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movss -0x1c(%rbp), %xmm0
movq -0x40(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0x4(%rax)
movss -0x20(%rbp), %xmm0
movq -0x40(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0x8(%rax)
movss -0x24(%rbp), %xmm0
movq -0x40(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0x10(%rax)
movss -0x28(%rbp), %xmm0
movq -0x40(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0xc(%rax)
movss -0x1c(%rbp), %xmm0
movss -0x28(%rbp), %xmm1
movss 0x3f73a(%rip), %xmm2    # 0x71210
divss %xmm2, %xmm1
subss %xmm1, %xmm0
movq -0x40(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0x14(%rax)
movss -0x1c(%rbp), %xmm0
movss -0x28(%rbp), %xmm1
movss 0x3f70c(%rip), %xmm2    # 0x71210
divss %xmm2, %xmm1
addss %xmm1, %xmm0
movq -0x40(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0x18(%rax)
movss -0x20(%rbp), %xmm0
movss -0x24(%rbp), %xmm1
movss 0x3f6de(%rip), %xmm2    # 0x71210
divss %xmm2, %xmm1
subss %xmm1, %xmm0
movq -0x40(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0x1c(%rax)
movss -0x20(%rbp), %xmm0
movss -0x24(%rbp), %xmm1
movss 0x3f6b0(%rip), %xmm2    # 0x71210
divss %xmm2, %xmm1
addss %xmm1, %xmm0
movq -0x40(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0x20(%rax)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x319f4
movq -0x18(%rbp), %rdi
callq 0x3100
movl -0x30(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x40(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)