LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/yancanchen[P]mc-bloom-filter/bloom_filter.c
// Function: calculate
size_t calculate (UINT64_RC n, double e, UINT64_RC* m, int* k, double* tmp_e)
{
    double te = 1;
    int kk = 0;
    int x;
 
    for(x = 2; te > e && x < 100; x++) {
        kk = ceil(x * log(2));
        te =  pow((1 - exp((double)(-kk) / x)), kk);
    }

    /* overflow check. */
    if ((double)(x - 1) * n > (UINT64_RC)(-1)) return 0;

    UINT64_RC mm = (x - 1) * n;
    UINT64_RC bytes = (((mm + 0x1F) & (~0x1FULL)) >> 3) + sizeof(bloom_t);

    /* overflow check. */
    if (bytes > (size_t)(-1)) return 0;

    *k = kk;
    *tmp_e = te;
    *m = mm;

    return (size_t)bytes;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r14
movapd %xmm0, %xmm1
movq %rdi, %r12
movsd 0x370e(%rip), %xmm0     # 0x6008
movsd %xmm1, (%rsp)
movl $0x1, %ebp
ucomisd %xmm1, %xmm0
jbe 0x2975
incl %ebp
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
movsd %xmm0, 0x8(%rsp)
mulsd 0x36ef(%rip), %xmm0     # 0x6010
callq 0x23f0
movapd %xmm0, 0x10(%rsp)
cvttsd2si %xmm0, %r13d
movl %r13d, %eax
negl %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x8(%rsp), %xmm0
callq 0x2420
movsd 0x36b8(%rip), %xmm2     # 0x6008
subsd %xmm0, %xmm2
cvttpd2dq 0x10(%rsp), %xmm0
cvtdq2pd %xmm0, %xmm1
movapd %xmm2, %xmm0
callq 0x20f0
ucomisd (%rsp), %xmm0
jbe 0x2978
cmpl $0x63, %ebp
jb 0x290a
jmp 0x2978
xorl %r13d, %r13d
xorps %xmm1, %xmm1
cvtsi2sd %ebp, %xmm1
movq %r12, %xmm2
punpckldq 0x3694(%rip), %xmm2 # xmm2 = xmm2[0],mem[0],xmm2[1],mem[1]
subpd 0x369c(%rip), %xmm2     # 0x6030
movapd %xmm2, %xmm3
unpckhpd %xmm2, %xmm3            # xmm3 = xmm3[1],xmm2[1]
addsd %xmm2, %xmm3
mulsd %xmm1, %xmm3
ucomisd 0x366c(%rip), %xmm3     # 0x6018
jbe 0x29b2
xorl %eax, %eax
jmp 0x29d2
movl %ebp, %ecx
imulq %r12, %rcx
leaq 0x1f(%rcx), %rax
shrq $0x5, %rax
leaq 0x80(,%rax,4), %rax
movl %r13d, (%r15)
movsd %xmm0, (%rbx)
movq %rcx, (%r14)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/yancanchen[P]mc-bloom-filter/bloom_filter.c
// Function: bloom_init
bloom_t *bloom_init (char * key, UINT64_RC n, double e)
{

    UINT64_RC m = 0;
    int k = 0;
    double tmp_e = 1;
    
    size_t bytes = calculate(n, e, &m, &k, &tmp_e);

    if (!bytes) {
        DEBUG("Error, bad arg n:%llu e:%lf\r\n", n, e);
        return NULL;
    }
    if(bytes > blooms->max_bytes - blooms->bytes){
        DEBUG("Error, bloom over max size(bytes:%lu, x:%llu m:%llu, e:%e)\r\n", (unsigned long)bytes, m/n, m, e);
        return NULL;
    }

    bloom_t *bloom = (bloom_t *)malloc(bytes); 
    if(!bloom) {
        DEBUG("Error, bloom init failed (malloc)\r\n");
        return NULL;
    }
    
    memset(bloom, 0, bytes);  
    bloom->m = m;
    bloom->e = e;
    bloom->e2 = tmp_e;
    bloom->k = k;
    bloom->n = n;
    bloom->bytes = bytes;
    strcpy(bloom->key, key);
    
    return bloom;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x20(%rsp), %rsi
movq $0x0, (%rsi)
leaq 0xc(%rsp), %rdx
movl $0x0, (%rdx)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
leaq 0x18(%rsp), %rcx
movq %rax, (%rcx)
movq %r14, %rdi
movsd %xmm0, 0x10(%rsp)
callq 0x28d4
testq %rax, %rax
je 0x2aa4
movq %rax, %r12
movq 0x6800(%rip), %rax      # 0x9238
movq 0x18(%rax), %rcx
subq 0x10(%rax), %rcx
cmpq %rcx, %r12
ja 0x2aa4
movq %r12, %rdi
callq 0x2280
testq %rax, %rax
je 0x2aa4
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x21a0
movq 0x20(%rsp), %rax
movq %rax, 0x48(%r15)
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x68(%r15)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x70(%r15)
movl 0xc(%rsp), %eax
movl %eax, 0x78(%r15)
movq %r14, 0x40(%r15)
movq %r12, 0x18(%r15)
movq %r15, %rdi
addq $0x20, %rdi
movq %rbx, %rsi
callq 0x2080
jmp 0x2aa7
xorl %r15d, %r15d
movq %r15, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/yancanchen[P]mc-bloom-filter/bloom_filter.c
// Function: bloom_set
int bloom_set (bloom_t *bloom, char *key) 
{
    UINT64_RC checksum[2];

    MurmurHash3_x64_128(key, strlen(key), SALT_CONSTANT, checksum);
    UINT64_RC h1 = checksum[0];
    UINT64_RC h2 = checksum[1];

    int i;
    for (i = 0; i < bloom->k; i++) {
        UINT64_RC hashes = (h1 + i * h2) % bloom->m;
        bitmap_set(bloom->map, hashes);
    }
    bloom->set_count++;
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2110
movq %rsp, %rcx
movq %r14, %rdi
movl %eax, %esi
movl $0x97c29b3a, %edx       # imm = 0x97C29B3A
callq 0x4fd0
movslq 0x78(%rbx), %rdi
testq %rdi, %rdi
jle 0x2b15
movq (%rsp), %rsi
movq 0x8(%rsp), %r8
movq 0x48(%rbx), %r9
movq %rsi, %rax
xorl %edx, %edx
divq %r9
movq %rdx, %rcx
movl $0x1, %eax
shll %cl, %eax
shrq $0x5, %rcx
orl %eax, 0x7c(%rbx,%rcx,4)
addq %r8, %rsi
decq %rdi
jne 0x2af3
incq 0x58(%rbx)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/yancanchen[P]mc-bloom-filter/bloom_filter.c
// Function: bloom_get
int bloom_get (bloom_t *bloom, char *key) 
{
    UINT64_RC checksum[2];

    MurmurHash3_x64_128(key, strlen(key), SALT_CONSTANT, checksum);
    UINT64_RC h1 = checksum[0];
    UINT64_RC h2 = checksum[1];

    int i;
    for (i = 0; i < bloom->k; i++) {
        UINT64_RC hashes = (h1 + i * h2) % bloom->m;
        if(!bitmap_check(bloom->map, hashes)){
            bloom->get_miss_count++;
            blooms->get_miss_count++;
            return 0;
        }
    }
    bloom->get_count++;
    blooms->get_count++;
    return 1;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2110
movq %rsp, %rcx
movq %r14, %rdi
movl %eax, %esi
movl $0x97c29b3a, %edx       # imm = 0x97C29B3A
callq 0x4fd0
movslq 0x78(%rbx), %r9
movl $0x28, %edi
movl $0x50, %r8d
testq %r9, %r9
jle 0x2b8d
movq (%rsp), %rcx
movq 0x8(%rsp), %r10
movq 0x48(%rbx), %r11
xorl %esi, %esi
movq %rcx, %rax
xorl %edx, %edx
divq %r11
movq %rdx, %rax
shrq $0x5, %rax
movl 0x7c(%rbx,%rax,4), %eax
btl %edx, %eax
jae 0x2b94
addq %r10, %rcx
decq %r9
jne 0x2b6b
movl $0x1, %esi
jmp 0x2b9f
movl $0x38, %edi
movl $0x60, %r8d
incq (%rbx,%r8)
movq 0x668e(%rip), %rax      # 0x9238
incq (%rax,%rdi)
movl %esi, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/yancanchen[P]mc-bloom-filter/bloom_filter.c
// Function: blooms_search
bloom_t *blooms_search(char *key)
{
    unsigned int hv = dictGenHashFunction((unsigned char *)key, strlen(key)) & hashmask(blooms->power);

    bloom_t *bloom = blooms->hashtable[hv];

    while (bloom) {
        if (!strcmp(bloom->key, key)) {
            return bloom;
        }
        bloom = bloom->hash_next;
    }

    return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2110
movl $0x1505, %edx           # imm = 0x1505
testl %eax, %eax
je 0x2be3
xorl %ecx, %ecx
movl %edx, %esi
shll $0x5, %esi
addl %edx, %esi
movzbl (%rbx,%rcx), %edx
addl %esi, %edx
incq %rcx
cmpl %ecx, %eax
jne 0x2bcf
movq 0x664e(%rip), %rax      # 0x9238
movb 0x24(%rax), %cl
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
shll %cl, %esi
notl %esi
andl %edx, %esi
movq 0x40(%rax,%rsi,8), %r14
testq %r14, %r14
je 0x2c18
leaq 0x20(%r14), %rdi
movq %rbx, %rsi
callq 0x2200
testl %eax, %eax
je 0x2c1b
movq 0x10(%r14), %r14
jmp 0x2bfd
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/yancanchen[P]mc-bloom-filter/bloom_filter.c
// Function: blooms_add
int blooms_add (char *key, UINT64_RC n, double e)
{    
    unsigned int hv = dictGenHashFunction((unsigned char *)key, strlen(key)) & hashmask(blooms->power);
    bloom_t *bloom = blooms->hashtable[hv];

    while (bloom) {
        if (!strcmp(bloom->key, key)) {
            return 1;
        }
        bloom = bloom->hash_next;
    }

    bloom = bloom_init(key, n, e);
    if(!bloom) {
        DEBUG("Error, bloom init failed\r\n");
        return 2;
    }
    
    bloom->hash_next = blooms->hashtable[hv];
    blooms->hashtable[hv] = bloom;

    list_add_tail(&bloom->list, &blooms->list);
    
    blooms->count++;
    blooms->bytes += bloom->bytes;
    
    DEBUG("%s add\r\n", key);
    
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movsd %xmm0, (%rsp)
movq %rsi, %rbx
movq %rdi, %r14
callq 0x2110
movl $0x1505, %edx           # imm = 0x1505
testl %eax, %eax
je 0x2c5e
xorl %ecx, %ecx
movl %edx, %esi
shll $0x5, %esi
addl %edx, %esi
movzbl (%r14,%rcx), %edx
addl %esi, %edx
incq %rcx
cmpl %ecx, %eax
jne 0x2c49
movq 0x65d3(%rip), %rax      # 0x9238
movb 0x24(%rax), %cl
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
shll %cl, %r15d
notl %r15d
andl %edx, %r15d
movq 0x40(%rax,%r15,8), %r12
testq %r12, %r12
je 0x2c99
leaq 0x20(%r12), %rdi
movq %r14, %rsi
callq 0x2200
testl %eax, %eax
je 0x2cf2
movq 0x10(%r12), %r12
jmp 0x2c7c
movq %r14, %rdi
movq %rbx, %rsi
movsd (%rsp), %xmm0
callq 0x29e1
testq %rax, %rax
je 0x2cf9
movq 0x6583(%rip), %rcx      # 0x9238
movq 0x40(%rcx,%r15,8), %rdx
movq %rdx, 0x10(%rax)
movq %rax, 0x40(%rcx,%r15,8)
movq 0x656e(%rip), %rcx      # 0x9238
movq 0x8(%rcx), %rdx
movq %rax, 0x8(%rcx)
movq %rcx, (%rax)
movq %rdx, 0x8(%rax)
movq %rax, (%rdx)
movq 0x6555(%rip), %rcx      # 0x9238
incl 0x20(%rcx)
movq 0x18(%rax), %rax
addq %rax, 0x10(%rcx)
xorl %eax, %eax
jmp 0x2cfe
movl $0x1, %eax
jmp 0x2cfe
movl $0x2, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/yancanchen[P]mc-bloom-filter/bloom_filter.c
// Function: blooms_set
int blooms_set (char *key, char *subkey)
{
    bloom_t *bloom = blooms_search(key);
    if(!bloom) {
        DEBUG("Error, %s not exited\r\n", key);
        return 1;
    }

    bloom_set(bloom, subkey);
    blooms->set_count++;
    
    DEBUG("%s:\t%s\tOK\r\n", key, subkey);

    return 0;    
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
callq 0x2bb8
testq %rax, %rax
je 0x2d32
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2ab6
movq 0x650e(%rip), %rax      # 0x9238
incq 0x30(%rax)
xorl %eax, %eax
jmp 0x2d37
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/yancanchen[P]mc-bloom-filter/bloom_filter.c
// Function: bloom_status
int bloom_status (char * key)
{
    bloom_t * bloom = blooms_search(key);
    if(!bloom) {
        DEBUG("Error, %s not exited\r\n", key);
        return -1;
    }

    printf("-----------------------------\r\n");
    printf("bloom filter name: %s\r\n", bloom->key);
    printf("expected max amount of elements: %llu\r\n", bloom->n);
    printf("expected false positive rate: %e\r\n", bloom->e);
    printf("theoretical false positive rate: %e\r\n", bloom->e2);
    printf("hash functions: %d\r\n", bloom->k);
    printf("table size (bits): %llu\r\n", bloom->m);
    printf("bloom size (bytes): %zu\r\n", bloom->bytes);
    printf("bloom set count: %llu\r\n", bloom->set_count);   
    printf("bloom get count: %llu\r\n", bloom->get_count);     
    printf("bloom get miss count: %llu\r\n", bloom->get_miss_count);    
    printf("-----------------------------\r\n\r\n");

    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
callq 0x2bb8
testq %rax, %rax
je 0x2e46
movq %rax, %r14
leaq 0x346d(%rip), %rdi      # 0x61e3
callq 0x2090
movq %r14, %rsi
addq $0x20, %rsi
leaq 0x32b7(%rip), %rdi      # 0x6040
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x2170
movq 0x40(%r14), %rsi
leaq 0x32bb(%rip), %rdi      # 0x6058
xorl %eax, %eax
callq 0x2170
movsd 0x68(%r14), %xmm0
leaq 0x32cf(%rip), %rdi      # 0x6080
movb $0x1, %al
callq 0x2170
movsd 0x70(%r14), %xmm0
leaq 0x32de(%rip), %rdi      # 0x60a3
movb $0x1, %al
callq 0x2170
movl 0x78(%r14), %esi
leaq 0x32f2(%rip), %rdi      # 0x60c9
xorl %eax, %eax
callq 0x2170
movq 0x48(%r14), %rsi
leaq 0x32f5(%rip), %rdi      # 0x60de
xorl %eax, %eax
callq 0x2170
movq 0x18(%r14), %rsi
leaq 0x32fd(%rip), %rdi      # 0x60f8
xorl %eax, %eax
callq 0x2170
movq 0x58(%r14), %rsi
leaq 0x3305(%rip), %rdi      # 0x6112
xorl %eax, %eax
callq 0x2170
movq 0x50(%r14), %rsi
leaq 0x330b(%rip), %rdi      # 0x612a
xorl %eax, %eax
callq 0x2170
movq 0x60(%r14), %rsi
leaq 0x3311(%rip), %rdi      # 0x6142
xorl %eax, %eax
callq 0x2170
leaq 0x33d1(%rip), %rdi      # 0x6210
callq 0x2090
jmp 0x2e4b
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/yancanchen[P]mc-bloom-filter/bloom_filter.c
// Function: blooms_status
void blooms_status ()
{
 
    printf("-----------------------------\r\n");
    if(!list_empty(&blooms->list)){
        printf("blooms list:\r\n");
        bloom_t * i;
        list_for_each_entry(i, &blooms->list, list){
            printf("\t\t%s\r\n", i->key);
        }
    }
    printf("blooms count: %d\r\n", blooms->count);    
    printf("blooms total bytes: %zu\r\n", blooms->bytes);
    printf("blooms set count: %llu\r\n", blooms->set_count);   
    printf("blooms get count: %llu\r\n", blooms->get_count);     
    printf("blooms get miss count: %llu\r\n", blooms->get_miss_count);     

    printf("-----------------------------\r\n\r\n");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x3383(%rip), %rdi      # 0x61e3
callq 0x2090
movq 0x63cc(%rip), %rax      # 0x9238
cmpq %rax, (%rax)
je 0x2ead
leaq 0x338a(%rip), %rdi      # 0x6202
callq 0x2090
movq 0x63b4(%rip), %rax      # 0x9238
movq (%rax), %r14
cmpq %rax, %r14
je 0x2ead
leaq 0x32cc(%rip), %rbx      # 0x615f
leaq 0x20(%r14), %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2170
movq (%r14), %r14
cmpq 0x638d(%rip), %r14      # 0x9238
jne 0x2e93
movq 0x6384(%rip), %rax      # 0x9238
movl 0x20(%rax), %esi
leaq 0x32a8(%rip), %rdi      # 0x6166
xorl %eax, %eax
callq 0x2170
movq 0x636c(%rip), %rax      # 0x9238
movq 0x10(%rax), %rsi
leaq 0x32a2(%rip), %rdi      # 0x6179
xorl %eax, %eax
callq 0x2170
movq 0x6353(%rip), %rax      # 0x9238
movq 0x30(%rax), %rsi
leaq 0x32a3(%rip), %rdi      # 0x6193
xorl %eax, %eax
callq 0x2170
movq 0x633a(%rip), %rax      # 0x9238
movq 0x28(%rax), %rsi
leaq 0x32a3(%rip), %rdi      # 0x61ac
xorl %eax, %eax
callq 0x2170
movq 0x6321(%rip), %rax      # 0x9238
movq 0x38(%rax), %rsi
leaq 0x32a3(%rip), %rdi      # 0x61c5
xorl %eax, %eax
callq 0x2170
leaq 0x32e0(%rip), %rdi      # 0x6210
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2090
// File: /workspace/github_c_makefile_star2_O1/yancanchen[P]mc-bloom-filter/bloom_filter.c
// Function: blooms_delete
int blooms_delete (char *key)
{
    unsigned int hv = dictGenHashFunction((unsigned char *)key, strlen(key)) & hashmask(blooms->power);

    bloom_t *bloom = blooms->hashtable[hv];

    if(!bloom) {
        DEBUG("Error, %s not exist\r\n", key);
        return 1;
    }
    if (!strcmp(bloom->key, key)) {
        blooms->hashtable[hv] = bloom->hash_next;
        bloom_delete(bloom);
        DEBUG("%s deleted\r\n", key);
        return 0;
    } 

    bloom_t *next = bloom->hash_next;
    while (next) {

        if (!strcmp(next->key, key)) {
            bloom->hash_next = next->hash_next;
            bloom_delete(next);
            DEBUG("%s deleted\r\n", key);
            return 0;
        }

        bloom = bloom->hash_next;
        next = bloom->hash_next;
    }

    DEBUG("Error, %s not exist\r\n", key);
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0x2110
movl $0x1505, %edx           # imm = 0x1505
testl %eax, %eax
je 0x2f6b
xorl %ecx, %ecx
movl %edx, %esi
shll $0x5, %esi
addl %edx, %esi
movzbl (%rbx,%rcx), %edx
addl %esi, %edx
incq %rcx
cmpl %ecx, %eax
jne 0x2f57
movq 0x62c6(%rip), %r15      # 0x9238
movb 0x24(%r15), %cl
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
shll %cl, %r12d
notl %r12d
andl %edx, %r12d
movq 0x40(%r15,%r12,8), %r14
movl $0x1, %ebp
testq %r14, %r14
je 0x2fdf
leaq 0x20(%r14), %rdi
movq %rbx, %rsi
callq 0x2200
testl %eax, %eax
je 0x2fc6
movq %r14, %r15
movq 0x10(%r14), %r14
testq %r14, %r14
je 0x2fdf
leaq 0x20(%r14), %rdi
movq %rbx, %rsi
callq 0x2200
testl %eax, %eax
jne 0x2fa4
addq $0x10, %r15
jmp 0x2fce
leaq (%r15,%r12,8), %r15
addq $0x40, %r15
movq 0x10(%r14), %rax
movq %rax, (%r15)
movq %r14, %rdi
callq 0x2fea
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/yancanchen[P]mc-bloom-filter/bloom_filter.c
// Function: bloom_delete
static void bloom_delete (bloom_t *bloom)
{
    list_del(&bloom->list);
    blooms->bytes -= bloom->bytes;
    free(bloom);
    blooms->count--;
}

// Assembly:
pushq %rax
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rcx)
movq $0x100100, (%rdi)       # imm = 0x100100
movq $0x200200, 0x8(%rdi)    # imm = 0x200200
movq 0x18(%rdi), %rax
movq 0x6225(%rip), %rcx      # 0x9238
subq %rax, 0x10(%rcx)
callq 0x2030
movq 0x6215(%rip), %rax      # 0x9238
decl 0x20(%rax)
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/yancanchen[P]mc-bloom-filter/bloom_filter.c
// Function: blooms_init
int blooms_init (size_t max)
{
    size_t blooms_size = hashsize(HASH_POWER) * sizeof(blooms_t *) + sizeof(blooms_t);
    blooms = (blooms_t *)malloc(blooms_size);
    if(!blooms) {
        DEBUG("Error, blooms malloc failed\r\n");
        return 1;
    }
    memset(blooms, 0, blooms_size);  //fail?
    
    blooms->power = HASH_POWER;
    blooms->count = 0;
    blooms->bytes = 0;
    blooms->max_bytes = max;
    INIT_LIST_HEAD(&blooms->list);
    
    blooms->get_count = blooms->set_count = blooms->get_miss_count = 0;
    
    return 0;

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x800040, %edi         # imm = 0x800040
callq 0x2280
movq %rax, 0x61f7(%rip)      # 0x9238
testq %rax, %rax
je 0x3086
movq %rax, %r14
xorl %r15d, %r15d
movl $0x800040, %edx         # imm = 0x800040
movq %rax, %rdi
xorl %esi, %esi
callq 0x21a0
movabsq $0x1400000000, %rax     # imm = 0x1400000000
movq %rax, 0x20(%r14)
movq %r15, 0x10(%r14)
movq %rbx, 0x18(%r14)
movq %r14, (%r14)
movq %r14, 0x8(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
movq %r15, 0x38(%r14)
jmp 0x308c
movl $0x1, %r15d
movl %r15d, %eax
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/yancanchen[P]mc-bloom-filter/daemon.c
// Function: daemon
int
daemon(nochdir, noclose)
	int nochdir, noclose;
{
	int fd;

	switch (fork()) {
	case -1:
		return (-1);
	case 0:
		break;
	default:
		_exit(0);
	}

	if (setsid() == -1)
		return (-1);

	if (!nochdir) {
		if (chdir("/")) {
                         ;;
                }
        }

	if (!noclose && (fd = open("/dev/null", O_RDWR, 0)) != -1) {
		(void)dup2(fd, STDIN_FILENO);
		(void)dup2(fd, STDOUT_FILENO);
		(void)dup2(fd, STDERR_FILENO);
		if (fd > STDERR_FILENO)
			(void)close(fd);
	}
	return (0);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movl %edi, %r14d
callq 0x2410
movl %eax, %ebx
cmpl $-0x1, %eax
je 0x3126
testl %ebx, %ebx
jne 0x312d
callq 0x21d0
cmpl $-0x1, %eax
je 0x3121
testl %r14d, %r14d
jne 0x30cc
leaq 0x316a(%rip), %rdi      # 0x6231
callq 0x2120
xorl %ebx, %ebx
testl %ebp, %ebp
jne 0x3126
leaq 0x315a(%rip), %rdi      # 0x6233
xorl %ebx, %ebx
movl $0x2, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2330
cmpl $-0x1, %eax
je 0x3126
movl %eax, %ebp
xorl %ebx, %ebx
movl %eax, %edi
xorl %esi, %esi
callq 0x2150
movl %ebp, %edi
movl $0x1, %esi
callq 0x2150
movl %ebp, %edi
movl $0x2, %esi
callq 0x2150
cmpl $0x3, %ebp
jl 0x3126
movl %ebp, %edi
callq 0x21c0
jmp 0x3126
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
xorl %edi, %edi
callq 0x2070
// File: /workspace/github_c_makefile_star2_O1/yancanchen[P]mc-bloom-filter/mc_bloom_filter.c
// Function: stats_init
void stats_init(void) {
    stats.curr_conns = stats.total_conns = stats.conn_structs = 0;
    stats.bytes_read = stats.bytes_written =  0;
    stats.add_count = stats.set_count = stats.get_count = 0;
    stats.started = time(0);
}

// Assembly:
pushq %rax
movl $0x0, 0x6111(%rip)      # 0x9250
xorl %eax, %eax
movq %rax, 0x6100(%rip)      # 0x9248
xorps %xmm0, %xmm0
movups %xmm0, 0x6106(%rip)     # 0x9258
movq %rax, 0x610f(%rip)      # 0x9268
movups %xmm0, 0x6118(%rip)     # 0x9278
xorl %edi, %edi
callq 0x2270
movq %rax, 0x6102(%rip)      # 0x9270
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/yancanchen[P]mc-bloom-filter/mc_bloom_filter.c
// Function: set_cork
void set_cork (conn *c, int val) {
    if (c->is_corked == val) return;
    c->is_corked = val;
#ifdef TCP_NOPUSH
    setsockopt(c->sfd, IPPROTO_TCP, TCP_NOPUSH, &val, sizeof(val));
#endif
}

// Assembly:
pushq %rax
movl %esi, 0x4(%rsp)
movsbl 0xcc(%rdi), %eax
cmpl %esi, %eax
je 0x31fc
movb %sil, 0xcc(%rdi)
movl (%rdi), %edi
leaq 0x4(%rsp), %rcx
movl $0x6, %esi
movl $0x3, %edx
movl $0x4, %r8d
callq 0x20b0
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/yancanchen[P]mc-bloom-filter/mc_bloom_filter.c
// Function: conn_init
void conn_init(void) {
    freetotal = 200;
    freecurr = 0;
    freeconns = (conn **)malloc(sizeof (conn *)*freetotal);
    return;
}

// Assembly:
pushq %rax
movl $0xc8, 0x60bf(%rip)     # 0x92c8
movl $0x0, 0x60b9(%rip)      # 0x92cc
movl $0x640, %edi            # imm = 0x640
callq 0x2280
movq %rax, 0x60ac(%rip)      # 0x92d0
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/yancanchen[P]mc-bloom-filter/mc_bloom_filter.c
// Function: conn_close
void conn_close(conn *c) {
    /* delete the event, the socket and the conn */
    event_del(&c->event);

    if (my_srv.verbose > 1)
        fprintf(stderr, "<%d connection closed.\n", c->sfd);

    close(c->sfd);
    /* if we have enough space in the free connections array, put the structure there */
    if (freecurr < freetotal) {
        freeconns[freecurr++] = c;
    } else {
        /* try to enlarge free connections array */
        conn **new_freeconns = realloc(freeconns, sizeof(conn *)*freetotal*2);
        if (new_freeconns) {
            freetotal *= 2;
            freeconns = new_freeconns;
            freeconns[freecurr++] = c;
        } else {
            free(c->rbuf);
            free(c->wbuf);
            free(c);
        }
    }

    stats.curr_conns--;

    return;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $0x8, %rdi
callq 0x2180
cmpl $0x2, 0x5e37(%rip)      # 0x929c
jge 0x34f3
movl (%rbx), %edi
callq 0x21c0
movslq 0x5e53(%rip), %rax      # 0x92cc
movslq 0x5e48(%rip), %rsi      # 0x92c8
movq 0x5e49(%rip), %rdi      # 0x92d0
cmpl %esi, %eax
jge 0x349a
leal 0x1(%rax), %ecx
movl %ecx, 0x5e38(%rip)      # 0x92cc
movq %rbx, (%rdi,%rax,8)
jmp 0x34eb
shlq $0x4, %rsi
callq 0x22c0
testq %rax, %rax
je 0x34cb
shll 0x5e1a(%rip)            # 0x92c8
movq %rax, 0x5e1b(%rip)      # 0x92d0
movslq 0x5e10(%rip), %rcx      # 0x92cc
leal 0x1(%rcx), %edx
movl %edx, 0x5e07(%rip)      # 0x92cc
movq %rbx, (%rax,%rcx,8)
jmp 0x34eb
movq 0x90(%rbx), %rdi
callq 0x2030
movq 0xb0(%rbx), %rdi
callq 0x2030
movq %rbx, %rdi
callq 0x2030
decl 0x5d57(%rip)            # 0x9248
popq %rbx
retq
movq %rbx, %rdi
callq 0x246c
jmp 0x346b
// File: /workspace/github_c_makefile_star2_O1/yancanchen[P]mc-bloom-filter/mc_bloom_filter.c
// Function: out_string
void out_string(conn *c, char *str) {
    int len;

    if (my_srv.verbose > 1)
        fprintf(stderr, ">%d %s\n", c->sfd, str);

    len = strlen(str);
    if (len + 2 > c->wsize) {
        /* ought to be always enough. just fail for simplicity */
        str = "SERVER_ERROR output line too long";
        len = strlen(str);
    }

    strcpy(c->wbuf, str);
    strcat(c->wbuf, "\r\n");
    c->wbytes = len + 2;
    c->wcurr = c->wbuf;

    c->state = conn_write;
    c->write_and_go = conn_read;
    return;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x2, 0x5d8b(%rip)      # 0x929c
jge 0x3589
movq %r14, %rdi
callq 0x2110
addl $0x2, %eax
cmpl 0xc0(%rbx), %eax
leaq 0x2df3(%rip), %rsi      # 0x631e
cmovleq %r14, %rsi
movq 0xb0(%rbx), %rdi
movl $0x23, %ebp
cmovlel %eax, %ebp
callq 0x2080
movq 0xb0(%rbx), %r14
movq %r14, %rdi
callq 0x2110
movb $0x0, 0x2(%r14,%rax)
movw $0xa0d, (%r14,%rax)     # imm = 0xA0D
movl %ebp, 0xc4(%rbx)
movq 0xb0(%rbx), %rax
movq %rax, 0xb8(%rbx)
movl $0x2, 0x4(%rbx)
movl $0x1, 0xc8(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movq 0x5a68(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
movl (%rbx), %edx
leaq 0x2d7a(%rip), %rsi      # 0x6316
movq %r14, %rcx
xorl %eax, %eax
callq 0x2230
jmp 0x3513
// File: /workspace/github_c_makefile_star2_O1/yancanchen[P]mc-bloom-filter/mc_bloom_filter.c
// Function: process_setmem
void process_setmem(conn *c,char *command){
    unsigned long msize;
    if(1 != sscanf(command + 6,"%lu",&msize) || msize > ((size_t)(-1)) >> 20){
        out_string(c, "CLIENT_ERROR bad command line like this,'setmem 1000' means max limit 1000m");    
        return ;
    }
    blooms->max_bytes = msize << 20;
    my_srv.maxbytes = blooms->max_bytes;
    out_string(c,"STORED");
    return;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x6(%rsi), %rdi
leaq 0x2d83(%rip), %rsi      # 0x6340
movq %rsp, %r14
movq %r14, %rdx
xorl %eax, %eax
callq 0x2290
cmpl $0x1, %eax
setne %cl
movq (%r14), %rax
movq %rax, %rdx
shrq $0x2c, %rdx
setne %dl
orb %cl, %dl
je 0x35ea
leaq 0x2d5c(%rip), %rsi      # 0x6344
jmp 0x360a
shlq $0x14, %rax
leaq 0x5c43(%rip), %rcx      # 0x9238
movq (%rcx), %rcx
movq %rax, 0x18(%rcx)
movq %rax, 0x5ca5(%rip)      # 0x92a8
leaq 0x3173(%rip), %rsi      # 0x677d
movq %rbx, %rdi
callq 0x3500
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/yancanchen[P]mc-bloom-filter/mc_bloom_filter.c
// Function: process_try
void process_try(conn *c,char *command){
    unsigned long long n,m;
    int k;
    double tmp_e;
    
    char tmp[1024];
    char *pos = tmp;
    double e;
       if (2 != sscanf(command + 3,"%llu|%lf",&n,&e)) {
        out_string(c, "CLIENT_ERROR bad command line format,command like this 'try 100000|0.001'");    
        return;
    }
    size_t bytes = calculate(n,e,&m,&k,&tmp_e);
    if(bytes > 0 ){
        pos += sprintf(pos, "need_memory %lu(Bytes) ",(unsigned long)bytes);
        float bytes_m = (float)bytes/(1024*1024);
        if(bytes_m >= 1){
            pos += sprintf(pos, "%.3f(M) ",bytes_m);
        }
        float bytes_g = bytes_m/1024;
        
        if(bytes_g >= 1){
            pos += sprintf(pos, "%.3f(G) ",bytes_g);
        }
        pos += sprintf(pos, "\r\nuse_function_num %d \r\n",k);
        pos += sprintf(pos, "false_positive_rate  %lf\r\n",tmp_e);
        pos += sprintf(pos, "END");
        out_string(c,tmp);
    }else{
        out_string(c, "CALCULATE ERROR");
    }
    return;
    
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x438, %rsp            # imm = 0x438
movq %rdi, %rbx
leaq 0x3(%rsi), %rdi
leaq 0x2d5a(%rip), %rsi      # 0x6390
leaq 0x20(%rsp), %rdx
leaq 0x10(%rsp), %rcx
xorl %eax, %eax
callq 0x2290
cmpl $0x2, %eax
jne 0x369d
movq 0x20(%rsp), %rdi
movsd 0x10(%rsp), %xmm0
leaq 0x28(%rsp), %rsi
leaq 0xc(%rsp), %rdx
leaq 0x18(%rsp), %rcx
callq 0x28d4
testq %rax, %rax
je 0x36a9
movq %rax, %r15
leaq 0x2d69(%rip), %rsi      # 0x63e3
leaq 0x30(%rsp), %r14
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x23a0
cltq
testq %r15, %r15
js 0x36b5
xorps %xmm0, %xmm0
cvtsi2ss %r15, %xmm0
jmp 0x36ce
leaq 0x2cf5(%rip), %r14      # 0x6399
jmp 0x3779
leaq 0x2d91(%rip), %r14      # 0x6441
jmp 0x3779
movq %r15, %rcx
shrq %rcx
andl $0x1, %r15d
orq %rcx, %r15
xorps %xmm0, %xmm0
cvtsi2ss %r15, %xmm0
addss %xmm0, %xmm0
mulss 0x2b7a(%rip), %xmm0     # 0x6250
leaq (%rsp,%rax), %r15
addq $0x30, %r15
ucomiss 0x2b6f(%rip), %xmm0     # 0x6254
jb 0x3712
movss %xmm0, 0x8(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0x8(%rsp), %xmm0
leaq 0x2cfe(%rip), %rsi      # 0x63fb
movq %r15, %rdi
movb $0x1, %al
callq 0x23a0
movss 0x8(%rsp), %xmm0
cltq
addq %rax, %r15
mulss 0x2b3e(%rip), %xmm0     # 0x6258
ucomiss 0x2b33(%rip), %xmm0     # 0x6254
jb 0x373d
cvtss2sd %xmm0, %xmm0
leaq 0x2cd6(%rip), %rsi      # 0x6404
movq %r15, %rdi
movb $0x1, %al
callq 0x23a0
cltq
addq %rax, %r15
movl 0xc(%rsp), %edx
leaq 0x2cc5(%rip), %rsi      # 0x640d
movq %r15, %rdi
xorl %eax, %eax
callq 0x23a0
movslq %eax, %r12
addq %r15, %r12
movsd 0x18(%rsp), %xmm0
leaq 0x2cc1(%rip), %rsi      # 0x6426
movq %r12, %rdi
movb $0x1, %al
callq 0x23a0
cltq
movl $0x444e45, (%rax,%r12)  # imm = 0x444E45
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3500
addq $0x438, %rsp            # imm = 0x438
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/yancanchen[P]mc-bloom-filter/mc_bloom_filter.c
// Function: complete_nread
void complete_nread(conn *c) {
    char *msg;
    int len;

    len = c->rlbytes - 2;
    msg = c->rcurr;

    if (strncmp(msg + len, "\r\n", 2) != 0) {
        out_string(c, "CLIENT_ERROR bad data chunk");
    } else {
        msg[len] = 0;
        if (c->item_comm == NREAD_SET){
            //set a bloom filter with key
            if (len && (len <= MAX_SUBKEY_LEN) && !strchr(msg,' ') && blooms_set(c->key,msg) == 0 ){
                out_string(c, "STORED");
            } else {
                out_string(c, "NOT_STORED");
            }
        }else if(c->item_comm == NREAD_ADD){
            unsigned long long n;
            double e;
            if ((2 != sscanf(msg,"%llu|%lf",&n,&e)) || !n || e<=0 || e>=1) {
                out_string(c, "NOT_STORED");
                return;
            }

            if(!strchr(c->key,'|') && blooms_add(c->key,n,e) == 0){    
                out_string(c, "STORED");
            } else {
                out_string(c, "NOT_STORED");
            }

        }else{
            out_string(c, "CLIENT_ERROR unsuport type");
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movslq 0xa8(%rdi), %r12
movq 0x98(%rdi), %r14
leaq -0x2(%r14,%r12), %r15
leaq 0x26bd(%rip), %rsi      # 0x6423
movl $0x2, %edx
movq %r15, %rdi
callq 0x2060
testl %eax, %eax
je 0x3d91
leaq 0x29df(%rip), %rsi      # 0x675d
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3500
movb $0x0, (%r15)
movzbl 0xcd(%rbx), %eax
cmpl $0x1, %eax
je 0x3df6
cmpl $0x2, %eax
jne 0x3e91
movq %r12, %rax
addq $-0x2, %rax
testl %eax, %eax
sete %al
cmpl $0xdc, %r12d
setge %cl
orb %al, %cl
jne 0x3ded
movq %r14, %rdi
movl $0x20, %esi
callq 0x2160
testq %rax, %rax
jne 0x3ded
leaq 0xd0(%rbx), %rdi
movq %r14, %rsi
callq 0x2d0a
testl %eax, %eax
je 0x3e9d
leaq 0x2985(%rip), %rsi      # 0x6779
jmp 0x3d7e
leaq 0x2593(%rip), %rsi      # 0x6390
leaq 0x10(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %r14, %rdi
xorl %eax, %eax
callq 0x2290
leaq 0x2961(%rip), %r14      # 0x6779
cmpl $0x2, %eax
jne 0x3e7a
movq 0x10(%rsp), %r15
testq %r15, %r15
je 0x3e7a
movsd 0x8(%rsp), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jae 0x3e7a
ucomisd 0x21c9(%rip), %xmm1     # 0x6008
jae 0x3e7a
movsd %xmm1, (%rsp)
leaq 0xd0(%rbx), %r12
movq %r12, %rdi
movl $0x7c, %esi
callq 0x2160
testq %rax, %rax
jne 0x3e7a
movq %r12, %rdi
movq %r15, %rsi
movsd (%rsp), %xmm0
callq 0x2c26
testl %eax, %eax
jne 0x3e7a
leaq 0x2903(%rip), %r14      # 0x677d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3500
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x28ec(%rip), %rsi      # 0x6784
jmp 0x3d7e
leaq 0x28d9(%rip), %rsi      # 0x677d
jmp 0x3d7e
// File: /workspace/github_c_makefile_star2_O1/yancanchen[P]mc-bloom-filter/mc_bloom_filter.c
// Function: try_read_command
int try_read_command(conn *c) {
    char *el, *cont;

    if (!c->rbytes)
        return 0;
    el = memchr(c->rcurr, '\n', c->rbytes);
    if (!el)
        return 0;
    cont = el + 1;
    if (el - c->rcurr > 1 && *(el - 1) == '\r') {
        el--;
    }
    *el = '\0';

    process_command(c, c->rcurr);

    c->rbytes -= (cont - c->rcurr);
    c->rcurr = cont;

    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movslq 0xa4(%rdi), %rdx
xorl %ebp, %ebp
testq %rdx, %rdx
je 0x4360
movq %rdi, %rbx
movq 0x98(%rdi), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x21e0
testq %rax, %rax
je 0x4360
leaq 0x1(%rax), %r15
movq %rax, %rcx
subq %r14, %rcx
cmpq $0x2, %rcx
jl 0x4333
leaq -0x1(%rax), %rcx
cmpb $0xd, -0x1(%rax)
cmoveq %rcx, %rax
movb $0x0, (%rax)
movq 0x98(%rbx), %rsi
movq %rbx, %rdi
callq 0x3ea9
movl 0x98(%rbx), %eax
subl %r15d, %eax
addl %eax, 0xa4(%rbx)
movq %r15, 0x98(%rbx)
movl $0x1, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/yancanchen[P]mc-bloom-filter/mc_bloom_filter.c
// Function: try_read_network
int try_read_network(conn *c) {
    int gotdata = 0;
    int res;

    if (c->rcurr != c->rbuf) {
        if (c->rbytes != 0) /* otherwise there's nothing to copy */
            memmove(c->rbuf, c->rcurr, c->rbytes);
        c->rcurr = c->rbuf;
    }

    while (1) {
        if (c->rbytes >= c->rsize) {
            char *new_rbuf = realloc(c->rbuf, c->rsize*2);
            if (!new_rbuf) {
                if (my_srv.verbose > 0)
                    fprintf(stderr, "Couldn't realloc input buffer\n");
                c->rbytes = 0; /* ignore what we read */
                out_string(c, "SERVER_ERROR out of memory");
                c->write_and_go = conn_closing;
                return 1;
            }
            c->rcurr  = c->rbuf = new_rbuf;
            c->rsize *= 2;
        }
        res = read(c->sfd, c->rbuf + c->rbytes, c->rsize - c->rbytes);
        if (res > 0) {
            stats.bytes_read += res;
            gotdata = 1;
            c->rbytes += res;
            continue;
        }
        if (res == 0) {
            /* connection closed */
            c->state = conn_closing;
            return 1;
        }
        if (res == -1) {
            if (errno == EAGAIN || errno == EWOULDBLOCK) break;
            else return 0;
        }
    }
    return gotdata;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x90(%rdi), %rdi
movq 0x98(%rbx), %rsi
cmpq %rdi, %rsi
je 0x43a9
movslq 0xa4(%rbx), %rdx
testq %rdx, %rdx
je 0x439b
callq 0x22f0
movq 0x90(%rbx), %rax
movq %rax, 0x98(%rbx)
xorl %ebp, %ebp
leaq 0x2236(%rip), %r14      # 0x65e8
movslq 0xa0(%rbx), %rsi
cmpl %esi, 0xa4(%rbx)
jl 0x441b
movq 0x90(%rbx), %rdi
addq %rsi, %rsi
callq 0x22c0
movq %rax, %r15
testq %rax, %rax
je 0x43ee
movq %r15, 0x90(%rbx)
movq %r15, 0x98(%rbx)
shll 0xa0(%rbx)
jmp 0x4416
cmpl $0x0, 0x4ea7(%rip)      # 0x929c
jg 0x446f
movl $0x0, 0xa4(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3500
movl $0x5, 0xc8(%rbx)
testq %r15, %r15
je 0x448f
movl (%rbx), %edi
movslq 0xa4(%rbx), %rax
movq 0x90(%rbx), %rsi
addq %rax, %rsi
movslq 0xa0(%rbx), %rdx
subq %rax, %rdx
callq 0x21f0
testl %eax, %eax
jg 0x4450
cmpl $-0x1, %eax
je 0x4476
testl %eax, %eax
jne 0x43b2
jmp 0x4488
movl %eax, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
addq %rcx, 0x4e19(%rip)      # 0x9278
addl %eax, 0xa4(%rbx)
movl $0x1, %ebp
jmp 0x43b2
callq 0x24b9
jmp 0x43f7
callq 0x2040
movq %rax, %rcx
xorl %eax, %eax
cmpl $0xb, (%rcx)
cmovel %ebp, %eax
jmp 0x4494
movl $0x5, 0x4(%rbx)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/yancanchen[P]mc-bloom-filter/mc_bloom_filter.c
// Function: update_event
int update_event(conn *c, int new_flags) {
    if (c->ev_flags == new_flags)
        return 1;
    if (event_del(&c->event) == -1) return 0;
    event_set(&c->event, c->sfd, new_flags, event_handler, (void *)c);
    c->ev_flags = new_flags;
    if (event_add(&c->event, 0) == -1) return 0;
    return 1;
}

// Assembly:
movswl 0x88(%rdi), %ecx
movl $0x1, %eax
cmpl %esi, %ecx
je 0x4505
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
movq %r14, %rdi
callq 0x2180
cmpl $-0x1, %eax
je 0x44ff
movl (%rbx), %esi
movswl %bp, %ebp
leaq -0x10b5(%rip), %rcx     # 0x3420
movq %r14, %rdi
movl %ebp, %edx
movq %rbx, %r8
callq 0x2310
movw %bp, 0x88(%rbx)
movq %r14, %rdi
xorl %esi, %esi
callq 0x2210
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
setne %al
jmp 0x4501
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/yancanchen[P]mc-bloom-filter/mc_bloom_filter.c
// Function: new_socket
int new_socket(void) {
    int sfd;
    int flags;

    if ((sfd = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
        perror("socket()");
        return -1;
    }

    if ((flags = fcntl(sfd, F_GETFL, 0)) < 0 ||
            fcntl(sfd, F_SETFL, flags | O_NONBLOCK) < 0) {
        perror("setting O_NONBLOCK");
        close(sfd);
        return -1;
    }
    return sfd;
}

// Assembly:
pushq %rbx
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x2430
cmpl $-0x1, %eax
je 0x48eb
movl %eax, %ebx
movl %eax, %edi
movl $0x3, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x20c0
testl %eax, %eax
js 0x48d6
orl $0x800, %eax            # imm = 0x800
movl %ebx, %edi
movl $0x4, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x20c0
testl %eax, %eax
js 0x48d6
movl %ebx, %eax
popq %rbx
retq
leaq 0x1f6f(%rip), %rdi      # 0x684c
callq 0x2360
movl %ebx, %edi
callq 0x21c0
jmp 0x48f7
leaq 0x2026(%rip), %rdi      # 0x6918
callq 0x2360
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x48d2
// File: /workspace/github_c_makefile_star2_O1/yancanchen[P]mc-bloom-filter/mc_bloom_filter.c
// Function: server_socket
int server_socket(int port) {
    int sfd;
    struct linger ling = {0, 0};
    struct sockaddr_in addr;
    int flags =1;

    if ((sfd = new_socket()) == -1) {
        return -1;
    }

    setsockopt(sfd, SOL_SOCKET, SO_REUSEADDR, &flags, sizeof(flags));
    setsockopt(sfd, SOL_SOCKET, SO_KEEPALIVE, &flags, sizeof(flags));
    setsockopt(sfd, SOL_SOCKET, SO_LINGER, &ling, sizeof(ling));
#if !defined(TCP_NOPUSH)
    setsockopt(sfd, IPPROTO_TCP, TCP_NODELAY, &flags, sizeof(flags));
#endif

    /* 
     * the memset call clears nonstandard fields in some impementations
     * that otherwise mess things up.
     */
    memset(&addr, 0, sizeof(addr));

    addr.sin_family = AF_INET;
    addr.sin_port = htons(port);
    addr.sin_addr = my_srv.interface;
    if (bind(sfd, (struct sockaddr *) &addr, sizeof(addr)) == -1) {
        perror("bind()");
        close(sfd);
        return -1;
    }
    if (listen(sfd, 1024) == -1) {
        perror("listen()");
        close(sfd);
        return -1;
    }
    return sfd;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %edi, %r14d
movq $0x0, 0x8(%rsp)
movl $0x1, 0x4(%rsp)
callq 0x488c
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $-0x1, %eax
je 0x49cd
movl %eax, %ebp
leaq 0x4(%rsp), %r15
movl %eax, %edi
movl $0x1, %esi
movl $0x2, %edx
movq %r15, %rcx
movl $0x4, %r8d
callq 0x20b0
movl %ebp, %edi
movl $0x1, %esi
movl $0x9, %edx
movq %r15, %rcx
movl $0x4, %r8d
callq 0x20b0
leaq 0x8(%rsp), %rcx
movl %ebp, %edi
movl $0x1, %esi
movl $0xd, %edx
movl $0x8, %r8d
callq 0x20b0
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rsi
movaps %xmm0, (%rsi)
rolw $0x8, %r14w
movw $0x2, (%rsi)
movw %r14w, 0x2(%rsi)
movl 0x491a(%rip), %eax      # 0x92c0
movl %eax, 0x4(%rsi)
movl %ebp, %edi
movl $0x10, %edx
callq 0x22e0
cmpl $-0x1, %eax
je 0x49da
movl %ebp, %edi
movl $0x400, %esi            # imm = 0x400
callq 0x22a0
cmpl $-0x1, %eax
je 0x49e3
movl %ebp, %ebx
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1f40(%rip), %rdi      # 0x6921
jmp 0x49ea
leaq 0x1f3e(%rip), %rdi      # 0x6928
callq 0x2360
movl %ebp, %edi
callq 0x21c0
jmp 0x49cd
// File: /workspace/github_c_makefile_star2_O1/yancanchen[P]mc-bloom-filter/mc_bloom_filter.c
// Function: pre_gdb
void pre_gdb () {
    int i = 0;
    if(l_socket) close(l_socket);
    for (i=3; i<=500; i++) close(i); /* so lame */
    kill(getpid(), SIGABRT);
}

// Assembly:
pushq %rbx
movl 0x48d9(%rip), %edi      # 0x92d8
testl %edi, %edi
je 0x4a08
callq 0x21c0
movl $0x3, %ebx
movl %ebx, %edi
callq 0x21c0
incl %ebx
cmpl $0x1f5, %ebx            # imm = 0x1F5
jne 0x4a0d
callq 0x20e0
movl %eax, %edi
movl $0x6, %esi
popq %rbx
jmp 0x2260
// File: /workspace/github_c_makefile_star2_O1/yancanchen[P]mc-bloom-filter/mc_bloom_filter.c
// Function: save_pid
void save_pid(pid_t pid,char *pid_file) {
    FILE *fp;
    if (!pid_file)
        return;

    if (!(fp = fopen(pid_file,"w"))) {
        fprintf(stderr,"Could not open the pid file %s for writing\n",pid_file);
        return;
    }

    fprintf(fp,"%ld\n",(long) pid);
    if (fclose(fp) == -1) {
        fprintf(stderr,"Could not close the pid file %s.\n",pid_file);
        return;
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
testq %rsi, %rsi
je 0x4a76
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x1eec(%rip), %rsi      # 0x6931
movq %rbx, %rdi
callq 0x2340
testq %rax, %rax
je 0x4a7b
movq %rax, %r14
movslq %ebp, %rdx
leaq 0x1f00(%rip), %rsi      # 0x695f
movq %rax, %rdi
xorl %eax, %eax
callq 0x2230
movq %r14, %rdi
callq 0x2100
cmpl $-0x1, %eax
je 0x4a84
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1eb1(%rip), %rsi      # 0x6933
jmp 0x4a8b
leaq 0x1ed9(%rip), %rsi      # 0x6964
movq 0x4566(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
movq %rbx, %rdx
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x2230
// File: /workspace/github_c_makefile_star2_O1/yancanchen[P]mc-bloom-filter/mc_bloom_filter.c
// Function: remove_pidfile
void remove_pidfile(char *pid_file) {
    if (!pid_file)
        return;

    if (unlink(pid_file)) {
        fprintf(stderr,"Could not remove the pid file %s.\n",pid_file);
    }

}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x4ab5
movq %rdi, %rbx
callq 0x2050
testl %eax, %eax
jne 0x4ab7
popq %rbx
retq
movq 0x453a(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
leaq 0x1ebe(%rip), %rsi      # 0x6986
movq %rbx, %rdx
xorl %eax, %eax
popq %rbx
jmp 0x2230
// File: /workspace/github_c_makefile_star2_O1/yancanchen[P]mc-bloom-filter/mc_bloom_filter.c
// Function: usage
void usage(){
    printf("PACKAGE %s VERSION %s \n",PACKAGE_NAME,PACKAGE_VERSION);
    printf("-p <num>      port number to listen on,default is 12345\n");
    printf("-l <ip_addr>  interface to listen on, default is INDRR_ANY\n");
    printf("-d            run as a daemon\n");
    //printf("-r            maximize core file limit\n");
    printf("-u <username> assume identity of <username> (only when run as root)\n");
    //printf("-m <num>      max memory to use for items in megabytes, default is 64 MB\n");
    printf("-c <num>      max simultaneous connections, default is 1024\n");
    printf("-v            verbose (print errors/warnings while in event loop)\n");
    printf("-vv           very verbose (also print client commands/reponses)\n");
    printf("-h            print this help and exit\n");
    printf("-i            print memcached and libevent license\n");
    printf("-P <file>     save PID in <file>, only used with -d option\n");
    return;
}

// Assembly:
pushq %rax
leaq 0x1ece(%rip), %rdi      # 0x69a9
leaq 0x1edf(%rip), %rsi      # 0x69c1
leaq 0x1ee8(%rip), %rdx      # 0x69d1
xorl %eax, %eax
callq 0x2170
leaq 0x211c(%rip), %rdi      # 0x6c13
callq 0x2090
leaq 0x2148(%rip), %rdi      # 0x6c4b
callq 0x2090
leaq 0x2177(%rip), %rdi      # 0x6c86
callq 0x2090
leaq 0x2189(%rip), %rdi      # 0x6ca4
callq 0x2090
leaq 0x21c1(%rip), %rdi      # 0x6ce8
callq 0x2090
leaq 0x21f1(%rip), %rdi      # 0x6d24
callq 0x2090
leaq 0x2227(%rip), %rdi      # 0x6d66
callq 0x2090
leaq 0x225c(%rip), %rdi      # 0x6da7
callq 0x2090
leaq 0x2277(%rip), %rdi      # 0x6dce
callq 0x2090
leaq 0x229e(%rip), %rdi      # 0x6e01
popq %rax
jmp 0x2090
// File: /workspace/github_c_makefile_star2_O1/snej[P]zdelta/zdu.c
// Function: main_single
int main_single(int argc, char *argv[]){
  FILE *fp_ref;

  zd_mem_buffer ref_buf;
  zd_mem_buffer delta;
  Bytef *tar_buf = NULL;
  uLong t_size = 0;

  /* open and check the input files */
  if( !(fp_ref = fopen(argv[1],"rb")) )
  {
    perror(argv[1]);
    exit(0);
  }

  if(argc>2 && (!freopen(argv[2],"rb",stdin)))
  {
    perror(argv[2]); 
    exit(0);
  }

  /* copy input data to memory */
  if(dread_file(fp_ref,&ref_buf) < 0) {perror(argv[1]); exit(0);}
  if(dread_file(stdin,&delta) < 0) {perror(argv[2]); exit(0);}

  /* decompress the data */
  if(zd_uncompress1((const Bytef*)ref_buf.buffer, ref_buf.pos - ref_buf.buffer,
		    &tar_buf, &t_size,
		    (const Bytef*) delta.buffer, 
		    delta.pos - delta.buffer) == ZD_OK){
    
    /* successfull compression write the delta to a file */
    if(argc>3 && (!freopen(argv[3],"wb",stdout))){
      perror(argv[3]);
      exit(0);
    }
    if(t_size !=  fwrite(tar_buf, sizeof(char),t_size ,stdout))
      perror("ouput");
  }
  
  /* release memory */
  free(tar_buf);
  zd_free(&delta);
  zd_free(&ref_buf);
  
  /* close files */
  fclose(fp_ref);

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movl %edi, %ebp
xorl %eax, %eax
movq %rax, 0x8(%rsp)
movq %rax, 0x10(%rsp)
leaq 0x8(%rsi), %r15
movq 0x8(%rsi), %rdi
leaq 0x7cfe(%rip), %rsi      # 0x9004
callq 0x1120
testq %rax, %rax
je 0x142c
movq %rax, %rbx
cmpl $0x3, %ebp
jl 0x133f
movq 0x10(%r14), %rdi
movq 0xcca9(%rip), %rax      # 0xdfd0
movq (%rax), %rdx
leaq 0x7cd3(%rip), %rsi      # 0x9004
callq 0x10a0
testq %rax, %rax
je 0x1444
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x159d
testl %eax, %eax
js 0x1434
movq 0xcc75(%rip), %rax      # 0xdfd0
movq (%rax), %rdi
leaq 0x18(%rsp), %rsi
callq 0x159d
testl %eax, %eax
js 0x143c
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
movq 0x18(%rsp), %r8
movq 0x20(%rsp), %r9
subq %r8, %r9
leaq 0x8(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq 0x19a6
testl %eax, %eax
jne 0x13eb
cmpl $0x4, %ebp
jl 0x13c5
movq 0x18(%r14), %rdi
movq 0xcc1b(%rip), %rax      # 0xdfc8
movq (%rax), %rdx
leaq 0x7c50(%rip), %rsi      # 0x9007
callq 0x10a0
testq %rax, %rax
je 0x1450
movq 0x10(%rsp), %r14
movq 0x8(%rsp), %rdi
movq 0xcbf2(%rip), %rax      # 0xdfc8
movq (%rax), %rcx
movl $0x1, %esi
movq %r14, %rdx
callq 0x1150
cmpq %rax, %r14
jne 0x141e
movq 0x8(%rsp), %rdi
callq 0x1030
leaq 0x18(%rsp), %rdi
callq 0x1526
leaq 0x30(%rsp), %rdi
callq 0x1526
movq %rbx, %rdi
callq 0x1060
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7be5(%rip), %rdi      # 0x900a
callq 0x1130
jmp 0x13eb
movq %r15, %rdi
callq 0x11b1
movq %r15, %rdi
callq 0x1191
movq %r14, %rdi
callq 0x1180
addq $0x10, %r14
movq %r14, %rdi
callq 0x11a1
addq $0x18, %r14
movq %r14, %rdi
callq 0x1170
// File: /workspace/github_c_makefile_star2_O1/snej[P]zdelta/zd_mem.c
// Function: zd_alloc
size_t zd_alloc(zd_mem_buffer *m, size_t n){

  if(n>0){
    if((m->buffer= (Bytef *) malloc(n * sizeof(Byte))) == NULL){
      perror("zd_alloc: could not allocate");
      return 0;
    }

    m->pos= m->buffer;
    m->size= n;
    return n;
  }

  m->size = 0;
  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
testq %rsi, %rsi
je 0x149d
movq %rsi, %rbx
movq %rsi, %rdi
callq 0x1100
movq %rax, (%r14)
testq %rax, %rax
je 0x14b2
movq %rax, 0x8(%r14)
movq %rbx, 0x10(%r14)
jmp 0x14a7
movq $0x0, 0x10(%r14)
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x7b7d(%rip), %rdi      # 0x9036
callq 0x1130
jmp 0x14a5
// File: /workspace/github_c_makefile_star2_O1/snej[P]zdelta/zd_mem.c
// Function: zd_realloc
size_t zd_realloc(zd_mem_buffer *m, size_t n){

  Bytef *p;
  int tmp_pos= (m->pos - m->buffer);

  if(n >0){
    p= (Bytef *) realloc(m->buffer, (m->size+n));
    if(p == NULL){
      perror("zd_realloc: could not realloc");
      return 0;
    }
    /* reset newly allocated memory*/
    if (m->buffer != p)
    {
       m->pos = p + tmp_pos;
       m->buffer= p;
    }

    m->size += n;
    return n;
  }
  
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x1515
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %r15
movq 0x8(%rdi), %r12
movq 0x10(%rdi), %rsi
addq %rbx, %rsi
movq %r15, %rdi
callq 0x1110
testq %rax, %rax
je 0x1509
cmpq %rax, (%r14)
je 0x1503
subq %r15, %r12
movslq %r12d, %rcx
addq %rax, %rcx
movq %rcx, 0x8(%r14)
movq %rax, (%r14)
addq %rbx, 0x10(%r14)
jmp 0x1517
leaq 0x7b43(%rip), %rdi      # 0x9053
callq 0x1130
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq