LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/saulvargas[P]re-C-sys/similarity_setcosine.c
// Function: similarity_setcosine_calculate
idpairs_t* similarity_setcosine_calculate(int uid, int k, void* args) {
    recdata_t* recdata;
    int* coo;
    idpairs_t* ud;
    idpairs_t* id;
    int i;
    int j;
    int vid;
    int iid;
    topn_t* topn;
    idpairs_t* pairs;
    
    recdata = args;
    
    coo = calloc(recdata->N_users, sizeof(int));
    
    ud = recdata_userdata(recdata, uid);
    for (i = 0; i < idpairs_size(ud); i++) {
        iid = idpairs_keys(ud)[i];
        id = recdata_itemdata(recdata, iid);
        for (j = 0; j < idpairs_size(id); j++) {
            vid = idpairs_keys(id)[j];
            coo[vid]++;
        }
        idpairs_close_shallow(id);
    }
    idpairs_close_shallow(ud);
    
    coo[uid] = 0;
    
    topn = topn_create(k);
    for (vid = 0; vid < recdata->N_users; vid++) {
        if (coo[vid] > 0) {
            topn_add(topn, vid, coo[vid] / sqrt(recdata_userdata_size(recdata, uid) * recdata_userdata_size(recdata, vid)));
        }
    }
    
    free(coo);

    pairs = topn_get_pairs(topn);
    
    topn_close(topn);

    return pairs;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, 0x4(%rsp)
movl %edi, %ebp
movslq (%rdx), %rdi
movl $0x4, %esi
callq 0x1090
movq %rax, %r14
movq %rbx, %rdi
movl %ebp, (%rsp)
movl %ebp, %esi
callq 0x1298
movq %rax, %r12
movq %rax, %rdi
callq 0x2465
testl %eax, %eax
jle 0x17ac
xorl %r15d, %r15d
movq %r12, %rdi
callq 0x2468
movl (%rax,%r15,4), %esi
movq %rbx, %rdi
callq 0x12a6
movq %rax, %r13
movq %rax, %rdi
callq 0x2465
testl %eax, %eax
jle 0x1792
xorl %ebp, %ebp
movq %r13, %rdi
callq 0x2468
movslq (%rax,%rbp,4), %rax
incl (%r14,%rax,4)
incq %rbp
movq %r13, %rdi
callq 0x2465
cltq
cmpq %rax, %rbp
jl 0x1770
movq %r13, %rdi
callq 0x2460
incq %r15
movq %r12, %rdi
callq 0x2465
cltq
cmpq %rax, %r15
jl 0x174b
movq %r12, %rdi
callq 0x2460
movslq (%rsp), %rax
movl $0x0, (%r14,%rax,4)
movl 0x4(%rsp), %edi
callq 0x1b74
movq %rax, %r15
cmpl $0x0, (%rbx)
jle 0x183a
xorl %r12d, %r12d
movl (%r14,%r12,4), %ebp
testl %ebp, %ebp
jle 0x182f
movq %rbx, %rdi
movl (%rsp), %esi
callq 0x127c
movl %eax, %r13d
movq %rbx, %rdi
movl %r12d, %esi
callq 0x127c
imull %r13d, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
ucomisd 0x1800(%rip), %xmm0     # 0x3008
jb 0x1810
sqrtsd %xmm0, %xmm0
jmp 0x1815
callq 0x10f0
xorps %xmm1, %xmm1
cvtsi2sd %ebp, %xmm1
divsd %xmm0, %xmm1
movq %r15, %rdi
movl %r12d, %esi
movapd %xmm1, %xmm0
callq 0x1dda
incq %r12
movslq (%rbx), %rax
cmpq %rax, %r12
jl 0x17d4
movq %r14, %rdi
callq 0x1030
movq %r15, %rdi
callq 0x1f13
movq %rax, %rbx
movq %r15, %rdi
callq 0x1bc1
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/saulvargas[P]re-C-sys/similarity_setcosine.c
// Function: similarity_setcosine_create
similarity_t* similarity_setcosine_create(recdata_t* recdata) {
    similarity_t* similarity;
    
    similarity = malloc(sizeof(similarity_t));
    similarity->calculate = similarity_setcosine_calculate;
    similarity->close = similarity_setcosine_close;
    similarity->args = recdata;
    
    return similarity;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x18, %edi
callq 0x10b0
leaq -0x175(%rip), %rcx      # 0x1708
movq %rcx, (%rax)
leaq -0x20(%rip), %rcx       # 0x1867
movq %rcx, 0x8(%rax)
movq %rbx, 0x10(%rax)
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/saulvargas[P]re-C-sys/similarity_veccosine.c
// Function: similarity_veccosine_calculate
idpairs_t* similarity_veccosine_calculate(int uid, int k, void* args) {
    recdata_t* recdata;
    double* norm;
    double* coo;
    idpairs_t* ud;
    idpairs_t* id;
    int i;
    int j;
    int vid;
    int iid;
    double r;
    topn_t* topn;
    idpairs_t* pairs;
    
    recdata = ((similarity_veccosine_args_t*) args)->recdata;
    norm = ((similarity_veccosine_args_t*) args)->norm;
    
    coo = calloc(recdata->N_users, sizeof(double));
    
    ud = recdata_userdata(recdata, uid);
    for (i = 0; i < idpairs_size(ud); i++) {
        iid = idpairs_keys(ud)[i];
        r = idpairs_values(ud)[i];
        id = recdata_itemdata(recdata, iid);
        for (j = 0; j < idpairs_size(id); j++) {
            vid = idpairs_keys(id)[j];
            coo[vid] += r * idpairs_values(id)[j];
        }
        idpairs_close_shallow(id);
    }
    idpairs_close_shallow(ud);
    
    coo[uid] = 0.0;
    
    topn = topn_create(k);
    for (vid = 0; vid < recdata->N_users; vid++) {
        if (coo[vid] > 0) {
            topn_add(topn, vid, coo[vid] * norm[uid] * norm[vid]);
        }
    }
    
    free(coo);

    pairs = topn_get_pairs(topn);
    
    topn_close(topn);

    return pairs;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, 0xc(%rsp)
movl %edi, %ebp
movq (%rdx), %rbx
movq 0x8(%rdx), %rax
movq %rax, 0x10(%rsp)
movslq (%rbx), %rdi
movl $0x8, %esi
callq 0x1090
movq %rax, %r14
movq %rbx, %rdi
movl %ebp, 0x8(%rsp)
movl %ebp, %esi
callq 0x1298
movq %rax, %r12
movq %rax, %rdi
callq 0x2465
testl %eax, %eax
jle 0x1989
xorl %r15d, %r15d
movq %rbx, 0x18(%rsp)
movq %r12, %rdi
callq 0x2468
movl (%rax,%r15,4), %r13d
movq %r12, %rdi
callq 0x246d
movsd (%rax,%r15,8), %xmm0
movsd %xmm0, 0x20(%rsp)
movq %rbx, %rdi
movl %r13d, %esi
callq 0x12a6
movq %rax, %r13
movq %rax, %rdi
callq 0x2465
testl %eax, %eax
jle 0x1966
xorl %ebp, %ebp
movq %r13, %rdi
callq 0x2468
movslq (%rax,%rbp,4), %rbx
movq %r13, %rdi
callq 0x246d
movsd (%rax,%rbp,8), %xmm0
mulsd 0x20(%rsp), %xmm0
addsd (%r14,%rbx,8), %xmm0
movsd %xmm0, (%r14,%rbx,8)
incq %rbp
movq %r13, %rdi
callq 0x2465
cltq
cmpq %rax, %rbp
jl 0x1929
movq %r13, %rdi
callq 0x2460
incq %r15
movq %r12, %rdi
callq 0x2465
cltq
cmpq %rax, %r15
movq 0x18(%rsp), %rbx
jl 0x18ed
movq %r12, %rdi
callq 0x2460
movslq 0x8(%rsp), %r13
movq $0x0, (%r14,%r13,8)
movl 0xc(%rsp), %edi
callq 0x1b74
movq %rax, %r15
cmpl $0x0, (%rbx)
movq 0x10(%rsp), %rbp
jle 0x19ef
xorl %r12d, %r12d
xorpd %xmm1, %xmm1
movsd (%r14,%r12,8), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x19e4
mulsd (%rbp,%r13,8), %xmm0
mulsd (%rbp,%r12,8), %xmm0
movq %r15, %rdi
movl %r12d, %esi
callq 0x1dda
xorpd %xmm1, %xmm1
incq %r12
movslq (%rbx), %rax
cmpq %rax, %r12
jl 0x19bb
movq %r14, %rdi
callq 0x1030
movq %r15, %rdi
callq 0x1f13
movq %rax, %rbx
movq %r15, %rdi
callq 0x1bc1
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/saulvargas[P]re-C-sys/similarity_veccosine.c
// Function: calculate_norm
double* calculate_norm(recdata_t* recdata) {
    int i;
    int uid;
    idpairs_t* ud;
    double* norm;
    
    norm = malloc(recdata->N_users * sizeof(double));
     
    for (uid = 0; uid < recdata->N_users; uid++) {
        ud = recdata_userdata(recdata, uid);
        norm[uid] = 0.0;
        for (i = 0; i < idpairs_size(ud); i++) {
            norm[uid] += idpairs_values(ud)[i] * idpairs_values(ud)[i];
        }
        norm[uid] = 1 / sqrt(norm[uid]);
        idpairs_close_shallow(ud);
    }
     
    return norm;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movslq (%rdi), %r15
leaq (,%r15,8), %rdi
callq 0x10b0
movq %rax, %r14
testq %r15, %r15
jle 0x1b10
xorl %r15d, %r15d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x1298
movq %rax, %r12
movq $0x0, (%r14,%r15,8)
movq %rax, %rdi
callq 0x2465
testl %eax, %eax
jle 0x1acc
xorl %r13d, %r13d
movq %r12, %rdi
callq 0x246d
movsd (%rax,%r13,8), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r12, %rdi
callq 0x246d
movsd 0x8(%rsp), %xmm0
mulsd (%rax,%r13,8), %xmm0
addsd (%r14,%r15,8), %xmm0
movsd %xmm0, (%r14,%r15,8)
incq %r13
movq %r12, %rdi
callq 0x2465
cltq
cmpq %rax, %r13
jl 0x1a86
movsd (%r14,%r15,8), %xmm0
ucomisd 0x152e(%rip), %xmm0     # 0x3008
jb 0x1ae2
sqrtsd %xmm0, %xmm0
jmp 0x1ae7
callq 0x10f0
movsd 0x1521(%rip), %xmm1     # 0x3010
divsd %xmm0, %xmm1
movsd %xmm1, (%r14,%r15,8)
movq %r12, %rdi
callq 0x2460
incq %r15
movslq (%rbx), %rax
cmpq %rax, %r15
jl 0x1a61
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/saulvargas[P]re-C-sys/similarity_veccosine.c
// Function: similarity_veccosine_create
similarity_t* similarity_veccosine_create(recdata_t* recdata) {
    similarity_t* similarity;
    similarity_veccosine_args_t* args;
    
    similarity = malloc(sizeof(similarity_t));
    similarity->calculate = similarity_veccosine_calculate;
    similarity->close = similarity_veccosine_close;
    
    args = malloc(sizeof(similarity_veccosine_args_t));
    args->recdata = recdata;
    args->norm = calculate_norm(recdata);
    similarity->args = args;
    
    return similarity;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x18, %edi
callq 0x10b0
movq %rax, %r14
leaq -0x2a9(%rip), %rax      # 0x1894
movq %rax, (%r14)
leaq -0x12b(%rip), %rax      # 0x1a1c
movq %rax, 0x8(%r14)
movl $0x10, %edi
callq 0x10b0
movq %rax, %r15
movq %rbx, (%rax)
movq %rbx, %rdi
callq 0x1a32
movq %rax, 0x8(%r15)
movq %r15, 0x10(%r14)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/saulvargas[P]re-C-sys/topn.c
// Function: topn_create
topn_t* topn_create(int capacity) {
    topn_t* topn = malloc(sizeof(topn_t));

    topn->capacity = capacity;
    topn->keys = calloc(capacity, sizeof(int));
    topn->values = calloc(capacity, sizeof(double));
    topn->size = 0;
    
    return topn;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0x18, %edi
callq 0x10b0
movq %rax, %r14
movl %ebx, 0x10(%rax)
movslq %ebx, %rbx
movl $0x4, %esi
movq %rbx, %rdi
callq 0x1090
movq %rax, (%r14)
movl $0x8, %esi
movq %rbx, %rdi
callq 0x1090
movq %rax, 0x8(%r14)
movl $0x0, 0x14(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/saulvargas[P]re-C-sys/topn.c
// Function: swap
void swap(topn_t* topn, int i, int j) {
    int k;
    double v;

    k = topn->keys[i];
    topn->keys[i] = topn->keys[j];
    topn->keys[j] = k;
    v = topn->values[i];
    topn->values[i] = topn->values[j];
    topn->values[j] = v;
}

// Assembly:
movq (%rdi), %rax
movslq %esi, %rcx
movl (%rax,%rcx,4), %esi
movslq %edx, %rdx
movl (%rax,%rdx,4), %r8d
movl %r8d, (%rax,%rcx,4)
movl %esi, (%rax,%rdx,4)
movq 0x8(%rdi), %rax
movsd (%rax,%rcx,8), %xmm0
movsd (%rax,%rdx,8), %xmm1
movsd %xmm1, (%rax,%rcx,8)
movsd %xmm0, (%rax,%rdx,8)
retq
// File: /workspace/github_c_makefile_star2_O1/saulvargas[P]re-C-sys/topn.c
// Function: reverse
void reverse(topn_t* topn) {
    int i = 0;
    int j = topn->size - 1;
    while (j > i) {
        swap(topn, i, j);
        j--;
        i++;
    }
}

// Assembly:
movslq 0x14(%rdi), %rax
cmpq $0x2, %rax
jl 0x1c63
movq (%rdi), %rcx
movq 0x8(%rdi), %rdx
addq $-0x2, %rax
xorl %esi, %esi
movl (%rcx,%rsi,4), %edi
movl 0x4(%rcx,%rax,4), %r8d
movl %r8d, (%rcx,%rsi,4)
movl %edi, 0x4(%rcx,%rax,4)
movsd (%rdx,%rsi,8), %xmm0
movsd 0x8(%rdx,%rax,8), %xmm1
movsd %xmm1, (%rdx,%rsi,8)
movsd %xmm0, 0x8(%rdx,%rax,8)
incq %rsi
leaq -0x1(%rax), %rdi
cmpq %rsi, %rax
movq %rdi, %rax
jg 0x1c2e
retq
// File: /workspace/github_c_makefile_star2_O1/saulvargas[P]re-C-sys/topn.c
// Function: minChild
int minChild(topn_t* topn, int i) {
    int l = left(i);
    int r = right(i);

    if (l >= topn->capacity) {
        return -1;
    }

    if (r >= topn->size) {
        return l;
    }

    return (topn->values[l] < topn->values[r] || (topn->values[l] == topn->values[r] && topn->keys[l] < topn->keys[r])) ? l : r;
}

// Assembly:
leal 0x1(,%rsi,2), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl 0x10(%rdi), %ecx
jge 0x1cbd
leal 0x2(,%rsi,2), %edx
cmpl 0x14(%rdi), %edx
jge 0x1cbb
movq 0x8(%rdi), %r8
movslq %ecx, %rax
movsd (%r8,%rax,8), %xmm0
movslq %edx, %rsi
movsd (%r8,%rsi,8), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x1cbe
movl %ecx, %eax
retq
ucomisd %xmm1, %xmm0
jne 0x1cd5
jp 0x1cd5
movq (%rdi), %rdi
movl (%rdi,%rax,4), %r8d
movl %ecx, %eax
cmpl (%rdi,%rsi,4), %r8d
jl 0x1cbd
movl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/saulvargas[P]re-C-sys/topn.c
// Function: topn_sort
void topn_sort(topn_t* topn) {
    int i;
    int j;

    int origSize = topn->size;
    int origCapacity = topn->capacity;
    topn->capacity = topn->size;
    while (topn->size > 0) {
        swap(topn, 0, topn->size - 1);
        topn->size--;
        topn->capacity--;
        i = 0;
        j = minChild(topn, i);
        while (j != -1 && (topn->values[i] > topn->values[j] || (topn->values[i] == topn->values[j] && topn->keys[i] > topn->keys[j]))) {
            swap(topn, i, j);
            i = j;
            j = minChild(topn, i);
        }
    }
    topn->size = origSize;
    topn->capacity = origCapacity;
    reverse(topn);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x10(%rdi), %r14d
movl 0x14(%rdi), %r15d
movl %r15d, 0x10(%rdi)
testl %r15d, %r15d
jle 0x1dae
movq (%rbx), %r12
movq 0x8(%rbx), %r13
movl %r15d, %eax
movl (%r12), %ecx
cltq
movl -0x4(%r12,%rax,4), %edx
movl %edx, (%r12)
movl %ecx, -0x4(%r12,%rax,4)
movsd (%r13), %xmm0
movsd -0x8(%r13,%rax,8), %xmm1
movsd %xmm1, (%r13)
movsd %xmm0, -0x8(%r13,%rax,8)
decl 0x14(%rbx)
decl 0x10(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1c82
cmpl $-0x1, %eax
je 0x1da3
movl %eax, %ebp
xorl %ecx, %ecx
movslq %ecx, %rax
movsd (%r13,%rax,8), %xmm0
movslq %ebp, %rsi
movsd (%r13,%rsi,8), %xmm1
ucomisd %xmm1, %xmm0
ja 0x1d74
jne 0x1da3
jp 0x1da3
movl (%r12,%rax,4), %ecx
cmpl (%r12,%rsi,4), %ecx
jle 0x1da3
movl (%r12,%rax,4), %ecx
movl (%r12,%rsi,4), %edx
movl %edx, (%r12,%rax,4)
movl %ecx, (%r12,%rsi,4)
movsd %xmm1, (%r13,%rax,8)
movsd %xmm0, (%r13,%rsi,8)
movq %rbx, %rdi
callq 0x1c82
movl %ebp, %ecx
movl %eax, %ebp
cmpl $-0x1, %eax
jne 0x1d4c
movl 0x14(%rbx), %eax
testl %eax, %eax
jg 0x1d05
movl %r15d, 0x14(%rbx)
movl %r14d, 0x10(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1c17
// File: /workspace/github_c_makefile_star2_O1/saulvargas[P]re-C-sys/topn.c
// Function: topn_add
int topn_add(topn_t* topn, int key, double value) {
    int i;
    int j;

    if (topn->size < topn->capacity) {
        i = topn->size;
        j = parent(i);
        topn->keys[i] = key;
        topn->values[i] = value;
        while (i > 0 && (topn->values[j] > topn->values[i] || (topn->values[j] == topn->values[i] && topn->keys[j] > topn->keys[i]))) {
            swap(topn, i, j);
            i = j;
            j = parent(i);
        }
        topn->size++;

        return 1;
    } else {
        if (topn->values[0] > value || (topn->values[0] == value && topn->keys[0] > key)) {
            return 0;
        }
        i = 0;
        j = minChild(topn, i);
        topn->keys[i] = key;
        topn->values[i] = value;
        while (j != -1 && (topn->values[i] > topn->values[j] || (topn->values[i] == topn->values[j] && topn->keys[i] > topn->keys[j]))) {
            swap(topn, i, j);
            i = j;
            j = minChild(topn, i);
        }

        return 1;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
movl 0x14(%rdi), %edx
cmpl 0x10(%rdi), %edx
jge 0x1e63
movslq %edx, %rsi
movq (%rbx), %rax
movl %r14d, (%rax,%rsi,4)
movq 0x8(%rbx), %rcx
movsd %xmm0, (%rcx,%rsi,8)
testl %edx, %edx
jle 0x1e59
leal -0x1(%rdx), %edi
shrl $0x1f, %edi
movl %edx, %esi
addl %edi, %edx
decl %edx
sarl %edx
movslq %edx, %rdi
movsd (%rcx,%rdi,8), %xmm0
ucomisd (%rcx,%rsi,8), %xmm0
ja 0x1e35
jne 0x1e59
jp 0x1e59
movl (%rax,%rdi,4), %r8d
cmpl (%rax,%rsi,4), %r8d
jle 0x1e59
movl (%rax,%rsi,4), %r8d
movl (%rax,%rdi,4), %r9d
movl %r9d, (%rax,%rsi,4)
movl %r8d, (%rax,%rdi,4)
movsd (%rcx,%rsi,8), %xmm1
movsd %xmm0, (%rcx,%rsi,8)
movsd %xmm1, (%rcx,%rdi,8)
cmpl $0x2, %esi
jg 0x1e0a
incl 0x14(%rbx)
movl $0x1, %ebp
jmp 0x1e80
movq 0x8(%rbx), %r15
movsd (%r15), %xmm1
xorl %ebp, %ebp
ucomisd %xmm0, %xmm1
ja 0x1e80
jne 0x1e91
jp 0x1e91
movq (%rbx), %rax
cmpl %r14d, (%rax)
jle 0x1e91
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %esi, %esi
movsd %xmm0, (%rsp)
callq 0x1c82
movq (%rbx), %r13
movl %r14d, (%r13)
movsd (%rsp), %xmm0
movsd %xmm0, (%r15)
movl $0x1, %ebp
cmpl $-0x1, %eax
je 0x1e80
movslq %r12d, %rcx
movl %eax, %r12d
movsd (%r15,%rcx,8), %xmm0
movslq %eax, %rsi
movsd (%r15,%rsi,8), %xmm1
ucomisd %xmm1, %xmm0
ja 0x1ee9
jne 0x1e80
jp 0x1e80
movl (%r13,%rcx,4), %eax
cmpl (%r13,%rsi,4), %eax
jle 0x1e80
movl (%r13,%rcx,4), %eax
movl (%r13,%rsi,4), %edx
movl %edx, (%r13,%rcx,4)
movl %eax, (%r13,%rsi,4)
movsd %xmm1, (%r15,%rcx,8)
movsd %xmm0, (%r15,%rsi,8)
movq %rbx, %rdi
callq 0x1c82
jmp 0x1eb9
// File: /workspace/github_c_makefile_star2_O1/saulvargas[P]re-C-sys/topn.c
// Function: topn_get_pairs
idpairs_t* topn_get_pairs(topn_t* topn) {
    idpairs_t* pairs = idpairs_create(topn_size(topn), malloc(topn_size(topn) * sizeof(int)), malloc(topn_size(topn) * sizeof(double)));
    memcpy(idpairs_keys(pairs), topn->keys, topn_size(topn) * sizeof(int));
    memcpy(idpairs_values(pairs), topn->values, topn_size(topn) * sizeof(double));
    
    return pairs;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movslq 0x14(%rdi), %r14
leaq (,%r14,4), %rdi
callq 0x10b0
movq %rax, %r15
movq %r14, %rdi
shlq $0x3, %rdi
callq 0x10b0
movl %r14d, %edi
movq %r15, %rsi
movq %rax, %rdx
callq 0x241c
movq %rax, %r14
movq %rax, %rdi
callq 0x2468
movq (%rbx), %rsi
movslq 0x14(%rbx), %rdx
shlq $0x2, %rdx
movq %rax, %rdi
callq 0x10a0
movq %r14, %rdi
callq 0x246d
movq 0x8(%rbx), %rsi
movslq 0x14(%rbx), %rdx
shlq $0x3, %rdx
movq %rax, %rdi
callq 0x10a0
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/saulvargas[P]re-C-sys/recommender.c
// Function: recommender_recommend
idpairs_t* recommender_recommend(recommender_t* recommender, int uid, int n) {
    recdata_t* recdata;
    idpairs_t* pairs;
    idpairs_t* ud;
    int i;
    int iid;
    int jid;
    topn_t* topn;
    double* scores;
    
    recdata = recommender->recdata;
    
    scores = recommender->recommend(uid, recommender->recdata, recommender->args);

    ud = recdata_userdata(recdata, uid);
    for (i = 0; i < idpairs_size(ud); i++) {
        jid = idpairs_keys(ud)[i];
        scores[jid] = 0.0;
    }
    idpairs_close_shallow(ud);

    topn = topn_create(n);
    for (iid = 0; iid < recdata->N_items; iid++) {
        if (scores[iid] > 0) {
            topn_add(topn, iid, scores[iid]);
        }
    }
    
    free(scores);

    topn_sort(topn);
    pairs = topn_get_pairs(topn);
    idpairs_revert(pairs);
    
    topn_close(topn);

    return pairs;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %rax
movq 0x10(%rdi), %rbx
movq 0x18(%rdi), %rdx
movl %esi, %edi
movq %rbx, %rsi
callq *(%rax)
movq %rax, %r14
movq %rbx, %rdi
movl %r15d, %esi
callq 0x1298
movq %rax, %r15
movq %rax, %rdi
callq 0x2465
testl %eax, %eax
jle 0x1ff1
xorl %r12d, %r12d
movq %r15, %rdi
callq 0x2468
movslq (%rax,%r12,4), %rax
movq $0x0, (%r14,%rax,8)
incq %r12
movq %r15, %rdi
callq 0x2465
cltq
cmpq %rax, %r12
jl 0x1fcb
movq %r15, %rdi
callq 0x2460
movl %ebp, %edi
callq 0x1b74
movq %rax, %r15
cmpl $0x0, 0x4(%rbx)
jle 0x2037
xorl %r12d, %r12d
xorpd %xmm1, %xmm1
movsd (%r14,%r12,8), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x202b
movq %r15, %rdi
movl %r12d, %esi
callq 0x1dda
xorpd %xmm1, %xmm1
incq %r12
movslq 0x4(%rbx), %rax
cmpq %rax, %r12
jl 0x2010
movq %r14, %rdi
callq 0x1030
movq %r15, %rdi
callq 0x1cd8
movq %r15, %rdi
callq 0x1f13
movq %rax, %rbx
movq %rax, %rdi
callq 0x24d6
movq %r15, %rdi
callq 0x1bc1
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/saulvargas[P]re-C-sys/recommender_ub.c
// Function: recommender_ub_recommend
double* recommender_ub_recommend(int uid, recdata_t* recdata, void* args) {
    idpairs_t* neighbors;
    idpairs_t* vd;
    int i;
    int j;
    int vid;
    double s;
    int iid;
    similarity_t* similarity = ((recommender_ub_args_t*) args)->similarity;
    int k = ((recommender_ub_args_t*) args)->k;
    int binary = ((recommender_ub_args_t*) args)->binary;
    
    double* scores = calloc(recdata->N_items, sizeof(double));
    
    neighbors = similarity_calculate(similarity, uid, k);
    for (i = 0; i < idpairs_size(neighbors); i++) {
        vid = idpairs_keys(neighbors)[i];
        vd = recdata_userdata(recdata, vid);
        s = idpairs_values(neighbors)[i];
        for (j = 0; j < idpairs_size(vd); j++) {
            iid = idpairs_keys(vd)[j];
            scores[iid] += binary ? (s) : (s * idpairs_values(vd)[j]);
        }
        idpairs_close_shallow(vd);
    }
    idpairs_close_deep(neighbors);

    return scores;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edi, %ebp
movq (%rdx), %r15
movl 0x8(%rdx), %r12d
movl 0xc(%rdx), %r13d
movq %rsi, 0x10(%rsp)
movslq 0x4(%rsi), %rdi
movl $0x8, %esi
callq 0x1090
movq %rax, %r14
movq %r15, %rdi
movl %ebp, %esi
movl %r12d, %edx
callq 0x16e4
movq %rax, %rbx
movq %rax, %rdi
callq 0x2465
testl %eax, %eax
jle 0x2181
xorl %ebp, %ebp
movq %rbx, 0x8(%rsp)
movq %rbx, %rdi
callq 0x2468
movl (%rax,%rbp,4), %esi
movq 0x10(%rsp), %rdi
callq 0x1298
movq %rax, %r12
movq %rbx, %rdi
callq 0x246d
movsd (%rax,%rbp,8), %xmm0
movsd %xmm0, (%rsp)
movq %r12, %rdi
callq 0x2465
testl %eax, %eax
jle 0x215e
xorl %ebx, %ebx
movq %r12, %rdi
callq 0x2468
movslq (%rax,%rbx,4), %r15
movsd (%rsp), %xmm0
testl %r13d, %r13d
jne 0x2140
movq %r12, %rdi
callq 0x246d
movsd (%rax,%rbx,8), %xmm0
mulsd (%rsp), %xmm0
addsd (%r14,%r15,8), %xmm0
movsd %xmm0, (%r14,%r15,8)
incq %rbx
movq %r12, %rdi
callq 0x2465
cltq
cmpq %rax, %rbx
jl 0x2118
movq %r12, %rdi
callq 0x2460
incq %rbp
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x2465
cltq
cmpq %rax, %rbp
jl 0x20e0
movq %rbx, %rdi
callq 0x2441
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/saulvargas[P]re-C-sys/recommender_ub.c
// Function: recommender_ub_create
recommender_t* recommender_ub_create(recdata_t* recdata, similarity_t* similarity, int k, int binary) {
    recommender_t* recommender;
    recommender_ub_args_t* args;
    
    recommender = malloc(sizeof(recommender_t));
    recommender->recommend = recommender_ub_recommend;
    recommender->close = recommender_ub_close;
    recommender->recdata = recdata;
    
    args = malloc(sizeof(recommender_ub_args_t));
    args->similarity = similarity;
    args->k = k;
    args->binary = binary;
    recommender->args = args;
    
    return recommender;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movl $0x20, %edi
callq 0x10b0
movq %rax, %r12
leaq -0x141(%rip), %rax      # 0x2088
movq %rax, (%r12)
leaq -0x39(%rip), %rax       # 0x219b
movq %rax, 0x8(%r12)
movq %r15, 0x10(%r12)
movl $0x10, %edi
callq 0x10b0
movq %r14, (%rax)
movl %ebp, 0x8(%rax)
movl %ebx, 0xc(%rax)
movq %rax, 0x18(%r12)
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/saulvargas[P]re-C-sys/recommender_ib.c
// Function: recommender_ib_recommend
double* recommender_ib_recommend(int uid, recdata_t* recdata, void* args) {
    idpairs_t* neighbors;
    idpairs_t* ud;
    int i;
    int j;
    double s;
    int iid;
    int jid;
    idpairs_t** cached_neighbors = ((recommender_ib_args_t*) args)->cached_neighbors;
    int binary = ((recommender_ib_args_t*) args)->binary;
    
    double* scores = calloc(recdata->N_items, sizeof(double));
    
    ud = recdata_userdata(recdata, uid);
    for (i = 0; i < idpairs_size(ud); i++) {
        jid = idpairs_keys(ud)[i];
        neighbors = cached_neighbors[jid];
        s = binary ? 1.0 : idpairs_values(ud)[i];
        for (j = 0; j < idpairs_size(neighbors); j++) {
            iid = idpairs_keys(neighbors)[j];
            scores[iid] += s * idpairs_values(neighbors)[j];
        }
    }
    idpairs_close_shallow(ud);

    return scores;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movl %edi, %ebp
movq (%rdx), %rax
movq %rax, 0x8(%rsp)
movl 0x8(%rdx), %eax
movl %eax, 0x4(%rsp)
movslq 0x4(%rsi), %rdi
movl $0x8, %esi
callq 0x1090
movq %rax, %rbx
movq %r14, %rdi
movl %ebp, %esi
callq 0x1298
movq %rax, %r14
movq %rax, %rdi
callq 0x2465
testl %eax, %eax
jle 0x22f0
xorl %ebp, %ebp
movq %r14, %rdi
callq 0x2468
movslq (%rax,%rbp,4), %rax
movq 0x8(%rsp), %rcx
movq (%rcx,%rax,8), %r15
movsd 0xd9d(%rip), %xmm0      # 0x3010
cmpl $0x0, 0x4(%rsp)
jne 0x2287
movq %r14, %rdi
callq 0x246d
movsd (%rax,%rbp,8), %xmm0
movsd %xmm0, 0x10(%rsp)
movq %r15, %rdi
callq 0x2465
testl %eax, %eax
jle 0x22da
xorl %r12d, %r12d
movq %r15, %rdi
callq 0x2468
movslq (%rax,%r12,4), %r13
movq %r15, %rdi
callq 0x246d
movsd (%rax,%r12,8), %xmm0
mulsd 0x10(%rsp), %xmm0
addsd (%rbx,%r13,8), %xmm0
movsd %xmm0, (%rbx,%r13,8)
incq %r12
movq %r15, %rdi
callq 0x2465
cltq
cmpq %rax, %r12
jl 0x229c
incq %rbp
movq %r14, %rdi
callq 0x2465
cltq
cmpq %rax, %rbp
jl 0x2256
movq %r14, %rdi
callq 0x2460
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/saulvargas[P]re-C-sys/recommender_ib.c
// Function: recommender_ib_close
void recommender_ib_close(recdata_t* recdata, void* args) {
    int iid;
    int N_items;
    recommender_ib_args_t* a = args;
    
    N_items = recdata->N_items;
    for (iid = 0; iid < N_items; iid++) {
        idpairs_close_deep(a->cached_neighbors[iid]);
    }
    free(a->cached_neighbors);

    free(args);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movslq 0x4(%rdi), %r14
testq %r14, %r14
jle 0x2332
xorl %r15d, %r15d
movq (%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x2441
incq %r15
cmpq %r15, %r14
jne 0x231e
movq (%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/saulvargas[P]re-C-sys/recommender_ib.c
// Function: calculate_neighbors
idpairs_t** calculate_neighbors(int N_items, similarity_t* similarity, int k) {
    int iid;
    idpairs_t** idpairs;
    
    idpairs = malloc(N_items * sizeof(idpairs_t*));
    for (iid = 0; iid < N_items; iid++) {
        idpairs[iid] = similarity_calculate(similarity, iid, k);
    }
    
    return idpairs;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movl %edi, %ebp
movslq %edi, %r12
leaq (,%r12,8), %rdi
callq 0x10b0
movq %rax, %r15
testl %r12d, %r12d
jle 0x2390
movl %ebp, %r13d
xorl %r12d, %r12d
movq %r14, %rdi
movl %r12d, %esi
movl %ebx, %edx
callq 0x16e4
movq %rax, (%r15,%r12,8)
incq %r12
cmpq %r12, %r13
jne 0x2377
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/saulvargas[P]re-C-sys/recommender_ib.c
// Function: recommender_ib_create
recommender_t* recommender_ib_create(recdata_t* recdata, similarity_t* similarity, int k, int binary) {
    recommender_t* recommender;
    recommender_ib_args_t* args;
    
    recommender = malloc(sizeof(recommender_t));
    recommender->recommend = recommender_ib_recommend;
    recommender->close = recommender_ib_close;
    recommender->recdata = recdata;
    
    args = malloc(sizeof(recommender_ib_args_t));
    args->cached_neighbors = calculate_neighbors(recdata->N_items, similarity, k);
    args->binary = binary;
    recommender->args = args;
    
    return recommender;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movl $0x20, %edi
callq 0x10b0
movq %rax, %r12
leaq -0x1c7(%rip), %rax      # 0x2204
movq %rax, (%r12)
leaq -0xcc(%rip), %rax       # 0x230a
movq %rax, 0x8(%r12)
movq %r15, 0x10(%r12)
movl $0x10, %edi
callq 0x10b0
movq %rax, %r13
movl 0x4(%r15), %edi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2347
movq %rax, (%r13)
movl %ebx, 0x8(%r13)
movq %r13, 0x18(%r12)
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/saulvargas[P]re-C-sys/idpairs.c
// Function: idpairs_create
idpairs_t* idpairs_create(int n, int* keys, double* values) {
    idpairs_t* pairs = malloc(sizeof(idpairs_t));
    
    pairs->n = n;
    pairs->keys = keys;
    pairs->values = values;
    
    return pairs;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
movl $0x18, %edi
callq 0x10b0
movl %ebp, (%rax)
movq %r14, 0x8(%rax)
movq %rbx, 0x10(%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/saulvargas[P]re-C-sys/idpairs.c
// Function: revert_int
void revert_int(int n, int* v) {
    int i;
    int x;
    for (i = 0; i < n / 2; i++) {
        x = v[i];
        v[i] = v[n - i - 1];
        v[n - i - 1] = x;
    }
}

// Assembly:
cmpl $0x2, %edi
jl 0x24a0
movl %edi, %eax
shrl %edi
leaq (%rsi,%rax,4), %rax
addq $-0x4, %rax
negq %rdi
xorl %ecx, %ecx
movl (%rsi), %edx
movl (%rax,%rcx,4), %r8d
movl %r8d, (%rsi)
movl %edx, (%rax,%rcx,4)
addq $0x4, %rsi
decq %rcx
cmpq %rcx, %rdi
jne 0x2488
retq
// File: /workspace/github_c_makefile_star2_O1/saulvargas[P]re-C-sys/idpairs.c
// Function: revert_double
void revert_double(int n, double* v) {
    int i;
    double x;
    for (i = 0; i < n / 2; i++) {
        x = v[i];
        v[i] = v[n - i - 1];
        v[n - i - 1] = x;
    }

}

// Assembly:
cmpl $0x2, %edi
jl 0x24d5
movl %edi, %eax
shrl %edi
leaq (%rsi,%rax,8), %rax
addq $-0x8, %rax
negq %rdi
xorl %ecx, %ecx
movsd (%rsi), %xmm0
movsd (%rax,%rcx,8), %xmm1
movsd %xmm1, (%rsi)
movsd %xmm0, (%rax,%rcx,8)
addq $0x8, %rsi
decq %rcx
cmpq %rcx, %rdi
jne 0x24b7
retq
// File: /workspace/github_c_makefile_star2_O1/saulvargas[P]re-C-sys/aux.c
// Function: read_args
int read_args(int argc, char** argv, FILE** user_data, FILE** item_data, int* N_users, int* N_items, int* N_prefs, int* binary) {
    char* file;

    if (argc != 6) {
        return 0;
    }
    
    file = malloc((strlen(argv[1]) + 7) * sizeof(char));

    strcpy(file, argv[1]);
    strcat(file, ".u");
    *user_data = fopen(file, "r");

    strcpy(file, argv[1]);
    strcat(file, ".i");
    *item_data = fopen(file, "r");
    
    free(file);

    *N_users = atoi(argv[2]);
    *N_items = atoi(argv[3]);
    *N_prefs = atoi(argv[4]);
    *binary = atoi(argv[5]);
    
    return 1;
}

// Assembly:
xorl %eax, %eax
cmpl $0x6, %edi
jne 0x264e
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbx
movq 0x8(%rsi), %r14
movq %r14, %rdi
movq %r9, 0x10(%rsp)
movq %r8, 0x8(%rsp)
callq 0x1070
leaq 0x7(%rax), %rdi
callq 0x10b0
movq %rax, %rbp
movq %rax, %rdi
movq %r14, %rsi
callq 0x1040
movq %rbp, %rdi
callq 0x1070
xorl %r15d, %r15d
movb %r15b, 0x2(%rbp,%rax)
movw $0x752e, (%rbp,%rax)    # imm = 0x752E
leaq 0xa66(%rip), %r14       # 0x301b
movq %rbp, %rdi
movq %r14, %rsi
callq 0x10c0
movq %rax, (%r13)
movq 0x8(%rbx), %rsi
movq %rbp, %rdi
callq 0x1040
movq %rbp, %rdi
callq 0x1070
movb %r15b, 0x2(%rbp,%rax)
movw $0x692e, (%rbp,%rax)    # imm = 0x692E
movq %rbp, %rdi
movq %r14, %rsi
callq 0x10c0
movq %rax, (%r12)
movq %rbp, %rdi
callq 0x1030
movq 0x10(%rbx), %rdi
callq 0x10e0
movq 0x8(%rsp), %rcx
movl %eax, (%rcx)
movq 0x18(%rbx), %rdi
callq 0x10e0
movq 0x10(%rsp), %rcx
movl %eax, (%rcx)
movq 0x20(%rbx), %rdi
callq 0x10e0
movq 0x50(%rsp), %rcx
movl %eax, (%rcx)
movq 0x28(%rbx), %rdi
callq 0x10e0
movq 0x58(%rsp), %rcx
movl %eax, (%rcx)
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/saulvargas[P]re-C-sys/recommender_pop.c
// Function: recommender_pop_recommend
double* recommender_pop_recommend(int uid, recdata_t* recdata, void* args) {
    int iid;
    double* scores;

    (void) uid;
    (void) args;

    scores = calloc(recdata->N_items, sizeof(double));
    for (iid = 0; iid < recdata->N_items; iid++) {
        scores[iid] = recdata_itemdata_size(recdata, iid);
    }

    return scores;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movslq 0x4(%rsi), %r15
movl $0x8, %esi
movq %r15, %rdi
callq 0x1090
movq %rax, %r14
testq %r15, %r15
jle 0x2698
xorl %r15d, %r15d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x128a
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, (%r14,%r15,8)
incq %r15
movslq 0x4(%rbx), %rax
cmpq %rax, %r15
jl 0x2674
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/saulvargas[P]re-C-sys/recommender_pop.c
// Function: recommender_pop_create
recommender_t* recommender_pop_create(recdata_t* recdata) {
    recommender_t* recommender;
    
    recommender = malloc(sizeof(recommender_t));
    recommender->recommend = recommender_pop_recommend;
    recommender->close = recommender_pop_close;
    recommender->recdata = recdata;
    recommender->args = NULL;
    
    return recommender;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x20, %edi
callq 0x10b0
leaq -0x67(%rip), %rcx       # 0x2650
movq %rcx, (%rax)
leaq -0x20(%rip), %rcx       # 0x26a1
movq %rcx, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq $0x0, 0x18(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/eric-lo[P]3150/4-ProcessKernel/printf_example_slow.c
// Function: main
int main(void) {
	int i = 0;
	for(i = 0; i < MAX; i++) {
		printf("x\n");
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl $0xf4240, %ebp          # imm = 0xF4240
leaq 0xeb9(%rip), %rbx       # 0x2004
movq %rbx, %rdi
callq 0x1030
decl %ebp
jne 0x114b
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/antonblanchard[P]will-it-scale/tests/unlink2.c
// Function: testcase_prepare
void testcase_prepare(unsigned long nr_tasks)
{
	int i;
	tmpdirs = (char(*)[sizeof(template)])malloc(sizeof(template) * nr_tasks);
	assert(tmpdirs);

	char tmpfile[PATH_MAX];
	int fd;

	for (i = 0; i < nr_tasks; i++) {
		strcpy(tmpdirs[i], template);
		char *tmpdir = tmpdirs[i];
		assert(mkdtemp(tmpdir) != NULL);
		sprintf(tmpfile, "%s/willitscale", tmpdir);
		fd = open(tmpfile, O_RDWR|O_CREAT, 0600);
		assert(fd >= 0);
		close(fd);
	}

	local_nr_tasks = nr_tasks;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1018, %rsp           # imm = 0x1018
movq %rdi, %rbx
leaq (,%rdi,8), %rax
leaq (%rax,%rax,2), %rdi
callq 0x21e0
movq %rax, 0xa4fc(%rip)      # 0xd1c8
testq %rax, %rax
je 0x2db8
movq %rbx, 0x8(%rsp)
testq %rbx, %rbx
je 0x2d5c
movabsq $0x5858585858582e, %r13 # imm = 0x5858585858582E
leaq 0x60e(%rip), %r14       # 0x32fe
leaq 0x10(%rsp), %r15
movq 0x8(%rsp), %rbp
xorl %ebx, %ebx
movq 0xa4c5(%rip), %rax      # 0xd1c8
leaq (%rax,%rbx), %r12
movups 0x5c0(%rip), %xmm0      # 0x32ce
movups %xmm0, (%rax,%rbx)
movq %r13, 0x10(%rax,%rbx)
movq %r12, %rdi
callq 0x2210
testq %rax, %rax
je 0x2d7a
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x22a0
movq %r15, %rdi
movl $0x42, %esi
movl $0x180, %edx            # imm = 0x180
xorl %eax, %eax
callq 0x2240
testl %eax, %eax
js 0x2d99
movl %eax, %edi
callq 0x2170
addq $0x18, %rbx
decq %rbp
jne 0x2cfc
movq 0x8(%rsp), %rax
movq %rax, 0xa468(%rip)      # 0xd1d0
addq $0x1018, %rsp           # imm = 0x1018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x565(%rip), %rdi       # 0x32e6
leaq 0x511(%rip), %rsi       # 0x3299
leaq 0x51a(%rip), %rcx       # 0x32a9
movl $0x1d, %edx
callq 0x2140
leaq 0x56d(%rip), %rdi       # 0x330d
leaq 0x4f2(%rip), %rsi       # 0x3299
leaq 0x4fb(%rip), %rcx       # 0x32a9
movl $0x20, %edx
callq 0x2140
leaq 0x4d2(%rip), %rdi       # 0x3291
leaq 0x4d3(%rip), %rsi       # 0x3299
leaq 0x4dc(%rip), %rcx       # 0x32a9
movl $0x15, %edx
callq 0x2140
// File: /workspace/github_c_makefile_star2_O1/antonblanchard[P]will-it-scale/tests/unlink2.c
// Function: testcase
void testcase(unsigned long long *iterations, unsigned long nr)
{
	char tmpfile[PATH_MAX];

	sprintf(tmpfile, "%s/willitscale", tmpdirs[nr]);

	while (1) {
		int fd = open(tmpfile, O_RDWR|O_CREAT, 0600);
		assert(fd >= 0);
		close(fd);
		unlink(tmpfile);

		(*iterations)++;
	}
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
movq %rdi, %rbx
leaq (%rsi,%rsi,2), %rdx
shlq $0x3, %rdx
addq 0xa3d5(%rip), %rdx      # 0xd1c8
leaq 0x504(%rip), %rsi       # 0x32fe
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x22a0
movq %r14, %rdi
movl $0x42, %esi
movl $0x180, %edx            # imm = 0x180
xorl %eax, %eax
callq 0x2240
testl %eax, %eax
js 0x2e4c
movq %rsp, %r14
movl %eax, %edi
callq 0x2170
movq %r14, %rdi
callq 0x2080
incq (%rbx)
movq %r14, %rdi
movl $0x42, %esi
movl $0x180, %edx            # imm = 0x180
xorl %eax, %eax
callq 0x2240
testl %eax, %eax
jns 0x2e22
leaq 0x4ba(%rip), %rdi       # 0x330d
leaq 0x43f(%rip), %rsi       # 0x3299
leaq 0x4b4(%rip), %rcx       # 0x3315
movl $0x30, %edx
callq 0x2140
// File: /workspace/github_c_makefile_star2_O1/antonblanchard[P]will-it-scale/tests/unlink2.c
// Function: testcase_cleanup
void testcase_cleanup(void)
{
	int i;
	char tmpfile[PATH_MAX];

	for (i = 0; i < local_nr_tasks; i++) {
		sprintf(tmpfile, "%s/willitscale", tmpdirs[i]);
		unlink(tmpfile);
		rmdir(tmpdirs[i]);
	}
	free(tmpdirs);
}

// Assembly:
cmpq $0x0, 0xa35d(%rip)      # 0xd1d0
je 0x2edf
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
leaq 0x474(%rip), %rbx       # 0x32fe
movq %rsp, %r14
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0xa32e(%rip), %rdx      # 0xd1c8
addq %r15, %rdx
movq %r14, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x22a0
movq %r14, %rdi
callq 0x2080
movq 0xa30f(%rip), %rdi      # 0xd1c8
addq %r15, %rdi
callq 0x20f0
incq %r12
addq $0x18, %r15
cmpq %r12, 0xa301(%rip)      # 0xd1d0
ja 0x2e93
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r12
popq %r14
popq %r15
movq 0xa2e2(%rip), %rdi      # 0xd1c8
jmp 0x2050
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/utils/rra/rrainfo.c
// Function: main
int
main(int argc,char **argv)
    {
    int argIndex = 1;

    int i;

    argIndex = processOptions(argc,argv);

    if (argIndex == argc)
        info("stdin",stdin);
    else
        {
        for (i = argIndex; i < argc; ++i)
            {
            FILE *fp = OpenFile(argv[i],"r");
            info(argv[i],OpenFile(argv[i],"r"));
            fclose(fp);
            }
        }

    return 0;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %ebx
movl $0x1, %r12d
cmpl $0x2, %edi
jl 0x1632
movl %ebx, %r13d
movl $0x1, %r12d
leaq 0x2abe(%rip), %r15      # 0x407c
movq (%r14,%r12,8), %rsi
cmpb $0x2d, (%rsi)
jne 0x1632
movzbl 0x1(%rsi), %eax
cmpl $0x71, %eax
jle 0x15e6
cmpl $0x72, %eax
je 0x1608
cmpl $0x73, %eax
jne 0x1614
movl $0x1, 0x5b78(%rip)      # 0x715c
jmp 0x1627
cmpl $0x62, %eax
je 0x15fc
cmpl $0x63, %eax
jne 0x161d
movl $0x1, 0x5b6e(%rip)      # 0x7168
jmp 0x1627
movl $0x1, 0x5b5e(%rip)      # 0x7164
jmp 0x1627
movl $0x1, 0x5b4e(%rip)      # 0x7160
jmp 0x1627
cmpl $0x76, %eax
je 0x16bb
movq %r15, %rdi
xorl %eax, %eax
callq 0x1798
incq %r12
cmpq %r12, %r13
jne 0x15be
movl %r13d, %r12d
subl %r12d, %ebx
jne 0x164f
movq 0x599a(%rip), %rax      # 0x6fd8
movq (%rax), %rsi
leaq 0x29c9(%rip), %rdi      # 0x4011
callq 0x16de
jmp 0x16aa
jle 0x16aa
movq %rbx, %rcx
movslq %r12d, %rax
leaq (%r14,%rax,8), %rax
movq %rax, -0x30(%rbp)
xorl %ebx, %ebx
movq -0x30(%rbp), %r12
movq (%r12,%rbx,8), %rdi
leaq 0x2e7f(%rip), %r13      # 0x44ef
movq %r13, %rsi
movq %rcx, %r14
callq 0x1832
movq %rax, %r15
movq (%r12,%rbx,8), %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0x1832
movq %r12, %rdi
movq %rax, %rsi
callq 0x16de
movq %r15, %rdi
callq 0x1090
movq %r14, %rcx
incq %rbx
cmpl %ebx, %ecx
jne 0x1661
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x5a76(%rip), %rsi      # 0x7138
movq 0x5a77(%rip), %rdx      # 0x7140
leaq 0x299d(%rip), %rdi      # 0x406d
xorl %eax, %eax
callq 0x10b0
xorl %edi, %edi
callq 0x1200
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/utils/rra/rrainfo.c
// Function: info
static void
info(char *name,FILE *in)
    {
    RRA *h;

    h = newRRAHeader();
    readRRAHeader(in,h,0);

    printf("%s\n",name);
    if (channels)
        printf("    %d\n",h->channels);
    else if (sampleRate)
        printf("    %d\n",h->sampleRate);
    else if (samples)
        printf("    %d\n",h->samples);
    else if (bitsPerSample)
        printf("    %d\n",h->bitsPerSample);
    else
        {
        printf("    sampleRate: %d\n",h->sampleRate);
        printf("    bitsPerSample: %d\n",h->bitsPerSample);
        printf("    channels: %d\n",h->channels);
        printf("    samples: %d\n",h->samples);
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
callq 0x1aaf
movq %rax, %rbx
movq %r14, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x1ebc
movq %r15, %rdi
callq 0x1070
cmpl $0x0, 0x5a56(%rip)      # 0x7168
je 0x1718
movl (%rbx), %esi
jmp 0x1740
cmpl $0x0, 0x5a41(%rip)      # 0x7160
je 0x1726
movl 0x4(%rbx), %esi
jmp 0x1740
cmpl $0x0, 0x5a2f(%rip)      # 0x715c
je 0x1734
movl 0xc(%rbx), %esi
jmp 0x1740
cmpl $0x0, 0x5a29(%rip)      # 0x7164
je 0x1758
movl 0x8(%rbx), %esi
leaq 0x28d0(%rip), %rdi      # 0x4017
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x10b0
movl 0x4(%rbx), %esi
leaq 0x28bd(%rip), %rdi      # 0x401f
xorl %eax, %eax
callq 0x10b0
movl 0x8(%rbx), %esi
leaq 0x28c0(%rip), %rdi      # 0x4033
xorl %eax, %eax
callq 0x10b0
movl (%rbx), %esi
leaq 0x28c7(%rip), %rdi      # 0x404a
xorl %eax, %eax
callq 0x10b0
movl 0xc(%rbx), %esi
leaq 0x28c8(%rip), %rdi      # 0x405c
jmp 0x1747
nop
// File: /workspace/github_c_makefile_star2_O1/micahstairs[P]ScrambleChecker/movedelta.cpp
// Function: mindelta(cubepos const&, cubepos const&)
int mindelta(const cubepos &cp, const cubepos &cp2 = identity_cube) {
   int s = 0 ;
   for (int i=0; i<12; i++)
      if (cp.e[i] != cp2.e[i])
         s++ ;
   int r = md_lookup[s] ;
   s = 0 ;
   for (int i=0; i<8; i++)
      if (cp.c[i] != cp2.c[i])
         s++ ;
   s = md_lookup[s] ;
   if (s > r)
      return s ;
   else
      return r ;
}

// Assembly:
pxor %xmm1, %xmm1
xorl %eax, %eax
pcmpeqd %xmm2, %xmm2
movdqa 0x3a72(%rip), %xmm0     # 0x6010
movd 0x8(%rdi,%rax), %xmm3
movd 0x8(%rsi,%rax), %xmm4
pcmpeqb %xmm3, %xmm4
pxor %xmm2, %xmm4
punpcklbw %xmm4, %xmm4    # xmm4 = xmm4[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
punpcklwd %xmm4, %xmm4    # xmm4 = xmm4[0,0,1,1,2,2,3,3]
pand %xmm0, %xmm4
paddd %xmm4, %xmm1
addq $0x4, %rax
cmpq $0xc, %rax
jne 0x259e
pshufd $0xee, %xmm1, %xmm2     # xmm2 = xmm1[2,3,2,3]
paddd %xmm1, %xmm2
pshufd $0x55, %xmm2, %xmm1     # xmm1 = xmm2[1,1,1,1]
paddd %xmm2, %xmm1
movd %xmm1, %eax
leaq 0x6b77(%rip), %rcx      # 0x9160
movl (%rcx,%rax,4), %eax
pxor %xmm1, %xmm1
xorl %edx, %edx
pcmpeqd %xmm2, %xmm2
movd (%rdi,%rdx), %xmm3
movd (%rsi,%rdx), %xmm4
pcmpeqb %xmm3, %xmm4
pxor %xmm2, %xmm4
punpcklbw %xmm4, %xmm4    # xmm4 = xmm4[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
punpcklwd %xmm4, %xmm4    # xmm4 = xmm4[0,0,1,1,2,2,3,3]
pand %xmm0, %xmm4
paddd %xmm4, %xmm1
addq $0x4, %rdx
cmpq $0x8, %rdx
jne 0x25f6
pshufd $0xee, %xmm1, %xmm0     # xmm0 = xmm1[2,3,2,3]
paddd %xmm1, %xmm0
pshufd $0x55, %xmm0, %xmm1     # xmm1 = xmm0[1,1,1,1]
paddd %xmm0, %xmm1
movd %xmm1, %edx
movl (%rcx,%rdx,4), %ecx
cmpl %eax, %ecx
cmovgl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/micahstairs[P]ScrambleChecker/movedelta.cpp
// Function: parsemoveseq(char const*)
moveseq parsemoveseq(const char *s) {
  moveseq r ;
  const char *faces = "UuFfRrDdBbLlIiJjKk" ;
  while (*s) {
    while (*s && *s <= ' ')
       s++ ;
    if (*s == 0 || *s == '/')
       break ;
    const char *fp = strchr(faces, *s) ;
    if (fp == 0) {
       cerr << "Illegal face in " << *s << endl ;
       exit(10) ;
    }
    int f = (fp - faces) / 2 ;
    if (f * TWISTS > NMOVES)
       error("! bad face for this metric") ;
    s++ ;
    switch (*s) {
case '-':
case '3':
case '\'':
       r.push_back(f*TWISTS+2) ;
       s++ ;
       break ;
case '2':
       r.push_back(f*TWISTS+1) ;
       s++ ;
       break ;
case '+':
case '1':
       s++ ;
default:
       r.push_back(f*TWISTS) ;
       break ;
    }
  }
  return r ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
cmpb $0x0, (%rsi)
je 0x279e
movq %rsi, %rbp
leaq 0x39f9(%rip), %r14      # 0x606c
movabsq $0x8208000000000, %r12  # imm = 0x8208000000000
movabsq $0x2080000000000, %r13  # imm = 0x2080000000000
movq %rbp, %r15
movsbl (%rbp), %esi
cmpl $0x21, %esi
setl %al
testl %esi, %esi
setne %cl
incq %rbp
testb %al, %cl
jne 0x2687
testb %sil, %sil
je 0x279e
movzbl %sil, %eax
cmpl $0x2f, %eax
je 0x279e
movl $0x13, %edx
movq %r14, %rdi
callq 0x2190
testq %rax, %rax
je 0x27b0
subq %r14, %rax
movq %rax, %rbp
shrq $0x3f, %rbp
addq %rax, %rbp
shrq %rbp
cmpl $0x7, %ebp
jl 0x26ed
leaq 0x39a8(%rip), %rdi      # 0x6090
callq 0x4eca
leal (%rbp,%rbp,2), %eax
leaq 0x1(%r15), %rbp
movzbl 0x1(%r15), %ecx
cmpq $0x33, %rcx
ja 0x2713
btq %rcx, %r12
jb 0x272d
btq %rcx, %r13
jae 0x274d
addq $0x2, %r15
movq %r15, %rbp
movl %eax, 0xc(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x2776
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x2783
addl $0x2, %eax
movl %eax, 0x14(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
jne 0x2763
movq %rbx, %rdi
leaq 0x14(%rsp), %rdx
callq 0x33be
jmp 0x276d
cmpq $0x32, %rcx
jne 0x2713
incl %eax
movl %eax, 0x10(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x278f
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
addq $0x2, %r15
movq %r15, %rbp
jmp 0x2783
movq %rbx, %rdi
leaq 0xc(%rsp), %rdx
callq 0x33be
cmpb $0x0, (%rbp)
jne 0x2687
jmp 0x279e
movq %rbx, %rdi
leaq 0x10(%rsp), %rdx
callq 0x33be
jmp 0x276d
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x6831(%rip), %rdi      # 0x8fe8
leaq 0x38c1(%rip), %rsi      # 0x607f
movl $0x10, %edx
callq 0x21a0
movb (%r15), %al
leaq 0xb(%rsp), %rsi
movb %al, (%rsi)
movq 0x680f(%rip), %rdi      # 0x8fe8
movl $0x1, %edx
callq 0x21a0
movq %rax, %rdi
callq 0x20a0
movl $0xa, %edi
callq 0x21c0
jmp 0x27fd
jmp 0x27fd
jmp 0x27fd
jmp 0x27fd
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x2814
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x2180
movq %r14, %rdi
callq 0x2280
// File: /workspace/github_c_makefile_star2_O1/micahstairs[P]ScrambleChecker/movedelta.cpp
// Function: parseposition(cubepos&, char const*)
void parseposition(cubepos &cp, const char *s) {
  cp = identity_cube ;
  if (cp.parse_Singmaster(s) == 0) {
    cubepos cp2 ;
    cp.invert_into(cp2) ;
    cp = cp2 ;
    return ;
  }
  cp = identity_cube ;
  moveseq r = parsemoveseq(s) ;
  for (int i=0; i<r.size(); i++)
    cp.movepc(r[i]) ;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x6e16(%rip), %r15      # 0x9648
movl 0x10(%r15), %eax
movl %eax, 0x10(%rdi)
movups (%r15), %xmm0
movups %xmm0, (%rdi)
callq 0x3a62
testq %rax, %rax
je 0x28aa
movl 0x10(%r15), %eax
movl %eax, 0x10(%rbx)
movups (%r15), %xmm0
movups %xmm0, (%rbx)
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x2641
movq (%r15), %rdi
cmpq %rdi, 0x8(%r15)
je 0x2896
xorl %r14d, %r14d
movl (%rdi,%r14,4), %esi
movq %rbx, %rdi
callq 0x4796
incq %r14
movq (%rsp), %rdi
movq 0x8(%rsp), %rax
subq %rdi, %rax
sarq $0x2, %rax
cmpq %r14, %rax
ja 0x2872
testq %rdi, %rdi
je 0x28d6
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
jmp 0x28d6
movl 0x10(%r15), %eax
movq %rsp, %r14
movl %eax, 0x10(%r14)
movups (%r15), %xmm0
movaps %xmm0, (%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3a18
movl 0x10(%r14), %eax
movl %eax, 0x10(%rbx)
movaps (%r14), %xmm0
movups %xmm0, (%rbx)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x28f9
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq %rbx, %rdi
callq 0x2280