// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/yolo.c
// Function: test_yolo
void test_yolo(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);
    clock_t time;
    char buff[256];
    char *input = buff;
    float nms=.4;
    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, voc_names, alphabet, 20);
        save_image(im, "predictions");
        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 $0x660, %rsp            # imm = 0x660
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
leaq -0x5e0(%rbp), %rax
movq %rax, -0x5e8(%rbp)
movss 0xdd02(%rip), %xmm0     # 0x76558
movss %xmm0, -0x5ec(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x6887c
movq -0x5e8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x100, %edx            # imm = 0x100
callq 0x3060
jmp 0x688dd
leaq 0xd06f(%rip), %rdi      # 0x758f2
movb $0x0, %al
callq 0x3130
movq 0x1a73f(%rip), %rax     # 0x82fd0
movq (%rax), %rdi
callq 0x32e0
movq -0x5e8(%rbp), %rdi
movq 0x1a731(%rip), %rax     # 0x82fd8
movq (%rax), %rdx
movl $0x100, %esi            # imm = 0x100
callq 0x3200
movq %rax, -0x5e8(%rbp)
cmpq $0x0, -0x5e8(%rbp)
jne 0x688ca
jmp 0x68b2c
movq -0x5e8(%rbp), %rdi
leaq 0xd4d6(%rip), %rsi      # 0x75dae
callq 0x3380
movq -0x5e8(%rbp), %rsi
leaq -0x608(%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 -0x620(%rbp), %rdi
leaq -0x608(%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 -0x610(%rbp), %rax
movq %rax, -0x628(%rbp)
callq 0x30f0
movq %rax, -0x4d8(%rbp)
movq -0x30(%rbp), %rdi
movq -0x628(%rbp), %rsi
callq 0x3b160
movq -0x5e8(%rbp), %rax
movq %rax, -0x640(%rbp)
callq 0x30f0
movq %rax, %rdi
subq -0x4d8(%rbp), %rdi
callq 0x4b50
movq -0x640(%rbp), %rsi
cvtss2sd %xmm0, %xmm0
leaq 0xcf3a(%rip), %rdi      # 0x758cc
movb $0x1, %al
callq 0x3130
movl $0x0, -0x62c(%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 -0x62c(%rbp), %r9
movl %edx, %esi
callq 0x3b640
movq %rax, -0x638(%rbp)
movss -0x5ec(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x689e4
jp 0x689e4
jmp 0x68a12
movq -0x638(%rbp), %rdi
movl -0x43c(%rbp), %esi
imull -0x43c(%rbp), %esi
imull -0x44c(%rbp), %esi
movl -0x3d4(%rbp), %edx
movss -0x5ec(%rbp), %xmm0
callq 0x44d40
movq -0x638(%rbp), %rdi
movl -0x43c(%rbp), %esi
imull -0x43c(%rbp), %esi
imull -0x44c(%rbp), %esi
movss -0x1c(%rbp), %xmm0
movq -0x28(%rbp), %rcx
leaq -0x608(%rbp), %rax
leaq 0x1b1fc(%rip), %rdx     # 0x83c40
movl $0x14, %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 -0x608(%rbp), %rax
leaq 0xde19(%rip), %rdi      # 0x7688f
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 -0x608(%rbp), %rax
leaq 0xdded(%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 -0x638(%rbp), %rdi
movl -0x62c(%rbp), %esi
callq 0x3b6b0
leaq -0x608(%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 -0x620(%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 0x68b27
jmp 0x68b2c
jmp 0x6885e
addq $0x660, %rsp            # imm = 0x660
popq %rbp
retq
nopw %cs:(%rax,%rax)