LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/soso7885[P]OPCUA_example/demo_src/server_method.c
// Function: fooBarMethod
static UA_StatusCode
fooBarMethod(void *handle, const UA_NodeId objectId, size_t inputSize, const UA_Variant *input,
                 size_t outputSize, UA_Variant *output) {
	// Exactly the same as helloWorld, but returns foobar
        UA_String *inputStr = (UA_String*)input->data;
        UA_String tmp = UA_STRING_ALLOC("FooBar! ");
        if(inputStr->length > 0) {
            tmp.data = realloc(tmp.data, tmp.length + inputStr->length);
            memcpy(&tmp.data[tmp.length], inputStr->data, inputStr->length);
            tmp.length += inputStr->length;
        }
        UA_Variant_setScalarCopy(output, &tmp, &UA_TYPES[UA_TYPES_STRING]);
        UA_String_deleteMembers(&tmp);
        UA_LOG_INFO(logger, UA_LOGCATEGORY_SERVER, "Hello World was called");
        return UA_STATUSCODE_GOOD;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %rbx
movq 0x18(%rdx), %r12
leaq 0x7cd(%rip), %rdi       # 0x2127
callq 0x10e0
movq %rax, -0x30(%rbp)
movq %rdx, -0x28(%rbp)
movq (%r12), %rsi
testq %rsi, %rsi
je 0x199e
movq %rax, %r14
addq %rax, %rsi
movq %rdx, %rdi
callq 0x10f0
movq %rax, -0x28(%rbp)
leaq (%rax,%r14), %rdi
movq (%r12), %r15
movq 0x8(%r12), %rsi
movq %r15, %rdx
callq 0x10b0
addq %r14, %r15
movq %r15, -0x30(%rbp)
movl $0x1b8, %edx            # imm = 0x1B8
addq 0x262e(%rip), %rdx      # 0x3fd8
leaq -0x30(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10a0
movq %r14, %rdi
callq 0x1a03
movq 0x26e8(%rip), %rcx      # 0x40b0
testq %rcx, %rcx
je 0x19de
leaq 0x73c(%rip), %rdx       # 0x2110
pushq $0x2
popq %rdi
pushq $0x3
popq %rsi
xorl %eax, %eax
callq *%rcx
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/janmojzis[P]mcencrypt/mckeypair.c
// Function: main
int main(int argc, char **argv) {

    if (!checkfd(5, POLLOUT)) die_usage(NAME, "write publickey failed", "5>publickey 9>secretkey");
    if (!checkfd(9, POLLOUT)) die_usage(NAME, "write secretkey failed", "5>publickey 9>secretkey");
    limits();
    if (crypto_kem_mceliece8192128sha512_keypair(pk, sk)) die_temp(NAME, "keypair failed");
    if (writeall(5, pk, sizeof pk) == -1) die_temp(NAME, "write publickey failed");
    if (fsyncfd(5) == -1) die_temp(NAME, "write publickey failed");
    if (writeall(9, sk, sizeof sk) == -1) die_temp(NAME, "write secretkey failed");
    if (fsyncfd(9) == -1) die_temp(NAME, "write secretkey failed");
    die(0);
}

// Assembly:
pushq %rax
pushq $0x5
popq %rdi
pushq $0x4
popq %rsi
callq 0x38e8
testl %eax, %eax
jne 0x125a
leaq 0x5dbd(%rip), %rdi      # 0x7004
leaq 0x5dc0(%rip), %rsi      # 0x700e
leaq 0x5dd0(%rip), %rdx      # 0x7025
callq 0x45d0
pushq $0x9
popq %rdi
pushq $0x4
popq %rsi
callq 0x38e8
testl %eax, %eax
jne 0x1283
leaq 0x5d94(%rip), %rdi      # 0x7004
leaq 0x5dc6(%rip), %rsi      # 0x703d
leaq 0x5da7(%rip), %rdx      # 0x7025
callq 0x45d0
callq 0x5204
leaq 0x9e21(%rip), %rdi      # 0xb0b0
leaq 0x15561a(%rip), %rsi    # 0x1568b0
callq 0x54a8
testl %eax, %eax
je 0x12b2
leaq 0x5d5e(%rip), %rdi      # 0x7004
leaq 0x5da7(%rip), %rsi      # 0x7054
callq 0x46ef
leaq 0x9df7(%rip), %rsi      # 0xb0b0
pushq $0x5
popq %rdi
movl $0x14b800, %edx         # imm = 0x14B800
callq 0x64a0
cmpl $-0x1, %eax
jne 0x12de
leaq 0x5d32(%rip), %rdi      # 0x7004
leaq 0x5d35(%rip), %rsi      # 0x700e
callq 0x46ef
pushq $0x5
popq %rdi
callq 0x4cdc
cmpl $-0x1, %eax
jne 0x12fe
leaq 0x5d12(%rip), %rdi      # 0x7004
leaq 0x5d15(%rip), %rsi      # 0x700e
callq 0x46ef
leaq 0x1555ab(%rip), %rsi    # 0x1568b0
pushq $0x9
popq %rdi
movl $0x3700, %edx           # imm = 0x3700
callq 0x64a0
cmpl $-0x1, %eax
jne 0x132a
leaq 0x5ce6(%rip), %rdi      # 0x7004
leaq 0x5d18(%rip), %rsi      # 0x703d
callq 0x46ef
pushq $0x9
popq %rdi
callq 0x4cdc
cmpl $-0x1, %eax
jne 0x134a
leaq 0x5cc6(%rip), %rdi      # 0x7004
leaq 0x5cf8(%rip), %rsi      # 0x703d
callq 0x46ef
xorl %edi, %edi
callq 0x479f
xorl %eax, %eax
popq %rcx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/KhuramAli[P]JAM-Benchmark/mpmc_queue_lock_synchronized/code06.cpp
// Function: main
int main()
{
	std::thread t1{produce};
	std::thread t1a{produce};
	std::thread t2{consume};
	std::thread t3{consume};
	t3.join();
	t1.join();
	t2.join();
	t1a.join();
	
	
	std::cout << sum << '\n';
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
leaq -0xbb(%rip), %rbx       # 0x12dc
leaq 0x18(%rsp), %rdi
movq %rbx, %rsi
callq 0x14a4
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x14a4
leaq -0x70(%rip), %rsi       # 0x1348
leaq 0x8(%rsp), %rdi
callq 0x14a4
leaq -0x81(%rip), %rsi       # 0x1348
movq %rsp, %rdi
callq 0x14a4
movq %rsp, %rdi
callq 0x1150
leaq 0x18(%rsp), %rdi
callq 0x1150
leaq 0x8(%rsp), %rdi
callq 0x1150
leaq 0x10(%rsp), %rdi
callq 0x1150
movl 0x2d3b(%rip), %esi      # 0x4138
movq 0x2bd4(%rip), %rdi      # 0x3fd8
callq 0x1160
pushq $0xa
popq %rsi
movq %rax, %rdi
callq 0x10f0
movq %rsp, %rdi
callq 0x150a
leaq 0x8(%rsp), %rdi
callq 0x150a
leaq 0x10(%rsp), %rdi
callq 0x150a
leaq 0x18(%rsp), %rdi
callq 0x150a
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
retq
movq %rax, %rbx
jmp 0x145c
movq %rax, %rbx
jmp 0x1466
movq %rax, %rbx
jmp 0x1470
movq %rax, %rbx
movq %rsp, %rdi
callq 0x150a
leaq 0x8(%rsp), %rdi
callq 0x150a
leaq 0x10(%rsp), %rdi
callq 0x150a
leaq 0x18(%rsp), %rdi
callq 0x150a
movq %rbx, %rdi
callq 0x1170
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/gemm.c
// Function: gemm_bin
void gemm_bin(int M, int N, int K, float ALPHA, 
        char  *A, int lda, 
        float *B, int ldb,
        float *C, int ldc)
{
    int i,j,k;
    for(i = 0; i < M; ++i){
        for(k = 0; k < K; ++k){
            char A_PART = A[i*lda+k];
            if(A_PART){
                for(j = 0; j < N; ++j){
                    C[i*ldc+j] += B[k*ldb+j];
                }
            } else {
                for(j = 0; j < N; ++j){
                    C[i*ldc+j] -= B[k*ldb+j];
                }
            }
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x38(%rsp), %rax
movslq 0x30(%rsp), %r10
movslq 0x40(%rsp), %r11
xorl %ebx, %ebx
testl %esi, %esi
cmovlel %ebx, %esi
testl %edx, %edx
cmovlel %ebx, %edx
movslq %r8d, %r8
testl %edi, %edi
cmovlel %ebx, %edi
shlq $0x2, %r11
shlq $0x2, %r10
cmpq %rdi, %rbx
je 0x368f
movq %rbx, %r14
imulq %r8, %r14
addq %rcx, %r14
movq %r9, %r15
xorl %r12d, %r12d
cmpq %rdx, %r12
je 0x3687
cmpb $0x0, (%r14,%r12)
je 0x3660
xorl %r13d, %r13d
cmpq %r13, %rsi
je 0x367f
movss (%r15,%r13,4), %xmm0
addss (%rax,%r13,4), %xmm0
movss %xmm0, (%rax,%r13,4)
incq %r13
jmp 0x3644
xorl %r13d, %r13d
cmpq %r13, %rsi
je 0x367f
movss (%rax,%r13,4), %xmm0
subss (%r15,%r13,4), %xmm0
movss %xmm0, (%rax,%r13,4)
incq %r13
jmp 0x3663
incq %r12
addq %r10, %r15
jmp 0x3635
incq %rbx
addq %r11, %rax
jmp 0x3620
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/gemm.c
// Function: random_matrix
float *random_matrix(int rows, int cols)
{
    int i;
    float *m = calloc(rows*cols, sizeof(float));
    for(i = 0; i < rows*cols; ++i){
        m[i] = (float)rand()/RAND_MAX;
    }
    return m;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
imull %esi, %edi
movslq %edi, %rbx
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x3250
movq %rax, %r14
xorl %r15d, %r15d
testl %ebx, %ebx
cmovlel %r15d, %ebx
cmpq %r15, %rbx
je 0x36dc
callq 0x34e0
cvtsi2ss %eax, %xmm0
mulss 0x48933(%rip), %xmm0    # 0x4c004
movss %xmm0, (%r14,%r15,4)
incq %r15
jmp 0x36bb
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/gemm.c
// Function: time_random_matrix
void time_random_matrix(int TA, int TB, int m, int k, int n)
{
    float *a;
    if(!TA) a = random_matrix(m,k);
    else a = random_matrix(k,m);
    int lda = (!TA)?k:m;
    float *b;
    if(!TB) b = random_matrix(k,n);
    else b = random_matrix(n,k);
    int ldb = (!TB)?n:k;

    float *c = random_matrix(m,n);
    int i;
    clock_t start = clock(), end;
    for(i = 0; i<10; ++i){
        gemm_cpu(TA,TB,m,n,k,1,a,lda,b,ldb,1,c,n);
    }
    end = clock();
    printf("Matrix Multiplication %dx%d * %dx%d, TA=%d, TB=%d: %lf ms\n",m,k,k,n, TA, TB, (float)(end-start)/CLOCKS_PER_SEC);
    free(a);
    free(b);
    free(c);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r8d, %r14d
movl %ecx, %ebp
movl %edx, %r15d
movq %rsi, 0x20(%rsp)
movl %edi, 0xc(%rsp)
testl %edi, %edi
je 0x371c
movl %ebp, %edi
movl %r15d, %esi
callq 0x3699
movq %rax, 0x18(%rsp)
movl %r15d, %eax
jmp 0x372d
movl %r15d, %edi
movl %ebp, %esi
callq 0x3699
movq %rax, 0x18(%rsp)
movl %ebp, %eax
movq %rax, 0x28(%rsp)
cmpl $0x0, 0x20(%rsp)
je 0x374f
movl %r14d, %edi
movl %ebp, %esi
callq 0x3699
movq %rax, 0x10(%rsp)
movl %ebp, %ebx
movl %ebp, %r12d
jmp 0x3763
movl %ebp, %ebx
movl %ebp, %edi
movl %r14d, %esi
callq 0x3699
movq %rax, 0x10(%rsp)
movl %r14d, %r12d
movl %r15d, %r13d
movl %r15d, %edi
movl %r14d, %esi
callq 0x3699
movq %rax, %r15
pushq $0xa
popq %rbp
callq 0x3120
movq %rax, 0x30(%rsp)
subl $0x1, %ebp
jb 0x37c5
subq $0x8, %rsp
movl 0x14(%rsp), %edi
movq 0x28(%rsp), %rsi
movl %r13d, %edx
movl %r14d, %ecx
movl %ebx, %r8d
movss 0x48864(%rip), %xmm0    # 0x4c008
movq 0x20(%rsp), %r9
movaps %xmm0, %xmm1
pushq %r14
pushq %r15
pushq %r12
pushq 0x30(%rsp)
pushq 0x50(%rsp)
callq 0x3831
addq $0x30, %rsp
jmp 0x3781
callq 0x3120
subq 0x30(%rsp), %rax
cvtsi2ss %rax, %xmm0
divss 0x48830(%rip), %xmm0    # 0x4c00c
cvtss2sd %xmm0, %xmm0
subq $0x8, %rsp
leaq 0x48825(%rip), %rdi     # 0x4c010
movl %r13d, %esi
movl %ebx, %edx
movl %ebx, %ecx
movl %r14d, %r8d
movl 0x14(%rsp), %r9d
movb $0x1, %al
pushq 0x28(%rsp)
callq 0x3160
popq %rcx
popq %rdx
movq 0x18(%rsp), %rdi
callq 0x3040
movq 0x10(%rsp), %rdi
callq 0x3040
movq %r15, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3040
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rax
movl %r8d, %r10d
movslq 0x60(%rsp), %r14
movq 0x58(%rsp), %rbx
movq 0x48(%rsp), %r9
xorl %r15d, %r15d
testl %ecx, %ecx
movl $0x0, %r12d
cmovgl %ecx, %r12d
testl %edx, %edx
movl $0x0, %r13d
cmovgl %edx, %r13d
movl 0x40(%rsp), %r8d
movq %r14, %rbp
shlq $0x2, %rbp
cmpq %r13, %r15
je 0x38a2
xorl %r11d, %r11d
cmpq %r11, %r12
je 0x389a
movss (%rbx,%r11,4), %xmm2
mulss %xmm1, %xmm2
movss %xmm2, (%rbx,%r11,4)
incq %r11
jmp 0x3880
incq %r15
addq %rbp, %rbx
jmp 0x3878
movl %esi, %r11d
orl %edi, %r11d
je 0x38eb
testl %esi, %esi
setne %r11b
testl %edi, %edi
sete %bl
orb %r11b, %bl
je 0x390b
testl %edi, %edi
setne %dil
testl %esi, %esi
sete %sil
subq $0x8, %rsp
orb %dil, %sil
jne 0x392b
movl %edx, %edi
movl %ecx, %esi
movl %r10d, %edx
movq %rax, %rcx
pushq %r14
pushq 0x68(%rsp)
movl 0x68(%rsp), %eax
pushq %rax
callq 0x39ef
jmp 0x3945
subq $0x8, %rsp
movl %edx, %edi
movl %ecx, %esi
movl %r10d, %edx
movq %rax, %rcx
pushq %r14
pushq 0x68(%rsp)
movl 0x68(%rsp), %eax
pushq %rax
callq 0x3959
jmp 0x3945
subq $0x8, %rsp
movl %edx, %edi
movl %ecx, %esi
movl %r10d, %edx
movq %rax, %rcx
pushq %r14
pushq 0x68(%rsp)
movl 0x68(%rsp), %eax
pushq %rax
callq 0x3a88
jmp 0x3945
movl %edx, %edi
movl %ecx, %esi
movl %r10d, %edx
movq %rax, %rcx
pushq %r14
pushq 0x68(%rsp)
movl 0x68(%rsp), %eax
pushq %rax
callq 0x3b1e
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x38(%rsp), %rax
movslq 0x30(%rsp), %r10
movslq 0x40(%rsp), %r11
xorl %ebx, %ebx
testl %esi, %esi
cmovlel %ebx, %esi
testl %edx, %edx
cmovlel %ebx, %edx
movslq %r8d, %r8
testl %edi, %edi
cmovlel %ebx, %edi
shlq $0x2, %r11
shlq $0x2, %r10
cmpq %rdi, %rbx
je 0x39e5
movq %rbx, %r14
imulq %r8, %r14
leaq (%rcx,%r14,4), %r14
movq %r9, %r15
xorl %r12d, %r12d
cmpq %rdx, %r12
je 0x39dd
movss (%r14,%r12,4), %xmm1
mulss %xmm0, %xmm1
xorl %r13d, %r13d
cmpq %r13, %rsi
je 0x39d5
movss (%r15,%r13,4), %xmm2
mulss %xmm1, %xmm2
addss (%rax,%r13,4), %xmm2
movss %xmm2, (%rax,%r13,4)
incq %r13
jmp 0x39b5
incq %r12
addq %r10, %r15
jmp 0x39a3
incq %rbx
addq %r11, %rax
jmp 0x398d
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x38(%rsp), %rax
movslq 0x40(%rsp), %r10
movslq 0x30(%rsp), %r11
xorl %ebx, %ebx
testl %edx, %edx
cmovlel %ebx, %edx
testl %esi, %esi
cmovlel %ebx, %esi
movslq %r8d, %r8
testl %edi, %edi
cmovlel %ebx, %edi
shlq $0x2, %r11
shlq $0x2, %r8
cmpq %rdi, %rbx
je 0x3a7e
movq %rbx, %r14
imulq %r10, %r14
leaq (%rax,%r14,4), %r14
movq %r9, %r15
xorl %r12d, %r12d
cmpq %rsi, %r12
je 0x3a76
xorps %xmm1, %xmm1
xorl %r13d, %r13d
cmpq %r13, %rdx
je 0x3a62
movss (%rcx,%r13,4), %xmm2
mulss %xmm0, %xmm2
mulss (%r15,%r13,4), %xmm2
addss %xmm2, %xmm1
incq %r13
jmp 0x3a44
addss (%r14,%r12,4), %xmm1
movss %xmm1, (%r14,%r12,4)
incq %r12
addq %r11, %r15
jmp 0x3a39
incq %rbx
addq %r8, %rcx
jmp 0x3a23
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x40(%rsp), %rax
movslq 0x48(%rsp), %r10
movslq 0x38(%rsp), %r11
movslq %r8d, %r8
xorl %ebx, %ebx
testl %edx, %edx
cmovlel %ebx, %edx
testl %esi, %esi
cmovlel %ebx, %esi
testl %edi, %edi
cmovlel %ebx, %edi
shlq $0x2, %r11
shlq $0x2, %r8
cmpq %rdi, %rbx
je 0x3bb4
movq %rbx, %r14
imulq %r10, %r14
leaq (%rax,%r14,4), %r14
movq %r9, %r15
xorl %r12d, %r12d
cmpq %rsi, %r12
je 0x3bab
xorps %xmm1, %xmm1
movq %rcx, %r13
xorl %ebp, %ebp
cmpq %rbp, %rdx
je 0x3b97
movss (%r13), %xmm2
mulss %xmm0, %xmm2
mulss (%r15,%rbp,4), %xmm2
addss %xmm2, %xmm1
incq %rbp
addq %r8, %r13
jmp 0x3b76
addss (%r14,%r12,4), %xmm1
movss %xmm1, (%r14,%r12,4)
incq %r12
addq %r11, %r15
jmp 0x3b69
incq %rbx
addq $0x4, %rcx
jmp 0x3b53
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
testq %rdi, %rdi
je 0x3c7c
movq %rdi, %rbx
callq 0x3140
movl $0x1, (%r14)
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
pushq $0x1
popq %r12
cmpq %rcx, %rax
je 0x3c3b
cmpb $0x2c, (%rbx,%rcx)
jne 0x3c36
incl %r12d
movl %r12d, (%r14)
incq %rcx
jmp 0x3c25
movslq %r12d, %rdi
pushq $0x4
popq %rsi
callq 0x3250
movq %rax, %r15
xorl %r14d, %r14d
testl %r12d, %r12d
cmovlel %r14d, %r12d
pushq $0x2c
popq %rbp
cmpq %r14, %r12
je 0x3c95
movq %rbx, %rdi
callq 0x3400
movl %eax, (%r15,%r14,4)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3150
movq %rax, %rbx
incq %rbx
incq %r14
jmp 0x3c56
movl %edx, %ebp
pushq $0x1
popq %rdi
pushq $0x4
popq %rsi
callq 0x3250
movq %rax, %r15
movl %ebp, (%rax)
movl $0x1, (%r14)
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x4e036(%rip), %rsi     # 0x51ce9
callq 0x3390
testq %rax, %rax
je 0x3d07
movq %rax, %rbx
pushq $0x4
popq %r14
xorl %r15d, %r15d
movq %rbx, %rdi
callq 0x3d32
testq %rax, %rax
je 0x3cf8
movq %rax, %r12
movq %r15, %rdi
movq %r14, %rsi
callq 0x3350
movq %rax, %r15
movq %r12, %rdi
callq 0x3400
movl %eax, -0x4(%r15,%r14)
addq $0x4, %r14
jmp 0x3cc7
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r14, %rdi
callq 0x3d0f
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x3290
testl %eax, %eax
je 0x3d5d
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x200, %r15d           # imm = 0x200
movl $0x200, %edi            # imm = 0x200
callq 0x3300
movq %rax, %rbx
movq %rax, %rdi
movl $0x200, %esi            # imm = 0x200
movq %r14, %rdx
callq 0x3230
testq %rax, %rax
je 0x3deb
movl $0x7ffffffe, %ebp       # imm = 0x7FFFFFFE
movq %rbx, %rdi
callq 0x3140
leaq -0x1(%rax), %r13
cmpb $0xa, -0x1(%rbx,%rax)
je 0x3e03
movq %rax, %r12
movq %r14, %rdi
callq 0x3290
testl %eax, %eax
jne 0x3df8
leaq -0x1(%r15), %rax
cmpq %rax, %r12
jne 0x3dcb
addq %r15, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3350
testq %rax, %rax
je 0x3e10
movq %rax, %rbx
movq %r15, %rsi
subq %r12, %rsi
addq %rbx, %r12
cmpq $0x7fffffff, %rsi       # imm = 0x7FFFFFFF
cmoval %ebp, %esi
movq %r12, %rdi
movq %r14, %rdx
callq 0x3230
jmp 0x3d8a
movq %rbx, %rdi
callq 0x3040
jmp 0x3d49
cmpb $0xa, (%rbx,%r13)
jne 0x3d4b
addq %rbx, %r13
movb $0x0, (%r13)
jmp 0x3d4b
leaq 0x4e735(%rip), %rdi     # 0x5254c
movq %r15, %rsi
xorl %eax, %eax
callq 0x3160
callq 0x447a
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
xorl %r13d, %r13d
movq %rcx, %rbp
subq $0x1, %rbp
jb 0x3e76
movq %r13, %rax
xorl %edx, %edx
divq %rbx
movq %rax, %rdi
addq %r15, %r13
movq %r13, %rax
xorl %edx, %edx
divq %rbx
subq %rdi, %rax
imulq %r14, %rdi
addq %r12, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x3e85
jmp 0x3e43
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r13
pushq $0x1
popq %rdi
movq %rdx, %rsi
callq 0x3250
movq %rax, %r12
xorl %r15d, %r15d
movq %r13, (%rsp)
cmpq $0x1, %r14
je 0x3f15
callq 0x34e0
movslq %eax, %rcx
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
xorl %edx, %edx
divq %r14
movq %rax, %rsi
incq %rsi
movq %rcx, %rax
xorl %edx, %edx
divq %rsi
leaq (%rax,%r15), %rbp
imulq %rbx, %rbp
addq (%rsp), %rbp
movq %r12, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x32b0
movq %rbp, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x32b0
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x32b0
incq %r15
decq %r14
addq %rbx, %r13
jmp 0x3eae
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movl %edi, %r14d
movl %esi, %r15d
subl %edi, %r15d
movslq %r15d, %rdi
pushq $0x4
popq %rsi
callq 0x3250
movq %rax, %rbx
movslq %r14d, %r14
movslq %ebp, %rax
movq %r14, %rcx
cmpq %rax, %rcx
jge 0x3f5e
movl %ecx, (%rbx,%rcx,4)
incq %rcx
jmp 0x3f51
decl %ebp
movslq %ebp, %r12
cmpq %r12, %r14
jge 0x3f92
leaq (%rbx,%r14,4), %r13
movl (%rbx,%r14,4), %ebp
callq 0x34e0
cltd
idivl %r15d
movslq %edx, %rax
movl (%r13,%rax,4), %ecx
movl %ecx, (%rbx,%r14,4)
movl %ebp, (%r13,%rax,4)
incq %r14
decl %r15d
jmp 0x3f63
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r14
movl %edi, %ebp
xorl %ebx, %ebx
testl %edi, %edi
movl $0x0, %r13d
cmovgl %edi, %r13d
xorl %r12d, %r12d
cmpq %r12, %r13
je 0x4030
movq (%r14,%r12,8), %rdi
testq %rdi, %rdi
je 0x401b
movq %r15, %rsi
callq 0x3260
testl %eax, %eax
je 0x4020
incq %r12
jmp 0x4001
movl %ebp, %edi
movq %r14, %rsi
movl %r12d, %edx
callq 0x3fa4
pushq $0x1
popq %rbx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r15d
movq %rdx, %r12
movq %rsi, %rbx
movl %edi, %ebp
cmpl $0x2, %edi
pushq $0x1
popq %r13
cmovgel %edi, %r13d
decl %r13d
xorl %r14d, %r14d
cmpq %r14, %r13
je 0x40ae
movq (%rbx,%r14,8), %rdi
testq %rdi, %rdi
je 0x4082
movq %r12, %rsi
callq 0x3260
testl %eax, %eax
je 0x4087
incq %r14
jmp 0x4068
movq 0x8(%rbx,%r14,8), %rdi
callq 0x3400
movl %eax, %r15d
movl %ebp, %edi
movq %rbx, %rsi
movl %r14d, %edx
callq 0x3fa4
movl %ebp, %edi
movq %rbx, %rsi
movl %r14d, %edx
callq 0x3fa4
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movl %edi, %ebp
cmpl $0x2, %edi
pushq $0x1
popq %r12
cmovgel %edi, %r12d
decl %r12d
xorl %r14d, %r14d
movss %xmm0, 0xc(%rsp)
cmpq %r14, %r12
je 0x4144
movq (%rbx,%r14,8), %rdi
testq %rdi, %rdi
je 0x410b
movq %r15, %rsi
callq 0x3260
movss 0xc(%rsp), %xmm0
testl %eax, %eax
je 0x4110
incq %r14
jmp 0x40eb
movq 0x8(%rbx,%r14,8), %rdi
callq 0x30f0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xc(%rsp)
movl %ebp, %edi
movq %rbx, %rsi
movl %r14d, %edx
callq 0x3fa4
movl %ebp, %edi
movq %rbx, %rsi
movl %r14d, %edx
callq 0x3fa4
movss 0xc(%rsp), %xmm0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r14
movl %edi, %ebp
cmpl $0x2, %edi
pushq $0x1
popq %r13
cmovgel %edi, %r13d
decl %r13d
xorl %r15d, %r15d
cmpq %r15, %r13
je 0x41b6
movq (%r14,%r15,8), %rdi
testq %rdi, %rdi
je 0x4192
movq %r12, %rsi
callq 0x3260
testl %eax, %eax
je 0x4197
incq %r15
jmp 0x4178
movq 0x8(%r14,%r15,8), %rbx
movl %ebp, %edi
movq %r14, %rsi
movl %r15d, %edx
callq 0x3fa4
movl %ebp, %edi
movq %r14, %rsi
movl %r15d, %edx
callq 0x3fa4
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/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 %r14
pushq %rbx
pushq %rax
pushq $0x2f
popq %rbx
movq %rdi, %r14
movl %ebx, %esi
callq 0x3150
leaq 0x1(%rax), %rdi
testq %rax, %rax
jne 0x41cf
movq %r14, %rdi
callq 0x420b
movq %rax, %rbx
pushq $0x2e
popq %rsi
movq %rax, %rdi
callq 0x3150
testq %rax, %rax
je 0x4200
movb $0x0, (%rax)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
xorl %eax, %eax
testl %esi, %esi
movl $0x0, %r15d
cmovgl %esi, %r15d
movslq %esi, %r14
testl %edi, %edi
cmovlel %eax, %edi
movq %rdi, (%rsp)
shlq $0x2, %r14
leaq 0x47df1(%rip), %r12     # 0x4c080
xorl %r13d, %r13d
cmpq (%rsp), %r13
je 0x42d4
incq %r13
leaq 0x47dda(%rip), %rdi     # 0x4c07c
movl %r13d, %esi
xorl %eax, %eax
callq 0x3160
xorl %ebp, %ebp
cmpq %rbp, %r15
je 0x42c7
cvtss2sd (%rbx,%rbp,4), %xmm0
movq %r12, %rdi
movb $0x1, %al
callq 0x3160
incq %rbp
jmp 0x42ae
pushq $0xa
popq %rdi
callq 0x3060
addq %r14, %rbx
jmp 0x4292
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3060
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq %rsp, %r13
movl $0x1000, %edx           # imm = 0x1000
movq %r13, %rdi
xorl %esi, %esi
callq 0x31c0
movq %r13, %rdi
movq %r12, %rsi
callq 0x3090
movq %r13, %rdi
movq %r15, %rsi
callq 0x34b0
testq %rax, %rax
je 0x4360
movq %rax, %r13
movb $0x0, (%rax)
movq %r15, %rdi
callq 0x3140
addq %rax, %r13
leaq 0x47d3d(%rip), %rsi     # 0x4c088
movq %rsp, %rdx
movq %rbx, %rdi
movq %r14, %rcx
movq %r13, %r8
xorl %eax, %eax
callq 0x3420
jmp 0x436b
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3090
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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:
xorl %eax, %eax
testl %edx, %edx
cmovlel %eax, %edx
cmpq %rax, %rdx
je 0x439f
orl $-0x1, (%rcx,%rax,4)
incq %rax
jmp 0x4391
xorl %eax, %eax
testl %esi, %esi
cmovlel %eax, %esi
cmpl %esi, %eax
je 0x43de
xorl %r8d, %r8d
movl %eax, %r9d
cmpq %r8, %rdx
je 0x43da
movslq (%rcx,%r8,4), %r10
testq %r10, %r10
js 0x43ce
movslq %r9d, %r11
movss (%rdi,%r11,4), %xmm0
ucomiss (%rdi,%r10,4), %xmm0
jbe 0x43d5
movl %r9d, (%rcx,%r8,4)
movl %r10d, %r9d
incq %r8
jmp 0x43b0
incl %eax
jmp 0x43a6
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0x47c9d(%rip), %rsi     # 0x4c0b0
callq 0x3390
movq %rax, %rbx
pushq $0x2
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x3340
movq %rbx, %rdi
callq 0x3280
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3340
leaq 0x1(%r14), %rdi
pushq $0x1
popq %r15
movq %r15, %rsi
callq 0x3250
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x30d0
movq %rbx, %rdi
callq 0x3130
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0x3140
movq %rax, %r15
xorl %eax, %eax
callq 0x7220
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
callq 0x7271
incq %r14
subq $0x1, %r15
jb 0x44e2
cmpb %bl, -0x1(%r14)
jne 0x44c9
movb $0x0, -0x1(%r14)
movq %r12, %rdi
jmp 0x44c1
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
movq %rdi, %rbx
callq 0x3140
xorl %ecx, %ecx
movabsq $0x100000600, %rdx      # imm = 0x100000600
movq %rbx, %rsi
movq %rax, %rdi
subq $0x1, %rdi
jb 0x4535
movzbl (%rsi), %r8d
cmpq $0x20, %r8
ja 0x4527
btq %r8, %rdx
jae 0x4527
incq %rcx
jmp 0x4530
movq %rsi, %r9
subq %rcx, %r9
movb %r8b, (%r9)
incq %rsi
jmp 0x450c
subq %rcx, %rax
movb $0x0, (%rbx,%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0x3140
xorl %ecx, %ecx
movq %rbx, %rdx
movq %rax, %rsi
subq $0x1, %rsi
jb 0x4574
movb (%rdx), %dil
cmpb %bpl, %dil
jne 0x4566
incq %rcx
jmp 0x456f
movq %rdx, %r8
subq %rcx, %r8
movb %dil, (%r8)
incq %rdx
jmp 0x4553
subq %rcx, %rax
movb $0x0, (%rbx,%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
xorl %r15d, %r15d
movq %rbx, %rdx
subq %r15, %rdx
jbe 0x46cb
leaq (%r14,%r15), %rsi
movl %ebp, %edi
callq 0x3210
testl %eax, %eax
jle 0x46d6
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
addq %rax, %r15
jmp 0x46aa
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x479fc(%rip), %rdi     # 0x4c0d9
callq 0x43df
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
xorl %r15d, %r15d
movq %rbx, %rdx
subq %r15, %rdx
jbe 0x471b
leaq (%r14,%r15), %rsi
movl %ebp, %edi
callq 0x3100
addq %rax, %r15
testq %rax, %rax
jne 0x46f4
leaq 0x479cf(%rip), %rdi     # 0x4c0e5
callq 0x43df
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x7220
movq %rax, %rbx
leaq 0x1(%r14), %r15
movzbl -0x1(%r15), %eax
cmpl $0x22, %eax
je 0x4775
testl %eax, %eax
je 0x4783
cmpb $0x2c, %al
jne 0x477e
testl %ebp, %ebp
jne 0x477e
movb $0x0, -0x1(%r15)
movq %r14, %rdi
callq 0x420b
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7271
xorl %ebp, %ebp
movq %r15, %r14
jmp 0x477e
xorl %eax, %eax
testl %ebp, %ebp
sete %al
movl %eax, %ebp
incq %r15
jmp 0x4740
movq %r14, %rdi
callq 0x420b
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7271
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/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:
xorl %eax, %eax
xorl %ecx, %ecx
testl %ecx, %ecx
jne 0x47c8
movzbl (%rdi), %esi
xorl %ecx, %ecx
testl %esi, %esi
sete %dl
cmpl $0x2c, %esi
je 0x47bf
testl %esi, %esi
jne 0x47c1
incl %eax
movb %dl, %cl
incq %rdi
jmp 0x47a8
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movslq %esi, %rdi
pushq $0x4
popq %rsi
callq 0x3250
movq %rax, 0x8(%rsp)
xorl %ebp, %ebp
movq %rbx, %r13
xorl %r12d, %r12d
testl %r12d, %r12d
jne 0x4896
movzbl (%rbx), %eax
xorl %r12d, %r12d
testl %eax, %eax
sete %r15b
cmpl $0x2c, %eax
je 0x4810
testl %eax, %eax
jne 0x488b
movb $0x0, (%rbx)
movq %r13, %rdi
leaq 0x10(%rsp), %rsi
callq 0x30e0
cvtsd2ss %xmm0, %xmm0
movslq %ebp, %r14
movq 0x8(%rsp), %rax
movss %xmm0, (%rax,%r14,4)
cmpq %r13, %rbx
jne 0x4852
leaq 0x4c3d0(%rip), %rdi     # 0x50c0e
callq 0x3450
cvtsd2ss %xmm0, %xmm0
movq 0x8(%rsp), %rax
movss %xmm0, (%rax,%r14,4)
movq 0x10(%rsp), %rax
cmpq %rax, %rbx
je 0x4885
leaq -0x1(%rbx), %rcx
cmpq %rax, %rcx
jne 0x486a
cmpb $0xd, (%rax)
je 0x4885
leaq 0x4c39d(%rip), %rdi     # 0x50c0e
callq 0x3450
cvtsd2ss %xmm0, %xmm0
movq 0x8(%rsp), %rax
movss %xmm0, (%rax,%r14,4)
leaq 0x1(%rbx), %r13
incl %ebp
movb %r15b, %r12b
incq %rbx
jmp 0x47f2
movq 0x8(%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movslq %edx, %r15
leaq (,%r15,4), %rdx
xorl %r12d, %r12d
movq %rcx, %rdi
xorl %esi, %esi
callq 0x31c0
testl %r15d, %r15d
cmovlel %r12d, %r15d
testl %ebp, %ebp
movl $0x0, %eax
cmovgl %ebp, %eax
cmpq %rax, %r12
je 0x4938
xorl %ecx, %ecx
cmpq %rcx, %r15
je 0x4933
movq (%r14,%r12,8), %rdx
movss (%rdx,%rcx,4), %xmm0
addss (%rbx,%rcx,4), %xmm0
movss %xmm0, (%rbx,%rcx,4)
incq %rcx
jmp 0x4916
incq %r12
jmp 0x490f
cvtsi2ss %ebp, %xmm0
xorl %eax, %eax
cmpq %rax, %r15
je 0x4956
movss (%rbx,%rax,4), %xmm1
divss %xmm0, %xmm1
movss %xmm1, (%rbx,%rax,4)
incq %rax
jmp 0x493e
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0x48c4
xorl %eax, %eax
testl %ebx, %ebx
movl $0x0, %ecx
cmovgl %ebx, %ecx
xorps %xmm1, %xmm1
cmpq %rax, %rcx
je 0x49e9
movss (%r14,%rax,4), %xmm2
subss %xmm0, %xmm2
mulss %xmm2, %xmm2
addss %xmm2, %xmm1
incq %rax
jmp 0x49cd
cvtsi2ss %ebx, %xmm0
divss %xmm0, %xmm1
movaps %xmm1, %xmm0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0x48c4
movss %xmm0, 0x4(%rsp)
movq %r14, %rdi
movl %ebx, %esi
callq 0x49b0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0x4acb
sqrtss %xmm0, %xmm0
jmp 0x4ad0
callq 0x32e0
xorl %eax, %eax
testl %ebx, %ebx
movl $0x0, %ecx
cmovgl %ebx, %ecx
movss 0x4(%rsp), %xmm2
cmpq %rax, %rcx
je 0x4b00
movss (%r14,%rax,4), %xmm1
subss %xmm2, %xmm1
divss %xmm0, %xmm1
movss %xmm1, (%r14,%rax,4)
incq %rax
jmp 0x4ae2
movq %r14, %rdi
movl %ebx, %esi
callq 0x48c4
movq %r14, %rdi
movl %ebx, %esi
callq 0x49b0
xorps %xmm1, %xmm1
addq $0x8, %rsp
ucomiss %xmm1, %xmm0
jb 0x4b24
popq %rbx
popq %r14
retq
popq %rbx
popq %r14
jmp 0x32e0
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: mag_array
float mag_array(float *a, int n)
{
    int i;
    float sum = 0;
    for(i = 0; i < n; ++i){
        sum += a[i]*a[i];   
    }
    return sqrt(sum);
}

// Assembly:
xorl %eax, %eax
testl %esi, %esi
cmovlel %eax, %esi
xorps %xmm0, %xmm0
cmpq %rax, %rsi
je 0x4b6d
movss (%rdi,%rax,4), %xmm1
mulss %xmm1, %xmm1
addss %xmm1, %xmm0
incq %rax
jmp 0x4b56
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0x32e0
sqrtss %xmm0, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: sample_array
int sample_array(float *a, int n)
{
    float sum = sum_array(a, n);
    scale_array(a, n, 1./sum);
    float r = rand_uniform(0, 1);
    int i;
    for(i = 0; i < n; ++i){
        r = r - a[i];
        if (r <= 0) return i;
    }
    return n-1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0x48aa
movss 0x47454(%rip), %xmm1    # 0x4c008
divss %xmm0, %xmm1
movq %r14, %rdi
movl %ebx, %esi
movaps %xmm1, %xmm0
callq 0x4b7e
xorps %xmm0, %xmm0
movss 0x47438(%rip), %xmm1    # 0x4c008
callq 0x4c09
xorl %eax, %eax
testl %ebx, %ebx
movl $0x0, %ecx
cmovgl %ebx, %ecx
xorps %xmm1, %xmm1
cmpq %rax, %rcx
je 0x4bf9
subss (%r14,%rax,4), %xmm0
ucomiss %xmm0, %xmm1
jae 0x4bfd
incq %rax
jmp 0x4be4
decl %ebx
jmp 0x4bff
movl %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: max_int_index
int max_int_index(int *a, int n)
{
    if(n <= 0) return -1;
    int i, max_i = 0;
    int max = a[0];
    for(i = 1; i < n; ++i){
        if(a[i] > max){
            max = a[i];
            max_i = i;
        }
    }
    return max_i;
}

// Assembly:
testl %esi, %esi
jle 0x4c6f
movl (%rdi), %ecx
movl %esi, %edx
xorl %eax, %eax
pushq $0x1
popq %rsi
cmpq %rsi, %rdx
je 0x4c72
movl (%rdi,%rsi,4), %r8d
cmpl %ecx, %r8d
cmovgl %esi, %eax
cmovgl %r8d, %ecx
incq %rsi
jmp 0x4c57
pushq $-0x1
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: max_index
int max_index(float *a, int n)
{
    if(n <= 0) return -1;
    int i, max_i = 0;
    float max = a[0];
    for(i = 1; i < n; ++i){
        if(a[i] > max){
            max = a[i];
            max_i = i;
        }
    }
    return max_i;
}

// Assembly:
testl %esi, %esi
jle 0x4c9e
movss (%rdi), %xmm0
movl %esi, %ecx
xorl %eax, %eax
pushq $0x1
popq %rdx
cmpq %rdx, %rcx
je 0x4ca1
movss (%rdi,%rdx,4), %xmm1
ucomiss %xmm0, %xmm1
cmoval %edx, %eax
maxss %xmm0, %xmm1
incq %rdx
movaps %xmm1, %xmm0
jmp 0x4c82
pushq $-0x1
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: int_index
int int_index(int *a, int val, int n)
{
    int i;
    for(i = 0; i < n; ++i){
        if(a[i] == val) return i;
    }
    return -1;
}

// Assembly:
xorl %ecx, %ecx
testl %edx, %edx
cmovlel %ecx, %edx
pushq $-0x1
popq %rax
cmpq %rcx, %rdx
je 0x4cbd
cmpl %esi, (%rdi,%rcx,4)
je 0x4cbb
incq %rcx
jmp 0x4cac
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/utils.c
// Function: rand_normal
float rand_normal()
{
    static int haveSpare = 0;
    static double rand1, rand2;

    if(haveSpare)
    {
        haveSpare = 0;
        return sqrt(rand1) * sin(rand2);
    }

    haveSpare = 1;

    rand1 = rand() / ((double) RAND_MAX);
    if(rand1 < 1e-100) rand1 = 1e-100;
    rand1 = -2 * log(rand1);
    rand2 = (rand() / ((double) RAND_MAX)) * TWO_PI;

    return sqrt(rand1) * cos(rand2);
}

// Assembly:
pushq %rax
cmpb $0x1, 0x5faa9(%rip)     # 0x647a8
jne 0x4d20
movb $0x0, 0x5faa0(%rip)     # 0x647a8
movsd 0x5faa0(%rip), %xmm0    # 0x647b0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x4d92
sqrtsd %xmm0, %xmm0
jmp 0x4d97
movb $0x1, 0x5fa81(%rip)     # 0x647a8
callq 0x34e0
cvtsi2sd %eax, %xmm1
divsd 0x47320(%rip), %xmm1    # 0x4c058
movsd 0x47320(%rip), %xmm0    # 0x4c060
maxsd %xmm1, %xmm0
callq 0x31d0
mulsd 0x47317(%rip), %xmm0    # 0x4c068
movsd %xmm0, 0x5fa57(%rip)    # 0x647b0
callq 0x34e0
cvtsi2sd %eax, %xmm0
divsd 0x472ee(%rip), %xmm0    # 0x4c058
mulsd 0x472fe(%rip), %xmm0    # 0x4c070
movsd %xmm0, 0x5fa3e(%rip)    # 0x647b8
movsd 0x5fa2e(%rip), %xmm0    # 0x647b0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x4dab
sqrtsd %xmm0, %xmm0
jmp 0x4db0
callq 0x3460
movsd %xmm0, (%rsp)
movsd 0x5fa14(%rip), %xmm0    # 0x647b8
callq 0x33d0
jmp 0x4dc2
callq 0x3460
movsd %xmm0, (%rsp)
movsd 0x5f9fb(%rip), %xmm0    # 0x647b8
callq 0x31e0
mulsd (%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
popq %rax
retq