// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: fill_truth_detection
void fill_truth_detection(char *path, int num_boxes, float *truth, int classes, 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, "raw", "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);
    if(count > num_boxes) count = num_boxes;
    float x,y,w,h;
    int id;
    int i;
    int sub = 0;

    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 < .001 || h < .001)) {
            ++sub;
            continue;
        }

        truth[(i-sub)*5+0] = x;
        truth[(i-sub)*5+1] = y;
        truth[(i-sub)*5+2] = w;
        truth[(i-sub)*5+3] = h;
        truth[(i-sub)*5+4] = id;
    }
    free(boxes);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1060, %rsp           # imm = 0x1060
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movss %xmm0, -0x24(%rbp)
movss %xmm1, -0x28(%rbp)
movss %xmm2, -0x2c(%rbp)
movss %xmm3, -0x30(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x1030(%rbp), %rcx
leaq 0x40cfc(%rip), %rsi     # 0x7433f
leaq 0x40cfc(%rip), %rdx     # 0x74346
callq 0x4a50
leaq -0x1030(%rbp), %rdi
leaq -0x1030(%rbp), %rcx
leaq 0x40ce9(%rip), %rsi     # 0x7434d
leaq 0x40cdb(%rip), %rdx     # 0x74346
callq 0x4a50
leaq -0x1030(%rbp), %rdi
leaq -0x1030(%rbp), %rcx
leaq 0x40ce9(%rip), %rsi     # 0x7436e
leaq 0x40cba(%rip), %rdx     # 0x74346
callq 0x4a50
leaq -0x1030(%rbp), %rdi
leaq -0x1030(%rbp), %rcx
leaq 0x3fa93(%rip), %rsi     # 0x73139
leaq 0x429b9(%rip), %rdx     # 0x76066
callq 0x4a50
leaq -0x1030(%rbp), %rdi
leaq -0x1030(%rbp), %rcx
leaq 0x3f9c4(%rip), %rsi     # 0x7308b
leaq 0x42998(%rip), %rdx     # 0x76066
callq 0x4a50
leaq -0x1030(%rbp), %rdi
leaq -0x1030(%rbp), %rcx
leaq 0x40c70(%rip), %rsi     # 0x74358
leaq 0x42977(%rip), %rdx     # 0x76066
callq 0x4a50
leaq -0x1030(%rbp), %rdi
leaq -0x1030(%rbp), %rcx
leaq 0x40c54(%rip), %rsi     # 0x7435d
leaq 0x42956(%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 -0x24(%rbp), %xmm0
movss -0x28(%rbp), %xmm1
movss -0x2c(%rbp), %xmm2
movss -0x30(%rbp), %xmm3
movl -0x20(%rbp), %edx
callq 0x31c50
movl -0x1034(%rbp), %eax
cmpl -0xc(%rbp), %eax
jle 0x33788
movl -0xc(%rbp), %eax
movl %eax, -0x1034(%rbp)
movl $0x0, -0x105c(%rbp)
movl $0x0, -0x1058(%rbp)
movl -0x1058(%rbp), %eax
cmpl -0x1034(%rbp), %eax
jge 0x3396d
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 0x40861(%rip), %xmm0    # 0x740c8
ucomisd %xmm1, %xmm0
ja 0x33887
movss -0x1050(%rbp), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x40847(%rip), %xmm0    # 0x740c8
ucomisd %xmm1, %xmm0
jbe 0x3389b
movl -0x105c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x105c(%rbp)
jmp 0x33959
movss -0x1044(%rbp), %xmm0
movq -0x18(%rbp), %rax
movl -0x1058(%rbp), %ecx
subl -0x105c(%rbp), %ecx
imull $0x5, %ecx, %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movss %xmm0, (%rax,%rcx,4)
movss -0x1048(%rbp), %xmm0
movq -0x18(%rbp), %rax
movl -0x1058(%rbp), %ecx
subl -0x105c(%rbp), %ecx
imull $0x5, %ecx, %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movss %xmm0, (%rax,%rcx,4)
movss -0x104c(%rbp), %xmm0
movq -0x18(%rbp), %rax
movl -0x1058(%rbp), %ecx
subl -0x105c(%rbp), %ecx
imull $0x5, %ecx, %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movss %xmm0, (%rax,%rcx,4)
movss -0x1050(%rbp), %xmm0
movq -0x18(%rbp), %rax
movl -0x1058(%rbp), %ecx
subl -0x105c(%rbp), %ecx
imull $0x5, %ecx, %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movss %xmm0, (%rax,%rcx,4)
cvtsi2ssl -0x1054(%rbp), %xmm0
movq -0x18(%rbp), %rax
movl -0x1058(%rbp), %ecx
subl -0x105c(%rbp), %ecx
imull $0x5, %ecx, %ecx
addl $0x4, %ecx
movslq %ecx, %rcx
movss %xmm0, (%rax,%rcx,4)
movl -0x1058(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1058(%rbp)
jmp 0x3379c
movq -0x1040(%rbp), %rdi
callq 0x3030
addq $0x1060, %rsp           # imm = 0x1060
popq %rbp
retq
nopw %cs:(%rax,%rax)