// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/darknet.c
// Function: mkimg
void mkimg(char *cfgfile, char *weightfile, int h, int w, int num, char *prefix)
{
    network *net = load_network(cfgfile, weightfile, 0);
    image *ims = get_weights(net->layers[0]);
    int n = net->layers[0].n;
    int z;
    for(z = 0; z < num; ++z){
        image im = make_image(h, w, 3);
        fill_image(im, .5);
        int i;
        for(i = 0; i < 100; ++i){
            image r = copy_image(ims[rand()%n]);
            rotate_image_cw(r, rand()%4);
            random_distort_image(r, 1, 1.5, 1.5);
            int dx = rand()%(w-r.w);
            int dy = rand()%(h-r.h);
            ghost_image(r, im, dx, dy);
            free_image(r);
        }
        char buff[256];
        sprintf(buff, "%s/gen_%d", prefix, z);
        save_image(im, buff);
        free_image(im);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x630, %rsp            # imm = 0x630
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movq %r9, -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 %rsp, %rdi
movl $0x94, %ecx
rep  movsq (%rsi), %es:(%rdi)
callq 0x8c10
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movl 0x84(%rax), %eax
movl %eax, -0x3c(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x7041d
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
leaq -0x58(%rbp), %rdi
movl $0x3, %ecx
callq 0xe3e0
leaq -0x58(%rbp), %rax
movss 0xfb8(%rip), %xmm0      # 0x711ec
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x12370
movl $0x0, -0x5c(%rbp)
cmpl $0x64, -0x5c(%rbp)
jge 0x703a8
movq -0x38(%rbp), %rax
movq %rax, -0x188(%rbp)
callq 0x34b0
cltd
idivl -0x3c(%rbp)
movq -0x188(%rbp), %rax
movslq %edx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
leaq -0x78(%rbp), %rdi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xea60
callq 0x34b0
movl $0x4, %ecx
cltd
idivl %ecx
movl %edx, %edi
leaq -0x78(%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 0x10240
leaq -0x78(%rbp), %rax
movss 0xd25(%rip), %xmm0      # 0x7100c
movss 0xf4d(%rip), %xmm2      # 0x7123c
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
movaps %xmm2, %xmm1
callq 0x14aa0
callq 0x34b0
movl -0x18(%rbp), %ecx
subl -0x78(%rbp), %ecx
cltd
idivl %ecx
movl %edx, -0x7c(%rbp)
callq 0x34b0
movl -0x14(%rbp), %ecx
subl -0x74(%rbp), %ecx
cltd
idivl %ecx
movl %edx, -0x80(%rbp)
movl -0x7c(%rbp), %edi
movl -0x80(%rbp), %esi
leaq -0x78(%rbp), %rcx
leaq -0x58(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, (%rsp)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsp)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rsp)
movq (%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
callq 0x10720
leaq -0x78(%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
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x70259
leaq -0x180(%rbp), %rdi
movq -0x28(%rbp), %rdx
movl -0x40(%rbp), %ecx
leaq 0x692c(%rip), %rsi      # 0x76ce9
movb $0x0, %al
callq 0x33f0
leaq -0x180(%rbp), %rdi
leaq -0x58(%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 0x11330
leaq -0x58(%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
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x70208
addq $0x630, %rsp            # imm = 0x630
popq %rbp
retq
nopw %cs:(%rax,%rax)