// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: fill_truth_region
void fill_truth_region(char *path, float *truth, int classes, int num_boxes, int flip, float dx, float dy, float sx, float sy)
{
    char labelpath[4096];
    find_replace(path, "images", "labels", labelpath);
    find_replace(labelpath, "JPEGImages", "labels", labelpath);

    find_replace(labelpath, ".jpg", ".txt", labelpath);
    find_replace(labelpath, ".png", ".txt", labelpath);
    find_replace(labelpath, ".JPG", ".txt", labelpath);
    find_replace(labelpath, ".JPEG", ".txt", labelpath);
    int count = 0;
    box_label *boxes = read_boxes(labelpath, &count);
    randomize_boxes(boxes, count);
    correct_boxes(boxes, count, dx, dy, sx, sy, flip);
    float x,y,w,h;
    int id;
    int i;

    for (i = 0; i < count; ++i) {
        x =  boxes[i].x;
        y =  boxes[i].y;
        w =  boxes[i].w;
        h =  boxes[i].h;
        id = boxes[i].id;

        if (w < .005 || h < .005) continue;

        int col = (int)(x*num_boxes);
        int row = (int)(y*num_boxes);

        x = x*num_boxes - col;
        y = y*num_boxes - row;

        int index = (col+row*num_boxes)*(5+classes);
        if (truth[index]) continue;
        truth[index++] = 1;

        if (id < classes) truth[index+id] = 1;
        index += classes;

        truth[index++] = x;
        truth[index++] = y;
        truth[index++] = w;
        truth[index++] = h;
    }
    free(boxes);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1070, %rsp           # imm = 0x1070
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movss %xmm0, -0x20(%rbp)
movss %xmm1, -0x24(%rbp)
movss %xmm2, -0x28(%rbp)
movss %xmm3, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x1030(%rbp), %rcx
leaq 0x41e5c(%rip), %rsi     # 0x7433f
leaq 0x41e5c(%rip), %rdx     # 0x74346
callq 0x4a50
leaq -0x1030(%rbp), %rdi
leaq -0x1030(%rbp), %rcx
leaq 0x41e49(%rip), %rsi     # 0x7434d
leaq 0x41e3b(%rip), %rdx     # 0x74346
callq 0x4a50
leaq -0x1030(%rbp), %rdi
leaq -0x1030(%rbp), %rcx
leaq 0x40c14(%rip), %rsi     # 0x73139
leaq 0x43b3a(%rip), %rdx     # 0x76066
callq 0x4a50
leaq -0x1030(%rbp), %rdi
leaq -0x1030(%rbp), %rcx
leaq 0x40b45(%rip), %rsi     # 0x7308b
leaq 0x43b19(%rip), %rdx     # 0x76066
callq 0x4a50
leaq -0x1030(%rbp), %rdi
leaq -0x1030(%rbp), %rcx
leaq 0x41df1(%rip), %rsi     # 0x74358
leaq 0x43af8(%rip), %rdx     # 0x76066
callq 0x4a50
leaq -0x1030(%rbp), %rdi
leaq -0x1030(%rbp), %rcx
leaq 0x41dd5(%rip), %rsi     # 0x7435d
leaq 0x43ad7(%rip), %rdx     # 0x76066
callq 0x4a50
movl $0x0, -0x1034(%rbp)
leaq -0x1030(%rbp), %rdi
leaq -0x1034(%rbp), %rsi
callq 0x319a0
movq %rax, -0x1040(%rbp)
movq -0x1040(%rbp), %rdi
movl -0x1034(%rbp), %esi
callq 0x31bb0
movq -0x1040(%rbp), %rdi
movl -0x1034(%rbp), %esi
movss -0x20(%rbp), %xmm0
movss -0x24(%rbp), %xmm1
movss -0x28(%rbp), %xmm2
movss -0x2c(%rbp), %xmm3
movl -0x1c(%rbp), %edx
callq 0x31c50
movl $0x0, -0x1058(%rbp)
movl -0x1058(%rbp), %eax
cmpl -0x1034(%rbp), %eax
jge 0x328d0
movq -0x1040(%rbp), %rax
movslq -0x1058(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss 0x4(%rax), %xmm0
movss %xmm0, -0x1044(%rbp)
movq -0x1040(%rbp), %rax
movslq -0x1058(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss 0x8(%rax), %xmm0
movss %xmm0, -0x1048(%rbp)
movq -0x1040(%rbp), %rax
movslq -0x1058(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss 0xc(%rax), %xmm0
movss %xmm0, -0x104c(%rbp)
movq -0x1040(%rbp), %rax
movslq -0x1058(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss 0x10(%rax), %xmm0
movss %xmm0, -0x1050(%rbp)
movq -0x1040(%rbp), %rax
movslq -0x1058(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x1054(%rbp)
movss -0x104c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x41c60(%rip), %xmm0    # 0x74328
ucomisd %xmm1, %xmm0
ja 0x326e8
movss -0x1050(%rbp), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x41c46(%rip), %xmm0    # 0x74328
ucomisd %xmm1, %xmm0
jbe 0x326ed
jmp 0x328bc
movss -0x1044(%rbp), %xmm0
cvtsi2ssl -0x18(%rbp), %xmm1
mulss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movl %eax, -0x105c(%rbp)
movss -0x1048(%rbp), %xmm0
cvtsi2ssl -0x18(%rbp), %xmm1
mulss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movl %eax, -0x1060(%rbp)
movss -0x1044(%rbp), %xmm0
cvtsi2ssl -0x18(%rbp), %xmm2
cvtsi2ssl -0x105c(%rbp), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x1044(%rbp)
movss -0x1048(%rbp), %xmm0
cvtsi2ssl -0x18(%rbp), %xmm2
cvtsi2ssl -0x1060(%rbp), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x1048(%rbp)
movl -0x105c(%rbp), %eax
movl -0x1060(%rbp), %ecx
imull -0x18(%rbp), %ecx
addl %ecx, %eax
movl -0x14(%rbp), %ecx
addl $0x5, %ecx
imull %ecx, %eax
movl %eax, -0x1064(%rbp)
movq -0x10(%rbp), %rax
movslq -0x1064(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x327c4
jp 0x327c4
jmp 0x327c9
jmp 0x328bc
movq -0x10(%rbp), %rax
movl -0x1064(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x1064(%rbp)
movslq %ecx, %rcx
movss 0x3e823(%rip), %xmm0    # 0x7100c
movss %xmm0, (%rax,%rcx,4)
movl -0x1054(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x32819
movq -0x10(%rbp), %rax
movl -0x1064(%rbp), %ecx
addl -0x1054(%rbp), %ecx
movslq %ecx, %rcx
movss 0x3e7f8(%rip), %xmm0    # 0x7100c
movss %xmm0, (%rax,%rcx,4)
movl -0x14(%rbp), %eax
addl -0x1064(%rbp), %eax
movl %eax, -0x1064(%rbp)
movss -0x1044(%rbp), %xmm0
movq -0x10(%rbp), %rax
movl -0x1064(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x1064(%rbp)
movslq %ecx, %rcx
movss %xmm0, (%rax,%rcx,4)
movss -0x1048(%rbp), %xmm0
movq -0x10(%rbp), %rax
movl -0x1064(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x1064(%rbp)
movslq %ecx, %rcx
movss %xmm0, (%rax,%rcx,4)
movss -0x104c(%rbp), %xmm0
movq -0x10(%rbp), %rax
movl -0x1064(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x1064(%rbp)
movslq %ecx, %rcx
movss %xmm0, (%rax,%rcx,4)
movss -0x1050(%rbp), %xmm0
movq -0x10(%rbp), %rax
movl -0x1064(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x1064(%rbp)
movslq %ecx, %rcx
movss %xmm0, (%rax,%rcx,4)
movl -0x1058(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1058(%rbp)
jmp 0x325fd
movq -0x1040(%rbp), %rdi
callq 0x3030
addq $0x1070, %rsp           # imm = 0x1070
popq %rbp
retq
nopw %cs:(%rax,%rax)