LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/batchnorm_layer.c
// Function: normalize_delta_cpu
void normalize_delta_cpu(float *x, float *mean, float *variance, float *mean_delta, float *variance_delta, int batch, int filters, int spatial, float *delta)
{
    int f, j, k;
    for(j = 0; j < batch; ++j){
        for(f = 0; f < filters; ++f){
            for(k = 0; k < spatial; ++k){
                int index = j*filters*spatial + f*spatial + k;
                delta[index] = delta[index] * 1./(sqrt(variance[f] + .00001f)) + variance_delta[f] * 2. * (x[index] - mean[f]) / (spatial * batch) + mean_delta[f]/(spatial*batch);
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, %r13
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, 0x20(%rsp)
movl 0x98(%rsp), %edi
movl 0x90(%rsp), %r10d
movl %edi, %eax
imull %r9d, %eax
cvtsi2sd %eax, %xmm2
cvtsi2ss %eax, %xmm3
xorl %eax, %eax
testl %edi, %edi
movl $0x0, %r11d
cmovgl %edi, %r11d
testl %r10d, %r10d
movl $0x0, %ebx
cmovgl %r10d, %ebx
movq %rbx, 0x28(%rsp)
testl %r9d, %r9d
cmovlel %eax, %r9d
movl %r9d, 0x8(%rsp)
imull %edi, %r10d
movl %r10d, 0x4(%rsp)
movss 0x20646(%rip), %xmm4    # 0x5095c
xorpd %xmm5, %xmm5
xorl %edi, %edi
movsd %xmm2, 0x38(%rsp)
movss %xmm3, 0x14(%rsp)
movq %r11, 0x30(%rsp)
cmpl 0x8(%rsp), %edi
je 0x30451
movl %edi, 0xc(%rsp)
movq %rax, 0x18(%rsp)
xorl %ebp, %ebp
cmpq 0x28(%rsp), %rbp
je 0x3043d
movl %eax, 0x10(%rsp)
cltq
movq 0xa0(%rsp), %rdi
leaq (%rdi,%rax,4), %r9
movq 0x20(%rsp), %rdi
leaq (%rdi,%rax,4), %rax
xorl %r12d, %r12d
movq %r9, 0x48(%rsp)
movq %rax, 0x40(%rsp)
cmpq %r12, %r11
je 0x3042a
cvtss2sd (%r9,%r12,4), %xmm6
movss (%r15,%rbp,4), %xmm0
addss %xmm4, %xmm0
cvtss2sd %xmm0, %xmm0
ucomisd %xmm5, %xmm0
jb 0x3039e
sqrtsd %xmm0, %xmm0
jmp 0x303dc
movq %rcx, %rbx
movsd %xmm6, 0x50(%rsp)
callq 0x3460
movsd 0x50(%rsp), %xmm6
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %r9
xorpd %xmm5, %xmm5
movss 0x20594(%rip), %xmm4    # 0x5095c
movq 0x30(%rsp), %r11
movss 0x14(%rsp), %xmm3
movsd 0x38(%rsp), %xmm2
movq %rbx, %rcx
divsd %xmm0, %xmm6
cvtss2sd (%r13,%rbp,4), %xmm0
addsd %xmm0, %xmm0
movss (%rax,%r12,4), %xmm1
subss (%r14,%rbp,4), %xmm1
cvtss2sd %xmm1, %xmm1
mulsd %xmm0, %xmm1
divsd %xmm2, %xmm1
addsd %xmm6, %xmm1
movss (%rcx,%rbp,4), %xmm0
divss %xmm3, %xmm0
cvtss2sd %xmm0, %xmm0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%r9,%r12,4)
incq %r12
jmp 0x30375
incq %rbp
movl 0x10(%rsp), %eax
addl 0x98(%rsp), %eax
jmp 0x30342
movl 0xc(%rsp), %edi
incl %edi
movq 0x18(%rsp), %rax
addl 0x4(%rsp), %eax
jmp 0x3032d
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/region_layer.c
// Function: make_region_layer
layer make_region_layer(int batch, int w, int h, int n, int classes, int coords)
{
    layer l = {0};
    l.type = REGION;

    l.n = n;
    l.batch = batch;
    l.h = h;
    l.w = w;
    l.c = n*(classes + coords + 1);
    l.out_w = l.w;
    l.out_h = l.h;
    l.out_c = l.c;
    l.classes = classes;
    l.coords = coords;
    l.cost = calloc(1, sizeof(float));
    l.biases = calloc(n*2, sizeof(float));
    l.bias_updates = calloc(n*2, sizeof(float));
    l.outputs = h*w*n*(classes + coords + 1);
    l.inputs = l.outputs;
    l.truths = 30*(l.coords + 1);
    l.delta = calloc(batch*l.outputs, sizeof(float));
    l.output = calloc(batch*l.outputs, sizeof(float));
    int i;
    for(i = 0; i < n*2; ++i){
        l.biases[i] = .5;
    }

    l.forward = forward_region_layer;
    l.backward = backward_region_layer;

    fprintf(stderr, "detection\n");
    srand(0);

    return l;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %r13d
movl %r8d, %r15d
movl %ecx, (%rsp)
movl %edx, %ebp
movl %esi, %r12d
movl %esi, 0x4(%rsp)
movq %rdi, %rbx
xorl %r14d, %r14d
movl $0x4a0, %edx            # imm = 0x4A0
xorl %esi, %esi
callq 0x31c0
movl $0x16, (%rbx)
movl %r15d, 0x84(%rbx)
movl %r12d, 0x48(%rbx)
movl (%rsp), %eax
movl %eax, 0x6c(%rbx)
movl %ebp, 0x70(%rbx)
movl 0x40(%rsp), %ecx
leal (%rcx,%r13), %r12d
incl %r12d
imull %r15d, %r12d
movl %r12d, 0x74(%rbx)
movl %ebp, 0x7c(%rbx)
movl %eax, 0x78(%rbx)
movl %r12d, 0x80(%rbx)
movl %r13d, 0xfc(%rbx)
movl %ecx, 0x100(%rbx)
pushq $0x1
popq %rdi
pushq $0x4
popq %r13
movq %r13, %rsi
callq 0x3250
movq %rax, 0x1d8(%rbx)
addl %r15d, %r15d
movslq %r15d, %r15
movq %r15, %rdi
movq %r13, %rsi
callq 0x3250
movq %rax, %r13
movq %rax, 0x230(%rbx)
movq %r15, %rdi
pushq $0x4
popq %rsi
callq 0x3250
movq %rax, 0x238(%rbx)
imull (%rsp), %ebp
imull %r12d, %ebp
movl %ebp, 0x58(%rbx)
movl %ebp, 0x54(%rbx)
movl 0x40(%rsp), %eax
imull $0x1e, %eax, %eax
addl $0x1e, %eax
movl %eax, 0x68(%rbx)
imull 0x4(%rsp), %ebp
movslq %ebp, %r12
movq %r12, %rdi
pushq $0x4
popq %rbp
movq %rbp, %rsi
callq 0x3250
movq %rax, 0x260(%rbx)
movq %r12, %rdi
movq %rbp, %rsi
callq 0x3250
movq %rax, 0x268(%rbx)
testl %r15d, %r15d
cmovlel %r14d, %r15d
cmpq %r14, %r15
je 0x30599
movl $0x3f000000, (%r13,%r14,4) # imm = 0x3F000000
incq %r14
jmp 0x30586
leaq 0x44(%rip), %rax        # 0x305e4
movq %rax, 0x10(%rbx)
leaq 0xd3f(%rip), %rax       # 0x312ea
movq %rax, 0x18(%rbx)
movq 0x33a42(%rip), %rax     # 0x63ff8
movq (%rax), %rcx
leaq 0x2071c(%rip), %rdi     # 0x50cdc
pushq $0xa
popq %rsi
pushq $0x1
popq %rdx
callq 0x3440
xorl %edi, %edi
callq 0x3220
movq %rbx, %rax
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/region_layer.c
// Function: get_region_box
box get_region_box(float *x, float *biases, int n, int index, int i, int j, int w, int h, int stride)
{
    box b;
    b.x = (i + x[index + 0*stride]) / w;
    b.y = (j + x[index + 1*stride]) / h;
    b.w = exp(x[index + 2*stride]) * biases[2*n]   / w;
    b.h = exp(x[index + 3*stride]) * biases[2*n+1] / h;
    return b;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r15
movl 0x80(%rsp), %r12d
movd %r9d, %xmm0
movd %r8d, %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
cvtdq2ps %xmm1, %xmm0
movslq %ecx, %r13
movss 0x78(%rsp), %xmm1
movss 0x70(%rsp), %xmm2
unpcklps %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
movaps %xmm2, (%rsp)
cvtdq2ps %xmm2, %xmm1
leal (%r12,%r13), %eax
cltq
movss (%rdi,%r13,4), %xmm3
movss (%rdi,%rax,4), %xmm2
unpcklps %xmm2, %xmm3            # xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1]
addps %xmm0, %xmm3
divps %xmm1, %xmm3
movaps %xmm3, 0x30(%rsp)
leal (%r13,%r12,2), %eax
cltq
cvtss2sd (%rdi,%rax,4), %xmm0
callq 0x34d0
movaps %xmm0, 0x20(%rsp)
leal (%r14,%r14), %eax
cvtdq2pd (%rsp), %xmm0
movaps %xmm0, (%rsp)
leal (%r12,%r12,2), %ecx
addl %r13d, %ecx
movslq %ecx, %rcx
cvtss2sd (%r15,%rcx,4), %xmm0
cltq
leal 0x1(,%r14,2), %ecx
movslq %ecx, %r14
movss (%rbx,%rax,4), %xmm1
movaps %xmm1, 0x10(%rsp)
callq 0x34d0
movss (%rbx,%r14,4), %xmm1
movaps 0x10(%rsp), %xmm2
unpcklps %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
cvtps2pd %xmm2, %xmm1
movaps 0x20(%rsp), %xmm2
movlhps %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
mulpd %xmm1, %xmm2
divpd (%rsp), %xmm2
cvtpd2ps %xmm2, %xmm1
movaps 0x30(%rsp), %xmm0
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/region_layer.c
// Function: delta_region_box
float delta_region_box(box truth, float *x, float *biases, int n, int index, int i, int j, int w, int h, float *delta, float scale, int stride)
{
    box pred = get_region_box(x, biases, n, index, i, j, w, h, stride);
    float iou = box_iou(pred, truth);

    float tx = (truth.x*w - i);
    float ty = (truth.y*h - j);
    float tw = log(truth.w*w / biases[2*n]);
    float th = log(truth.h*h / biases[2*n + 1]);

    delta[index + 0*stride] = scale * (tx - x[index + 0*stride]);
    delta[index + 1*stride] = scale * (ty - x[index + 1*stride]);
    delta[index + 2*stride] = scale * (tw - x[index + 2*stride]);
    delta[index + 3*stride] = scale * (th - x[index + 3*stride]);
    return iou;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movss %xmm2, 0xc(%rsp)
movl %r9d, %r12d
movl %r8d, %r13d
movl %ecx, %ebp
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
movaps %xmm1, 0x10(%rsp)
movaps %xmm0, 0x20(%rsp)
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
movaps %xmm1, 0x40(%rsp)
movaps %xmm0, %xmm1
shufps $0x55, %xmm0, %xmm1     # xmm1 = xmm1[1,1],xmm0[1,1]
movaps %xmm1, 0x30(%rsp)
movl 0x90(%rsp), %r11d
movl 0x98(%rsp), %r10d
movl 0xa8(%rsp), %eax
subq $0x8, %rsp
pushq %rax
pushq %r10
pushq %r11
callq 0x3135f
addq $0x20, %rsp
movaps 0x20(%rsp), %xmm2
movaps 0x10(%rsp), %xmm3
callq 0x2b1cb
movl 0x90(%rsp), %eax
cvtsi2ss %eax, %xmm1
movss %xmm0, 0x8(%rsp)
cvtsi2ss %r13d, %xmm0
movaps 0x20(%rsp), %xmm2
mulss %xmm1, %xmm2
movl 0x98(%rsp), %eax
cvtsi2ss %eax, %xmm3
movss %xmm3, 0x4(%rsp)
subss %xmm0, %xmm2
movaps %xmm2, 0x20(%rsp)
cvtsi2ss %r12d, %xmm0
movaps 0x30(%rsp), %xmm2
mulss %xmm3, %xmm2
subss %xmm0, %xmm2
movaps %xmm2, 0x30(%rsp)
movaps 0x10(%rsp), %xmm0
mulss %xmm1, %xmm0
leal (%r15,%r15), %eax
cltq
divss (%r14,%rax,4), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x31d0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x10(%rsp)
movaps 0x40(%rsp), %xmm0
mulss 0x4(%rsp), %xmm0
leal 0x1(%r15,%r15), %eax
cltq
divss (%r14,%rax,4), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x31d0
cvtsd2ss %xmm0, %xmm0
movslq %ebp, %rax
movaps 0x20(%rsp), %xmm2
subss (%rbx,%rax,4), %xmm2
movss 0xc(%rsp), %xmm1
mulss %xmm1, %xmm2
movq 0xa0(%rsp), %rdx
movss %xmm2, (%rdx,%rax,4)
movl 0xa8(%rsp), %esi
leal (%rsi,%rax), %ecx
movslq %ecx, %rcx
movaps 0x30(%rsp), %xmm2
subss (%rbx,%rcx,4), %xmm2
mulss %xmm1, %xmm2
movss %xmm2, (%rdx,%rcx,4)
leal (%rax,%rsi,2), %ecx
movslq %ecx, %rcx
movss 0x10(%rsp), %xmm2
subss (%rbx,%rcx,4), %xmm2
mulss %xmm1, %xmm2
movss %xmm2, (%rdx,%rcx,4)
leal (%rsi,%rsi,2), %ecx
addl %eax, %ecx
movslq %ecx, %rax
subss (%rbx,%rax,4), %xmm0
mulss %xmm1, %xmm0
movss %xmm0, (%rdx,%rax,4)
movss 0x8(%rsp), %xmm0
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/region_layer.c
// Function: delta_region_class
void delta_region_class(float *output, float *delta, int index, int class, int classes, tree *hier, float scale, int stride, float *avg_cat, int tag)
{
    int i, n;
    if(hier){
        float pred = 1;
        while(class >= 0){
            pred *= output[index + stride*class];
            int g = hier->group[class];
            int offset = hier->group_offset[g];
            for(i = 0; i < hier->group_size[g]; ++i){
                delta[index + stride*(offset + i)] = scale * (0 - output[index + stride*(offset + i)]);
            }
            delta[index + stride*class] = scale * (1 - output[index + stride*class]);

            class = hier->parent[class];
        }
        *avg_cat += pred;
    } else {
        if (delta[index] && tag){
            delta[index + stride*class] = scale * (1 - output[index + stride*class]);
            return;
        }
        for(n = 0; n < classes; ++n){
            delta[index + stride*n] = scale * (((n == class)?1 : 0) - output[index + stride*n]);
            if(n == class) *avg_cat += output[index + stride*n];
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x40(%rsp), %rax
movl 0x38(%rsp), %r10d
testq %r9, %r9
je 0x316eb
movslq %r10d, %r8
movslq %edx, %r11
leaq (,%r8,4), %rbx
movss 0x1a9ad(%rip), %xmm2    # 0x4c008
xorl %ebp, %ebp
movaps %xmm2, %xmm1
testl %ecx, %ecx
js 0x316dc
movl %ecx, %r14d
imull %r10d, %ecx
addl %edx, %ecx
movslq %ecx, %rcx
movss (%rdi,%rcx,4), %xmm3
movq 0x20(%r9), %r15
movq 0x38(%r9), %r12
movslq (%r15,%r14,4), %r13
movq 0x40(%r9), %rax
movl (%r12,%r13,4), %r15d
testl %r15d, %r15d
cmovlel %ebp, %r15d
movslq (%rax,%r13,4), %r12
imulq %r8, %r12
addq %r11, %r12
shlq $0x2, %r12
subq $0x1, %r15
jb 0x316bd
xorps %xmm4, %xmm4
subss (%rdi,%r12), %xmm4
mulss %xmm0, %xmm4
movss %xmm4, (%rsi,%r12)
addq %rbx, %r12
jmp 0x3169f
mulss %xmm3, %xmm1
movaps %xmm2, %xmm3
subss (%rdi,%rcx,4), %xmm3
mulss %xmm0, %xmm3
movss %xmm3, (%rsi,%rcx,4)
movq 0x10(%r9), %rax
movl (%rax,%r14,4), %ecx
jmp 0x31660
movq 0x40(%rsp), %rax
addss (%rax), %xmm1
movss %xmm1, (%rax)
jmp 0x31725
movslq %edx, %r9
cmpl $0x0, 0x48(%rsp)
je 0x31730
movss (%rsi,%r9,4), %xmm1
xorps %xmm2, %xmm2
ucomiss %xmm2, %xmm1
jne 0x31705
jnp 0x31730
imull %ecx, %r10d
addl %edx, %r10d
movslq %r10d, %rax
movss 0x1a8f1(%rip), %xmm1    # 0x4c008
subss (%rdi,%rax,4), %xmm1
mulss %xmm0, %xmm1
movss %xmm1, (%rsi,%rax,4)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movslq %r10d, %rdx
xorl %r10d, %r10d
testl %r8d, %r8d
cmovlel %r10d, %r8d
movl %ecx, %ecx
shlq $0x2, %r9
shlq $0x2, %rdx
movss 0x1a8b9(%rip), %xmm1    # 0x4c008
cmpq %r10, %r8
je 0x31725
movaps %xmm1, %xmm2
cmpq %r10, %rcx
je 0x3175f
xorps %xmm2, %xmm2
subss (%rdi,%r9), %xmm2
mulss %xmm0, %xmm2
movss %xmm2, (%rsi,%r9)
jne 0x3177f
movss (%rdi,%r9), %xmm2
addss (%rax), %xmm2
movss %xmm2, (%rax)
incq %r10
addq %rdx, %r9
jmp 0x3174f
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/region_layer.c
// Function: correct_region_boxes
void correct_region_boxes(detection *dets, int n, int w, int h, int netw, int neth, int relative)
{
    int i;
    int new_w=0;
    int new_h=0;
    if (((float)netw/w) < ((float)neth/h)) {
        new_w = netw;
        new_h = (h * netw)/w;
    } else {
        new_h = neth;
        new_w = (w * neth)/h;
    }
    for (i = 0; i < n; ++i){
        box b = dets[i].bbox;
        b.x =  (b.x - (netw - new_w)/2./netw) / ((float)new_w/netw); 
        b.y =  (b.y - (neth - new_h)/2./neth) / ((float)new_h/neth); 
        b.w *= (float)netw/new_w;
        b.h *= (float)neth/new_h;
        if(!relative){
            b.x *= w;
            b.w *= w;
            b.y *= h;
            b.h *= h;
        }
        dets[i].bbox = b;
    }
}

// Assembly:
movl %r8d, %eax
movl %edx, %r8d
movd %eax, %xmm3
movd %r9d, %xmm5
movdqa %xmm3, %xmm2
punpckldq %xmm5, %xmm2    # xmm2 = xmm2[0],xmm5[0],xmm2[1],xmm5[1]
cvtdq2ps %xmm2, %xmm0
movd %ecx, %xmm1
movd %edx, %xmm4
punpckldq %xmm1, %xmm4    # xmm4 = xmm4[0],xmm1[0],xmm4[1],xmm1[1]
cvtdq2ps %xmm4, %xmm1
movaps %xmm0, %xmm4
divps %xmm1, %xmm4
movaps %xmm4, %xmm6
shufps $0x55, %xmm4, %xmm6     # xmm6 = xmm6[1,1],xmm4[1,1]
ucomiss %xmm4, %xmm6
jbe 0x3184c
imull %ecx, %eax
cltd
idivl %r8d
cvtsi2ss %eax, %xmm4
movlhps %xmm0, %xmm4            # xmm4 = xmm4[0],xmm0[0]
shufps $0xe2, %xmm0, %xmm4     # xmm4 = xmm4[2,0],xmm0[2,3]
movd %eax, %xmm6
punpcklqdq %xmm3, %xmm6    # xmm6 = xmm6[0],xmm3[0]
shufps $0xe2, %xmm3, %xmm6     # xmm6 = xmm6[2,0],xmm3[2,3]
jmp 0x31865
imull %r8d, %r9d
movl %r9d, %eax
cltd
idivl %ecx
movaps %xmm0, %xmm4
cvtsi2ss %eax, %xmm4
movd %eax, %xmm6
punpckldq %xmm5, %xmm6    # xmm6 = xmm6[0],xmm5[0],xmm6[1],xmm5[1]
movl 0x8(%rsp), %eax
cvtdq2pd %xmm2, %xmm3
psubd %xmm6, %xmm2
cvtdq2pd %xmm2, %xmm2
mulpd 0x1aa23(%rip), %xmm2    # 0x4c2a0
movlhps %xmm1, %xmm1            # xmm1 = xmm1[0,0]
divpd %xmm3, %xmm2
movaps %xmm4, %xmm3
divps %xmm0, %xmm3
cvtps2pd %xmm3, %xmm3
divps %xmm4, %xmm0
xorl %ecx, %ecx
testl %esi, %esi
cmovlel %ecx, %esi
imulq $0x30, %rsi, %rdx
cmpq %rcx, %rdx
je 0x318ce
cvtps2pd (%rdi,%rcx), %xmm4
subpd %xmm2, %xmm4
divpd %xmm3, %xmm4
cvtpd2ps %xmm4, %xmm4
movsd 0x8(%rdi,%rcx), %xmm5
mulps %xmm0, %xmm5
unpcklpd %xmm5, %xmm4            # xmm4 = xmm4[0],xmm5[0]
testl %eax, %eax
jne 0x318c4
mulps %xmm1, %xmm4
movups %xmm4, (%rdi,%rcx)
addq $0x30, %rcx
jmp 0x3189b
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/region_layer.c
// Function: zero_objectness
void zero_objectness(layer l)
{
    int i, n;
    for (i = 0; i < l.w*l.h; ++i){
        for(n = 0; n < l.n; ++n){
            int obj_index = entry_index(l, 0, n*l.w*l.h + i, l.coords);
            l.output[obj_index] = 0;
        }
    }
}

// Assembly:
pushq %rbp
pushq %rbx
movl 0x84(%rsp), %esi
movl 0x9c(%rsp), %edi
imull 0x88(%rsp), %esi
movl 0x118(%rsp), %r8d
movl 0x114(%rsp), %eax
leal (%r8,%rax), %r9d
incl %r9d
movq 0x280(%rsp), %r10
xorl %r11d, %r11d
testl %edi, %edi
cmovlel %r11d, %edi
testl %esi, %esi
movl $0x0, %ebx
cmovgl %esi, %ebx
cmpl %ebx, %r11d
je 0x31f06
movl %r11d, %ecx
movl %edi, %ebp
subl $0x1, %ebp
jb 0x31f01
movl %ecx, %eax
cltd
idivl %esi
imull %r9d, %eax
addl %r8d, %eax
imull %esi, %eax
addl %edx, %eax
cltq
andl $0x0, (%r10,%rax,4)
addl %esi, %ecx
jmp 0x31ee0
incl %r11d
jmp 0x31ed6
popq %rbx
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/reorg_layer.c
// Function: forward_reorg_layer
void forward_reorg_layer(const layer l, network net)
{
    int i;
    if(l.flatten){
        memcpy(l.output, net.input, l.outputs*l.batch*sizeof(float));
        if(l.reverse){
            flatten(l.output, l.w*l.h, l.c, l.batch, 0);
        }else{
            flatten(l.output, l.w*l.h, l.c, l.batch, 1);
        }
    } else if (l.extra) {
        for(i = 0; i < l.batch; ++i){
            copy_cpu(l.inputs, net.input + i*l.inputs, 1, l.output + i*l.outputs, 1);
        }
    } else if (l.reverse){
        reorg_cpu(net.input, l.w, l.h, l.c, l.batch, l.stride, 1, l.output);
    } else {
        reorg_cpu(net.input, l.w, l.h, l.c, l.batch, l.stride, 0, l.output);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x4e0(%rsp), %rax
leaq 0x40(%rsp), %r12
cmpl $0x0, 0xa0(%r12)
je 0x3210a
movq 0x268(%r12), %r14
movq 0xd8(%rax), %rsi
movslq 0x58(%r12), %rdx
movslq 0x48(%r12), %rbx
imulq %rbx, %rdx
shlq $0x2, %rdx
movq %r14, %rdi
callq 0x32b0
movl 0x6c(%r12), %esi
movl 0x74(%r12), %edx
imull 0x70(%r12), %esi
cmpl $0x0, 0x9c(%r12)
je 0x3216a
movq %r14, %rdi
movl %ebx, %ecx
xorl %r8d, %r8d
jmp 0x32173
cmpl $0x0, 0x64(%r12)
je 0x3218c
movl 0x48(%r12), %ecx
movslq 0x54(%r12), %rbx
movq 0xd8(%rax), %r14
movq 0x268(%r12), %r15
movslq 0x58(%r12), %r12
xorl %r13d, %r13d
testl %ecx, %ecx
cmovgl %ecx, %r13d
movq %rbx, (%rsp)
shlq $0x2, %rbx
shlq $0x2, %r12
pushq $0x1
popq %rbp
subq $0x1, %r13
jb 0x32186
movq (%rsp), %rdi
movq %r14, %rsi
movl %ebp, %edx
movq %r15, %rcx
movl %ebp, %r8d
callq 0x1b5a3
addq %rbx, %r14
addq %r12, %r15
jmp 0x32148
pushq $0x1
popq %r8
movq %r14, %rdi
movl %ebx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1abfb
addq $0x8, %rsp
jmp 0x321d3
cmpl $0x0, 0x9c(%r12)
movq 0xd8(%rax), %rdi
movl 0x70(%r12), %esi
movl 0x48(%r12), %r8d
movl 0x6c(%r12), %edx
movl 0x74(%r12), %ecx
movl 0x98(%r12), %r9d
movq 0x268(%r12), %rax
je 0x321c7
pushq %rax
pushq $0x1
jmp 0x321ca
pushq %rax
pushq $0x0
callq 0x1aaac
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/reorg_layer.c
// Function: backward_reorg_layer
void backward_reorg_layer(const layer l, network net)
{
    int i;
    if(l.flatten){
        memcpy(net.delta, l.delta, l.outputs*l.batch*sizeof(float));
        if(l.reverse){
            flatten(net.delta, l.w*l.h, l.c, l.batch, 1);
        }else{
            flatten(net.delta, l.w*l.h, l.c, l.batch, 0);
        }
    } else if(l.reverse){
        reorg_cpu(l.delta, l.w, l.h, l.c, l.batch, l.stride, 0, net.delta);
    } else if (l.extra) {
        for(i = 0; i < l.batch; ++i){
            copy_cpu(l.inputs, l.delta + i*l.outputs, 1, net.delta + i*l.inputs, 1);
        }
    }else{
        reorg_cpu(l.delta, l.w, l.h, l.c, l.batch, l.stride, 1, net.delta);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x4e0(%rsp), %rax
leaq 0x40(%rsp), %r15
cmpl $0x0, 0xa0(%r15)
je 0x32248
movq 0xe8(%rax), %r14
movq 0x260(%r15), %rsi
movslq 0x58(%r15), %rdx
movslq 0x48(%r15), %rbx
imulq %rbx, %rdx
shlq $0x2, %rdx
movq %r14, %rdi
callq 0x32b0
movl 0x6c(%r15), %esi
movl 0x74(%r15), %edx
imull 0x70(%r15), %esi
cmpl $0x0, 0x9c(%r15)
je 0x32283
pushq $0x1
popq %r8
movq %r14, %rdi
movl %ebx, %ecx
jmp 0x3228b
cmpl $0x0, 0x9c(%r15)
je 0x3229e
movq 0x260(%r15), %rdi
movl 0x70(%r15), %esi
movl 0x48(%r15), %r8d
movl 0x6c(%r15), %edx
movl 0x74(%r15), %ecx
movl 0x98(%r15), %r9d
pushq 0xe8(%rax)
pushq $0x0
callq 0x1aaac
addq $0x18, %rsp
jmp 0x32300
movq %r14, %rdi
movl %ebx, %ecx
xorl %r8d, %r8d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1abfb
cmpl $0x0, 0x64(%r15)
je 0x3230b
movl 0x48(%r15), %ecx
movslq 0x54(%r15), %rbx
movq 0x260(%r15), %r14
movslq 0x58(%r15), %rdx
movq 0xe8(%rax), %r15
xorl %r13d, %r13d
testl %ecx, %ecx
cmovgl %ecx, %r13d
shlq $0x2, %rdx
movq %rdx, (%rsp)
movq %rbx, %r12
shlq $0x2, %rbx
pushq $0x1
popq %rbp
subq $0x1, %r13
jb 0x322fc
movl %r12d, %edi
movq %r14, %rsi
movl %ebp, %edx
movq %r15, %rcx
movl %ebp, %r8d
callq 0x1b5a3
addq (%rsp), %r14
addq %rbx, %r15
jmp 0x322da
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x260(%r15), %rdi
movl 0x70(%r15), %esi
movl 0x48(%r15), %r8d
movl 0x6c(%r15), %edx
movl 0x74(%r15), %ecx
movl 0x98(%r15), %r9d
pushq 0xe8(%rax)
pushq $0x1
jmp 0x32278
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/reorg_layer.c
// Function: resize_reorg_layer
void resize_reorg_layer(layer *l, int w, int h)
{
    int stride = l->stride;
    int c = l->c;

    l->h = h;
    l->w = w;

    if(l->reverse){
        l->out_w = w*stride;
        l->out_h = h*stride;
        l->out_c = c/(stride*stride);
    }else{
        l->out_w = w/stride;
        l->out_h = h/stride;
        l->out_c = c*(stride*stride);
    }

    l->outputs = l->out_h * l->out_w * l->out_c;
    l->inputs = l->outputs;
    int output_size = l->outputs * l->batch;

    l->output = realloc(l->output, output_size * sizeof(float));
    l->delta = realloc(l->delta, output_size * sizeof(float));

}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r8d
movq %rdi, %rbx
movl 0x74(%rdi), %edi
movl 0x98(%rbx), %r9d
movl %edx, 0x6c(%rbx)
movl %esi, 0x70(%rbx)
movl %r9d, %ecx
imull %r9d, %ecx
cmpl $0x0, 0x9c(%rbx)
je 0x32371
imull %r9d, %esi
imull %r9d, %r8d
movl %edi, %eax
cltd
idivl %ecx
movl %eax, %ecx
jmp 0x32386
movl %esi, %eax
cltd
idivl %r9d
movl %eax, %esi
movl %r8d, %eax
cltd
idivl %r9d
imull %edi, %ecx
movl %eax, %r8d
movl %esi, 0x7c(%rbx)
movl %r8d, 0x78(%rbx)
movl %ecx, 0x80(%rbx)
imull %r8d, %esi
imull %ecx, %esi
movl %esi, 0x58(%rbx)
movl %esi, 0x54(%rbx)
movslq 0x48(%rbx), %rax
movslq %esi, %r14
imulq %rax, %r14
movq 0x268(%rbx), %rdi
shlq $0x2, %r14
movq %r14, %rsi
callq 0x3350
movq %rax, 0x268(%rbx)
movq 0x260(%rbx), %rdi
movq %r14, %rsi
callq 0x3350
movq %rax, 0x260(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/tree.c
// Function: change_leaves
void change_leaves(tree *t, char *leaf_list)
{
    list *llist = get_paths(leaf_list);
    char **leaves = (char **)list_to_array(llist);
    int n = llist->size;
    int i,j;
    int found = 0;
    for(i = 0; i < t->n; ++i){
        t->leaf[i] = 0;
        for(j = 0; j < n; ++j){
            if (0==strcmp(t->name[i], leaves[j])){
                t->leaf[i] = 1;
                ++found;
                break;
            }
        }
    }
    fprintf(stderr, "Found %d leaves.\n", found);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x1c8c8
movq %rax, %r15
movq %rax, %rdi
callq 0x72f5
movq %rax, %r14
movl (%r15), %r15d
xorl %r12d, %r12d
testl %r15d, %r15d
cmovlel %r12d, %r15d
movl $0x0, 0x4(%rsp)
movslq 0x8(%rbx), %rax
cmpq %rax, %r12
jge 0x32460
movq (%rbx), %r13
andl $0x0, (%r13,%r12,4)
xorl %ebp, %ebp
cmpq %rbp, %r15
je 0x3245b
movq 0x28(%rbx), %rax
movq (%rax,%r12,8), %rdi
movq (%r14,%rbp,8), %rsi
callq 0x3260
incq %rbp
testl %eax, %eax
jne 0x32431
movl $0x1, (%r13,%r12,4)
incl 0x4(%rsp)
incq %r12
jmp 0x3241d
movq 0x31b91(%rip), %rax     # 0x63ff8
movq (%rax), %rdi
leaq 0x1e924(%rip), %rsi     # 0x50d95
movl 0x4(%rsp), %edx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3270
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/tree.c
// Function: get_hierarchy_probability
float get_hierarchy_probability(float *x, tree *hier, int c, int stride)
{
    float p = 1;
    while(c >= 0){
        p = p * x[c*stride];
        c = hier->parent[c];
    }
    return p;
}

// Assembly:
movss 0x19b76(%rip), %xmm0    # 0x4c008
testl %edx, %edx
js 0x324ac
movl %edx, %eax
imull %ecx, %edx
movslq %edx, %rdx
mulss (%rdi,%rdx,4), %xmm0
movq 0x10(%rsi), %rdx
movl (%rdx,%rax,4), %edx
jmp 0x32492
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/tree.c
// Function: hierarchy_predictions
void hierarchy_predictions(float *predictions, int n, tree *hier, int only_leaves, int stride)
{
    int j;
    for(j = 0; j < n; ++j){
        int parent = hier->parent[j];
        if(parent >= 0){
            predictions[j*stride] *= predictions[parent*stride]; 
        }
    }
    if(only_leaves){
        for(j = 0; j < n; ++j){
            if(!hier->leaf[j]) predictions[j*stride] = 0;
        }
    }
}

// Assembly:
movslq %r8d, %rax
xorl %r9d, %r9d
testl %esi, %esi
cmovlel %r9d, %esi
shlq $0x2, %rax
movq %rdi, %r10
cmpq %r9, %rsi
je 0x324f1
movq 0x10(%rdx), %r11
movl (%r11,%r9,4), %r11d
testl %r11d, %r11d
js 0x324e9
imull %r8d, %r11d
movslq %r11d, %r11
movss (%rdi,%r11,4), %xmm0
mulss (%r10), %xmm0
movss %xmm0, (%r10)
incq %r9
addq %rax, %r10
jmp 0x324c0
testl %ecx, %ecx
je 0x32511
xorl %ecx, %ecx
cmpq %rcx, %rsi
je 0x32511
movq (%rdx), %r8
cmpl $0x0, (%r8,%rcx,4)
jne 0x32509
andl $0x0, (%rdi)
incq %rcx
addq %rax, %rdi
jmp 0x324f7
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/tree.c
// Function: hierarchy_top_prediction
int hierarchy_top_prediction(float *predictions, tree *hier, float thresh, int stride)
{
    float p = 1;
    int group = 0;
    int i;
    while(1){
        float max = 0;
        int max_i = 0;

        for(i = 0; i < hier->group_size[group]; ++i){
            int index = i + hier->group_offset[group];
            float val = predictions[(i + hier->group_offset[group])*stride];
            if(val > max){
                max_i = index;
                max = val;
            }
        }
        if(p*max > thresh){
            p = p*max;
            group = hier->child[max_i];
            if(hier->child[max_i] < 0) return max_i;
        } else if (group == 0){
            return max_i;
        } else {
            return hier->parent[hier->group_offset[group]];
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq 0x38(%rsi), %rcx
movss 0x19ae6(%rip), %xmm1    # 0x4c008
xorl %r8d, %r8d
xorl %r9d, %r9d
movl %r9d, %r9d
movl (%rcx,%r9,4), %r10d
testl %r10d, %r10d
cmovlel %r8d, %r10d
xorps %xmm2, %xmm2
xorl %r11d, %r11d
xorl %eax, %eax
cmpl %r11d, %r10d
je 0x3256e
movq 0x40(%rsi), %rbx
movl (%rbx,%r9,4), %ebx
addl %r11d, %ebx
movl %ebx, %ebp
imull %edx, %ebp
movslq %ebp, %r14
movss (%rdi,%r14,4), %xmm3
ucomiss %xmm2, %xmm3
cmoval %ebx, %eax
maxss %xmm2, %xmm3
incl %r11d
movaps %xmm3, %xmm2
jmp 0x3253e
mulss %xmm2, %xmm1
ucomiss %xmm0, %xmm1
jbe 0x32589
movq 0x18(%rsi), %r9
movslq %eax, %r10
movl (%r9,%r10,4), %r9d
testl %r9d, %r9d
jns 0x32528
jmp 0x3259d
testq %r9, %r9
je 0x3259d
movq 0x10(%rsi), %rax
movq 0x40(%rsi), %rcx
movslq (%rcx,%r9,4), %rcx
movl (%rax,%rcx,4), %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/lstm_layer.c
// Function: update_lstm_layer
void update_lstm_layer(layer l, update_args a)
{
    update_connected_layer(*(l.wf), a);
    update_connected_layer(*(l.wi), a);
    update_connected_layer(*(l.wg), a);
    update_connected_layer(*(l.wo), a);
    update_connected_layer(*(l.uf), a);
    update_connected_layer(*(l.ui), a);
    update_connected_layer(*(l.ug), a);
    update_connected_layer(*(l.uo), a);
}

// Assembly:
subq $0x4c8, %rsp            # imm = 0x4C8
movq 0x938(%rsp), %rsi
movl $0x94, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
movl 0x990(%rsp), %eax
movl %eax, 0x4c0(%rsp)
movaps 0x970(%rsp), %xmm0
movaps 0x980(%rsp), %xmm1
movups %xmm1, 0x4b0(%rsp)
movups %xmm0, 0x4a0(%rsp)
callq 0x246e9
movq 0x948(%rsp), %rsi
movl $0x94, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
movl 0x990(%rsp), %eax
movl %eax, 0x4c0(%rsp)
movaps 0x970(%rsp), %xmm0
movaps 0x980(%rsp), %xmm1
movups %xmm1, 0x4b0(%rsp)
movups %xmm0, 0x4a0(%rsp)
callq 0x246e9
movq 0x958(%rsp), %rsi
movl $0x94, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
movl 0x990(%rsp), %eax
movl %eax, 0x4c0(%rsp)
movaps 0x970(%rsp), %xmm0
movaps 0x980(%rsp), %xmm1
movups %xmm1, 0x4b0(%rsp)
movups %xmm0, 0x4a0(%rsp)
callq 0x246e9
movq 0x928(%rsp), %rsi
movl $0x94, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
movl 0x990(%rsp), %eax
movl %eax, 0x4c0(%rsp)
movaps 0x970(%rsp), %xmm0
movaps 0x980(%rsp), %xmm1
movups %xmm1, 0x4b0(%rsp)
movups %xmm0, 0x4a0(%rsp)
callq 0x246e9
movq 0x930(%rsp), %rsi
movl $0x94, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
movl 0x990(%rsp), %eax
movl %eax, 0x4c0(%rsp)
movaps 0x970(%rsp), %xmm0
movaps 0x980(%rsp), %xmm1
movups %xmm1, 0x4b0(%rsp)
movups %xmm0, 0x4a0(%rsp)
callq 0x246e9
movq 0x940(%rsp), %rsi
movl $0x94, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
movl 0x990(%rsp), %eax
movl %eax, 0x4c0(%rsp)
movaps 0x970(%rsp), %xmm0
movaps 0x980(%rsp), %xmm1
movups %xmm1, 0x4b0(%rsp)
movups %xmm0, 0x4a0(%rsp)
callq 0x246e9
movq 0x950(%rsp), %rsi
movl $0x94, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
movl 0x990(%rsp), %eax
movl %eax, 0x4c0(%rsp)
movaps 0x970(%rsp), %xmm0
movaps 0x980(%rsp), %xmm1
movups %xmm1, 0x4b0(%rsp)
movups %xmm0, 0x4a0(%rsp)
callq 0x246e9
movq 0x920(%rsp), %rsi
movl $0x94, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
movl 0x990(%rsp), %eax
movl %eax, 0x4c0(%rsp)
movaps 0x970(%rsp), %xmm0
movaps 0x980(%rsp), %xmm1
movups %xmm1, 0x4b0(%rsp)
movups %xmm0, 0x4a0(%rsp)
callq 0x246e9
addq $0x4c8, %rsp            # imm = 0x4C8
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/l2norm_layer.c
// Function: make_l2norm_layer
layer make_l2norm_layer(int batch, int inputs)
{
    fprintf(stderr, "l2norm                                         %4d\n",  inputs);
    layer l = {0};
    l.type = L2NORM;
    l.batch = batch;
    l.inputs = inputs;
    l.outputs = inputs;
    l.output = calloc(inputs*batch, sizeof(float));
    l.scales = calloc(inputs*batch, sizeof(float));
    l.delta = calloc(inputs*batch, sizeof(float));

    l.forward = forward_l2norm_layer;
    l.backward = backward_l2norm_layer;
    return l;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
movq 0x2f856(%rip), %rax     # 0x63ff8
movq (%rax), %rdi
leaq 0x1c624(%rip), %rsi     # 0x50dd0
xorl %eax, %eax
callq 0x3270
movl $0x4a0, %edx            # imm = 0x4A0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x31c0
movl $0x1c, (%rbx)
movl %r14d, 0x48(%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, 0x268(%rbx)
movq %r14, %rdi
movq %r15, %rsi
callq 0x3250
movq %rax, 0x240(%rbx)
movq %r14, %rdi
movq %r15, %rsi
callq 0x3250
movq %rax, 0x260(%rbx)
leaq 0x1d(%rip), %rax        # 0x34837
movq %rax, 0x10(%rbx)
leaq 0x70(%rip), %rax        # 0x34895
movq %rax, 0x18(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/yolo_layer.c
// Function: get_yolo_box
box get_yolo_box(float *x, float *biases, int n, int index, int i, int j, int lw, int lh, int w, int h, int stride)
{
    box b;
    b.x = (i + x[index + 0*stride]) / lw;
    b.y = (j + x[index + 1*stride]) / lh;
    b.w = exp(x[index + 2*stride]) * biases[2*n]   / w;
    b.h = exp(x[index + 3*stride]) * biases[2*n+1] / h;
    return b;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r15
movl 0x90(%rsp), %r12d
movd %r9d, %xmm0
movd %r8d, %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
cvtdq2ps %xmm1, %xmm0
movslq %ecx, %r13
movss 0x78(%rsp), %xmm1
movss 0x70(%rsp), %xmm2
unpcklps %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
cvtdq2ps %xmm2, %xmm1
leal (%r12,%r13), %eax
cltq
movss (%rdi,%r13,4), %xmm3
movss (%rdi,%rax,4), %xmm2
unpcklps %xmm2, %xmm3            # xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1]
addps %xmm0, %xmm3
divps %xmm1, %xmm3
movaps %xmm3, 0x30(%rsp)
leal (%r13,%r12,2), %eax
cltq
cvtss2sd (%rdi,%rax,4), %xmm0
callq 0x34d0
movaps %xmm0, 0x20(%rsp)
leal (%r14,%r14), %eax
movss 0x88(%rsp), %xmm0
movss 0x80(%rsp), %xmm1
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
cvtdq2pd %xmm1, %xmm0
movaps %xmm0, 0x10(%rsp)
leal (%r12,%r12,2), %ecx
addl %r13d, %ecx
movslq %ecx, %rcx
cvtss2sd (%r15,%rcx,4), %xmm0
cltq
leal 0x1(,%r14,2), %ecx
movslq %ecx, %r14
movss (%rbx,%rax,4), %xmm1
movaps %xmm1, (%rsp)
callq 0x34d0
movss (%rbx,%r14,4), %xmm1
movaps (%rsp), %xmm2
unpcklps %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
cvtps2pd %xmm2, %xmm1
movaps 0x20(%rsp), %xmm2
movlhps %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
mulpd %xmm1, %xmm2
divpd 0x10(%rsp), %xmm2
cvtpd2ps %xmm2, %xmm1
movaps 0x30(%rsp), %xmm0
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/yolo_layer.c
// Function: delta_yolo_box
float delta_yolo_box(box truth, float *x, float *biases, int n, int index, int i, int j, int lw, int lh, int w, int h, float *delta, float scale, int stride)
{
    box pred = get_yolo_box(x, biases, n, index, i, j, lw, lh, w, h, stride);
    float iou = box_iou(pred, truth);

    float tx = (truth.x*lw - i);
    float ty = (truth.y*lh - j);
    float tw = log(truth.w*w / biases[2*n]);
    float th = log(truth.h*h / biases[2*n + 1]);

    delta[index + 0*stride] = scale * (tx - x[index + 0*stride]);
    delta[index + 1*stride] = scale * (ty - x[index + 1*stride]);
    delta[index + 2*stride] = scale * (tw - x[index + 2*stride]);
    delta[index + 3*stride] = scale * (th - x[index + 3*stride]);
    return iou;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movss %xmm2, 0xc(%rsp)
movl %r9d, %r12d
movl %r8d, %r13d
movl %ecx, 0x4(%rsp)
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
movaps %xmm1, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
movaps %xmm1, 0x40(%rsp)
movaps %xmm0, %xmm1
shufps $0x55, %xmm0, %xmm1     # xmm1 = xmm1[1,1],xmm0[1,1]
movaps %xmm1, 0x30(%rsp)
movl 0x98(%rsp), %ebp
movl 0xa0(%rsp), %r11d
movl 0xa8(%rsp), %r10d
movl 0xb8(%rsp), %eax
subq $0x8, %rsp
pushq %rax
pushq %r10
pushq %r11
pushq %rbp
movl 0xb8(%rsp), %eax
pushq %rax
callq 0x35516
addq $0x30, %rsp
movaps 0x10(%rsp), %xmm2
movaps 0x20(%rsp), %xmm3
callq 0x2b1cb
movl 0x90(%rsp), %eax
cvtsi2ss %eax, %xmm3
cvtsi2ss %r13d, %xmm1
movss %xmm0, 0x8(%rsp)
cvtsi2ss %ebp, %xmm2
mulss 0x10(%rsp), %xmm3
cvtsi2ss %r12d, %xmm0
subss %xmm1, %xmm3
movss %xmm3, (%rsp)
movl 0xa0(%rsp), %eax
cvtsi2ss %eax, %xmm1
mulss 0x30(%rsp), %xmm2
subss %xmm0, %xmm2
movss %xmm2, 0x10(%rsp)
mulss 0x20(%rsp), %xmm1
leal (%r15,%r15), %eax
cltq
divss (%r14,%rax,4), %xmm1
cvtss2sd %xmm1, %xmm0
callq 0x31d0
movl 0xa8(%rsp), %eax
cvtsi2ss %eax, %xmm1
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x20(%rsp)
mulss 0x40(%rsp), %xmm1
leal 0x1(%r15,%r15), %eax
cltq
divss (%r14,%rax,4), %xmm1
cvtss2sd %xmm1, %xmm0
callq 0x31d0
cvtsd2ss %xmm0, %xmm0
movslq 0x4(%rsp), %rax
movss (%rsp), %xmm2
subss (%rbx,%rax,4), %xmm2
movss 0xc(%rsp), %xmm1
mulss %xmm1, %xmm2
movq 0xb0(%rsp), %rdx
movss %xmm2, (%rdx,%rax,4)
movl 0xb8(%rsp), %esi
leal (%rsi,%rax), %ecx
movslq %ecx, %rcx
movss 0x10(%rsp), %xmm2
subss (%rbx,%rcx,4), %xmm2
mulss %xmm1, %xmm2
movss %xmm2, (%rdx,%rcx,4)
leal (%rax,%rsi,2), %ecx
movslq %ecx, %rcx
movss 0x20(%rsp), %xmm2
subss (%rbx,%rcx,4), %xmm2
mulss %xmm1, %xmm2
movss %xmm2, (%rdx,%rcx,4)
leal (%rsi,%rsi,2), %ecx
addl %eax, %ecx
movslq %ecx, %rax
subss (%rbx,%rax,4), %xmm0
mulss %xmm1, %xmm0
movss %xmm0, (%rdx,%rax,4)
movss 0x8(%rsp), %xmm0
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/yolo_layer.c
// Function: delta_yolo_class
void delta_yolo_class(float *output, float *delta, int index, int class, int classes, int stride, float *avg_cat)
{
    int n;
    if (delta[index]){
        delta[index + stride*class] = 1 - output[index + stride*class];
        if(avg_cat) *avg_cat += output[index + stride*class];
        return;
    }
    for(n = 0; n < classes; ++n){
        delta[index + stride*n] = ((n == class)?1 : 0) - output[index + stride*n];
        if(n == class && avg_cat) *avg_cat += output[index + stride*n];
    }
}

// Assembly:
pushq %rbx
movq 0x10(%rsp), %rax
movslq %edx, %r10
movss (%rsi,%r10,4), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x357e1
jnp 0x35811
imull %ecx, %r9d
addl %edx, %r9d
movslq %r9d, %rcx
movss 0x16815(%rip), %xmm0    # 0x4c008
subss (%rdi,%rcx,4), %xmm0
movss %xmm0, (%rsi,%rcx,4)
testq %rax, %rax
je 0x3580f
movss (%rdi,%rcx,4), %xmm0
addss (%rax), %xmm0
movss %xmm0, (%rax)
popq %rbx
retq
movslq %r9d, %rdx
xorl %r9d, %r9d
testl %r8d, %r8d
cmovlel %r9d, %r8d
movl %ecx, %ecx
shlq $0x2, %r10
shlq $0x2, %rdx
movss 0x167d8(%rip), %xmm0    # 0x4c008
cmpq %r9, %r8
je 0x3580f
testq %rax, %rax
sete %r11b
movaps %xmm0, %xmm1
cmpq %r9, %rcx
setne %bl
je 0x3584a
xorps %xmm1, %xmm1
subss (%rdi,%r10), %xmm1
movss %xmm1, (%rsi,%r10)
orb %bl, %r11b
jne 0x35869
movss (%rdi,%r10), %xmm1
addss (%rax), %xmm1
movss %xmm1, (%rax)
incq %r9
addq %rdx, %r10
jmp 0x35830
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/yolo_layer.c
// Function: yolo_num_detections
int yolo_num_detections(layer l, float thresh)
{
    int i, n;
    int count = 0;
    for (i = 0; i < l.w*l.h; ++i){
        for(n = 0; n < l.n; ++n){
            int obj_index  = entry_index(l, 0, n*l.w*l.h + i, 4);
            if(l.output[obj_index] > thresh){
                ++count;
            }
        }
    }
    return count;
}

// Assembly:
pushq %rbp
pushq %rbx
movl 0x84(%rsp), %edi
movl 0x9c(%rsp), %r8d
imull 0x88(%rsp), %edi
movl 0x114(%rsp), %r9d
addl $0x5, %r9d
movq 0x280(%rsp), %r10
xorl %ecx, %ecx
testl %r8d, %r8d
cmovlel %ecx, %r8d
testl %edi, %edi
movl $0x0, %r11d
cmovgl %edi, %r11d
xorl %ebx, %ebx
cmpl %r11d, %ebx
je 0x359cd
movl %ebx, %esi
movl %r8d, %ebp
subl $0x1, %ebp
jb 0x359c9
movl %esi, %eax
cltd
idivl %edi
imull %r9d, %eax
addl $0x4, %eax
imull %edi, %eax
addl %edx, %eax
cltq
movss (%r10,%rax,4), %xmm1
xorl %eax, %eax
ucomiss %xmm0, %xmm1
seta %al
addl %eax, %ecx
addl %edi, %esi
jmp 0x3599d
incl %ebx
jmp 0x35993
movl %ecx, %eax
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/yolo_layer.c
// Function: avg_flipped_yolo
void avg_flipped_yolo(layer l)
{
    int i,j,n,z;
    float *flip = l.output + l.outputs;
    for (j = 0; j < l.h; ++j) {
        for (i = 0; i < l.w/2; ++i) {
            for (n = 0; n < l.n; ++n) {
                for(z = 0; z < l.classes + 4 + 1; ++z){
                    int i1 = z*l.w*l.h*l.n + n*l.w*l.h + j*l.w + i;
                    int i2 = z*l.w*l.h*l.n + n*l.w*l.h + j*l.w + (l.w - i - 1);
                    float swap = flip[i1];
                    flip[i1] = flip[i2];
                    flip[i2] = swap;
                    if(z == 0){
                        flip[i1] = -flip[i1];
                        flip[i2] = -flip[i2];
                    }
                }
            }
        }
    }
    for(i = 0; i < l.outputs; ++i){
        l.output[i] = (l.output[i] + flip[i])/2.;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x2a0(%rsp), %rax
movslq 0x90(%rsp), %rcx
movq %rax, -0x18(%rsp)
movq %rcx, -0x20(%rsp)
leaq (%rax,%rcx,4), %rdi
movl 0xa4(%rsp), %r9d
movl 0xa8(%rsp), %esi
movl $0x2, %ecx
movl %esi, %eax
cltd
idivl %ecx
movl 0xbc(%rsp), %edx
movl 0x134(%rsp), %r10d
addl $0x5, %r10d
xorl %ecx, %ecx
testl %r10d, %r10d
cmovlel %ecx, %r10d
testl %edx, %edx
movl $0x0, %ebx
cmovgl %edx, %ebx
testl %eax, %eax
cmovlel %ecx, %eax
movl %eax, -0x28(%rsp)
testl %r9d, %r9d
movl $0x0, %eax
cmovgl %r9d, %eax
movl %eax, -0x34(%rsp)
imull %esi, %r9d
imull %r9d, %edx
movq %rsi, -0x10(%rsp)
decl %esi
movaps 0x166e8(%rip), %xmm0    # 0x4c150
xorl %r8d, %r8d
cmpl -0x34(%rsp), %r8d
je 0x35b32
movl %r8d, -0x30(%rsp)
xorl %eax, %eax
movl %esi, -0x2c(%rsp)
movq %rcx, -0x8(%rsp)
movl %ecx, %r11d
cmpl -0x28(%rsp), %eax
je 0x35b13
movl %eax, -0x24(%rsp)
xorl %ebp, %ebp
movl %esi, %r14d
movl %r11d, %ecx
cmpl %ebx, %ebp
je 0x35b03
movl %r14d, %r13d
movl %ecx, %r8d
xorl %r15d, %r15d
cmpq %r15, %r10
je 0x35af9
movslq %r8d, %rax
movss (%rdi,%rax,4), %xmm1
movslq %r13d, %r12
movss (%rdi,%r12,4), %xmm2
movss %xmm2, (%rdi,%rax,4)
movss %xmm1, (%rdi,%r12,4)
testq %r15, %r15
jne 0x35aee
movss (%rdi,%rax,4), %xmm1
xorps %xmm0, %xmm1
movss %xmm1, (%rdi,%rax,4)
movss (%rdi,%r12,4), %xmm1
xorps %xmm0, %xmm1
movss %xmm1, (%rdi,%r12,4)
incq %r15
addl %edx, %r8d
addl %edx, %r13d
jmp 0x35aac
incl %ebp
addl %r9d, %ecx
addl %r9d, %r14d
jmp 0x35a9f
movl -0x24(%rsp), %eax
incl %eax
incl %r11d
decl %esi
jmp 0x35a89
movl -0x30(%rsp), %r8d
incl %r8d
movq -0x10(%rsp), %rax
movq -0x8(%rsp), %rcx
addl %eax, %ecx
movl -0x2c(%rsp), %esi
addl %eax, %esi
jmp 0x35a6b
xorl %eax, %eax
movq -0x20(%rsp), %rdx
testl %edx, %edx
movl $0x0, %ecx
cmovgl %edx, %ecx
movss 0x166e9(%rip), %xmm0    # 0x4c234
movq -0x18(%rsp), %rdx
cmpq %rax, %rcx
je 0x35b6d
movss (%rdx,%rax,4), %xmm1
addss (%rdi,%rax,4), %xmm1
mulss %xmm0, %xmm1
movss %xmm1, (%rdx,%rax,4)
incq %rax
jmp 0x35b50
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/iseg_layer.c
// Function: make_iseg_layer
layer make_iseg_layer(int batch, int w, int h, int classes, int ids)
{
    layer l = {0};
    l.type = ISEG;

    l.h = h;
    l.w = w;
    l.c = classes + ids;
    l.out_w = l.w;
    l.out_h = l.h;
    l.out_c = l.c;
    l.classes = classes;
    l.batch = batch;
    l.extra = ids;
    l.cost = calloc(1, sizeof(float));
    l.outputs = h*w*l.c;
    l.inputs = l.outputs;
    l.truths = 90*(l.w*l.h+1);
    l.delta = calloc(batch*l.outputs, sizeof(float));
    l.output = calloc(batch*l.outputs, sizeof(float));

    l.counts = calloc(90, sizeof(int));
    l.sums = calloc(90, sizeof(float*));
    if(ids){
        int i;
        for(i = 0; i < 90; ++i){
            l.sums[i] = calloc(ids, sizeof(float));
        }
    }

    l.forward = forward_iseg_layer;
    l.backward = backward_iseg_layer;

    fprintf(stderr, "iseg\n");
    srand(0);

    return l;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %r14d
movl %r8d, %r12d
movl %ecx, %r15d
movl %edx, %r13d
movl %esi, %ebp
movq %rdi, %rbx
movl $0x4a0, %edx            # imm = 0x4A0
xorl %esi, %esi
callq 0x31c0
movl $0x18, (%rbx)
movl %r15d, 0x6c(%rbx)
movl %r13d, 0x70(%rbx)
movq %r14, %rax
movq %r14, (%rsp)
addl %r12d, %r14d
movl %r14d, 0x74(%rbx)
movl %r13d, 0x7c(%rbx)
movl %r15d, 0x78(%rbx)
movl %r14d, 0x80(%rbx)
movl %r12d, 0xfc(%rbx)
movl %ebp, 0x48(%rbx)
movl %eax, 0x64(%rbx)
pushq $0x1
popq %rdi
pushq $0x4
popq %r12
movq %r12, %rsi
callq 0x3250
movq %rax, 0x1d8(%rbx)
imull %r13d, %r15d
imull %r15d, %r14d
movl %r14d, 0x58(%rbx)
movl %r14d, 0x54(%rbx)
imull $0x5a, %r15d, %eax
addl $0x5a, %eax
movl %eax, 0x68(%rbx)
imull %ebp, %r14d
movslq %r14d, %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x3250
movq %rax, 0x260(%rbx)
movq %r15, %rdi
movq %r12, %rsi
callq 0x3250
movq %rax, 0x268(%rbx)
pushq $0x5a
popq %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x3250
movq %rax, 0x1c0(%rbx)
pushq $0x8
popq %rsi
movq %r15, %rdi
callq 0x3250
movq (%rsp), %rcx
movq %rax, 0x1c8(%rbx)
testl %ecx, %ecx
jne 0x35f2e
leaq 0x6b(%rip), %rax        # 0x35f55
movq %rax, 0x10(%rbx)
leaq 0x7d2(%rip), %rax       # 0x366c7
movq %rax, 0x18(%rbx)
movq 0x2e0f8(%rip), %rax     # 0x63ff8
movq (%rax), %rcx
leaq 0x1af96(%rip), %rdi     # 0x50ea0
pushq $0x5
popq %rsi
pushq $0x1
popq %rdx
callq 0x3440
xorl %edi, %edi
callq 0x3220
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movslq %ecx, %r14
xorl %r13d, %r13d
pushq $0x4
popq %r12
cmpq $0x5a, %r13
je 0x35ee3
movq %r14, %rdi
movq %r12, %rsi
callq 0x3250
movq %rax, (%r15,%r13,8)
incq %r13
jmp 0x35f3b
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/iseg_layer.c
// Function: resize_iseg_layer
void resize_iseg_layer(layer *l, int w, int h)
{
    l->w = w;
    l->h = h;

    l->outputs = h*w*l->c;
    l->inputs = l->outputs;

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

}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl %esi, 0x70(%rdi)
movl %edx, 0x6c(%rdi)
imull %esi, %edx
movslq 0x74(%rdi), %rax
movslq %edx, %rcx
imulq %rax, %rcx
movl %ecx, 0x58(%rdi)
movl %ecx, 0x54(%rdi)
movq 0x268(%rdi), %rdi
movslq 0x48(%rbx), %rsi
imulq %rcx, %rsi
shlq $0x2, %rsi
callq 0x3350
movq %rax, 0x268(%rbx)
movq 0x260(%rbx), %rdi
movslq 0x48(%rbx), %rax
movslq 0x58(%rbx), %rsi
imulq %rax, %rsi
shlq $0x2, %rsi
callq 0x3350
movq %rax, 0x260(%rbx)
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/captcha.c
// Function: fix_data_captcha
void fix_data_captcha(data d, int mask)
{
    matrix labels = d.y;
    int i, j;
    for(i = 0; i < d.y.rows; ++i){
        for(j = 0; j < d.y.cols; j += 2){
            if (mask){
                if(!labels.vals[i][j]){
                    labels.vals[i][j] = SECRET_NUM;
                    labels.vals[i][j+1] = SECRET_NUM;
                }else if(labels.vals[i][j+1]){
                    labels.vals[i][j] = 0;
                }
            } else{
                if (labels.vals[i][j]) {
                    labels.vals[i][j+1] = 0;
                } else {
                    labels.vals[i][j+1] = 1;
                }
            }
        }
    }
}

// Assembly:
movq 0x28(%rsp), %rax
movl 0x20(%rsp), %ecx
movslq 0x24(%rsp), %rdx
xorl %esi, %esi
testl %ecx, %ecx
cmovlel %esi, %ecx
xorps %xmm0, %xmm0
movsd 0x191a8(%rip), %xmm1    # 0x4f920
cmpq %rcx, %rsi
je 0x367da
xorl %r8d, %r8d
cmpq %rdx, %r8
jge 0x367d5
movq (%rax,%rsi,8), %r9
movss (%r9,%r8,4), %xmm2
testl %edi, %edi
je 0x367af
ucomiss %xmm0, %xmm2
jne 0x3679a
jnp 0x367be
movss 0x4(%r9,%r8,4), %xmm2
ucomiss %xmm0, %xmm2
jne 0x367a8
jnp 0x367cf
andl $0x0, (%r9,%r8,4)
jmp 0x367cf
ucomiss %xmm0, %xmm2
jne 0x367b6
jnp 0x367c6
andl $0x0, 0x4(%r9,%r8,4)
jmp 0x367cf
movsd %xmm1, (%r9,%r8,4)
jmp 0x367cf
movl $0x3f800000, 0x4(%r9,%r8,4) # imm = 0x3F800000
addq $0x2, %r8
jmp 0x36780
incq %rsi
jmp 0x36778
retq