// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: tile_data
data *tile_data(data orig, int divs, int size)
{
    data *ds = calloc(divs*divs, sizeof(data));
    int i, j;
#pragma omp parallel for
    for(i = 0; i < divs*divs; ++i){
        data d;
        d.shallow = 0;
        d.w = orig.w/divs * size;
        d.h = orig.h/divs * size;
        d.X.rows = orig.X.rows;
        d.X.cols = d.w*d.h*3;
        d.X.vals = calloc(d.X.rows, sizeof(float*));

        d.y = copy_matrix(orig.y);
#pragma omp parallel for
        for(j = 0; j < orig.X.rows; ++j){
            int x = (i%divs) * orig.w / divs - (d.w - orig.w/divs)/2;
            int y = (i/divs) * orig.h / divs - (d.h - orig.h/divs)/2;
            image im = float_to_image(orig.w, orig.h, 3, orig.X.vals[j]);
            d.X.vals[j] = crop_image(im, x, y, d.w, d.h).data;
        }
        ds[i] = d;
    }
    return ds;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0xa8(%rbp)
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl -0x4(%rbp), %eax
imull -0x4(%rbp), %eax
movslq %eax, %rdi
movl $0x40, %esi
callq 0x3220
movq %rax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl -0x4(%rbp), %ecx
imull -0x4(%rbp), %ecx
cmpl %ecx, %eax
jge 0x37cd0
movq -0xa8(%rbp), %rax
movl $0x0, -0x30(%rbp)
movl (%rax), %eax
cltd
idivl -0x4(%rbp)
movl %eax, %ecx
movq -0xa8(%rbp), %rax
imull -0x8(%rbp), %ecx
movl %ecx, -0x58(%rbp)
movl 0x4(%rax), %eax
cltd
idivl -0x4(%rbp)
movl %eax, %ecx
movq -0xa8(%rbp), %rax
imull -0x8(%rbp), %ecx
movl %ecx, -0x54(%rbp)
movl 0x8(%rax), %eax
movl %eax, -0x50(%rbp)
movl -0x58(%rbp), %eax
imull -0x54(%rbp), %eax
imull $0x3, %eax, %eax
movl %eax, -0x4c(%rbp)
movslq -0x50(%rbp), %rdi
movl $0x8, %esi
callq 0x3220
movq %rax, %rcx
movq -0xa8(%rbp), %rax
movq %rcx, -0x48(%rbp)
movq 0x18(%rax), %rdi
movq 0x20(%rax), %rsi
callq 0x393a0
movq %rax, -0x68(%rbp)
movq %rdx, -0x60(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x18(%rbp)
movq -0xa8(%rbp), %rcx
movl -0x18(%rbp), %eax
cmpl 0x8(%rcx), %eax
jge 0x37ca5
movq -0xa8(%rbp), %rcx
movl -0x14(%rbp), %eax
cltd
idivl -0x4(%rbp)
movl %edx, %eax
imull (%rcx), %eax
cltd
idivl -0x4(%rbp)
movl %eax, -0xb0(%rbp)
movl -0x58(%rbp), %eax
movl %eax, -0xb4(%rbp)
movl (%rcx), %eax
cltd
idivl -0x4(%rbp)
movl %eax, %edx
movl -0xb4(%rbp), %eax
subl %edx, %eax
movl $0x2, %esi
cltd
idivl %esi
movl %eax, %edx
movl -0xb0(%rbp), %eax
subl %edx, %eax
movl %eax, -0x6c(%rbp)
movl -0x14(%rbp), %eax
cltd
idivl -0x4(%rbp)
imull 0x4(%rcx), %eax
cltd
idivl -0x4(%rbp)
movl %eax, %ecx
movq -0xa8(%rbp), %rax
movl -0x54(%rbp), %edx
movl %edx, -0xac(%rbp)
movl 0x4(%rax), %eax
cltd
idivl -0x4(%rbp)
movl %eax, %edx
movl -0xac(%rbp), %eax
subl %edx, %eax
movl $0x2, %esi
cltd
idivl %esi
movl %eax, %edx
movq -0xa8(%rbp), %rax
subl %edx, %ecx
movl %ecx, -0x70(%rbp)
movl (%rax), %esi
movl 0x4(%rax), %edx
movq 0x10(%rax), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %r8
leaq -0x88(%rbp), %rdi
movl $0x3, %ecx
callq 0xfbb0
movl -0x6c(%rbp), %esi
movl -0x70(%rbp), %edx
movl -0x58(%rbp), %ecx
movl -0x54(%rbp), %r8d
leaq -0xa0(%rbp), %rdi
leaq -0x88(%rbp), %rax
movq (%rax), %r9
movq %r9, (%rsp)
movq 0x8(%rax), %r9
movq %r9, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x11ca0
movq -0x90(%rbp), %rdx
movq -0x48(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x37b83
movq -0x10(%rbp), %rdi
movslq -0x14(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rdi
leaq -0x58(%rbp), %rsi
movl $0x40, %edx
callq 0x3280
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x37adb
movq -0x10(%rbp), %rax
addq $0xd0, %rsp
popq %rbp
retq
nopl (%rax)