// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/detector.c
// Function: print_cocos
static void print_cocos(FILE *fp, char *image_path, detection *dets, int num_boxes, int classes, int w, int h)
{
    int i, j;
    int image_id = get_coco_image_id(image_path);
    for(i = 0; i < num_boxes; ++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;

        float bx = xmin;
        float by = ymin;
        float bw = xmax - xmin;
        float bh = ymax - ymin;

        for(j = 0; j < classes; ++j){
            if (dets[i].prob[j]) fprintf(fp, "{\"image_id\":%d, \"category_id\":%d, \"bbox\":[%f, %f, %f, %f], \"score\":%f},\n", image_id, coco_ids[j], bx, by, bw, bh, dets[i].prob[j]);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movl %r9d, -0x24(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6c2f0
movl %eax, -0x30(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x6a88b
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movss 0x8(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
movsd 0x6a00(%rip), %xmm2     # 0x71058
divsd %xmm2, %xmm1
subsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x34(%rbp)
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movss 0x8(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
movsd 0x69b8(%rip), %xmm2     # 0x71058
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x38(%rbp)
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movss 0x4(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movss 0xc(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
movsd 0x696f(%rip), %xmm2     # 0x71058
divsd %xmm2, %xmm1
subsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x3c(%rbp)
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movss 0x4(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movss 0xc(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
movsd 0x6926(%rip), %xmm2     # 0x71058
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x40(%rbp)
xorps %xmm0, %xmm0
ucomiss -0x34(%rbp), %xmm0
jbe 0x6a754
xorps %xmm0, %xmm0
movss %xmm0, -0x34(%rbp)
xorps %xmm0, %xmm0
ucomiss -0x3c(%rbp), %xmm0
jbe 0x6a765
xorps %xmm0, %xmm0
movss %xmm0, -0x3c(%rbp)
movss -0x38(%rbp), %xmm0
cvtsi2ssl -0x24(%rbp), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x6a77e
cvtsi2ssl -0x24(%rbp), %xmm0
movss %xmm0, -0x38(%rbp)
movss -0x40(%rbp), %xmm0
cvtsi2ssl 0x10(%rbp), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x6a797
cvtsi2ssl 0x10(%rbp), %xmm0
movss %xmm0, -0x40(%rbp)
movss -0x34(%rbp), %xmm0
movss %xmm0, -0x44(%rbp)
movss -0x3c(%rbp), %xmm0
movss %xmm0, -0x48(%rbp)
movss -0x38(%rbp), %xmm0
subss -0x34(%rbp), %xmm0
movss %xmm0, -0x4c(%rbp)
movss -0x40(%rbp), %xmm0
subss -0x3c(%rbp), %xmm0
movss %xmm0, -0x50(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x6a87b
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movslq -0x2c(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x6a804
jp 0x6a804
jmp 0x6a86b
movq -0x8(%rbp), %rdi
movl -0x30(%rbp), %edx
movslq -0x2c(%rbp), %rcx
leaq 0x194ca(%rip), %rax     # 0x83ce0
movl (%rax,%rcx,4), %ecx
movss -0x44(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movss -0x48(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
movss -0x4c(%rbp), %xmm2
cvtss2sd %xmm2, %xmm2
movss -0x50(%rbp), %xmm3
cvtss2sd %xmm3, %xmm3
movq -0x18(%rbp), %rax
movslq -0x28(%rbp), %rsi
imulq $0x30, %rsi, %rsi
addq %rsi, %rax
movq 0x18(%rax), %rax
movslq -0x2c(%rbp), %rsi
movss (%rax,%rsi,4), %xmm4
cvtss2sd %xmm4, %xmm4
leaq 0xc056(%rip), %rsi      # 0x768ba
movb $0x5, %al
callq 0x3240
jmp 0x6a86d
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x6a7d0
jmp 0x6a87d
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x6a615
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)