LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/gemm.c
// Function: gemm_cpu
void gemm_cpu(int TA, int TB, int M, int N, int K, float ALPHA, 
        float *A, int lda, 
        float *B, int ldb,
        float BETA,
        float *C, int ldc)
{
    //printf("cpu: %d %d %d %d %d %f %d %d %f %d\n",TA, TB, M, N, K, ALPHA, lda, ldb, BETA, ldc);
    int i, j;
    for(i = 0; i < M; ++i){
        for(j = 0; j < N; ++j){
            C[i*ldc + j] *= BETA;
        }
    }
    if(!TA && !TB)
        gemm_nn(M, N, K, ALPHA,A,lda, B, ldb,C,ldc);
    else if(TA && !TB)
        gemm_tn(M, N, K, ALPHA,A,lda, B, ldb,C,ldc);
    else if(!TA && TB)
        gemm_nt(M, N, K, ALPHA,A,lda, B, ldb,C,ldc);
    else
        gemm_tt(M, N, K, ALPHA,A,lda, B, ldb,C,ldc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl 0x30(%rbp), %eax
movq 0x28(%rbp), %rax
movl 0x20(%rbp), %eax
movq 0x18(%rbp), %rax
movl 0x10(%rbp), %eax
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl %ecx, -0x10(%rbp)
movl %r8d, -0x14(%rbp)
movss %xmm0, -0x18(%rbp)
movq %r9, -0x20(%rbp)
movss %xmm1, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x398d
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x3980
movss -0x24(%rbp), %xmm0
movq 0x28(%rbp), %rax
movl -0x28(%rbp), %ecx
imull 0x30(%rbp), %ecx
addl -0x2c(%rbp), %ecx
movslq %ecx, %rcx
mulss (%rax,%rcx,4), %xmm0
movss %xmm0, (%rax,%rcx,4)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x394d
jmp 0x3982
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x393e
cmpl $0x0, -0x4(%rbp)
jne 0x39d5
cmpl $0x0, -0x8(%rbp)
jne 0x39d5
movl -0xc(%rbp), %edi
movl -0x10(%rbp), %esi
movl -0x14(%rbp), %edx
movss -0x18(%rbp), %xmm0
movq -0x20(%rbp), %rcx
movl 0x10(%rbp), %r8d
movq 0x18(%rbp), %r9
movl 0x20(%rbp), %r11d
movq 0x28(%rbp), %r10
movl 0x30(%rbp), %eax
movl %r11d, (%rsp)
movq %r10, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0x3b30
jmp 0x3a9a
cmpl $0x0, -0x4(%rbp)
je 0x3a1a
cmpl $0x0, -0x8(%rbp)
jne 0x3a1a
movl -0xc(%rbp), %edi
movl -0x10(%rbp), %esi
movl -0x14(%rbp), %edx
movss -0x18(%rbp), %xmm0
movq -0x20(%rbp), %rcx
movl 0x10(%rbp), %r8d
movq 0x18(%rbp), %r9
movl 0x20(%rbp), %r11d
movq 0x28(%rbp), %r10
movl 0x30(%rbp), %eax
movl %r11d, (%rsp)
movq %r10, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0x3d20
jmp 0x3a98
cmpl $0x0, -0x4(%rbp)
jne 0x3a5f
cmpl $0x0, -0x8(%rbp)
je 0x3a5f
movl -0xc(%rbp), %edi
movl -0x10(%rbp), %esi
movl -0x14(%rbp), %edx
movss -0x18(%rbp), %xmm0
movq -0x20(%rbp), %rcx
movl 0x10(%rbp), %r8d
movq 0x18(%rbp), %r9
movl 0x20(%rbp), %r11d
movq 0x28(%rbp), %r10
movl 0x30(%rbp), %eax
movl %r11d, (%rsp)
movq %r10, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0x3c20
jmp 0x3a96
movl -0xc(%rbp), %edi
movl -0x10(%rbp), %esi
movl -0x14(%rbp), %edx
movss -0x18(%rbp), %xmm0
movq -0x20(%rbp), %rcx
movl 0x10(%rbp), %r8d
movq 0x18(%rbp), %r9
movl 0x20(%rbp), %r11d
movq 0x28(%rbp), %r10
movl 0x30(%rbp), %eax
movl %r11d, (%rsp)
movq %r10, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0x3e10
jmp 0x3a98
jmp 0x3a9a
addq $0x50, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/gemm.c
// Function: gemm_nn
void gemm_nn(int M, int N, int K, float ALPHA, 
        float *A, int lda, 
        float *B, int ldb,
        float *C, int ldc)
{
    int i,j,k;
    #pragma omp parallel for
    for(i = 0; i < M; ++i){
        for(k = 0; k < K; ++k){
            register float A_PART = ALPHA*A[i*lda+k];
            for(j = 0; j < N; ++j){
                C[i*ldc+j] += A_PART*B[k*ldb+j];
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x20(%rbp), %eax
movq 0x18(%rbp), %rax
movl 0x10(%rbp), %eax
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movss %xmm0, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movq %r9, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x3c16
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x3c06
movss -0x10(%rbp), %xmm0
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
imull -0x1c(%rbp), %ecx
addl -0x34(%rbp), %ecx
movslq %ecx, %rcx
mulss (%rax,%rcx,4), %xmm0
movss %xmm0, -0x38(%rbp)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x3bf6
movss -0x38(%rbp), %xmm0
movq -0x28(%rbp), %rax
movl -0x34(%rbp), %ecx
imull 0x10(%rbp), %ecx
addl -0x30(%rbp), %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm2
movq 0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
imull 0x20(%rbp), %ecx
addl -0x30(%rbp), %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, (%rax,%rcx,4)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x3ba5
jmp 0x3bf8
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x3b72
jmp 0x3c08
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x3b5f
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/gemm.c
// Function: gemm_nt
void gemm_nt(int M, int N, int K, float ALPHA, 
        float *A, int lda, 
        float *B, int ldb,
        float *C, int ldc)
{
    int i,j,k;
    #pragma omp parallel for
    for(i = 0; i < M; ++i){
        for(j = 0; j < N; ++j){
            register float sum = 0;
            for(k = 0; k < K; ++k){
                sum += ALPHA*A[i*lda+k]*B[j*ldb + k];
            }
            C[i*ldc+j] += sum;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x20(%rbp), %eax
movq 0x18(%rbp), %rax
movl 0x10(%rbp), %eax
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movss %xmm0, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movq %r9, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x3d11
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x3d01
xorps %xmm0, %xmm0
movss %xmm0, -0x38(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x3cd3
movss -0x10(%rbp), %xmm0
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
imull -0x1c(%rbp), %ecx
addl -0x34(%rbp), %ecx
movslq %ecx, %rcx
mulss (%rax,%rcx,4), %xmm0
movq -0x28(%rbp), %rax
movl -0x30(%rbp), %ecx
imull 0x10(%rbp), %ecx
addl -0x34(%rbp), %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm2
movss -0x38(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x38(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x3c7d
movss -0x38(%rbp), %xmm0
movq 0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
imull 0x20(%rbp), %ecx
addl -0x30(%rbp), %ecx
movslq %ecx, %rcx
addss (%rax,%rcx,4), %xmm0
movss %xmm0, (%rax,%rcx,4)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x3c62
jmp 0x3d03
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x3c4f
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/gemm.c
// Function: gemm_tt
void gemm_tt(int M, int N, int K, float ALPHA, 
        float *A, int lda, 
        float *B, int ldb,
        float *C, int ldc)
{
    int i,j,k;
    #pragma omp parallel for
    for(i = 0; i < M; ++i){
        for(j = 0; j < N; ++j){
            register float sum = 0;
            for(k = 0; k < K; ++k){
                sum += ALPHA*A[i+k*lda]*B[k+j*ldb];
            }
            C[i*ldc+j] += sum;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x20(%rbp), %eax
movq 0x18(%rbp), %rax
movl 0x10(%rbp), %eax
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movss %xmm0, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movq %r9, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x3f05
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x3ef5
xorps %xmm0, %xmm0
movss %xmm0, -0x38(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x3ec7
movss -0x10(%rbp), %xmm0
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
movl -0x34(%rbp), %edx
imull -0x1c(%rbp), %edx
addl %edx, %ecx
movslq %ecx, %rcx
mulss (%rax,%rcx,4), %xmm0
movq -0x28(%rbp), %rax
movl -0x34(%rbp), %ecx
movl -0x30(%rbp), %edx
imull 0x10(%rbp), %edx
addl %edx, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm2
movss -0x38(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x38(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x3e6d
movss -0x38(%rbp), %xmm0
movq 0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
imull 0x20(%rbp), %ecx
addl -0x30(%rbp), %ecx
movslq %ecx, %rcx
addss (%rax,%rcx,4), %xmm0
movss %xmm0, (%rax,%rcx,4)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x3e52
jmp 0x3ef7
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x3e3f
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: read_intlist
int *read_intlist(char *gpu_list, int *ngpus, int d)
{
    int *gpus = 0;
    if(gpu_list){
        int len = strlen(gpu_list);
        *ngpus = 1;
        int i;
        for(i = 0; i < len; ++i){
            if (gpu_list[i] == ',') ++*ngpus;
        }
        gpus = calloc(*ngpus, sizeof(int));
        for(i = 0; i < *ngpus; ++i){
            gpus[i] = atoi(gpu_list);
            gpu_list = strchr(gpu_list, ',')+1;
        }
    } else {
        gpus = calloc(1, sizeof(float));
        *gpus = d;
        *ngpus = 1;
    }
    return gpus;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq $0x0, -0x20(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x4034
movq -0x8(%rbp), %rdi
callq 0x3110
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movl $0x1, (%rax)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x3fd4
movq -0x8(%rbp), %rax
movslq -0x28(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2c, %eax
jne 0x3fc7
movq -0x10(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x3fc9
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x3fa3
movq -0x10(%rbp), %rax
movslq (%rax), %rdi
movl $0x4, %esi
callq 0x3220
movq %rax, -0x20(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x4032
movq -0x8(%rbp), %rdi
callq 0x33d0
movl %eax, %edx
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x8(%rbp), %rdi
movl $0x2c, %esi
callq 0x3120
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x3ff0
jmp 0x405a
movl $0x1, %edi
movl $0x4, %esi
callq 0x3220
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movl $0x1, (%rax)
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: read_map
int *read_map(char *filename)
{
    int n = 0;
    int *map = 0;
    char *str;
    FILE *file = fopen(filename, "r");
    if(!file) file_error(filename);
    while((str=fgetl(file))){
        ++n;
        map = realloc(map, n*sizeof(int));
        map[n-1] = atoi(str);
    }
    return map;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x724d7(%rip), %rsi     # 0x7656d
callq 0x3360
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x40af
movq -0x8(%rbp), %rdi
callq 0x4110
jmp 0x40b1
movq -0x28(%rbp), %rdi
callq 0x4140
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x40ff
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movq -0x18(%rbp), %rdi
movslq -0xc(%rbp), %rsi
shlq $0x2, %rsi
callq 0x3310
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rdi
callq 0x33d0
movl %eax, %edx
movq -0x18(%rbp), %rax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x40b1
movq -0x18(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: fgetl
char *fgetl(FILE *fp)
{
    if(feof(fp)) return 0;
    size_t size = 512;
    char *line = malloc(size*sizeof(char));
    if(!fgets(line, size, fp)){
        free(line);
        return 0;
    }

    size_t curr = strlen(line);

    while((line[curr-1] != '\n') && !feof(fp)){
        if(curr == size-1){
            size *= 2;
            line = realloc(line, size*sizeof(char));
            if(!line) {
                printf("%ld\n", size);
                malloc_error();
            }
        }
        size_t readsize = size-curr;
        if(readsize > INT_MAX) readsize = INT_MAX-1;
        fgets(&line[curr], readsize, fp);
        curr = strlen(line);
    }
    if(line[curr-1] == '\n') line[curr-1] = '\0';

    return line;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3260
cmpl $0x0, %eax
je 0x4167
movq $0x0, -0x8(%rbp)
jmp 0x42bb
movq $0x200, -0x18(%rbp)     # imm = 0x200
movq -0x18(%rbp), %rdi
shlq $0x0, %rdi
callq 0x32d0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movl %eax, %esi
movq -0x10(%rbp), %rdx
callq 0x3200
cmpq $0x0, %rax
jne 0x41af
movq -0x20(%rbp), %rdi
callq 0x3030
movq $0x0, -0x8(%rbp)
jmp 0x42bb
movq -0x20(%rbp), %rdi
callq 0x3110
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
subq $0x1, %rcx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0xa, %ecx
movb %al, -0x31(%rbp)
je 0x41ea
movq -0x10(%rbp), %rdi
callq 0x3260
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x41f6
jmp 0x428e
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jne 0x4247
movq -0x18(%rbp), %rax
shlq %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
shlq $0x0, %rsi
callq 0x3310
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x4245
movq -0x18(%rbp), %rsi
leaq 0x72a4f(%rip), %rdi     # 0x76c88
movb $0x0, %al
callq 0x3130
callq 0x4d20
jmp 0x4247
movq -0x18(%rbp), %rax
subq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x7fffffff, -0x30(%rbp) # imm = 0x7FFFFFFF
jbe 0x4265
movq $0x7ffffffe, -0x30(%rbp) # imm = 0x7FFFFFFE
movq -0x20(%rbp), %rdi
addq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rax
movl %eax, %esi
movq -0x10(%rbp), %rdx
callq 0x3200
movq -0x20(%rbp), %rdi
callq 0x3110
movq %rax, -0x28(%rbp)
jmp 0x41bc
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
subq $0x1, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
jne 0x42b3
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
subq $0x1, %rcx
movb $0x0, (%rax,%rcx)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: sorta_shuffle
void sorta_shuffle(void *arr, size_t n, size_t size, size_t sections)
{
    size_t i;
    for(i = 0; i < sections; ++i){
        size_t start = n*i/sections;
        size_t end = n*(i+1)/sections;
        size_t num = end-start;
        shuffle(arr+(start*size), num, size);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x4362
movq -0x10(%rbp), %rax
imulq -0x28(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x20(%rbp)
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
addq $0x1, %rcx
imulq %rcx, %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x20(%rbp)
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
subq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rax
imulq -0x18(%rbp), %rax
addq %rax, %rdi
movq -0x40(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x4370
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x42f0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: shuffle
void shuffle(void *arr, size_t n, size_t size)
{
    size_t i;
    void *swp = calloc(1, size);
    for(i = 0; i < n-1; ++i){
        size_t j = i + rand()/(RAND_MAX / (n-i)+1);
        memcpy(swp,          arr+(j*size), size);
        memcpy(arr+(j*size), arr+(i*size), size);
        memcpy(arr+(i*size), swp,          size);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rsi
movl $0x1, %edi
callq 0x3220
movq %rax, -0x28(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x446a
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
callq 0x34b0
cltq
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rcx
subq -0x20(%rbp), %rcx
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq -0x40(%rbp), %rax
addq $0x1, %rcx
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq -0x38(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x30(%rbp), %rax
imulq -0x18(%rbp), %rax
addq %rax, %rsi
movq -0x18(%rbp), %rdx
callq 0x3280
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rax
imulq -0x18(%rbp), %rax
addq %rax, %rdi
movq -0x8(%rbp), %rsi
movq -0x20(%rbp), %rax
imulq -0x18(%rbp), %rax
addq %rax, %rsi
movq -0x18(%rbp), %rdx
callq 0x3280
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
imulq -0x18(%rbp), %rax
addq %rax, %rdi
movq -0x28(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x3280
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x439e
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: random_index_order
int *random_index_order(int min, int max)
{
    int *inds = calloc(max-min, sizeof(int));
    int i;
    for(i = min; i < max; ++i){
        inds[i] = i;
    }
    for(i = min; i < max-1; ++i){
        int swap = inds[i];
        int index = i + rand()%(max-i);
        inds[i] = inds[index];
        inds[index] = swap;
    }
    return inds;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl -0x8(%rbp), %eax
subl -0x4(%rbp), %eax
movslq %eax, %rdi
movl $0x4, %esi
callq 0x3220
movq %rax, -0x10(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x44bc
movl -0x14(%rbp), %edx
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x449b
movl -0x4(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x4528
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x20(%rbp)
callq 0x34b0
movl -0x8(%rbp), %ecx
subl -0x14(%rbp), %ecx
cltd
idivl %ecx
movl -0x20(%rbp), %eax
addl %edx, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x18(%rbp), %edx
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x44c2
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: find_arg
int find_arg(int argc, char* argv[], char *arg)
{
    int i;
    for(i = 0; i < argc; ++i) {
        if(!argv[i]) continue;
        if(0==strcmp(argv[i], arg)) {
            del_arg(argc, argv, i);
            return 1;
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x4615
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jne 0x45d3
jmp 0x460a
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rsi
callq 0x3230
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x4608
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x4540
movl $0x1, -0x4(%rbp)
jmp 0x461c
jmp 0x460a
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x45ba
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: find_int_arg
int find_int_arg(int argc, char **argv, char *arg, int def)
{
    int i;
    for(i = 0; i < argc-1; ++i){
        if(!argv[i]) continue;
        if(0==strcmp(argv[i], arg)){
            def = atoi(argv[i+1]);
            del_arg(argc, argv, i);
            del_arg(argc, argv, i);
            break;
        }
    }
    return def;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl -0x4(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x46d1
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jne 0x466b
jmp 0x46c3
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rsi
callq 0x3230
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x46c1
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x33d0
movl %eax, -0x1c(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movl -0x20(%rbp), %edx
callq 0x4540
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movl -0x20(%rbp), %edx
callq 0x4540
jmp 0x46d1
jmp 0x46c3
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x464d
movl -0x1c(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: find_float_arg
float find_float_arg(int argc, char **argv, char *arg, float def)
{
    int i;
    for(i = 0; i < argc-1; ++i){
        if(!argv[i]) continue;
        if(0==strcmp(argv[i], arg)){
            def = atof(argv[i+1]);
            del_arg(argc, argv, i);
            del_arg(argc, argv, i);
            break;
        }
    }
    return def;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movss %xmm0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl -0x4(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x4789
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jne 0x471d
jmp 0x477b
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rsi
callq 0x3230
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x4779
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x30c0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x1c(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movl -0x20(%rbp), %edx
callq 0x4540
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movl -0x20(%rbp), %edx
callq 0x4540
jmp 0x4789
jmp 0x477b
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x46ff
movss -0x1c(%rbp), %xmm0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: find_char_arg
char *find_char_arg(int argc, char **argv, char *arg, char *def)
{
    int i;
    for(i = 0; i < argc-1; ++i){
        if(!argv[i]) continue;
        if(0==strcmp(argv[i], arg)){
            def = argv[i+1];
            del_arg(argc, argv, i);
            del_arg(argc, argv, i);
            break;
        }
    }
    return def;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl -0x4(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x483b
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jne 0x47dc
jmp 0x4830
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rsi
callq 0x3230
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x482e
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movl -0x24(%rbp), %edx
callq 0x4540
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movl -0x24(%rbp), %edx
callq 0x4540
jmp 0x483b
jmp 0x4830
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x47be
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: basecfg
char *basecfg(char *cfgfile)
{
    char *c = cfgfile;
    char *next;
    while((next = strchr(c, '/')))
    {
        c = next+1;
    }
    c = copy_string(c);
    next = strchr(c, '.');
    if (next) *next = 0;
    return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x2f, %esi
callq 0x3120
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x488a
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x4864
movq -0x10(%rbp), %rdi
callq 0x48d0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x2e, %esi
callq 0x3120
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x48b7
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: pm
void pm(int M, int N, float *A)
{
    int i,j;
    for(i =0 ; i < M; ++i){
        printf("%d ", i+1);
        for(j = 0; j < N; ++j){
            printf("%2.4f, ", A[i*N+j]);
        }
        printf("\n");
    }
    printf("\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x4a30
movl -0x14(%rbp), %esi
addl $0x1, %esi
leaq 0x6c6ba(%rip), %rdi     # 0x71088
movb $0x0, %al
callq 0x3130
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x4a17
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
imull -0x8(%rbp), %ecx
addl -0x18(%rbp), %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x6c687(%rip), %rdi     # 0x7108c
movb $0x1, %al
callq 0x3130
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x49dc
leaq 0x71390(%rip), %rdi     # 0x75dae
movb $0x0, %al
callq 0x3130
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x49b9
leaq 0x71377(%rip), %rdi     # 0x75dae
movb $0x0, %al
callq 0x3130
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: find_replace
void find_replace(char *str, char *orig, char *rep, char *output)
{
    char buffer[4096] = {0};
    char *p;

    sprintf(buffer, "%s", str);
    if(!(p = strstr(buffer, orig))){  // Is 'orig' even in 'str'?
        sprintf(output, "%s", str);
        return;
    }

    *p = '\0';

    sprintf(output, "%s%s%s", buffer, rep, p+strlen(orig));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1050, %rsp           # imm = 0x1050
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
leaq -0x1020(%rbp), %rdi
xorl %esi, %esi
movl $0x1000, %edx           # imm = 0x1000
callq 0x3190
leaq -0x1020(%rbp), %rdi
movq -0x8(%rbp), %rdx
leaq 0x6f8db(%rip), %rsi     # 0x7436b
movb $0x0, %al
callq 0x33f0
leaq -0x1020(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x3480
movq %rax, -0x1028(%rbp)
cmpq $0x0, %rax
jne 0x4acc
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rdx
leaq 0x6f8a8(%rip), %rsi     # 0x7436b
movb $0x0, %al
callq 0x33f0
jmp 0x4b3e
movq -0x1028(%rbp), %rax
movb $0x0, (%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x1040(%rbp)
leaq -0x1020(%rbp), %rax
movq %rax, -0x1038(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x1030(%rbp)
movq -0x1028(%rbp), %rax
movq %rax, -0x1048(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3110
movq -0x1048(%rbp), %r8
movq -0x1040(%rbp), %rdi
movq -0x1038(%rbp), %rdx
movq -0x1030(%rbp), %rcx
addq %rax, %r8
leaq 0x6c55d(%rip), %rsi     # 0x71094
movb $0x0, %al
callq 0x33f0
addq $0x1050, %rsp           # imm = 0x1050
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: top_k
void top_k(float *a, int n, int k, int *index)
{
    int i,j;
    for(j = 0; j < k; ++j) index[j] = -1;
    for(i = 0; i < n; ++i){
        int curr = i;
        for(j = 0; j < k; ++j){
            if((index[j] < 0) || a[curr] > a[index[j]]){
                int swap = curr;
                curr = index[j];
                index[j] = swap;
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x4bab
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movl $0xffffffff, (%rax,%rcx,4) # imm = 0xFFFFFFFF
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x4b89
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x4c43
movl -0x1c(%rbp), %eax
movl %eax, -0x24(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x4c33
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jl 0x4c04
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq -0x20(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
ucomiss (%rax,%rcx,4), %xmm0
jbe 0x4c26
movl -0x24(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x24(%rbp)
movl -0x28(%rbp), %edx
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x4c28
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x4bcb
jmp 0x4c35
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x4bb2
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: read_file
unsigned char *read_file(char *filename)
{
    FILE *fp = fopen(filename, "rb");
    size_t size;

    fseek(fp, 0, SEEK_END); 
    size = ftell(fp);
    fseek(fp, 0, SEEK_SET); 

    unsigned char *text = calloc(size+1, sizeof(char));
    fread(text, 1, size, fp);
    fclose(fp);
    return text;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x6c415(%rip), %rsi     # 0x710bc
callq 0x3360
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x3300
movq -0x10(%rbp), %rdi
callq 0x3250
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x3300
movq -0x18(%rbp), %rdi
addq $0x1, %rdi
movl $0x1, %esi
callq 0x3220
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rcx
movl $0x1, %esi
callq 0x30a0
movq -0x10(%rbp), %rdi
callq 0x3100
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: split_str
list *split_str(char *s, char delim)
{
    size_t i;
    size_t len = strlen(s);
    list *l = make_list();
    list_insert(l, s);
    for(i = 0; i < len; ++i){
        if(s[i] == delim){
            s[i] = '\0';
            list_insert(l, &(s[i+1]));
        }
    }
    return l;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3110
movq %rax, -0x20(%rbp)
movb $0x0, %al
callq 0x8df0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x8ed0
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x4de1
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movsbl -0x9(%rbp), %ecx
cmpl %ecx, %eax
jne 0x4dd1
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x18(%rbp), %rax
addq $0x1, %rax
addq %rax, %rsi
callq 0x8ed0
jmp 0x4dd3
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x4d8f
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: strip
void strip(char *s)
{
    size_t i;
    size_t len = strlen(s);
    size_t offset = 0;
    for(i = 0; i < len; ++i){
        char c = s[i];
        if(c==' '||c=='\t'||c=='\n') ++offset;
        else s[i-offset] = c;
    }
    s[len-offset] = '\0';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3110
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x4e7c
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x21(%rbp)
movsbl -0x21(%rbp), %eax
cmpl $0x20, %eax
je 0x4e4c
movsbl -0x21(%rbp), %eax
cmpl $0x9, %eax
je 0x4e4c
movsbl -0x21(%rbp), %eax
cmpl $0xa, %eax
jne 0x4e5a
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x4e6c
movb -0x21(%rbp), %dl
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
subq -0x20(%rbp), %rcx
movb %dl, (%rax,%rcx)
jmp 0x4e6e
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x4e19
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
subq -0x20(%rbp), %rcx
movb $0x0, (%rax,%rcx)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: strip_char
void strip_char(char *s, char bad)
{
    size_t i;
    size_t len = strlen(s);
    size_t offset = 0;
    for(i = 0; i < len; ++i){
        char c = s[i];
        if(c==bad) ++offset;
        else s[i-offset] = c;
    }
    s[len-offset] = '\0';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3110
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x4f23
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x29(%rbp)
movsbl -0x29(%rbp), %eax
movsbl -0x9(%rbp), %ecx
cmpl %ecx, %eax
jne 0x4f01
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x4f13
movb -0x29(%rbp), %dl
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
subq -0x28(%rbp), %rcx
movb %dl, (%rax,%rcx)
jmp 0x4f15
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x4ecf
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
subq -0x28(%rbp), %rcx
movb $0x0, (%rax,%rcx)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: read_int
int read_int(int fd)
{
    int n = 0;
    int next = read(fd, &n, sizeof(int));
    if(next <= 0) return -1;
    return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0x8(%rbp), %edi
leaq -0xc(%rbp), %rsi
movl $0x4, %edx
callq 0x31d0
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
jg 0x4fc5
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4fcb
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: read_all_fail
int read_all_fail(int fd, char *buffer, size_t bytes)
{
    size_t n = 0;
    while(n < bytes){
        int next = read(fd, buffer + n, bytes-n);
        if(next <= 0) return 1;
        n += next;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x507d
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
subq -0x20(%rbp), %rdx
callq 0x31d0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jg 0x506f
movl $0x1, -0x4(%rbp)
jmp 0x5084
movslq -0x24(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x503b
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: write_all_fail
int write_all_fail(int fd, char *buffer, size_t bytes)
{
    size_t n = 0;
    while(n < bytes){
        size_t next = write(fd, buffer + n, bytes-n);
        if(next <= 0) return 1;
        n += next;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x50ef
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
addq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
subq -0x20(%rbp), %rdx
callq 0x30d0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
ja 0x50e1
movl $0x1, -0x4(%rbp)
jmp 0x50f6
movq -0x28(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x50ab
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: read_all
void read_all(int fd, char *buffer, size_t bytes)
{
    size_t n = 0;
    while(n < bytes){
        int next = read(fd, buffer + n, bytes-n);
        if(next <= 0) error("read failed");
        n += next;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x5160
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
addq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
subq -0x20(%rbp), %rdx
callq 0x31d0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jg 0x5152
leaq 0x6bf98(%rip), %rdi     # 0x710e5
callq 0x4c50
movslq -0x24(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x511b
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: write_all
void write_all(int fd, char *buffer, size_t bytes)
{
    size_t n = 0;
    while(n < bytes){
        size_t next = write(fd, buffer + n, bytes-n);
        if(next <= 0) error("write failed");
        n += next;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x51d2
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
addq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
subq -0x20(%rbp), %rdx
callq 0x30d0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
ja 0x51c4
leaq 0x6bf32(%rip), %rdi     # 0x710f1
callq 0x4c50
movq -0x28(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x518b
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: parse_csv_line
list *parse_csv_line(char *line)
{
    list *l = make_list();
    char *c, *p;
    int in = 0;
    for(c = line, p = line; *c != '\0'; ++c){
        if(*c == '"') in = !in;
        else if(*c == ',' && !in){
            *c = '\0';
            list_insert(l, copy_string(p));
            p = c+1;
        }
    }
    list_insert(l, copy_string(p));
    return l;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movb $0x0, %al
callq 0x8df0
movq %rax, -0x10(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x528d
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
jne 0x5239
cmpl $0x0, -0x24(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x24(%rbp)
jmp 0x527d
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
jne 0x527b
cmpl $0x0, -0x24(%rbp)
jne 0x527b
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
callq 0x48d0
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0x8ed0
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x527d
jmp 0x527f
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x520e
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rdi
callq 0x48d0
movq -0x38(%rbp), %rdi
movq %rax, %rsi
callq 0x8ed0
movq -0x10(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: count_fields
int count_fields(char *line)
{
    int count = 0;
    int done = 0;
    char *c;
    for(c = line; !done; ++c){
        done = (*c == '\0');
        if(*c == ',' || done) ++count;
    }
    return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpl $0x0, -0x10(%rbp)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x52ed
jmp 0x532d
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
je 0x5314
cmpl $0x0, -0x10(%rbp)
je 0x531d
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x531f
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x52de
movl -0xc(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: parse_fields
float *parse_fields(char *line, int n)
{
    float *field = calloc(n, sizeof(float));
    char *c, *p, *end;
    int count = 0;
    int done = 0;
    for(c = line, p = line; !done; ++c){
        done = (*c == '\0');
        if(*c == ',' || done){
            *c = '\0';
            field[count] = strtod(p, &end);
            if(p == c) field[count] = nan("");
            if(end != c && (end != c-1 || *end != '\r')) field[count] = nan(""); //DOS file formats!
            p = c+1;
            ++count;
        }
    }
    return field;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movslq -0xc(%rbp), %rdi
movl $0x4, %esi
callq 0x3220
movq %rax, -0x18(%rbp)
movl $0x0, -0x34(%rbp)
movl $0x0, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpl $0x0, -0x38(%rbp)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x5391
jmp 0x5474
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
je 0x53bc
cmpl $0x0, -0x38(%rbp)
je 0x5461
movq -0x20(%rbp), %rax
movb $0x0, (%rax)
movq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x30b0
cvtsd2ss %xmm0, %xmm0
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0x5408
leaq 0x700c4(%rip), %rdi     # 0x754b6
callq 0x3420
cvtsd2ss %xmm0, %xmm0
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x544c
movq -0x30(%rbp), %rax
movq -0x20(%rbp), %rcx
addq $-0x1, %rcx
cmpq %rcx, %rax
jne 0x542f
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0xd, %eax
je 0x544c
leaq 0x70080(%rip), %rdi     # 0x754b6
callq 0x3420
cvtsd2ss %xmm0, %xmm0
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x5463
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x537f
movq -0x18(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: mean_arrays
void mean_arrays(float **a, int n, int els, float *avg)
{
    int i;
    int j;
    memset(avg, 0, els*sizeof(float));
    for(j = 0; j < n; ++j){
        for(i = 0; i < els; ++i){
            avg[i] += a[j][i];
        }
    }
    for(i = 0; i < els; ++i){
        avg[i] /= n;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movslq -0x10(%rbp), %rdx
shlq $0x2, %rdx
xorl %esi, %esi
callq 0x3190
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x5586
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x5579
movq -0x8(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x1c(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
addss (%rax,%rcx,4), %xmm0
movss %xmm0, (%rax,%rcx,4)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x553f
jmp 0x557b
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x5530
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x55bb
cvtsi2ssl -0xc(%rbp), %xmm1
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
divss %xmm1, %xmm0
movss %xmm0, (%rax,%rcx,4)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x558d
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: variance_array
float variance_array(float *a, int n)
{
    int i;
    float sum = 0;
    float mean = mean_array(a, n);
    for(i = 0; i < n; ++i) sum += (a[i] - mean)*(a[i]-mean);
    float variance = sum/n;
    return variance;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x54d0
movss %xmm0, -0x18(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x56b8
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
subss -0x18(%rbp), %xmm0
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movss (%rax,%rcx,4), %xmm2
subss -0x18(%rbp), %xmm2
movss -0x14(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x14(%rbp)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x566f
movss -0x14(%rbp), %xmm0
cvtsi2ssl -0xc(%rbp), %xmm1
divss %xmm1, %xmm0
movss %xmm0, -0x1c(%rbp)
movss -0x1c(%rbp), %xmm0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: normalize_array
void normalize_array(float *a, int n)
{
    int i;
    float mu = mean_array(a,n);
    float sigma = sqrt(variance_array(a,n));
    for(i = 0; i < n; ++i){
        a[i] = (a[i] - mu)/sigma;
    }
    mu = mean_array(a,n);
    sigma = sqrt(variance_array(a,n));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x54d0
movss %xmm0, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x5640
cvtss2sd %xmm0, %xmm0
callq 0x3430
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x18(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x591c
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
subss -0x14(%rbp), %xmm0
divss -0x18(%rbp), %xmm0
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x58e5
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x54d0
movss %xmm0, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x5640
cvtss2sd %xmm0, %xmm0
callq 0x3430
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x18(%rbp)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)