// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/yolo.c
// Function: print_yolo_detections
void print_yolo_detections(FILE **fps, char *id, int total, int classes, int w, int h, detection *dets)
{
    int i, j;
    for(i = 0; i < total; ++i){
        float xmin = dets[i].bbox.x - dets[i].bbox.w/2.;
        float xmax = dets[i].bbox.x + dets[i].bbox.w/2.;
        float ymin = dets[i].bbox.y - dets[i].bbox.h/2.;
        float ymax = dets[i].bbox.y + dets[i].bbox.h/2.;

        if (xmin < 0) xmin = 0;
        if (ymin < 0) ymin = 0;
        if (xmax > w) xmax = w;
        if (ymax > h) ymax = h;

        for(j = 0; j < classes; ++j){
            if (dets[i].prob[j]) fprintf(fps[j], "%s %f %f %f %f %f\n", id, dets[i].prob[j],
                    xmin, ymin, xmax, ymax);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl %r9d, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x67888
movq 0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movq 0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movss 0x8(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
movsd 0x99cc(%rip), %xmm2     # 0x71058
divsd %xmm2, %xmm1
subsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x2c(%rbp)
movq 0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movq 0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movss 0x8(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
movsd 0x9984(%rip), %xmm2     # 0x71058
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x30(%rbp)
movq 0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movss 0x4(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movq 0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movss 0xc(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
movsd 0x993b(%rip), %xmm2     # 0x71058
divsd %xmm2, %xmm1
subsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x34(%rbp)
movq 0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movss 0x4(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movq 0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movss 0xc(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
movsd 0x98f2(%rip), %xmm2     # 0x71058
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x38(%rbp)
xorps %xmm0, %xmm0
ucomiss -0x2c(%rbp), %xmm0
jbe 0x67788
xorps %xmm0, %xmm0
movss %xmm0, -0x2c(%rbp)
xorps %xmm0, %xmm0
ucomiss -0x34(%rbp), %xmm0
jbe 0x67799
xorps %xmm0, %xmm0
movss %xmm0, -0x34(%rbp)
movss -0x30(%rbp), %xmm0
cvtsi2ssl -0x1c(%rbp), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x677b2
cvtsi2ssl -0x1c(%rbp), %xmm0
movss %xmm0, -0x30(%rbp)
movss -0x38(%rbp), %xmm0
cvtsi2ssl -0x20(%rbp), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x677cb
cvtsi2ssl -0x20(%rbp), %xmm0
movss %xmm0, -0x38(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x67878
movq 0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movslq -0x28(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x67806
jp 0x67806
jmp 0x67868
movq -0x8(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x10(%rbp), %rdx
movq 0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movslq -0x28(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movss -0x2c(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
movss -0x34(%rbp), %xmm2
cvtss2sd %xmm2, %xmm2
movss -0x30(%rbp), %xmm3
cvtss2sd %xmm3, %xmm3
movss -0x38(%rbp), %xmm4
cvtss2sd %xmm4, %xmm4
leaq 0xf0f1(%rip), %rsi      # 0x76952
movb $0x5, %al
callq 0x3240
jmp 0x6786a
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x677d2
jmp 0x6787a
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x67649
addq $0x40, %rsp
popq %rbp
retq
nop