// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: fill_truth_swag
void fill_truth_swag(char *path, 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, ".jpg", ".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 < 90; ++i) {
        x =  boxes[i].x;
        y =  boxes[i].y;
        w =  boxes[i].w;
        h =  boxes[i].h;
        id = boxes[i].id;

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

        int index = (4+classes) * i;

        truth[index++] = x;
        truth[index++] = y;
        truth[index++] = w;
        truth[index++] = h;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1060, %rsp           # imm = 0x1060
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movss %xmm0, -0x1c(%rbp)
movss %xmm1, -0x20(%rbp)
movss %xmm2, -0x24(%rbp)
movss %xmm3, -0x28(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x1030(%rbp), %rcx
leaq 0x421a0(%rip), %rsi     # 0x7433f
leaq 0x421a0(%rip), %rdx     # 0x74346
callq 0x4a50
leaq -0x1030(%rbp), %rdi
leaq -0x1030(%rbp), %rcx
leaq 0x4218d(%rip), %rsi     # 0x7434d
leaq 0x4217f(%rip), %rdx     # 0x74346
callq 0x4a50
leaq -0x1030(%rbp), %rdi
leaq -0x1030(%rbp), %rcx
leaq 0x40f58(%rip), %rsi     # 0x73139
leaq 0x43e7e(%rip), %rdx     # 0x76066
callq 0x4a50
leaq -0x1030(%rbp), %rdi
leaq -0x1030(%rbp), %rcx
leaq 0x42156(%rip), %rsi     # 0x74358
leaq 0x43e5d(%rip), %rdx     # 0x76066
callq 0x4a50
leaq -0x1030(%rbp), %rdi
leaq -0x1030(%rbp), %rcx
leaq 0x4213a(%rip), %rsi     # 0x7435d
leaq 0x43e3c(%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 -0x1c(%rbp), %xmm0
movss -0x20(%rbp), %xmm1
movss -0x24(%rbp), %xmm2
movss -0x28(%rbp), %xmm3
movl -0x18(%rbp), %edx
callq 0x31c50
movl $0x0, -0x1058(%rbp)
movl -0x1058(%rbp), %ecx
xorl %eax, %eax
cmpl -0x1034(%rbp), %ecx
movb %al, -0x105d(%rbp)
jge 0x322be
cmpl $0x5a, -0x1058(%rbp)
setl %al
movb %al, -0x105d(%rbp)
movb -0x105d(%rbp), %al
testb $0x1, %al
jne 0x322cd
jmp 0x32489
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
xorps %xmm0, %xmm0
ucomisd %xmm1, %xmm0
ja 0x3239c
movss -0x1050(%rbp), %xmm0
cvtss2sd %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x323a1
jmp 0x32475
movl -0x14(%rbp), %eax
addl $0x4, %eax
imull -0x1058(%rbp), %eax
movl %eax, -0x105c(%rbp)
movss -0x1044(%rbp), %xmm0
movq -0x10(%rbp), %rax
movl -0x105c(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x105c(%rbp)
movslq %ecx, %rcx
movss %xmm0, (%rax,%rcx,4)
movss -0x1048(%rbp), %xmm0
movq -0x10(%rbp), %rax
movl -0x105c(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x105c(%rbp)
movslq %ecx, %rcx
movss %xmm0, (%rax,%rcx,4)
movss -0x104c(%rbp), %xmm0
movq -0x10(%rbp), %rax
movl -0x105c(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x105c(%rbp)
movslq %ecx, %rcx
movss %xmm0, (%rax,%rcx,4)
movss -0x1050(%rbp), %xmm0
movq -0x10(%rbp), %rax
movl -0x105c(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x105c(%rbp)
movslq %ecx, %rcx
movss %xmm0, (%rax,%rcx,4)
movl -0x1054(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x32473
movq -0x10(%rbp), %rax
movl -0x105c(%rbp), %ecx
addl -0x1054(%rbp), %ecx
movslq %ecx, %rcx
movss 0x3eb9e(%rip), %xmm0    # 0x7100c
movss %xmm0, (%rax,%rcx,4)
jmp 0x32475
movl -0x1058(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1058(%rbp)
jmp 0x32298
movq -0x1040(%rbp), %rdi
callq 0x3030
addq $0x1060, %rsp           # imm = 0x1060
popq %rbp
retq
nop