LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: randomize_data
void randomize_data(data d)
{
    int i;
    for(i = d.X.rows-1; i > 0; --i){
        int index = rand()%i;
        float *swap = d.X.vals[index];
        d.X.vals[index] = d.X.vals[i];
        d.X.vals[i] = swap;

        swap = d.y.vals[index];
        d.y.vals[index] = d.y.vals[i];
        d.y.vals[i] = swap;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl 0x38(%rsp), %ebx
movq 0x40(%rsp), %r14
movq 0x50(%rsp), %r15
leal -0x1(%rbx), %r12d
cmpl $0x2, %ebx
jl 0x21b27
callq 0x34e0
cltd
idivl %r12d
movslq %edx, %rax
movq (%r14,%rax,8), %rcx
movq (%r14,%r12,8), %rdx
movq %rdx, (%r14,%rax,8)
movq %rcx, (%r14,%r12,8)
movq (%r15,%rax,8), %rcx
movq (%r15,%r12,8), %rdx
movq %rdx, (%r15,%rax,8)
movq %rcx, (%r15,%r12,8)
decl %ebx
decq %r12
jmp 0x21aef
addq $0x8, %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: copy_data
data copy_data(data d)
{
    data c = {0};
    c.w = d.w;
    c.h = d.h;
    c.shallow = 0;
    c.num_boxes = d.num_boxes;
    c.boxes = d.boxes;
    c.X = copy_matrix(d.X);
    c.y = copy_matrix(d.y);
    return c;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
andq $0x0, 0x28(%rdi)
movq 0x10(%rsp), %rax
movq %rax, (%rdi)
movaps 0x40(%rsp), %xmm0
movups %xmm0, 0x30(%rdi)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x22155
movq %rax, 0x8(%rbx)
movq %rdx, 0x10(%rbx)
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x22155
movq %rax, 0x18(%rbx)
movq %rdx, 0x20(%rbx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: get_random_data
data get_random_data(data d, int num)
{
    data r = {0};
    r.shallow = 1;

    r.X.rows = num;
    r.y.rows = num;

    r.X.cols = d.X.cols;
    r.y.cols = d.y.cols;

    r.X.vals = calloc(num, sizeof(float *));
    r.y.vals = calloc(num, sizeof(float *));

    int i;
    for(i = 0; i < num; ++i){
        int index = rand()%d.X.rows;
        r.X.vals[i] = d.X.vals[index];
        r.y.vals[i] = d.y.vals[index];
    }
    return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, (%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, 0x30(%rdi)
movl $0x1, 0x28(%rdi)
movl %esi, 0x8(%rdi)
movl %esi, 0x18(%rdi)
movl 0x5c(%rsp), %eax
movl %eax, 0xc(%rdi)
movl 0x6c(%rsp), %eax
movl %eax, 0x1c(%rdi)
movslq %esi, %r14
pushq $0x8
popq %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x3250
movq %rax, 0x10(%rsp)
movq %rax, 0x10(%rbx)
movq %r14, %rdi
movq %r12, %rsi
callq 0x3250
movq %rax, %r12
movq %rbx, 0x8(%rsp)
movq %rax, 0x20(%rbx)
movl 0x58(%rsp), %ebp
movq 0x60(%rsp), %r13
movq 0x70(%rsp), %rbx
xorl %r15d, %r15d
testl %r14d, %r14d
cmovlel %r15d, %r14d
cmpq %r15, %r14
je 0x21d4c
callq 0x34e0
cltd
idivl %ebp
movslq %edx, %rax
movq (%r13,%rax,8), %rcx
movq 0x10(%rsp), %rdx
movq %rcx, (%rdx,%r15,8)
movq (%rbx,%rax,8), %rax
movq %rax, (%r12,%r15,8)
incq %r15
jmp 0x21d21
movq 0x8(%rsp), %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/matrix.c
// Function: matrix_topk_accuracy
float matrix_topk_accuracy(matrix truth, matrix guess, int k)
{
    int *indexes = calloc(k, sizeof(int));
    int n = truth.cols;
    int i,j;
    int correct = 0;
    for(i = 0; i < truth.rows; ++i){
        top_k(guess.vals[i], n, k, indexes);
        for(j = 0; j < k; ++j){
            int class = indexes[j];
            if(truth.vals[i][class]){
                ++correct;
                break;
            }
        }
    }
    free(indexes);
    return (float)correct/truth.rows;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebp
movq %rcx, 0x20(%rsp)
movq %rsi, %r15
movq %rdi, %r12
movq %rdi, %rax
shrq $0x20, %rax
movq %rax, 0x18(%rsp)
movslq %r8d, %r14
pushq $0x4
popq %rsi
movq %r14, %rdi
callq 0x3250
movq %rax, %r13
xorl %ebx, %ebx
testl %r14d, %r14d
movl $0x0, %r14d
movl %ebp, 0xc(%rsp)
cmovgl %ebp, %r14d
testl %r12d, %r12d
movl $0x0, %ebp
movq %r12, 0x10(%rsp)
cmovgl %r12d, %ebp
xorl %r12d, %r12d
cmpq %rbp, %rbx
je 0x21fba
movq 0x20(%rsp), %rax
movq (%rax,%rbx,8), %rdi
movq 0x18(%rsp), %rsi
movl 0xc(%rsp), %edx
movq %r13, %rcx
callq 0x438a
xorps %xmm1, %xmm1
xorl %eax, %eax
cmpq %rax, %r14
je 0x21fb5
movslq (%r13,%rax,4), %rcx
movq (%r15,%rbx,8), %rdx
movss (%rdx,%rcx,4), %xmm0
incq %rax
ucomiss %xmm1, %xmm0
jne 0x21fb2
jnp 0x21f95
incl %r12d
incq %rbx
jmp 0x21f71
movq %r13, %rdi
callq 0x3040
cvtsi2ss %r12d, %xmm0
cvtsi2ssl 0x10(%rsp), %xmm1
divss %xmm1, %xmm0
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/matrix.c
// Function: scale_matrix
void scale_matrix(matrix m, float scale)
{
    int i,j;
    for(i = 0; i < m.rows; ++i){
        for(j = 0; j < m.cols; ++j){
            m.vals[i][j] *= scale;
        }
    }
}

// Assembly:
movq %rdi, %rax
shrq $0x20, %rax
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
testl %edi, %edi
movl $0x0, %edx
cmovgl %edi, %edx
cmpq %rdx, %rcx
je 0x22022
xorl %edi, %edi
cmpq %rdi, %rax
je 0x2201d
movq (%rsi,%rcx,8), %r8
movss (%r8,%rdi,4), %xmm1
mulss %xmm0, %xmm1
movss %xmm1, (%r8,%rdi,4)
incq %rdi
jmp 0x21fff
incq %rcx
jmp 0x21ff8
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/matrix.c
// Function: resize_matrix
matrix resize_matrix(matrix m, int size)
{
    int i;
    if (m.rows == size) return m;
    if (m.rows < size) {
        m.vals = realloc(m.vals, size*sizeof(float*));
        for (i = m.rows; i < size; ++i) {
            m.vals[i] = calloc(m.cols, sizeof(float));
        }
    } else if (m.rows > size) {
        for (i = size; i < m.rows; ++i) {
            free(m.vals[i]);
        }
        m.vals = realloc(m.vals, size*sizeof(float*));
    }
    m.rows = size;
    return m;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpl %edx, %ebx
je 0x220c9
movl %edx, %ebp
jge 0x22087
movl %ebp, 0x4(%rsp)
movslq %ebp, %r13
leaq (,%r13,8), %rsi
movq %r14, %rdi
callq 0x3350
movq %rax, %r14
movq %rbx, %r15
sarq $0x20, %r15
movslq %ebx, %rbp
pushq $0x4
popq %r12
cmpq %r13, %rbp
jge 0x22081
movq %r15, %rdi
movq %r12, %rsi
callq 0x3250
movq %rax, (%r14,%rbp,8)
incq %rbp
jmp 0x22068
movl 0x4(%rsp), %ebp
jmp 0x220b7
jle 0x220b7
movslq %ebp, %r15
movslq %ebx, %r12
movq %r15, %r13
cmpq %r13, %r12
je 0x220a5
movq (%r14,%r13,8), %rdi
callq 0x3040
incq %r13
jmp 0x22092
shlq $0x3, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x3350
movq %rax, %r14
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
andq %rax, %rbx
movl %ebp, %eax
orq %rax, %rbx
movq %rbx, %rax
movq %r14, %rdx
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/matrix.c
// Function: matrix_add_matrix
void matrix_add_matrix(matrix from, matrix to)
{
    assert(from.rows == to.rows && from.cols == to.cols);
    int i,j;
    for(i = 0; i < from.rows; ++i){
        for(j = 0; j < from.cols; ++j){
            to.vals[i][j] += from.vals[i][j];
        }
    }
}

// Assembly:
pushq %rax
cmpl %edx, %edi
jne 0x22138
movl %edi, %r8d
shrq $0x20, %rdi
shrq $0x20, %rdx
cmpl %edx, %edi
jne 0x22138
xorl %eax, %eax
testl %edi, %edi
cmovlel %eax, %edi
testl %r8d, %r8d
movl $0x0, %edx
cmovgl %r8d, %edx
cmpq %rdx, %rax
je 0x22136
xorl %r8d, %r8d
cmpq %r8, %rdi
je 0x22131
movq (%rsi,%rax,8), %r9
movss (%r9,%r8,4), %xmm0
movq (%rcx,%rax,8), %r9
addss (%r9,%r8,4), %xmm0
movss %xmm0, (%r9,%r8,4)
incq %r8
jmp 0x2210d
incq %rax
jmp 0x22105
popq %rax
retq
leaq 0x2d944(%rip), %rdi     # 0x4fa83
leaq 0x2d96a(%rip), %rsi     # 0x4fab0
leaq 0x2d96c(%rip), %rcx     # 0x4fab9
pushq $0x44
popq %rdx
callq 0x31b0
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/matrix.c
// Function: copy_matrix
matrix copy_matrix(matrix m)
{
    matrix c = {0};
    c.rows = m.rows;
    c.cols = m.cols;
    c.vals = calloc(c.rows, sizeof(float *));
    int i;
    for(i = 0; i < c.rows; ++i){
        c.vals[i] = calloc(c.cols, sizeof(float));
        copy_cpu(c.cols, m.vals[i], 1, c.vals[i], 1);
    }
    return c;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x10(%rsp)
movq %rdi, %rbp
movq %rdi, %r15
shrq $0x20, %r15
movslq %ebp, %r12
pushq $0x8
popq %rsi
movq %r12, %rdi
callq 0x3250
movq %rax, %r13
movq %rbp, 0x8(%rsp)
sarq $0x20, %rbp
xorl %r14d, %r14d
testl %r12d, %r12d
cmovlel %r14d, %r12d
pushq $0x1
popq %rbx
cmpq %r14, %r12
je 0x221cc
movq %rbp, %rdi
pushq $0x4
popq %rsi
callq 0x3250
movq %rax, (%r13,%r14,8)
movq 0x10(%rsp), %rcx
movq (%rcx,%r14,8), %rsi
movl %r15d, %edi
movl %ebx, %edx
movq %rax, %rcx
movl %ebx, %r8d
callq 0x1b5a3
incq %r14
jmp 0x22199
movq 0x8(%rsp), %rax
movq %r13, %rdx
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/matrix.c
// Function: make_matrix
matrix make_matrix(int rows, int cols)
{
    int i;
    matrix m;
    m.rows = rows;
    m.cols = cols;
    m.vals = calloc(m.rows, sizeof(float *));
    for(i = 0; i < m.rows; ++i){
        m.vals[i] = calloc(m.cols, sizeof(float));
    }
    return m;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %r15d
movl %edi, %ebx
movslq %edi, %r12
pushq $0x8
popq %rsi
movq %r12, %rdi
callq 0x3250
movq %rax, %r14
movq %r15, 0x10(%rsp)
movslq %r15d, %r15
xorl %r13d, %r13d
testl %r12d, %r12d
movl $0x0, %ebp
movl %ebx, 0xc(%rsp)
cmovgl %ebx, %ebp
pushq $0x4
popq %r12
cmpq %r13, %rbp
je 0x2223e
movq %r15, %rdi
movq %r12, %rsi
callq 0x3250
movq %rax, (%r14,%r13,8)
incq %r13
jmp 0x22225
movq 0x10(%rsp), %rcx
shlq $0x20, %rcx
movl 0xc(%rsp), %eax
orq %rcx, %rax
movq %r14, %rdx
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/matrix.c
// Function: hold_out_matrix
matrix hold_out_matrix(matrix *m, int n)
{
    int i;
    matrix h;
    h.rows = n;
    h.cols = m->cols;
    h.vals = calloc(h.rows, sizeof(float *));
    for(i = 0; i < n; ++i){
        int index = rand()%m->rows;
        h.vals[i] = m->vals[index];
        m->vals[index] = m->vals[--(m->rows)];
    }
    return h;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl 0x4(%rdi), %r13d
movslq %esi, %r12
pushq $0x8
popq %rsi
movq %r12, %rdi
callq 0x3250
movq %rax, %r15
xorl %ebp, %ebp
testl %r12d, %r12d
movl $0x0, %r12d
cmovgl %ebx, %r12d
cmpq %rbp, %r12
je 0x222c8
callq 0x34e0
movslq (%r14), %rcx
cltd
idivl %ecx
movq 0x8(%r14), %rax
movslq %edx, %rdx
movq (%rax,%rdx,8), %rsi
movq %rsi, (%r15,%rbp,8)
leaq -0x1(%rcx), %rsi
movl %esi, (%r14)
movq -0x8(%rax,%rcx,8), %rcx
movq %rcx, (%rax,%rdx,8)
incq %rbp
jmp 0x22294
shlq $0x20, %r13
movl %ebx, %eax
orq %r13, %rax
movq %r15, %rdx
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/matrix.c
// Function: pop_column
float *pop_column(matrix *m, int c)
{
    float *col = calloc(m->rows, sizeof(float));
    int i, j;
    for(i = 0; i < m->rows; ++i){
        col[i] = m->vals[i][c];
        for(j = c; j < m->cols-1; ++j){
            m->vals[i][j] = m->vals[i][j+1];
        }
    }
    --m->cols;
    return col;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movslq (%rdi), %r14
pushq $0x4
popq %rsi
movq %r14, %rdi
callq 0x3250
movslq %ebp, %rcx
xorl %edx, %edx
testl %r14d, %r14d
movl $0x0, %esi
cmovgl %r14d, %esi
cmpq %rsi, %rdx
je 0x22348
movq 0x8(%rbx), %rdi
movq (%rdi,%rdx,8), %rdi
movss (%rdi,%rcx,4), %xmm0
movss %xmm0, (%rax,%rdx,4)
movslq 0x4(%rbx), %r8
decq %r8
movq %rcx, %r9
cmpq %r8, %r9
jge 0x22343
movss 0x4(%rdi,%r9,4), %xmm0
movss %xmm0, (%rdi,%r9,4)
incq %r9
jmp 0x2232c
incq %rdx
jmp 0x2230b
decl 0x4(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/matrix.c
// Function: csv_to_matrix
matrix csv_to_matrix(char *filename)
{
    FILE *fp = fopen(filename, "r");
    if(!fp) file_error(filename);

    matrix m;
    m.cols = -1;

    char *line;

    int n = 0;
    int size = 1024;
    m.vals = calloc(size, sizeof(float*));
    while((line = fgetl(fp))){
        if(m.cols == -1) m.cols = count_fields(line);
        if(n == size){
            size *= 2;
            m.vals = realloc(m.vals, size*sizeof(float*));
        }
        m.vals[n] = parse_fields(line, m.cols);
        free(line);
        ++n;
    }
    m.vals = realloc(m.vals, n*sizeof(float*));
    m.rows = n;
    return m;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x2f984(%rip), %rsi     # 0x51ce9
callq 0x3390
movq %rax, %rbx
testq %rax, %rax
jne 0x2237a
movq %r14, %rdi
callq 0x3d0f
pushq $0x8
popq %rsi
movl $0x400, %edi            # imm = 0x400
callq 0x3250
movq %rax, %r15
movl $0x400, %ebp            # imm = 0x400
pushq $-0x1
popq %r14
xorl %r13d, %r13d
movq %rbx, %rdi
callq 0x3d32
testq %rax, %rax
je 0x223ee
movq %rax, %r12
cmpl $-0x1, %r14d
jne 0x223b7
movq %r12, %rdi
callq 0x47a4
movl %eax, %r14d
movl %ebp, %eax
cmpq %rax, %r13
jne 0x223d2
addl %ebp, %ebp
movslq %ebp, %rsi
shlq $0x3, %rsi
movq %r15, %rdi
callq 0x3350
movq %rax, %r15
movq %r12, %rdi
movl %r14d, %esi
callq 0x47c9
movq %rax, (%r15,%r13,8)
movq %r12, %rdi
callq 0x3040
incq %r13
jmp 0x22396
movl %r13d, %ebx
leaq (,%rbx,8), %rsi
movq %r15, %rdi
callq 0x3350
movq %rax, %rdx
shlq $0x20, %r14
orq %rbx, %r14
movq %r14, %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/matrix.c
// Function: matrix_to_csv
void matrix_to_csv(matrix m)
{
    int i, j;

    for(i = 0; i < m.rows; ++i){
        for(j = 0; j < m.cols; ++j){
            if(j > 0) printf(",");
            printf("%.17g", m.vals[i][j]);
        }
        printf("\n");
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r12
shrq $0x20, %r12
xorl %r13d, %r13d
testl %r12d, %r12d
cmovlel %r13d, %r12d
testl %edi, %edi
movl $0x0, %eax
cmovgl %edi, %eax
movq %rax, (%rsp)
movq %rsi, %rbx
leaq 0x2d68f(%rip), %r14     # 0x4fae0
pushq $0x2c
popq %r15
cmpq (%rsp), %r13
je 0x22494
xorl %ebp, %ebp
cmpq %rbp, %r12
je 0x22487
testq %rbp, %rbp
je 0x2246f
movl %r15d, %edi
callq 0x3060
movq (%rbx,%r13,8), %rax
cvtss2sd (%rax,%rbp,4), %xmm0
movq %r14, %rdi
movb $0x1, %al
callq 0x3160
incq %rbp
jmp 0x2245d
pushq $0xa
popq %rdi
callq 0x3060
incq %r13
jmp 0x22455
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/matrix.c
// Function: print_matrix
void print_matrix(matrix m)
{
    int i, j;
    printf("%d X %d Matrix:\n",m.rows, m.cols);
    printf(" __");
    for(j = 0; j < 16*m.cols-1; ++j) printf(" ");
    printf("__ \n");

    printf("|  ");
    for(j = 0; j < 16*m.cols-1; ++j) printf(" ");
    printf("  |\n");

    for(i = 0; i < m.rows; ++i){
        printf("|  ");
        for(j = 0; j < m.cols; ++j){
            printf("%15.7f ", m.vals[i][j]);
        }
        printf(" |\n");
    }
    printf("|__");
    for(j = 0; j < 16*m.cols-1; ++j) printf(" ");
    printf("__|\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r12
movq %rdi, %r14
shrq $0x20, %r14
leaq 0x2d624(%rip), %rdi     # 0x4fae6
movl %r12d, %esi
movl %r14d, %edx
xorl %eax, %eax
callq 0x3160
leaq 0x2d621(%rip), %rdi     # 0x4faf7
xorl %eax, %eax
callq 0x3160
movl %r14d, %eax
shll $0x4, %eax
cmpl $0x2, %eax
pushq $0x1
popq %r15
cmovgel %eax, %r15d
decl %r15d
pushq $0x20
popq %rbp
movl %r15d, %r13d
subl $0x1, %r13d
jb 0x22506
movl %ebp, %edi
callq 0x3060
jmp 0x224f7
leaq 0x2d5fe(%rip), %rdi     # 0x4fb0b
callq 0x30b0
leaq 0x2d5e2(%rip), %rdi     # 0x4fafb
xorl %eax, %eax
callq 0x3160
pushq $0x20
popq %rbp
movl %r15d, %r13d
subl $0x1, %r13d
jb 0x22535
movl %ebp, %edi
callq 0x3060
jmp 0x22526
leaq 0x2d5d3(%rip), %rdi     # 0x4fb0f
callq 0x30b0
xorl %eax, %eax
testl %r14d, %r14d
cmovlel %eax, %r14d
testl %r12d, %r12d
movl $0x0, %eax
cmovgl %r12d, %eax
movq %rax, (%rsp)
leaq 0x2d59e(%rip), %r13     # 0x4faff
xorl %r12d, %r12d
cmpq (%rsp), %r12
je 0x225a8
leaq 0x2d58a(%rip), %rdi     # 0x4fafb
xorl %eax, %eax
callq 0x3160
xorl %ebp, %ebp
cmpq %rbp, %r14
je 0x22597
movq (%rbx,%r12,8), %rax
cvtss2sd (%rax,%rbp,4), %xmm0
movq %r13, %rdi
movb $0x1, %al
callq 0x3160
incq %rbp
jmp 0x2257a
leaq 0x2d572(%rip), %rdi     # 0x4fb10
callq 0x30b0
incq %r12
jmp 0x22564
leaq 0x2d558(%rip), %rdi     # 0x4fb07
xorl %eax, %eax
callq 0x3160
pushq $0x20
popq %rbx
subl $0x1, %r15d
jb 0x225c8
movl %ebx, %edi
callq 0x3060
jmp 0x225b9
leaq 0x2d544(%rip), %rdi     # 0x4fb13
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x30b0
nop
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/network.c
// Function: get_base_args
load_args get_base_args(network *net)
{
    load_args args = {0};
    args.w = net->w;
    args.h = net->h;
    args.size = net->w;

    args.min = net->min_crop;
    args.max = net->max_crop;
    args.angle = net->angle;
    args.aspect = net->aspect;
    args.exposure = net->exposure;
    args.center = net->center;
    args.saturation = net->saturation;
    args.hue = net->hue;
    return args;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0xa8, %edx
xorl %esi, %esi
callq 0x31c0
movl 0x94(%rbx), %eax
movl %eax, 0x2c(%r14)
movl 0x90(%rbx), %ecx
movl %ecx, 0x28(%r14)
movl %eax, 0x4c(%r14)
movq 0x9c(%rbx), %xmm0
pshufd $0xe1, %xmm0, %xmm0     # xmm0 = xmm0[1,0,2,3]
movq %xmm0, 0x44(%r14)
movl 0xac(%rbx), %eax
movl %eax, 0x5c(%r14)
movups 0xb0(%rbx), %xmm0
shufps $0xb4, %xmm0, %xmm0     # xmm0 = xmm0[0,1,3,2]
movups %xmm0, 0x68(%r14)
movss 0xc0(%rbx), %xmm0
movss %xmm0, 0x78(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/network.c
// Function: load_network
network *load_network(char *cfg, char *weights, int clear)
{
    network *net = parse_network_cfg(cfg);
    if(weights && weights[0] != 0){
        load_weights(net, weights);
    }
    if(clear) (*net->seen) = 0;
    return net;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
callq 0x27071
movq %rax, %rbx
testq %r14, %r14
je 0x2267f
cmpb $0x0, (%r14)
je 0x2267f
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2958f
testl %ebp, %ebp
je 0x2268b
movq 0x8(%rbx), %rax
andq $0x0, (%rax)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/network.c
// Function: make_network
network *make_network(int n)
{
    network *net = calloc(1, sizeof(network));
    net->n = n;
    net->layers = calloc(net->n, sizeof(layer));
    net->seen = calloc(1, sizeof(size_t));
    net->t    = calloc(1, sizeof(int));
    net->cost = calloc(1, sizeof(float));
    return net;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebp
pushq $0x1
popq %rbx
movl $0x110, %esi            # imm = 0x110
movq %rbx, %rdi
callq 0x3250
movq %rax, %r14
movl %ebp, (%rax)
movslq %ebp, %rdi
movl $0x4a0, %esi            # imm = 0x4A0
callq 0x3250
movq %rax, 0x20(%r14)
pushq $0x8
popq %rsi
movq %rbx, %rdi
callq 0x3250
movq %rax, 0x8(%r14)
pushq $0x4
popq %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3250
movq %rax, 0x10(%r14)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3250
movq %rax, 0x100(%r14)
movq %r14, %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/network.c
// Function: forward_network
void forward_network(network *netp)
{
    network net = *netp;
    int i;
    for(i = 0; i < net.n; ++i){
        net.index = i;
        layer l = net.layers[i];
        if(l.delta){
            fill_cpu(l.outputs * l.batch, 0, l.delta, 1);
        }
        l.forward(l, net);
        net.input = l.output;
        if(l.truth) {
            net.truth = l.output;
        }
    }
    calc_network_cost(netp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb68, %rsp            # imm = 0xB68
movq %rdi, %rsi
leaq 0x5b8(%rsp), %r14
movl $0x110, %edx            # imm = 0x110
movq %r14, %rdi
movq %rsi, 0x5b0(%rsp)
callq 0x32b0
xorl %r13d, %r13d
leaq 0x6c8(%rsp), %r15
pushq $0x22
popq %r12
pushq $0x1
popq %rbp
xorl %ebx, %ebx
movslq 0x5b8(%rsp), %rax
cmpq %rax, %rbx
jge 0x22a3d
movl %ebx, 0x6b4(%rsp)
movq 0x5d8(%rsp), %rsi
addq %r13, %rsi
movl $0x4a0, %edx            # imm = 0x4A0
movq %r15, %rdi
callq 0x32b0
movq 0x928(%rsp), %rsi
testq %rsi, %rsi
je 0x229e6
movl 0x710(%rsp), %edi
imull 0x720(%rsp), %edi
xorps %xmm0, %xmm0
movl %ebp, %edx
callq 0x1b449
movl $0x94, %ecx
movq %rsp, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x4a0(%rsp), %rdi
movq %r12, %rcx
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
callq *0x6d8(%rsp)
movq 0x930(%rsp), %rax
movq %rax, 0x690(%rsp)
cmpl $0x0, 0x790(%rsp)
je 0x22a2e
movq %rax, 0x698(%rsp)
incq %rbx
addq $0x4a0, %r13            # imm = 0x4A0
jmp 0x22990
movq 0x5b0(%rsp), %rdi
addq $0xb68, %rsp            # imm = 0xB68
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x22a5b
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/network.c
// Function: calc_network_cost
void calc_network_cost(network *netp)
{
    network net = *netp;
    int i;
    float sum = 0;
    int count = 0;
    for(i = 0; i < net.n; ++i){
        if(net.layers[i].cost){
            sum += net.layers[i].cost[0];
            ++count;
        }
    }
    *net.cost = sum/count;
}

// Assembly:
movl (%rdi), %esi
movq 0x20(%rdi), %rax
xorl %edx, %edx
testl %esi, %esi
cmovlel %edx, %esi
movq 0x100(%rdi), %rcx
imulq $0x4a0, %rsi, %rsi      # imm = 0x4A0
xorps %xmm0, %xmm0
xorl %edi, %edi
cmpq %rdx, %rsi
je 0x22a9d
movq 0x1d8(%rax,%rdx), %r8
testq %r8, %r8
je 0x22a94
addss (%r8), %xmm0
incl %edi
addq $0x4a0, %rdx            # imm = 0x4A0
jmp 0x22a7b
cvtsi2ss %edi, %xmm1
divss %xmm1, %xmm0
movss %xmm0, (%rcx)
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/network.c
// Function: update_network
void update_network(network *netp)
{
    network net = *netp;
    int i;
    update_args a = {0};
    a.batch = net.batch*net.subdivisions;
    a.learning_rate = get_current_rate(netp);
    a.momentum = net.momentum;
    a.decay = net.decay;
    a.adam = net.adam;
    a.B1 = net.B1;
    a.B2 = net.B2;
    a.eps = net.eps;
    ++*net.t;
    a.t = *net.t;

    for(i = 0; i < net.n; ++i){
        layer l = net.layers[i];
        if(l.update){
            l.update(l, a);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x508, %rsp            # imm = 0x508
movl (%rdi), %ebp
movq 0x10(%rdi), %r14
movl 0x1c(%rdi), %eax
movq 0x20(%rdi), %rbx
movl 0x70(%rdi), %r15d
imull 0x4(%rdi), %eax
movss 0x7c(%rdi), %xmm0
movss %xmm0, 0x4cc(%rsp)
movl %eax, 0x4d0(%rsp)
movsd 0x38(%rdi), %xmm0
movsd %xmm0, 0x4f8(%rsp)
movsd 0x74(%rdi), %xmm0
movsd %xmm0, 0x500(%rsp)
callq 0x226ae
movss %xmm0, 0x4d4(%rsp)
movsd 0x4f8(%rsp), %xmm0
movsd %xmm0, 0x4d8(%rsp)
movl %r15d, 0x4e0(%rsp)
movsd 0x500(%rsp), %xmm0
movsd %xmm0, 0x4e4(%rsp)
movss 0x4cc(%rsp), %xmm0
movss %xmm0, 0x4ec(%rsp)
movl (%r14), %eax
incl %eax
movl %eax, (%r14)
movl %eax, 0x4f0(%rsp)
xorl %r14d, %r14d
testl %ebp, %ebp
cmovgl %ebp, %r14d
subq $0x1, %r14
jb 0x22bb7
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x22bae
movl $0x94, %ecx
movq %rsp, %rdi
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
movl 0x4f0(%rsp), %ecx
movl %ecx, 0x4c0(%rsp)
movups 0x4d0(%rsp), %xmm0
movups 0x4e0(%rsp), %xmm1
movups %xmm1, 0x4b0(%rsp)
movups %xmm0, 0x4a0(%rsp)
callq *%rax
addq $0x4a0, %rbx            # imm = 0x4A0
jmp 0x22b61
addq $0x508, %rsp            # imm = 0x508
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/network.c
// Function: backward_network
void backward_network(network *netp)
{
    network net = *netp;
    int i;
    network orig = net;
    for(i = net.n-1; i >= 0; --i){
        layer l = net.layers[i];
        if(l.stopbackward) break;
        if(i == 0){
            net = orig;
        }else{
            layer prev = net.layers[i-1];
            net.input = prev.output;
            net.delta = prev.delta;
        }
        net.index = i;
        l.backward(l, net);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc78, %rsp            # imm = 0xC78
movq %rdi, %r15
leaq 0x5b8(%rsp), %rbx
movl $0x110, %edx            # imm = 0x110
movq %rbx, %rdi
movq %r15, %rsi
callq 0x32b0
leaq 0x6c8(%rsp), %rdi
movl $0x110, %edx            # imm = 0x110
movq %r15, %rsi
callq 0x32b0
movl (%rbx), %r14d
imulq $0x4a0, %r14, %r13      # imm = 0x4A0
addq $-0x6d8, %r13           # imm = 0xF928
leaq 0x7d8(%rsp), %r15
testl %r14d, %r14d
jle 0x22cdb
leaq -0x1(%r14), %rbp
movq 0x5d8(%rsp), %r12
movl %ebp, %eax
imulq $0x4a0, %rax, %rsi      # imm = 0x4A0
addq %r12, %rsi
movl $0x4a0, %edx            # imm = 0x4A0
movq %r15, %rdi
callq 0x32b0
cmpl $0x0, 0x950(%rsp)
jne 0x22cdb
cmpl $0x1, %r14d
jne 0x22c86
movl $0x110, %edx            # imm = 0x110
movq %rbx, %rdi
leaq 0x6c8(%rsp), %rsi
callq 0x32b0
jmp 0x22c9f
movq -0x8(%r12,%r13), %rax
movq (%r12,%r13), %rcx
movq %rcx, 0x690(%rsp)
movq %rax, 0x6a0(%rsp)
movl %ebp, 0x6b4(%rsp)
movl $0x94, %ecx
movq %rsp, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x4a0(%rsp), %rdi
pushq $0x22
popq %rcx
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
callq *0x7f0(%rsp)
addq $-0x4a0, %r13           # imm = 0xFB60
movq %rbp, %r14
jmp 0x22c31
addq $0xc78, %rsp            # imm = 0xC78
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/network.c
// Function: train_network_datum
float train_network_datum(network *net)
{
    *net->seen += net->batch;
    net->train = 1;
    forward_network(net);
    backward_network(net);
    float error = *net->cost;
    if(((*net->seen)/net->batch)%net->subdivisions == 0) update_network(net);
    return error;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movslq 0x4(%rdi), %rax
movq 0x8(%rdi), %rcx
addq %rax, (%rcx)
movl $0x1, 0xf8(%rdi)
callq 0x2294b
movq %rbx, %rdi
callq 0x22bd7
movq 0x8(%rbx), %rax
movq 0x100(%rbx), %rcx
movss (%rcx), %xmm0
movq (%rax), %rax
movslq 0x4(%rbx), %rcx
xorl %edx, %edx
divq %rcx
movslq 0x1c(%rbx), %rcx
xorl %edx, %edx
divq %rcx
testq %rdx, %rdx
jne 0x22d54
movq %rbx, %rdi
movss %xmm0, 0xc(%rsp)
callq 0x22aaa
movss 0xc(%rsp), %xmm0
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/network.c
// Function: train_network_sgd
float train_network_sgd(network *net, data d, int n)
{
    int batch = net->batch;

    int i;
    float sum = 0;
    for(i = 0; i < n; ++i){
        get_random_batch(d, batch, net->input, net->truth);
        float err = train_network_datum(net);
        sum += err;
    }
    return (float)sum/(n*batch);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movl %esi, %ebx
movq %rdi, %r14
leaq 0x80(%rsp), %r15
movl 0x4(%rdi), %ebp
xorl %r12d, %r12d
testl %esi, %esi
cmovgl %esi, %r12d
xorps %xmm1, %xmm1
subl $0x1, %r12d
jb 0x22ddd
movq 0xd8(%r14), %rsi
movq 0xe0(%r14), %rdx
movups (%r15), %xmm0
movss %xmm1, 0x4c(%rsp)
movups 0x10(%r15), %xmm1
movups 0x20(%r15), %xmm2
movups 0x30(%r15), %xmm3
movups %xmm3, 0x30(%rsp)
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movl %ebp, %edi
callq 0x215a1
movq %r14, %rdi
callq 0x22ced
movss 0x4c(%rsp), %xmm1
addss %xmm0, %xmm1
jmp 0x22d82
imull %ebx, %ebp
cvtsi2ss %ebp, %xmm0
divss %xmm0, %xmm1
movaps %xmm1, %xmm0
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/network.c
// Function: train_network
float train_network(network *net, data d)
{
    assert(d.X.rows % net->batch == 0);
    int batch = net->batch;
    int n = d.X.rows / batch;

    int i;
    float sum = 0;
    for(i = 0; i < n; ++i){
        get_next_batch(d, batch, i*batch, net->input, net->truth);
        float err = train_network_datum(net);
        sum += err;
    }
    return (float)sum/(n*batch);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl 0x88(%rsp), %eax
movl 0x4(%rdi), %ebx
cltd
idivl %ebx
testl %edx, %edx
jne 0x22ebc
movq %rdi, %r14
movl %eax, %ebp
leaq 0x80(%rsp), %r12
xorl %r15d, %r15d
testl %eax, %eax
movl $0x0, %r13d
cmovgl %eax, %r13d
xorps %xmm1, %xmm1
subl $0x1, %r13d
jb 0x22e9f
movq 0xd8(%r14), %rdx
movq 0xe0(%r14), %rcx
movups (%r12), %xmm0
movss %xmm1, 0x44(%rsp)
movups 0x10(%r12), %xmm1
movups 0x20(%r12), %xmm2
movups 0x30(%r12), %xmm3
movups %xmm3, 0x30(%rsp)
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movl %ebx, %edi
movl %r15d, %esi
callq 0x2163e
movq %r14, %rdi
callq 0x22ced
movss 0x44(%rsp), %xmm1
addss %xmm0, %xmm1
addl %ebx, %r15d
jmp 0x22e3a
imull %ebx, %ebp
cvtsi2ss %ebp, %xmm0
divss %xmm0, %xmm1
movaps %xmm1, %xmm0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2ce1b(%rip), %rdi     # 0x4fcde
leaq 0x2ce2f(%rip), %rsi     # 0x4fcf9
leaq 0x2ce32(%rip), %rcx     # 0x4fd03
movl $0x121, %edx            # imm = 0x121
callq 0x31b0
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/network.c
// Function: set_batch_network
void set_batch_network(network *net, int b)
{
    net->batch = b;
    int i;
    for(i = 0; i < net->n; ++i){
        net->layers[i].batch = b;
    }
}

// Assembly:
movl %esi, 0x4(%rdi)
movslq (%rdi), %rax
pushq $0x48
popq %rcx
xorl %edx, %edx
cmpq %rax, %rdx
jge 0x22f24
movq 0x20(%rdi), %r8
movl %esi, (%r8,%rcx)
incq %rdx
addq $0x4a0, %rcx            # imm = 0x4A0
jmp 0x22f0b
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/network.c
// Function: get_network_output_layer
layer get_network_output_layer(network *net)
{
    int i;
    for(i = net->n - 1; i >= 0; --i){
        if(net->layers[i].type != COST) break;
    }
    return net->layers[i];
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl (%rsi), %eax
movl %eax, %ecx
sarl $0x1f, %ecx
andl %eax, %ecx
decl %ecx
movq 0x20(%rsi), %rsi
movq %rax, %rdx
decq %rdx
testl %eax, %eax
jle 0x2320a
movl %edx, %edi
imulq $0x4a0, %rdi, %rdi      # imm = 0x4A0
decl %eax
decq %rdx
cmpl $0x9, (%rsi,%rdi)
je 0x231f0
jmp 0x2320c
movl %ecx, %eax
cltq
imulq $0x4a0, %rax, %rax      # imm = 0x4A0
addq %rax, %rsi
movl $0x4a0, %edx            # imm = 0x4A0
movq %rbx, %rdi
callq 0x32b0
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/network.c
// Function: get_network_detection_layer
layer get_network_detection_layer(network *net)
{
    int i;
    for(i = 0; i < net->n; ++i){
        if(net->layers[i].type == DETECTION){
            return net->layers[i];
        }
    }
    fprintf(stderr, "Detection layer not found!!\n");
    layer l = {0};
    return l;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl (%rsi), %eax
xorl %ecx, %ecx
testl %eax, %eax
cmovgl %eax, %ecx
imulq $0x4a0, %rcx, %rcx      # imm = 0x4A0
movq $-0x4a0, %rdx           # imm = 0xFB60
leaq 0x4a0(%rdx), %rdi
cmpq %rdi, %rcx
je 0x2327a
movq 0x20(%rsi), %rax
cmpl $0x5, 0x4a0(%rax,%rdx)
movq %rdi, %rdx
jne 0x23245
addq %rdi, %rax
movl $0x4a0, %edx            # imm = 0x4A0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x32b0
movq %rbx, %rax
popq %rbx
retq
movq 0x40d77(%rip), %rax     # 0x63ff8
movq (%rax), %rcx
leaq 0x2cae6(%rip), %rdi     # 0x4fd71
pushq $0x1c
popq %rsi
pushq $0x1
popq %rdx
callq 0x3440
movl $0x4a0, %edx            # imm = 0x4A0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x31c0
jmp 0x23275
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/network.c
// Function: get_network_image
image get_network_image(network *net)
{
    int i;
    for(i = net->n-1; i >= 0; --i){
        image m = get_network_image_layer(net, i);
        if(m.h != 0) return m;
    }
    image def = {0};
    return def;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %ebp
testl %ebp, %ebp
jle 0x23331
decl %ebp
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x232a7
cmpl $0x0, 0x4(%rbx)
je 0x23316
jmp 0x2333c
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/network.c
// Function: visualize_network
void visualize_network(network *net)
{
    image *prev = 0;
    int i;
    char buff[256];
    for(i = 0; i < net->n; ++i){
        sprintf(buff, "Layer %d", i);
        layer l = net->layers[i];
        if(l.type == CONVOLUTIONAL){
            prev = visualize_convolutional_layer(l, buff, prev);
        }
    } 
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x5a8, %rsp            # imm = 0x5A8
movq %rdi, %rbx
leaq 0x2b411(%rip), %r14     # 0x4e770
leaq 0x4a0(%rsp), %r15
xorl %ebp, %ebp
xorl %r12d, %r12d
xorl %r13d, %r13d
movslq (%rbx), %rax
cmpq %rax, %r12
jge 0x233b9
movq %r15, %rdi
movq %r14, %rsi
movl %r12d, %edx
xorl %eax, %eax
callq 0x3420
movq 0x20(%rbx), %rsi
cmpl $0x0, (%rsi,%rbp)
jne 0x233ad
addq %rbp, %rsi
movl $0x94, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
movq %r15, %rdi
movq %r13, %rsi
callq 0x7155
movq %rax, %r13
incq %r12
addq $0x4a0, %rbp            # imm = 0x4A0
jmp 0x2336f
addq $0x5a8, %rsp            # imm = 0x5A8
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/network.c
// Function: network_predict
float *network_predict(network *net, float *input)
{
    network orig = *net;
    net->input = input;
    net->truth = 0;
    net->train = 0;
    net->delta = 0;
    forward_network(net);
    float *out = net->output;
    *net = orig;
    return out;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %r15
movl $0x110, %edx            # imm = 0x110
movq %r15, %rdi
movq %r14, %rsi
callq 0x32b0
movq %rbx, 0xd8(%r14)
andl $0x0, 0xf8(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0xe0(%r14)
movq %r14, %rdi
callq 0x2294b
movq 0x28(%r14), %rbx
movl $0x110, %edx            # imm = 0x110
movq %r14, %rdi
movq %r15, %rsi
callq 0x32b0
movq %rbx, %rax
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/network.c
// Function: num_detections
int num_detections(network *net, float thresh)
{
    int i;
    int s = 0;
    for(i = 0; i < net->n; ++i){
        layer l = net->layers[i];
        if(l.type == YOLO){
            s += yolo_num_detections(l, thresh);
        }
        if(l.type == DETECTION || l.type == REGION){
            s += l.w*l.h*l.n;
        }
    }
    return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4b8, %rsp            # imm = 0x4B8
movss %xmm0, 0x4ac(%rsp)
movq %rdi, %r13
xorl %r14d, %r14d
xorl %r15d, %r15d
xorl %ecx, %ecx
movslq (%r13), %rax
cmpq %rax, %r15
jge 0x234f8
movq 0x20(%r13), %rsi
movl (%rsi,%r14), %ebp
movl 0x6c(%rsi,%r14), %r12d
movl 0x70(%rsi,%r14), %ebx
movl 0x84(%rsi,%r14), %eax
cmpl $0x17, %ebp
jne 0x234d4
addq %r14, %rsi
movl %ecx, 0x4b4(%rsp)
movl $0x94, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
movss 0x4ac(%rsp), %xmm0
movl %eax, 0x4b0(%rsp)
callq 0x3594f
movl 0x4b4(%rsp), %ecx
addl %eax, %ecx
movl 0x4b0(%rsp), %eax
cmpl $0x16, %ebp
je 0x234de
cmpl $0x5, %ebp
jne 0x234e9
imull %ebx, %r12d
imull %eax, %r12d
addl %r12d, %ecx
incq %r15
addq $0x4a0, %r14            # imm = 0x4A0
jmp 0x23472
movl %ecx, %eax
addq $0x4b8, %rsp            # imm = 0x4B8
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/network.c
// Function: make_network_boxes
detection *make_network_boxes(network *net, float thresh, int *num)
{
    layer l = net->layers[net->n - 1];
    int i;
    int nboxes = num_detections(net, thresh);
    if(num) *num = nboxes;
    detection *dets = calloc(nboxes, sizeof(detection));
    for(i = 0; i < nboxes; ++i){
        dets[i].prob = calloc(l.classes, sizeof(float));
        if(l.coords > 4){
            dets[i].mask = calloc(l.coords-4, sizeof(float));
        }
    }
    return dets;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq 0x20(%rdi), %rax
movslq (%rdi), %rcx
imulq $0x4a0, %rcx, %rcx      # imm = 0x4A0
movslq -0x3a4(%rax,%rcx), %rbx
movl -0x3a0(%rax,%rcx), %r13d
callq 0x2344d
movl %eax, %r12d
testq %r14, %r14
je 0x23548
movl %r12d, (%r14)
movslq %r12d, %rdi
pushq $0x30
popq %rsi
callq 0x3250
movq %rax, %r14
leal -0x4(%r13), %eax
movq %rax, (%rsp)
xorl %ebp, %ebp
testl %r12d, %r12d
cmovlel %ebp, %r12d
imulq $0x30, %r12, %r15
pushq $0x4
popq %r12
cmpq %rbp, %r15
je 0x235a1
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3250
movq %rax, 0x18(%r14,%rbp)
cmpl $0x5, %r13d
jl 0x2359b
movq (%rsp), %rdi
movq %r12, %rsi
callq 0x3250
movq %rax, 0x20(%r14,%rbp)
addq $0x30, %rbp
jmp 0x2356f
movq %r14, %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/network.c
// Function: fill_network_boxes
void fill_network_boxes(network *net, int w, int h, float thresh, float hier, int *map, int relative, detection *dets)
{
    int j;
    for(j = 0; j < net->n; ++j){
        layer l = net->layers[j];
        if(l.type == YOLO){
            int count = get_yolo_detections(l, w, h, net->w, net->h, thresh, map, relative, dets);
            dets += count;
        }
        if(l.type == REGION){
            get_region_detections(l, w, h, net->w, net->h, thresh, map, hier, relative, dets);
            dets += l.w*l.h*l.n;
        }
        if(l.type == DETECTION){
            get_detection_detections(l, w, h, thresh, dets);
            dets += l.w*l.h*l.n;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x968, %rsp            # imm = 0x968
movq %r9, %rbx
movl %r8d, 0x4b8(%rsp)
movq %rcx, 0x4c0(%rsp)
movss %xmm1, 0x4bc(%rsp)
movss %xmm0, 0x4b4(%rsp)
movl %edx, 0x4b0(%rsp)
movl %esi, %r12d
movq %rdi, %r13
xorl %ebp, %ebp
xorl %r15d, %r15d
movslq (%r13), %rax
cmpq %rax, %r15
jge 0x2378a
movq 0x20(%r13), %r14
addq %rbp, %r14
movl $0x4a0, %edx            # imm = 0x4A0
leaq 0x4c8(%rsp), %rdi
movq %r14, %rsi
callq 0x32b0
movl 0x4c8(%rsp), %eax
cmpl $0x17, %eax
jne 0x2368e
movl 0x90(%r13), %eax
movl 0x94(%r13), %edx
movl $0x94, %ecx
movq %rsp, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %rbx, 0x4a0(%rsp)
movl %r12d, %edi
movl 0x4b0(%rsp), %esi
movl %eax, %ecx
movss 0x4b4(%rsp), %xmm0
movq 0x4c0(%rsp), %r8
movl 0x4b8(%rsp), %r9d
callq 0x35b78
cltq
imulq $0x30, %rax, %rax
addq %rax, %rbx
movl 0x4c8(%rsp), %eax
cmpl $0x16, %eax
jne 0x23721
movl 0x90(%r13), %eax
movl 0x94(%r13), %edx
movl $0x94, %ecx
movq %rsp, %rdi
leaq 0x4c8(%rsp), %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %rbx, 0x4a0(%rsp)
movl %r12d, %edi
movl 0x4b0(%rsp), %esi
movl %eax, %ecx
movss 0x4b4(%rsp), %xmm0
movq 0x4c0(%rsp), %r8
movss 0x4bc(%rsp), %xmm1
movl 0x4b8(%rsp), %r9d
callq 0x318cf
movslq 0x538(%rsp), %rax
movslq 0x534(%rsp), %rcx
imulq %rax, %rcx
movslq 0x54c(%rsp), %rax
imulq %rcx, %rax
imulq $0x30, %rax, %rax
addq %rax, %rbx
movl 0x4c8(%rsp), %eax
cmpl $0x5, %eax
jne 0x2377b
movl $0x94, %ecx
movq %rsp, %rdi
leaq 0x4c8(%rsp), %rsi
rep  movsq (%rsi), %es:(%rdi)
movl %r12d, %edi
movl 0x4b0(%rsp), %esi
movss 0x4b4(%rsp), %xmm0
movq %rbx, %rdx
callq 0x2a630
movslq 0x538(%rsp), %rax
movslq 0x534(%rsp), %rcx
imulq %rax, %rcx
movslq 0x54c(%rsp), %rax
imulq %rcx, %rax
imulq $0x30, %rax, %rax
addq %rax, %rbx
incq %r15
addq $0x4a0, %rbp            # imm = 0x4A0
jmp 0x235fb
addq $0x968, %rsp            # imm = 0x968
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/network.c
// Function: free_detections
void free_detections(detection *dets, int n)
{
    int i;
    for(i = 0; i < n; ++i){
        free(dets[i].prob);
        if(dets[i].mask) free(dets[i].mask);
    }
    free(dets);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
testl %esi, %esi
cmovlel %r14d, %esi
imulq $0x30, %rsi, %r15
cmpq %r14, %r15
je 0x23832
movq 0x18(%rbx,%r14), %rdi
callq 0x3040
movq 0x20(%rbx,%r14), %rdi
callq 0x3040
addq $0x30, %r14
jmp 0x23813
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3040
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/network.c
// Function: network_predict_image
float *network_predict_image(network *net, image im)
{
    image imr = letterbox_image(im, net->w, net->h);
    set_batch_network(net, 1);
    float *p = network_predict(net, imr.data);
    free_image(imr);
    return p;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movl 0x90(%rdi), %edx
movl 0x94(%rdi), %esi
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x50(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0xe7d0
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x22f00
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x233e2
movq %rax, %rbx
movq 0x10(%r14), %rax
movq %rax, 0x10(%rsp)
movups (%r14), %xmm0
movups %xmm0, (%rsp)
callq 0xba88
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/network.c
// Function: network_predict_data_multi
matrix network_predict_data_multi(network *net, data test, int n)
{
    int i,j,b,m;
    int k = net->outputs;
    matrix pred = make_matrix(test.X.rows, k);
    float *X = calloc(net->batch*test.X.rows, sizeof(float));
    for(i = 0; i < test.X.rows; i += net->batch){
        for(b = 0; b < net->batch; ++b){
            if(i+b == test.X.rows) break;
            memcpy(X+b*test.X.cols, test.X.vals[i+b], test.X.cols*sizeof(float));
        }
        for(m = 0; m < n; ++m){
            float *out = network_predict(net, X);
            for(b = 0; b < net->batch; ++b){
                if(i+b == test.X.rows) break;
                for(j = 0; j < k; ++j){
                    pred.vals[i+b][j] += out[j+b*k]/n;
                }
            }
        }
    }
    free(X);
    return pred;   
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %esi, %r12d
movq %rdi, %r14
movslq 0x84(%rdi), %r15
movl 0xa8(%rsp), %ebx
movl %ebx, %edi
movl %r15d, %esi
callq 0x221e3
movq %rax, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq %r14, 0x50(%rsp)
movl 0x4(%r14), %ecx
movl %ecx, %eax
movl %ebx, 0x10(%rsp)
imull %ebx, %eax
movl %ecx, %ebx
movslq %eax, %rdi
pushq $0x4
popq %rsi
callq 0x3250
movq %rax, 0x8(%rsp)
movslq 0xac(%rsp), %rax
movq 0xb0(%rsp), %rcx
movq %rcx, 0x30(%rsp)
shlq $0x2, %rax
movq %rax, 0x48(%rsp)
cvtsi2ss %r12d, %xmm1
xorl %ecx, %ecx
testl %r15d, %r15d
movl $0x0, %ebp
cmovgl %r15d, %ebp
testl %r12d, %r12d
cmovlel %ecx, %r12d
movl %r12d, 0x1c(%rsp)
shlq $0x2, %r15
movss %xmm1, 0x18(%rsp)
movl 0x10(%rsp), %eax
movl %eax, %r14d
subl %ecx, %r14d
jle 0x23a5a
testl %ebx, %ebx
movl $0x0, %eax
movl %ebx, 0x14(%rsp)
cmovgl %ebx, %eax
movq %rax, 0x60(%rsp)
movq %rcx, 0x40(%rsp)
movslq %ecx, %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x38(%rsp)
leaq (%rax,%rcx,8), %rax
movq %rax, 0x58(%rsp)
movq 0x8(%rsp), %r12
xorl %ebx, %ebx
cmpq %rbx, 0x60(%rsp)
je 0x239d1
cmpq %rbx, %r14
je 0x239d1
movq 0x58(%rsp), %rax
movq (%rax,%rbx,8), %rsi
movq %r12, %rdi
movq 0x48(%rsp), %r13
movq %r13, %rdx
callq 0x32b0
incq %rbx
addq %r13, %r12
jmp 0x239a4
movq 0x20(%rsp), %rax
movq 0x38(%rsp), %rcx
leaq (%rax,%rcx,8), %r12
xorl %r13d, %r13d
movl 0x14(%rsp), %ebx
cmpl 0x1c(%rsp), %r13d
je 0x23a4e
movq 0x50(%rsp), %rbx
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
callq 0x233e2
movss 0x18(%rsp), %xmm1
movl 0x4(%rbx), %ebx
testl %ebx, %ebx
movl $0x0, %ecx
cmovgl %ebx, %ecx
xorl %edx, %edx
cmpq %rcx, %rdx
je 0x23a49
cmpq %r14, %rdx
je 0x23a49
xorl %esi, %esi
cmpq %rsi, %rbp
je 0x23a41
movss (%rax,%rsi,4), %xmm0
divss %xmm1, %xmm0
movq (%r12,%rdx,8), %rdi
addss (%rdi,%rsi,4), %xmm0
movss %xmm0, (%rdi,%rsi,4)
incq %rsi
jmp 0x23a20
incq %rdx
addq %r15, %rax
jmp 0x23a14
incl %r13d
jmp 0x239e6
movq 0x40(%rsp), %rcx
addl %ebx, %ecx
jmp 0x2395f
movq 0x8(%rsp), %rdi
callq 0x3040
movq 0x28(%rsp), %rax
movq 0x20(%rsp), %rdx
addq $0x68, %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/network.c
// Function: network_predict_data
matrix network_predict_data(network *net, data test)
{
    int i,j,b;
    int k = net->outputs;
    matrix pred = make_matrix(test.X.rows, k);
    float *X = calloc(net->batch*test.X.cols, sizeof(float));
    for(i = 0; i < test.X.rows; i += net->batch){
        for(b = 0; b < net->batch; ++b){
            if(i+b == test.X.rows) break;
            memcpy(X+b*test.X.cols, test.X.vals[i+b], test.X.cols*sizeof(float));
        }
        float *out = network_predict(net, X);
        for(b = 0; b < net->batch; ++b){
            if(i+b == test.X.rows) break;
            for(j = 0; j < k; ++j){
                pred.vals[i+b][j] = out[j+b*k];
            }
        }
    }
    free(X);
    return pred;   
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
movslq 0x84(%rdi), %r14
movl 0x98(%rsp), %edi
movl %edi, 0x8(%rsp)
movl %r14d, %esi
callq 0x221e3
movq %rax, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq %rbx, 0x38(%rsp)
movslq 0x4(%rbx), %rdi
movslq 0x9c(%rsp), %rbx
movq %rdi, %r15
imulq %rbx, %rdi
pushq $0x4
popq %rsi
callq 0x3250
movq %rax, %r13
movq 0xa0(%rsp), %rax
movq %rax, 0x20(%rsp)
shlq $0x2, %rbx
movq %rbx, 0x48(%rsp)
testl %r14d, %r14d
movl $0x0, %ebx
cmovgl %r14d, %ebx
shlq $0x2, %r14
xorl %ecx, %ecx
movq %r14, 0x30(%rsp)
movq %r13, 0x28(%rsp)
movl 0x8(%rsp), %eax
movl %eax, %r12d
subl %ecx, %r12d
jle 0x23bde
testl %r15d, %r15d
movl $0x0, %eax
cmovlel %eax, %r15d
movq %r15, 0x50(%rsp)
movl %ecx, 0xc(%rsp)
movslq %ecx, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x40(%rsp)
leaq (%rax,%rcx,8), %r14
movq %r13, %r15
xorl %ebp, %ebp
cmpq %rbp, 0x50(%rsp)
je 0x23b6a
cmpq %rbp, %r12
je 0x23b6a
movq (%r14,%rbp,8), %rsi
movq %r15, %rdi
movq 0x48(%rsp), %r13
movq %r13, %rdx
callq 0x32b0
incq %rbp
addq %r13, %r15
jmp 0x23b42
movq 0x38(%rsp), %r14
movq %r14, %rdi
movq 0x28(%rsp), %r13
movq %r13, %rsi
callq 0x233e2
movl 0x4(%r14), %edx
testl %edx, %edx
movl $0x0, %ecx
movq %rdx, %r15
cmovgl %edx, %ecx
movq 0x10(%rsp), %rdx
movq 0x40(%rsp), %rsi
leaq (%rdx,%rsi,8), %rdx
xorl %esi, %esi
movq 0x30(%rsp), %r14
cmpq %rcx, %rsi
je 0x23bd2
cmpq %r12, %rsi
je 0x23bd2
xorl %edi, %edi
cmpq %rdi, %rbx
je 0x23bca
movss (%rax,%rdi,4), %xmm0
movq (%rdx,%rsi,8), %r8
movss %xmm0, (%r8,%rdi,4)
incq %rdi
jmp 0x23bb1
incq %rsi
addq %r14, %rax
jmp 0x23ba5
movl 0xc(%rsp), %ecx
addl %r15d, %ecx
jmp 0x23b07
movq %r13, %rdi
callq 0x3040
movq 0x18(%rsp), %rax
movq 0x10(%rsp), %rdx
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq