LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/parasail/tests/test_align.c
// Function: print_array_int
static void print_array_int(
        const char * filename,
        int * array,
        const char * const restrict s1, const int s1Len,
        const char * const restrict s2, const int s2Len,
        parasail_result_t *result)
{
    int i;
    int j;
    FILE *f = NULL;

    f = fopen(filename, "w");
    if (NULL == f) {
        printf("fopen(\"%s\") error: %s\n", filename, strerror(errno));
        exit(-1);
    }
    fprintf(f, "saturated=%d\n", parasail_result_is_saturated(result) ? 1 : 0);
    fprintf(f, " ");
    for (j=0; j<s2Len; ++j) {
        fprintf(f, "%4c", s2[j]);
    }
    fprintf(f, "\n");
    for (i=0; i<s1Len; ++i) {
        fprintf(f, "%c", s1[i]);
        for (j=0; j<s2Len; ++j) {
            fprintf(f, "%4d", array[i*s2Len + j]);
        }
        fprintf(f, "\n");
    }
    fclose(f);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %ebx
movq %r8, %r13
movl %ecx, 0x8(%rsp)
movq %rdx, 0x20(%rsp)
movq %rsi, %r15
movq %rdi, %r14
movq 0x60(%rsp), %rbp
leaq 0x3f07fd(%rip), %rsi    # 0x6415dd
callq 0x1f01b0
testq %rax, %rax
je 0x250ee4
movq %rax, %r12
movq %rbp, %rdi
callq 0x253d45
xorl %edx, %edx
testl %eax, %eax
setne %dl
leaq 0x3c8c61(%rip), %rsi    # 0x619a68
movq %r12, %rdi
xorl %eax, %eax
callq 0x1f0220
movl $0x20, %edi
movq %r12, %rsi
callq 0x1f01e0
movl %ebx, %r14d
movl %ebx, 0x14(%rsp)
testl %ebx, %ebx
jle 0x250e4d
leaq 0x3c8c46(%rip), %rbp    # 0x619a76
xorl %ebx, %ebx
movsbl (%r13,%rbx), %edx
movq %r12, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0x1f0220
incq %rbx
cmpq %rbx, %r14
jne 0x250e32
movl $0xa, %edi
movq %r12, %rsi
callq 0x1f01e0
movl 0x8(%rsp), %eax
testl %eax, %eax
jle 0x250ece
movl %eax, %eax
movq %rax, 0x8(%rsp)
leaq (,%r14,4), %rax
movq %rax, 0x18(%rsp)
leaq 0x3c8bfd(%rip), %r13    # 0x619a7a
xorl %ebp, %ebp
movq 0x20(%rsp), %rax
movsbl (%rax,%rbp), %edi
movq %r12, %rsi
callq 0x1f01e0
cmpl $0x0, 0x14(%rsp)
jle 0x250eb2
xorl %ebx, %ebx
movl (%r15,%rbx,4), %edx
movq %r12, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x1f0220
incq %rbx
cmpq %rbx, %r14
jne 0x250e99
movl $0xa, %edi
movq %r12, %rsi
callq 0x1f01e0
incq %rbp
addq 0x18(%rsp), %r15
cmpq 0x8(%rsp), %rbp
jne 0x250e7f
movq %r12, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1f0170
callq 0x1f0030
movl (%rax), %edi
callq 0x1f0090
leaq 0x3c8b5a(%rip), %rdi    # 0x619a51
movq %r14, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1f0040
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1f01d0
nop
// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/parasail/src/io.c
// Function: parasail_close
void parasail_close(parasail_file_t *pf)
{
    if (NULL == pf) {
        fprintf(stderr, "parasail_close: NULL file\n");
        return;
    }
#if defined(HAVE_SYS_MMAN_H)
    if (-1 == munmap((void*)pf->buf, pf->size)) {
        perror("munmap");
        fprintf(stderr, "parasail_close: cannot munmap file buffer\n");
    }
    if (-1 == close(pf->fd)) {
        perror("close");
        fprintf(stderr, "parasail_close: cannot close file descriptor\n");
    }
#else
    free((void*)pf->buf);
    /* file was already closed */
#endif
    free(pf);
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x251186
movq %rdi, %rbx
movq 0x8(%rdi), %rsi
movq 0x10(%rdi), %rdi
callq 0x1f00e0
cmpl $-0x1, %eax
je 0x25118d
movl (%rbx), %edi
callq 0x1f02c0
cmpl $-0x1, %eax
je 0x251194
movq %rbx, %rdi
popq %rbx
jmp 0x1f01c0
callq 0x1f067c
popq %rbx
retq
callq 0x1f0628
jmp 0x251171
callq 0x1f0652
jmp 0x25117d
// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/parasail/src/io.c
// Function: parasail_is_fasta
int parasail_is_fasta(const parasail_file_t *pf)
{
    if (NULL == pf) {
        fprintf(stderr, "parasail_is_fasta: NULL pointer\n");
        return -1;
    }

    return parasail_is_fasta_buffer(pf->buf, pf->size);
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x2511b4
movq 0x10(%rdi), %rcx
testq %rcx, %rcx
je 0x2511bb
xorl %eax, %eax
cmpb $0x3e, (%rcx)
sete %al
popq %rcx
retq
callq 0x1f06b4
jmp 0x2511c0
callq 0x1f0698
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2511b2
// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/parasail/src/io.c
// Function: parasail_is_fastq
int parasail_is_fastq(const parasail_file_t *pf)
{
    if (NULL == pf) {
        fprintf(stderr, "parasail_is_fastq: NULL pointer\n");
        return -1;
    }

    return parasail_is_fastq_buffer(pf->buf, pf->size);
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x2511fe
movq 0x10(%rdi), %rcx
testq %rcx, %rcx
je 0x251205
xorl %eax, %eax
cmpb $0x40, (%rcx)
sete %al
popq %rcx
retq
callq 0x1f0708
jmp 0x25120a
callq 0x1f06ec
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2511fc
// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/parasail/src/io.c
// Function: parasail_stat
parasail_file_stat_t* parasail_stat(const parasail_file_t *pf)
{
    parasail_file_stat_t *stat = NULL;

    if (NULL == pf) {
        fprintf(stderr, "parasail_stat: NULL pointer\n");
        return NULL;
    }

    if (1 == parasail_is_fasta(pf)) {
        stat = parasail_stat_fasta(pf);
    }
    else if (1 == parasail_is_fastq(pf)) {
        stat = parasail_stat_fastq(pf);
    }
    else {
        fprintf(stderr, "parasail_stat: cannot determine file format\n");
        return NULL;
    }

    if (NULL == stat) {
        fprintf(stderr, "parasail_stat: failed\n");
        return NULL;
    }

    return stat;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x251272
movq %rdi, %rbx
callq 0x25119b
cmpl $0x1, %eax
jne 0x251251
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdi
callq 0x2512fb
jmp 0x25126b
movq %rbx, %rdi
callq 0x2511e5
cmpl $0x1, %eax
jne 0x251280
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdi
callq 0x25177a
testq %rax, %rax
je 0x251279
popq %rbx
retq
callq 0x1f0778
jmp 0x251285
callq 0x1f075c
jmp 0x251285
callq 0x1f0740
xorl %eax, %eax
jmp 0x251270
// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/parasail/src/io.c
// Function: parasail_read
char * parasail_read(const parasail_file_t *pf, long * size)
{
    char * buffer = NULL;

    if (NULL == pf) {
        fprintf(stderr, "parasail_read: NULL pointer\n");
        return NULL;
    }

    if (NULL == size) {
        fprintf(stderr, "parasail_read: NULL size pointer\n");
        return NULL;
    }

    buffer = (char*)malloc(sizeof(char) * (pf->size+1));
    if (NULL == buffer) {
        perror("malloc");
        fprintf(stderr, "parasail_read: "
                "cannont malloc buffer for input file");
        return NULL;
    }

    (void)memcpy(buffer, pf->buf, pf->size);
    buffer[pf->size] = '\0';
    *size = pf->size;
    return buffer;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x251b6c
movq %rsi, %rbx
testq %rsi, %rsi
je 0x251b73
movq %rdi, %r15
movq 0x8(%rdi), %r12
leaq 0x1(%r12), %rdi
callq 0x1f01f0
testq %rax, %rax
je 0x251b7a
movq %rax, %r14
movq 0x10(%r15), %rsi
movq %rax, %rdi
movq %r12, %rdx
callq 0x1f0130
movb $0x0, (%r14,%r12)
movq %r12, (%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x1f0949
jmp 0x251b7f
callq 0x1f092d
jmp 0x251b7f
callq 0x1f0903
xorl %r14d, %r14d
jmp 0x251b5d
// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/parasail/src/io.c
// Function: parasail_pack
char * parasail_pack(const parasail_file_t *pf, long * size)
{
    char *packed = NULL;

    if (NULL == pf) {
        fprintf(stderr, "parasail_pack: NULL pointer\n");
        return NULL;
    }

    if (NULL == size) {
        fprintf(stderr, "parasail_pack: NULL size pointer\n");
        return NULL;
    }

    if (1 == parasail_is_fasta(pf)) {
        packed = parasail_pack_fasta(pf, size);
    }
    else if (1 == parasail_is_fastq(pf)) {
        packed = parasail_pack_fastq(pf, size);
    }
    else {
        fprintf(stderr, "parasail_pack: cannot determine file format\n");
        return NULL;
    }

    if (NULL == packed) {
        fprintf(stderr, "parasail_pack: failed\n");
        return NULL;
    }

    return packed;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x251bde
movq %rsi, %rbx
testq %rsi, %rsi
je 0x251be5
movq %rdi, %r14
callq 0x25119b
cmpl $0x1, %eax
jne 0x251bb4
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdi
movq %rbx, %rdx
callq 0x251c9a
jmp 0x251bd1
movq %r14, %rdi
callq 0x2511e5
cmpl $0x1, %eax
jne 0x251bf3
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdi
movq %rbx, %rdx
callq 0x251e6d
testq %rax, %rax
je 0x251bec
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x1f09b9
jmp 0x251bf8
callq 0x1f099d
jmp 0x251bf8
callq 0x1f0981
jmp 0x251bf8
callq 0x1f0965
xorl %eax, %eax
jmp 0x251bd6
// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/parasail/src/io.c
// Function: parasail_pack_fasta
char * parasail_pack_fasta(const parasail_file_t *pf, long * packed_size)
{
    if (NULL == pf) {
        fprintf(stderr, "parasail_pack_fasta: NULL pointer\n");
        return NULL;
    }

    if (NULL == packed_size) {
        fprintf(stderr, "parasail_pack_fasta: NULL size pointer\n");
        return NULL;
    }

    return parasail_pack_fasta_buffer(pf->buf, pf->size, packed_size);
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x251c18
movq %rsi, %rdx
testq %rsi, %rsi
je 0x251c1f
movq 0x8(%rdi), %rsi
movq 0x10(%rdi), %rdi
popq %rax
jmp 0x251c9a
callq 0x1f09f1
jmp 0x251c24
callq 0x1f09d5
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/parasail/src/io.c
// Function: parasail_pack_fastq
char * parasail_pack_fastq(const parasail_file_t *pf, long * size)
{
    if (NULL == pf) {
        fprintf(stderr, "parasail_pack_fastq: NULL pointer\n");
        return NULL;
    }

    if (NULL == size) {
        fprintf(stderr, "parasail_pack_fastq: NULL size pointer\n");
        return NULL;
    }

    return parasail_pack_fastq_buffer(pf->buf, pf->size, size);
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x251c44
movq %rsi, %rdx
testq %rsi, %rsi
je 0x251c4b
movq 0x8(%rdi), %rsi
movq 0x10(%rdi), %rdi
popq %rax
jmp 0x251e6d
callq 0x1f0a29
jmp 0x251c50
callq 0x1f0a0d
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/parasail/src/pssw.c
// Function: parasail_ssw_init
parasail_profile_t* parasail_ssw_init(
        const char * const restrict s1, const int s1Len,
        const parasail_matrix_t* matrix, const int8_t score_size)
{
    parasail_profile_t *profile8 = NULL;
    parasail_profile_t *profile16 = NULL;

    if (score_size == 0 || score_size == 2) {
        profile8 = parasail_profile_create_8(s1, s1Len, matrix);
    }
    if (score_size == 1 || score_size == 2) {
        profile16 = parasail_profile_create_16(s1, s1Len, matrix);
    }

    if (profile8 && profile16) {
        profile8->profile16 = profile16->profile16;
        free(profile16);
        return profile8;
    }
    else if (profile8) {
        return profile8;
    }
    else if (profile16) {
        return profile16;
    }

    return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %r12d
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
testb $-0x3, %r12b
je 0x254f9d
xorl %ebx, %ebx
jmp 0x254fad
movq %r15, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x293b93
movq %rax, %rbx
decb %r12b
cmpb $0x1, %r12b
ja 0x254fc5
movq %r15, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x293b8a
jmp 0x254fc7
xorl %eax, %eax
testq %rbx, %rbx
setne %cl
testq %rax, %rax
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x254ff4
movq 0x40(%rax), %rcx
movq %rcx, 0x40(%rbx)
movups 0x30(%rax), %xmm0
movups %xmm0, 0x30(%rbx)
movq %rax, %rdi
callq 0x1f01c0
jmp 0x254ffb
testq %rbx, %rbx
cmoveq %rax, %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/parasail/src/pssw.c
// Function: parasail_ssw
parasail_result_ssw_t* parasail_ssw(
        const char * const restrict s1, const int s1Len,
        const char * const restrict s2, const int s2Len,
        const int open, const int gap, const parasail_matrix_t* matrix)
{
    parasail_profile_t *profile = parasail_ssw_init(s1, s1Len, matrix, 2);
    parasail_result_ssw_t *result = parasail_ssw_profile(profile, s2, s2Len, open, gap);
    parasail_profile_free(profile);
    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r9d, %ebx
movl %r8d, %ebp
movl %ecx, %r14d
movq %rdx, %r15
movq 0x30(%rsp), %rdx
movl $0x2, %ecx
callq 0x254f80
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
movl %r14d, %edx
movl %ebp, %ecx
movl %ebx, %r8d
callq 0x255057
movq %rax, %rbx
movq %r12, %rdi
callq 0x253b64
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/parasail/src/striped_unwind.c
// Function: parasail_striped_unwind_8
static inline int* CONCAT(parasail_striped_unwind_, T) (
        int lena,
        int lenb,
        int segWidth,
        void *array_)
{
    int i;
    int j;
    int *ret = (int*)malloc(sizeof(int)*lena*lenb);
    D *array = (D*)array_;
    const int32_t segLen = (lena + segWidth - 1) / segWidth;
    int32_t column_len = segLen * segWidth;
    for (j=0; j<lenb; ++j) {
        for (i=0; i<column_len; ++i) {
            int32_t i_unwound = i / segWidth + i % segWidth * segLen;
            if (i_unwound < lena) {
                ret[i_unwound*lenb + j] = (int)array[j*column_len + i];
            }
        }
    }
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %r14d
movl %esi, %ebp
movl %edi, %r15d
movslq %edi, %r12
movslq %esi, %r13
movq %r12, %rdi
imulq %r13, %rdi
shlq $0x2, %rdi
callq 0x1f01f0
movq %rax, %rcx
leal (%r12,%r14), %eax
decl %eax
cltd
idivl %r14d
testl %r13d, %r13d
jle 0x2e420d
movl %eax, %esi
movl %eax, %r8d
imull %r14d, %r8d
movl %r8d, %r9d
movl %ebp, %r10d
xorl %r11d, %r11d
testl %r8d, %r8d
jle 0x2e4202
xorl %edi, %edi
movl %edi, %eax
cltd
idivl %r14d
imull %esi, %edx
addl %eax, %edx
cmpl %r15d, %edx
jge 0x2e41fa
movsbl (%rbx,%rdi), %eax
imull %ebp, %edx
addl %r11d, %edx
movslq %edx, %rdx
movl %eax, (%rcx,%rdx,4)
incq %rdi
cmpq %rdi, %r9
jne 0x2e41da
incq %r11
addq %r9, %rbx
cmpq %r10, %r11
jne 0x2e41d3
movq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sharpyfox[P]citrusleaf-client/tests/loop_c/src/main.c
// Function: usage
void usage(void) {
	fprintf(stderr, "Usage key_c:\n");
	fprintf(stderr, "-h host [default 127.0.0.1] \n");
	fprintf(stderr, "-p port [default 3000]\n");
	fprintf(stderr, "-H host:port [default 127.0.0.1:3000]\n");
	fprintf(stderr, "-n namespace [default test]\n");
	fprintf(stderr, "-s set [default 'set']\n");
	fprintf(stderr, "-S Strict - verify all keys and halt on error\n");
	fprintf(stderr, "-b bin [default value]\n");
	fprintf(stderr, "-t threads [default 32]\n");
	fprintf(stderr, "-k keys [default 100000]\n");
	fprintf(stderr, "-K key size [default 10]\n");
	fprintf(stderr, "-V value size [default 20]\n");
	fprintf(stderr, "-r random seed [default random]\n");
	fprintf(stderr, "-m milliseconds timeout [default 200]\n");
	fprintf(stderr, "-f do not follow cluster [default do follow]\n");
	fprintf(stderr, "-v is verbose\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x14a61(%rip), %r12     # 0x16fe0
movq (%r12), %rcx
leaq 0xdb7b(%rip), %rdi      # 0x10105
pushq $0xd
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x2540
movq (%r12), %rcx
leaq 0xdb70(%rip), %rdi      # 0x10113
pushq $0x1d
popq %rsi
movq %rbx, %rdx
callq 0x2540
movq (%r12), %rcx
leaq 0xdb78(%rip), %rdi      # 0x10131
pushq $0x17
popq %r15
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2540
movq (%r12), %rcx
leaq 0xdb76(%rip), %rdi      # 0x10149
pushq $0x26
popq %r14
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2540
movq (%r12), %rcx
leaq 0xdb83(%rip), %rdi      # 0x10170
pushq $0x1c
popq %rsi
movq %rbx, %rdx
callq 0x2540
movq (%r12), %rcx
leaq 0xdb8a(%rip), %rdi      # 0x1018d
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2540
movq (%r12), %rcx
leaq 0xdb8c(%rip), %rdi      # 0x101a5
pushq $0x2e
popq %rsi
movq %rbx, %rdx
callq 0x2540
movq (%r12), %rcx
leaq 0xdba5(%rip), %rdi      # 0x101d4
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2540
movq (%r12), %rcx
leaq 0xdba7(%rip), %rdi      # 0x101ec
pushq $0x18
popq %rsi
movq %rbx, %rdx
callq 0x2540
movq (%r12), %rcx
leaq 0xdbaa(%rip), %rdi      # 0x10205
pushq $0x19
popq %r15
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2540
movq (%r12), %rcx
leaq 0xdbaa(%rip), %rdi      # 0x1021f
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2540
movq (%r12), %rcx
leaq 0xdbae(%rip), %rdi      # 0x10239
pushq $0x1b
popq %rsi
movq %rbx, %rdx
callq 0x2540
movq (%r12), %rcx
leaq 0xdbb4(%rip), %rdi      # 0x10255
pushq $0x20
popq %rsi
movq %rbx, %rdx
callq 0x2540
movq (%r12), %rcx
leaq 0xdbbf(%rip), %rdi      # 0x10276
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2540
movq (%r12), %rcx
leaq 0xdbd0(%rip), %rdi      # 0x1029d
pushq $0x2d
popq %rsi
movq %rbx, %rdx
callq 0x2540
movq (%r12), %rcx
leaq 0xdbe8(%rip), %rdi      # 0x102cb
pushq $0xe
popq %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2540
// File: /workspace/github_c_makefile_star2_O1/sharpyfox[P]citrusleaf-client/src/cf_log.c
// Function: cf_default_log
static void
cf_default_log(cf_log_level level, const char* fmt_no_newline, ...)
{
	size_t fmt_size = strlen(fmt_no_newline) + 2;
	char* fmt = (char*)alloca(fmt_size);

	strncpy(fmt, fmt_no_newline, fmt_size);
	fmt[fmt_size - 2] = '\n';

	va_list ap;

	va_start(ap, fmt_no_newline);
	vfprintf(stderr, fmt, ap);
	va_end(ap);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd0, %rsp
movq %rsi, %rbx
leaq -0xf0(%rbp), %r12
movq %rdx, 0x10(%r12)
movq %rcx, 0x18(%r12)
movq %r8, 0x20(%r12)
movq %r9, 0x28(%r12)
testb %al, %al
je 0x2c83
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0xb0(%rbp)
movaps %xmm2, -0xa0(%rbp)
movaps %xmm3, -0x90(%rbp)
movaps %xmm4, -0x80(%rbp)
movaps %xmm5, -0x70(%rbp)
movaps %xmm6, -0x60(%rbp)
movaps %xmm7, -0x50(%rbp)
movq %rsi, %rdi
callq 0x20e0
movq %rax, %r14
leaq 0x2(%rax), %rdx
movq %rsp, %r15
addq $0x11, %rax
andq $-0x10, %rax
subq %rax, %r15
movq %r15, %rsp
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2130
movb $0xa, (%r14,%r15)
leaq -0x40(%rbp), %rdx
movq %r12, 0x10(%rdx)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rdx)
movq 0x14309(%rip), %rax     # 0x16fe0
movq (%rax), %rdi
movq %r15, %rsi
callq 0x22f0
leaq -0x20(%rbp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/sharpyfox[P]citrusleaf-client/tests/loop_c/src/main.c
// Function: atomic_int_create
atomic_int	*
atomic_int_create(uint64_t val)
{
	atomic_int *ai = malloc(sizeof(atomic_int));
	ai->val = val;
	pthread_mutex_init(&ai->lock,0);
	return(ai);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x30, %edi
callq 0x22e0
movq %rax, %r14
movq %rbx, (%rax)
leaq 0x8(%rax), %rdi
xorl %esi, %esi
callq 0x2400
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/sharpyfox[P]citrusleaf-client/tests/loop_c/src/main.c
// Function: atomic_int_add
uint64_t
atomic_int_add(atomic_int *ai, int val)
{
	uint32_t	rv;
	pthread_mutex_lock(&ai->lock);
	ai->val += val;
	rv = ai->val;
	pthread_mutex_unlock(&ai->lock);
	return(rv);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
leaq 0x8(%rdi), %r15
movq %r15, %rdi
callq 0x23b0
movslq %ebx, %rbx
addq (%r14), %rbx
movq %rbx, (%r14)
movq %r15, %rdi
callq 0x2190
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/sharpyfox[P]citrusleaf-client/tests/loop_c/src/main.c
// Function: atomic_int_get
uint64_t		
atomic_int_get(atomic_int *ai)
{
	uint64_t	val;
	pthread_mutex_lock(&ai->lock);
	val = ai->val;
	pthread_mutex_unlock(&ai->lock);
	return(val);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
movq %r14, %rdi
callq 0x23b0
movq (%rbx), %rbx
movq %r14, %rdi
callq 0x2190
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/sharpyfox[P]citrusleaf-client/tests/loop_c/src/main.c
// Function: start_counter_thread
void *
start_counter_thread(atomic_int *reads, atomic_int *writes, atomic_int *deletes, atomic_int *keys)
{
	counter_thread_control *ctc = (counter_thread_control *) malloc(sizeof(counter_thread_control));
	ctc->reads = reads;
	ctc->writes = writes;
	ctc->deletes = deletes;
	ctc->keys = keys;
	ctc->death = 0;
	pthread_create(&ctc->th, 0, counter_fn, ctc);
	return(ctc);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl $0x30, %edi
callq 0x22e0
movq %rax, %r13
movq %r12, (%rax)
movq %r15, 0x8(%rax)
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
movl $0x0, 0x20(%rax)
leaq 0x28(%rax), %rdi
leaq -0x5c(%rip), %rdx       # 0x2e77
xorl %esi, %esi
movq %rax, %rcx
callq 0x24e0
movq %r13, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/sharpyfox[P]citrusleaf-client/tests/loop_c/src/main.c
// Function: rand_64
uint64_t
rand_64()
{
	uint64_t r;
	if (g_config.pseudo_seed) {

		r = random();
		
	}
	else {
		pthread_mutex_lock(&rand_buf_lock);
		if (rand_buf_off < sizeof(uint64_t) ) {
			if (seeded == 0) {
				int rfd = open("/dev/urandom",	O_RDONLY);
				int rsz = read(rfd, rand_buf, SEED_SZ);
				if (rsz < SEED_SZ) {
					fprintf(stderr, "warning! can't seed random number generator");
					return(0);
				}
				close(rfd);
				RAND_seed(rand_buf, rsz);
				seeded = 1;
			}
			if (1 != RAND_bytes(rand_buf, sizeof(rand_buf))) {
				fprintf(stderr, "RAND_bytes not so happy.\n");
				pthread_mutex_unlock(&rand_buf_lock);
				return(0);
			}
			rand_buf_off = sizeof(rand_buf);
		}
		
		rand_buf_off -= sizeof(uint64_t);
		r = *(uint64_t *) (&rand_buf[rand_buf_off]);
		pthread_mutex_unlock(&rand_buf_lock);
	}
	return(r);
}

// Assembly:
cmpl $0x0, 0x14450(%rip)     # 0x17360
jne 0x2120
pushq %rbp
pushq %rbx
pushq %rax
leaq 0x14450(%rip), %rdi     # 0x17370
callq 0x23b0
cmpl $0x7, 0x1446c(%rip)     # 0x17398
ja 0x2fa5
cmpb $0x0, 0x14467(%rip)     # 0x1739c
jne 0x2f85
leaq 0xd174(%rip), %rdi      # 0x100b2
xorl %esi, %esi
xorl %eax, %eax
callq 0x24b0
movl %eax, %ebp
leaq 0x14450(%rip), %rsi     # 0x173a0
movl $0x40, %edx
movl %eax, %edi
callq 0x2390
movq %rax, %rbx
cmpl $0x3f, %ebx
jle 0x2fde
movl %ebp, %edi
callq 0x2550
leaq 0x1442e(%rip), %rdi     # 0x173a0
movl %ebx, %esi
callq 0x24a0
movb $0x1, 0x1441c(%rip)     # 0x1739c
cmpl $0x40, %ebx
jl 0x2fda
leaq 0x14414(%rip), %rdi     # 0x173a0
movl $0x2000, %esi           # imm = 0x2000
callq 0x23d0
cmpl $0x1, %eax
jne 0x2fd5
movl $0x2000, 0x143f3(%rip)  # imm = 0x2000
movl 0x143ed(%rip), %eax     # 0x17398
addl $-0x8, %eax
movl %eax, 0x143e4(%rip)     # 0x17398
leaq 0x143e5(%rip), %rcx     # 0x173a0
movq (%rax,%rcx), %rbx
leaq 0x143aa(%rip), %rdi     # 0x17370
callq 0x2190
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x27f0
xorl %ebx, %ebx
jmp 0x2fcb
callq 0x27d4
jmp 0x2f80
// File: /workspace/github_c_makefile_star2_O1/sharpyfox[P]citrusleaf-client/tests/loop_c/src/loop.c
// Function: my_itoa
void
my_itoa(char *s, uint64_t v, uint sz)
{
	s[sz] = 0;
	int i;
	for (i = sz-1; i >= 0; i--) {
		s[i] = (v % 10) + '0';
		if (v) v = v / 10;
	}
	
}

// Assembly:
movl %edx, %eax
movb $0x0, (%rdi,%rax)
decl %edx
js 0x327c
movl %edx, %ecx
incq %rcx
movabsq $-0x3333333333333333, %r8 # imm = 0xCCCCCCCCCCCCCCCD
movq %rsi, %rax
mulq %r8
shrq $0x3, %rdx
leal (%rdx,%rdx), %eax
leal (%rax,%rax,4), %eax
subl %eax, %esi
orb $0x30, %sil
movb %sil, -0x1(%rdi,%rcx)
decq %rcx
movq %rdx, %rsi
jg 0x3259
retq
// File: /workspace/github_c_makefile_star2_O1/sharpyfox[P]citrusleaf-client/tests/loop_c/src/shash.c
// Function: shash_put
int
shash_put(shash *h, void *key, void *value)
{
	// Calculate hash
	uint hash = h->h_fn(key);
	hash %= h->table_len;

	pthread_mutex_t		*l = 0;
	if (h->flags & SHASH_CR_MT_BIGLOCK) {
		l = &h->biglock;
	}
	else if (h->flags & SHASH_CR_MT_MANYLOCK) {
		l = & (h->lock_table[hash]);
	}
	if (l)     pthread_mutex_lock( l );
		
	shash_elem *e = (shash_elem *) ( ((uint8_t *)h->table) + (SHASH_ELEM_SZ(h) * hash));	

	// most common case should be insert into empty bucket, special case
	if ( e->in_use == false )
		goto Copy;

	shash_elem *e_head = e;

	// This loop might be skippable if you know the key is not already in the hash
	// (like, you just searched and it's single-threaded)	
	while (e) {
		if ( memcmp( SHASH_ELEM_KEY_PTR(h, e) , key, h->key_len) == 0) {
			memcpy( SHASH_ELEM_VALUE_PTR(h, e), value, h->value_len);
			if (h->flags & SHASH_CR_MT_BIGLOCK)
				pthread_mutex_unlock(&h->biglock);
			return(SHASH_OK);
		}
		e = e->next;
	}

	e = (shash_elem *) malloc( SHASH_ELEM_SZ(h) );
	e->next = e_head->next;
	e_head->next = e;
	
Copy:
	memcpy(SHASH_ELEM_KEY_PTR(h, e), key, h->key_len);
	memcpy(SHASH_ELEM_VALUE_PTR(h, e), value, h->value_len);
	e->in_use = true;
	h->elements++;
	if (l)	pthread_mutex_unlock( l );
	return(SHASH_OK);	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, 0x8(%rsp)
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq *0x10(%rbx)
xorl %edx, %edx
divl 0x18(%rbx)
movl 0xc(%rbx), %eax
testb $0x4, %al
movl %edx, %r13d
jne 0x3bed
testb $0x8, %al
jne 0x3bf3
xorl %r12d, %r12d
jmp 0x3c00
leaq 0x28(%rbx), %r12
jmp 0x3c00
leaq (%r13,%r13,4), %r12
shlq $0x3, %r12
addq 0x50(%rbx), %r12
testq %r12, %r12
je 0x3c0d
movq %r12, %rdi
callq 0x23b0
movq 0x20(%rbx), %rax
movl 0x4(%rbx), %ebp
movl 0x8(%rbx), %ecx
leaq 0x10(%rbp,%rcx), %rdx
imulq %rdx, %r13
leaq (%rax,%r13), %r14
cmpb $0x0, 0x8(%rax,%r13)
je 0x3c7e
movq %rdx, 0x18(%rsp)
movq %rcx, 0x10(%rsp)
movq %r12, 0x20(%rsp)
testq %rax, %rax
je 0x3c63
movq %r14, %r12
leaq 0x9(%r12), %r13
movq %r13, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x2260
testl %eax, %eax
je 0x3cc7
movq (%r12), %r12
testq %r12, %r12
jne 0x3c43
movq 0x18(%rsp), %rdi
callq 0x22e0
movq (%r14), %rcx
movq %rcx, (%rax)
movq %rax, (%r14)
movq %rax, %r14
movq 0x20(%rsp), %r12
leaq 0x9(%r14), %rdi
movl 0x4(%rbx), %edx
movq %r15, %rsi
callq 0x21b0
movl 0x4(%rbx), %eax
movl 0x8(%rbx), %edx
leaq 0x9(%r14,%rax), %rdi
movq 0x8(%rsp), %rsi
callq 0x21b0
movb $0x1, 0x8(%r14)
incl (%rbx)
testq %r12, %r12
je 0x3cb6
movq %r12, %rdi
callq 0x2190
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq %rbp, %r13
movq %r13, %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x21b0
testb $0x4, 0xc(%rbx)
je 0x3cb6
addq $0x28, %rbx
movq %rbx, %r12
jmp 0x3cae
// File: /workspace/github_c_makefile_star2_O1/sharpyfox[P]citrusleaf-client/tests/loop_c/src/shash.c
// Function: shash_put_unique
int
shash_put_unique(shash *h, void *key, void *value)
{
	// Calculate hash
	uint hash = h->h_fn(key);
	hash %= h->table_len;

	pthread_mutex_t		*l = 0;
	if (h->flags & SHASH_CR_MT_BIGLOCK) {
		l = &h->biglock;
	}
	else if (h->flags & SHASH_CR_MT_MANYLOCK) {
		l = & (h->lock_table[hash]);
	}
	if (l)     pthread_mutex_lock( l );
		
	shash_elem *e = (shash_elem *) ( ((uint8_t *)h->table) + (SHASH_ELEM_SZ(h) * hash));	

	// most common case should be insert into empty bucket, special case
	if ( e->in_use == false ) {
		goto Copy;
	}

	shash_elem *e_head = e;

	while (e) {
		if ( memcmp(SHASH_ELEM_KEY_PTR(h, e), key, h->key_len) == 0) {
			if (h->flags & SHASH_CR_MT_BIGLOCK)
				pthread_mutex_unlock(&h->biglock);
			return(SHASH_ERR_FOUND);
		}
		e = e->next;
	}

	e = (shash_elem *) malloc( SHASH_ELEM_SZ(h) );
	e->next = e_head->next;
	e_head->next = e;
	
Copy:
	memcpy(SHASH_ELEM_KEY_PTR(h, e), key, h->key_len);
	memcpy(SHASH_ELEM_VALUE_PTR(h, e), value, h->value_len);
	e->in_use = true;
	h->elements++;
	if (l)	pthread_mutex_unlock( l );
	return(SHASH_OK);	

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x10(%rsp)
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, %rdi
callq *0x10(%rbx)
xorl %edx, %edx
divl 0x18(%rbx)
movl 0xc(%rbx), %eax
testb $0x4, %al
movl %edx, %r15d
jne 0x3d22
testb $0x8, %al
jne 0x3d28
xorl %r14d, %r14d
jmp 0x3d34
leaq 0x28(%rbx), %r14
jmp 0x3d34
leaq (%r15,%r15,4), %r14
shlq $0x3, %r14
addq 0x50(%rbx), %r14
testq %r14, %r14
je 0x3d41
movq %r14, %rdi
callq 0x23b0
movq %r14, 0x8(%rsp)
movq 0x20(%rbx), %rax
movl 0x4(%rbx), %r13d
movl 0x8(%rbx), %ecx
leaq 0x10(%r13,%rcx), %rbp
imulq %rbp, %r15
leaq (%rax,%r15), %r14
cmpb $0x0, 0x8(%rax,%r15)
je 0x3d9d
testq %rax, %rax
je 0x3d89
movq %r14, %r15
leaq 0x9(%r15), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x2260
testl %eax, %eax
je 0x3dea
movq (%r15), %r15
testq %r15, %r15
jne 0x3d6e
movq %rbp, %rdi
callq 0x22e0
movq (%r14), %rcx
movq %rcx, (%rax)
movq %rax, (%r14)
movq %rax, %r14
leaq 0x9(%r14), %rdi
movl 0x4(%rbx), %edx
movq %r12, %rsi
callq 0x21b0
movl 0x4(%rbx), %eax
movl 0x8(%rbx), %edx
leaq 0x9(%r14,%rax), %rdi
movq 0x10(%rsp), %rsi
callq 0x21b0
movb $0x1, 0x8(%r14)
incl (%rbx)
xorl %ebp, %ebp
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3dd9
callq 0x2190
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xfffffffc, %ebp       # imm = 0xFFFFFFFC
testb $0x4, 0xc(%rbx)
je 0x3dd9
addq $0x28, %rbx
movq %rbx, %rdi
jmp 0x3dd4
// File: /workspace/github_c_makefile_star2_O1/sharpyfox[P]citrusleaf-client/tests/loop_c/src/shash.c
// Function: shash_get
int
shash_get(shash *h, void *key, void *value)
{
	int rv = SHASH_ERR;
	
	uint hash = h->h_fn(key);
	hash %= h->table_len;

	pthread_mutex_t		*l = 0;
	if (h->flags & SHASH_CR_MT_BIGLOCK) {
		l = &h->biglock;
	}
	else if (h->flags & SHASH_CR_MT_MANYLOCK) {
		l = & (h->lock_table[hash]);
	}
	if (l)     pthread_mutex_lock( l );
	
	shash_elem *e = (shash_elem *) ( ((uint8_t *)h->table) + (SHASH_ELEM_SZ(h) * hash));	

	if (e->in_use == false) {
		rv = SHASH_ERR_NOTFOUND;
		goto Out;
	}
	
	do {
		if ( memcmp(SHASH_ELEM_KEY_PTR(h, e), key, h->key_len) == 0) {
			memcpy(value, SHASH_ELEM_VALUE_PTR(h, e), h->value_len);
			rv = SHASH_OK; 
			goto Out;
		}
		e = e->next;
	} while (e);
	rv = SHASH_ERR_NOTFOUND;
	
Out:
	if (l) pthread_mutex_unlock(l);

	return(rv);
					
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, (%rsp)
movq %rsi, %r14
movq %rdi, %r12
movq %rsi, %rdi
callq *0x10(%r12)
xorl %edx, %edx
divl 0x18(%r12)
movl 0xc(%r12), %eax
testb $0x4, %al
movl %edx, %ebx
jne 0x3e36
testb $0x8, %al
jne 0x3e3d
xorl %r15d, %r15d
jmp 0x3e4a
leaq 0x28(%r12), %r15
jmp 0x3e4a
leaq (%rbx,%rbx,4), %r15
shlq $0x3, %r15
addq 0x50(%r12), %r15
testq %r15, %r15
je 0x3e57
movq %r15, %rdi
callq 0x23b0
movq 0x20(%r12), %rbp
movl 0x4(%r12), %r13d
movl 0x8(%r12), %r12d
leaq 0x10(%r13,%r12), %rax
imulq %rax, %rbx
cmpb $0x0, 0x8(%rbp,%rbx)
je 0x3e98
addq %rbx, %rbp
leaq 0x9(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x2260
testl %eax, %eax
je 0x3e9f
movq (%rbp), %rbp
testq %rbp, %rbp
jne 0x3e79
movl $0xfffffffd, %ebx       # imm = 0xFFFFFFFD
jmp 0x3eb3
addq %r13, %rbx
movq (%rsp), %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x21b0
xorl %ebx, %ebx
testq %r15, %r15
je 0x3ec0
movq %r15, %rdi
callq 0x2190
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sharpyfox[P]citrusleaf-client/tests/loop_c/src/shash.c
// Function: shash_get_vlock
int
shash_get_vlock(shash *h, void *key, void **value, pthread_mutex_t **vlock)
{
	int rv = SHASH_ERR;
	
	uint hash = h->h_fn(key);
	hash %= h->table_len;

	pthread_mutex_t		*l = 0;
	if (h->flags & SHASH_CR_MT_BIGLOCK) {
		l = &h->biglock;
	}
	else if (h->flags & SHASH_CR_MT_MANYLOCK) {
		l = & (h->lock_table[hash]);
	}
	if (l)     pthread_mutex_lock( l );
	
	shash_elem *e = (shash_elem *) ( ((uint8_t *)h->table) + (SHASH_ELEM_SZ(h) * hash));	

	if (e->in_use == false) {
		rv = SHASH_ERR_NOTFOUND;
		goto Out;
	}
	
	do {
		if ( memcmp(SHASH_ELEM_KEY_PTR(h, e), key, h->key_len) == 0) {
			*value = SHASH_ELEM_VALUE_PTR(h, e);
			rv = SHASH_OK; 
			goto Out;
		}
		e = e->next;
	} while (e);
	
	rv = SHASH_ERR_NOTFOUND;
	
Out:
	if (l) {
		if (rv == SHASH_OK) {
			*vlock = l;
		}
		else {
			pthread_mutex_unlock( l );
			*vlock = 0;
		}
	}
	else {
		// for safety sake
		if (vlock) *vlock = 0;
	}

	return(rv);
					
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq %rsi, %r12
movq %rdi, %r13
movq %rsi, %rdi
callq *0x10(%r13)
xorl %edx, %edx
divl 0x18(%r13)
movl 0xc(%r13), %eax
testb $0x4, %al
movl %edx, %ebx
jne 0x3f0f
testb $0x8, %al
jne 0x3f15
xorl %r14d, %r14d
jmp 0x3f21
leaq 0x28(%r13), %r14
jmp 0x3f21
leaq (%rbx,%rbx,4), %r14
shlq $0x3, %r14
addq 0x50(%r13), %r14
testq %r14, %r14
je 0x3f2e
movq %r14, %rdi
callq 0x23b0
movq 0x20(%r13), %rbp
movl 0x4(%r13), %r15d
movl 0x8(%r13), %eax
leaq 0x10(%r15,%rax), %rax
imulq %rax, %rbx
movl $0xfffffffd, %r13d      # imm = 0xFFFFFFFD
cmpb $0x0, 0x8(%rbp,%rbx)
je 0x3f7c
addq %rbx, %rbp
leaq 0x9(%rbp), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x2260
testl %eax, %eax
je 0x3f80
movq (%rbp), %rbp
testq %rbp, %rbp
jne 0x3f53
xorl %eax, %eax
movl $0xfffffffd, %r13d      # imm = 0xFFFFFFFD
jmp 0x3f90
xorl %eax, %eax
jmp 0x3f90
addq %r15, %r13
movq 0x10(%rsp), %rax
movq %r13, (%rax)
xorl %r13d, %r13d
movb $0x1, %al
testq %r14, %r14
je 0x3fab
testb %al, %al
jne 0x3fa4
movq %r14, %rdi
callq 0x2190
xorl %r14d, %r14d
movq 0x8(%rsp), %rax
jmp 0x3fb8
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x3fbb
xorl %r14d, %r14d
movq %r14, (%rax)
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sharpyfox[P]citrusleaf-client/tests/loop_c/src/shash.c
// Function: shash_delete
int
shash_delete(shash *h, void *key)
{

	// Calculate hash
	uint hash = h->h_fn(key);
	hash %= h->table_len;
	int rv = SHASH_ERR;

	pthread_mutex_t		*l = 0;
	if (h->flags & SHASH_CR_MT_BIGLOCK) {
		l = &h->biglock;
	}
	else if (h->flags & SHASH_CR_MT_MANYLOCK) {
		l = & (h->lock_table[hash]);
	}
	if (l)     pthread_mutex_lock( l );
		
	shash_elem *e = (shash_elem *) ( ((uint8_t *)h->table) + (SHASH_ELEM_SZ(h) * hash));	

	// If bucket empty, def can't delete
	if ( e->in_use == false ) {
		rv = SHASH_ERR_NOTFOUND;
		goto Out;
	}

	shash_elem *e_prev = 0;

	// Look for teh element and destroy if found
	while (e) {
		if ( memcmp(SHASH_ELEM_KEY_PTR(h, e), key, h->key_len) == 0) {
			// Found it
			// patchup pointers & free element if not head
			if (e_prev) {
				e_prev->next = e->next;
				free (e);
			}
			// am at head - more complicated
			else {
				// at head with no next - easy peasy!
				if (0 == e->next) {
					e->in_use = false;
				}
				// at head with a next - more complicated
				else {
					shash_elem *_t = e->next;
					memcpy(e, e->next, SHASH_ELEM_SZ(h) );
					free(_t);
				}
			}
			h->elements--;
			rv = SHASH_OK;
			goto Out;

		}
		e_prev = e;
		e = e->next;
	}
	rv = SHASH_ERR_NOTFOUND;

Out:
	if (l) 
		pthread_mutex_unlock(l);
	return(rv);	
	

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq *0x10(%rbx)
xorl %edx, %edx
divl 0x18(%rbx)
movl 0xc(%rbx), %eax
testb $0x4, %al
movl %edx, %ebp
jne 0x3ffb
testb $0x8, %al
jne 0x4001
xorl %r14d, %r14d
jmp 0x400e
leaq 0x28(%rbx), %r14
jmp 0x400e
leaq (%rbp,%rbp,4), %r14
shlq $0x3, %r14
addq 0x50(%rbx), %r14
testq %r14, %r14
je 0x401b
movq %r14, %rdi
callq 0x23b0
movq 0x20(%rbx), %r12
movl 0x4(%rbx), %r13d
movl 0x8(%rbx), %eax
leaq 0x10(%r13,%rax), %rdx
imulq %rdx, %rbp
cmpb $0x0, 0x8(%r12,%rbp)
sete %al
testq %r12, %r12
sete %cl
orb %al, %cl
je 0x4049
movl $0xfffffffd, %ebx       # imm = 0xFFFFFFFD
jmp 0x40bf
movq %rdx, (%rsp)
addq %rbp, %r12
leaq 0x9(%r12), %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x2260
testl %eax, %eax
je 0x408c
movq %r12, %rbp
movq (%rbp), %r12
testq %r12, %r12
je 0x4042
leaq 0x9(%r12), %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x2260
testl %eax, %eax
movq %rbp, %rax
movq %r12, %rbp
jne 0x4067
jmp 0x408e
xorl %eax, %eax
testq %rax, %rax
movq (%r12), %r15
je 0x409f
movq %r15, (%rax)
movq %r12, %rdi
jmp 0x40b6
testq %r15, %r15
je 0x40dd
movq %r12, %rdi
movq %r15, %rsi
movq (%rsp), %rdx
callq 0x21b0
movq %r15, %rdi
callq 0x22c0
decl (%rbx)
xorl %ebx, %ebx
testq %r14, %r14
je 0x40cc
movq %r14, %rdi
callq 0x2190
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x0, 0x8(%r12)
jmp 0x40bb
// File: /workspace/github_c_makefile_star2_O1/sharpyfox[P]citrusleaf-client/tests/loop_c/src/shash.c
// Function: shash_delete_lockfree
int
shash_delete_lockfree(shash *h, void *key)
{
	// Calculate hash
	uint hash = h->h_fn(key);
	hash %= h->table_len;

	shash_elem *e = (shash_elem *) ( ((uint8_t *)h->table) + (SHASH_ELEM_SZ(h) * hash));	

	// If bucket empty, def can't delete
	if ( e->in_use == false )
		return( SHASH_ERR_NOTFOUND );

	shash_elem *e_prev = 0;

	// Look for teh element and destroy if found
	while (e) {
		if ( memcmp(SHASH_ELEM_KEY_PTR(h, e), key, h->key_len) == 0) {
			// Found it
			// patchup pointers & free element if not head
			if (e_prev) {
				e_prev->next = e->next;
				free (e);
			}
			// am at head - more complicated
			else {
				// at head with no next - easy peasy!
				if (0 == e->next) {
					e->in_use = false;
				}
				// at head with a next - more complicated
				else {
					shash_elem *_t = e->next;
					memcpy(e, e->next, SHASH_ELEM_SZ(h) );
					free(_t);
				}
			}
			h->elements--;
			return( SHASH_OK );
		}
		e_prev = e;
		e = e->next;
	}
	
	return ( SHASH_ERR_NOTFOUND );

	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, %rdi
callq *0x10(%rbx)
xorl %edx, %edx
divl 0x18(%rbx)
movq 0x20(%rbx), %r15
movl 0x4(%rbx), %r13d
movl 0x8(%rbx), %eax
leaq 0x10(%r13,%rax), %rsi
imulq %rsi, %rdx
cmpb $0x0, 0x8(%r15,%rdx)
sete %al
testq %r15, %r15
sete %cl
orb %al, %cl
movl $0xfffffffd, %ebp       # imm = 0xFFFFFFFD
jne 0x419f
movq %rsi, (%rsp)
addq %rdx, %r15
leaq 0x9(%r15), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x2260
testl %eax, %eax
je 0x416d
movq %r15, %r14
movq (%r14), %r15
testq %r15, %r15
je 0x419f
leaq 0x9(%r15), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x2260
testl %eax, %eax
movq %r14, %rax
movq %r15, %r14
jne 0x414a
jmp 0x416f
xorl %eax, %eax
testq %rax, %rax
movq (%r15), %r12
je 0x417f
movq %r12, (%rax)
movq %r15, %rdi
jmp 0x4196
testq %r12, %r12
je 0x41b0
movq %r15, %rdi
movq %r12, %rsi
movq (%rsp), %rdx
callq 0x21b0
movq %r12, %rdi
callq 0x22c0
decl (%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x0, 0x8(%r15)
jmp 0x419b
// File: /workspace/github_c_makefile_star2_O1/sharpyfox[P]citrusleaf-client/tests/loop_c/src/shash.c
// Function: shash_reduce
int
shash_reduce(shash *h, shash_reduce_fn reduce_fn, void *udata)
{
	int rv = 0;
	
	if (h->flags & SHASH_CR_MT_BIGLOCK) {
		pthread_mutex_lock( &h->biglock);
	}

	for (uint i=0; i<h->table_len ; i++) {
		
		pthread_mutex_t *l = 0;
		if (h->flags & SHASH_CR_MT_MANYLOCK) {
			l = &(h->lock_table[i]);
			pthread_mutex_lock( l );
		}
		
		shash_elem *list_he = (shash_elem *) ( ((uint8_t *)h->table) + (SHASH_ELEM_SZ(h) * i));
		while (list_he) {
			
			// not in use is common at head pointer - unused bucket
			if (list_he->in_use == false) {
				if (l) 	pthread_mutex_unlock(l);
				break;
			}
			
			rv = reduce_fn(	SHASH_ELEM_KEY_PTR(h, list_he), SHASH_ELEM_VALUE_PTR(h, list_he), udata);
			if (0 != rv) {
				if (l)  pthread_mutex_unlock(l);
				goto Out;
			}
			
			list_he = list_he->next;
		};

		if (l)	pthread_mutex_unlock(l);

	}
Out:
	if (h->flags & SHASH_CR_MT_BIGLOCK)
		pthread_mutex_unlock(&h->biglock);

	return(rv);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x10(%rsp)
movq %rsi, %r15
movq %rdi, %rbx
testb $0x4, 0xc(%rdi)
je 0x4330
leaq 0x28(%rbx), %rdi
callq 0x23b0
movl $0x2, %eax
cmpl $0x0, 0x18(%rbx)
je 0x4410
xorl %r13d, %r13d
xorl %ebp, %ebp
testb $0x8, 0xc(%rbx)
jne 0x434f
xorl %r12d, %r12d
jmp 0x4364
leaq (%r13,%r13,4), %r12
shlq $0x3, %r12
addq 0x50(%rbx), %r12
movq %r12, %rdi
callq 0x23b0
movq 0x20(%rbx), %r14
testq %r14, %r14
je 0x43dd
movl 0x4(%rbx), %eax
movl 0x8(%rbx), %ecx
leaq 0x10(%rax,%rcx), %rax
imulq %r13, %rax
cmpb $0x0, 0x8(%r14,%rax)
je 0x43b0
addq %rax, %r14
leaq 0x9(%r14), %rdi
movl 0x4(%rbx), %eax
leaq 0x9(%r14,%rax), %rsi
movq 0x10(%rsp), %rdx
callq *%r15
testl %eax, %eax
jne 0x43cc
movq (%r14), %r14
testq %r14, %r14
je 0x43db
cmpb $0x0, 0x8(%r14)
jne 0x4387
xorl %ebp, %ebp
testq %r12, %r12
je 0x43bf
movq %r12, %rdi
callq 0x2190
jmp 0x43dd
movl $0x0, 0xc(%rsp)
movb $0x1, %r14b
jmp 0x43f5
movl %eax, %ebp
movl $0x7, 0xc(%rsp)
xorl %r14d, %r14d
jmp 0x43e8
xorl %ebp, %ebp
movl $0x0, 0xc(%rsp)
movb $0x1, %r14b
testq %r12, %r12
je 0x43f5
movq %r12, %rdi
callq 0x2190
testb %r14b, %r14b
je 0x4414
incq %r13
movl 0x18(%rbx), %eax
cmpq %rax, %r13
jb 0x4344
movl $0x2, %eax
jmp 0x4418
xorl %ebp, %ebp
jmp 0x4418
movl 0xc(%rsp), %eax
cmpl $0x7, %eax
je 0x4422
cmpl $0x2, %eax
jne 0x4434
testb $0x4, 0xc(%rbx)
je 0x4434
addq $0x28, %rbx
movq %rbx, %rdi
callq 0x2190
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sharpyfox[P]citrusleaf-client/tests/loop_c/src/shash.c
// Function: shash_destroy
void
shash_destroy(shash *h)
{
	shash_elem *e_table = h->table;
	for (uint i=0;i<h->table_len;i++) {
		if (e_table->next) {
			shash_elem *e = e_table->next;
			shash_elem *t;
			while (e) {
				t = e->next;
				free(e);
				e = t;
			}
		}
		e_table = (shash_elem *) (((uint8_t *)e_table) + SHASH_ELEM_SZ(h));
	}

	if (h->flags & SHASH_CR_MT_BIGLOCK) {
		pthread_mutex_destroy(&h->biglock);
	}
	if (h->flags & SHASH_CR_MT_MANYLOCK) {
		for (uint i=0;i<h->table_len;i++) {
			pthread_mutex_destroy(&(h->lock_table[i]));
		}
		free(h->lock_table);
	}

	free(h->table);
	free(h);	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x18(%rdi)
je 0x4618
movq 0x20(%rbx), %r14
xorl %ebp, %ebp
movq (%r14), %rdi
testq %rdi, %rdi
je 0x4603
movq (%rdi), %r15
callq 0x22c0
testq %r15, %r15
movq %r15, %rdi
jne 0x45f3
movl 0x4(%rbx), %eax
movl 0x8(%rbx), %ecx
addq %rax, %rcx
leaq 0x10(%r14,%rcx), %r14
incl %ebp
cmpl 0x18(%rbx), %ebp
jb 0x45eb
testb $0x4, 0xc(%rbx)
je 0x4627
leaq 0x28(%rbx), %rdi
callq 0x22b0
testb $0x8, 0xc(%rbx)
je 0x465d
cmpl $0x0, 0x18(%rbx)
je 0x4654
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x50(%rbx), %rdi
addq %r14, %rdi
callq 0x22b0
incq %r15
movl 0x18(%rbx), %eax
addq $0x28, %r14
cmpq %rax, %r15
jb 0x4639
movq 0x50(%rbx), %rdi
callq 0x22c0
movq 0x20(%rbx), %rdi
callq 0x22c0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x22c0
// File: /workspace/github_c_makefile_star2_O1/sharpyfox[P]citrusleaf-client/src/citrusleaf.c
// Function: citrusleaf_object_init_str
void citrusleaf_object_init_str(cl_object *o, const char *str)
{
	o->type = CL_STR;
	o->sz = strlen(str);
	o->u.str = (char *) str;
	o->free = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x3, (%rdi)
movq %rsi, %rdi
callq 0x20e0
movq %rax, 0x8(%r14)
movq %rbx, 0x10(%r14)
movq $0x0, 0x18(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/sharpyfox[P]citrusleaf-client/src/citrusleaf.c
// Function: citrusleaf_copy_object
int citrusleaf_copy_object(cl_object *destobj, const cl_object *srcobj)
{
	destobj->type = srcobj->type;
	destobj->sz = srcobj->sz;
	destobj->free = 0; //By default assume that there is nothing to free

	//Each of the types of bins needs a different treatment in copying.
	switch(srcobj->type) {
		case CL_NULL:
			break;
		case CL_INT:
			destobj->u.i64 = srcobj->u.i64;
			break;
		case CL_STR:
			destobj->free = destobj->u.str = malloc(destobj->sz+1);
			if (destobj->free == NULL) {
				return -1;
			}
			memcpy(destobj->u.str, srcobj->u.str, destobj->sz);
			destobj->u.str[destobj->sz] = 0;
			break;
		case CL_BLOB:
		case CL_DIGEST:
		case CL_JAVA_BLOB:
		case CL_CSHARP_BLOB:
		case CL_PYTHON_BLOB:
		case CL_RUBY_BLOB:
		case CL_PHP_BLOB:
			destobj->free = destobj->u.blob = malloc(destobj->sz);
			if (destobj->free == NULL) {
				return -1;
			}
			memcpy(destobj->u.blob, srcobj->u.blob, destobj->sz);
			break;
		default:
			cf_error("Encountered an unknown bin type %d", srcobj->type);
			return -1;
			break;
	}

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl (%rsi), %eax
movl %eax, (%rdi)
movq 0x8(%rsi), %rbx
movq %rbx, 0x8(%rdi)
movq $0x0, 0x18(%rdi)
movl (%rsi), %edx
cmpq $0xb, %rdx
ja 0x481d
movq %rsi, %r14
movq %rdi, %r15
leaq 0xbed6(%rip), %rax      # 0x1068c
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %rbx, %rdi
callq 0x22e0
movq %rax, 0x10(%r15)
movq %rax, 0x18(%r15)
testq %rax, %rax
je 0x4816
movq 0x10(%r14), %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0x21b0
xorl %ebx, %ebx
jmp 0x4849
leaq 0x1(%rbx), %rdi
callq 0x22e0
movq %rax, 0x10(%r15)
movq %rax, 0x18(%r15)
testq %rax, %rax
je 0x4816
movq %rax, %r12
movq 0x10(%r14), %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0x21b0
movb $0x0, (%r12,%rbx)
jmp 0x47e3
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x4849
leaq 0x12aa4(%rip), %rax     # 0x172c8
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x0, (%rax)
js 0x4849
leaq 0x12a9b(%rip), %rax     # 0x172d0
movq (%rax), %rcx
leaq 0xbf6f(%rip), %rsi      # 0x107ae
xorl %edi, %edi
xorl %eax, %eax
callq *%rcx
jmp 0x4849
movl %edx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x10(%r14), %rax
movq %rax, 0x10(%r15)
jmp 0x47e3
// File: /workspace/github_c_makefile_star2_O1/sharpyfox[P]citrusleaf-client/src/citrusleaf.c
// Function: citrusleaf_copy_bins
int citrusleaf_copy_bins(cl_bin **destbins, const cl_bin *srcbins, int n_bins)
{
	int rv;

	cl_bin *newbins = calloc(sizeof(struct cl_bin_s), n_bins);
	if (newbins == NULL) {
		return -1;
	}

	for (int i=0; i<n_bins; i++) {
		rv = citrusleaf_copy_bin(&newbins[i], &srcbins[i]);
		if (rv == -1) {
			// Unwind previous bin allocations.
			if (i > 0) {
				citrusleaf_bins_free(newbins, i);
			}
			free(newbins);
			return -1;
		}
	}

	*destbins = newbins;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r12
movq %rdi, %r15
movslq %edx, %rsi
movl $0x40, %edi
callq 0x2170
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x492a
movq %rax, %r14
movq %r15, (%rsp)
testl %ebp, %ebp
jle 0x48f5
movl %ebp, %r15d
xorl %ebp, %ebp
movq %r14, %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x2240
leaq 0x20(%r13), %rdi
leaq 0x20(%r12), %rsi
callq 0x4785
cmpl $-0x1, %eax
je 0x4900
incq %rbp
addq $0x40, %r12
addq $0x40, %r13
cmpq %rbp, %r15
jne 0x48c7
movq (%rsp), %rax
movq %r14, (%rax)
xorl %ebx, %ebx
jmp 0x492a
testq %rbp, %rbp
je 0x4922
movq %r14, %r15
addq $0x38, %r15
movq (%r15), %rdi
testq %rdi, %rdi
je 0x4919
callq 0x22c0
addq $0x40, %r15
decq %rbp
jne 0x490c
movq %r14, %rdi
callq 0x22c0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq