LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/blas.c
// Function: normalize_cpu
void normalize_cpu(float *x, float *mean, float *variance, int batch, int filters, int spatial)
{
    int b, f, i;
    for(b = 0; b < batch; ++b){
        for(f = 0; f < filters; ++f){
            for(i = 0; i < spatial; ++i){
                int index = b*filters*spatial + f*spatial + i;
                x[index] = (x[index] - mean[f])/(sqrt(variance[f]) + .000001f);
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r15
movq %rsi, %r12
xorl %eax, %eax
testl %r9d, %r9d
movl $0x0, %r14d
cmovgl %r9d, %r14d
testl %r8d, %r8d
movl $0x0, %edx
cmovgl %r8d, %edx
movq %rdx, 0x30(%rsp)
movq %rdi, 0x28(%rsp)
testl %ecx, %ecx
cmovlel %eax, %ecx
movl %ecx, 0xc(%rsp)
movl %r9d, 0x14(%rsp)
imull %r9d, %r8d
movl %r8d, 0x8(%rsp)
xorpd %xmm2, %xmm2
movsd 0x344ce(%rip), %xmm3    # 0x4f748
xorl %ecx, %ecx
cmpl 0xc(%rsp), %ecx
je 0x1b326
movl %ecx, 0x10(%rsp)
movq %rax, 0x20(%rsp)
xorl %r13d, %r13d
cmpq 0x30(%rsp), %r13
je 0x1b312
movl %eax, 0x18(%rsp)
cltq
movq 0x28(%rsp), %rcx
leaq (%rcx,%rax,4), %rbp
xorl %ebx, %ebx
cmpq %rbx, %r14
je 0x1b305
movss (%rbp,%rbx,4), %xmm1
subss (%r12,%r13,4), %xmm1
cvtss2sd (%r15,%r13,4), %xmm0
ucomisd %xmm2, %xmm0
jb 0x1b2cd
sqrtsd %xmm0, %xmm0
jmp 0x1b2ea
movss %xmm1, 0x1c(%rsp)
callq 0x3460
movss 0x1c(%rsp), %xmm1
movsd 0x34462(%rip), %xmm3    # 0x4f748
xorpd %xmm2, %xmm2
cvtss2sd %xmm1, %xmm1
addsd %xmm3, %xmm0
divsd %xmm0, %xmm1
cvtsd2ss %xmm1, %xmm0
movss %xmm0, (%rbp,%rbx,4)
incq %rbx
jmp 0x1b2aa
incq %r13
movl 0x18(%rsp), %eax
addl 0x14(%rsp), %eax
jmp 0x1b292
movl 0x10(%rsp), %ecx
incl %ecx
movq 0x20(%rsp), %rax
addl 0x8(%rsp), %eax
jmp 0x1b27c
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/blas.c
// Function: deinter_cpu
void deinter_cpu(int NX, float *X, int NY, float *Y, int B, float *OUT)
{
    int i, j;
    int index = 0;
    for(j = 0; j < B; ++j) {
        for(i = 0; i < NX; ++i){
            if(X) X[j*NX + i] += OUT[index];
            ++index;
        }
        for(i = 0; i < NY; ++i){
            if(Y) Y[j*NY + i] += OUT[index];
            ++index;
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
xorl %eax, %eax
testl %edi, %edi
movl $0x0, %r10d
cmovgl %edi, %r10d
testl %edx, %edx
movl $0x0, %r11d
cmovgl %edx, %r11d
movslq %edx, %rdx
movslq %edi, %rdi
testl %r8d, %r8d
cmovlel %eax, %r8d
shlq $0x2, %rdi
shlq $0x2, %rdx
movq %rcx, %rbx
movq %rsi, %r14
xorl %r15d, %r15d
cmpq %r8, %rax
je 0x1b50e
movslq %r15d, %r15
leaq (%r9,%r15,4), %r13
xorl %r12d, %r12d
cmpq %r12, %r10
je 0x1b4d9
testq %rsi, %rsi
je 0x1b4d4
movss (%r13,%r12,4), %xmm0
addss (%r14,%r12,4), %xmm0
movss %xmm0, (%r14,%r12,4)
incq %r12
jmp 0x1b4b7
addq %r12, %r15
xorl %r12d, %r12d
cmpq %r12, %r11
je 0x1b503
testq %rcx, %rcx
je 0x1b4fb
movss (%r9,%r15,4), %xmm0
addss (%rbx,%r12,4), %xmm0
movss %xmm0, (%rbx,%r12,4)
incq %r15
incq %r12
jmp 0x1b4df
incq %rax
addq %rdi, %r14
addq %rdx, %rbx
jmp 0x1b4a8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/blas.c
// Function: inter_cpu
void inter_cpu(int NX, float *X, int NY, float *Y, int B, float *OUT)
{
    int i, j;
    int index = 0;
    for(j = 0; j < B; ++j) {
        for(i = 0; i < NX; ++i){
            OUT[index++] = X[j*NX + i];
        }
        for(i = 0; i < NY; ++i){
            OUT[index++] = Y[j*NY + i];
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
xorl %eax, %eax
testl %edi, %edi
movl $0x0, %r10d
cmovgl %edi, %r10d
testl %edx, %edx
movl $0x0, %r11d
cmovgl %edx, %r11d
movslq %edx, %rdx
testl %r8d, %r8d
cmovlel %eax, %r8d
movslq %edi, %rdi
shlq $0x2, %rdi
shlq $0x2, %rdx
xorl %ebx, %ebx
cmpq %r8, %rax
je 0x1b59d
movslq %ebx, %rbx
leaq (%r9,%rbx,4), %r15
xorl %r14d, %r14d
cmpq %r14, %r10
je 0x1b573
movss (%rsi,%r14,4), %xmm0
movss %xmm0, (%r15,%r14,4)
incq %r14
jmp 0x1b55d
addq %r14, %rbx
xorl %r14d, %r14d
cmpq %r14, %r11
je 0x1b592
movss (%rcx,%r14,4), %xmm0
movss %xmm0, (%r9,%rbx,4)
incq %rbx
incq %r14
jmp 0x1b579
incq %rax
addq %rdi, %rsi
addq %rdx, %rcx
jmp 0x1b54e
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/blas.c
// Function: smooth_l1_cpu
void smooth_l1_cpu(int n, float *pred, float *truth, float *delta, float *error)
{
    int i;
    for(i = 0; i < n; ++i){
        float diff = truth[i] - pred[i];
        float abs_val = fabs(diff);
        if(abs_val < 1) {
            error[i] = diff * diff;
            delta[i] = diff;
        }
        else {
            error[i] = 2*abs_val - 1;
            delta[i] = (diff < 0) ? 1 : -1;
        }
    }
}

// Assembly:
xorl %eax, %eax
testl %edi, %edi
cmovlel %eax, %edi
movaps 0x30b3b(%rip), %xmm0    # 0x4c140
movss 0x309fb(%rip), %xmm1    # 0x4c008
movss 0x30c4f(%rip), %xmm2    # 0x4c264
xorps %xmm3, %xmm3
leaq 0x30b81(%rip), %r9      # 0x4c1a0
cmpq %rax, %rdi
je 0x1b66a
movss (%rdx,%rax,4), %xmm5
subss (%rsi,%rax,4), %xmm5
movaps %xmm5, %xmm4
andps %xmm0, %xmm4
ucomiss %xmm4, %xmm1
jbe 0x1b642
movaps %xmm5, %xmm4
mulss %xmm5, %xmm4
jmp 0x1b65a
addss %xmm4, %xmm4
xorl %r10d, %r10d
ucomiss %xmm5, %xmm3
addss %xmm2, %xmm4
seta %r10b
movss (%r9,%r10,4), %xmm5
movss %xmm4, (%r8,%rax,4)
movss %xmm5, (%rcx,%rax,4)
incq %rax
jmp 0x1b61f
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/blas.c
// Function: l1_cpu
void l1_cpu(int n, float *pred, float *truth, float *delta, float *error)
{
    int i;
    for(i = 0; i < n; ++i){
        float diff = truth[i] - pred[i];
        error[i] = fabs(diff);
        delta[i] = diff > 0 ? 1 : -1;
    }
}

// Assembly:
xorl %eax, %eax
testl %edi, %edi
cmovlel %eax, %edi
xorps %xmm0, %xmm0
movaps 0x30ac4(%rip), %xmm1    # 0x4c140
leaq 0x30b1d(%rip), %r9      # 0x4c1a0
cmpq %rax, %rdi
je 0x1b6b5
movss (%rdx,%rax,4), %xmm2
subss (%rsi,%rax,4), %xmm2
xorl %r10d, %r10d
ucomiss %xmm0, %xmm2
seta %r10b
andps %xmm1, %xmm2
movss %xmm2, (%r8,%rax,4)
movss (%r9,%r10,4), %xmm2
movss %xmm2, (%rcx,%rax,4)
incq %rax
jmp 0x1b683
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/blas.c
// Function: softmax_x_ent_cpu
void softmax_x_ent_cpu(int n, float *pred, float *truth, float *delta, float *error)
{
    int i;
    for(i = 0; i < n; ++i){
        float t = truth[i];
        float p = pred[i];
        error[i] = (t) ? -log(p) : 0;
        delta[i] = t-p;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movl %edi, %r13d
xorl %ebp, %ebp
testl %edi, %edi
cmovlel %ebp, %r13d
cmpq %rbp, %r13
je 0x1b731
movss (%r15,%rbp,4), %xmm1
movss (%r12,%rbp,4), %xmm2
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
jne 0x1b6f3
jnp 0x1b71d
cvtss2sd %xmm2, %xmm0
movss %xmm1, 0x4(%rsp)
movss %xmm2, (%rsp)
callq 0x31d0
movss (%rsp), %xmm2
movss 0x4(%rsp), %xmm1
cvtsd2ss %xmm0, %xmm0
xorps 0x30a33(%rip), %xmm0    # 0x4c150
movss %xmm0, (%rbx,%rbp,4)
subss %xmm2, %xmm1
movss %xmm1, (%r14,%rbp,4)
incq %rbp
jmp 0x1b6d8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/blas.c
// Function: logistic_x_ent_cpu
void logistic_x_ent_cpu(int n, float *pred, float *truth, float *delta, float *error)
{
    int i;
    for(i = 0; i < n; ++i){
        float t = truth[i];
        float p = pred[i];
        error[i] = -t*log(p) - (1-t)*log(1-p);
        delta[i] = t-p;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movl %edi, %r13d
xorl %ebp, %ebp
testl %edi, %edi
cmovlel %ebp, %r13d
cmpq %rbp, %r13
je 0x1b80a
movss (%r15,%rbp,4), %xmm0
movaps %xmm0, 0x20(%rsp)
movss (%r12,%rbp,4), %xmm1
movss %xmm1, 0x4(%rsp)
xorps 0x309c4(%rip), %xmm0    # 0x4c150
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x18(%rsp)
cvtss2sd %xmm1, %xmm0
callq 0x31d0
movsd %xmm0, 0x10(%rsp)
movss 0x3085b(%rip), %xmm1    # 0x4c008
movaps %xmm1, %xmm0
subss 0x20(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
movaps %xmm1, %xmm0
subss 0x4(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x31d0
mulsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
mulsd 0x18(%rsp), %xmm1
subsd %xmm0, %xmm1
cvtsd2ss %xmm1, %xmm0
movss %xmm0, (%rbx,%rbp,4)
movaps 0x20(%rsp), %xmm0
subss 0x4(%rsp), %xmm0
movss %xmm0, (%r14,%rbp,4)
incq %rbp
jmp 0x1b765
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/blas.c
// Function: l2_cpu
void l2_cpu(int n, float *pred, float *truth, float *delta, float *error)
{
    int i;
    for(i = 0; i < n; ++i){
        float diff = truth[i] - pred[i];
        error[i] = diff * diff;
        delta[i] = diff;
    }
}

// Assembly:
xorl %eax, %eax
testl %edi, %edi
cmovlel %eax, %edi
cmpq %rax, %rdi
je 0x1b846
movss (%rdx,%rax,4), %xmm0
subss (%rsi,%rax,4), %xmm0
movaps %xmm0, %xmm1
mulss %xmm0, %xmm1
movss %xmm1, (%r8,%rax,4)
movss %xmm0, (%rcx,%rax,4)
incq %rax
jmp 0x1b820
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/blas.c
// Function: softmax
void softmax(float *input, int n, float temp, int stride, float *output)
{
    int i;
    float sum = 0;
    float largest = -FLT_MAX;
    for(i = 0; i < n; ++i){
        if(input[i*stride] > largest) largest = input[i*stride];
    }
    for(i = 0; i < n; ++i){
        float e = exp(input[i*stride]/temp - largest/temp);
        sum += e;
        output[i*stride] = e;
    }
    for(i = 0; i < n; ++i){
        output[i*stride] /= sum;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movss %xmm0, 0xc(%rsp)
movq %rdi, %r14
movslq %edx, %r15
xorl %r12d, %r12d
testl %esi, %esi
cmovgl %esi, %r12d
shlq $0x2, %r15
movss 0x33e92(%rip), %xmm1    # 0x4f740
movq %rdi, %rax
movq %r12, %rcx
subq $0x1, %rcx
jb 0x1b8ca
movss (%rax), %xmm0
maxss %xmm1, %xmm0
addq %r15, %rax
movaps %xmm0, %xmm1
jmp 0x1b8b4
divss 0xc(%rsp), %xmm1
movss %xmm1, 0x10(%rsp)
xorps %xmm1, %xmm1
xorl %r13d, %r13d
movq %r12, %rbp
subq $0x1, %rbp
jb 0x1b92e
movss (%r14,%r13), %xmm0
divss 0xc(%rsp), %xmm0
subss 0x10(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movss %xmm1, 0x14(%rsp)
callq 0x34d0
movss 0x14(%rsp), %xmm1
cvtsd2ss %xmm0, %xmm0
addss %xmm0, %xmm1
movss %xmm0, (%rbx,%r13)
addq %r15, %r13
jmp 0x1b8df
movss (%rbx), %xmm0
divss %xmm1, %xmm0
movss %xmm0, (%rbx)
addq %r15, %rbx
subq $0x1, %r12
jae 0x1b91f
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/blas.c
// Function: softmax_cpu
void softmax_cpu(float *input, int n, int batch, int batch_offset, int groups, int group_offset, int stride, float temp, float *output)
{
    int g, b;
    for(b = 0; b < batch; ++b){
        for(g = 0; g < groups; ++g){
            softmax(input + b*batch_offset + g*group_offset, n, temp, stride, output + b*batch_offset + g*group_offset);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movss %xmm0, 0x4(%rsp)
movl %esi, %ebp
movq %rdi, %r15
movq 0x78(%rsp), %r13
movl 0x70(%rsp), %r12d
movslq %r9d, %rbx
xorl %eax, %eax
testl %r8d, %r8d
cmovlel %eax, %r8d
movq %r8, 0x10(%rsp)
movslq %ecx, %rcx
testl %edx, %edx
cmovlel %eax, %edx
movq %rdx, 0x18(%rsp)
shlq $0x2, %rcx
movq %rcx, 0x8(%rsp)
shlq $0x2, %rbx
cmpq 0x18(%rsp), %rax
je 0x1b9ef
movq %rax, 0x20(%rsp)
movq %r13, 0x28(%rsp)
movq %r15, 0x30(%rsp)
movq 0x10(%rsp), %r14
subq $0x1, %r14
jb 0x1b9d0
movq %r15, %rdi
movl %ebp, %esi
movss 0x4(%rsp), %xmm0
movl %r12d, %edx
movq %r13, %rcx
callq 0x1b87c
addq %rbx, %r15
addq %rbx, %r13
jmp 0x1b9ac
movq 0x20(%rsp), %rax
incq %rax
movq 0x30(%rsp), %r15
movq 0x8(%rsp), %rcx
addq %rcx, %r15
movq 0x28(%rsp), %r13
addq %rcx, %r13
jmp 0x1b991
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/blas.c
// Function: upsample_cpu
void upsample_cpu(float *in, int w, int h, int c, int batch, int stride, int forward, float scale, float *out)
{
    int i, j, k, b;
    for(b = 0; b < batch; ++b){
        for(k = 0; k < c; ++k){
            for(j = 0; j < h*stride; ++j){
                for(i = 0; i < w*stride; ++i){
                    int in_index = b*w*h*c + k*w*h + (j/stride)*w + i/stride;
                    int out_index = b*w*h*c*stride*stride + k*w*h*stride*stride + j*w*stride + i;
                    if(forward) out[out_index] = scale*in[in_index];
                    else in[in_index] += scale*out[out_index];
                }
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %r9d, %r14d
imull %edx, %r14d
movl %r9d, %r15d
imull %esi, %r15d
imull %esi, %edx
xorl %r10d, %r10d
testl %r15d, %r15d
movl $0x0, %r13d
cmovgl %r15d, %r13d
testl %r14d, %r14d
cmovlel %r10d, %r14d
testl %ecx, %ecx
movl $0x0, %eax
cmovgl %ecx, %eax
movl %eax, -0x18(%rsp)
testl %r8d, %r8d
movl $0x0, %eax
movq %rax, -0x38(%rsp)
cmovlel %r10d, %r8d
movl %r8d, -0x28(%rsp)
movl 0x38(%rsp), %r8d
movl %r9d, %eax
imull %r9d, %eax
movl %edx, %r10d
imull %eax, %r10d
movl %r10d, -0x20(%rsp)
movl %ecx, -0x2c(%rsp)
imull %ecx, %eax
movl %edx, -0x1c(%rsp)
imull %edx, %eax
movl %eax, -0x30(%rsp)
xorl %eax, %eax
cmpl -0x28(%rsp), %eax
je 0x1bb5f
movl %eax, -0x24(%rsp)
imull -0x2c(%rsp), %eax
movq %rax, -0x10(%rsp)
xorl %ecx, %ecx
movq -0x38(%rsp), %rax
movl %eax, %r10d
cmpl -0x18(%rsp), %ecx
je 0x1bb44
movq -0x10(%rsp), %rax
movq %rcx, -0x8(%rsp)
leal (%rcx,%rax), %r12d
imull -0x1c(%rsp), %r12d
movl %r10d, -0x14(%rsp)
xorl %r11d, %r11d
cmpq %r14, %r11
je 0x1bb2e
movslq %r10d, %rax
movq 0x40(%rsp), %rcx
leaq (%rcx,%rax,4), %rcx
xorl %ebx, %ebx
cmpq %rbx, %r13
je 0x1bb26
movl %r11d, %eax
cltd
idivl %r9d
movl %eax, %ebp
imull %esi, %ebp
movl %ebx, %eax
cltd
idivl %r9d
addl %r12d, %eax
addl %ebp, %eax
cltq
testl %r8d, %r8d
je 0x1bb0e
movss (%rdi,%rax,4), %xmm1
mulss %xmm0, %xmm1
movss %xmm1, (%rcx,%rbx,4)
jmp 0x1bb21
movss (%rcx,%rbx,4), %xmm1
mulss %xmm0, %xmm1
addss (%rdi,%rax,4), %xmm1
movss %xmm1, (%rdi,%rax,4)
incq %rbx
jmp 0x1badb
incq %r11
addl %r15d, %r10d
jmp 0x1bac8
movq -0x8(%rsp), %rcx
incl %ecx
movl -0x14(%rsp), %r10d
addl -0x20(%rsp), %r10d
jmp 0x1baa2
movl -0x24(%rsp), %ecx
incl %ecx
movq -0x38(%rsp), %rax
addl -0x30(%rsp), %eax
movq %rax, -0x38(%rsp)
movl %ecx, %eax
jmp 0x1ba80
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/crop_layer.c
// Function: get_crop_image
image get_crop_image(crop_layer l)
{
    int h = l.out_h;
    int w = l.out_w;
    int c = l.out_c;
    return float_to_image(w,h,c,l.output);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x88(%rsp), %edx
movl 0x8c(%rsp), %esi
movl 0x90(%rsp), %ecx
movq 0x278(%rsp), %r8
callq 0xc3de
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/crop_layer.c
// Function: make_crop_layer
crop_layer make_crop_layer(int batch, int h, int w, int c, int crop_height, int crop_width, int flip, float angle, float saturation, float exposure)
{
    fprintf(stderr, "Crop Layer: %d x %d -> %d x %d x %d image\n", h,w,crop_height,crop_width,c);
    crop_layer l = {0};
    l.type = CROP;
    l.batch = batch;
    l.h = h;
    l.w = w;
    l.c = c;
    l.scale = (float)crop_height / h;
    l.flip = flip;
    l.angle = angle;
    l.saturation = saturation;
    l.exposure = exposure;
    l.out_w = crop_width;
    l.out_h = crop_height;
    l.out_c = c;
    l.inputs = l.w * l.h * l.c;
    l.outputs = l.out_w * l.out_h * l.out_c;
    l.output = calloc(l.outputs*batch, sizeof(float));
    l.forward = forward_crop_layer;
    l.backward = backward_crop_layer;

    return l;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movss %xmm2, 0x14(%rsp)
movss %xmm1, 0x10(%rsp)
movss %xmm0, 0xc(%rsp)
movl %r9d, %ebp
movl %r8d, %r15d
movl %ecx, %r12d
movl %edx, %r13d
movl %esi, %r14d
movq %rdi, %rbx
movl 0x50(%rsp), %r9d
movq 0x48421(%rip), %rax     # 0x63ff8
movq (%rax), %rdi
movl %r8d, (%rsp)
leaq 0x33bef(%rip), %rsi     # 0x4f7d4
movl %ebp, %r8d
xorl %eax, %eax
callq 0x3270
movl $0x4a0, %edx            # imm = 0x4A0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x31c0
movl $0x7, (%rbx)
movl %r14d, 0x48(%rbx)
movl %r13d, 0x6c(%rbx)
movl %r12d, 0x70(%rbx)
movl %r15d, 0x74(%rbx)
cvtsi2ss %ebp, %xmm0
cvtsi2ss %r13d, %xmm1
divss %xmm1, %xmm0
movss %xmm0, 0x194(%rbx)
movl 0x58(%rsp), %eax
movl %eax, 0xb0(%rbx)
movss 0xc(%rsp), %xmm0
movss %xmm0, 0xd4(%rbx)
movss 0x10(%rsp), %xmm0
movss %xmm0, 0xdc(%rbx)
movss 0x14(%rsp), %xmm0
movss %xmm0, 0xe0(%rbx)
movl 0x50(%rsp), %eax
movl %eax, 0x7c(%rbx)
movl %ebp, 0x78(%rbx)
movl %r15d, 0x80(%rbx)
imull %r13d, %r12d
imull %r15d, %r12d
movl %r12d, 0x54(%rbx)
imull %r15d, %ebp
imull %eax, %ebp
movl %ebp, 0x58(%rbx)
imull %r14d, %ebp
movslq %ebp, %rdi
pushq $0x4
popq %rsi
callq 0x3250
movq %rax, 0x268(%rbx)
leaq 0x21(%rip), %rax        # 0x1bcc2
movq %rax, 0x10(%rbx)
leaq -0x115(%rip), %rax      # 0x1bb97
movq %rax, 0x18(%rbx)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/crop_layer.c
// Function: resize_crop_layer
void resize_crop_layer(layer *l, int w, int h)
{
    l->w = w;
    l->h = h;

    l->out_w =  l->scale*w;
    l->out_h =  l->scale*h;

    l->inputs = l->w * l->h * l->c;
    l->outputs = l->out_h * l->out_w * l->out_c;

    l->output = realloc(l->output, l->batch*l->outputs*sizeof(float));
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl %esi, 0x70(%rdi)
movl %edx, 0x6c(%rdi)
movd %esi, %xmm0
movd %edx, %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
cvtdq2ps %xmm1, %xmm0
movss 0x194(%rdi), %xmm1
shufps $0x0, %xmm1, %xmm1      # xmm1 = xmm1[0,0,0,0]
mulps %xmm0, %xmm1
cvttps2dq %xmm1, %xmm0
movq %xmm0, 0x78(%rdi)
imull %esi, %edx
imull 0x74(%rdi), %edx
movl %edx, 0x54(%rdi)
movd %xmm0, %eax
pshufd $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movd %xmm0, %ecx
imull %eax, %ecx
movslq 0x80(%rdi), %rax
movslq %ecx, %rcx
imulq %rax, %rcx
movl %ecx, 0x58(%rdi)
movq 0x268(%rdi), %rdi
movslq 0x48(%rbx), %rsi
imulq %rcx, %rsi
shlq $0x2, %rsi
callq 0x3350
movq %rax, 0x268(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/dropout_layer.c
// Function: make_dropout_layer
dropout_layer make_dropout_layer(int batch, int inputs, float probability)
{
    dropout_layer l = {0};
    l.type = DROPOUT;
    l.probability = probability;
    l.inputs = inputs;
    l.outputs = inputs;
    l.batch = batch;
    l.rand = calloc(inputs*batch, sizeof(float));
    l.scale = 1./(1.-probability);
    l.forward = forward_dropout_layer;
    l.backward = backward_dropout_layer;
    fprintf(stderr, "dropout       p = %.2f               %4d  ->  %4d\n", probability, inputs, inputs);
    return l;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movss %xmm0, 0xc(%rsp)
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
movl $0x4a0, %edx            # imm = 0x4A0
xorl %esi, %esi
callq 0x31c0
movl $0x6, (%rbx)
movss 0xc(%rsp), %xmm0
movss %xmm0, 0x190(%rbx)
movl %ebp, 0x54(%rbx)
movl %ebp, 0x58(%rbx)
movl %r14d, 0x48(%rbx)
imull %ebp, %r14d
movslq %r14d, %rdi
pushq $0x4
popq %rsi
callq 0x3250
cvtss2sd 0xc(%rsp), %xmm0
movsd 0x301bf(%rip), %xmm1    # 0x4c128
movapd %xmm1, %xmm2
subsd %xmm0, %xmm2
divsd %xmm2, %xmm1
cvtsd2ss %xmm1, %xmm1
movq %rax, 0x1d0(%rbx)
movss %xmm1, 0x194(%rbx)
leaq 0x37(%rip), %rax        # 0x1bfc6
movq %rax, 0x10(%rbx)
leaq 0xd3(%rip), %rax        # 0x1c06d
movq %rax, 0x18(%rbx)
movq 0x48053(%rip), %rax     # 0x63ff8
movq (%rax), %rdi
leaq 0x33850(%rip), %rsi     # 0x4f7ff
movl %ebp, %edx
movl %ebp, %ecx
movb $0x1, %al
callq 0x3270
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/dropout_layer.c
// Function: forward_dropout_layer
void forward_dropout_layer(dropout_layer l, network net)
{
    int i;
    if (!net.train) return;
    for(i = 0; i < l.batch * l.inputs; ++i){
        float r = rand_uniform(0, 1);
        l.rand[i] = r;
        if(r < l.probability) net.input[i] = 0;
        else net.input[i] *= l.scale;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x0, 0x5c8(%rsp)
je 0x1c061
leaq 0x4d0(%rsp), %rax
leaq 0x30(%rsp), %rcx
movl 0x54(%rcx), %ebx
imull 0x48(%rcx), %ebx
movq 0x1d0(%rcx), %r14
movss 0x190(%rcx), %xmm0
movss %xmm0, 0x4(%rsp)
movss 0x194(%rcx), %xmm0
movss %xmm0, (%rsp)
movq 0xd8(%rax), %r15
xorl %r12d, %r12d
testl %ebx, %ebx
cmovlel %r12d, %ebx
cmpq %r12, %rbx
je 0x1c061
xorps %xmm0, %xmm0
movss 0x2ffd6(%rip), %xmm1    # 0x4c008
callq 0x4c09
movss %xmm0, (%r14,%r12,4)
movss 0x4(%rsp), %xmm1
ucomiss %xmm0, %xmm1
xorps %xmm0, %xmm0
ja 0x1c056
movss (%r15,%r12,4), %xmm0
mulss (%rsp), %xmm0
movss %xmm0, (%r15,%r12,4)
incq %r12
jmp 0x1c022
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/dropout_layer.c
// Function: backward_dropout_layer
void backward_dropout_layer(dropout_layer l, network net)
{
    int i;
    if(!net.delta) return;
    for(i = 0; i < l.batch * l.inputs; ++i){
        float r = l.rand[i];
        if(r < l.probability) net.delta[i] = 0;
        else net.delta[i] *= l.scale;
    }
}

// Assembly:
movq 0x590(%rsp), %rax
testq %rax, %rax
je 0x1c0c5
leaq 0x8(%rsp), %rsi
movl 0x54(%rsi), %ecx
imull 0x48(%rsi), %ecx
movq 0x1d0(%rsi), %rdx
movss 0x190(%rsi), %xmm0
movss 0x194(%rsi), %xmm1
xorl %esi, %esi
testl %ecx, %ecx
cmovlel %esi, %ecx
cmpq %rsi, %rcx
je 0x1c0c5
xorps %xmm2, %xmm2
ucomiss (%rdx,%rsi,4), %xmm0
ja 0x1c0bb
movss (%rax,%rsi,4), %xmm2
mulss %xmm1, %xmm2
movss %xmm2, (%rax,%rsi,4)
incq %rsi
jmp 0x1c0a4
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/maxpool_layer.c
// Function: get_maxpool_image
image get_maxpool_image(maxpool_layer l)
{
    int h = l.out_h;
    int w = l.out_w;
    int c = l.c;
    return float_to_image(w,h,c,l.output);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x84(%rsp), %ecx
movl 0x88(%rsp), %edx
movl 0x8c(%rsp), %esi
movq 0x278(%rsp), %r8
callq 0xc3de
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/maxpool_layer.c
// Function: get_maxpool_delta
image get_maxpool_delta(maxpool_layer l)
{
    int h = l.out_h;
    int w = l.out_w;
    int c = l.c;
    return float_to_image(w,h,c,l.delta);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x84(%rsp), %ecx
movl 0x88(%rsp), %edx
movl 0x8c(%rsp), %esi
movq 0x270(%rsp), %r8
callq 0xc3de
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/maxpool_layer.c
// Function: make_maxpool_layer
maxpool_layer make_maxpool_layer(int batch, int h, int w, int c, int size, int stride, int padding)
{
    maxpool_layer l = {0};
    l.type = MAXPOOL;
    l.batch = batch;
    l.h = h;
    l.w = w;
    l.c = c;
    l.pad = padding;
    l.out_w = (w + padding - size)/stride + 1;
    l.out_h = (h + padding - size)/stride + 1;
    l.out_c = c;
    l.outputs = l.out_h * l.out_w * l.out_c;
    l.inputs = h*w*c;
    l.size = size;
    l.stride = stride;
    int output_size = l.out_h * l.out_w * l.out_c * batch;
    l.indexes = calloc(output_size, sizeof(int));
    l.output =  calloc(output_size, sizeof(float));
    l.delta =   calloc(output_size, sizeof(float));
    l.forward = forward_maxpool_layer;
    l.backward = backward_maxpool_layer;
    fprintf(stderr, "max          %d x %d / %d  %4d x%4d x%4d   ->  %4d x%4d x%4d\n", size, size, stride, w, h, c, l.out_w, l.out_h, l.out_c);
    return l;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %r12d
movl %r8d, %r15d
movl %ecx, %r13d
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
movl $0x4a0, %edx            # imm = 0x4A0
xorl %esi, %esi
callq 0x31c0
movl $0x3, (%rbx)
movl %ebp, 0x48(%rbx)
movl %r14d, 0x6c(%rbx)
movl %r13d, 0x70(%rbx)
movl %r15d, 0x74(%rbx)
movl 0x58(%rsp), %ecx
movl %ecx, 0xa8(%rbx)
movl %r13d, %eax
movl %r13d, %edi
movl %r13d, 0xc(%rsp)
subl %r12d, %eax
addl %ecx, %eax
movl %ecx, %r8d
cltd
movl 0x50(%rsp), %ecx
idivl %ecx
movl %eax, %r13d
incl %r13d
movl %r13d, 0x7c(%rbx)
movl %r14d, %eax
movq %r14, %rsi
movq %r14, 0x10(%rsp)
subl %r12d, %eax
addl %r8d, %eax
cltd
idivl %ecx
movl %ecx, %edx
movl %eax, %r14d
incl %r14d
movl %r14d, 0x78(%rbx)
movl %r15d, 0x80(%rbx)
movl %r13d, %eax
imull %r15d, %eax
imull %r14d, %eax
movl %eax, 0x58(%rbx)
movl %edi, %ecx
imull %esi, %ecx
imull %r15d, %ecx
movl %ecx, 0x54(%rbx)
movl %r12d, 0x90(%rbx)
movl %edx, 0x98(%rbx)
imull %ebp, %eax
movslq %eax, %rbp
pushq $0x4
popq %rsi
movq %rbp, %rdi
callq 0x3250
movq %rax, 0x1a0(%rbx)
movq %rbp, %rdi
pushq $0x4
popq %rsi
callq 0x3250
movq %rax, 0x268(%rbx)
movq %rbp, %rdi
pushq $0x4
popq %rsi
callq 0x3250
movq %rax, 0x260(%rbx)
leaq 0x5d(%rip), %rax        # 0x1c2a2
movq %rax, 0x10(%rbx)
leaq 0x2ea(%rip), %rax       # 0x1c53a
movq %rax, 0x18(%rbx)
movq 0x47d9d(%rip), %rax     # 0x63ff8
movq (%rax), %rdi
subq $0x8, %rsp
leaq 0x335c9(%rip), %rsi     # 0x4f832
movl %r12d, %edx
movl %r12d, %ecx
movl 0x58(%rsp), %r8d
movl 0x14(%rsp), %r9d
xorl %eax, %eax
pushq %r15
pushq %r14
pushq %r13
pushq %r15
pushq 0x38(%rsp)
callq 0x3270
addq $0x30, %rsp
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/maxpool_layer.c
// Function: backward_maxpool_layer
void backward_maxpool_layer(const maxpool_layer l, network net)
{
    int i;
    int h = l.out_h;
    int w = l.out_w;
    int c = l.c;
    for(i = 0; i < h*w*c*l.batch; ++i){
        int index = l.indexes[i];
        net.delta[index] += l.delta[i];
    }
}

// Assembly:
movslq 0x80(%rsp), %rax
movslq 0x84(%rsp), %rcx
imulq %rax, %rcx
movslq 0x7c(%rsp), %rdx
movslq 0x50(%rsp), %rax
imulq %rdx, %rax
imulq %rcx, %rax
movq 0x1a8(%rsp), %rcx
movq 0x268(%rsp), %rdx
movq 0x590(%rsp), %rsi
xorl %edi, %edi
cmpq %rax, %rdi
jge 0x1c599
movslq (%rcx,%rdi,4), %r8
movss (%rdx,%rdi,4), %xmm0
addss (%rsi,%r8,4), %xmm0
movss %xmm0, (%rsi,%r8,4)
incq %rdi
jmp 0x1c57a
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/softmax_layer.c
// Function: make_softmax_layer
softmax_layer make_softmax_layer(int batch, int inputs, int groups)
{
    assert(inputs%groups == 0);
    fprintf(stderr, "softmax                                        %4d\n",  inputs);
    softmax_layer l = {0};
    l.type = SOFTMAX;
    l.batch = batch;
    l.groups = groups;
    l.inputs = inputs;
    l.outputs = inputs;
    l.loss = calloc(inputs*batch, sizeof(float));
    l.output = calloc(inputs*batch, sizeof(float));
    l.delta = calloc(inputs*batch, sizeof(float));
    l.cost = calloc(1, sizeof(float));

    l.forward = forward_softmax_layer;
    l.backward = backward_softmax_layer;
    return l;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %edx, %eax
cltd
idivl %ecx
testl %edx, %edx
jne 0x1c72a
movl %ecx, %r15d
movl %esi, %r14d
movq %rdi, %rbx
movq 0x4797e(%rip), %rax     # 0x63ff8
movq (%rax), %rdi
leaq 0x3323f(%rip), %rsi     # 0x4f8c3
movl %ebp, %edx
xorl %eax, %eax
callq 0x3270
movl $0x4a0, %edx            # imm = 0x4A0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x31c0
movl $0x4, (%rbx)
movl %r14d, 0x48(%rbx)
movl %r15d, 0x8c(%rbx)
movl %ebp, 0x54(%rbx)
movl %ebp, 0x58(%rbx)
imull %r14d, %ebp
movslq %ebp, %r14
pushq $0x4
popq %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x3250
movq %rax, 0x270(%rbx)
movq %r14, %rdi
movq %r15, %rsi
callq 0x3250
movq %rax, 0x268(%rbx)
movq %r14, %rdi
movq %r15, %rsi
callq 0x3250
movq %rax, 0x260(%rbx)
pushq $0x1
popq %rdi
movq %r15, %rsi
callq 0x3250
movq %rax, 0x1d8(%rbx)
leaq 0x3a(%rip), %rax        # 0x1c747
movq %rax, 0x10(%rbx)
leaq 0x183(%rip), %rax       # 0x1c89b
movq %rax, 0x18(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3313f(%rip), %rdi     # 0x4f870
leaq 0x3314b(%rip), %rsi     # 0x4f883
leaq 0x33154(%rip), %rcx     # 0x4f893
pushq $0xd
popq %rdx
callq 0x31b0
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/softmax_layer.c
// Function: forward_softmax_layer
void forward_softmax_layer(const softmax_layer l, network net)
{
    if(l.softmax_tree){
        int i;
        int count = 0;
        for (i = 0; i < l.softmax_tree->groups; ++i) {
            int group_size = l.softmax_tree->group_size[i];
            softmax_cpu(net.input + count, group_size, l.batch, l.inputs, 1, 0, 1, l.temperature, l.output + count);
            count += group_size;
        }
    } else {
        softmax_cpu(net.input, l.inputs/l.groups, l.batch, l.inputs, l.groups, l.inputs/l.groups, 1, l.temperature, l.output);
    }

    if(net.truth && !l.noloss){
        softmax_x_ent_cpu(l.batch*l.inputs, l.output, net.truth, l.delta, l.loss);
        l.cost[0] = sum_array(l.loss, l.batch*l.inputs);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x4f0(%rsp), %r15
leaq 0x50(%rsp), %rbx
movq 0x490(%rbx), %r13
testq %r13, %r13
je 0x1c7f5
movq 0xd8(%r15), %r15
movl 0x48(%rbx), %eax
movl %eax, 0x10(%rsp)
movl 0x54(%rbx), %eax
movl %eax, 0xc(%rsp)
movss 0x18c(%rbx), %xmm0
movss %xmm0, 0x14(%rsp)
movq 0x268(%rbx), %r14
xorl %ebx, %ebx
xorl %ebp, %ebp
movslq 0x30(%r13), %rax
cmpq %rax, %rbx
jge 0x1c7e6
movq 0x38(%r13), %rax
movl (%rax,%rbx,4), %r12d
movslq %ebp, %rbp
leaq (%r15,%rbp,4), %rdi
leaq (%r14,%rbp,4), %rax
movl %r12d, %esi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
pushq $0x1
popq %r8
xorl %r9d, %r9d
movss 0x14(%rsp), %xmm0
pushq %rax
pushq $0x1
callq 0x1b943
popq %rax
popq %rcx
addl %r12d, %ebp
incq %rbx
jmp 0x1c7a0
leaq 0x50(%rsp), %rbx
leaq 0x4f0(%rsp), %r15
jmp 0x1c83e
movq 0xd8(%r15), %rdi
movl 0x48(%rbx), %r9d
movl 0x54(%rbx), %ecx
movl 0x8c(%rbx), %r8d
movl %ecx, %eax
cltd
idivl %r8d
movss 0x18c(%rbx), %xmm0
movq 0x268(%rbx), %r10
movl %eax, %esi
movl %r9d, 0x10(%rsp)
movl %r9d, %edx
movl %ecx, 0xc(%rsp)
movl %eax, %r9d
movq %r10, %r14
pushq %r10
pushq $0x1
callq 0x1b943
popq %rax
popq %rcx
movq 0xe0(%r15), %rdx
testq %rdx, %rdx
je 0x1c88c
cmpl $0x0, 0xf4(%rbx)
jne 0x1c88c
movl 0xc(%rsp), %ebp
imull 0x10(%rsp), %ebp
movq 0x260(%rbx), %rcx
movq 0x270(%rbx), %r15
movl %ebp, %edi
movq %r14, %rsi
movq %r15, %r8
callq 0x1b6b6
movq %r15, %rdi
movl %ebp, %esi
callq 0x48aa
movq 0x1d8(%rbx), %rax
movss %xmm0, (%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: get_paths
list *get_paths(char *filename)
{
    char *path;
    FILE *file = fopen(filename, "r");
    if(!file) file_error(filename);
    list *lines = make_list();
    while((path=fgetl(file))){
        list_insert(lines, path);
    }
    fclose(file);
    return lines;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x35413(%rip), %rsi     # 0x51ce9
callq 0x3390
movq %rax, %rbx
testq %rax, %rax
jne 0x1c8eb
movq %r14, %rdi
callq 0x3d0f
xorl %eax, %eax
callq 0x7220
movq %rax, %r14
movq %rbx, %rdi
callq 0x3d32
testq %rax, %rax
je 0x1c90f
movq %r14, %rdi
movq %rax, %rsi
callq 0x7271
jmp 0x1c8f5
movq %rbx, %rdi
callq 0x3130
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: get_random_paths
char **get_random_paths(char **paths, int n, int m)
{
    char **random_paths = calloc(n, sizeof(char*));
    int i;
    pthread_mutex_lock(&mutex);
    for(i = 0; i < n; ++i){
        int index = rand()%m;
        random_paths[i] = paths[index];
        //if(i == 0) printf("%s\n", paths[index]);
    }
    pthread_mutex_unlock(&mutex);
    return random_paths;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rdi, %r14
movslq %esi, %r15
pushq $0x8
popq %rsi
movq %r15, %rdi
callq 0x3250
movq %rax, %r12
leaq 0x47ea0(%rip), %rdi     # 0x647e8
callq 0x34c0
xorl %r13d, %r13d
testl %r15d, %r15d
cmovlel %r13d, %r15d
cmpq %r13, %r15
je 0x1c974
callq 0x34e0
cltd
idivl %ebx
movslq %edx, %rax
movq (%r14,%rax,8), %rax
movq %rax, (%r12,%r13,8)
incq %r13
jmp 0x1c957
leaq 0x47e6d(%rip), %rdi     # 0x647e8
callq 0x32f0
movq %r12, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: find_replace_paths
char **find_replace_paths(char **paths, int n, char *find, char *replace)
{
    char **replace_paths = calloc(n, sizeof(char*));
    int i;
    for(i = 0; i < n; ++i){
        char replaced[4096];
        find_replace(paths[i], find, replace, replaced);
        replace_paths[i] = copy_string(replaced);
    }
    return replace_paths;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1018, %rsp           # imm = 0x1018
movq %rcx, 0x8(%rsp)
movq %rdx, %r14
movq %rdi, %r15
movslq %esi, %r12
pushq $0x8
popq %rsi
movq %r12, %rdi
callq 0x3250
movq %rax, %r13
xorl %ebx, %ebx
testl %r12d, %r12d
cmovlel %ebx, %r12d
leaq 0x10(%rsp), %rbp
cmpq %rbx, %r12
je 0x1c9f3
movq (%r15,%rbx,8), %rdi
movq %r14, %rsi
movq 0x8(%rsp), %rdx
movq %rbp, %rcx
callq 0x42ea
movq %rbp, %rdi
callq 0x420b
movq %rax, (%r13,%rbx,8)
incq %rbx
jmp 0x1c9c8
movq %r13, %rax
addq $0x1018, %rsp           # imm = 0x1018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: load_image_paths_gray
matrix load_image_paths_gray(char **paths, int n, int w, int h)
{
    int i;
    matrix X;
    X.rows = n;
    X.vals = calloc(X.rows, sizeof(float*));
    X.cols = 0;

    for(i = 0; i < n; ++i){
        image im = load_image(paths[i], w, h, 3);

        image gray = grayscale_image(im);
        free_image(im);
        im = gray;

        X.vals[i] = im.data;
        X.cols = im.h*im.w*im.c;
    }
    return X;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %ecx, %ebp
movl %edx, %r14d
movl %esi, 0x1c(%rsp)
movq %rdi, %r12
movslq %esi, %r13
pushq $0x8
popq %rsi
movq %r13, %rdi
callq 0x3250
movq %rax, %r15
xorl %ebx, %ebx
testl %r13d, %r13d
movl $0x0, %r13d
cmovgl 0x1c(%rsp), %r13d
xorl %ecx, %ecx
cmpq %rbx, %r13
je 0x1cac2
movq (%r12,%rbx,8), %rsi
leaq 0x20(%rsp), %rdi
movl %r14d, %edx
movl %ebp, %ecx
pushq $0x3
popq %r8
callq 0xe660
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x40(%rsp), %rdi
callq 0xf680
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0xba88
movups 0x40(%rsp), %xmm0
movaps %xmm0, 0x20(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x30(%rsp)
movl 0x20(%rsp), %ecx
imull 0x24(%rsp), %ecx
movq %rax, (%r15,%rbx,8)
imull 0x28(%rsp), %ecx
incq %rbx
jmp 0x1ca46
shlq $0x20, %rcx
movl 0x1c(%rsp), %eax
orq %rcx, %rax
movq %r15, %rdx
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: load_image_paths
matrix load_image_paths(char **paths, int n, int w, int h)
{
    int i;
    matrix X;
    X.rows = n;
    X.vals = calloc(X.rows, sizeof(float*));
    X.cols = 0;

    for(i = 0; i < n; ++i){
        image im = load_image_color(paths[i], w, h);
        X.vals[i] = im.data;
        X.cols = im.h*im.w*im.c;
    }
    return X;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %ebp
movl %edx, %r14d
movl %esi, 0xc(%rsp)
movq %rdi, %r12
movslq %esi, %r13
pushq $0x8
popq %rsi
movq %r13, %rdi
callq 0x3250
movq %rax, %r15
xorl %ebx, %ebx
testl %r13d, %r13d
movl $0x0, %r13d
cmovgl 0xc(%rsp), %r13d
xorl %ecx, %ecx
cmpq %rbx, %r13
je 0x1cb51
movq (%r12,%rbx,8), %rsi
leaq 0x10(%rsp), %rdi
movl %r14d, %edx
movl %ebp, %ecx
callq 0xbf36
movq 0x20(%rsp), %rax
movl 0x10(%rsp), %ecx
imull 0x14(%rsp), %ecx
movq %rax, (%r15,%rbx,8)
imull 0x18(%rsp), %ecx
incq %rbx
jmp 0x1cb1d
shlq $0x20, %rcx
movl 0xc(%rsp), %eax
orq %rcx, %rax
movq %r15, %rdx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: load_image_augment_paths
matrix load_image_augment_paths(char **paths, int n, int min, int max, int size, float angle, float aspect, float hue, float saturation, float exposure, int center)
{
    int i;
    matrix X;
    X.rows = n;
    X.vals = calloc(X.rows, sizeof(float*));
    X.cols = 0;

    for(i = 0; i < n; ++i){
        image im = load_image_color(paths[i], 0, 0);
        image crop;
        if(center){
            crop = center_crop_image(im, size, size);
        } else {
            crop = random_augment_image(im, angle, aspect, min, max, size, size);
        }
        int flip = rand()%2;
        if (flip) flip_image(crop);
        random_distort_image(crop, hue, saturation, exposure);

        /*
        show_image(im, "orig");
        show_image(crop, "crop");
        cvWaitKey(0);
        */
        //grayscale_image_3c(crop);
        free_image(im);
        X.vals[i] = crop.data;
        X.cols = crop.h*crop.w*crop.c;
    }
    return X;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %r9d, %ebx
movss %xmm4, 0x54(%rsp)
movss %xmm3, 0x50(%rsp)
movss %xmm2, 0x4c(%rsp)
movss %xmm1, 0x48(%rsp)
movss %xmm0, 0x44(%rsp)
movl %r8d, %r14d
movl %ecx, 0x40(%rsp)
movl %edx, 0x3c(%rsp)
movl %esi, %ebp
movq %rdi, %r13
movslq %esi, %r12
pushq $0x8
popq %rsi
movq %r12, %rdi
callq 0x3250
xorl %r15d, %r15d
testl %r12d, %r12d
movl $0x0, %r12d
movl %ebp, 0x38(%rsp)
cmovgl %ebp, %r12d
movq %rax, %rbp
xorl %ecx, %ecx
cmpq %r15, %r12
je 0x1cced
movq (%r13,%r15,8), %rsi
leaq 0x58(%rsp), %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xbf36
testl %ebx, %ebx
je 0x1cc1c
movq 0x68(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x58(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x70(%rsp), %rdi
movl %r14d, %esi
movl %r14d, %edx
callq 0xdb19
jmp 0x1cc53
movq 0x68(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x58(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x70(%rsp), %rdi
movss 0x44(%rsp), %xmm0
movss 0x48(%rsp), %xmm1
movl 0x3c(%rsp), %esi
movl 0x40(%rsp), %edx
movl %r14d, %ecx
movl %r14d, %r8d
callq 0xeb9c
movq 0x80(%rsp), %rax
movq %rax, 0x30(%rsp)
movups 0x70(%rsp), %xmm0
movaps %xmm0, 0x20(%rsp)
callq 0x34e0
testb $0x1, %al
je 0x1cc8b
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0xcb93
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movss 0x4c(%rsp), %xmm0
movss 0x50(%rsp), %xmm1
movss 0x54(%rsp), %xmm2
callq 0xfd21
movq 0x68(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x58(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0xba88
movq 0x30(%rsp), %rax
movl 0x20(%rsp), %ecx
imull 0x24(%rsp), %ecx
movq %rax, (%rbp,%r15,8)
imull 0x28(%rsp), %ecx
incq %r15
jmp 0x1cbd7
shlq $0x20, %rcx
movl 0x38(%rsp), %eax
orq %rcx, %rax
movq %rbp, %rdx
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: read_boxes
box_label *read_boxes(char *filename, int *n)
{
    FILE *file = fopen(filename, "r");
    if(!file) file_error(filename);
    float x, y, h, w;
    int id;
    int count = 0;
    int size = 64;
    box_label *boxes = calloc(size, sizeof(box_label));
    while(fscanf(file, "%d %f %f %f %f", &id, &x, &y, &w, &h) == 5){
        if(count == size) {
            size = size * 2;
            boxes = realloc(boxes, size*sizeof(box_label));
        }
        boxes[count].id = id;
        boxes[count].x = x;
        boxes[count].y = y;
        boxes[count].h = h;
        boxes[count].w = w;
        boxes[count].left   = x - w/2;
        boxes[count].right  = x + w/2;
        boxes[count].top    = y - h/2;
        boxes[count].bottom = y + h/2;
        ++count;
    }
    fclose(file);
    *n = count;
    return boxes;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, 0x20(%rsp)
movq %rdi, %rbx
leaq 0x34fbf(%rip), %rsi     # 0x51ce9
callq 0x3390
movq %rax, %r14
testq %rax, %rax
jne 0x1cd3f
movq %rbx, %rdi
callq 0x3d0f
pushq $0x40
popq %rdi
pushq $0x24
popq %rsi
callq 0x3250
movq %rax, %r15
pushq $0x40
popq %r13
pushq $0x20
popq %rbp
leaq 0x18(%rsp), %r12
xorl %ebx, %ebx
leaq 0xc(%rsp), %rax
movq %rax, (%rsp)
movq %r14, %rdi
leaq 0x32c22(%rip), %rsi     # 0x4f990
leaq 0x1c(%rsp), %rdx
leaq 0x14(%rsp), %rcx
leaq 0x10(%rsp), %r8
movq %r12, %r9
xorl %eax, %eax
callq 0x30a0
cmpl $0x5, %eax
jne 0x1ce5b
movl %r13d, %eax
cmpq %rax, %rbx
jne 0x1cdad
addl %r13d, %r13d
movslq %r13d, %rax
imulq $0x24, %rax, %rsi
movq %r15, %rdi
callq 0x3350
movq %rax, %r15
movl 0x1c(%rsp), %eax
movl %eax, -0x20(%r15,%rbp)
movss 0x14(%rsp), %xmm0
movss %xmm0, -0x1c(%r15,%rbp)
movss 0x10(%rsp), %xmm0
movss %xmm0, -0x18(%r15,%rbp)
movss 0xc(%rsp), %xmm0
movss %xmm0, -0x10(%r15,%rbp)
movss 0x18(%rsp), %xmm0
movss %xmm0, -0x14(%r15,%rbp)
movss 0x14(%rsp), %xmm1
movss 0x2f43c(%rip), %xmm2    # 0x4c234
mulss %xmm2, %xmm0
subss %xmm0, %xmm1
movss %xmm1, -0xc(%r15,%rbp)
movss 0x18(%rsp), %xmm0
mulss %xmm2, %xmm0
addss 0x14(%rsp), %xmm0
movss %xmm0, -0x8(%r15,%rbp)
movss 0x10(%rsp), %xmm0
movss 0xc(%rsp), %xmm1
mulss %xmm2, %xmm1
subss %xmm1, %xmm0
movss 0xc(%rsp), %xmm1
mulss %xmm2, %xmm1
addss 0x10(%rsp), %xmm1
movss %xmm0, -0x4(%r15,%rbp)
movss %xmm1, (%r15,%rbp)
incq %rbx
addq $0x24, %rbp
jmp 0x1cd5b
movq %r14, %rdi
callq 0x3130
movq 0x20(%rsp), %rax
movl %ebx, (%rax)
movq %r15, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: randomize_boxes
void randomize_boxes(box_label *b, int n)
{
    int i;
    for(i = 0; i < n; ++i){
        box_label swap = b[i];
        int index = rand()%n;
        b[i] = b[index];
        b[index] = swap;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebx
movq %rdi, %r14
xorl %r15d, %r15d
testl %esi, %esi
movl $0x0, %eax
cmovgl %esi, %eax
imulq $0x24, %rax, %r12
cmpq %r15, %r12
je 0x1cf11
movl 0x20(%r14,%r15), %eax
movl %eax, 0x20(%rsp)
movups (%r14,%r15), %xmm0
movups 0x10(%r14,%r15), %xmm1
movaps %xmm1, 0x10(%rsp)
movaps %xmm0, (%rsp)
callq 0x34e0
cltd
idivl %ebx
movslq %edx, %rax
imulq $0x24, %rax, %rax
movl 0x20(%r14,%rax), %ecx
movl %ecx, 0x20(%r14,%r15)
movups (%r14,%rax), %xmm0
movups 0x10(%r14,%rax), %xmm1
movups %xmm1, 0x10(%r14,%r15)
movups %xmm0, (%r14,%r15)
movl 0x20(%rsp), %ecx
movl %ecx, 0x20(%r14,%rax)
movaps (%rsp), %xmm0
movaps 0x10(%rsp), %xmm1
movups %xmm1, 0x10(%r14,%rax)
movups %xmm0, (%r14,%rax)
addq $0x24, %r15
jmp 0x1ce9d
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: fill_truth_swag
void fill_truth_swag(char *path, float *truth, int classes, int flip, float dx, float dy, float sx, float sy)
{
    char labelpath[4096];
    find_replace(path, "images", "labels", labelpath);
    find_replace(labelpath, "JPEGImages", "labels", labelpath);
    find_replace(labelpath, ".jpg", ".txt", labelpath);
    find_replace(labelpath, ".JPG", ".txt", labelpath);
    find_replace(labelpath, ".JPEG", ".txt", labelpath);

    int count = 0;
    box_label *boxes = read_boxes(labelpath, &count);
    randomize_boxes(boxes, count);
    correct_boxes(boxes, count, dx, dy, sx, sy, flip);
    float x,y,w,h;
    int id;
    int i;

    for (i = 0; i < count && i < 90; ++i) {
        x =  boxes[i].x;
        y =  boxes[i].y;
        w =  boxes[i].w;
        h =  boxes[i].h;
        id = boxes[i].id;

        if (w < .0 || h < .0) continue;

        int index = (4+classes) * i;

        truth[index++] = x;
        truth[index++] = y;
        truth[index++] = w;
        truth[index++] = h;

        if (id < classes) truth[index+id] = 1;
    }
    free(boxes);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1020, %rsp           # imm = 0x1020
movss %xmm3, 0x18(%rsp)
movss %xmm2, 0x14(%rsp)
movss %xmm1, 0x10(%rsp)
movss %xmm0, 0xc(%rsp)
movl %ecx, %ebp
movl %edx, %ebx
movq %rsi, %r14
leaq 0x3287b(%rip), %rsi     # 0x4f99f
leaq 0x3287b(%rip), %r12     # 0x4f9a6
leaq 0x20(%rsp), %r15
movq %r12, %rdx
movq %r15, %rcx
callq 0x42ea
leaq 0x3286b(%rip), %rsi     # 0x4f9ad
movq %r15, %rdi
movq %r12, %rdx
movq %r15, %rcx
callq 0x42ea
leaq 0x315f5(%rip), %rsi     # 0x4e74c
leaq 0x3466b(%rip), %r12     # 0x517c9
movq %r15, %rdi
movq %r12, %rdx
movq %r15, %rcx
callq 0x42ea
leaq 0x32845(%rip), %rsi     # 0x4f9b8
movq %r15, %rdi
movq %r12, %rdx
movq %r15, %rcx
callq 0x42ea
leaq 0x32835(%rip), %rsi     # 0x4f9bd
movq %r15, %rdi
movq %r12, %rdx
movq %r15, %rcx
callq 0x42ea
leaq 0x1c(%rsp), %r12
andl $0x0, (%r12)
movq %r15, %rdi
movq %r12, %rsi
callq 0x1cd0d
movq %rax, %r15
movl (%r12), %r12d
movq %rax, %rdi
movl %r12d, %esi
callq 0x1ce7c
movq %r15, %rdi
movl %r12d, %esi
movss 0xc(%rsp), %xmm0
movss 0x10(%rsp), %xmm1
movss 0x14(%rsp), %xmm2
movss 0x18(%rsp), %xmm3
movl %ebp, %edx
callq 0x1cf1d
leal 0x4(%rbx), %ecx
movslq %r12d, %rax
movslq %ecx, %rcx
addq $0x10, %r14
shlq $0x2, %rcx
xorl %edx, %edx
xorps %xmm0, %xmm0
movq %r15, %rsi
cmpq %rax, %rdx
jge 0x1d244
cmpq $0x59, %rdx
ja 0x1d244
movsd 0xc(%rsi), %xmm1
ucomiss %xmm1, %xmm0
ja 0x1d238
movaps %xmm1, %xmm2
shufps $0x55, %xmm1, %xmm2     # xmm2 = xmm2[1,1],xmm1[1,1]
ucomiss %xmm2, %xmm0
ja 0x1d238
movslq (%rsi), %rdi
movsd 0x4(%rsi), %xmm2
movlhps %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0]
movups %xmm2, -0x10(%r14)
cmpl %ebx, %edi
jge 0x1d238
movl $0x3f800000, (%r14,%rdi,4) # imm = 0x3F800000
incq %rdx
addq $0x24, %rsi
addq %rcx, %r14
jmp 0x1d1fb
movq %r15, %rdi
callq 0x3040
addq $0x1020, %rsp           # imm = 0x1020
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: load_rle
void load_rle(image im, int *rle, int n)
{
    int count = 0;
    int curr = 0;
    int i,j;
    for(i = 0; i < n; ++i){
        for(j = 0; j < rle[i]; ++j){
            im.data[count++] = curr;
        }
        curr = 1 - curr;
    }
    for(; count < im.h*im.w*im.c; ++count){
        im.data[count] = curr;
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
leaq 0x20(%rsp), %rcx
movq 0x10(%rcx), %rax
xorl %r8d, %r8d
testl %esi, %esi
cmovlel %r8d, %esi
movl $0x1, %r10d
xorl %r11d, %r11d
xorl %edx, %edx
xorl %r9d, %r9d
cmpq %rsi, %r11
je 0x1d4a2
movslq %edx, %rbx
movl (%rdi,%r11,4), %ebp
cvtsi2ss %r9d, %xmm0
testl %ebp, %ebp
cmovlel %r8d, %ebp
addl %ebp, %edx
movslq %edx, %r14
cmpq %rbx, %r14
je 0x1d494
movss %xmm0, (%rax,%rbx,4)
incq %rbx
jmp 0x1d485
movl %r10d, %ebx
subl %r9d, %ebx
incq %r11
movl %ebx, %r9d
jmp 0x1d469
movslq 0x4(%rcx), %rsi
movslq (%rcx), %rdi
imulq %rsi, %rdi
movslq 0x8(%rcx), %rcx
imulq %rdi, %rcx
cvtsi2ss %r9d, %xmm0
movslq %edx, %rdx
cmpq %rcx, %rdx
jge 0x1d4cc
movss %xmm0, (%rax,%rdx,4)
incq %rdx
jmp 0x1d4bd
popq %rbx
popq %r14
popq %rbp
retq