// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/coco.c
// Function: test_coco
void test_coco(char *cfgfile, char *weightfile, char *filename, float thresh)
{
    image **alphabet = load_alphabet();
    network *net = load_network(cfgfile, weightfile, 0);
    layer l = net->layers[net->n-1];
    set_batch_network(net, 1);
    srand(2222222);
    float nms = .4;
    clock_t time;
    char buff[256];
    char *input = buff;
    while(1){
        if(filename){
            strncpy(input, filename, 256);
        } else {
            printf("Enter Image Path: ");
            fflush(stdout);
            input = fgets(input, 256, stdin);
            if(!input) return;
            strtok(input, "\n");
        }
        image im = load_image_color(input,0,0);
        image sized = resize_image(im, net->w, net->h);
        float *X = sized.data;
        time=clock();
        network_predict(net, X);
        printf("%s: Predicted in %f seconds.\n", input, sec(clock()-time));

        int nboxes = 0;
        detection *dets = get_network_boxes(net, 1, 1, thresh, 0, 0, 0, &nboxes);
        if (nms) do_nms_sort(dets, l.side*l.side*l.n, l.classes, nms);

        draw_detections(im, dets, l.side*l.side*l.n, thresh, coco_classes, alphabet, 80);
        save_image(im, "prediction");
        show_image(im, "predictions", 0);
        free_detections(dets, nboxes);
        free_image(im);
        free_image(sized);
        if (filename) break;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x650, %rsp            # imm = 0x650
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movss %xmm0, -0x1c(%rbp)
movb $0x0, %al
callq 0xf400
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %edx, %edx
callq 0x39a70
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rsi
movq -0x30(%rbp), %rax
movl (%rax), %eax
subl $0x1, %eax
cltq
imulq $0x4a0, %rax, %rax      # imm = 0x4A0
addq %rax, %rsi
leaq -0x4d0(%rbp), %rdi
movl $0x4a0, %edx            # imm = 0x4A0
callq 0x3280
movq -0x30(%rbp), %rdi
movl $0x1, %esi
callq 0x3a9b0
movl $0x21e88e, %edi         # imm = 0x21E88E
callq 0x31e0
movss 0xf980(%rip), %xmm0     # 0x76558
movss %xmm0, -0x4d4(%rbp)
leaq -0x5e0(%rbp), %rax
movq %rax, -0x5e8(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x66c0c
movq -0x5e8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x100, %edx            # imm = 0x100
callq 0x3060
jmp 0x66c6d
leaq 0xecdf(%rip), %rdi      # 0x758f2
movb $0x0, %al
callq 0x3130
movq 0x1c3af(%rip), %rax     # 0x82fd0
movq (%rax), %rdi
callq 0x32e0
movq -0x5e8(%rbp), %rdi
movq 0x1c3a1(%rip), %rax     # 0x82fd8
movq (%rax), %rdx
movl $0x100, %esi            # imm = 0x100
callq 0x3200
movq %rax, -0x5e8(%rbp)
cmpq $0x0, -0x5e8(%rbp)
jne 0x66c5a
jmp 0x66ebc
movq -0x5e8(%rbp), %rdi
leaq 0xf146(%rip), %rsi      # 0x75dae
callq 0x3380
movq -0x5e8(%rbp), %rsi
leaq -0x600(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %edx
callq 0xf510
movq -0x30(%rbp), %rax
movl 0x94(%rax), %esi
movq -0x30(%rbp), %rax
movl 0x90(%rax), %edx
leaq -0x618(%rbp), %rdi
leaq -0x600(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xfc00
movq -0x608(%rbp), %rax
movq %rax, -0x620(%rbp)
callq 0x30f0
movq %rax, -0x4e0(%rbp)
movq -0x30(%rbp), %rdi
movq -0x620(%rbp), %rsi
callq 0x3b160
movq -0x5e8(%rbp), %rax
movq %rax, -0x638(%rbp)
callq 0x30f0
movq %rax, %rdi
subq -0x4e0(%rbp), %rdi
callq 0x4b50
movq -0x638(%rbp), %rsi
cvtss2sd %xmm0, %xmm0
leaq 0xebaa(%rip), %rdi      # 0x758cc
movb $0x1, %al
callq 0x3130
movl $0x0, -0x624(%rbp)
movq -0x30(%rbp), %rdi
movss -0x1c(%rbp), %xmm0
movl $0x1, %edx
xorps %xmm1, %xmm1
xorl %eax, %eax
movl %eax, %ecx
xorl %r8d, %r8d
leaq -0x624(%rbp), %r9
movl %edx, %esi
callq 0x3b640
movq %rax, -0x630(%rbp)
movss -0x4d4(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x66d74
jp 0x66d74
jmp 0x66da2
movq -0x630(%rbp), %rdi
movl -0x43c(%rbp), %esi
imull -0x43c(%rbp), %esi
imull -0x44c(%rbp), %esi
movl -0x3d4(%rbp), %edx
movss -0x4d4(%rbp), %xmm0
callq 0x44d40
movq -0x630(%rbp), %rdi
movl -0x43c(%rbp), %esi
imull -0x43c(%rbp), %esi
imull -0x44c(%rbp), %esi
movss -0x1c(%rbp), %xmm0
movq -0x28(%rbp), %rcx
leaq -0x600(%rbp), %rax
leaq 0x1caac(%rip), %rdx     # 0x83880
movl $0x50, %r8d
movq (%rax), %r9
movq %r9, (%rsp)
movq 0x8(%rax), %r9
movq %r9, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xf550
leaq -0x600(%rbp), %rax
leaq 0xfa7e(%rip), %rdi      # 0x76884
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x11330
leaq -0x600(%rbp), %rax
leaq 0xfa5d(%rip), %rdi      # 0x7688f
xorl %esi, %esi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x112c0
movq -0x630(%rbp), %rdi
movl -0x624(%rbp), %esi
callq 0x3b6b0
leaq -0x600(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xedb0
leaq -0x618(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xedb0
cmpq $0x0, -0x18(%rbp)
je 0x66eb7
jmp 0x66ebc
jmp 0x66bee
addq $0x650, %rsp            # imm = 0x650
popq %rbp
retq
nopw %cs:(%rax,%rax)