// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/captcha.c
// Function: valid_captcha
void valid_captcha(char *cfgfile, char *weightfile, char *filename)
{
    char **labels = get_labels("/data/captcha/reimgs.labels.list");
    network *net = load_network(cfgfile, weightfile, 0);
    list *plist = get_paths("/data/captcha/reimgs.fg.list");
    char **paths = (char **)list_to_array(plist);
    int N = plist->size;
    int outputs = net->outputs;

    set_batch_network(net, 1);
    srand(2222222);
    int i, j;
    for(i = 0; i < N; ++i){
        if (i%100 == 0) fprintf(stderr, "%d\n", i);
        image im = load_image_color(paths[i], net->w, net->h);
        float *X = im.data;
        float *predictions = network_predict(net, X);
        //printf("%s: Predicted in %f seconds.\n", input, sec(clock()-time));
        int truth = -1;
        for(j = 0; j < 13; ++j){
            if (strstr(paths[i], labels[j])) truth = j;
        }
        if (truth == -1){
            fprintf(stderr, "bad: %s\n", paths[i]);
            return;
        }
        printf("%d, ", truth);
        for(j = 0; j < outputs; ++j){
            if (j != 0) printf(", ");
            printf("%f", predictions[j]);
        }
        printf("\n");
        fflush(stdout);
        free_image(im);
        if (filename) break;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq 0x20a86(%rip), %rdi     # 0x75794
callq 0x343c0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %edx, %edx
callq 0x39a70
movq %rax, -0x28(%rbp)
leaq 0x20b34(%rip), %rdi     # 0x75865
callq 0x31450
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x9020
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x28(%rbp), %rax
movl 0x84(%rax), %eax
movl %eax, -0x40(%rbp)
movq -0x28(%rbp), %rdi
movl $0x1, %esi
callq 0x3a9b0
movl $0x21e88e, %edi         # imm = 0x21E88E
callq 0x31e0
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jge 0x54f24
movl -0x44(%rbp), %eax
movl $0x64, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x54db3
movq 0x2e259(%rip), %rax     # 0x82ff8
movq (%rax), %rdi
movl -0x44(%rbp), %edx
leaq 0x1e3ca(%rip), %rsi     # 0x73176
movb $0x0, %al
callq 0x3240
movq -0x38(%rbp), %rax
movslq -0x44(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x28(%rbp), %rax
movl 0x94(%rax), %edx
movq -0x28(%rbp), %rax
movl 0x90(%rax), %ecx
leaq -0x60(%rbp), %rdi
callq 0xf510
movq -0x50(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x28(%rbp), %rdi
movq -0x68(%rbp), %rsi
callq 0x3b160
movq %rax, -0x70(%rbp)
movl $0xffffffff, -0x74(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x48(%rbp)
cmpl $0xd, -0x48(%rbp)
jge 0x54e3f
movq -0x38(%rbp), %rax
movslq -0x44(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x20(%rbp), %rax
movslq -0x48(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x3480
cmpq $0x0, %rax
je 0x54e32
movl -0x48(%rbp), %eax
movl %eax, -0x74(%rbp)
jmp 0x54e34
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x54e03
cmpl $-0x1, -0x74(%rbp)
jne 0x54e6e
movq 0x2e1ac(%rip), %rax     # 0x82ff8
movq (%rax), %rdi
movq -0x38(%rbp), %rax
movslq -0x44(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x20a20(%rip), %rsi     # 0x75882
movb $0x0, %al
callq 0x3240
jmp 0x54f24
movl -0x74(%rbp), %esi
leaq 0x20a13(%rip), %rdi     # 0x7588b
movb $0x0, %al
callq 0x3130
movl $0x0, -0x48(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x40(%rbp), %eax
jge 0x54ecc
cmpl $0x0, -0x48(%rbp)
je 0x54ea2
leaq 0x209f2(%rip), %rdi     # 0x7588d
movb $0x0, %al
callq 0x3130
movq -0x70(%rbp), %rax
movslq -0x48(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x1f515(%rip), %rdi     # 0x743cf
movb $0x1, %al
callq 0x3130
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x54e86
leaq 0x20edb(%rip), %rdi     # 0x75dae
movb $0x0, %al
callq 0x3130
movq 0x2e0ef(%rip), %rax     # 0x82fd0
movq (%rax), %rdi
callq 0x32e0
leaq -0x60(%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 0x54f14
jmp 0x54f24
jmp 0x54f16
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x54d7c
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax)