// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/coco.c
// Function: print_cocos
static void print_cocos(FILE *fp, int image_id, detection *dets, int num_boxes, int classes, int w, int h)
{
    int i, j;
    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)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movl %r9d, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x6642e
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 0xae5d(%rip), %xmm2     # 0x71058
divsd %xmm2, %xmm1
subsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x30(%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 0xae15(%rip), %xmm2     # 0x71058
divsd %xmm2, %xmm1
addsd %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 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 0xadcc(%rip), %xmm2     # 0x71058
divsd %xmm2, %xmm1
subsd %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 0xad83(%rip), %xmm2     # 0x71058
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x3c(%rbp)
xorps %xmm0, %xmm0
ucomiss -0x30(%rbp), %xmm0
jbe 0x662f7
xorps %xmm0, %xmm0
movss %xmm0, -0x30(%rbp)
xorps %xmm0, %xmm0
ucomiss -0x38(%rbp), %xmm0
jbe 0x66308
xorps %xmm0, %xmm0
movss %xmm0, -0x38(%rbp)
movss -0x34(%rbp), %xmm0
cvtsi2ssl -0x24(%rbp), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x66321
cvtsi2ssl -0x24(%rbp), %xmm0
movss %xmm0, -0x34(%rbp)
movss -0x3c(%rbp), %xmm0
cvtsi2ssl 0x10(%rbp), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x6633a
cvtsi2ssl 0x10(%rbp), %xmm0
movss %xmm0, -0x3c(%rbp)
movss -0x30(%rbp), %xmm0
movss %xmm0, -0x40(%rbp)
movss -0x38(%rbp), %xmm0
movss %xmm0, -0x44(%rbp)
movss -0x34(%rbp), %xmm0
subss -0x30(%rbp), %xmm0
movss %xmm0, -0x48(%rbp)
movss -0x3c(%rbp), %xmm0
subss -0x38(%rbp), %xmm0
movss %xmm0, -0x4c(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x6641e
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 0x663a7
jp 0x663a7
jmp 0x6640e
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
movslq -0x2c(%rbp), %rcx
leaq 0x1d747(%rip), %rax     # 0x83b00
movl (%rax,%rcx,4), %ecx
movss -0x40(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movss -0x44(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
movss -0x48(%rbp), %xmm2
cvtss2sd %xmm2, %xmm2
movss -0x4c(%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 0x104b3(%rip), %rsi     # 0x768ba
movb $0x5, %al
callq 0x3240
jmp 0x66410
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x66373
jmp 0x66420
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x661b8
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)