LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: fill_truth
void fill_truth(char *path, char **labels, int k, float *truth)
{
    int i;
    memset(truth, 0, k*sizeof(float));
    int count = 0;
    for(i = 0; i < k; ++i){
        if(strstr(path, labels[i])){
            truth[i] = 1;
            ++count;
            //printf("%s %s %d\n", path, labels[i], i);
        }
    }
    if(count != 1 && (k != 1 || count != 0)) printf("Too many or too few labels: %d, %s\n", count, path);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movl %edx, %ebp
movq %rsi, %r12
movq %rdi, %rbx
movslq %edx, %r13
leaq (,%r13,4), %rdx
xorl %r14d, %r14d
movq %rcx, %rdi
xorl %esi, %esi
callq 0x31c0
testl %r13d, %r13d
jle 0x2cced
movl %ebp, 0x4(%rsp)
movl %ebp, %r13d
xorl %ebp, %ebp
xorl %r14d, %r14d
movq (%r12,%rbp,8), %rsi
movq %rbx, %rdi
callq 0x34b0
testq %rax, %rax
je 0x2ccd3
movl $0x3f800000, (%r15,%rbp,4) # imm = 0x3F800000
incl %r14d
incq %rbp
cmpq %rbp, %r13
jne 0x2ccb7
cmpl $0x1, %r14d
movl 0x4(%rsp), %eax
je 0x2cd0f
xorl $0x1, %eax
orl %r14d, %eax
je 0x2cd0f
leaq 0x2bd96(%rip), %rdi     # 0x58a8a
movl %r14d, %esi
movq %rbx, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3160
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: load_labels_paths
matrix load_labels_paths(char **paths, int n, char **labels, int k, tree *hierarchy)
{
    matrix y = make_matrix(n, k);
    int i;
    for(i = 0; i < n && labels; ++i){
        fill_truth(paths[i], labels, k, y.vals[i]);
        if(hierarchy){
            fill_hierarchy(y.vals[i], k, hierarchy);
        }
    }
    return y;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %r14
movl %esi, %r12d
movq %rdi, 0x10(%rsp)
movl %esi, %edi
movl %ecx, %esi
callq 0x311ee
movq %rax, 0x8(%rsp)
movq %rdx, %r13
testq %r14, %r14
sete %al
testl %r12d, %r12d
setle %cl
orb %al, %cl
jne 0x2d15d
movl %r12d, %r12d
xorl %r15d, %r15d
movq 0x10(%rsp), %rax
movq (%rax,%r15,8), %rdi
movq (%r13,%r15,8), %rcx
movq %r14, %rsi
movl %ebp, %edx
callq 0x2cc78
testq %rbx, %rbx
je 0x2d155
movq (%r13,%r15,8), %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x2cd1e
incq %r15
cmpq %r12, %r15
jb 0x2d129
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_O3/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: load_tags_paths
matrix load_tags_paths(char **paths, int n, int k)
{
    matrix y = make_matrix(n, k);
    int i;
    //int count = 0;
    for(i = 0; i < n; ++i){
        char label[4096];
        find_replace(paths[i], "images", "labels", label);
        find_replace(label, ".jpg", ".txt", label);
        FILE *file = fopen(label, "r");
        if (!file) continue;
        //++count;
        int tag;
        while(fscanf(file, "%d", &tag) == 1){
            if(tag < k){
                y.vals[i][tag] = 1;
            }
        }
        fclose(file);
    }
    //printf("%d/%d\n", count, n);
    return y;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1028, %rsp           # imm = 0x1028
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, 0x18(%rsp)
movl %esi, %edi
movl %edx, %esi
callq 0x311ee
movq %rax, 0x8(%rsp)
movq %rdx, %r12
testl %ebp, %ebp
jle 0x2d252
movl %ebp, %eax
movq %rax, 0x10(%rsp)
leaq 0x2dbce(%rip), %rbp     # 0x5ad83
leaq 0x4(%rsp), %r13
xorl %r15d, %r15d
movq 0x18(%rsp), %rax
movq (%rax,%r15,8), %rdi
leaq 0x2b882(%rip), %rsi     # 0x58a4f
leaq 0x2b882(%rip), %rdx     # 0x58a56
leaq 0x20(%rsp), %r14
movq %r14, %rcx
callq 0xf02d
movq %r14, %rdi
leaq 0x2a641(%rip), %rsi     # 0x5782c
leaq 0x2d71f(%rip), %rdx     # 0x5a911
movq %r14, %rcx
callq 0xf02d
movq %r14, %rdi
leaq 0x2dc25(%rip), %rsi     # 0x5ae29
callq 0x3390
testq %rax, %rax
je 0x2d244
movq %rax, %r14
movq %r14, %rdi
movq %rbp, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x30a0
cmpl $0x1, %eax
jne 0x2d23c
movslq 0x4(%rsp), %rax
cmpl %ebx, %eax
jge 0x2d211
movq (%r12,%r15,8), %rcx
movl $0x3f800000, (%rcx,%rax,4) # imm = 0x3F800000
jmp 0x2d211
movq %r14, %rdi
callq 0x3130
incq %r15
cmpq 0x10(%rsp), %r15
jne 0x2d1bd
movq 0x8(%rsp), %rax
movq %r12, %rdx
addq $0x1028, %rsp           # imm = 0x1028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: get_labels
char **get_labels(char *filename)
{
    list *plist = get_paths(filename);
    char **labels = (char **)list_to_array(plist);
    free_list(plist);
    return labels;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
callq 0x2af38
movq %rax, %rbx
movq %rax, %rdi
callq 0x11928
movq %rax, %r14
movq %rbx, %rdi
callq 0x118de
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: free_data
void free_data(data d)
{
    if(!d.shallow){
        free_matrix(d.X);
        free_matrix(d.y);
    }else{
        free(d.X.vals);
        free(d.y.vals);
    }
}

// Assembly:
pushq %rbx
leaq 0x10(%rsp), %rbx
cmpl $0x0, 0x28(%rbx)
je 0x2d2b5
movq 0x10(%rbx), %rdi
callq 0x3040
movq 0x20(%rbx), %rdi
popq %rbx
jmp 0x3040
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rsi
callq 0x30ee4
movq 0x18(%rbx), %rdi
movq 0x20(%rbx), %rsi
popq %rbx
jmp 0x30ee4
// File: /workspace/github_c_makefile_star2_O3/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: load_data_old
data load_data_old(char **paths, int n, int m, char **labels, int k, int w, int h)
{
    if(m) paths = get_random_paths(paths, n, m);
    data d = {0};
    d.shallow = 0;
    d.X = load_image_paths(paths, n, w, h);
    d.y = load_labels_paths(paths, n, labels, k, 0);
    if(m) free(paths);
    return d;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %r15d
movq %r8, %r12
movl %ecx, %ebp
movl %edx, %r13d
movq %rsi, %r14
movq %rdi, %rbx
movl 0x48(%rsp), %ecx
movl 0x40(%rsp), %edx
testl %ebp, %ebp
je 0x2f32a
movq %r14, %rdi
movl %r13d, %esi
movl %ebp, %edx
movl %ecx, %r14d
callq 0x2af92
movl 0x40(%rsp), %edx
movl %r14d, %ecx
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
movq %r14, %rdi
movl %r13d, %esi
callq 0x2b15a
movq %rax, 0x8(%rbx)
movq %rdx, 0x10(%rbx)
movq %r14, %rdi
movl %r13d, %esi
movq %r12, %rdx
movl %r15d, %ecx
xorl %r8d, %r8d
callq 0x2d0e4
movq %rax, 0x18(%rbx)
movq %rdx, 0x20(%rbx)
testl %ebp, %ebp
je 0x2f377
movq %r14, %rdi
callq 0x3040
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_O3/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: load_data_regression
data load_data_regression(char **paths, int n, int m, int k, int min, int max, int size, float angle, float aspect, float hue, float saturation, float exposure)
{
    if(m) paths = get_random_paths(paths, n, m);
    data d = {0};
    d.shallow = 0;
    d.X = load_image_augment_paths(paths, n, min, max, size, angle, aspect, hue, saturation, exposure, 0);
    d.y = load_regression_labels_paths(paths, n, k);
    if(m) free(paths);
    return d;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %r13d
movl %r8d, %r15d
movl %ecx, %ebp
movl %edx, %r12d
movq %rsi, %r14
movq %rdi, %rbx
movl 0x58(%rsp), %r8d
movl 0x50(%rsp), %ecx
testl %ebp, %ebp
je 0x2f40b
movq %r14, %rdi
movl %r12d, %esi
movl %ebp, %edx
movss %xmm4, 0x14(%rsp)
movss %xmm3, 0x10(%rsp)
movss %xmm2, 0xc(%rsp)
movss %xmm1, 0x8(%rsp)
movss %xmm0, 0x4(%rsp)
movl %r8d, %r14d
callq 0x2af92
movl 0x50(%rsp), %ecx
movl %r14d, %r8d
movss 0x4(%rsp), %xmm0
movss 0x8(%rsp), %xmm1
movss 0xc(%rsp), %xmm2
movss 0x10(%rsp), %xmm3
movss 0x14(%rsp), %xmm4
movq %rax, %r14
xorps %xmm5, %xmm5
movups %xmm5, 0x30(%rbx)
movups %xmm5, 0x20(%rbx)
movups %xmm5, 0x10(%rbx)
movups %xmm5, (%rbx)
movq %r14, %rdi
movl %r12d, %esi
movl %r13d, %edx
xorl %r9d, %r9d
callq 0x2b1e0
movq %rax, 0x8(%rbx)
movq %rdx, 0x10(%rbx)
movq %r14, %rdi
movl %r12d, %esi
movl %r15d, %edx
callq 0x2ceee
movq %rax, 0x18(%rbx)
movq %rdx, 0x20(%rbx)
testl %ebp, %ebp
je 0x2f458
movq %r14, %rdi
callq 0x3040
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: load_data_augment
data load_data_augment(char **paths, int n, int m, char **labels, int k, tree *hierarchy, int min, int max, int size, float angle, float aspect, float hue, float saturation, float exposure, int center)
{
    if(m) paths = get_random_paths(paths, n, m);
    data d = {0};
    d.shallow = 0;
    d.w=size;
    d.h=size;
    d.X = load_image_augment_paths(paths, n, min, max, size, angle, aspect, hue, saturation, exposure, center);
    d.y = load_labels_paths(paths, n, labels, k, hierarchy);
    if(m) free(paths);
    return d;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, 0x14(%rsp)
movq %r8, %r12
movl %ecx, %ebp
movl %edx, %r13d
movq %rsi, %r14
movq %rdi, %rbx
movl 0x70(%rsp), %r9d
movl 0x68(%rsp), %r15d
movl 0x60(%rsp), %ecx
movl 0x58(%rsp), %edx
testl %ebp, %ebp
je 0x2f4f9
movq %r14, %rdi
movl %r13d, %esi
movl %ebp, %edx
movss %xmm4, 0x10(%rsp)
movss %xmm3, 0xc(%rsp)
movss %xmm2, 0x8(%rsp)
movss %xmm1, 0x4(%rsp)
movss %xmm0, (%rsp)
movl %r9d, %r14d
callq 0x2af92
movl 0x58(%rsp), %edx
movl 0x60(%rsp), %ecx
movl %r14d, %r9d
movss (%rsp), %xmm0
movss 0x4(%rsp), %xmm1
movss 0x8(%rsp), %xmm2
movss 0xc(%rsp), %xmm3
movss 0x10(%rsp), %xmm4
movq %rax, %r14
xorps %xmm5, %xmm5
movups %xmm5, 0x28(%rbx)
movq $0x0, 0x38(%rbx)
movl %r15d, (%rbx)
movl %r15d, 0x4(%rbx)
movq %r14, %rdi
movl %r13d, %esi
movl %r15d, %r8d
callq 0x2b1e0
movq %rax, 0x8(%rbx)
movq %rdx, 0x10(%rbx)
movq %r14, %rdi
movl %r13d, %esi
movq %r12, %rdx
movl 0x14(%rsp), %ecx
movq 0x50(%rsp), %r8
callq 0x2d0e4
movq %rax, 0x18(%rbx)
movq %rdx, 0x20(%rbx)
testl %ebp, %ebp
je 0x2f550
movq %r14, %rdi
callq 0x3040
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: load_data_super
data load_data_super(char **paths, int n, int m, int w, int h, int scale)
{
    if(m) paths = get_random_paths(paths, n, m);
    data d = {0};
    d.shallow = 0;

    int i;
    d.X.rows = n;
    d.X.vals = calloc(n, sizeof(float*));
    d.X.cols = w*h*3;

    d.y.rows = n;
    d.y.vals = calloc(n, sizeof(float*));
    d.y.cols = w*scale * h*scale * 3;

    for(i = 0; i < n; ++i){
        image im = load_image_color(paths[i], 0, 0);
        image crop = random_crop_image(im, w*scale, h*scale);
        int flip = rand()%2;
        if (flip) flip_image(crop);
        image resize = resize_image(crop, w, h);
        d.X.vals[i] = resize.data;
        d.y.vals[i] = crop.data;
        free_image(im);
    }

    if(m) free(paths);
    return d;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %r9, 0x28(%rsp)
movl %r8d, 0x18(%rsp)
movl %edx, %r15d
movq %rdi, %r12
movl 0xc0(%rsp), %r14d
testl %ecx, %ecx
movl %ecx, 0x34(%rsp)
je 0x2f5a7
movq %rsi, %rdi
movl %r15d, %esi
movl %ecx, %edx
callq 0x2af92
movq %rax, 0x20(%rsp)
jmp 0x2f5ac
movq %rsi, 0x20(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
movups %xmm0, 0x30(%r12)
movups %xmm0, 0x20(%r12)
movups %xmm0, 0x10(%r12)
movl %r15d, 0x8(%r12)
movslq %r15d, %rbx
movl $0x8, %esi
movq %rbx, %rdi
callq 0x3250
movq %rax, %rbp
movq %rax, 0x10(%r12)
movq 0x28(%rsp), %rax
movl %r15d, 0x1c(%rsp)
leal (%rax,%rax,2), %r15d
movl %r15d, %eax
imull 0x18(%rsp), %eax
movl %eax, 0xc(%r12)
movl 0x1c(%rsp), %eax
movl %eax, 0x18(%r12)
movl $0x8, %esi
movq %rbx, %rdi
callq 0x3250
movq %rax, %rbx
movq %rax, 0x20(%r12)
movl %r14d, %r13d
imull 0x18(%rsp), %r13d
imull %r14d, %r15d
imull %r13d, %r15d
movq %r12, 0x38(%rsp)
movl %r15d, 0x1c(%r12)
movl 0x1c(%rsp), %eax
testl %eax, %eax
jle 0x2f70a
imull 0x28(%rsp), %r14d
movl %eax, %r12d
xorl %r15d, %r15d
movq 0x20(%rsp), %rax
movq (%rax,%r15,8), %rsi
leaq 0x58(%rsp), %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x16ac9
movq 0x68(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x58(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x40(%rsp), %rdi
movl %r13d, %esi
movl %r14d, %edx
callq 0x19c2c
callq 0x34e0
testb $0x1, %al
je 0x2f6aa
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x40(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x1786a
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x40(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x70(%rsp), %rdi
movl 0x18(%rsp), %esi
movq 0x28(%rsp), %rdx
callq 0x170fa
movq 0x80(%rsp), %rax
movq %rax, (%rbp,%r15,8)
movq 0x50(%rsp), %rax
movq %rax, (%rbx,%r15,8)
movq 0x68(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x58(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x1657b
incq %r15
cmpq %r15, %r12
jne 0x2f64f
cmpl $0x0, 0x34(%rsp)
je 0x2f71b
movq 0x20(%rsp), %rdi
callq 0x3040
movq 0x38(%rsp), %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: load_data_writing
data load_data_writing(char **paths, int n, int m, int w, int h, int out_w, int out_h)
{
    if(m) paths = get_random_paths(paths, n, m);
    char **replace_paths = find_replace_paths(paths, n, ".png", "-label.png");
    data d = {0};
    d.shallow = 0;
    d.X = load_image_paths(paths, n, w, h);
    d.y = load_image_paths_gray(replace_paths, n, out_w, out_h);
    if(m) free(paths);
    int i;
    for(i = 0; i < n; ++i) free(replace_paths[i]);
    free(replace_paths);
    return d;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, 0x4(%rsp)
movl %r8d, %r13d
movl %ecx, %r15d
movl %edx, %ebp
movq %rsi, %r12
movq %rdi, %rbx
testl %ecx, %ecx
je 0x2f764
movq %r12, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0x2af92
movq %rax, %r12
leaq 0x28013(%rip), %rdx     # 0x5777e
leaq 0x29384(%rip), %rcx     # 0x58af6
movq %r12, %rdi
movl %ebp, %esi
callq 0x2b007
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x30(%rbx)
movq %r12, %rdi
movl %ebp, %esi
movl %r13d, %edx
movl 0x4(%rsp), %ecx
callq 0x2b15a
movq %rax, 0x8(%rbx)
movq %rdx, 0x10(%rbx)
movq %r14, %rdi
movl %ebp, %esi
movl 0x40(%rsp), %edx
movl 0x48(%rsp), %ecx
callq 0x2b083
movq %rax, 0x18(%rbx)
movq %rdx, 0x20(%rbx)
testl %r15d, %r15d
je 0x2f7d1
movq %r12, %rdi
callq 0x3040
testl %ebp, %ebp
jle 0x2f7ec
movl %ebp, %r15d
xorl %r12d, %r12d
movq (%r14,%r12,8), %rdi
callq 0x3040
incq %r12
cmpq %r12, %r15
jne 0x2f7db
movq %r14, %rdi
callq 0x3040
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_O3/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: load_data_tag
data load_data_tag(char **paths, int n, int m, int k, int min, int max, int size, float angle, float aspect, float hue, float saturation, float exposure)
{
    if(m) paths = get_random_paths(paths, n, m);
    data d = {0};
    d.w = size;
    d.h = size;
    d.shallow = 0;
    d.X = load_image_augment_paths(paths, n, min, max, size, angle, aspect, hue, saturation, exposure, 0);
    d.y = load_tags_paths(paths, n, k);
    if(m) free(paths);
    return d;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %r13d
movl %r8d, 0x14(%rsp)
movl %ecx, %ebp
movl %edx, %r12d
movq %rsi, %r14
movq %rdi, %rbx
movl 0x58(%rsp), %r15d
movl 0x50(%rsp), %ecx
testl %ebp, %ebp
je 0x2f884
movq %r14, %rdi
movl %r12d, %esi
movl %ebp, %edx
movss %xmm4, 0x10(%rsp)
movss %xmm3, 0xc(%rsp)
movss %xmm2, 0x8(%rsp)
movss %xmm1, 0x4(%rsp)
movss %xmm0, (%rsp)
movl %ecx, %r14d
callq 0x2af92
movl %r14d, %ecx
movss (%rsp), %xmm0
movss 0x4(%rsp), %xmm1
movss 0x8(%rsp), %xmm2
movss 0xc(%rsp), %xmm3
movss 0x10(%rsp), %xmm4
movq %rax, %r14
xorps %xmm5, %xmm5
movups %xmm5, 0x28(%rbx)
movq $0x0, 0x38(%rbx)
movl %r15d, (%rbx)
movl %r15d, 0x4(%rbx)
movq %r14, %rdi
movl %r12d, %esi
movl %r13d, %edx
movl %r15d, %r8d
xorl %r9d, %r9d
callq 0x2b1e0
movq %rax, 0x8(%rbx)
movq %rdx, 0x10(%rbx)
movq %r14, %rdi
movl %r12d, %esi
movl 0x14(%rsp), %edx
callq 0x2d174
movq %rax, 0x18(%rbx)
movq %rdx, 0x20(%rbx)
testl %ebp, %ebp
je 0x2f8d9
movq %r14, %rdi
callq 0x3040
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: load_data_in_thread
pthread_t load_data_in_thread(load_args args)
{
    pthread_t thread;
    struct load_args *ptr = calloc(1, sizeof(struct load_args));
    *ptr = args;
    if(pthread_create(&thread, 0, load_thread, ptr)) error("Thread creation failed");
    return thread;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl $0x1, %edi
movl $0xa8, %esi
callq 0x3250
movq %rax, %rbx
leaq 0x20(%rsp), %rsi
movl $0xa8, %edx
movq %rax, %rdi
callq 0x32b0
leaq -0xa78(%rip), %rdx      # 0x2eea3
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x3360
testl %eax, %eax
je 0x2f93a
leaq 0x291aa(%rip), %rdi     # 0x58adf
callq 0xf141
movq 0x8(%rsp), %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: concat_datas
data concat_datas(data *d, int n)
{
    int i;
    data out = {0};
    for(i = 0; i < n; ++i){
        data new = concat_data(d[i], out);
        free_data(out);
        out = new;
    }
    return out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
testl %edx, %edx
jle 0x2fd01
movq %rsi, %rax
leaq 0x2c(%rbx), %rcx
movq %rcx, 0x50(%rsp)
movl %edx, %ecx
shlq $0x6, %rcx
movq %rcx, 0x48(%rsp)
xorl %r14d, %r14d
xorl %r15d, %r15d
xorl %r12d, %r12d
xorl %r13d, %r13d
xorl %ebp, %ebp
movq %rsi, 0x58(%rsp)
movq (%rax,%r14), %rcx
movq %rcx, 0x70(%rsp)
movq 0x8(%rax,%r14), %rdi
movq 0x10(%rax,%r14), %rsi
movq 0x18(%rax,%r14), %rcx
movq %rcx, 0x68(%rsp)
movq 0x20(%rax,%r14), %rax
movq %rax, 0x60(%rsp)
movq %rbp, %rdx
movq %r13, %rcx
callq 0x301ac
movq %rax, %rbp
movq %rdx, %r13
movq 0x68(%rsp), %rdi
movq 0x60(%rsp), %rsi
movq %r12, %rdx
movq %r15, %rcx
callq 0x301ac
movq %rax, %r12
movq %rdx, %r15
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups 0x20(%rbx), %xmm2
movups 0x30(%rbx), %xmm3
movups %xmm3, 0x30(%rsp)
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x2d296
xorps %xmm0, %xmm0
movq 0x58(%rsp), %rax
movq 0x70(%rsp), %rcx
movq %rcx, (%rbx)
movq %rbp, 0x8(%rbx)
movq %r13, 0x10(%rbx)
movq %r12, 0x18(%rbx)
movq %r15, 0x20(%rbx)
movl $0x1, 0x28(%rbx)
movq 0x50(%rsp), %rcx
movups %xmm0, (%rcx)
movl $0x0, 0x10(%rcx)
addq $0x40, %r14
cmpq %r14, 0x48(%rsp)
jne 0x2fc42
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: load_data
pthread_t load_data(load_args args)
{
    pthread_t thread;
    struct load_args *ptr = calloc(1, sizeof(struct load_args));
    *ptr = args;
    if(pthread_create(&thread, 0, load_threads, ptr)) error("Thread creation failed");
    return thread;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl $0x1, %edi
movl $0xa8, %esi
callq 0x3250
movq %rax, %rbx
leaq 0x20(%rsp), %rsi
movl $0xa8, %edx
movq %rax, %rdi
callq 0x32b0
leaq -0x42c(%rip), %rdx      # 0x2f945
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x3360
testl %eax, %eax
je 0x2fd90
leaq 0x28d54(%rip), %rdi     # 0x58adf
callq 0xf141
movq 0x8(%rsp), %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: select_data
data select_data(data *orig, int *inds)
{
    data d = {0};
    d.shallow = 1;
    d.w = orig[0].w;
    d.h = orig[0].h;

    d.X.rows = orig[0].X.rows;
    d.y.rows = orig[0].X.rows;

    d.X.cols = orig[0].X.cols;
    d.y.cols = orig[0].y.cols;

    d.X.vals = calloc(orig[0].X.rows, sizeof(float *));
    d.y.vals = calloc(orig[0].y.rows, sizeof(float *));
    int i;
    for(i = 0; i < d.X.rows; ++i){
        d.X.vals[i] = orig[inds[i]].X.vals[i];
        d.y.vals[i] = orig[inds[i]].y.vals[i];
    }
    return d;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
movq $0x0, 0x38(%rdi)
movl $0x1, 0x28(%rdi)
movdqu (%rsi), %xmm0
pshufd $0xee, %xmm0, %xmm1     # xmm1 = xmm0[2,3,2,3]
movd %xmm1, %ebp
movd %xmm1, 0x18(%rdi)
movdqu %xmm0, (%rdi)
movl 0x1c(%rsi), %eax
movl %eax, 0x1c(%rdi)
movslq %ebp, %r13
movl $0x8, %esi
movq %r13, %rdi
callq 0x3250
movq %rax, %r12
movq %rax, 0x10(%r14)
movslq 0x18(%r15), %rdi
movl $0x8, %esi
callq 0x3250
movq %rax, 0x20(%r14)
testl %r13d, %r13d
jle 0x2fe3d
movl %ebp, %ecx
xorl %edx, %edx
movslq (%rbx,%rdx,4), %rsi
shlq $0x6, %rsi
movq 0x10(%r15,%rsi), %rdi
movq (%rdi,%rdx,8), %rdi
movq %rdi, (%r12,%rdx,8)
movq 0x20(%r15,%rsi), %rsi
movq (%rsi,%rdx,8), %rsi
movq %rsi, (%rax,%rdx,8)
incq %rdx
cmpq %rdx, %rcx
jne 0x2fe13
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_O3/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: resize_data
data resize_data(data orig, int w, int h)
{
    data d = {0};
    d.shallow = 0;
    d.w = w;
    d.h = h;
    int i;
    d.X.rows = orig.X.rows;
    d.X.cols = w*h*3;
    d.X.vals = calloc(d.X.rows, sizeof(float*));

    d.y = copy_matrix(orig.y);
#pragma omp parallel for
    for(i = 0; i < orig.X.rows; ++i){
        image im = float_to_image(orig.w, orig.h, 3, orig.X.vals[i]);
        d.X.vals[i] = resize_image(im, w, h).data;
    }
    return d;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
movq $0x0, 0x38(%rdi)
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
movslq 0x98(%rsp), %r15
movl %r15d, 0x8(%rdi)
movl %esi, 0x18(%rsp)
movl %esi, %eax
movl %edx, 0x1c(%rsp)
imull %edx, %eax
leal (%rax,%rax,2), %eax
movl %eax, 0xc(%rdi)
movl $0x8, %esi
movq %r15, %rdi
callq 0x3250
movq %rax, %r12
movq %rax, 0x10(%rbx)
movq 0xa8(%rsp), %rdi
movq 0xb0(%rsp), %rsi
callq 0x31161
movq %rax, 0x18(%rbx)
movq %rbx, 0x20(%rsp)
movq %rdx, 0x20(%rbx)
testq %r15, %r15
jle 0x30198
leaq 0x90(%rsp), %rax
movl (%rax), %r13d
movl 0x4(%rax), %r14d
movq 0x10(%rax), %rbx
xorl %ebp, %ebp
movq (%rbx,%rbp,8), %r8
leaq 0x28(%rsp), %rdi
movl %r13d, %esi
movl %r14d, %edx
movl $0x3, %ecx
callq 0x170ea
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x28(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x40(%rsp), %rdi
movl 0x18(%rsp), %esi
movl 0x1c(%rsp), %edx
callq 0x170fa
movq 0x50(%rsp), %rax
movq %rax, (%r12,%rbp,8)
incq %rbp
cmpq %rbp, %r15
jne 0x30149
movq 0x20(%rsp), %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: concat_matrix
matrix concat_matrix(matrix m1, matrix m2)
{
    int i, count = 0;
    matrix m;
    m.cols = m1.cols;
    m.rows = m1.rows+m2.rows;
    m.vals = calloc(m1.rows + m2.rows, sizeof(float*));
    for(i = 0; i < m1.rows; ++i){
        m.vals[count++] = m1.vals[i];
    }
    for(i = 0; i < m2.rows; ++i){
        m.vals[count++] = m2.vals[i];
    }
    return m;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, (%rsp)
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %rbx
movabsq $0x3fffffff8, %rbp      # imm = 0x3FFFFFFF8
leal (%rdx,%rdi), %r14d
movslq %r14d, %rdi
movl $0x8, %esi
callq 0x3250
movq %rax, %r12
testl %ebx, %ebx
jle 0x30207
movq %rbp, %rax
leaq (,%rbx,8), %rbp
movq %r13, %rsi
movq %rax, %r13
andq %rax, %rbp
movq %r12, %rdi
movq %rbp, %rdx
callq 0x32b0
jmp 0x3020c
movq %rbp, %r13
xorl %ebp, %ebp
testl %r15d, %r15d
jle 0x3022a
movq %r12, %rdi
addq %rbp, %rdi
shlq $0x3, %r15
andq %r13, %r15
movq (%rsp), %rsi
movq %r15, %rdx
callq 0x32b0
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
andq %rax, %rbx
movl %r14d, %eax
orq %rbx, %rax
movq %r12, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: concat_data
data concat_data(data d1, data d2)
{
    data d = {0};
    d.shallow = 1;
    d.X = concat_matrix(d1.X, d2.X);
    d.y = concat_matrix(d1.y, d2.y);
    d.w = d1.w;
    d.h = d1.h;
    return d;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
movq $0x0, 0x38(%rdi)
movl $0x1, 0x28(%rdi)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq 0x60(%rsp), %rcx
callq 0x301ac
movq %rax, 0x8(%rbx)
movq %rdx, 0x10(%rbx)
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x68(%rsp), %rdx
movq 0x70(%rsp), %rcx
callq 0x301ac
movq %rax, 0x18(%rbx)
movq %rdx, 0x20(%rbx)
movq 0x10(%rsp), %rax
movq %rax, (%rbx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: load_categorical_data_csv
data load_categorical_data_csv(char *filename, int target, int k)
{
    data d = {0};
    d.shallow = 0;
    matrix X = csv_to_matrix(filename);
    float *truth_1d = pop_column(&X, target);
    float **truth = one_hot_encode(truth_1d, X.rows, k);
    matrix y;
    y.rows = X.rows;
    y.cols = k;
    y.vals = truth;
    d.X = X;
    d.y = y;
    free(truth_1d);
    return d;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebp
movl %edx, %r14d
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq %rsi, %rdi
callq 0x31352
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
movq %rdx, 0x8(%r15)
movq %r15, %rdi
movl %r14d, %esi
callq 0x312dc
movq %rax, %r14
movl (%r15), %esi
movq %rax, %rdi
movl %ebp, %edx
callq 0xfce2
movl (%r15), %ecx
movups (%r15), %xmm0
movups %xmm0, 0x8(%rbx)
movl %ecx, 0x18(%rbx)
movl %ebp, 0x1c(%rbx)
movq %rax, 0x20(%rbx)
movq %r14, %rdi
callq 0x3040
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: load_cifar10_data
data load_cifar10_data(char *filename)
{
    data d = {0};
    d.shallow = 0;
    long i,j;
    matrix X = make_matrix(10000, 3072);
    matrix y = make_matrix(10000, 10);
    d.X = X;
    d.y = y;

    FILE *fp = fopen(filename, "rb");
    if(!fp) file_error(filename);
    for(i = 0; i < 10000; ++i){
        unsigned char bytes[3073];
        fread(bytes, 1, 3073, fp);
        int class = bytes[0];
        y.vals[i][class] = 1;
        for(j = 0; j < X.cols; ++j){
            X.vals[i][j] = (double)bytes[j+1];
        }
    }
    scale_data_rows(d, 1./255);
    //normalize_data_rows(d);
    fclose(fp);
    return d;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc28, %rsp            # imm = 0xC28
movq %rsi, %rbx
movq %rdi, %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movl $0x2710, %edi           # imm = 0x2710
movl $0xc00, %esi            # imm = 0xC00
callq 0x311ee
movq %rax, %r13
movq %rdx, %r15
movl $0x2710, %edi           # imm = 0x2710
movl $0xa, %esi
callq 0x311ee
movq %rdx, %rbp
movq %r13, 0x8(%r14)
movq %r15, 0x10(%r14)
movq %rax, 0x18(%r14)
movq %r14, 0x18(%rsp)
movq %rdx, 0x20(%r14)
leaq 0x24d36(%rip), %rsi     # 0x550d8
movq %rbx, %rdi
callq 0x3390
movq %rax, %r12
movq %r13, %rax
shrq $0x20, %rax
movq %rax, 0x8(%rsp)
testq %r12, %r12
jne 0x303c6
movq %rbx, %rdi
callq 0xe925
movq %r13, 0x10(%rsp)
movq %r13, %r14
sarq $0x20, %r14
xorl %r13d, %r13d
leaq 0x20(%rsp), %rbx
movl $0x1, %esi
movl $0xc01, %edx            # imm = 0xC01
movq %rbx, %rdi
movq %r12, %rcx
callq 0x30d0
movzbl 0x20(%rsp), %eax
movq (%rbp,%r13,8), %rcx
movl $0x3f800000, (%rcx,%rax,4) # imm = 0x3F800000
testq %r14, %r14
jle 0x30428
movq (%r15,%r13,8), %rax
xorl %ecx, %ecx
movzbl 0x21(%rsp,%rcx), %edx
xorps %xmm0, %xmm0
cvtsi2ss %edx, %xmm0
movss %xmm0, (%rax,%rcx,4)
leaq 0x1(%rcx), %rdx
movq %rdx, %rcx
cmpq %rdx, %r14
jne 0x3040b
incq %r13
cmpq $0x2710, %r13           # imm = 0x2710
jne 0x303da
movq 0x10(%rsp), %r14
testl %r14d, %r14d
movq 0x8(%rsp), %r13
jle 0x30468
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
xorl %ebx, %ebx
movq (%r15,%rbx,8), %rdi
movl %r13d, %esi
movss 0x2854d(%rip), %xmm0    # 0x589a8
callq 0xf95e
incq %rbx
cmpq %rbx, %r14
jne 0x3044c
movq %r12, %rdi
callq 0x3130
movq 0x18(%rsp), %rax
addq $0xc28, %rsp            # imm = 0xC28
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: get_random_batch
void get_random_batch(data d, int n, float *X, float *y)
{
    int j;
    for(j = 0; j < n; ++j){
        int index = rand()%d.X.rows;
        memcpy(X+j*d.X.cols, d.X.vals[index], d.X.cols*sizeof(float));
        memcpy(y+j*d.y.cols, d.y.vals[index], d.y.cols*sizeof(float));
    }
}

// Assembly:
testl %edi, %edi
jle 0x3056e
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x50(%rsp), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x4(%rsp)
movslq 0xc(%rax), %r15
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
shlq $0x2, %r15
movslq 0x1c(%rax), %r12
movq 0x20(%rax), %rax
movq %rax, 0x8(%rsp)
shlq $0x2, %r12
movl %edi, %r13d
callq 0x34e0
cltd
idivl 0x4(%rsp)
movslq %edx, %rbp
movq 0x10(%rsp), %rax
movq (%rax,%rbp,8), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x32b0
movq 0x8(%rsp), %rax
movq (%rax,%rbp,8), %rsi
movq %rbx, %rdi
movq %r12, %rdx
callq 0x32b0
addq %r12, %rbx
addq %r15, %r14
decq %r13
jne 0x30520
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: get_next_batch
void get_next_batch(data d, int n, int offset, float *X, float *y)
{
    int j;
    for(j = 0; j < n; ++j){
        int index = offset + j;
        memcpy(X+j*d.X.cols, d.X.vals[index], d.X.cols*sizeof(float));
        if(y) memcpy(y+j*d.y.cols, d.y.vals[index], d.y.cols*sizeof(float));
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, (%rsp)
testl %edi, %edi
jle 0x305fb
movq %rdx, %r14
leaq 0x50(%rsp), %rax
movslq 0xc(%rax), %r15
shlq $0x2, %r15
movslq 0x1c(%rax), %r12
shlq $0x2, %r12
movslq %esi, %rcx
movl %edi, %edx
movq %rdx, 0x10(%rsp)
shlq $0x3, %rcx
movq 0x10(%rax), %rbx
addq %rcx, %rbx
addq 0x20(%rax), %rcx
movq %rcx, 0x8(%rsp)
xorl %ebp, %ebp
movq (%rsp), %r13
movq (%rbx,%rbp,8), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x32b0
cmpq $0x0, (%rsp)
je 0x305eb
movq 0x8(%rsp), %rax
movq (%rax,%rbp,8), %rsi
movq %r13, %rdi
movq %r12, %rdx
callq 0x32b0
incq %rbp
addq %r12, %r13
addq %r15, %r14
cmpq %rbp, 0x10(%rsp)
jne 0x305c1
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/SimpleDoger[P]Darknet_CPU_Only/data.c
// Function: smooth_data
void smooth_data(data d)
{
    int i, j;
    float scale = 1. / d.y.cols;
    float eps = .1;
    for(i = 0; i < d.y.rows; ++i){
        for(j = 0; j < d.y.cols; ++j){
            d.y.vals[i][j] = eps * scale + (1-eps) * d.y.vals[i][j];
        }
    }
}

// Assembly:
movslq 0x20(%rsp), %rax
testq %rax, %rax
jle 0x30678
leaq 0x8(%rsp), %rdx
movl 0x1c(%rdx), %ecx
cvtsi2sd %ecx, %xmm0
movsd 0x24b28(%rip), %xmm1    # 0x55150
divsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
movq 0x20(%rdx), %rdx
xorl %esi, %esi
movss 0x2836b(%rip), %xmm1    # 0x589ac
mulss 0x24c4f(%rip), %xmm0    # 0x55298
testl %ecx, %ecx
jle 0x30670
movq (%rdx,%rsi,8), %rdi
xorl %r8d, %r8d
movss (%rdi,%r8,4), %xmm2
mulss %xmm1, %xmm2
addss %xmm0, %xmm2
movss %xmm2, (%rdi,%r8,4)
incq %r8
cmpq %r8, %rcx
jne 0x30654
incq %rsi
cmpq %rax, %rsi
jne 0x30649
retq
// File: /workspace/github_c_makefile_star2_O3/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
movslq 0x38(%rsp), %rbx
cmpq $0x2, %rbx
jl 0x30ad7
leaq 0x30(%rsp), %rax
movq 0x10(%rax), %r14
movq 0x20(%rax), %r15
leaq -0x1(%rbx), %r12
callq 0x34e0
cltd
idivl %r12d
movslq %edx, %rax
movq (%r14,%rax,8), %rcx
movq -0x8(%r14,%rbx,8), %rdx
movq %rdx, (%r14,%rax,8)
movq %rcx, -0x8(%r14,%rbx,8)
movq (%r15,%rax,8), %rcx
movq -0x8(%r15,%rbx,8), %rdx
movq %rdx, (%r15,%rax,8)
movq %rcx, -0x8(%r15,%rbx,8)
cmpq $0x2, %rbx
movq %r12, %rbx
ja 0x30a9a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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
movq $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 0x31161
movq %rax, 0x8(%rbx)
movq %rdx, 0x10(%rbx)
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x31161
movq %rax, 0x18(%rbx)
movq %rdx, 0x20(%rbx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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, 0x10(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdi, %rbx
movslq %r8d, %rdi
movl $0x4, %esi
callq 0x3250
movq %rax, %r15
testl %ebx, %ebx
jle 0x30fd6
movq %rbx, %r13
shrq $0x20, %r13
movq %rbx, 0x18(%rsp)
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
movl %ebp, %r12d
xorl %r14d, %r14d
movl $0x0, 0xc(%rsp)
movq 0x10(%rsp), %rax
movq (%rax,%r14,8), %rdi
movl %r13d, %esi
movl %ebp, %edx
movq %r15, %rcx
callq 0xf0cd
testl %ebp, %ebp
jle 0x30fb8
movq 0x20(%rsp), %rax
movq (%rax,%r14,8), %rax
xorl %ecx, %ecx
xorps %xmm1, %xmm1
movslq (%r15,%rcx,4), %rdx
movss (%rax,%rdx,4), %xmm0
ucomiss %xmm1, %xmm0
jne 0x30fb4
jp 0x30fb4
incq %rcx
cmpq %rcx, %r12
jne 0x30f9a
jmp 0x30fb8
incl 0xc(%rsp)
incq %r14
cmpq %rbx, %r14
jne 0x30f72
xorps %xmm0, %xmm0
cvtsi2ssl 0xc(%rsp), %xmm0
movss %xmm0, 0x10(%rsp)
movq 0x18(%rsp), %rbx
jmp 0x30fdf
xorps %xmm0, %xmm0
movss %xmm0, 0x10(%rsp)
movq %r15, %rdi
callq 0x3040
xorps %xmm1, %xmm1
cvtsi2ss %ebx, %xmm1
movss 0x10(%rsp), %xmm0
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_O3/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:
testl %edi, %edi
jle 0x31045
movq %rdi, %rax
shrq $0x20, %rax
andl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
xorl %ecx, %ecx
testl %eax, %eax
jle 0x3103d
movq (%rsi,%rcx,8), %rdx
xorl %r8d, %r8d
movss (%rdx,%r8,4), %xmm1
mulss %xmm0, %xmm1
movss %xmm1, (%rdx,%r8,4)
incq %r8
cmpq %r8, %rax
jne 0x31025
incq %rcx
cmpq %rdi, %rcx
jne 0x3101a
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x310da
movl %edx, %ebp
jge 0x3109a
movslq %ebp, %r12
leaq (,%r12,8), %rsi
movq %r14, %rdi
callq 0x3350
movq %rax, %r14
movq %rbx, %r15
sarq $0x20, %r15
movslq %ebx, %r13
movl $0x4, %esi
movq %r15, %rdi
callq 0x3250
movq %rax, (%r14,%r13,8)
incq %r13
cmpq %r13, %r12
jne 0x3107f
jmp 0x310c8
jle 0x310c8
movslq %ebp, %r15
movslq %ebx, %r12
movq %r15, %r13
movq (%r14,%r13,8), %rdi
callq 0x3040
incq %r13
cmpq %r13, %r12
jne 0x310a5
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_O3/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 0x31142
movq %rdi, %rax
shrq $0x20, %rax
shrq $0x20, %rdx
cmpl %edx, %eax
jne 0x31142
testl %edi, %edi
jle 0x31140
andl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
xorl %edx, %edx
testl %eax, %eax
jle 0x31138
movq (%rsi,%rdx,8), %r8
movq (%rcx,%rdx,8), %r9
xorl %r10d, %r10d
movss (%r8,%r10,4), %xmm0
addss (%r9,%r10,4), %xmm0
movss %xmm0, (%r9,%r10,4)
incq %r10
cmpq %r10, %rax
jne 0x3111e
incq %rdx
cmpq %rdi, %rdx
jne 0x3110f
popq %rax
retq
leaq 0x279ea(%rip), %rdi     # 0x58b33
leaq 0x27a10(%rip), %rsi     # 0x58b60
leaq 0x27a12(%rip), %rcx     # 0x58b69
movl $0x44, %edx
callq 0x31b0
// File: /workspace/github_c_makefile_star2_O3/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
pushq %rax
movq %rsi, %r14
movq %rdi, (%rsp)
movslq %edi, %r12
movl $0x8, %esi
movq %r12, %rdi
callq 0x3250
movq %rax, %r15
testl %r12d, %r12d
jle 0x311d8
movq (%rsp), %rbp
movq %rbp, %r12
shrq $0x20, %r12
movq %rbp, %r13
sarq $0x20, %r13
andl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
xorl %ebx, %ebx
movl $0x4, %esi
movq %r13, %rdi
callq 0x3250
movq %rax, (%r15,%rbx,8)
movq (%r14,%rbx,8), %rsi
movl %r12d, %edi
movl $0x1, %edx
movq %rax, %rcx
movl $0x1, %r8d
callq 0x29fe0
incq %rbx
cmpq %rbx, %rbp
jne 0x311a5
movq (%rsp), %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_O3/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
pushq %rax
movl %esi, %ebx
movl %edi, %ebp
movslq %edi, %r15
movl $0x8, %esi
movq %r15, %rdi
callq 0x3250
movq %rax, %r14
testl %r15d, %r15d
jle 0x31239
movslq %ebx, %r15
movl %ebp, %r12d
xorl %r13d, %r13d
movl $0x4, %esi
movq %r15, %rdi
callq 0x3250
movq %rax, (%r14,%r13,8)
incq %r13
cmpq %r13, %r12
jne 0x3121e
jmp 0x3123c
movl %ebp, %r12d
shlq $0x20, %rbx
orq %r12, %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_O3/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, %ebp
movq %rdi, %r15
movl 0x4(%rdi), %ebx
movslq %esi, %r12
movl $0x8, %esi
movq %r12, %rdi
callq 0x3250
movq %rax, %r14
testl %r12d, %r12d
jle 0x312bd
movl %ebp, %r12d
xorl %r13d, %r13d
callq 0x34e0
movslq (%r15), %rcx
cltd
idivl %ecx
movq 0x8(%r15), %rax
movslq %edx, %rdx
movq (%rax,%rdx,8), %rsi
movq %rsi, (%r14,%r13,8)
leaq -0x1(%rcx), %rsi
movl %esi, (%r15)
movq -0x8(%rax,%rcx,8), %rcx
movq %rcx, (%rax,%rdx,8)
incq %r13
cmpq %r13, %r12
jne 0x31289
jmp 0x312c0
movl %ebp, %r12d
shlq $0x20, %rbx
orq %r12, %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_O3/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
movl $0x4, %esi
movq %r14, %rdi
callq 0x3250
testq %r14, %r14
jle 0x31345
movq 0x8(%rbx), %rdx
movslq %ebp, %rsi
movslq 0x4(%rbx), %rdi
leal -0x1(%rdi), %ecx
leaq 0x1(%rsi), %r8
xorl %r9d, %r9d
movq (%rdx,%r9,8), %r10
movss (%r10,%rsi,4), %xmm0
movss %xmm0, (%rax,%r9,4)
cmpl %esi, %ecx
jle 0x3133b
movq %r8, %r11
movss (%r10,%r11,4), %xmm0
movss %xmm0, -0x4(%r10,%r11,4)
incq %r11
cmpq %r11, %rdi
jne 0x31326
incq %r9
cmpq %r14, %r9
jne 0x3130f
jmp 0x3134a
movl 0x4(%rbx), %ecx
decl %ecx
movl %ecx, 0x4(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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, %rbx
leaq 0x29ac2(%rip), %rsi     # 0x5ae29
callq 0x3390
movq %rax, %r14
testq %rax, %rax
jne 0x3137c
movq %rbx, %rdi
callq 0xe925
movl $0x400, %edi            # imm = 0x400
movl $0x8, %esi
callq 0x3250
movq %rax, %rbx
movq %r14, %rdi
callq 0xe948
testq %rax, %rax
je 0x3140b
movq %rax, %r12
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movl $0x400, %ebp            # imm = 0x400
xorl %r13d, %r13d
cmpl $-0x1, %r15d
jne 0x313bd
movq %r12, %rdi
callq 0xf4ff
movl %eax, %r15d
movl %ebp, %eax
cmpq %rax, %r13
jne 0x313d8
addl %ebp, %ebp
movslq %ebp, %rsi
shlq $0x3, %rsi
movq %rbx, %rdi
callq 0x3350
movq %rax, %rbx
movq %r12, %rdi
movl %r15d, %esi
callq 0xf517
movq %rax, (%rbx,%r13,8)
movq %r12, %rdi
callq 0x3040
incq %r13
movq %r14, %rdi
callq 0xe948
movq %rax, %r12
testq %rax, %rax
jne 0x313ac
movl %r13d, %r14d
shlq $0x20, %r15
jmp 0x31418
movabsq $-0x100000000, %r15     # imm = 0xFFFFFFFF00000000
xorl %r14d, %r14d
leaq (,%r14,8), %rsi
movq %rbx, %rdi
callq 0x3350
movq %rax, %rdx
orq %r14, %r15
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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, %r14
testl %r14d, %r14d
jle 0x314b4
movq %rsi, %rbx
movq %r14, %r12
shrq $0x20, %r12
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
xorl %r13d, %r13d
leaq 0x27722(%rip), %r15     # 0x58b90
testl %r12d, %r12d
jle 0x314a2
xorl %ebp, %ebp
testq %rbp, %rbp
je 0x31484
movl $0x2c, %edi
callq 0x3060
movq (%rbx,%r13,8), %rax
xorps %xmm0, %xmm0
cvtss2sd (%rax,%rbp,4), %xmm0
movq %r15, %rdi
movb $0x1, %al
callq 0x3160
incq %rbp
cmpq %rbp, %r12
jne 0x31475
movl $0xa, %edi
callq 0x3060
incq %r13
cmpq %r14, %r13
jne 0x3146e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq