// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/lsd.c
// Function: test_dcgan
void test_dcgan(char *cfgfile, char *weightfile)
{
    network *net = load_network(cfgfile, weightfile, 0);
    set_batch_network(net, 1);
    srand(2222222);

    clock_t time;
    char buff[256];
    char *input = buff;
    int imlayer = 0;

    imlayer = net->n-1;

    while(1){
        image im = make_image(net->w, net->h, net->c);
        int i;
        for(i = 0; i < im.w*im.h*im.c; ++i){
            im.data[i] = rand_normal();
        }
        //float mag = mag_array(im.data, im.w*im.h*im.c);
        //scale_array(im.data, im.w*im.h*im.c, 1./mag);

        float *X = im.data;
        time=clock();
        network_predict(net, X);
        image out = get_network_image_layer(net, imlayer);
        //yuv_to_rgb(out);
        normalize_image(out);
        printf("%s: Predicted in %f seconds.\n", input, sec(clock()-time));
        save_image(out, "out");
        show_image(out, "out", 0);

        free_image(im);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp            # imm = 0x190
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %edx, %edx
callq 0x39a70
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0x3a9b0
movl $0x21e88e, %edi         # imm = 0x21E88E
callq 0x31e0
leaq -0x120(%rbp), %rax
movq %rax, -0x128(%rbp)
movl $0x0, -0x12c(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
subl $0x1, %eax
movl %eax, -0x12c(%rbp)
movq -0x18(%rbp), %rax
movl 0x94(%rax), %esi
movq -0x18(%rbp), %rax
movl 0x90(%rax), %edx
movq -0x18(%rbp), %rax
movl 0x98(%rax), %ecx
leaq -0x148(%rbp), %rdi
callq 0xe3e0
movl $0x0, -0x14c(%rbp)
movl -0x14c(%rbp), %eax
movl -0x148(%rbp), %ecx
imull -0x144(%rbp), %ecx
imull -0x140(%rbp), %ecx
cmpl %ecx, %eax
jge 0x55792
movb $0x0, %al
callq 0x5d50
movq -0x138(%rbp), %rax
movslq -0x14c(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movl -0x14c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14c(%rbp)
jmp 0x55749
movq -0x138(%rbp), %rax
movq %rax, -0x158(%rbp)
callq 0x30f0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq -0x158(%rbp), %rsi
callq 0x3b160
movq -0x18(%rbp), %rsi
movl -0x12c(%rbp), %edx
leaq -0x170(%rbp), %rdi
callq 0x3af30
leaq -0x170(%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 0x10e50
movq -0x128(%rbp), %rax
movq %rax, -0x178(%rbp)
callq 0x30f0
movq %rax, %rdi
subq -0x20(%rbp), %rdi
callq 0x4b50
movq -0x178(%rbp), %rsi
cvtss2sd %xmm0, %xmm0
leaq 0x200a7(%rip), %rdi     # 0x758cc
movb $0x1, %al
callq 0x3130
leaq -0x170(%rbp), %rax
leaq 0x21220(%rip), %rdi     # 0x76a5a
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 -0x170(%rbp), %rax
leaq 0x211f4(%rip), %rdi     # 0x76a5a
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
leaq -0x148(%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
jmp 0x55715