LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/SimpleDoger[P]Darknet_CPU_Only/go.c
// Function: run_mcts
mcts_tree *run_mcts(mcts_tree *tree, network *net, float *board, float *ko, int player, int n, float cpuct, float secs)
{
    int i;
    double t = what_time_is_it_now();
    if(player < 0) flip_board(board);
    if(!tree) tree = expand(copy_board(board), ko, net);
    assert(compare_board(tree->board, board));
    for(i = 0; i < n; ++i){
        if (secs > 0 && (what_time_is_it_now() - t) > secs) break;
        int max_i = max_int_index(tree->visit_count, 19*19+1);
        if (tree->visit_count[max_i] >= n) break;
        select_mcts(tree, net, ko, cpuct);
    }
    if(player < 0) flip_board(board);
    //fprintf(stderr, "%f Seconds\n", what_time_is_it_now() - t);
    return tree;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movss %xmm1, 0xc(%rsp)
movss %xmm0, 0x14(%rsp)
movl %r9d, %ebp
movl %r8d, %r14d
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %r12
xorl %eax, %eax
callq 0xdfdc
movsd %xmm0, 0x20(%rsp)
movl %r14d, 0x10(%rsp)
testl %r14d, %r14d
jns 0x44ae4
movq $-0x5a4, %rax           # imm = 0xFA5C
movss 0xe563(%rip), %xmm0     # 0x53008
movss 0x5a4(%rbx,%rax), %xmm1
movss 0xb48(%rbx,%rax), %xmm2
movss %xmm2, 0x5a4(%rbx,%rax)
movss %xmm1, 0xb48(%rbx,%rax)
movaps %xmm0, %xmm1
subss 0x10ec(%rbx,%rax), %xmm1
movss %xmm1, 0x10ec(%rbx,%rax)
addq $0x4, %rax
jne 0x44aa5
testq %r12, %r12
jne 0x44b24
movl $0x43b, %edi            # imm = 0x43B
movl $0x4, %esi
callq 0x3260
movq %rax, %r12
movl $0x43b, %edi            # imm = 0x43B
movq %rbx, %rsi
movl $0x1, %edx
movq %rax, %rcx
movl $0x1, %r8d
callq 0x2879c
movq %r12, %rdi
movq %r13, %rdx
callq 0x44539
movq %rax, %r12
movq (%r12), %rdi
movl $0x10ec, %edx           # imm = 0x10EC
movq %rbx, %rsi
callq 0x3340
testl %eax, %eax
jne 0x44c12
testl %ebp, %ebp
jle 0x44bab
xorps %xmm0, %xmm0
cvtss2sd 0xc(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movl %ebp, %r14d
movss 0xc(%rsp), %xmm0
ucomiss 0xe518(%rip), %xmm0     # 0x53078
jbe 0x44b77
xorl %eax, %eax
callq 0xdfdc
subsd 0x20(%rsp), %xmm0
ucomisd 0x18(%rsp), %xmm0
ja 0x44bab
movq 0x18(%r12), %rdi
movl $0x16a, %esi            # imm = 0x16A
callq 0xf245
movq 0x18(%r12), %rcx
cltq
cmpl %ebp, (%rcx,%rax,4)
jge 0x44bab
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
movss 0x14(%rsp), %xmm0
callq 0x446e0
decl %r14d
jne 0x44b53
cmpl $0x0, 0x10(%rsp)
jns 0x44c00
movq $-0x5a4, %rax           # imm = 0xFA5C
movss 0xe447(%rip), %xmm0     # 0x53008
movss 0x5a4(%rbx,%rax), %xmm1
movss 0xb48(%rbx,%rax), %xmm2
movss %xmm2, 0x5a4(%rbx,%rax)
movss %xmm1, 0xb48(%rbx,%rax)
movaps %xmm0, %xmm1
subss 0x10ec(%rbx,%rax), %xmm1
movss %xmm1, 0x10ec(%rbx,%rax)
addq $0x4, %rax
jne 0x44bc1
movq %r12, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x13758(%rip), %rdi     # 0x58371
leaq 0x13773(%rip), %rsi     # 0x58393
leaq 0x13771(%rip), %rcx     # 0x58398
movl $0x1f9, %edx            # imm = 0x1F9
callq 0x31c0
// File: /workspace/github_c_makefile_star2_O1/SimpleDoger[P]Darknet_CPU_Only/go.c
// Function: move_mcts
mcts_tree *move_mcts(mcts_tree *tree, int index)
{
    if(index < 0 || index > 19*19 || !tree || !tree->children[index]) {
        free_mcts(tree);
        tree = 0;
    } else {
        mcts_tree *swap = tree;
        tree = tree->children[index];
        swap->children[index] = 0;
        free_mcts(swap);
    }
    return tree;
}

// Assembly:
pushq %rbx
cmpl $0x16a, %esi            # imm = 0x16A
setae %al
testq %rdi, %rdi
sete %cl
orb %al, %cl
jne 0x44c63
movq 0x8(%rdi), %rax
movl %esi, %ecx
movq (%rax,%rcx,8), %rbx
testq %rbx, %rbx
je 0x44c63
movq $0x0, (%rax,%rcx,8)
callq 0x442a8
jmp 0x44c6a
callq 0x442a8
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/SimpleDoger[P]Darknet_CPU_Only/go.c
// Function: suicide_go
int suicide_go(float *b, int p, int r, int c)
{
    int *l = calculate_liberties(b);
    int safe = 0;
    safe = safe || makes_safe_go(b, l, p, r+1, c);
    safe = safe || makes_safe_go(b, l, p, r-1, c);
    safe = safe || makes_safe_go(b, l, p, r, c+1);
    safe = safe || makes_safe_go(b, l, p, r, c-1);
    free(l);
    return !safe;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r14d
movl %edx, %r15d
movl %esi, %ebp
movq %rdi, %r12
callq 0x43f36
movq %rax, %rbx
leal 0x1(%r15), %ecx
movq %r12, %rdi
movq %rax, %rsi
movl %ebp, %edx
movl %r14d, %r8d
callq 0x44d0f
xorl %r13d, %r13d
testl %eax, %eax
jne 0x44cf5
leal -0x1(%r15), %ecx
movq %r12, %rdi
movq %rbx, %rsi
movl %ebp, %edx
movl %r14d, %r8d
callq 0x44d0f
testl %eax, %eax
jne 0x44cf5
leal 0x1(%r14), %r8d
movq %r12, %rdi
movq %rbx, %rsi
movl %ebp, %edx
movl %r15d, %ecx
callq 0x44d0f
testl %eax, %eax
jne 0x44cf5
decl %r14d
movq %r12, %rdi
movq %rbx, %rsi
movl %ebp, %edx
movl %r15d, %ecx
movl %r14d, %r8d
callq 0x44d0f
movl %eax, %r13d
xorl $0x1, %r13d
movq %rbx, %rdi
callq 0x3040
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/SimpleDoger[P]Darknet_CPU_Only/go.c
// Function: makes_safe_go
static int makes_safe_go(float *b, int *lib, int p, int r, int c){
    if (r < 0 || r >= 19 || c < 0 || c >= 19) return 0;
    if (occupied(b,r*19 + c) == -p){
        if (lib[r*19 + c] > 1) return 0;
        else return 1;
    }
    if (!occupied(b,r*19 + c)) return 1;
    if (lib[r*19 + c] > 1) return 1;
    return 0;
}

// Assembly:
cmpl $0x13, %ecx
setae %al
cmpl $0x13, %r8d
setae %r9b
orb %al, %r9b
je 0x44d26
xorl %ecx, %ecx
jmp 0x44d83
leal (%rcx,%rcx,8), %eax
leal (%rcx,%rax,2), %eax
addl %r8d, %eax
movss (%rdi,%rax,4), %xmm0
movl $0x1, %ecx
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x44d51
jp 0x44d51
cmpneqss 0x5a4(%rdi,%rax,4), %xmm1
movd %xmm1, %ecx
addl %edx, %ecx
jne 0x44d5e
cmpl $0x2, (%rsi,%rax,4)
setl %cl
jmp 0x44d83
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x44d68
jnp 0x44d71
cmpl $0x2, (%rsi,%rax,4)
setge %cl
jmp 0x44d83
movss 0x5a4(%rdi,%rax,4), %xmm0
movb $0x1, %cl
ucomiss %xmm1, %xmm0
jne 0x44d68
jp 0x44d68
movzbl %cl, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/SimpleDoger[P]Darknet_CPU_Only/go.c
// Function: check_ko
int check_ko(float *x, float *ko)
{
    if(!ko) return 0;
    float curr[19*19*3];
    copy_cpu(19*19*3, x, 1, curr, 1);
    if(curr[19*19*2] != ko[19*19*2]) flip_board(curr);
    if(compare_board(curr, ko)) return 1;
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x10f8, %rsp           # imm = 0x10F8
movq %rsi, %rbx
testq %rsi, %rsi
je 0x44e38
movq %rdi, %rsi
movq %rsp, %r14
movl $0x43b, %edi            # imm = 0x43B
movl $0x1, %edx
movq %r14, %rcx
movl $0x1, %r8d
callq 0x2879c
movss 0xb48(%r14), %xmm0
ucomiss 0xb48(%rbx), %xmm0
jne 0x44dcf
jnp 0x44e1d
movq $-0x5a4, %rax           # imm = 0xFA5C
movss 0xe22a(%rip), %xmm0     # 0x53008
movss 0x5a4(%rsp,%rax), %xmm1
movss 0xb48(%rsp,%rax), %xmm2
movss %xmm2, 0x5a4(%rsp,%rax)
movss %xmm1, 0xb48(%rsp,%rax)
movaps %xmm0, %xmm1
subss 0x10ec(%rsp,%rax), %xmm1
movss %xmm1, 0x10ec(%rsp,%rax)
addq $0x4, %rax
jne 0x44dde
movq %rsp, %rdi
movl $0x10ec, %edx           # imm = 0x10EC
movq %rbx, %rsi
callq 0x3340
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
sete %al
jmp 0x44e3a
xorl %eax, %eax
addq $0x10f8, %rsp           # imm = 0x10F8
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/SimpleDoger[P]Darknet_CPU_Only/go.c
// Function: valid_go
void valid_go(char *cfgfile, char *weightfile, int multi, char *filename)
{
    srand(time(0));
    char *base = basecfg(cfgfile);
    printf("%s\n", base);
    network *net = load_network(cfgfile, weightfile, 0);
    set_batch_network(net, 1);
    printf("Learning Rate: %g, Momentum: %g, Decay: %g\n", net->learning_rate, net->momentum, net->decay);

    float *board = calloc(19*19*3, sizeof(float));
    float *move = calloc(19*19+2, sizeof(float));
    // moves m = load_go_moves("/home/pjreddie/backup/go.test");
    moves m = load_go_moves(filename);

    int N = m.n;
    int i,j;
    int correct = 0;
    for (i = 0; i <N; ++i) {
        char *b = m.data[i];
        int player = b[0] - '0';
        //int result = b[1] - '0';
        int row = b[2];
        int col = b[3];
        int truth = col + 19*row;
        string_to_board(b+4, board);
        if(player > 0) for(j = 0; j < 19*19; ++j) board[19*19*2 + j] = 1;
        predict_move2(net, board, move, multi);
        int index = max_index(move, 19*19+1);
        if(index == truth) ++correct;
        printf("%d Accuracy %f\n", i, (float) correct/(i+1));
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r13
movl %edx, 0x4(%rsp)
movq %rsi, %r14
movq %rdi, %r15
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x32d0
movl %eax, %edi
callq 0x3230
movq %r15, %rdi
callq 0xe717
movq %rax, %rdi
callq 0x30c0
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x2f9e4
movq %rax, %r14
movq %rax, %rdi
movl $0x1, %esi
callq 0x302d4
cvtss2sd 0x34(%r14), %xmm0
cvtss2sd 0x38(%r14), %xmm1
movq %r14, 0x20(%rsp)
cvtss2sd 0x3c(%r14), %xmm2
leaq 0x12fdd(%rip), %rdi     # 0x57e98
movb $0x3, %al
callq 0x3170
movl $0x43b, %edi            # imm = 0x43B
movl $0x4, %esi
callq 0x3260
movq %rax, %r15
movl $0x16b, %edi            # imm = 0x16B
movl $0x4, %esi
callq 0x3260
movq %rax, 0x18(%rsp)
movq %r13, %rdi
callq 0x43189
movq %rax, 0x10(%rsp)
testl %edx, %edx
jle 0x44fbb
movl %edx, %eax
movq %rax, 0x8(%rsp)
xorl %ebp, %ebp
movq 0x10(%rsp), %rax
movq (%rax,%rbp,8), %rdi
movb (%rdi), %r12b
movsbl 0x2(%rdi), %r14d
movsbl 0x3(%rdi), %r13d
addq $0x4, %rdi
movq %r15, %rsi
callq 0x43234
cmpb $0x31, %r12b
jl 0x44f47
xorl %eax, %eax
movl $0x3f800000, 0xb48(%r15,%rax,4) # imm = 0x3F800000
incq %rax
cmpq $0x169, %rax            # imm = 0x169
jne 0x44f30
leal (%r14,%r14,8), %eax
leal (%r14,%rax,2), %r14d
addl %r13d, %r14d
movq 0x20(%rsp), %rdi
movq %r15, %rsi
movq 0x18(%rsp), %r12
movq %r12, %rdx
movl 0x4(%rsp), %ecx
callq 0x43c90
movq %r12, %rdi
movl $0x16a, %esi            # imm = 0x16A
callq 0xf278
xorl %ecx, %ecx
cmpl %r14d, %eax
sete %cl
addl %ecx, %ebx
xorps %xmm0, %xmm0
cvtsi2ss %ebx, %xmm0
leaq 0x1(%rbp), %r14
xorps %xmm1, %xmm1
cvtsi2ss %r14d, %xmm1
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x134a1(%rip), %rdi     # 0x58445
movl %ebp, %esi
movb $0x1, %al
callq 0x3170
movq %r14, %rbp
cmpq 0x8(%rsp), %r14
jne 0x44f06
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/SimpleDoger[P]Darknet_CPU_Only/go.c
// Function: print_game
int print_game(float *board, FILE *fp)
{
    int i, j;
    int count = 3;
    fprintf(fp, "komi 6.5\n");
    fprintf(fp, "boardsize 19\n");
    fprintf(fp, "clear_board\n");
    for(j = 0; j < 19; ++j){
        for(i = 0; i < 19; ++i){
            if(occupied(board,j*19 + i) == 1) fprintf(fp, "play black %c%d\n", 'A'+i+(i>=8), 19-j);
            if(occupied(board,j*19 + i) == -1) fprintf(fp, "play white %c%d\n", 'A'+i+(i>=8), 19-j);
            if(occupied(board,j*19 + i)) ++count;
        }
    }
    return count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x13473(%rip), %rdi     # 0x58455
movl $0x9, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3450
leaq 0x13464(%rip), %rdi     # 0x5845f
movl $0xd, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3450
leaq 0x13459(%rip), %rdi     # 0x5846d
movl $0xc, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3450
movl $0x3, %ebp
xorps %xmm1, %xmm1
leaq 0x13445(%rip), %r15     # 0x5847a
xorl %eax, %eax
movl $0x13, %r13d
movq %rax, (%rsp)
subl %eax, %r13d
xorl %r12d, %r12d
movss (%r14,%r12,4), %xmm0
ucomiss %xmm1, %xmm0
jne 0x45054
jnp 0x45074
cmpq $0x8, %r12
movl %r12d, %edx
sbbl $-0x1, %edx
addl $0x41, %edx
movq %rbx, %rdi
movq %r15, %rsi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x3280
xorps %xmm1, %xmm1
movss (%r14,%r12,4), %xmm0
ucomiss %xmm1, %xmm0
jne 0x450b6
jp 0x450b6
movss 0x5a4(%r14,%r12,4), %xmm0
ucomiss %xmm1, %xmm0
jne 0x45092
jnp 0x450b6
cmpq $0x8, %r12
movl %r12d, %edx
sbbl $-0x1, %edx
addl $0x41, %edx
movq %rbx, %rdi
leaq 0x133e2(%rip), %rsi     # 0x5848b
movl %r13d, %ecx
xorl %eax, %eax
callq 0x3280
xorps %xmm1, %xmm1
movss (%r14,%r12,4), %xmm0
movl $0x1, %eax
ucomiss %xmm1, %xmm0
jne 0x450de
jp 0x450de
movss 0x5a4(%r14,%r12,4), %xmm0
cmpneqss %xmm1, %xmm0
movd %xmm0, %eax
andl $0x1, %eax
addl %eax, %ebp
incq %r12
cmpq $0x13, %r12
jne 0x45047
movq (%rsp), %rax
incq %rax
addq $0x4c, %r14
cmpq $0x13, %rax
jne 0x45037
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/SimpleDoger[P]Darknet_CPU_Only/go.c
// Function: stdin_ready
int stdin_ready()
{
    fd_set readfds;
    FD_ZERO(&readfds);

    struct timeval timeout;
    timeout.tv_sec = 0;
    timeout.tv_usec = 0;
    FD_SET(STDIN_FILENO, &readfds);

    if (select(1, &readfds, NULL, NULL, &timeout)){
        return 1;
    }
    return 0;
}

// Assembly:
subq $0x98, %rsp
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rsi
movaps %xmm0, 0x70(%rsi)
movaps %xmm0, 0x60(%rsi)
movaps %xmm0, 0x50(%rsi)
movaps %xmm0, 0x40(%rsi)
movaps %xmm0, 0x30(%rsi)
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
movq %rsp, %r8
movaps %xmm0, (%r8)
movq $0x1, (%rsi)
movl $0x1, %edi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x32e0
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
movl %ecx, %eax
addq $0x98, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/SimpleDoger[P]Darknet_CPU_Only/go.c
// Function: score_game
float score_game(float *board)
{
    int i;
    FILE *f = fopen("game.txt", "w");
    int count = print_game(board, f);
    fprintf(f, "final_score\n");
    fclose(f);
    FILE *p = popen("./gnugo --mode gtp < game.txt", "r");
    for(i = 0; i < count; ++i){
        free(fgetl(p));
        free(fgetl(p));
    }
    char *l = 0;
    float score = 0;
    char player = 0;
    while((l = fgetl(p))){
        fprintf(stderr, "%s  \t", l);
        int n = sscanf(l, "= %c+%f", &player, &score);
        free(l);
        if (n == 2) break;
    }
    if(player == 'W') score = -score;
    pclose(p);
    return score;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x12087(%rip), %rdi     # 0x587b5
leaq 0x12a9a(%rip), %rsi     # 0x591cf
callq 0x33a0
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x44fca
movl %eax, %ebp
leaq 0x12129(%rip), %rdi     # 0x5887a
movl $0xc, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x3450
movq %r14, %rdi
callq 0x3140
leaq 0x1202e(%rip), %rdi     # 0x587a0
leaq 0x12558(%rip), %rsi     # 0x58cd1
callq 0x3390
movq %rax, %rbx
testl %ebp, %ebp
jle 0x467a9
movq %rbx, %rdi
callq 0xe165
movq %rax, %rdi
callq 0x3040
movq %rbx, %rdi
callq 0xe165
movq %rax, %rdi
callq 0x3040
decl %ebp
jne 0x46785
leaq 0x4(%rsp), %r14
movl $0x0, (%r14)
leaq 0x3(%rsp), %r15
movb $0x0, (%r15)
movq %rbx, %rdi
callq 0xe165
testq %rax, %rax
je 0x467dd
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x9df0
testb $0x1, %al
je 0x467be
cmpb $0x57, 0x3(%rsp)
jne 0x467f7
movss 0x4(%rsp), %xmm0
xorps 0xc95f(%rip), %xmm0     # 0x53150
movss %xmm0, 0x4(%rsp)
movq %rbx, %rdi
callq 0x3180
movss 0x4(%rsp), %xmm0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/SimpleDoger[P]Darknet_CPU_Only/go.c
// Function: propagate_liberty
static void propagate_liberty(float *board, int *lib, int *visited, int row, int col, int side)
{
    if (row < 0 || row > 18 || col < 0 || col > 18) return;
    int index = row*19 + col;
    if (occupied(board,index) != side) return;
    if (visited[index]) return;
    visited[index] = 1;
    lib[index] += 1;
    propagate_liberty(board, lib, visited, row+1, col, side);
    propagate_liberty(board, lib, visited, row-1, col, side);
    propagate_liberty(board, lib, visited, row, col+1, side);
    propagate_liberty(board, lib, visited, row, col-1, side);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %ebx
movl %r8d, %r14d
movl %ecx, %r15d
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
leal (%r15,%r15,8), %eax
leal (%r15,%rax,2), %eax
movq %rax, 0x10(%rsp)
leal 0x1(%r15), %eax
movl %eax, 0xc(%rsp)
leal -0x1(%r15), %eax
movl %eax, 0x8(%rsp)
cmpl $0x12, %r15d
ja 0x47036
cmpl $0x12, %r14d
ja 0x47036
movq 0x10(%rsp), %rax
addl %r14d, %eax
movss (%rbp,%rax,4), %xmm0
movl $0x1, %ecx
ucomiss 0xc0c4(%rip), %xmm0     # 0x53078
jne 0x46fce
jp 0x46fce
movss 0x5a4(%rbp,%rax,4), %xmm0
cmpneqss 0xc0ae(%rip), %xmm0     # 0x53078
movd %xmm0, %ecx
cmpl %ebx, %ecx
jne 0x47036
cmpl $0x0, (%r12,%rax,4)
jne 0x47036
movl $0x1, (%r12,%rax,4)
incl (%r13,%rax,4)
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
movl 0xc(%rsp), %ecx
movl %r14d, %r8d
movl %ebx, %r9d
callq 0x46f49
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
movl 0x8(%rsp), %ecx
movl %r14d, %r8d
movl %ebx, %r9d
callq 0x46f49
leal 0x1(%r14), %r8d
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
movl %r15d, %ecx
movl %ebx, %r9d
callq 0x46f49
decl %r14d
jmp 0x46f86
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/SimpleDoger[P]Darknet_CPU_Only/rnn.c
// Function: load_files
unsigned char **load_files(char *filename, int *n)
{
    list *paths = get_paths(filename);
    *n = paths->size;
    unsigned char **contents = calloc(*n, sizeof(char *));
    int i;
    node *x = paths->front;
    for(i = 0; i < *n; ++i){
        contents[i] = read_file((char *)x->val);
        x = x->next;
    }
    return contents;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
callq 0x296f8
movq %rax, %r14
movslq (%rax), %r12
movl %r12d, (%rbx)
movl $0x8, %esi
movq %r12, %rdi
callq 0x3260
movq %rax, %r15
testq %r12, %r12
jle 0x47094
xorl %r12d, %r12d
movq 0x8(%r14), %r14
movq (%r14), %rdi
callq 0xe97b
movq %rax, (%r15,%r12,8)
incq %r12
movslq (%rbx), %rax
cmpq %rax, %r12
jl 0x47079
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/SimpleDoger[P]Darknet_CPU_Only/rnn.c
// Function: read_tokenized_data
int *read_tokenized_data(char *filename, size_t *read)
{
    size_t size = 512;
    size_t count = 0;
    FILE *fp = fopen(filename, "r");
    int *d = calloc(size, sizeof(int));
    int n, one;
    one = fscanf(fp, "%d", &n);
    while(one == 1){
        ++count;
        if(count > size){
            size = size*2;
            d = realloc(d, size*sizeof(int));
        }
        d[count-1] = n;
        one = fscanf(fp, "%d", &n);
    }
    fclose(fp);
    d = realloc(d, count*sizeof(int));
    *read = count;
    return d;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x10(%rsp)
leaq 0x11c14(%rip), %rsi     # 0x58cd1
callq 0x33a0
movq %rax, %r14
movl $0x200, %r12d           # imm = 0x200
movl $0x200, %edi            # imm = 0x200
movl $0x4, %esi
callq 0x3260
movq %rax, %r15
leaq 0x11b2e(%rip), %rsi     # 0x58c12
xorl %r13d, %r13d
leaq 0xc(%rsp), %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x30b0
cmpl $0x1, %eax
jne 0x47154
leaq 0x11b10(%rip), %rbp     # 0x58c12
xorl %ebx, %ebx
leaq 0x1(%rbx), %r13
cmpq %r12, %r13
jbe 0x47132
movq %r15, %rdi
movq %r14, %r15
movq %rbp, %r14
leaq (%r12,%r12), %rbp
shlq $0x3, %r12
movq %r12, %rsi
callq 0x3360
movq %rbp, %r12
movq %r14, %rbp
movq %r15, %r14
movq %rax, %r15
movl 0xc(%rsp), %eax
movl %eax, (%r15,%rbx,4)
movq %r14, %rdi
movq %rbp, %rsi
leaq 0xc(%rsp), %rdx
xorl %eax, %eax
callq 0x30b0
movq %r13, %rbx
cmpl $0x1, %eax
je 0x47104
movq %r14, %rdi
callq 0x3140
leaq (,%r13,4), %rsi
movq %r15, %rdi
callq 0x3360
movq 0x10(%rsp), %rcx
movq %r13, (%rcx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/SimpleDoger[P]Darknet_CPU_Only/rnn.c
// Function: read_tokens
char **read_tokens(char *filename, size_t *read)
{
    size_t size = 512;
    size_t count = 0;
    FILE *fp = fopen(filename, "r");
    char **d = calloc(size, sizeof(char *));
    char *line;
    while((line=fgetl(fp)) != 0){
        ++count;
        if(count > size){
            size = size*2;
            d = realloc(d, size*sizeof(char *));
        }
        if(0==strcmp(line, "<NEWLINE>")) line = "\n";
        d[count-1] = line;
    }
    fclose(fp);
    d = realloc(d, count*sizeof(char *));
    *read = count;
    return d;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, (%rsp)
leaq 0x11b38(%rip), %rsi     # 0x58cd1
callq 0x33a0
movq %rax, %r14
movl $0x200, %r12d           # imm = 0x200
movl $0x200, %edi            # imm = 0x200
movl $0x8, %esi
callq 0x3260
movq %rax, %r15
movq %r14, %rdi
callq 0xe165
testq %rax, %rax
je 0x47228
movq %rax, %r13
xorl %ebx, %ebx
leaq 0x1(%rbx), %rbp
cmpq %r12, %rbp
jbe 0x471f3
movq %r15, %rdi
movq %r14, %r15
leaq (%r12,%r12), %r14
shlq $0x4, %r12
movq %r12, %rsi
callq 0x3360
movq %r14, %r12
movq %r15, %r14
movq %rax, %r15
movq %r13, %rdi
leaq 0x11743(%rip), %rsi     # 0x58940
callq 0x3270
testl %eax, %eax
leaq 0x112fe(%rip), %rax     # 0x58509
cmoveq %rax, %r13
movq %r13, (%r15,%rbx,8)
movq %r14, %rdi
callq 0xe165
movq %rax, %r13
movq %rbp, %rbx
testq %rax, %rax
jne 0x471cb
jmp 0x4722a
xorl %ebp, %ebp
movq %r14, %rdi
callq 0x3140
leaq (,%rbp,8), %rsi
movq %r15, %rdi
callq 0x3360
movq (%rsp), %rcx
movq %rbp, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/SimpleDoger[P]Darknet_CPU_Only/rnn.c
// Function: get_rnn_token_data
float_pair get_rnn_token_data(int *tokens, size_t *offsets, int characters, size_t len, int batch, int steps)
{
    float *x = calloc(batch * steps * characters, sizeof(float));
    float *y = calloc(batch * steps * characters, sizeof(float));
    int i,j;
    for(i = 0; i < batch; ++i){
        for(j = 0; j < steps; ++j){
            int curr = tokens[(offsets[i])%len];
            int next = tokens[(offsets[i] + 1)%len];

            x[(j*batch + i)*characters + curr] = 1;
            y[(j*batch + i)*characters + next] = 1;

            offsets[i] = (offsets[i] + 1) % len;

            if(curr >= characters || curr < 0 || next >= characters || next < 0){
                error("Bad char");
            }
        }
    }
    float_pair p;
    p.x = x;
    p.y = y;
    return p;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r8d, %r14d
movq %rcx, 0x30(%rsp)
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r12
movl %r8d, %eax
imull %edx, %eax
movl %eax, 0x14(%rsp)
movl %r9d, 0x4(%rsp)
imull %r9d, %eax
movslq %eax, %rbx
movl $0x4, %esi
movq %rbx, %rdi
callq 0x3260
movq %rax, 0x20(%rsp)
movl $0x4, %esi
movq %rbx, %rdi
callq 0x3260
movq %rax, 0x18(%rsp)
testl %r14d, %r14d
jle 0x47386
movl %ebp, %edi
movl %r14d, %eax
movq %rax, 0x28(%rsp)
movq $0x0, 0x8(%rsp)
xorl %ebx, %ebx
cmpl $0x0, 0x4(%rsp)
jle 0x4736c
movq 0x8(%rsp), %r13
movl 0x4(%rsp), %ebp
movq (%r15,%rbx,8), %rcx
movq %rcx, %rax
xorl %edx, %edx
movq 0x30(%rsp), %r8
divq %r8
movl (%r12,%rdx,4), %esi
incq %rcx
movq %rcx, %rax
xorl %edx, %edx
divq %r8
movl (%r12,%rdx,4), %eax
leal (%rsi,%r13), %ecx
movslq %ecx, %rcx
movq 0x20(%rsp), %r8
movl $0x3f800000, %r9d       # imm = 0x3F800000
movl %r9d, (%r8,%rcx,4)
leal (%r13,%rax), %ecx
movslq %ecx, %rcx
movq 0x18(%rsp), %r8
movl %r9d, (%r8,%rcx,4)
movq %rdx, (%r15,%rbx,8)
cmpl %edi, %esi
setge %cl
testl %esi, %esi
sets %dl
orb %cl, %dl
jne 0x4734d
cmpl %edi, %eax
setl %cl
testl %eax, %eax
setns %al
testb %al, %cl
jne 0x4735f
movl %edi, %r14d
leaq 0x115f3(%rip), %rdi     # 0x5894a
callq 0xe956
movl %r14d, %edi
addl 0x14(%rsp), %r13d
decl %ebp
jne 0x472e2
incq %rbx
movq 0x8(%rsp), %rax
addl %edi, %eax
movq %rax, 0x8(%rsp)
cmpq 0x28(%rsp), %rbx
jne 0x472ce
movq 0x20(%rsp), %rax
movq 0x18(%rsp), %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/SimpleDoger[P]Darknet_CPU_Only/rnn.c
// Function: get_seq2seq_data
float_pair get_seq2seq_data(char **source, char **dest, int n, int characters, size_t len, int batch, int steps)
{
    int i,j;
    float *x = calloc(batch * steps * characters, sizeof(float));
    float *y = calloc(batch * steps * characters, sizeof(float));
    for(i = 0; i < batch; ++i){
        int index = rand()%n;
        //int slen = strlen(source[index]);
        //int dlen = strlen(dest[index]);
        for(j = 0; j < steps; ++j){
            unsigned char curr = source[index][j];
            unsigned char next = dest[index][j];

            x[(j*batch + i)*characters + curr] = 1;
            y[(j*batch + i)*characters + next] = 1;

            if(curr > 255 || curr <= 0 || next > 255 || next <= 0){
                /*text[(index+j+2)%len] = 0;
                printf("%ld %d %d %d %d\n", index, j, len, (int)text[index+j], (int)text[index+j+1]);
                printf("%s", text+index);
                */
                error("Bad char");
            }
        }
    }
    float_pair p;
    p.x = x;
    p.y = y;
    return p;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, %ebx
movl %edx, 0x14(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdi, 0x38(%rsp)
movl %r9d, %eax
movl %ecx, 0x18(%rsp)
imull %ecx, %eax
movl %eax, 0x1c(%rsp)
imull 0x80(%rsp), %eax
movslq %eax, %r13
movl $0x4, %esi
movq %r13, %rdi
callq 0x3260
movq %rax, 0x20(%rsp)
movl $0x4, %esi
movq %r13, %rdi
callq 0x3260
movq %rax, %r13
testl %ebx, %ebx
jle 0x474bd
movl %ebx, %eax
movq %rax, 0x28(%rsp)
movl 0x80(%rsp), %ebx
movq $0x0, 0x8(%rsp)
movl $0x3f800000, %r14d      # imm = 0x3F800000
xorl %ecx, %ecx
movq %rcx, 0x30(%rsp)
callq 0x34f0
cmpl $0x0, 0x80(%rsp)
jle 0x4749c
cltd
idivl 0x14(%rsp)
movslq %edx, %r15
movq 0x8(%rsp), %rbp
xorl %r12d, %r12d
movq 0x38(%rsp), %rax
movq (%rax,%r15,8), %rax
movzbl (%rax,%r12), %ecx
movq 0x40(%rsp), %rax
movq (%rax,%r15,8), %rax
movzbl (%rax,%r12), %eax
leal (%rbp,%rcx), %edx
leal (%rbp,%rax), %esi
movslq %edx, %rdx
movq 0x20(%rsp), %rdi
movl %r14d, (%rdi,%rdx,4)
movslq %esi, %rdx
movl %r14d, (%r13,%rdx,4)
testl %ecx, %ecx
je 0x47484
testb %al, %al
jne 0x47490
leaq 0x114bf(%rip), %rdi     # 0x5894a
callq 0xe956
incq %r12
addl 0x1c(%rsp), %ebp
cmpq %r12, %rbx
jne 0x47444
movq 0x30(%rsp), %rcx
incq %rcx
movq 0x8(%rsp), %rax
addl 0x18(%rsp), %eax
movq %rax, 0x8(%rsp)
cmpq 0x28(%rsp), %rcx
jne 0x47420
movq 0x20(%rsp), %rax
movq %r13, %rdx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/SimpleDoger[P]Darknet_CPU_Only/rnn.c
// Function: get_rnn_data
float_pair get_rnn_data(unsigned char *text, size_t *offsets, int characters, size_t len, int batch, int steps)
{
    float *x = calloc(batch * steps * characters, sizeof(float));
    float *y = calloc(batch * steps * characters, sizeof(float));
    int i,j;
    for(i = 0; i < batch; ++i){
        for(j = 0; j < steps; ++j){
            unsigned char curr = text[(offsets[i])%len];
            unsigned char next = text[(offsets[i] + 1)%len];

            x[(j*batch + i)*characters + curr] = 1;
            y[(j*batch + i)*characters + next] = 1;

            offsets[i] = (offsets[i] + 1) % len;

            if(curr > 255 || curr <= 0 || next > 255 || next <= 0){
                /*text[(index+j+2)%len] = 0;
                printf("%ld %d %d %d %d\n", index, j, len, (int)text[index+j], (int)text[index+j+1]);
                printf("%s", text+index);
                */
                error("Bad char");
            }
        }
    }
    float_pair p;
    p.x = x;
    p.y = y;
    return p;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r8d, %ebx
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl %r8d, %eax
movl %edx, 0x18(%rsp)
imull %edx, %eax
movl %eax, 0x1c(%rsp)
movl %r9d, 0xc(%rsp)
imull %r9d, %eax
movslq %eax, %rbp
movl $0x4, %esi
movq %rbp, %rdi
callq 0x3260
movq %rax, 0x20(%rsp)
movl $0x4, %esi
movq %rbp, %rdi
callq 0x3260
movq %rax, %r9
testl %ebx, %ebx
jle 0x475fe
movl %ebx, %eax
movq %rax, 0x28(%rsp)
movq $0x0, 0x10(%rsp)
movl $0x3f800000, %r10d      # imm = 0x3F800000
xorl %r13d, %r13d
movq %r12, 0x30(%rsp)
cmpl $0x0, 0xc(%rsp)
jle 0x475e2
movq 0x10(%rsp), %rax
movl %eax, %ebp
movl 0xc(%rsp), %ebx
movq (%r15,%r13,8), %rcx
movq %rcx, %rax
xorl %edx, %edx
divq %r14
movzbl (%r12,%rdx), %esi
testl %esi, %esi
setne %dil
incq %rcx
movq %rcx, %rax
xorl %edx, %edx
divq %r14
movzbl (%r12,%rdx), %eax
testl %eax, %eax
setne %cl
addl %ebp, %esi
movslq %esi, %rsi
movq 0x20(%rsp), %r8
movl %r10d, (%r8,%rsi,4)
addl %ebp, %eax
cltq
movl %r10d, (%r9,%rax,4)
movq %rdx, (%r15,%r13,8)
testb %cl, %dil
jne 0x475da
leaq 0x11392(%rip), %rdi     # 0x5894a
movq %r15, %r12
movq %r14, %r15
movq %r9, %r14
callq 0xe956
movl $0x3f800000, %r10d      # imm = 0x3F800000
movq %r14, %r9
movq %r15, %r14
movq %r12, %r15
movq 0x30(%rsp), %r12
addl 0x1c(%rsp), %ebp
decl %ebx
jne 0x47566
incq %r13
movq 0x10(%rsp), %rax
addl 0x18(%rsp), %eax
movq %rax, 0x10(%rsp)
cmpq 0x28(%rsp), %r13
jne 0x47550
movq 0x20(%rsp), %rax
movq %r9, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/SimpleDoger[P]Darknet_CPU_Only/regressor.c
// Function: predict_regressor
void predict_regressor(char *cfgfile, char *weightfile, char *filename)
{
    network *net = load_network(cfgfile, weightfile, 0);
    set_batch_network(net, 1);
    srand(2222222);

    clock_t time;
    char buff[256];
    char *input = buff;
    while(1){
        if(filename){
            strncpy(input, filename, 256);
        }else{
            printf("Enter Image Path: ");
            fflush(stdout);
            input = fgets(input, 256, stdin);
            if(!input) return;
            strtok(input, "\n");
        }
        image im = load_image_color(input, 0, 0);
        image sized = letterbox_image(im, net->w, net->h);

        float *X = sized.data;
        time=clock();
        float *predictions = network_predict(net, X);
        printf("Predicted: %f\n", predictions[0]);
        printf("%s: Predicted in %f seconds.\n", input, sec(clock()-time));
        free_image(im);
        free_image(sized);
        if (filename) break;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movq %rdx, %rbx
xorl %edx, %edx
callq 0x2f9e4
movq %rax, %r14
movq %rax, %rdi
movl $0x1, %esi
callq 0x302d4
movl $0x21e88e, %edi         # imm = 0x21E88E
callq 0x3230
leaq 0x50(%rsp), %r13
leaq 0xf26b(%rip), %rbp      # 0x57fe4
testq %rbx, %rbx
je 0x48d90
movl $0x100, %edx            # imm = 0x100
movq %r13, %rdi
movq %rbx, %rsi
callq 0x3080
jmp 0x48ddf
leaq 0xf273(%rip), %rdi      # 0x5800a
xorl %eax, %eax
callq 0x3170
movq 0x2122b(%rip), %rax     # 0x69fd0
movq (%rax), %rdi
callq 0x3320
movq 0x21224(%rip), %rax     # 0x69fd8
movq (%rax), %rdx
movq %r13, %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x3240
testq %rax, %rax
je 0x48ea2
movq %rax, %r13
movq %rax, %rdi
leaq 0xf72f(%rip), %rsi      # 0x58509
callq 0x33c0
leaq 0x20(%rsp), %rdi
movq %r13, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x160b6
movl 0x90(%r14), %edx
movl 0x94(%r14), %esi
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x38(%rsp), %rdi
callq 0x1905c
movq 0x48(%rsp), %r12
callq 0x3130
movq %rax, %r15
movq %r14, %rdi
movq %r12, %rsi
callq 0x307ea
xorps %xmm0, %xmm0
cvtss2sd (%rax), %xmm0
leaq 0xfcfa(%rip), %rdi      # 0x58b3b
movb $0x1, %al
callq 0x3170
callq 0x3130
subq %r15, %rax
movq %rax, %rdi
callq 0xe8d4
cvtss2sd %xmm0, %xmm0
movq %rbp, %rdi
movq %r13, %rsi
movb $0x1, %al
callq 0x3170
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x15b37
movq 0x48(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x38(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x15b37
testq %rbx, %rbx
je 0x48d79
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/SimpleDoger[P]Darknet_CPU_Only/regressor.c
// Function: run_regressor
void run_regressor(int argc, char **argv)
{
    if(argc < 4){
        fprintf(stderr, "usage: %s %s [train/test/valid] [cfg] [weights (optional)]\n", argv[0], argv[1]);
        return;
    }

    char *gpu_list = find_char_arg(argc, argv, "-gpus", 0);
    int *gpus = 0;
    int gpu = 0;
    int ngpus = 0;
    if(gpu_list){
        printf("%s\n", 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 {
        gpu = gpu_index;
        gpus = &gpu;
        ngpus = 1;
    }

    int cam_index = find_int_arg(argc, argv, "-c", 0);
    int clear = find_arg(argc, argv, "-clear");
    char *data = argv[3];
    char *cfg = argv[4];
    char *weights = (argc > 5) ? argv[5] : 0;
    char *filename = (argc > 6) ? argv[6]: 0;
    if(0==strcmp(argv[2], "test")) predict_regressor(data, cfg, weights);
    else if(0==strcmp(argv[2], "train")) train_regressor(data, cfg, weights, gpus, ngpus, clear);
    else if(0==strcmp(argv[2], "demo")) demo_regressor(data, cfg, weights, cam_index, filename);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpl $0x3, %edi
jle 0x48fe9
movl %edi, %r14d
leaq 0xf9e6(%rip), %rdx      # 0x588bc
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0xe64d
testq %rax, %rax
je 0x48f2f
movq %rax, %r15
movq %rax, %rdi
callq 0x30c0
movq %r15, %rdi
callq 0x3150
movl $0x1, %ecx
movl $0x1, %ebp
testl %eax, %eax
jle 0x48f22
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
xorl %edx, %edx
xorl %esi, %esi
cmpb $0x2c, (%r15,%rdx)
sete %sil
addl %esi, %ebp
incq %rdx
cmpq %rdx, %rax
jne 0x48f0d
cmpl $0x2, %ebp
cmovgel %ebp, %ecx
decq %rcx
jne 0x48f28
jmp 0x48f34
movl $0x1, %ebp
leaq 0xf1cc(%rip), %rdx      # 0x58107
xorl %r15d, %r15d
movl %r14d, %edi
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0xe4b3
leaq 0xf0cb(%rip), %rdx      # 0x5801d
movl %r14d, %edi
movq %rbx, %rsi
callq 0xe439
movl %eax, %r12d
cmpl $0x6, %r14d
jl 0x48f6a
movq 0x28(%rbx), %r15
movq 0x18(%rbx), %r13
movq 0x20(%rbx), %r14
movq 0x10(%rbx), %rbx
leaq 0x10180(%rip), %rsi     # 0x590fd
movq %rbx, %rdi
callq 0x3270
testl %eax, %eax
je 0x48fab
leaq 0xf34c(%rip), %rsi      # 0x582dc
movq %rbx, %rdi
callq 0x3270
testl %eax, %eax
je 0x48fc7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x48d38
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl %ebp, %r8d
movl %r12d, %r9d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x486cc
movq %rbx, %rdi
callq 0xac7b
jmp 0x48f9c
nop
// File: /workspace/github_c_makefile_star2_O1/SimpleDoger[P]Darknet_CPU_Only/classifier.c
// Function: get_regression_values
float *get_regression_values(char **labels, int n)
{
    float *v = calloc(n, sizeof(float));
    int i;
    for(i = 0; i < n; ++i){
        char *p = strchr(labels[i], ' ');
        *p = 0;
        v[i] = atof(p+1);
    }
    return v;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movslq %esi, %r15
movl $0x4, %esi
movq %r15, %rdi
callq 0x3260
movq %rax, %r14
testl %r15d, %r15d
jle 0x4904b
movl %ebp, %r15d
xorl %r12d, %r12d
movq (%rbx,%r12,8), %rdi
movl $0x20, %esi
callq 0x3160
movb $0x0, (%rax)
leaq 0x1(%rax), %rdi
callq 0x3100
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%r14,%r12,4)
incq %r12
cmpq %r12, %r15
jne 0x4901f
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/SimpleDoger[P]Darknet_CPU_Only/yolo.c
// Function: print_yolo_detections
void print_yolo_detections(FILE **fps, char *id, int total, int classes, int w, int h, detection *dets)
{
    int i, j;
    for(i = 0; i < total; ++i){
        float xmin = dets[i].bbox.x - dets[i].bbox.w/2.;
        float xmax = dets[i].bbox.x + dets[i].bbox.w/2.;
        float ymin = dets[i].bbox.y - dets[i].bbox.h/2.;
        float ymax = dets[i].bbox.y + dets[i].bbox.h/2.;

        if (xmin < 0) xmin = 0;
        if (ymin < 0) ymin = 0;
        if (xmax > w) xmax = w;
        if (ymax > h) ymax = h;

        for(j = 0; j < classes; ++j){
            if (dets[i].prob[j]) fprintf(fps[j], "%s %f %f %f %f %f\n", id, dets[i].prob[j],
                    xmin, ymin, xmax, ymax);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, 0x4(%rsp)
testl %edx, %edx
jle 0x4d087
movq %rsi, %r14
movq %rdi, %r15
cvtsi2ss %r8d, %xmm0
movss %xmm0, 0xc(%rsp)
xorps %xmm0, %xmm0
cvtsi2ss %r9d, %xmm0
movss %xmm0, 0x8(%rsp)
movl %edx, %eax
movq %rax, 0x10(%rsp)
movl 0x4(%rsp), %ebx
xorl %ebp, %ebp
cmpl $0x0, 0x4(%rsp)
jle 0x4d079
leaq (,%rbp,2), %rax
addq %rbp, %rax
shlq $0x4, %rax
movq 0x70(%rsp), %rcx
xorps %xmm0, %xmm0
cvtss2sd 0xc(%rcx,%rax), %xmm0
leaq (%rcx,%rax), %r13
movsd 0x619b(%rip), %xmm4     # 0x53120
mulsd %xmm4, %xmm0
xorps %xmm1, %xmm1
cvtss2sd 0x4(%rcx,%rax), %xmm1
movapd %xmm0, %xmm2
addsd %xmm1, %xmm2
cvtsd2ss %xmm2, %xmm2
movss 0x8(%rsp), %xmm3
minss %xmm2, %xmm3
xorps %xmm2, %xmm2
cvtss2sd 0x8(%rcx,%rax), %xmm2
mulsd %xmm4, %xmm2
xorps %xmm4, %xmm4
cvtss2sd (%rcx,%rax), %xmm4
movapd %xmm2, %xmm5
addsd %xmm4, %xmm5
cvtsd2ss %xmm5, %xmm5
movss 0xc(%rsp), %xmm6
minss %xmm5, %xmm6
subsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
xorps %xmm1, %xmm1
subsd %xmm2, %xmm4
xorps %xmm2, %xmm2
cvtsd2ss %xmm4, %xmm2
maxss %xmm0, %xmm1
xorps %xmm0, %xmm0
maxss %xmm2, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x30(%rsp)
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
movsd %xmm0, 0x28(%rsp)
xorps %xmm0, %xmm0
cvtss2sd %xmm6, %xmm0
movsd %xmm0, 0x20(%rsp)
xorps %xmm0, %xmm0
cvtss2sd %xmm3, %xmm0
movsd %xmm0, 0x18(%rsp)
xorl %r12d, %r12d
movq 0x18(%r13), %rax
movss (%rax,%r12,4), %xmm0
ucomiss 0x603c(%rip), %xmm0     # 0x53078
jne 0x4d040
jnp 0x4d071
movq (%r15,%r12,8), %rdi
cvtss2sd %xmm0, %xmm0
leaq 0xc067(%rip), %rsi      # 0x590b6
movq %r14, %rdx
movsd 0x30(%rsp), %xmm1
movsd 0x28(%rsp), %xmm2
movsd 0x20(%rsp), %xmm3
movsd 0x18(%rsp), %xmm4
movb $0x5, %al
callq 0x3280
incq %r12
cmpq %r12, %rbx
jne 0x4d02b
incq %rbp
cmpq 0x10(%rsp), %rbp
jne 0x4cf51
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/SimpleDoger[P]Darknet_CPU_Only/detector.c
// Function: print_detector_detections
void print_detector_detections(FILE **fps, char *id, detection *dets, int total, int classes, int w, int h)
{
    int i, j;
    for(i = 0; i < total; ++i){
        float xmin = dets[i].bbox.x - dets[i].bbox.w/2. + 1;
        float xmax = dets[i].bbox.x + dets[i].bbox.w/2. + 1;
        float ymin = dets[i].bbox.y - dets[i].bbox.h/2. + 1;
        float ymax = dets[i].bbox.y + dets[i].bbox.h/2. + 1;

        if (xmin < 1) xmin = 1;
        if (ymin < 1) ymin = 1;
        if (xmax > w) xmax = w;
        if (ymax > h) ymax = h;

        for(j = 0; j < classes; ++j){
            if (dets[i].prob[j]) fprintf(fps[j], "%s %f %f %f %f %f\n", id, dets[i].prob[j],
                    xmin, ymin, xmax, ymax);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r8d, 0xc(%rsp)
movq %rdx, 0x18(%rsp)
testl %ecx, %ecx
jle 0x4dddf
movq %rsi, %r15
movq %rdi, %r12
cvtsi2ss %r9d, %xmm0
movss %xmm0, 0x14(%rsp)
xorps %xmm0, %xmm0
cvtsi2ssl 0x80(%rsp), %xmm0
movss %xmm0, 0x10(%rsp)
movl %ecx, %eax
movq %rax, 0x20(%rsp)
movl 0xc(%rsp), %ebx
xorl %ebp, %ebp
cmpl $0x0, 0xc(%rsp)
jle 0x4ddd1
leaq (,%rbp,2), %rax
addq %rbp, %rax
shlq $0x4, %rax
movq 0x18(%rsp), %rcx
xorps %xmm0, %xmm0
cvtss2sd 0xc(%rcx,%rax), %xmm0
movsd 0x5467(%rip), %xmm5     # 0x53120
mulsd %xmm5, %xmm0
xorps %xmm1, %xmm1
cvtss2sd 0x4(%rcx,%rax), %xmm1
movapd %xmm0, %xmm2
addsd %xmm1, %xmm2
movsd 0x5452(%rip), %xmm7     # 0x53128
addsd %xmm7, %xmm2
cvtsd2ss %xmm2, %xmm2
leaq (%rcx,%rax), %r14
movss 0x10(%rsp), %xmm3
xorps %xmm4, %xmm4
cvtss2sd 0x8(%rcx,%rax), %xmm4
mulsd %xmm5, %xmm4
xorps %xmm5, %xmm5
cvtss2sd (%rcx,%rax), %xmm5
movapd %xmm4, %xmm6
addsd %xmm5, %xmm6
addsd %xmm7, %xmm6
cvtsd2ss %xmm6, %xmm6
minss %xmm2, %xmm3
movss 0x14(%rsp), %xmm2
minss %xmm6, %xmm2
subsd %xmm0, %xmm1
addsd %xmm7, %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
movss 0x52d6(%rip), %xmm6     # 0x53008
movaps %xmm6, %xmm1
subsd %xmm4, %xmm5
addsd %xmm7, %xmm5
xorps %xmm4, %xmm4
cvtsd2ss %xmm5, %xmm4
maxss %xmm0, %xmm1
movaps %xmm6, %xmm0
maxss %xmm4, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x40(%rsp)
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
movsd %xmm0, 0x38(%rsp)
xorps %xmm0, %xmm0
cvtss2sd %xmm2, %xmm0
movsd %xmm0, 0x30(%rsp)
xorps %xmm0, %xmm0
cvtss2sd %xmm3, %xmm0
movsd %xmm0, 0x28(%rsp)
xorl %r13d, %r13d
movq 0x18(%r14), %rax
movss (%rax,%r13,4), %xmm0
ucomiss 0x52e4(%rip), %xmm0     # 0x53078
jne 0x4dd98
jnp 0x4ddc9
movq (%r12,%r13,8), %rdi
cvtss2sd %xmm0, %xmm0
leaq 0xb30f(%rip), %rsi      # 0x590b6
movq %r15, %rdx
movsd 0x40(%rsp), %xmm1
movsd 0x38(%rsp), %xmm2
movsd 0x30(%rsp), %xmm3
movsd 0x28(%rsp), %xmm4
movb $0x5, %al
callq 0x3280
incq %r13
cmpq %r13, %rbx
jne 0x4dd83
incq %rbp
cmpq 0x20(%rsp), %rbp
jne 0x4dc89
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/SimpleDoger[P]Darknet_CPU_Only/detector.c
// Function: print_imagenet_detections
void print_imagenet_detections(FILE *fp, int id, detection *dets, int total, int classes, int w, int h)
{
    int i, j;
    for(i = 0; i < total; ++i){
        float xmin = dets[i].bbox.x - dets[i].bbox.w/2.;
        float xmax = dets[i].bbox.x + dets[i].bbox.w/2.;
        float ymin = dets[i].bbox.y - dets[i].bbox.h/2.;
        float ymax = dets[i].bbox.y + dets[i].bbox.h/2.;

        if (xmin < 0) xmin = 0;
        if (ymin < 0) ymin = 0;
        if (xmax > w) xmax = w;
        if (ymax > h) ymax = h;

        for(j = 0; j < classes; ++j){
            int class = j;
            if (dets[i].prob[class]) fprintf(fp, "%d %d %f %f %f %f %f\n", id, j+1, dets[i].prob[class],
                    xmin, ymin, xmax, ymax);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r8d, 0xc(%rsp)
movq %rdx, 0x18(%rsp)
testl %ecx, %ecx
jle 0x4df77
movl %esi, %ebp
movq %rdi, %r15
cvtsi2ss %r9d, %xmm0
movss %xmm0, 0x14(%rsp)
xorps %xmm0, %xmm0
cvtsi2ssl 0x80(%rsp), %xmm0
movss %xmm0, 0x10(%rsp)
movl %ecx, %eax
movq %rax, 0x20(%rsp)
movl 0xc(%rsp), %ebx
xorl %r13d, %r13d
cmpl $0x0, 0xc(%rsp)
jle 0x4df69
leaq (,%r13,2), %rax
addq %r13, %rax
shlq $0x4, %rax
movq 0x18(%rsp), %rcx
xorps %xmm0, %xmm0
cvtss2sd 0xc(%rcx,%rax), %xmm0
leaq (%rcx,%rax), %r14
movsd 0x52ae(%rip), %xmm4     # 0x53120
mulsd %xmm4, %xmm0
xorps %xmm1, %xmm1
cvtss2sd 0x4(%rcx,%rax), %xmm1
movapd %xmm0, %xmm2
addsd %xmm1, %xmm2
cvtsd2ss %xmm2, %xmm2
movss 0x10(%rsp), %xmm3
minss %xmm2, %xmm3
xorps %xmm2, %xmm2
cvtss2sd 0x8(%rcx,%rax), %xmm2
mulsd %xmm4, %xmm2
xorps %xmm4, %xmm4
cvtss2sd (%rcx,%rax), %xmm4
movapd %xmm2, %xmm5
addsd %xmm4, %xmm5
cvtsd2ss %xmm5, %xmm5
movss 0x14(%rsp), %xmm6
minss %xmm5, %xmm6
subsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
xorps %xmm1, %xmm1
subsd %xmm2, %xmm4
xorps %xmm2, %xmm2
cvtsd2ss %xmm4, %xmm2
maxss %xmm0, %xmm1
xorps %xmm0, %xmm0
maxss %xmm2, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x40(%rsp)
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
movsd %xmm0, 0x38(%rsp)
xorps %xmm0, %xmm0
cvtss2sd %xmm6, %xmm0
movsd %xmm0, 0x30(%rsp)
xorps %xmm0, %xmm0
cvtss2sd %xmm3, %xmm0
movsd %xmm0, 0x28(%rsp)
xorl %r12d, %r12d
movq 0x18(%r14), %rax
movss (%rax,%r12,4), %xmm0
ucomiss 0x514f(%rip), %xmm0     # 0x53078
jne 0x4df2d
jnp 0x4df61
cvtss2sd %xmm0, %xmm0
leal 0x1(%r12), %ecx
movq %r15, %rdi
leaq 0xb1fe(%rip), %rsi      # 0x5913e
movl %ebp, %edx
movsd 0x40(%rsp), %xmm1
movsd 0x38(%rsp), %xmm2
movsd 0x30(%rsp), %xmm3
movsd 0x28(%rsp), %xmm4
movb $0x5, %al
callq 0x3280
incq %r12
cmpq %r12, %rbx
jne 0x4df18
incq %r13
cmpq 0x20(%rsp), %r13
jne 0x4de3e
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/SimpleDoger[P]Darknet_CPU_Only/nightmare.c
// Function: abs_mean
float abs_mean(float *x, int n)
{
    int i;
    float sum = 0;
    for (i = 0; i < n; ++i){
        sum += fabs(x[i]);
    }
    return sum/n;
}

// Assembly:
testl %esi, %esi
jle 0x4e7f0
movl %esi, %eax
xorps %xmm0, %xmm0
xorl %ecx, %ecx
movaps 0x4966(%rip), %xmm1     # 0x53140
movss (%rdi,%rcx,4), %xmm2
andps %xmm1, %xmm2
addss %xmm2, %xmm0
incq %rcx
cmpq %rcx, %rax
jne 0x4e7da
jmp 0x4e7f3
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
cvtsi2ss %esi, %xmm1
divss %xmm1, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O1/SimpleDoger[P]Darknet_CPU_Only/nightmare.c
// Function: calculate_loss
void calculate_loss(float *output, float *delta, int n, float thresh)
{
    int i;
    float mean = mean_array(output, n); 
    float var = variance_array(output, n);
    for(i = 0; i < n; ++i){
        if(delta[i] > mean + thresh*sqrt(var)) delta[i] = output[i];
        else delta[i] = 0;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movss %xmm0, 0x10(%rsp)
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, %esi
callq 0xee0b
movss %xmm0, 0x8(%rsp)
movq %r14, %rdi
movl %ebp, %esi
callq 0xef75
testl %ebp, %ebp
jle 0x4e8d7
cvtss2sd 0x8(%rsp), %xmm2
cvtss2sd 0x10(%rsp), %xmm3
cvtss2sd %xmm0, %xmm4
movl %ebp, %r15d
xorl %r12d, %r12d
sqrtsd %xmm4, %xmm5
xorpd %xmm6, %xmm6
movsd %xmm2, 0x8(%rsp)
movsd %xmm3, 0x28(%rsp)
movsd %xmm4, 0x20(%rsp)
movsd %xmm5, 0x18(%rsp)
xorps %xmm7, %xmm7
cvtss2sd (%rbx,%r12,4), %xmm7
ucomisd %xmm6, %xmm4
movapd %xmm5, %xmm0
jae 0x4e8b2
movapd %xmm4, %xmm0
movsd %xmm7, 0x10(%rsp)
callq 0x3470
movsd 0x10(%rsp), %xmm7
xorpd %xmm6, %xmm6
movsd 0x18(%rsp), %xmm5
movsd 0x20(%rsp), %xmm4
movsd 0x28(%rsp), %xmm3
movsd 0x8(%rsp), %xmm2
mulsd %xmm3, %xmm0
addsd %xmm2, %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm0, %xmm7
jbe 0x4e8c9
movss (%r14,%r12,4), %xmm1
movss %xmm1, (%rbx,%r12,4)
incq %r12
cmpq %r12, %r15
jne 0x4e86e
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq