// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x5d8, %rsp            # imm = 0x5D8
movq %r9, 0x4c8(%rsp)
movl %r8d, %r13d
movl %ecx, %r14d
movl %edx, %r15d
xorl %ebp, %ebp
xorl %edx, %edx
callq 0x22658
movq %rax, %rbx
movq 0x20(%rax), %rsi
movl $0x94, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
callq 0x704e
movq %rax, %r12
movq 0x20(%rbx), %rax
movl 0x84(%rax), %ebx
testl %r13d, %r13d
cmovlel %ebp, %r13d
movl %r13d, 0x4a8(%rsp)
xorl %ebp, %ebp
cmpl 0x4a8(%rsp), %ebp
je 0x4b27f
movl %ebp, 0x4ac(%rsp)
leaq 0x4b0(%rsp), %rdi
movl %r15d, %esi
movl %r14d, %edx
pushq $0x3
popq %rcx
callq 0xb45a
movq 0x4c0(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x4b0(%rsp), %xmm0
movups %xmm0, (%rsp)
movss 0x1148(%rip), %xmm0     # 0x4c234
callq 0xe178
pushq $0x64
popq %r13
subl $0x1, %r13d
jb 0x4b20f
callq 0x34e0
cltd
idivl %ebx
movslq %edx, %rax
imulq $0x18, %rax, %rax
movq 0x10(%r12,%rax), %rcx
movq %rcx, 0x10(%rsp)
movups (%r12,%rax), %xmm0
movups %xmm0, (%rsp)
leaq 0x4d0(%rsp), %rdi
callq 0xb85b
callq 0x34e0
cltd
pushq $0x4
popq %rcx
idivl %ecx
movl %edx, %edi
movq 0x4e0(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x4d0(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0xc9b3
movq 0x4e0(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x4d0(%rsp), %xmm0
movups %xmm0, (%rsp)
movss 0xe8e(%rip), %xmm0      # 0x4c008
movss 0x10ea(%rip), %xmm1     # 0x4c26c
movaps %xmm1, %xmm2
callq 0xfd21
callq 0x34e0
movl %r14d, %ecx
subl 0x4d0(%rsp), %ecx
cltd
idivl %ecx
movl %edx, %ebp
callq 0x34e0
movl %r15d, %ecx
subl 0x4d4(%rsp), %ecx
cltd
idivl %ecx
movq 0x4c0(%rsp), %rax
movq %rax, 0x28(%rsp)
movups 0x4b0(%rsp), %xmm0
movups %xmm0, 0x18(%rsp)
movq 0x4e0(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x4d0(%rsp), %xmm0
movups %xmm0, (%rsp)
movl %ebp, %edi
movl %edx, %esi
callq 0xcd36
movq 0x4e0(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x4d0(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0xba88
jmp 0x4b0f5
leaq 0x4d0(%rsp), %r13
movq %r13, %rdi
leaq 0x7356(%rip), %rsi      # 0x52577
movq 0x4c8(%rsp), %rdx
movl 0x4ac(%rsp), %ebp
movl %ebp, %ecx
xorl %eax, %eax
callq 0x3420
movq 0x4c0(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x4b0(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r13, %rdi
callq 0xd514
movq 0x4c0(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x4b0(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0xba88
incl %ebp
jmp 0x4b0a1
addq $0x5d8, %rsp            # imm = 0x5D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq