// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: correct_boxes
void correct_boxes(box_label *boxes, int n, float dx, float dy, float sx, float sy, int flip)
{
    int i;
    for(i = 0; i < n; ++i){
        if(boxes[i].x == 0 && boxes[i].y == 0) {
            boxes[i].x = 999999;
            boxes[i].y = 999999;
            boxes[i].w = 999999;
            boxes[i].h = 999999;
            continue;
        }
        boxes[i].left   = boxes[i].left  * sx - dx;
        boxes[i].right  = boxes[i].right * sx - dx;
        boxes[i].top    = boxes[i].top   * sy - dy;
        boxes[i].bottom = boxes[i].bottom* sy - dy;

        if(flip){
            float swap = boxes[i].left;
            boxes[i].left = 1. - boxes[i].right;
            boxes[i].right = 1. - swap;
        }

        boxes[i].left =  constrain(0, 1, boxes[i].left);
        boxes[i].right = constrain(0, 1, boxes[i].right);
        boxes[i].top =   constrain(0, 1, boxes[i].top);
        boxes[i].bottom =   constrain(0, 1, boxes[i].bottom);

        boxes[i].x = (boxes[i].left+boxes[i].right)/2;
        boxes[i].y = (boxes[i].top+boxes[i].bottom)/2;
        boxes[i].w = (boxes[i].right - boxes[i].left);
        boxes[i].h = (boxes[i].bottom - boxes[i].top);

        boxes[i].w = constrain(0, 1, boxes[i].w);
        boxes[i].h = constrain(0, 1, boxes[i].h);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movss %xmm0, -0x10(%rbp)
movss %xmm1, -0x14(%rbp)
movss %xmm2, -0x18(%rbp)
movss %xmm3, -0x1c(%rbp)
movl %edx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x32150
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss 0x4(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x31d42
jp 0x31d42
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss 0x8(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x31d42
jp 0x31d42
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss 0x42634(%rip), %xmm0    # 0x74318
movss %xmm0, 0x4(%rax)
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss 0x42618(%rip), %xmm0    # 0x74318
movss %xmm0, 0x8(%rax)
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss 0x425fc(%rip), %xmm0    # 0x74318
movss %xmm0, 0xc(%rax)
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss 0x425e0(%rip), %xmm0    # 0x74318
movss %xmm0, 0x10(%rax)
jmp 0x32142
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss 0x14(%rax), %xmm0
movss -0x18(%rbp), %xmm2
movss -0x10(%rbp), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0x14(%rax)
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss 0x18(%rax), %xmm0
movss -0x18(%rbp), %xmm2
movss -0x10(%rbp), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0x18(%rax)
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss 0x1c(%rax), %xmm0
movss -0x1c(%rbp), %xmm2
movss -0x14(%rbp), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0x1c(%rax)
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss 0x20(%rax), %xmm0
movss -0x1c(%rbp), %xmm2
movss -0x14(%rbp), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0x20(%rax)
cmpl $0x0, -0x20(%rbp)
je 0x31eea
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss 0x14(%rax), %xmm0
movss %xmm0, -0x28(%rbp)
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss 0x18(%rax), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x3f1bf(%rip), %xmm0    # 0x71060
subsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0x14(%rax)
movss -0x28(%rbp), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x3f192(%rip), %xmm0    # 0x71060
subsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0x18(%rax)
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss 0x14(%rax), %xmm2
xorps %xmm0, %xmm0
movss 0x3f103(%rip), %xmm1    # 0x7100c
callq 0x57a0
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0x14(%rax)
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss 0x18(%rax), %xmm2
xorps %xmm0, %xmm0
movss 0x3f0cb(%rip), %xmm1    # 0x7100c
callq 0x57a0
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0x18(%rax)
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss 0x1c(%rax), %xmm2
xorps %xmm0, %xmm0
movss 0x3f093(%rip), %xmm1    # 0x7100c
callq 0x57a0
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0x1c(%rax)
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss 0x20(%rax), %xmm2
xorps %xmm0, %xmm0
movss 0x3f05b(%rip), %xmm1    # 0x7100c
callq 0x57a0
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0x20(%rax)
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss 0x14(%rax), %xmm0
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
addss 0x18(%rax), %xmm0
movss 0x3f216(%rip), %xmm1    # 0x71210
divss %xmm1, %xmm0
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0x4(%rax)
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss 0x1c(%rax), %xmm0
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
addss 0x20(%rax), %xmm0
movss 0x3f1ce(%rip), %xmm1    # 0x71210
divss %xmm1, %xmm0
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0x8(%rax)
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss 0x18(%rax), %xmm0
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
subss 0x14(%rax), %xmm0
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0xc(%rax)
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss 0x20(%rax), %xmm0
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
subss 0x1c(%rax), %xmm0
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0x10(%rax)
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss 0xc(%rax), %xmm2
xorps %xmm0, %xmm0
movss 0x3ef1b(%rip), %xmm1    # 0x7100c
callq 0x57a0
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0xc(%rax)
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss 0x10(%rax), %xmm2
xorps %xmm0, %xmm0
movss 0x3eee3(%rip), %xmm1    # 0x7100c
callq 0x57a0
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0x10(%rax)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x31c7d
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)