LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/mgrosvenor[P]evec/./evec.h
// Function: evpush
void* evpush(void* vec, void* obj, size_t obj_size)
{
    void* result = vec;
    if(!vec){
        //Get some memory
        result = evinisz(obj_size);
    }

    evhd_t* hdr = EV_HDR(result);
    ifp(_evhdrcheck(hdr),
        EV_FAIL("Header sanity check failed\n");
                return NULL;
    );

    //Sanity check
    ifp(obj_size > hdr->slt_size,
        EV_FAIL("Object size (%" PRId64 ") is larger than there is space (%" PRId64 ")\n",
                obj_size,
                hdr->slt_size);
                return NULL;
    );

    //Enough space?
    if(hdr->obj_count == hdr->slt_count){
        //Get some more
        result = _evgrow(result);
        hdr = EV_HDR(result);
    }

    void* next_obj = ((char*)result) + hdr->slt_size * hdr->obj_count;
    memcpy(next_obj,obj,obj_size);
    hdr->obj_count++;

    return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
testq %rdi, %rdi
jne 0x16bc
movl $0x8, %esi
movq %rbx, %rdi
callq 0x12c4
movq %rax, %r15
leaq -0x30(%r15), %r12
movq %r12, %rdi
callq 0x1427
testl %eax, %eax
jne 0x171e
movq -0x28(%r15), %rdx
cmpq %rbx, %rdx
jb 0x173f
movq -0x20(%r15), %rax
cmpq -0x18(%r15), %rax
jne 0x16f1
movq %r15, %rdi
callq 0x1596
movq %rax, %r15
movq %rax, %r12
addq $-0x30, %r12
movq 0x10(%r12), %rdi
imulq 0x8(%r12), %rdi
addq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x10b0
incq 0x10(%r12)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x1b27(%rip), %rcx      # 0x324c
leaq 0x1adf(%rip), %r8       # 0x320b
leaq 0x1a32(%rip), %r9       # 0x3165
movl $0x23b, %esi            # imm = 0x23B
xorl %eax, %eax
callq 0x1365
leaq 0x1a1f(%rip), %rdi      # 0x3165
leaq 0x1aff(%rip), %rcx      # 0x324c
leaq 0x1aff(%rip), %r8       # 0x3253
movl $0x243, %esi            # imm = 0x243
movq %rbx, %r9
xorl %eax, %eax
pushq %rdi
pushq %rdx
callq 0x1365
// File: /workspace/github_c_makefile_star2_O1/mgrosvenor[P]evec/./evec.h
// Function: evcnt
size_t evcnt(void* vec)
{
    if(!vec){
        return 0;
    };

    evhd_t *hdr =  EV_HDR(vec);
    ifp(_evhdrcheck(hdr),
        EV_FAIL("Header sanity check failed\n");
                return -1;
    );

    return hdr->obj_count;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x1781
movq %rdi, %rbx
addq $-0x30, %rdi
callq 0x1427
testl %eax, %eax
jne 0x1785
movq -0x20(%rbx), %rax
jmp 0x1783
xorl %eax, %eax
popq %rbx
retq
leaq 0x1afe(%rip), %rcx      # 0x328a
leaq 0x1a78(%rip), %r8       # 0x320b
leaq 0x19cb(%rip), %r9       # 0x3165
movl $0x25e, %esi            # imm = 0x25E
xorl %eax, %eax
callq 0x1365
// File: /workspace/github_c_makefile_star2_O1/mgrosvenor[P]evec/./evec.h
// Function: evpop
void evpop(void *vec)
{
    ifp(!vec,
        //Uh ohhh....
        EV_FAIL("Cannot pop a NULL vector\n");
        return;
    );

    evhd_t* hdr =  EV_HDR(vec);
    ifp(_evhdrcheck(hdr),
        EV_FAIL("Header sanity check failed\n");
        return;
    );

    if(hdr->obj_count)
        hdr->obj_count--;

}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x19d3
movq %rdi, %rbx
addq $-0x30, %rdi
callq 0x1427
testl %eax, %eax
jne 0x19ef
movq -0x20(%rbx), %rax
testq %rax, %rax
je 0x19d1
decq %rax
movq %rax, -0x20(%rbx)
popq %rbx
retq
leaq 0x19a6(%rip), %rcx      # 0x3380
leaq 0x19a5(%rip), %r8       # 0x3386
leaq 0x177d(%rip), %r9       # 0x3165
movl $0x2d5, %esi            # imm = 0x2D5
jmp 0x1a09
leaq 0x198a(%rip), %rcx      # 0x3380
leaq 0x180e(%rip), %r8       # 0x320b
leaq 0x1761(%rip), %r9       # 0x3165
movl $0x2db, %esi            # imm = 0x2DB
xorl %eax, %eax
callq 0x1365
// File: /workspace/github_c_makefile_star2_O1/mgrosvenor[P]evec/test.c
// Function: main
int main(void)
{

    for(int i = 0; tests[i].name != 0; i++){
        printf("Running test %i: %s ...", i+1, tests[i].name);
        int result = tests[i].run();
        printf("%s\n", result ? "Success" : "Fail");
        if(!result){
            return -1;
        }
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x3381(%rip), %r12      # 0x50a8
movl $0x1, %ebx
leaq 0x17cc(%rip), %r13      # 0x34ff
leaq 0x17bd(%rip), %r14      # 0x34f7
xorl %ebp, %ebp
movq -0x8(%r12), %rdx
testq %rdx, %rdx
je 0x1d87
leaq 0x1792(%rip), %rdi      # 0x34df
movl %ebx, %esi
xorl %eax, %eax
callq 0x1070
xorl %eax, %eax
callq *(%r12)
movl %eax, %r15d
testl %eax, %eax
movq %r14, %rdi
cmoveq %r13, %rdi
callq 0x1050
cmpl $0x1, %r15d
movl $0x0, %eax
sbbl %eax, %eax
orl %eax, %ebp
addq $0x10, %r12
incl %ebx
testl %r15d, %r15d
jne 0x1d3c
jmp 0x1d89
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mgrosvenor[P]evec/test.c
// Function: test1
static int test1()
{
    EV_DBG("test 1\n");
    int* a = evinit(int);
    if(evcnt(a) != 0) return 0;
    if(evvsz(a) != EV_INIT_COUNT) return 0;
    evfree(a);
    return 1;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl $0x4, %edi
movl $0x8, %esi
callq 0x12c4
movq %rax, %rbx
movq %rax, %rdi
callq 0x1765
xorl %ebp, %ebp
testq %rax, %rax
jne 0x1dd9
movq %rbx, %rdi
callq 0x1acf
cmpq $0x8, %rax
jne 0x1dd9
movq %rbx, %rdi
callq 0x1965
movl $0x1, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mgrosvenor[P]evec/test.c
// Function: test2
static int test2()
{
    int* a = evinisz(128);
    if(evcnt(a) != 0) return 0;
    if(evvsz(a) != EV_INIT_COUNT) return 0;
    evfree(a);
    return 1;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl $0x80, %edi
movl $0x8, %esi
callq 0x12c4
movq %rax, %rbx
movq %rax, %rdi
callq 0x1765
xorl %ebp, %ebp
testq %rax, %rax
jne 0x1e21
movq %rbx, %rdi
callq 0x1acf
cmpq $0x8, %rax
jne 0x1e21
movq %rbx, %rdi
callq 0x1965
movl $0x1, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mgrosvenor[P]evec/test.c
// Function: test3
static int test3()
{
    int* a = evini(128,64);
    if(evcnt(a) != 0) return 0;
    if(evvsz(a) != 64) return 0;
    evfree(a);
    return 1;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl $0x80, %edi
movl $0x40, %esi
callq 0x12c4
movq %rax, %rbx
movq %rax, %rdi
callq 0x1765
xorl %ebp, %ebp
testq %rax, %rax
jne 0x1e69
movq %rbx, %rdi
callq 0x1acf
cmpq $0x40, %rax
jne 0x1e69
movq %rbx, %rdi
callq 0x1965
movl $0x1, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mgrosvenor[P]evec/test.c
// Function: test4
static int test4()
{
    int* a = evini(128,64);
    for(int i = 0; i < 1000; i++){
        evpsh(a,i);
    }

    for(int i = 0; i < 1000; i++){
        int* ai = evidx(a,i);
        if( *ai != i){ return 0;}
    }

    evfree(a);
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0x80, %edi
movl $0x40, %esi
callq 0x12c4
movq %rax, %rbx
xorl %ebp, %ebp
leaq 0x4(%rsp), %r14
movl %ebp, 0x4(%rsp)
movl $0x4, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1696
movq %rax, %rbx
incl %ebp
cmpl $0x3e8, %ebp            # imm = 0x3E8
jne 0x1e92
xorl %r14d, %r14d
xorl %r15d, %r15d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x17a6
movl (%rax), %eax
cmpq %rax, %r15
jne 0x1ee5
incq %r15
cmpq $0x3e8, %r15            # imm = 0x3E8
jne 0x1eb9
movq %rbx, %rdi
callq 0x1965
movl $0x1, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mgrosvenor[P]evec/test.c
// Function: test5
static int test5()
{
    char** a = evini(128,64);
    for(int i = 0; i < 1000; i++){
        evpsh(a,"AA");
    }

    for(int i = 0; i < 1000; i++){
        char* ai = evidx(a,i);
        if( strcmp(ai,"AA"))return 0;
    }

    evfree(a);
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl $0x80, %edi
movl $0x40, %esi
callq 0x12c4
movq %rax, %rbx
movl $0x3e8, %ebp            # imm = 0x3E8
leaq 0x1606(%rip), %r14      # 0x351f
movl $0x3, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1696
movq %rax, %rbx
decl %ebp
jne 0x1f19
xorl %r14d, %r14d
leaq 0x15e5(%rip), %r15      # 0x351f
xorl %r12d, %r12d
movq %rbx, %rdi
movq %r12, %rsi
callq 0x17a6
movq %rax, %rdi
movq %r15, %rsi
callq 0x10a0
testl %eax, %eax
jne 0x1f71
incq %r12
cmpq $0x3e8, %r12            # imm = 0x3E8
jne 0x1f3d
movq %rbx, %rdi
callq 0x1965
movl $0x1, %r14d
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mgrosvenor[P]evec/test.c
// Function: test6
static int test6()
{
    char** a = NULL;
    char* str = "AA";
    for(int i = 0; i < 1000; i++){
        evpsh(a,str);
    }

    for(int i = 0; i < 1000; i++){
        char** ai = evidx(a,i);
        if( strcmp(*ai,str))return 0;
    }

    evfree(a);
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl $0x3e8, %ebp            # imm = 0x3E8
xorl %ebx, %ebx
leaq 0x1588(%rip), %r15      # 0x351f
leaq 0x8(%rsp), %r14
movq %r15, 0x8(%rsp)
movl $0x8, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1696
movq %rax, %rbx
decl %ebp
jne 0x1f9c
xorl %r14d, %r14d
leaq 0x155d(%rip), %r15      # 0x351f
xorl %r12d, %r12d
movq %rbx, %rdi
movq %r12, %rsi
callq 0x17a6
movq (%rax), %rdi
movq %r15, %rsi
callq 0x10a0
testl %eax, %eax
jne 0x1ff9
incq %r12
cmpq $0x3e8, %r12            # imm = 0x3E8
jne 0x1fc5
movq %rbx, %rdi
callq 0x1965
movl $0x1, %r14d
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mgrosvenor[P]evec/test.c
// Function: test7
static int test7()
{
    char** a = NULL;
    char* strs[] = {
            "Test",
            "Best",
            "Rest",
            "Vector",
            "Victor",
            0
    };

    for(int i = 0; strs[i]; i++){
        evpsh(a, strs[i]);
    }

    for(int i = 0; i < evcnt(a); i++){
        if(strcmp(a[i],strs[i])) return 0;
    }

    a = evfree(a);
    return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
xorl %r12d, %r12d
leaq 0x2da5(%rip), %r15      # 0x4dc0
movq %rsp, %r14
xorl %ebx, %ebx
movq (%r12,%r15), %rax
movq %rax, (%rsp)
movl $0x8, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1696
movq %rax, %rbx
addq $0x8, %r12
cmpq $0x28, %r12
jne 0x2020
movq %rbx, %rdi
callq 0x1765
testq %rax, %rax
je 0x207c
xorl %r14d, %r14d
xorl %r12d, %r12d
movq (%rbx,%r12,8), %rdi
movq (%r15), %rsi
callq 0x10a0
testl %eax, %eax
jne 0x208a
incq %r12
movq %rbx, %rdi
callq 0x1765
addq $0x8, %r15
cmpq %r12, %rax
ja 0x2058
movq %rbx, %rdi
callq 0x1965
movl $0x1, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/mgrosvenor[P]evec/test.c
// Function: test8
static int test8() {
    int* a = NULL;
    int ints[] = { 4,2,6,10,8 };
    int ints_srt[] = { 2,4,6,8,10 };
    const int ints_cnt = sizeof(ints)/sizeof(int);

#define REPEATS 1000
    for(int i = 0; i < REPEATS; i++){
        for(int j = 0; j < ints_cnt; j++){
            evpsh(a, ints[j]);
        }
    }

    if(evcnt(a) != REPEATS * ints_cnt) return 0;


    evsort(a,compare);

    //Remove duplicates
    for(int i = 1; i < evcnt(a); i++){
        if(a[i] == a[i-1]){
            evdel(a,i);
            i--;
        }
    }

    if(evcnt(a) != ints_cnt) {
        printf("%li != %i", evcnt(a) , ints_cnt);
        return 0;
    }

    for(int i =0; i < evcnt(a); i++){
        if(a[i] != ints_srt[i]) {
            printf("%i != %i", a[i], ints_srt[i]);
            return 0;
        }
    }

    a = evfree(a);
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %r15d, %r15d
leaq 0x14b2(%rip), %r12      # 0x3560
leaq 0x4(%rsp), %r14
xorl %ebx, %ebx
xorl %r13d, %r13d
movl (%r13,%r12), %eax
movl %eax, 0x4(%rsp)
movl $0x4, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1696
movq %rax, %rbx
addq $0x4, %r13
cmpq $0x14, %r13
jne 0x20b8
incl %r15d
cmpl $0x3e8, %r15d           # imm = 0x3E8
jne 0x20b5
movq %rbx, %rdi
callq 0x1765
xorl %ebp, %ebp
cmpq $0x1388, %rax           # imm = 0x1388
jne 0x21d4
leaq 0xde(%rip), %rsi        # 0x21e5
movq %rbx, %rdi
callq 0x1c16
movq %rbx, %rdi
callq 0x1765
cmpq $0x2, %rax
jb 0x2154
movl $0x1, %ebp
movl $0x1, %r14d
movl (%rbx,%r14,4), %eax
movslq %ebp, %rcx
cmpl -0x4(%rbx,%rcx,4), %eax
jne 0x2142
decl %ebp
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1a10
incl %ebp
movslq %ebp, %r14
movq %rbx, %rdi
callq 0x1765
cmpq %r14, %rax
ja 0x2128
movq %rbx, %rdi
callq 0x1765
movq %rax, %r14
movq %rbx, %rdi
callq 0x1765
cmpq $0x5, %r14
jne 0x21aa
testq %rax, %rax
je 0x219b
leaq 0x1407(%rip), %r14      # 0x3580
xorl %r15d, %r15d
movl (%rbx,%r15,4), %esi
movl (%r14), %edx
cmpl %edx, %esi
jne 0x21c4
incq %r15
movq %rbx, %rdi
callq 0x1765
addq $0x4, %r14
cmpq %r15, %rax
ja 0x217c
movq %rbx, %rdi
callq 0x1965
movl $0x1, %ebp
jmp 0x21d4
leaq 0x138e(%rip), %rdi      # 0x353f
xorl %ebp, %ebp
movq %rax, %rsi
movl $0x5, %edx
xorl %eax, %eax
callq 0x1070
jmp 0x21d4
leaq 0x137e(%rip), %rdi      # 0x3549
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1070
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mgrosvenor[P]evec/test.c
// Function: test9
static int test9()
{
    int* a = evini(128,64);
    for(int i = 0; i < 1000; i++){
        evpsh(a,i);
    }

    for(int i = 0; i < 999; i++){
        evdel(a,0);
        int* ai = evidx(a,0);
        if(*ai != i +1) return 0;
    }

    evdel(a,0);
    if(evcnt(a) != 0) return 0;

    evfree(a);
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0x80, %edi
movl $0x40, %esi
callq 0x12c4
movq %rax, %rbx
xorl %ebp, %ebp
leaq 0x4(%rsp), %r14
movl %ebp, 0x4(%rsp)
movl $0x4, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1696
movq %rax, %rbx
incl %ebp
cmpl $0x3e8, %ebp            # imm = 0x3E8
jne 0x220a
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1a10
cmpl $0x3e7, %r15d           # imm = 0x3E7
je 0x2258
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x17a6
incl %r15d
cmpl (%rax), %r15d
je 0x222e
jmp 0x2276
movq %rbx, %rdi
callq 0x1765
xorl %r14d, %r14d
testq %rax, %rax
jne 0x2276
movq %rbx, %rdi
callq 0x1965
movl $0x1, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mgrosvenor[P]evec/test.c
// Function: test10
static int test10()
{
    int* a = evini(sizeof(int), 0);
    for(int i = 0;i < 1000;i++){
        evpsh(a, i);
    }

    for(int i = 0;i < 999;i++){
        evpop(a);
        int* a0 = evidx(a,0);
        int* ac = evidx(a,evcnt(a) - 1);

        if(*a0 != 0) return 0;
        if(*ac != 999 - 1 - i) return 0;
    }

    evpop(a);
    if(evcnt(a) != 0) return 0;

    evfree(a);
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
xorl %r15d, %r15d
movl $0x4, %edi
xorl %esi, %esi
callq 0x12c4
movq %rax, %rbx
leaq 0x4(%rsp), %r14
movl %r15d, 0x4(%rsp)
movl $0x4, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1696
movq %rax, %rbx
incl %r15d
cmpl $0x3e8, %r15d           # imm = 0x3E8
jne 0x22a2
movl $0x3e6, %ebp            # imm = 0x3E6
movq %rbx, %rdi
callq 0x19ab
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x17a6
movq %rax, %r15
movq %rbx, %rdi
callq 0x1765
leaq -0x1(%rax), %rsi
movq %rbx, %rdi
callq 0x17a6
cmpl $0x0, (%r15)
jne 0x2329
cmpl (%rax), %ebp
jne 0x2329
addl $-0x1, %ebp
jb 0x22cb
movq %rbx, %rdi
callq 0x19ab
movq %rbx, %rdi
callq 0x1765
testq %rax, %rax
jne 0x2329
movq %rbx, %rdi
callq 0x1965
movl $0x1, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mgrosvenor[P]evec/test.c
// Function: test11
static int test11()
{
    int* a = evinisz(128);
    int* b = NULL;

    for(int i = 0; i < 1000; i++){
        evpsh(a,i);
    }

    b = evcpy(a);

    for(int i = 0; i < 1000; i++){
        int* ai = (int*)evidx(a,i);
        int* bi = (int*)evidx(b,i);

        //Check that these are indeed different peices of memory
        if(ai == bi) return 0;

        //But that they have the same value
        if(*ai != *bi) return 0;
    }

    evfree(a);
    evfree(b);
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0x80, %edi
movl $0x8, %esi
callq 0x12c4
movq %rax, %rbx
xorl %ebp, %ebp
leaq 0x4(%rsp), %r14
movl %ebp, 0x4(%rsp)
movl $0x4, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1696
movq %rax, %rbx
incl %ebp
cmpl $0x3e8, %ebp            # imm = 0x3E8
jne 0x235b
movq %rbx, %rdi
callq 0x1c89
movq %rax, %r15
xorl %r14d, %r14d
xorl %r12d, %r12d
movq %rbx, %rdi
movq %r12, %rsi
callq 0x17a6
movq %rax, %r13
movq %r15, %rdi
movq %r12, %rsi
callq 0x17a6
cmpq %rax, %r13
je 0x23d5
movl (%r13), %ecx
cmpl (%rax), %ecx
jne 0x23d5
incq %r12
cmpq $0x3e8, %r12            # imm = 0x3E8
jne 0x238d
movq %rbx, %rdi
callq 0x1965
movq %r15, %rdi
callq 0x1965
movl $0x1, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mgrosvenor[P]evec/test.c
// Function: test12
static int test12()
{
    int* a = NULL;
    size_t c = evcnt(a);
    if(c != 0){
        return 0;
    }

    int sum1    = 0;
    int first   = 0;
    int last    = 0;
    int r       = -1;
    for(int i = 0; i < 1000; i++){
        r = rand();
        if(i == 0){
            first = r;
        }

        evpsh(a,r);
        sum1 += r;
    }

    last = r;

    if(first != *(int*)evhead(a)){
        return 0;
    }

    if(last != *(int*)evtail(a)){
        return 0;
    }

    int sum2 = 0;
    eveach(a, ai){
        sum2 += *ai;
    }

    if(sum1 != sum2){
        return 0;
    }

    evfree(a);

    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %r13d, %r13d
movl $0x3e8, %ebp            # imm = 0x3E8
leaq 0x4(%rsp), %r15
xorl %r12d, %r12d
xorl %ebx, %ebx
callq 0x1110
movl %eax, %r14d
cmpl $0x3e8, %ebp            # imm = 0x3E8
cmovel %eax, %r13d
movl %eax, 0x4(%rsp)
movl $0x4, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1696
movq %rax, %rbx
addl %r14d, %r12d
decl %ebp
jne 0x2404
movq %rbx, %rdi
callq 0x187b
xorl %ebp, %ebp
cmpl (%rax), %r13d
jne 0x2496
movq %rbx, %rdi
callq 0x1765
leaq -0x1(%rax), %rsi
movq %rbx, %rdi
callq 0x17a6
cmpl (%rax), %r14d
jne 0x2496
movq %rbx, %rdi
callq 0x187b
xorl %ebp, %ebp
movl $0x0, %r14d
testq %rax, %rax
je 0x2484
xorl %r14d, %r14d
addl (%rax), %r14d
movq %rbx, %rdi
callq 0x18d0
testq %rax, %rax
jne 0x2474
cmpl %r14d, %r12d
jne 0x2496
movq %rbx, %rdi
callq 0x1965
movl $0x1, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/vidarr[P]ringbuffer/test/cached_ringbuffer_test.c
// Function: test_cached_ringbuffer_create
void test_cached_ringbuffer_create() {

    Ringbuffer* buffer = 0;

    buffer = ringbuffer_create(1, 0, 0);
    assert(buffer);
    assert(capacity_func == buffer->capacity);
    assert(add_func == buffer->add);
    assert(pop_func == buffer->pop);
    assert(free_func == buffer->free);

    buffer = buffer->free(buffer);

    fprintf(stdout, "cached ringbuffer_create OK\n");

}

// Assembly:
pushq %rax
movl $0x1, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x119c
testq %rax, %rax
je 0x13ee
leaq -0x12c(%rip), %rcx      # 0x1261
cmpq %rcx, (%rax)
jne 0x140d
leaq -0x12b(%rip), %rcx      # 0x126e
cmpq %rcx, 0x8(%rax)
jne 0x142c
leaq -0xe3(%rip), %rcx       # 0x12c7
cmpq %rcx, 0x10(%rax)
jne 0x144b
leaq -0xd0(%rip), %rcx       # 0x12eb
cmpq %rcx, 0x18(%rax)
jne 0x146a
movq %rax, %rdi
callq 0x12eb
movq 0x3c04(%rip), %rax      # 0x4fd8
movq (%rax), %rcx
leaq 0x1cfe(%rip), %rdi      # 0x30dc
movl $0x1c, %esi
movl $0x1, %edx
popq %rax
jmp 0x1070
leaq 0x1c31(%rip), %rdi      # 0x3026
leaq 0x1c31(%rip), %rsi      # 0x302d
leaq 0x1c48(%rip), %rcx      # 0x304b
movl $0x5a, %edx
callq 0x1040
leaq 0x1c5c(%rip), %rdi      # 0x3070
leaq 0x1c12(%rip), %rsi      # 0x302d
leaq 0x1c29(%rip), %rcx      # 0x304b
movl $0x5b, %edx
callq 0x1040
leaq 0x1c5f(%rip), %rdi      # 0x3092
leaq 0x1bf3(%rip), %rsi      # 0x302d
leaq 0x1c0a(%rip), %rcx      # 0x304b
movl $0x5c, %edx
callq 0x1040
leaq 0x1c58(%rip), %rdi      # 0x30aa
leaq 0x1bd4(%rip), %rsi      # 0x302d
leaq 0x1beb(%rip), %rcx      # 0x304b
movl $0x5d, %edx
callq 0x1040
leaq 0x1c51(%rip), %rdi      # 0x30c2
leaq 0x1bb5(%rip), %rsi      # 0x302d
leaq 0x1bcc(%rip), %rcx      # 0x304b
movl $0x5e, %edx
callq 0x1040
// File: /workspace/github_c_makefile_star2_O1/vidarr[P]ringbuffer/test/cached_ringbuffer_test.c
// Function: get_data_buffer
DataBuffer* get_data_buffer(Ringbuffer* cache, size_t min_length_bytes) {

    DataBuffer* db =  0;

    if(0 != cache) {
        db = cache->pop(cache);
    }

    if(0 == db) {
        db = calloc(1, sizeof(DataBuffer));
    }

    if(db->capacity_bytes < min_length_bytes) {
        if(0 != db->data) {
            free(db->data);
            db->data = 0;
        }
    }

    if(0 == db->data) {
        db->data = calloc(1, sizeof(min_length_bytes) * sizeof(uint8_t));
        db->capacity_bytes = min_length_bytes;
    }

    db->bytes_used = 0;

    return db;

}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
testq %rdi, %rdi
je 0x149d
callq *0x10(%rdi)
movq %rax, %r14
jmp 0x14a0
xorl %r14d, %r14d
testq %r14, %r14
jne 0x14b7
movl $0x1, %edi
movl $0x18, %esi
callq 0x1050
movq %rax, %r14
cmpq %rbx, (%r14)
jae 0x14d2
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x14d2
callq 0x1030
movq $0x0, 0x10(%r14)
cmpq $0x0, 0x10(%r14)
jne 0x14ef
movl $0x1, %edi
movl $0x8, %esi
callq 0x1050
movq %rax, 0x10(%r14)
movq %rbx, (%r14)
movq $0x0, 0x8(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/vidarr[P]ringbuffer/test/cached_ringbuffer_test.c
// Function: test_cached_free
void test_cached_free() {

    size_t frees_count = 0;

    Ringbuffer* cache =
        ringbuffer_create(50, free_data_buffer, &frees_count);

    Ringbuffer* buffer = ringbuffer_create(21, cache_free, cache);

    size_t i = 0;

    while(10 > frees_count) {
        /* just some abritrary data that has been allocated dynamically */
        ++i;
        /* We want to create really new data buffers, thus cache == 0 ... */
        DataBuffer* db = get_data_buffer(0, 13);
        buffer->add(buffer, db);
    };

    size_t initial_count = frees_count;

    /* Shift some elements out of cache into ringbuffer */
    for(i = 0; i < 3 * buffer->capacity(buffer); ++i) {
        DataBuffer* item = get_data_buffer(cache, i);
        assert(item);
        buffer->add(buffer, item);
    }

    assert(initial_count == frees_count);
    assert(0 == buffer->free(buffer));

    cache = cache->free(cache);

    fprintf(stdout, "free() OK: %zu\n", frees_count);

}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsp, %r15
movq $0x0, (%r15)
leaq -0x4b(%rip), %rsi       # 0x1502
movl $0x32, %edi
movq %r15, %rdx
callq 0x119c
movq %rax, %rbx
leaq -0x21f(%rip), %rsi      # 0x1345
movl $0x15, %edi
movq %rax, %rdx
callq 0x119c
movq %rax, %r14
movq (%r15), %r12
cmpq $0x9, %r12
ja 0x159d
movl $0xd, %esi
xorl %edi, %edi
callq 0x1489
movq %r14, %rdi
movq %rax, %rsi
callq *0x8(%r14)
movq (%rsp), %r12
cmpq $0xa, %r12
jb 0x157d
movq %r14, %rdi
callq *(%r14)
testq %rax, %rax
je 0x15d7
xorl %r15d, %r15d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1489
testq %rax, %rax
je 0x1617
movq %r14, %rdi
movq %rax, %rsi
callq *0x8(%r14)
incq %r15
movq %r14, %rdi
callq *(%r14)
leaq (%rax,%rax,2), %rax
cmpq %rax, %r15
jb 0x15ab
cmpq (%rsp), %r12
jne 0x1636
movq %r14, %rdi
callq *0x18(%r14)
testq %rax, %rax
jne 0x1655
movq %rbx, %rdi
callq *0x18(%rbx)
movq 0x39e2(%rip), %rax      # 0x4fd8
movq (%rax), %rdi
movq (%rsp), %rdx
leaq 0x1b49(%rip), %rsi      # 0x314d
xorl %eax, %eax
callq 0x1060
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x1adb(%rip), %rdi      # 0x30f9
leaq 0x1a08(%rip), %rsi      # 0x302d
leaq 0x1ad2(%rip), %rcx      # 0x30fe
movl $0xc8, %edx
callq 0x1040
leaq 0x1ad9(%rip), %rdi      # 0x3116
leaq 0x19e9(%rip), %rsi      # 0x302d
leaq 0x1ab3(%rip), %rcx      # 0x30fe
movl $0xcc, %edx
callq 0x1040
leaq 0x1ad7(%rip), %rdi      # 0x3133
leaq 0x19ca(%rip), %rsi      # 0x302d
leaq 0x1a94(%rip), %rcx      # 0x30fe
movl $0xcd, %edx
callq 0x1040
// File: /workspace/github_c_makefile_star2_O1/vidarr[P]ringbuffer/test/cached_ringbuffer_test.c
// Function: main
int main(int argc, char** argv) {

    /* The interface tests */
    size_t free_count = 0;
    Ringbuffer* cache = ringbuffer_create(31, count_free, &free_count);
    free_item = cache_free;
    free_item_additional_arg = cache;

    test_ringbuffer_create();
    test_capacity();
    test_add();
    test_pop();
    cache->free(cache);
    cache = 0;

    /* Caching tests */
    test_cached_ringbuffer_create();
    test_cached_free();

}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x5c(%rip), %rsi        # 0x16e8
movl $0x1f, %edi
callq 0x119c
movq %rax, %rbx
leaq -0x35b(%rip), %rax      # 0x1345
leaq 0x39b9(%rip), %rcx      # 0x5060
movq %rax, (%rcx)
leaq 0x39b7(%rip), %rax      # 0x5068
movq %rbx, (%rax)
xorl %eax, %eax
callq 0x16ec
xorl %eax, %eax
callq 0x1775
xorl %eax, %eax
callq 0x180f
xorl %eax, %eax
callq 0x1a80
movq %rbx, %rdi
callq *0x18(%rbx)
callq 0x1372
callq 0x1534
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]spiped/perftests/standalone-enc/fd_drain.c
// Function: fd_drain_internal
static int
fd_drain_internal(void * cookie)
{
	int fd = *((int *)cookie);
	uint8_t mybuf[FD_DRAIN_MAX_SIZE];
	ssize_t readlen;

	/* Loop until we hit EOF or an error. */
	do {
		readlen = read(fd, mybuf, FD_DRAIN_MAX_SIZE);
	} while (readlen > 0);

	/* Check for an error. */
	if (readlen == -1) {
		warnp("read");
		goto err0;
	}

	/* Success! */
	return (0);

err0:
	/* Failure!  This value will be the pid's exit code. */
	return (1);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x4008, %rsp           # imm = 0x4008
movl (%rdi), %ebx
movq %rsp, %r14
movl $0x4000, %edx           # imm = 0x4000
movl %ebx, %edi
movq %r14, %rsi
callq 0x2150
testq %rax, %rax
jg 0x2acd
movq %rax, %rcx
xorl %eax, %eax
cmpq $-0x1, %rcx
jne 0x2b22
callq 0x2370
cmpl $0x0, (%rax)
je 0x2b0f
movq %rax, %rbx
leaq 0x96bd(%rip), %rdi      # 0xc1bd
xorl %eax, %eax
callq 0x9f98
movl $0x0, (%rbx)
jmp 0x2b1d
leaq 0x96a7(%rip), %rdi      # 0xc1bd
xorl %eax, %eax
callq 0xa0b7
movl $0x1, %eax
addq $0x4008, %rsp           # imm = 0x4008
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]spiped/perftests/standalone-enc/standalone_aesctr.c
// Function: standalone_aesctr
int
standalone_aesctr(const size_t * perfsizes, size_t num_perf,
    size_t nbytes_perftest, size_t nbytes_warmup)
{
	struct crypto_aes_key * k_aes;
	uint8_t kbuf[32];

	/* Report what we're doing. */
	printf("Testing AES-CTR\n");

	/* Initialize. */
	memset(kbuf, 0, 32);
	if ((k_aes = crypto_aes_key_expand(kbuf, 32)) == NULL)
		goto err0;

	/* Time the function. */
	if (perftest_buffers(nbytes_perftest, perfsizes, num_perf,
	    nbytes_warmup, 0, aesctr_init, aesctr_func, NULL, k_aes)) {
		warn0("perftest_buffers");
		goto err0;
	}

	/* Clean up. */
	crypto_aes_key_free(k_aes);

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r14
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %rbp
leaq 0x966e(%rip), %rdi      # 0xc1d3
callq 0x20f0
xorps %xmm0, %xmm0
movq %rsp, %rdi
movaps %xmm0, (%rdi)
movaps %xmm0, 0x10(%rdi)
movl $0x20, %esi
callq 0x67c7
movl $0x1, %ebx
testq %rax, %rax
je 0x2be6
movq %rax, %r15
subq $0x8, %rsp
leaq 0x73(%rip), %rax        # 0x2c0c
leaq 0x57(%rip), %r9         # 0x2bf7
movq %r13, %rdi
movq %rbp, %rsi
movq %r12, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
pushq %r15
pushq $0x0
pushq %rax
callq 0x9b28
addq $0x20, %rsp
testl %eax, %eax
je 0x2bdc
leaq 0x95fa(%rip), %rdi      # 0xc1c2
xorl %eax, %eax
callq 0xa0b7
callq 0x2370
movl $0x0, (%rax)
jmp 0x2be6
movq %r15, %rdi
callq 0x6867
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]spiped/perftests/standalone-enc/standalone_aesctr.c
// Function: aesctr_func
static int
aesctr_func(void * cookie, uint8_t * buf, size_t buflen, size_t nreps)
{
	struct crypto_aes_key * k_aes = cookie;
	size_t i;

	/* Do the hashing. */
	for (i = 0; i < nreps; i++) {
		/*
		 * In proto_crypt_enc(), we would append the length to buf,
		 * then encrypt the buffer + 4 bytes of length.  For
		 * simplicity, this test does not imitate that details.
		 */
		crypto_aesctr_buf(k_aes, i, buf, buf, buflen);
	}

	/* Success! */
	return (0);
}

// Assembly:
testq %rcx, %rcx
je 0x2c4e
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
xorl %r13d, %r13d
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r15, %rcx
movq %r14, %r8
callq 0x72f6
incq %r13
cmpq %r13, %rbx
jne 0x2c29
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
xorl %eax, %eax
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]spiped/perftests/standalone-enc/standalone_aesctr_hmac.c
// Function: standalone_aesctr_hmac
int
standalone_aesctr_hmac(const size_t * perfsizes, size_t num_perf,
    size_t nbytes_perftest, size_t nbytes_warmup)
{
	struct aesctr_hmac_cookie aesctr_hmac_cookie;
	struct aesctr_hmac_cookie * ahc = &aesctr_hmac_cookie;
	HMAC_SHA256_CTX ctx;
	uint8_t kbuf[32];

	/* Report what we're doing. */
	printf("Testing HMAC_SHA256 with AES-CTR\n");

	/* Initialize. */
	ahc->ctx = &ctx;
	memset(kbuf, 0, 32);
	if ((ahc->k_aes = crypto_aes_key_expand(kbuf, 32)) == NULL)
		goto err0;

	/* Time the function. */
	if (perftest_buffers(nbytes_perftest, perfsizes, num_perf,
	    nbytes_warmup, 0, aesctr_hmac_init, aesctr_hmac_func, NULL, ahc)) {
		warn0("perftest_buffers");
		goto err0;
	}

	/* Clean up. */
	crypto_aes_key_free(ahc->k_aes);

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r13
leaq 0x956c(%rip), %rdi      # 0xc1e3
callq 0x20f0
leaq 0x30(%rsp), %rax
movq %rax, (%rsp)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, (%rdi)
movaps %xmm0, 0x10(%rdi)
movl $0x20, %esi
callq 0x67c7
movq %rax, 0x8(%rsp)
movl $0x1, %ebx
testq %rax, %rax
je 0x2d0c
subq $0x8, %rsp
leaq 0x8(%rsp), %rax
leaq 0xa6(%rip), %r10        # 0x2d63
leaq 0x5b(%rip), %r9         # 0x2d1f
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
pushq %rax
pushq $0x0
pushq %r10
callq 0x9b28
addq $0x20, %rsp
testl %eax, %eax
je 0x2d00
leaq 0x94d6(%rip), %rdi      # 0xc1c2
xorl %eax, %eax
callq 0xa0b7
callq 0x2370
movl $0x0, (%rax)
jmp 0x2d0c
movq 0x8(%rsp), %rdi
callq 0x6867
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]spiped/perftests/standalone-enc/standalone_aesctr_hmac.c
// Function: aesctr_hmac_init
static int
aesctr_hmac_init(void * cookie, uint8_t * buf, size_t buflen)
{
	struct aesctr_hmac_cookie * ahc = cookie;
	uint8_t kbuf[32];
	size_t i;

	/* (Re-)Initialize the context. */
	memset(kbuf, 0, 32);
	HMAC_SHA256_Init(ahc->ctx, kbuf, 32);

	/* Set the input. */
	for (i = 0; i < buflen; i++)
		buf[i] = (uint8_t)(i & 0xff);

	/* Success! */
	return (0);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
movq (%rdi), %rdi
movl $0x20, %edx
callq 0x4615
testq %rbx, %rbx
je 0x2d59
xorl %eax, %eax
movb %al, (%r14,%rax)
incq %rax
cmpq %rax, %rbx
jne 0x2d4d
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]spiped/perftests/standalone-enc/standalone_aesctr_hmac.c
// Function: aesctr_hmac_func
static int
aesctr_hmac_func(void * cookie, uint8_t * buf, size_t buflen, size_t nreps)
{
	struct aesctr_hmac_cookie * ahc = cookie;
	uint8_t hbuf[32];
	uint8_t pnum_exp[8];
	size_t i;

	/* Do the hashing. */
	for (i = 0; i < nreps; i++) {
		/*
		 * In proto_crypt_enc(), we would append the length to buf,
		 * then encrypt the buffer + 4 bytes of length.  After that,
		 * we'd hash the resulting (larger) buffer.  For simplicity,
		 * this test does not imitate those details.
		 */
		crypto_aesctr_buf(ahc->k_aes, i, buf, buf, buflen);
		HMAC_SHA256_Update(ahc->ctx, buf, buflen);
		be64enc(pnum_exp, i);
		HMAC_SHA256_Update(ahc->ctx, pnum_exp, 8);
	}
	HMAC_SHA256_Final(hbuf, ahc->ctx);

	/* Success! */
	return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %r15
testq %rcx, %rcx
je 0x2dd0
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
xorl %r13d, %r13d
leaq 0x8(%rsp), %rbp
movq 0x8(%r15), %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r12, %rcx
movq %r14, %r8
callq 0x72f6
movq (%r15), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x477d
movq %r13, %rax
bswapq %rax
movq %rax, 0x8(%rsp)
movq (%r15), %rdi
movl $0x8, %edx
movq %rbp, %rsi
callq 0x477d
incq %r13
cmpq %r13, %rbx
jne 0x2d8a
movq (%r15), %rsi
leaq 0x10(%rsp), %rdi
callq 0x47ad
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]spiped/perftests/standalone-enc/standalone_hmac.c
// Function: hmac_init
static int
hmac_init(void * cookie, uint8_t * buf, size_t buflen)
{
	HMAC_SHA256_CTX * ctx = cookie;
	uint8_t kbuf[32];
	size_t i;

	/* (Re-)Initialize the context. */
	memset(kbuf, 0, 32);
	HMAC_SHA256_Init(ctx, kbuf, 32);

	/* Set the input. */
	for (i = 0; i < buflen; i++)
		buf[i] = (uint8_t)(i & 0xff);

	/* Success! */
	return (0);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
movl $0x20, %edx
callq 0x4615
testq %rbx, %rbx
je 0x2eba
xorl %eax, %eax
movb %al, (%r14,%rax)
incq %rax
cmpq %rax, %rbx
jne 0x2eae
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]spiped/perftests/standalone-enc/standalone_hmac.c
// Function: hmac_func
static int
hmac_func(void * cookie, uint8_t * buf, size_t buflen, size_t nreps)
{
	HMAC_SHA256_CTX * ctx = cookie;
	uint8_t hbuf[32];
	uint8_t pnum_exp[8];
	size_t i;

	/* Do the hashing. */
	for (i = 0; i < nreps; i++) {
		HMAC_SHA256_Update(ctx, buf, buflen);

		/* Hash the iteration number as well. */
		be64enc(pnum_exp, i);
		HMAC_SHA256_Update(ctx, pnum_exp, 8);
	}
	HMAC_SHA256_Final(hbuf, ctx);

	/* Success! */
	return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
testq %rcx, %rcx
je 0x2f1b
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
xorl %ebp, %ebp
leaq 0x8(%rsp), %r13
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x477d
movq %rbp, %rax
bswapq %rax
movq %rax, 0x8(%rsp)
movl $0x8, %edx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x477d
incq %rbp
cmpq %rbp, %r14
jne 0x2eea
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x47ad
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]spiped/perftests/standalone-enc/standalone_pce.c
// Function: standalone_pce
int
standalone_pce(const size_t * perfsizes, size_t num_perf,
    size_t nbytes_perftest, size_t nbytes_warmup)
{
	struct pce pce_actual;
	struct pce * pce = &pce_actual;

	/* Report what we're doing. */
	printf("Testing proto_crypt_enc()\n");

	/* Time the function. */
	if (perftest_buffers(nbytes_perftest, perfsizes, num_perf,
	    nbytes_warmup, 0, pce_init, pce_func, pce_cleanup, pce)) {
		warn0("perftest_buffers");
		goto err0;
	}

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
leaq 0x92d3(%rip), %rdi      # 0xc22f
callq 0x20f0
subq $0x8, %rsp
leaq 0x10(%rsp), %rax
leaq 0x107(%rip), %r10       # 0x3078
leaq 0xb2(%rip), %r11        # 0x302a
leaq 0x51(%rip), %r9         # 0x2fd0
xorl %ebx, %ebx
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
pushq %rax
pushq %r10
pushq %r11
callq 0x9b28
addq $0x20, %rsp
testl %eax, %eax
je 0x2fc0
leaq 0x9219(%rip), %rdi      # 0xc1c2
xorl %eax, %eax
callq 0xa0b7
callq 0x2370
movl $0x0, (%rax)
movl $0x1, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]spiped/perftests/standalone-enc/standalone_pce.c
// Function: pce_init
static int
pce_init(void * cookie, uint8_t * buf, size_t buflen)
{
	struct pce * pce = cookie;
	uint8_t kbuf[64];
	size_t i;

	/* Set up encryption key. */
	memset(kbuf, 0, 64);
	if ((pce->k = mkkeypair(kbuf)) == NULL)
		goto err0;

	/* Set the input. */
	for (i = 0; i < buflen; i++)
		buf[i] = (uint8_t)(i & 0xff);

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorps %xmm0, %xmm0
movq %rsp, %rdi
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
callq 0x3988
movq %rax, (%r15)
testq %rax, %rax
je 0x301b
xorl %eax, %eax
testq %rbx, %rbx
je 0x3020
xorl %ecx, %ecx
movb %cl, (%r14,%rcx)
incq %rcx
cmpq %rcx, %rbx
jne 0x300d
jmp 0x3020
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]spiped/perftests/standalone-enc/standalone_pce.c
// Function: pce_func
static int
pce_func(void * cookie, uint8_t * buf, size_t buflen, size_t nreps)
{
	struct pce * pce = cookie;
	uint8_t encbuf[PCRYPT_ESZ];
	size_t i;

	/* Encrypt a bunch of times. */
	for (i = 0; i < nreps; i++)
		proto_crypt_enc(buf, buflen, encbuf, pce->k);

	/* Success! */
	return (0);
}

// Assembly:
testq %rcx, %rcx
je 0x3075
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x430, %rsp            # imm = 0x430
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq %rsp, %r13
movq (%r12), %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x3f0a
decq %rbx
jne 0x304e
addq $0x430, %rsp            # imm = 0x430
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]spiped/perftests/standalone-enc/standalone_transfer_noencrypt.c
// Function: standalone_transfer_noencrypt
int
standalone_transfer_noencrypt(const size_t * perfsizes, size_t num_perf,
    size_t nbytes_perftest, size_t nbytes_warmup, int method)
{
	struct shared shared_actual;
	const char * method_str;

	/* Report what we're doing. */
	if (method == 0)
		method_str = "two pipes";
	else if (method == 1)
		method_str = "two socketpairs";
	else {
		warn0("method not recognized");
		goto err0;
	}
	printf("Testing sending data over %s, no encryption\n", method_str);

	/* Record the communication method. */
	shared_actual.method = method;

	/* Time the function. */
	if (perftest_buffers(nbytes_perftest, perfsizes, num_perf,
	    nbytes_warmup, 0, perftest_init, perftest_func, perftest_cleanup,
	    &shared_actual)) {
		warn0("perftest_buffers");
		goto err0;
	}

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r8d, %r13d
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
testl %r8d, %r8d
je 0x30b9
cmpl $0x1, %r13d
jne 0x311c
leaq 0x919c(%rip), %rsi      # 0xc253
jmp 0x30c0
leaq 0x9189(%rip), %rsi      # 0xc249
leaq 0x91b2(%rip), %rdi      # 0xc279
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x2060
leaq 0x8(%rsp), %rax
movl %r13d, 0x28(%rax)
subq $0x8, %rsp
leaq 0x328(%rip), %r10       # 0x340c
leaq 0x1fd(%rip), %r11       # 0x32e8
leaq 0x59(%rip), %r9         # 0x314b
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rbx, %rcx
xorl %r8d, %r8d
pushq %rax
pushq %r10
pushq %r11
callq 0x9b28
addq $0x20, %rsp
testl %eax, %eax
je 0x313a
leaq 0x90a8(%rip), %rdi      # 0xc1c2
jmp 0x3123
leaq 0x9140(%rip), %rdi      # 0xc263
xorl %eax, %eax
callq 0xa0b7
callq 0x2370
movl $0x0, (%rax)
movl $0x1, %ebp
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]spiped/perftests/standalone-enc/standalone_transfer_noencrypt.c
// Function: perftest_func
static int
perftest_func(void * cookie, uint8_t * buf, size_t buflen, size_t nreps)
{
	struct shared * shared = cookie;
	size_t i;

	/* Send bytes. */
	for (i = 0; i < nreps; i++) {
		if (noeintr_write(shared->in[W], buf, buflen)
		    != (ssize_t)buflen) {
			warnp("network_write");
			goto err0;
		}
	}

	/* We've finished sending data. */
	if (close(shared->in[W])) {
		warnp("close");
		goto err0;
	}

	/* Wait until transfer_data has finished. */
	if (readbyte(shared->finished[R]))
		goto err0;

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
testq %rcx, %rcx
je 0x331d
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movl 0x14(%rbx), %edi
movq %r12, %rsi
movq %r15, %rdx
callq 0x9a68
cmpq %r15, %rax
jne 0x333f
decq %r14
jne 0x3305
movl 0x14(%rbx), %edi
callq 0x20a0
testl %eax, %eax
je 0x3362
callq 0x2370
cmpl $0x0, (%rax)
je 0x33ab
movq %rax, %rbx
leaq 0x90c6(%rip), %rdi      # 0xc403
jmp 0x3353
callq 0x2370
cmpl $0x0, (%rax)
je 0x33b4
movq %rax, %rbx
leaq 0x8fc8(%rip), %rdi      # 0xc31b
xorl %eax, %eax
callq 0x9f98
movl $0x0, (%rbx)
jmp 0x33cf
movl 0x20(%rbx), %ebx
xorl %ebp, %ebp
leaq 0xf(%rsp), %r14
movl $0x1, %edx
movl %ebx, %edi
movq %r14, %rsi
callq 0x2150
cmpq $-0x1, %rax
je 0x3393
cmpq $0x1, %rax
je 0x338e
testq %rax, %rax
jne 0x33a2
jmp 0x33e1
movb $0x1, %bpl
jmp 0x33a2
callq 0x2370
movq %rax, %r15
movl (%rax), %eax
cmpl $0x4, %eax
jne 0x33bd
testb %bpl, %bpl
je 0x336c
xorl %eax, %eax
jmp 0x33d4
leaq 0x9051(%rip), %rdi      # 0xc403
jmp 0x33c8
leaq 0x8f60(%rip), %rdi      # 0xc31b
jmp 0x33c8
leaq 0x8df9(%rip), %rdi      # 0xc1bd
testl %eax, %eax
jne 0x33fc
xorl %eax, %eax
callq 0xa0b7
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8f41(%rip), %rdi      # 0xc329
xorl %eax, %eax
callq 0xa0b7
callq 0x2370
movl $0x0, (%rax)
jmp 0x33cf
xorl %eax, %eax
callq 0x9f98
movl $0x0, (%r15)
jmp 0x33cf
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]spiped/perftests/standalone-enc/standalone_transfer_noencrypt.c
// Function: perftest_cleanup
static int
perftest_cleanup(void * cookie)
{
	struct shared * shared = cookie;
	int rc;

	/* Wait for threads to finish. */
	if ((rc = pthread_join(shared->data_thr, NULL))) {
		warn0("pthread_join: %s", strerror(rc));
		goto err0;
	}
	if ((rc = pthread_join(shared->output_thr, NULL))) {
		warn0("pthread_join: %s", strerror(rc));
		goto err0;
	}

	/* Clean up communication. */
	if (close(shared->out[R])) {
		warnp("close");
		goto err0;
	}
	if (close(shared->in[R])) {
		warnp("close");
		goto err0;
	}
	if (close(shared->finished[W])) {
		warnp("close");
		goto err0;
	}
	if (close(shared->finished[R])) {
		warnp("close");
		goto err0;
	}

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
xorl %esi, %esi
callq 0x2030
testl %eax, %eax
jne 0x342d
movq 0x8(%rbx), %rdi
xorl %esi, %esi
callq 0x2030
testl %eax, %eax
je 0x3457
movl %eax, %edi
callq 0x22a0
leaq 0x8f05(%rip), %rdi      # 0xc340
movq %rax, %rsi
xorl %eax, %eax
callq 0xa0b7
callq 0x2370
movl $0x0, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
retq
movl 0x18(%rbx), %edi
callq 0x20a0
testl %eax, %eax
jne 0x3487
movl 0x10(%rbx), %edi
callq 0x20a0
testl %eax, %eax
jne 0x3487
movl 0x24(%rbx), %edi
callq 0x20a0
testl %eax, %eax
jne 0x3487
movl 0x20(%rbx), %edi
callq 0x20a0
testl %eax, %eax
je 0x34ba
callq 0x2370
cmpl $0x0, (%rax)
je 0x34aa
movq %rax, %rbx
leaq 0x8f68(%rip), %rdi      # 0xc403
xorl %eax, %eax
callq 0x9f98
movl $0x0, (%rbx)
jmp 0x3450
leaq 0x8f52(%rip), %rdi      # 0xc403
xorl %eax, %eax
callq 0xa0b7
jmp 0x3450
xorl %eax, %eax
jmp 0x3455
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]spiped/perftests/standalone-enc/standalone_transfer_noencrypt.c
// Function: drain_output
static void *
drain_output(void * cookie)
{
	struct shared * shared = cookie;
	char dummy = 0;

	/* Read until we get an EOF. */
	if (fd_drain(shared->out[R]))
		goto err0;

	/* Notify that we've finished. */
	if (noeintr_write(shared->finished[W], &dummy, 1) != 1) {
		warnp("network_write");
		goto err0;
	}

err0:
	/* Finished! */
	return (NULL);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movb $0x0, 0xf(%rsp)
movl 0x18(%rdi), %edi
callq 0x2aac
testl %eax, %eax
jne 0x3520
movl 0x24(%rbx), %edi
leaq 0xf(%rsp), %rsi
movl $0x1, %edx
callq 0x9a68
cmpq $0x1, %rax
je 0x3520
callq 0x2370
cmpl $0x0, (%rax)
je 0x3512
movq %rax, %rbx
leaq 0x8e18(%rip), %rdi      # 0xc31b
xorl %eax, %eax
callq 0x9f98
movl $0x0, (%rbx)
jmp 0x3520
leaq 0x8e02(%rip), %rdi      # 0xc31b
xorl %eax, %eax
callq 0xa0b7
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]spiped/perftests/standalone-enc/standalone_transfer_noencrypt.c
// Function: transfer_data
static void *
transfer_data(void * cookie)
{
	struct shared * shared = cookie;
	uint8_t mybuf[MAXOUTSIZE];
	ssize_t readlen;

	/* Loop until we hit EOF. */
	do {
		/* Get data from ->in, and break on EOF. */
		if ((readlen = read(shared->in[R], mybuf, MAXOUTSIZE)) == -1) {
			warnp("read");
			goto err0;
		}
		if (readlen == 0)
			break;

		/* Send data to ->out. */
		if (noeintr_write(shared->out[W], mybuf, (size_t)readlen)
		    != readlen) {
			warnp("network_write");
			goto err0;
		}
	} while (1);

	/* When ->in received an EOF, close ->out. */
	if (close(shared->out[W])) {
		warnp("close");
		goto err0;
	}

err0:
	/* Finished! */
	return (NULL);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x4000, %rsp           # imm = 0x4000
movq %rdi, %rbx
movq %rsp, %r14
movl 0x10(%rbx), %edi
movl $0x4000, %edx           # imm = 0x4000
movq %r14, %rsi
callq 0x2150
testq %rax, %rax
je 0x3597
movq %rax, %r15
cmpq $-0x1, %rax
je 0x3581
movl 0x1c(%rbx), %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x9a68
cmpq %r15, %rax
je 0x353a
callq 0x2370
cmpl $0x0, (%rax)
je 0x35cf
movq %rax, %rbx
leaq 0x8d9c(%rip), %rdi      # 0xc31b
jmp 0x35b7
callq 0x2370
cmpl $0x0, (%rax)
je 0x35c6
movq %rax, %rbx
leaq 0x8c28(%rip), %rdi      # 0xc1bd
jmp 0x35b7
movl 0x1c(%rbx), %edi
callq 0x20a0
testl %eax, %eax
je 0x35e6
callq 0x2370
cmpl $0x0, (%rax)
je 0x35d8
movq %rax, %rbx
leaq 0x8e4c(%rip), %rdi      # 0xc403
xorl %eax, %eax
callq 0x9f98
movl $0x0, (%rbx)
jmp 0x35e6
leaq 0x8bf0(%rip), %rdi      # 0xc1bd
jmp 0x35df
leaq 0x8d45(%rip), %rdi      # 0xc31b
jmp 0x35df
leaq 0x8e24(%rip), %rdi      # 0xc403
xorl %eax, %eax
callq 0xa0b7
xorl %eax, %eax
addq $0x4000, %rsp           # imm = 0x4000
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)