LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/lsd.c
// Function: slerp
void slerp(float *start, float *end, float s, int n, float *out)
{
    float omega = acos(dot_cpu(n, start, 1, end, 1));
    float so = sin(omega);
    fill_cpu(n, 0, out, 1);
    axpy_cpu(n, sin((1-s)*omega)/so, start, 1, out, 1);
    axpy_cpu(n, sin(s*omega)/so, end, 1, out, 1);

    float mag = mag_array(out, n);
    scale_array(out, n, 1./mag);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movss %xmm0, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl -0x18(%rbp), %edi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rcx
movl $0x1, %r8d
movl %r8d, %edx
callq 0x2fe50
cvtss2sd %xmm0, %xmm0
callq 0x31c0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x24(%rbp)
movss -0x24(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x33a0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x28(%rbp)
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
xorps %xmm0, %xmm0
movl $0x1, %edx
callq 0x2f740
movl -0x18(%rbp), %eax
movl %eax, -0x34(%rbp)
movss 0x1bf2c(%rip), %xmm0    # 0x7100c
subss -0x14(%rbp), %xmm0
mulss -0x24(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x33a0
movl -0x34(%rbp), %edi
movss -0x28(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x8(%rbp), %rsi
movq -0x20(%rbp), %rcx
movl $0x1, %r8d
movl %r8d, %edx
callq 0x2f680
movl -0x18(%rbp), %eax
movl %eax, -0x30(%rbp)
movss -0x14(%rbp), %xmm0
mulss -0x24(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x33a0
movl -0x30(%rbp), %edi
movss -0x28(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rcx
movl $0x1, %r8d
movl %r8d, %edx
callq 0x2f680
movq -0x20(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x59b0
movss %xmm0, -0x2c(%rbp)
movq -0x20(%rbp), %rdi
movl -0x18(%rbp), %esi
movss -0x2c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x1bed7(%rip), %xmm0    # 0x71060
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
callq 0x5a30
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/lsd.c
// Function: random_unit_vector_image
image random_unit_vector_image(int w, int h, int c)
{
    image im = make_image(w, h, c);
    int i;
    for(i = 0; i < im.w*im.h*im.c; ++i){
        im.data[i] = rand_normal();
    }
    float mag = mag_array(im.data, im.w*im.h*im.c);
    scale_array(im.data, im.w*im.h*im.c, 1./mag);
    return im;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x28(%rbp)
movq %rdi, %rax
movq %rax, -0x20(%rbp)
movl %esi, -0x4(%rbp)
movl %edx, -0x8(%rbp)
movl %ecx, -0xc(%rbp)
movl -0x4(%rbp), %esi
movl -0x8(%rbp), %edx
movl -0xc(%rbp), %ecx
callq 0xe3e0
movl $0x0, -0x10(%rbp)
movq -0x28(%rbp), %rdx
movl -0x10(%rbp), %eax
movl (%rdx), %ecx
imull 0x4(%rdx), %ecx
imull 0x8(%rdx), %ecx
cmpl %ecx, %eax
jge 0x55209
movb $0x0, %al
callq 0x5d50
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x10(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x551d1
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rdi
movl (%rax), %esi
imull 0x4(%rax), %esi
imull 0x8(%rax), %esi
callq 0x59b0
movq -0x28(%rbp), %rax
movss %xmm0, -0x14(%rbp)
movq 0x10(%rax), %rdi
movl (%rax), %esi
imull 0x4(%rax), %esi
imull 0x8(%rax), %esi
movss -0x14(%rbp), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x1be18(%rip), %xmm0    # 0x71060
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
callq 0x5a30
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/lsd.c
// Function: set_network_alpha_beta
void set_network_alpha_beta(network *net, float alpha, float beta)
{
    int i;
    for(i = 0; i < net->n; ++i){
        if(net->layers[i].type == SHORTCUT){
            net->layers[i].alpha = alpha;
            net->layers[i].beta = beta;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movss %xmm0, -0xc(%rbp)
movss %xmm1, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x55942
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %rcx
imulq $0x4a0, %rcx, %rcx      # imm = 0x4A0
addq %rcx, %rax
cmpl $0xd, (%rax)
jne 0x55935
movss -0xc(%rbp), %xmm0
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %rcx
imulq $0x4a0, %rcx, %rcx      # imm = 0x4A0
addq %rcx, %rax
movss %xmm0, 0x134(%rax)
movss -0x10(%rbp), %xmm0
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %rcx
imulq $0x4a0, %rcx, %rcx      # imm = 0x4A0
addq %rcx, %rax
movss %xmm0, 0x138(%rax)
jmp 0x55937
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x558c9
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/super.c
// Function: run_super
void run_super(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 *cfg = argv[3];
    char *weights = (argc > 4) ? argv[4] : 0;
    char *filename = (argc > 5) ? argv[5] : 0;
    int clear = find_arg(argc, argv, "-clear");
    if(0==strcmp(argv[2], "train")) train_super(cfg, weights, clear);
    else if(0==strcmp(argv[2], "test")) test_super(cfg, weights, filename);
    /*
    else if(0==strcmp(argv[2], "valid")) validate_super(cfg, weights);
    */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x4, -0x4(%rbp)
jge 0x56741
movq 0x2c8dc(%rip), %rax     # 0x82ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
leaq 0x1f15b(%rip), %rsi     # 0x75890
movb $0x0, %al
callq 0x3240
jmp 0x56808
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
cmpl $0x4, -0x4(%rbp)
jle 0x56761
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x56769
xorl %eax, %eax
movq %rax, -0x38(%rbp)
jmp 0x56769
movq -0x38(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpl $0x5, -0x4(%rbp)
jle 0x56785
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x5678d
xorl %eax, %eax
movq %rax, -0x40(%rbp)
jmp 0x5678d
movq -0x40(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x1f162(%rip), %rdx     # 0x75905
callq 0x45a0
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x1f402(%rip), %rsi     # 0x75bbc
callq 0x3230
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x567d9
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x2c(%rbp), %edx
callq 0x560a0
jmp 0x56808
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x201b1(%rip), %rsi     # 0x76999
callq 0x3230
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x56806
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x564e0
jmp 0x56808
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/art.c
// Function: run_art
void run_art(int argc, char **argv)
{
    int cam_index = find_int_arg(argc, argv, "-c", 0);
    char *cfg = argv[2];
    char *weights = argv[3];
    demo_art(cfg, weights, cam_index);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x1f1a2(%rip), %rdx     # 0x759ef
xorl %ecx, %ecx
callq 0x4630
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0x56810
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/tag.c
// Function: run_tag
void run_tag(int argc, char **argv)
{
    if(argc < 4){
        fprintf(stderr, "usage: %s %s [train/test/valid] [cfg] [weights (optional)]\n", argv[0], argv[1]);
        return;
    }

    int clear = find_arg(argc, argv, "-clear");
    char *cfg = argv[3];
    char *weights = (argc > 4) ? argv[4] : 0;
    char *filename = (argc > 5) ? argv[5] : 0;
    if(0==strcmp(argv[2], "train")) train_tag(cfg, weights, clear);
    else if(0==strcmp(argv[2], "test")) test_tag(cfg, weights, filename);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x4, -0x4(%rbp)
jge 0x571b1
movq 0x2be6c(%rip), %rax     # 0x82ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
leaq 0x1e6eb(%rip), %rsi     # 0x75890
movb $0x0, %al
callq 0x3240
jmp 0x57278
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x1e746(%rip), %rdx     # 0x75905
callq 0x45a0
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
cmpl $0x4, -0x4(%rbp)
jle 0x571e7
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x571ef
xorl %eax, %eax
movq %rax, -0x38(%rbp)
jmp 0x571ef
movq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpl $0x5, -0x4(%rbp)
jle 0x5720b
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x57213
xorl %eax, %eax
movq %rax, -0x40(%rbp)
jmp 0x57213
movq -0x40(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x1e992(%rip), %rsi     # 0x75bbc
callq 0x3230
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x57249
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0x56890
jmp 0x57278
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x1f741(%rip), %rsi     # 0x76999
callq 0x3230
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x57276
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x56eb0
jmp 0x57278
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/cifar.c
// Function: test_cifar
void test_cifar(char *filename, char *weightfile)
{
    network *net = load_network(filename, weightfile, 0);
    srand(time(0));

    clock_t time;
    float avg_acc = 0;
    float avg_top5 = 0;
    data test = load_cifar10_data("data/cifar/cifar-10-batches-bin/test_batch.bin");

    time=clock();

    float *acc = network_accuracies(net, test, 2);
    avg_acc += acc[0];
    avg_top5 += acc[1];
    printf("top1: %f, %lf seconds, %d images\n", avg_acc, sec(clock()-time), test.X.rows);
    free_data(test);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %edx, %edx
callq 0x39a70
movq %rax, -0x18(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x3290
movl %eax, %edi
callq 0x31e0
xorps %xmm0, %xmm0
movss %xmm0, -0x24(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x28(%rbp)
leaq -0x68(%rbp), %rdi
leaq 0x1dd52(%rip), %rsi     # 0x75ac3
callq 0x38080
callq 0x30f0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movups -0x68(%rbp), %xmm0
movups -0x58(%rbp), %xmm1
movups -0x48(%rbp), %xmm2
movups -0x38(%rbp), %xmm3
movq %rsp, %rax
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
movl $0x2, %esi
callq 0x3bf60
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movss (%rax), %xmm0
addss -0x24(%rbp), %xmm0
movss %xmm0, -0x24(%rbp)
movq -0x70(%rbp), %rax
movss 0x4(%rax), %xmm0
addss -0x28(%rbp), %xmm0
movss %xmm0, -0x28(%rbp)
movss -0x24(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x78(%rbp)
callq 0x30f0
movq %rax, %rdi
subq -0x20(%rbp), %rdi
callq 0x4b50
movaps %xmm0, %xmm1
movsd -0x78(%rbp), %xmm0
cvtss2sd %xmm1, %xmm1
movl -0x60(%rbp), %esi
leaq 0x1dcf2(%rip), %rdi     # 0x75aff
movb $0x2, %al
callq 0x3130
movups -0x68(%rbp), %xmm0
movups -0x58(%rbp), %xmm1
movups -0x48(%rbp), %xmm2
movups -0x38(%rbp), %xmm3
movq %rsp, %rax
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x34400
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/cifar.c
// Function: extract_cifar
void extract_cifar()
{
char *labels[] = {"airplane","automobile","bird","cat","deer","dog","frog","horse","ship","truck"};
    int i;
    data train = load_all_cifar10();
    data test = load_cifar10_data("data/cifar/cifar-10-batches-bin/test_batch.bin");
    for(i = 0; i < train.X.rows; ++i){
        image im = float_to_image(32, 32, 3, train.X.vals[i]);
        int class = max_index(train.y.vals[i], 10);
        char buff[256];
        sprintf(buff, "data/cifar/train/%d_%s",i,labels[class]);
        save_image_options(im, buff, PNG, 0);
    }
    for(i = 0; i < test.X.rows; ++i){
        image im = float_to_image(32, 32, 3, test.X.vals[i]);
        int class = max_index(test.y.vals[i], 10);
        char buff[256];
        sprintf(buff, "data/cifar/test/%d_%s",i,labels[class]);
        save_image_options(im, buff, PNG, 0);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x340, %rsp            # imm = 0x340
leaq -0x50(%rbp), %rdi
leaq 0x2af1a(%rip), %rsi     # 0x82d80
movl $0x50, %edx
callq 0x3280
leaq -0x98(%rbp), %rdi
movb $0x0, %al
callq 0x38500
leaq -0xd8(%rbp), %rdi
leaq 0x1dc37(%rip), %rsi     # 0x75ac3
callq 0x38080
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
cmpl -0x90(%rbp), %eax
jge 0x57f4c
movq -0x88(%rbp), %rax
movslq -0x54(%rbp), %rcx
movq (%rax,%rcx,8), %r8
leaq -0xf0(%rbp), %rdi
movl $0x20, %edx
movl $0x3, %ecx
movl %edx, %esi
callq 0xfbb0
movq -0x78(%rbp), %rax
movslq -0x54(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl $0xa, %esi
callq 0x5c30
movl %eax, -0xf4(%rbp)
leaq -0x200(%rbp), %rdi
movl -0x54(%rbp), %edx
movslq -0xf4(%rbp), %rax
movq -0x50(%rbp,%rax,8), %rcx
leaq 0x1dc52(%rip), %rsi     # 0x75b59
movb $0x0, %al
callq 0x33f0
leaq -0x200(%rbp), %rdi
leaq -0xf0(%rbp), %rax
xorl %edx, %edx
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
movl %edx, %esi
callq 0x11380
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x57e98
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
cmpl -0xd0(%rbp), %eax
jge 0x5800a
movq -0xc8(%rbp), %rax
movslq -0x54(%rbp), %rcx
movq (%rax,%rcx,8), %r8
leaq -0x218(%rbp), %rdi
movl $0x20, %edx
movl $0x3, %ecx
movl %edx, %esi
callq 0xfbb0
movq -0xb8(%rbp), %rax
movslq -0x54(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl $0xa, %esi
callq 0x5c30
movl %eax, -0x21c(%rbp)
leaq -0x320(%rbp), %rdi
movl -0x54(%rbp), %edx
movslq -0x21c(%rbp), %rax
movq -0x50(%rbp,%rax,8), %rcx
leaq 0x1dbab(%rip), %rsi     # 0x75b70
movb $0x0, %al
callq 0x33f0
leaq -0x320(%rbp), %rdi
leaq -0x218(%rbp), %rax
xorl %edx, %edx
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
movl %edx, %esi
callq 0x11380
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x57f53
addq $0x340, %rsp            # imm = 0x340
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/cifar.c
// Function: test_cifar_csv
void test_cifar_csv(char *filename, char *weightfile)
{
    network *net = load_network(filename, weightfile, 0);
    srand(time(0));

    data test = load_cifar10_data("data/cifar/cifar-10-batches-bin/test_batch.bin");

    matrix pred = network_predict_data(net, test);

    int i;
    for(i = 0; i < test.X.rows; ++i){
        image im = float_to_image(32, 32, 3, test.X.vals[i]);
        flip_image(im);
    }
    matrix pred2 = network_predict_data(net, test);
    scale_matrix(pred, .5);
    scale_matrix(pred2, .5);
    matrix_add_matrix(pred2, pred);

    matrix_to_csv(pred);
    fprintf(stderr, "Accuracy: %f\n", matrix_topk_accuracy(test.y, pred, 1));
    free_data(test);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %edx, %edx
callq 0x39a70
movq %rax, -0x18(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x3290
movl %eax, %edi
callq 0x31e0
leaq -0x58(%rbp), %rdi
leaq 0x1da62(%rip), %rsi     # 0x75ac3
callq 0x38080
movq -0x18(%rbp), %rdi
movups -0x58(%rbp), %xmm0
movups -0x48(%rbp), %xmm1
movups -0x38(%rbp), %xmm2
movups -0x28(%rbp), %xmm3
movq %rsp, %rax
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x3b9e0
movq %rax, -0x68(%rbp)
movq %rdx, -0x60(%rbp)
movl $0x0, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jge 0x580fc
movq -0x48(%rbp), %rax
movslq -0x6c(%rbp), %rcx
movq (%rax,%rcx,8), %r8
leaq -0x88(%rbp), %rdi
movl $0x20, %edx
movl $0x3, %ecx
movl %edx, %esi
callq 0xfbb0
leaq -0x88(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x104c0
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x580a0
movq -0x18(%rbp), %rdi
movups -0x58(%rbp), %xmm0
movups -0x48(%rbp), %xmm1
movups -0x38(%rbp), %xmm2
movups -0x28(%rbp), %xmm3
movq %rsp, %rax
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x3b9e0
movq %rax, -0x98(%rbp)
movq %rdx, -0x90(%rbp)
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rsi
movss 0x190a7(%rip), %xmm0    # 0x711ec
callq 0x39170
movq -0x98(%rbp), %rdi
movq -0x90(%rbp), %rsi
movss 0x1908c(%rip), %xmm0    # 0x711ec
callq 0x39170
movq -0x98(%rbp), %rdi
movq -0x90(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq -0x60(%rbp), %rcx
callq 0x392e0
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x39760
movq 0x2ae64(%rip), %rax     # 0x82ff8
movq (%rax), %rax
movq %rax, -0xa0(%rbp)
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq -0x60(%rbp), %rcx
movl $0x1, %r8d
callq 0x39080
movq -0xa0(%rbp), %rdi
cvtss2sd %xmm0, %xmm0
leaq 0x1d9bb(%rip), %rsi     # 0x75b86
movb $0x1, %al
callq 0x3240
movups -0x58(%rbp), %xmm0
movups -0x48(%rbp), %xmm1
movups -0x38(%rbp), %xmm2
movups -0x28(%rbp), %xmm3
movq %rsp, %rax
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x34400
addq $0xe0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/cifar.c
// Function: test_cifar_csvtrain
void test_cifar_csvtrain(char *cfg, char *weights)
{
    network *net = load_network(cfg, weights, 0);
    srand(time(0));

    data test = load_all_cifar10();

    matrix pred = network_predict_data(net, test);

    int i;
    for(i = 0; i < test.X.rows; ++i){
        image im = float_to_image(32, 32, 3, test.X.vals[i]);
        flip_image(im);
    }
    matrix pred2 = network_predict_data(net, test);
    scale_matrix(pred, .5);
    scale_matrix(pred2, .5);
    matrix_add_matrix(pred2, pred);

    matrix_to_csv(pred);
    fprintf(stderr, "Accuracy: %f\n", matrix_topk_accuracy(test.y, pred, 1));
    free_data(test);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %edx, %edx
callq 0x39a70
movq %rax, -0x18(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x3290
movl %eax, %edi
callq 0x31e0
leaq -0x58(%rbp), %rdi
movb $0x0, %al
callq 0x38500
movq -0x18(%rbp), %rdi
movups -0x58(%rbp), %xmm0
movups -0x48(%rbp), %xmm1
movups -0x38(%rbp), %xmm2
movups -0x28(%rbp), %xmm3
movq %rsp, %rax
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x3b9e0
movq %rax, -0x68(%rbp)
movq %rdx, -0x60(%rbp)
movl $0x0, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jge 0x582e7
movq -0x48(%rbp), %rax
movslq -0x6c(%rbp), %rcx
movq (%rax,%rcx,8), %r8
leaq -0x88(%rbp), %rdi
movl $0x20, %edx
movl $0x3, %ecx
movl %edx, %esi
callq 0xfbb0
leaq -0x88(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x104c0
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x5828b
movq -0x18(%rbp), %rdi
movups -0x58(%rbp), %xmm0
movups -0x48(%rbp), %xmm1
movups -0x38(%rbp), %xmm2
movups -0x28(%rbp), %xmm3
movq %rsp, %rax
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x3b9e0
movq %rax, -0x98(%rbp)
movq %rdx, -0x90(%rbp)
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rsi
movss 0x18ebc(%rip), %xmm0    # 0x711ec
callq 0x39170
movq -0x98(%rbp), %rdi
movq -0x90(%rbp), %rsi
movss 0x18ea1(%rip), %xmm0    # 0x711ec
callq 0x39170
movq -0x98(%rbp), %rdi
movq -0x90(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq -0x60(%rbp), %rcx
callq 0x392e0
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x39760
movq 0x2ac79(%rip), %rax     # 0x82ff8
movq (%rax), %rax
movq %rax, -0xa0(%rbp)
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq -0x60(%rbp), %rcx
movl $0x1, %r8d
callq 0x39080
movq -0xa0(%rbp), %rdi
cvtss2sd %xmm0, %xmm0
leaq 0x1d7d0(%rip), %rsi     # 0x75b86
movb $0x1, %al
callq 0x3240
movups -0x58(%rbp), %xmm0
movups -0x48(%rbp), %xmm1
movups -0x38(%rbp), %xmm2
movups -0x28(%rbp), %xmm3
movq %rsp, %rax
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x34400
addq $0xe0, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/cifar.c
// Function: eval_cifar_csv
void eval_cifar_csv()
{
    data test = load_cifar10_data("data/cifar/cifar-10-batches-bin/test_batch.bin");

    matrix pred = csv_to_matrix("results/combined.csv");
    fprintf(stderr, "%d %d\n", pred.rows, pred.cols);

    fprintf(stderr, "Accuracy: %f\n", matrix_topk_accuracy(test.y, pred, 1));
    free_data(test);
    free_matrix(pred);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
leaq -0x40(%rbp), %rdi
leaq 0x1d6bd(%rip), %rsi     # 0x75ac3
callq 0x38080
leaq 0x1d782(%rip), %rdi     # 0x75b94
callq 0x39660
movq %rax, -0x50(%rbp)
movq %rdx, -0x48(%rbp)
movq 0x2abd2(%rip), %rax     # 0x82ff8
movq (%rax), %rdi
movl -0x50(%rbp), %edx
movl -0x4c(%rbp), %ecx
leaq 0x1ccfa(%rip), %rsi     # 0x75130
movb $0x0, %al
callq 0x3240
movq 0x2abb4(%rip), %rax     # 0x82ff8
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq -0x48(%rbp), %rcx
movl $0x1, %r8d
callq 0x39080
movq -0x58(%rbp), %rdi
cvtss2sd %xmm0, %xmm0
leaq 0x1d711(%rip), %rsi     # 0x75b86
movb $0x1, %al
callq 0x3240
movups -0x40(%rbp), %xmm0
movups -0x30(%rbp), %xmm1
movups -0x20(%rbp), %xmm2
movups -0x10(%rbp), %xmm3
movq %rsp, %rax
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x34400
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x39030
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/go.c
// Function: fgetgo
char *fgetgo(FILE *fp)
{
    if(feof(fp)) return 0;
    size_t size = 96;
    char *line = malloc(size*sizeof(char));
    if(size != fread(line, sizeof(char), size, fp)){
        free(line);
        return 0;
    }

    return line;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3260
cmpl $0x0, %eax
je 0x586c4
movq $0x0, -0x8(%rbp)
jmp 0x58722
movq $0x60, -0x18(%rbp)
movq -0x18(%rbp), %rdi
shlq $0x0, %rdi
callq 0x32d0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rcx
movl $0x1, %esi
callq 0x30a0
movq %rax, %rcx
movq -0x28(%rbp), %rax
cmpq %rcx, %rax
je 0x5871a
movq -0x20(%rbp), %rdi
callq 0x3030
movq $0x0, -0x8(%rbp)
jmp 0x58722
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/go.c
// Function: load_go_moves
moves load_go_moves(char *filename)
{
    moves m;
    m.n = 128;
    m.data = calloc(128, sizeof(char*));
    FILE *fp = fopen(filename, "rb");
    int count = 0;
    char *line = 0;
    while ((line = fgetgo(fp))) {
        if (count >= m.n) {
            m.n *= 2;
            m.data = realloc(m.data, m.n*sizeof(char*));
        }
        m.data[count] = line;
        ++count;
    }
    printf("%d\n", count);
    m.n = count;
    m.data = realloc(m.data, count*sizeof(char*));
    return m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x18(%rbp)
movl $0x80, -0x8(%rbp)
movl $0x80, %edi
movl $0x8, %esi
callq 0x3220
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x1895b(%rip), %rsi     # 0x710bc
callq 0x3360
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x20(%rbp), %rdi
callq 0x586a0
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0x587cc
movl -0x24(%rbp), %eax
cmpl -0x8(%rbp), %eax
jl 0x587b1
movl -0x8(%rbp), %eax
shll %eax
movl %eax, -0x8(%rbp)
movq -0x10(%rbp), %rdi
movslq -0x8(%rbp), %rsi
shlq $0x3, %rsi
callq 0x3310
movq %rax, -0x10(%rbp)
movq -0x30(%rbp), %rdx
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x58779
movl -0x24(%rbp), %esi
leaq 0x1a9a0(%rip), %rdi     # 0x73176
xorl %eax, %eax
callq 0x3130
movl -0x24(%rbp), %eax
movl %eax, -0x8(%rbp)
movq -0x10(%rbp), %rdi
movslq -0x24(%rbp), %rsi
shlq $0x3, %rsi
callq 0x3310
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl -0x8(%rbp), %edx
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/go.c
// Function: string_to_board
void string_to_board(char *s, float *board)
{
    int i, j;
    memset(board, 0, 2*19*19*sizeof(float));
    int count = 0;
    for(i = 0; i < 91; ++i){
        char c = s[i];
        for(j = 0; j < 4; ++j){
            int me = (c >> (2*j)) & 1;
            int you = (c >> (2*j + 1)) & 1;
            if (me) board[count] = 1;
            else if (you) board[count + 19*19] = 1;
            ++count;
            if(count >= 19*19) break;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
movl $0xb48, %edx            # imm = 0xB48
callq 0x3190
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x5b, -0x14(%rbp)
jge 0x58902
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x1d(%rbp)
movl $0x0, -0x18(%rbp)
cmpl $0x4, -0x18(%rbp)
jge 0x588f2
movsbl -0x1d(%rbp), %eax
movl -0x18(%rbp), %ecx
shll %ecx
sarl %cl, %eax
andl $0x1, %eax
movl %eax, -0x24(%rbp)
movsbl -0x1d(%rbp), %eax
movl -0x18(%rbp), %ecx
shll %ecx
addl $0x1, %ecx
sarl %cl, %eax
andl $0x1, %eax
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x588a9
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movss 0x1876a(%rip), %xmm0    # 0x7100c
movss %xmm0, (%rax,%rcx,4)
jmp 0x588ce
cmpl $0x0, -0x28(%rbp)
je 0x588cc
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x169, %ecx            # imm = 0x169
movslq %ecx, %rcx
movss 0x18745(%rip), %xmm0    # 0x7100c
movss %xmm0, (%rax,%rcx,4)
jmp 0x588ce
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
cmpl $0x169, -0x1c(%rbp)     # imm = 0x169
jl 0x588e2
jmp 0x588f2
jmp 0x588e4
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x5885d
jmp 0x588f4
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x5883e
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/go.c
// Function: board_to_string
void board_to_string(char *s, float *board)
{
    int i, j;
    memset(s, 0, (19*19/4+1)*sizeof(char));
    int count = 0;
    for(i = 0; i < 91; ++i){
        for(j = 0; j < 4; ++j){
            int me = (board[count] == 1);
            int you = (board[count + 19*19] == 1);
            if (me) s[i] = s[i] | (1<<(2*j));
            if (you) s[i] = s[i] | (1<<(2*j + 1));
            ++count;
            if(count >= 19*19) break;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movl $0x5b, %edx
callq 0x3190
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x5b, -0x14(%rbp)
jge 0x58a46
movl $0x0, -0x18(%rbp)
cmpl $0x4, -0x18(%rbp)
jge 0x58a36
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
movss 0x1869e(%rip), %xmm1    # 0x7100c
ucomiss %xmm1, %xmm0
sete %al
setnp %cl
andb %cl, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x169, %ecx            # imm = 0x169
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss 0x1866e(%rip), %xmm1    # 0x7100c
ucomiss %xmm1, %xmm0
sete %al
setnp %cl
andb %cl, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x20(%rbp)
je 0x589e0
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movl -0x18(%rbp), %ecx
shll %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
orl %ecx, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb %dl, (%rax,%rcx)
cmpl $0x0, -0x24(%rbp)
je 0x58a12
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movl -0x18(%rbp), %ecx
shll %ecx
addl $0x1, %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
orl %ecx, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
cmpl $0x169, -0x1c(%rbp)     # imm = 0x169
jl 0x58a26
jmp 0x58a36
jmp 0x58a28
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x5894f
jmp 0x58a38
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x5893e
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/go.c
// Function: flip_board
void flip_board(float *board)
{
    int i;
    for(i = 0; i < 19*19; ++i){
        float swap = board[i];
        board[i] = board[i+19*19];
        board[i+19*19] = swap;
        board[i+19*19*2] = 1-board[i+19*19*2];
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x169, -0xc(%rbp)      # imm = 0x169
jge 0x5960a
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
movss %xmm0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
addl $0x169, %ecx            # imm = 0x169
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movss -0x10(%rbp), %xmm0
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
addl $0x169, %ecx            # imm = 0x169
movslq %ecx, %rcx
movss %xmm0, (%rax,%rcx,4)
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
addl $0x2d2, %ecx            # imm = 0x2D2
movslq %ecx, %rcx
movss 0x17a2a(%rip), %xmm0    # 0x7100c
subss (%rax,%rcx,4), %xmm0
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
addl $0x2d2, %ecx            # imm = 0x2D2
movslq %ecx, %rcx
movss %xmm0, (%rax,%rcx,4)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x5956f
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/go.c
// Function: move_go
void move_go(float *b, int p, int r, int c)
{
    int *l = calculate_liberties(b);
    if(p > 0) b[r*19 + c] = 1;
    else b[19*19 + r*19 + c] = 1;
    remove_connected(b, l, -p, r+1, c);
    remove_connected(b, l, -p, r-1, c);
    remove_connected(b, l, -p, r, c+1);
    remove_connected(b, l, -p, r, c-1);
    free(l);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
callq 0x59990
movq %rax, -0x20(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0x598e5
movq -0x8(%rbp), %rax
imull $0x13, -0x10(%rbp), %ecx
addl -0x14(%rbp), %ecx
movslq %ecx, %rcx
movss 0x1772e(%rip), %xmm0    # 0x7100c
movss %xmm0, (%rax,%rcx,4)
jmp 0x59906
movq -0x8(%rbp), %rax
imull $0x13, -0x10(%rbp), %ecx
addl $0x169, %ecx            # imm = 0x169
addl -0x14(%rbp), %ecx
movslq %ecx, %rcx
movss 0x1770b(%rip), %xmm0    # 0x7100c
movss %xmm0, (%rax,%rcx,4)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
xorl %edx, %edx
subl -0xc(%rbp), %edx
movl -0x10(%rbp), %ecx
addl $0x1, %ecx
movl -0x14(%rbp), %r8d
callq 0x59ce0
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
xorl %edx, %edx
subl -0xc(%rbp), %edx
movl -0x10(%rbp), %ecx
subl $0x1, %ecx
movl -0x14(%rbp), %r8d
callq 0x59ce0
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
xorl %edx, %edx
subl -0xc(%rbp), %edx
movl -0x10(%rbp), %ecx
movl -0x14(%rbp), %r8d
addl $0x1, %r8d
callq 0x59ce0
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
xorl %edx, %edx
subl -0xc(%rbp), %edx
movl -0x10(%rbp), %ecx
movl -0x14(%rbp), %r8d
subl $0x1, %r8d
callq 0x59ce0
movq -0x20(%rbp), %rdi
callq 0x3030
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/go.c
// Function: remove_connected
static void remove_connected(float *b, int *lib, int p, int r, int c)
{
    if (r < 0 || r >= 19 || c < 0 || c >= 19) return;
    if (occupied(b, r*19 + c) != p) return;
    if (lib[r*19 + c] != 1) return;
    b[r*19 + c] = 0;
    b[19*19 + r*19 + c] = 0;
    remove_connected(b, lib, p, r+1, c);
    remove_connected(b, lib, p, r-1, c);
    remove_connected(b, lib, p, r, c+1);
    remove_connected(b, lib, p, r, c-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
cmpl $0x0, -0x18(%rbp)
jl 0x59d12
cmpl $0x13, -0x18(%rbp)
jge 0x59d12
cmpl $0x0, -0x1c(%rbp)
jl 0x59d12
cmpl $0x13, -0x1c(%rbp)
jl 0x59d17
jmp 0x59de6
movq -0x8(%rbp), %rdi
imull $0x13, -0x18(%rbp), %esi
addl -0x1c(%rbp), %esi
callq 0x58d60
cmpl -0x14(%rbp), %eax
je 0x59d31
jmp 0x59de6
movq -0x10(%rbp), %rax
imull $0x13, -0x18(%rbp), %ecx
addl -0x1c(%rbp), %ecx
movslq %ecx, %rcx
cmpl $0x1, (%rax,%rcx,4)
je 0x59d4a
jmp 0x59de6
movq -0x8(%rbp), %rax
imull $0x13, -0x18(%rbp), %ecx
addl -0x1c(%rbp), %ecx
movslq %ecx, %rcx
xorps %xmm0, %xmm0
movss %xmm0, (%rax,%rcx,4)
movq -0x8(%rbp), %rax
imull $0x13, -0x18(%rbp), %ecx
addl $0x169, %ecx            # imm = 0x169
addl -0x1c(%rbp), %ecx
movslq %ecx, %rcx
xorps %xmm0, %xmm0
movss %xmm0, (%rax,%rcx,4)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
addl $0x1, %ecx
movl -0x1c(%rbp), %r8d
callq 0x59ce0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
subl $0x1, %ecx
movl -0x1c(%rbp), %r8d
callq 0x59ce0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
movl -0x1c(%rbp), %r8d
addl $0x1, %r8d
callq 0x59ce0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
movl -0x1c(%rbp), %r8d
subl $0x1, %r8d
callq 0x59ce0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/go.c
// Function: free_mcts
void free_mcts(mcts_tree *root)
{
    if(!root) return;
    int i;
    free(root->board);
    for(i = 0; i < 19*19+1; ++i){
        if(root->children[i]) free_mcts(root->children[i]);
    }
    free(root->children);
    free(root->prior);
    free(root->visit_count);
    free(root->value);
    free(root->mean);
    free(root->prob);
    free(root);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x59e48
jmp 0x59ef0
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x3030
movl $0x0, -0xc(%rbp)
cmpl $0x16a, -0xc(%rbp)      # imm = 0x16A
jge 0x59e99
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0xc(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x59e8c
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x59e30
jmp 0x59e8e
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x59e5b
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x3030
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x3030
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x3030
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x3030
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x3030
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x3030
movq -0x8(%rbp), %rdi
callq 0x3030
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/go.c
// Function: legal_go
int legal_go(float *b, float *ko, int p, int r, int c)
{
    if (occupied(b, r*19+c)) return 0;
    float curr[19*19*3];
    copy_cpu(19*19*3, b, 1, curr, 1);
    move_go(curr, p, r, c);
    if(check_ko(curr, ko)) return 0;
    if(suicide_go(b, p, r, c)) return 0;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1110, %rsp           # imm = 0x1110
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq -0x10(%rbp), %rdi
imull $0x13, -0x20(%rbp), %esi
addl -0x24(%rbp), %esi
callq 0x58d60
cmpl $0x0, %eax
je 0x5a7db
movl $0x0, -0x4(%rbp)
jmp 0x5a853
movq -0x10(%rbp), %rsi
leaq -0x1110(%rbp), %rcx
movl $0x43b, %edi            # imm = 0x43B
movl $0x1, %r8d
movl %r8d, %edx
callq 0x2f960
leaq -0x1110(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl -0x20(%rbp), %edx
movl -0x24(%rbp), %ecx
callq 0x598a0
leaq -0x1110(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x5b270
cmpl $0x0, %eax
je 0x5a82c
movl $0x0, -0x4(%rbp)
jmp 0x5a853
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl -0x20(%rbp), %edx
movl -0x24(%rbp), %ecx
callq 0x5b070
cmpl $0x0, %eax
je 0x5a84c
movl $0x0, -0x4(%rbp)
jmp 0x5a853
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x1110, %rsp           # imm = 0x1110
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl %r9d, -0x28(%rbp)
movss %xmm0, -0x2c(%rbp)
movss %xmm1, -0x30(%rbp)
movb $0x0, %al
callq 0x3f10
movsd %xmm0, -0x40(%rbp)
cmpl $0x0, -0x24(%rbp)
jge 0x5a8a5
movq -0x18(%rbp), %rdi
callq 0x59560
cmpq $0x0, -0x8(%rbp)
jne 0x5a8c9
movq -0x18(%rbp), %rdi
callq 0x5a390
movq %rax, %rdi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x5a180
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x59df0
cmpl $0x0, %eax
je 0x5a8e0
jmp 0x5a8ff
leaq 0x1b32f(%rip), %rdi     # 0x75c16
leaq 0x1b34a(%rip), %rsi     # 0x75c38
movl $0x1f9, %edx            # imm = 0x1F9
leaq 0x1b343(%rip), %rcx     # 0x75c3d
callq 0x3180
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x28(%rbp), %eax
jge 0x5a984
movss -0x30(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x5a938
movb $0x0, %al
callq 0x3f10
subsd -0x40(%rbp), %xmm0
movss -0x30(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x5a938
jmp 0x5a984
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x16a, %esi            # imm = 0x16A
callq 0x5bb0
movl %eax, -0x44(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x44(%rbp), %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x28(%rbp), %eax
jl 0x5a963
jmp 0x5a984
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movss -0x2c(%rbp), %xmm0
callq 0x5a3e0
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x5a906
cmpl $0x0, -0x24(%rbp)
jge 0x5a993
movq -0x18(%rbp), %rdi
callq 0x59560
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jl 0x5a9d8
cmpl $0x169, -0xc(%rbp)      # imm = 0x169
jg 0x5a9d8
cmpq $0x0, -0x8(%rbp)
je 0x5a9d8
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0xc(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jne 0x5a9eb
movq -0x8(%rbp), %rdi
callq 0x59e30
movq $0x0, -0x8(%rbp)
jmp 0x5aa24
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x8(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0xc(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movq -0x18(%rbp), %rdi
callq 0x59e30
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
callq 0x59990
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movb $0x1, %al
cmpl $0x0, -0x24(%rbp)
movb %al, -0x25(%rbp)
jne 0x5b0c7
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0xc(%rbp), %edx
movl -0x10(%rbp), %ecx
addl $0x1, %ecx
movl -0x14(%rbp), %r8d
callq 0x5b1a0
cmpl $0x0, %eax
setne %al
movb %al, -0x25(%rbp)
movb -0x25(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x24(%rbp)
movb $0x1, %al
cmpl $0x0, -0x24(%rbp)
movb %al, -0x26(%rbp)
jne 0x5b100
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0xc(%rbp), %edx
movl -0x10(%rbp), %ecx
subl $0x1, %ecx
movl -0x14(%rbp), %r8d
callq 0x5b1a0
cmpl $0x0, %eax
setne %al
movb %al, -0x26(%rbp)
movb -0x26(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x24(%rbp)
movb $0x1, %al
cmpl $0x0, -0x24(%rbp)
movb %al, -0x27(%rbp)
jne 0x5b13a
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0xc(%rbp), %edx
movl -0x10(%rbp), %ecx
movl -0x14(%rbp), %r8d
addl $0x1, %r8d
callq 0x5b1a0
cmpl $0x0, %eax
setne %al
movb %al, -0x27(%rbp)
movb -0x27(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x24(%rbp)
movb $0x1, %al
cmpl $0x0, -0x24(%rbp)
movb %al, -0x28(%rbp)
jne 0x5b174
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0xc(%rbp), %edx
movl -0x10(%rbp), %ecx
movl -0x14(%rbp), %r8d
subl $0x1, %r8d
callq 0x5b1a0
cmpl $0x0, %eax
setne %al
movb %al, -0x28(%rbp)
movb -0x28(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rdi
callq 0x3030
cmpl $0x0, -0x24(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
cmpl $0x0, -0x20(%rbp)
jl 0x5b1d2
cmpl $0x13, -0x20(%rbp)
jge 0x5b1d2
cmpl $0x0, -0x24(%rbp)
jl 0x5b1d2
cmpl $0x13, -0x24(%rbp)
jl 0x5b1de
movl $0x0, -0x4(%rbp)
jmp 0x5b25f
movq -0x10(%rbp), %rdi
imull $0x13, -0x20(%rbp), %esi
addl -0x24(%rbp), %esi
callq 0x58d60
xorl %ecx, %ecx
subl -0x1c(%rbp), %ecx
cmpl %ecx, %eax
jne 0x5b21d
movq -0x18(%rbp), %rax
imull $0x13, -0x20(%rbp), %ecx
addl -0x24(%rbp), %ecx
movslq %ecx, %rcx
cmpl $0x1, (%rax,%rcx,4)
jle 0x5b214
movl $0x0, -0x4(%rbp)
jmp 0x5b25f
movl $0x1, -0x4(%rbp)
jmp 0x5b25f
movq -0x10(%rbp), %rdi
imull $0x13, -0x20(%rbp), %esi
addl -0x24(%rbp), %esi
callq 0x58d60
cmpl $0x0, %eax
jne 0x5b23b
movl $0x1, -0x4(%rbp)
jmp 0x5b25f
movq -0x18(%rbp), %rax
imull $0x13, -0x20(%rbp), %ecx
addl -0x24(%rbp), %ecx
movslq %ecx, %rcx
cmpl $0x1, (%rax,%rcx,4)
jle 0x5b258
movl $0x1, -0x4(%rbp)
jmp 0x5b25f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x1110, %rsp           # imm = 0x1110
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x5b293
movl $0x0, -0x4(%rbp)
jmp 0x5b2fb
movq -0x10(%rbp), %rsi
leaq -0x1110(%rbp), %rcx
movl $0x43b, %edi            # imm = 0x43B
movl $0x1, %r8d
movl %r8d, %edx
callq 0x2f960
movss -0x5c8(%rbp), %xmm0
movq -0x18(%rbp), %rax
ucomiss 0xb48(%rax), %xmm0
jne 0x5b2ca
jp 0x5b2ca
jmp 0x5b2d6
leaq -0x1110(%rbp), %rdi
callq 0x59560
leaq -0x1110(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x59df0
cmpl $0x0, %eax
je 0x5b2f4
movl $0x1, -0x4(%rbp)
jmp 0x5b2fb
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x1110, %rsp           # imm = 0x1110
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x3, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x1a7c8(%rip), %rsi     # 0x75cfa
movb $0x0, %al
callq 0x3240
movq -0x10(%rbp), %rdi
leaq 0x1a7c0(%rip), %rsi     # 0x75d04
movb $0x0, %al
callq 0x3240
movq -0x10(%rbp), %rdi
leaq 0x1a7bc(%rip), %rsi     # 0x75d12
movb $0x0, %al
callq 0x3240
movl $0x0, -0x18(%rbp)
cmpl $0x13, -0x18(%rbp)
jge 0x5b643
movl $0x0, -0x14(%rbp)
cmpl $0x13, -0x14(%rbp)
jge 0x5b633
movq -0x8(%rbp), %rdi
imull $0x13, -0x18(%rbp), %esi
addl -0x14(%rbp), %esi
callq 0x58d60
cmpl $0x1, %eax
jne 0x5b5c2
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
addl $0x41, %edx
cmpl $0x8, -0x14(%rbp)
setge %al
andb $0x1, %al
movzbl %al, %eax
addl %eax, %edx
movl $0x13, %ecx
subl -0x18(%rbp), %ecx
leaq 0x1a764(%rip), %rsi     # 0x75d1f
movb $0x0, %al
callq 0x3240
movq -0x8(%rbp), %rdi
imull $0x13, -0x18(%rbp), %esi
addl -0x14(%rbp), %esi
callq 0x58d60
cmpl $-0x1, %eax
jne 0x5b605
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
addl $0x41, %edx
cmpl $0x8, -0x14(%rbp)
setge %al
andb $0x1, %al
movzbl %al, %eax
addl %eax, %edx
movl $0x13, %ecx
subl -0x18(%rbp), %ecx
leaq 0x1a732(%rip), %rsi     # 0x75d30
movb $0x0, %al
callq 0x3240
movq -0x8(%rbp), %rdi
imull $0x13, -0x18(%rbp), %esi
addl -0x14(%rbp), %esi
callq 0x58d60
cmpl $0x0, %eax
je 0x5b623
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x5b625
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x5b575
jmp 0x5b635
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x5b564
movl -0x1c(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)