LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/giometti[P]mastering_UNIX_programming/chapter_08/envars.c
// Function: main
int main(int argc, char *argv[])
{
	char *val;
	bool do_set = false, do_unset = false;
	int ret;

	/* Check the command line */
	if (argc < 2) {
		fprintf(stderr, "usage: %s [-]<var> [<val>]\n", argv[0]);
		return -1;
	}
	if (argv[1][0] == '-') {
		do_unset = true;
		argv[1]++;
	} else if (argc == 3)
		do_set = true;

	if (do_set || do_unset) {
		/* Try to set/unset the environment variable */
		if (do_set)
			ret = setenv(argv[1], argv[2], 1);
		else
			ret = unsetenv(argv[1]);
		if (ret) {
			perror(do_set ? "setenv" : "unsetenv");
			return -1;
		}
	}

	/* Try to get the environment variable */
	val = getenv(argv[1]);
	if (val == NULL) {
		fprintf(stderr, "variable %s %s\n", argv[1],
			do_unset ? "canceled" : "not found");
		return -1;
	}

	printf("%s\n", val);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
cmpl $0x1, %edi
jle 0x121e
movq 0x8(%rbx), %r14
movb (%r14), %bpl
cmpb $0x2d, %bpl
jne 0x11dd
incq %r14
movq %r14, 0x8(%rbx)
movq %r14, %rdi
callq 0x1080
leaq 0xe45(%rip), %rdi       # 0x2020
jmp 0x11fa
cmpl $0x3, %edi
jne 0x1202
movq 0x10(%rbx), %rsi
movq %r14, %rdi
movl $0x1, %edx
callq 0x1050
leaq 0xe28(%rip), %rdi       # 0x2022
testl %eax, %eax
jne 0x125b
movq 0x8(%rbx), %r14
movq %r14, %rdi
callq 0x1030
testq %rax, %rax
je 0x1228
movq %rax, %rdi
callq 0x1040
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
callq 0x10a0
jmp 0x1260
cmpb $0x2d, %bpl
movq 0x2dc5(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xdfc(%rip), %rax       # 0x2039
leaq 0xdfe(%rip), %rcx       # 0x2042
cmoveq %rax, %rcx
leaq 0xdda(%rip), %rsi       # 0x2029
movq %r14, %rdx
xorl %eax, %eax
callq 0x1060
jmp 0x1260
callq 0x1070
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x1219
// File: /workspace/github_c_makefile_star2_O3/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 0x2a9c
movq %rax, %r12
movq 0x6800(%rip), %rax      # 0x9238
movq 0x18(%rax), %rcx
subq 0x10(%rax), %rcx
cmpq %rcx, %r12
ja 0x2a9c
movl $0x1, %edi
movq %r12, %rsi
callq 0x21f0
testq %rax, %rax
je 0x2a9c
movq %rax, %r15
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 0x2a9f
xorl %r15d, %r15d
movq %r15, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x4ec0
movslq 0x78(%rbx), %rdi
testq %rdi, %rdi
jle 0x2b0d
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 0x2aeb
incq 0x58(%rbx)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x4ec0
movslq 0x78(%rbx), %r9
movl $0x28, %edi
movl $0x50, %r8d
testq %r9, %r9
jle 0x2b85
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 0x2b8c
addq %r10, %rcx
decq %r9
jne 0x2b63
movl $0x1, %esi
jmp 0x2b97
movl $0x38, %edi
movl $0x60, %r8d
incq (%rbx,%r8)
movq 0x6696(%rip), %rax      # 0x9238
incq (%rax,%rdi)
movl %esi, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2bdb
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 0x2bc7
movq 0x6656(%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 0x2c10
leaq 0x20(%r14), %rdi
movq %rbx, %rsi
callq 0x2200
testl %eax, %eax
je 0x2c13
movq 0x10(%r14), %r14
jmp 0x2bf5
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2c56
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 0x2c41
movq 0x65db(%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 0x2c91
leaq 0x20(%r12), %rdi
movq %r14, %rsi
callq 0x2200
testl %eax, %eax
je 0x2cea
movq 0x10(%r12), %r12
jmp 0x2c74
movq %r14, %rdi
movq %rbx, %rsi
movsd (%rsp), %xmm0
callq 0x29e1
testq %rax, %rax
je 0x2cf1
movq 0x658b(%rip), %rcx      # 0x9238
movq 0x40(%rcx,%r15,8), %rdx
movq %rdx, 0x10(%rax)
movq %rax, 0x40(%rcx,%r15,8)
movq 0x6576(%rip), %rcx      # 0x9238
movq 0x8(%rcx), %rdx
movq %rax, 0x8(%rcx)
movq %rcx, (%rax)
movq %rdx, 0x8(%rax)
movq %rax, (%rdx)
movq 0x655d(%rip), %rcx      # 0x9238
incl 0x20(%rcx)
movq 0x18(%rax), %rax
addq %rax, 0x10(%rcx)
xorl %eax, %eax
jmp 0x2cf6
movl $0x1, %eax
jmp 0x2cf6
movl $0x2, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2bb0
testq %rax, %rax
je 0x2d2a
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2aae
movq 0x6516(%rip), %rax      # 0x9238
incq 0x30(%rax)
xorl %eax, %eax
jmp 0x2d2f
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2bb0
testq %rax, %rax
je 0x2e3e
movq %rax, %r14
leaq 0x3475(%rip), %rdi      # 0x61e3
callq 0x2090
movq %r14, %rsi
addq $0x20, %rsi
leaq 0x32bf(%rip), %rdi      # 0x6040
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x2170
movq 0x40(%r14), %rsi
leaq 0x32c3(%rip), %rdi      # 0x6058
xorl %eax, %eax
callq 0x2170
movsd 0x68(%r14), %xmm0
leaq 0x32d7(%rip), %rdi      # 0x6080
movb $0x1, %al
callq 0x2170
movsd 0x70(%r14), %xmm0
leaq 0x32e6(%rip), %rdi      # 0x60a3
movb $0x1, %al
callq 0x2170
movl 0x78(%r14), %esi
leaq 0x32fa(%rip), %rdi      # 0x60c9
xorl %eax, %eax
callq 0x2170
movq 0x48(%r14), %rsi
leaq 0x32fd(%rip), %rdi      # 0x60de
xorl %eax, %eax
callq 0x2170
movq 0x18(%r14), %rsi
leaq 0x3305(%rip), %rdi      # 0x60f8
xorl %eax, %eax
callq 0x2170
movq 0x58(%r14), %rsi
leaq 0x330d(%rip), %rdi      # 0x6112
xorl %eax, %eax
callq 0x2170
movq 0x50(%r14), %rsi
leaq 0x3313(%rip), %rdi      # 0x612a
xorl %eax, %eax
callq 0x2170
movq 0x60(%r14), %rsi
leaq 0x3319(%rip), %rdi      # 0x6142
xorl %eax, %eax
callq 0x2170
leaq 0x33d9(%rip), %rdi      # 0x6210
callq 0x2090
jmp 0x2e43
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x338b(%rip), %rdi      # 0x61e3
callq 0x2090
movq 0x63d4(%rip), %rax      # 0x9238
cmpq %rax, (%rax)
je 0x2ea8
leaq 0x3392(%rip), %rdi      # 0x6202
callq 0x2090
movq 0x63bc(%rip), %rax      # 0x9238
movq (%rax), %r14
cmpq %rax, %r14
je 0x2ea8
leaq 0x32d4(%rip), %rbx      # 0x615f
leaq 0x20(%r14), %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2170
movq (%r14), %r14
movq 0x6395(%rip), %rax      # 0x9238
cmpq %rax, %r14
jne 0x2e8b
movl 0x20(%rax), %esi
leaq 0x32b4(%rip), %rdi      # 0x6166
xorl %eax, %eax
callq 0x2170
movq 0x6378(%rip), %rax      # 0x9238
movq 0x10(%rax), %rsi
leaq 0x32ae(%rip), %rdi      # 0x6179
xorl %eax, %eax
callq 0x2170
movq 0x635f(%rip), %rax      # 0x9238
movq 0x30(%rax), %rsi
leaq 0x32af(%rip), %rdi      # 0x6193
xorl %eax, %eax
callq 0x2170
movq 0x6346(%rip), %rax      # 0x9238
movq 0x28(%rax), %rsi
leaq 0x32af(%rip), %rdi      # 0x61ac
xorl %eax, %eax
callq 0x2170
movq 0x632d(%rip), %rax      # 0x9238
movq 0x38(%rax), %rsi
leaq 0x32af(%rip), %rdi      # 0x61c5
xorl %eax, %eax
callq 0x2170
leaq 0x32ec(%rip), %rdi      # 0x6210
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2090
// File: /workspace/github_c_makefile_star2_O3/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 0x2f5f
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 0x2f4b
movq 0x62d2(%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 0x2fd3
leaq 0x20(%r14), %rdi
movq %rbx, %rsi
callq 0x2200
testl %eax, %eax
je 0x2fba
movq %r14, %r15
movq 0x10(%r14), %r14
testq %r14, %r14
je 0x2fd3
leaq 0x20(%r14), %rdi
movq %rbx, %rsi
callq 0x2200
testl %eax, %eax
jne 0x2f98
addq $0x10, %r15
jmp 0x2fc2
leaq (%r15,%r12,8), %r15
addq $0x40, %r15
movq 0x10(%r14), %rax
movq %rax, (%r15)
movq %r14, %rdi
callq 0x2fde
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x6231(%rip), %rcx      # 0x9238
subq %rax, 0x10(%rcx)
callq 0x2030
movq 0x6221(%rip), %rax      # 0x9238
decl 0x20(%rax)
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x30e6
testl %ebx, %ebx
jne 0x30ed
callq 0x21c0
cmpl $-0x1, %eax
je 0x30e1
testl %r14d, %r14d
jne 0x308c
leaq 0x31aa(%rip), %rdi      # 0x6231
callq 0x2120
xorl %ebx, %ebx
testl %ebp, %ebp
jne 0x30e6
leaq 0x319a(%rip), %rdi      # 0x6233
xorl %ebx, %ebx
movl $0x2, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2330
cmpl $-0x1, %eax
je 0x30e6
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 0x30e6
movl %ebp, %edi
callq 0x21b0
jmp 0x30e6
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_O3/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, 0x6151(%rip)      # 0x9250
xorl %eax, %eax
movq %rax, 0x6140(%rip)      # 0x9248
xorps %xmm0, %xmm0
movups %xmm0, 0x6146(%rip)     # 0x9258
movq %rax, 0x614f(%rip)      # 0x9268
movups %xmm0, 0x6158(%rip)     # 0x9278
xorl %edi, %edi
callq 0x2270
movq %rax, 0x6142(%rip)      # 0x9270
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x31bc
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_O3/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, 0x60ff(%rip)     # 0x92c8
movl $0x0, 0x60f9(%rip)      # 0x92cc
movl $0x640, %edi            # imm = 0x640
callq 0x2280
movq %rax, 0x60ec(%rip)      # 0x92d0
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/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, 0x5e87(%rip)      # 0x929c
jge 0x34a3
movl (%rbx), %edi
callq 0x21b0
movslq 0x5ea3(%rip), %rax      # 0x92cc
movslq 0x5e98(%rip), %rsi      # 0x92c8
movq 0x5e99(%rip), %rdi      # 0x92d0
cmpl %esi, %eax
jge 0x344a
leal 0x1(%rax), %ecx
movl %ecx, 0x5e88(%rip)      # 0x92cc
movq %rbx, (%rdi,%rax,8)
jmp 0x349b
shlq $0x4, %rsi
callq 0x22c0
testq %rax, %rax
je 0x347b
shll 0x5e6a(%rip)            # 0x92c8
movq %rax, 0x5e6b(%rip)      # 0x92d0
movslq 0x5e60(%rip), %rcx      # 0x92cc
leal 0x1(%rcx), %edx
movl %edx, 0x5e57(%rip)      # 0x92cc
movq %rbx, (%rax,%rcx,8)
jmp 0x349b
movq 0x90(%rbx), %rdi
callq 0x2030
movq 0xb0(%rbx), %rdi
callq 0x2030
movq %rbx, %rdi
callq 0x2030
decl 0x5da7(%rip)            # 0x9248
popq %rbx
retq
movq %rbx, %rdi
callq 0x246c
jmp 0x341b
// File: /workspace/github_c_makefile_star2_O3/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, 0x5ddb(%rip)      # 0x929c
jge 0x3539
movq %r14, %rdi
callq 0x2110
addl $0x2, %eax
cmpl 0xc0(%rbx), %eax
leaq 0x2e43(%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 0x5ab8(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
movl (%rbx), %edx
leaq 0x2dca(%rip), %rsi      # 0x6316
movq %r14, %rcx
xorl %eax, %eax
callq 0x2230
jmp 0x34c3
// File: /workspace/github_c_makefile_star2_O3/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 0x2dd3(%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 0x359a
leaq 0x2dac(%rip), %rsi      # 0x6344
jmp 0x35ba
shlq $0x14, %rax
leaq 0x5c93(%rip), %rcx      # 0x9238
movq (%rcx), %rcx
movq %rax, 0x18(%rcx)
movq %rax, 0x5cf5(%rip)      # 0x92a8
leaq 0x31c3(%rip), %rsi      # 0x677d
movq %rbx, %rdi
callq 0x34b0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2daa(%rip), %rsi      # 0x6390
leaq 0x20(%rsp), %rdx
leaq 0x10(%rsp), %rcx
xorl %eax, %eax
callq 0x2290
cmpl $0x2, %eax
jne 0x364d
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 0x3659
movq %rax, %r15
leaq 0x2db9(%rip), %rsi      # 0x63e3
leaq 0x30(%rsp), %r14
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x23a0
cltq
testq %r15, %r15
js 0x3665
xorps %xmm0, %xmm0
cvtsi2ss %r15, %xmm0
jmp 0x367e
leaq 0x2d45(%rip), %r14      # 0x6399
jmp 0x3729
leaq 0x2de1(%rip), %r14      # 0x6441
jmp 0x3729
movq %r15, %rcx
shrq %rcx
andl $0x1, %r15d
orq %rcx, %r15
xorps %xmm0, %xmm0
cvtsi2ss %r15, %xmm0
addss %xmm0, %xmm0
mulss 0x2bca(%rip), %xmm0     # 0x6250
leaq (%rsp,%rax), %r15
addq $0x30, %r15
ucomiss 0x2bbf(%rip), %xmm0     # 0x6254
jb 0x36c2
movss %xmm0, 0x8(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0x8(%rsp), %xmm0
leaq 0x2d4e(%rip), %rsi      # 0x63fb
movq %r15, %rdi
movb $0x1, %al
callq 0x23a0
movss 0x8(%rsp), %xmm0
cltq
addq %rax, %r15
mulss 0x2b8e(%rip), %xmm0     # 0x6258
ucomiss 0x2b83(%rip), %xmm0     # 0x6254
jb 0x36ed
cvtss2sd %xmm0, %xmm0
leaq 0x2d26(%rip), %rsi      # 0x6404
movq %r15, %rdi
movb $0x1, %al
callq 0x23a0
cltq
addq %rax, %r15
movl 0xc(%rsp), %edx
leaq 0x2d15(%rip), %rsi      # 0x640d
movq %r15, %rdi
xorl %eax, %eax
callq 0x23a0
movslq %eax, %r12
addq %r15, %r12
movsd 0x18(%rsp), %xmm0
leaq 0x2d11(%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 0x34b0
addq $0x438, %rsp            # imm = 0x438
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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), %rax
movq 0x98(%rdi), %r14
cmpb $0xd, -0x2(%r14,%rax)
jne 0x3d39
leaq -0x2(%rax), %rcx
cmpb $0xa, 0x1(%r14,%rcx)
jne 0x3d39
movb $0x0, (%r14,%rcx)
movzbl 0xcd(%rbx), %edx
cmpl $0x1, %edx
je 0x3d53
cmpl $0x2, %edx
jne 0x3dee
testl %ecx, %ecx
sete %cl
cmpl $0xdc, %eax
setge %al
orb %cl, %al
jne 0x3d30
movq %r14, %rdi
movl $0x20, %esi
callq 0x2160
testq %rax, %rax
jne 0x3d30
leaq 0xd0(%rbx), %rdi
movq %r14, %rsi
callq 0x2d02
testl %eax, %eax
je 0x3dfa
leaq 0x2a42(%rip), %rsi      # 0x6779
jmp 0x3d40
leaq 0x2a1d(%rip), %rsi      # 0x675d
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x34b0
leaq 0x2636(%rip), %rsi      # 0x6390
leaq 0x10(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %r14, %rdi
xorl %eax, %eax
callq 0x2290
leaq 0x2a04(%rip), %r14      # 0x6779
cmpl $0x2, %eax
jne 0x3dd7
movq 0x10(%rsp), %r15
testq %r15, %r15
je 0x3dd7
movsd 0x8(%rsp), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jae 0x3dd7
ucomisd 0x226c(%rip), %xmm1     # 0x6008
jae 0x3dd7
movsd %xmm1, (%rsp)
leaq 0xd0(%rbx), %r12
movq %r12, %rdi
movl $0x7c, %esi
callq 0x2160
testq %rax, %rax
jne 0x3dd7
movq %r12, %rdi
movq %r15, %rsi
movsd (%rsp), %xmm0
callq 0x2c1e
testl %eax, %eax
jne 0x3dd7
leaq 0x29a6(%rip), %r14      # 0x677d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x34b0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x298f(%rip), %rsi      # 0x6784
jmp 0x3d40
leaq 0x297c(%rip), %rsi      # 0x677d
jmp 0x3d40
// File: /workspace/github_c_makefile_star2_O3/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 0x42c1
movq %rdi, %rbx
movq 0x98(%rdi), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x21d0
testq %rax, %rax
je 0x42c1
leaq 0x1(%rax), %r15
movq %rax, %rcx
subq %r14, %rcx
cmpq $0x2, %rcx
jl 0x4294
leaq -0x1(%rax), %rcx
cmpb $0xd, -0x1(%rax)
cmoveq %rcx, %rax
movb $0x0, (%rax)
movq 0x98(%rbx), %rsi
movq %rbx, %rdi
callq 0x3e06
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_O3/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 %rbx
pushq %rax
movq %rdi, %rbx
movq 0x90(%rdi), %rdi
movq 0x98(%rbx), %rsi
cmpq %rdi, %rsi
je 0x4306
movslq 0xa4(%rbx), %rdx
testq %rdx, %rdx
je 0x42ff
callq 0x22f0
movq 0x90(%rbx), %rdi
movq %rdi, 0x98(%rbx)
xorl %ebp, %ebp
movl 0xa4(%rbx), %edx
movl 0xa0(%rbx), %ecx
movq 0x90(%rbx), %rax
cmpl %ecx, %edx
jl 0x4358
movslq %ecx, %rsi
addq %rsi, %rsi
movq %rax, %rdi
callq 0x22c0
testq %rax, %rax
je 0x43b6
movq %rax, 0x90(%rbx)
movq %rax, 0x98(%rbx)
movl 0xa0(%rbx), %ecx
movl 0xa4(%rbx), %edx
addl %ecx, %ecx
movl %ecx, 0xa0(%rbx)
movl (%rbx), %edi
movslq %edx, %rdx
addq %rdx, %rax
subl %edx, %ecx
movslq %ecx, %rdx
movq %rax, %rsi
callq 0x21e0
testl %eax, %eax
jg 0x437c
cmpl $-0x1, %eax
je 0x439b
testl %eax, %eax
jne 0x4308
jmp 0x43ad
movl %eax, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
addq %rcx, 0x4eed(%rip)      # 0x9278
addl %eax, 0xa4(%rbx)
movl $0x1, %ebp
jmp 0x4308
callq 0x2040
movq %rax, %rcx
xorl %eax, %eax
cmpl $0xb, (%rcx)
cmovel %ebp, %eax
jmp 0x43e7
movl $0x5, 0x4(%rbx)
jmp 0x43e2
cmpl $0x0, 0x4edf(%rip)      # 0x929c
jg 0x43ee
movl $0x0, 0xa4(%rbx)
leaq 0x2218(%rip), %rsi      # 0x65e8
movq %rbx, %rdi
callq 0x34b0
movl $0x5, 0xc8(%rbx)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x24b9
jmp 0x43bf
// File: /workspace/github_c_makefile_star2_O3/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 0x445b
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 0x4455
movl (%rbx), %esi
movswl %bp, %ebp
leaq -0x105b(%rip), %rcx     # 0x33d0
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 0x4457
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x4809
movl %eax, %ebx
movl %eax, %edi
movl $0x3, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x20c0
testl %eax, %eax
js 0x47f4
orl $0x800, %eax            # imm = 0x800
movl %ebx, %edi
movl $0x4, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x20c0
testl %eax, %eax
js 0x47f4
movl %ebx, %eax
popq %rbx
retq
leaq 0x204d(%rip), %rdi      # 0x6848
callq 0x2360
movl %ebx, %edi
callq 0x21b0
jmp 0x4815
leaq 0x2104(%rip), %rdi      # 0x6914
callq 0x2360
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x47f0
// File: /workspace/github_c_makefile_star2_O3/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, 0x10(%rsp)
movl $0x1, 0xc(%rsp)
callq 0x47aa
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $-0x1, %eax
je 0x48ed
movl %eax, %ebp
leaq 0xc(%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 0x10(%rsp), %rcx
movl %ebp, %edi
movl $0x1, %esi
movl $0xd, %edx
movl $0x8, %r8d
callq 0x20b0
leaq 0x18(%rsp), %rsi
movq $0x0, 0x8(%rsi)
rolw $0x8, %r14w
movw $0x2, (%rsi)
movw %r14w, 0x2(%rsi)
movl 0x49fa(%rip), %eax      # 0x92c0
movl %eax, 0x4(%rsi)
movl %ebp, %edi
movl $0x10, %edx
callq 0x22e0
cmpl $-0x1, %eax
je 0x48fa
movl %ebp, %edi
movl $0x400, %esi            # imm = 0x400
callq 0x22a0
cmpl $-0x1, %eax
je 0x4903
movl %ebp, %ebx
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x201c(%rip), %rdi      # 0x691d
jmp 0x490a
leaq 0x201a(%rip), %rdi      # 0x6924
callq 0x2360
movl %ebp, %edi
callq 0x21b0
jmp 0x48ed
// File: /workspace/github_c_makefile_star2_O3/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 0x49b9(%rip), %edi      # 0x92d8
testl %edi, %edi
je 0x4928
callq 0x21b0
movl $0x3, %ebx
movl %ebx, %edi
callq 0x21b0
incl %ebx
cmpl $0x1f5, %ebx            # imm = 0x1F5
jne 0x492d
callq 0x20e0
movl %eax, %edi
movl $0x6, %esi
popq %rbx
jmp 0x2260
// File: /workspace/github_c_makefile_star2_O3/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 0x4996
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x1fc8(%rip), %rsi      # 0x692d
movq %rbx, %rdi
callq 0x2340
testq %rax, %rax
je 0x499b
movq %rax, %r14
movslq %ebp, %rdx
leaq 0x1fdc(%rip), %rsi      # 0x695b
movq %rax, %rdi
xorl %eax, %eax
callq 0x2230
movq %r14, %rdi
callq 0x2100
cmpl $-0x1, %eax
je 0x49a4
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1f8d(%rip), %rsi      # 0x692f
jmp 0x49ab
leaq 0x1fb5(%rip), %rsi      # 0x6960
movq 0x4646(%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_O3/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 0x49d5
movq %rdi, %rbx
callq 0x2050
testl %eax, %eax
jne 0x49d7
popq %rbx
retq
movq 0x461a(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
leaq 0x1f9a(%rip), %rsi      # 0x6982
movq %rbx, %rdx
xorl %eax, %eax
popq %rbx
jmp 0x2230
// File: /workspace/github_c_makefile_star2_O3/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 0x1faa(%rip), %rdi      # 0x69a5
leaq 0x1fbb(%rip), %rsi      # 0x69bd
leaq 0x1fc4(%rip), %rdx      # 0x69cd
xorl %eax, %eax
callq 0x2170
leaq 0x21f8(%rip), %rdi      # 0x6c0f
callq 0x2090
leaq 0x2224(%rip), %rdi      # 0x6c47
callq 0x2090
leaq 0x2253(%rip), %rdi      # 0x6c82
callq 0x2090
leaq 0x2265(%rip), %rdi      # 0x6ca0
callq 0x2090
leaq 0x229d(%rip), %rdi      # 0x6ce4
callq 0x2090
leaq 0x22cd(%rip), %rdi      # 0x6d20
callq 0x2090
leaq 0x2303(%rip), %rdi      # 0x6d62
callq 0x2090
leaq 0x2338(%rip), %rdi      # 0x6da3
callq 0x2090
leaq 0x2353(%rip), %rdi      # 0x6dca
callq 0x2090
leaq 0x237a(%rip), %rdi      # 0x6dfd
popq %rax
jmp 0x2090
// File: /workspace/github_c_makefile_star2_O3/snej[P]zdelta/zd_mem.c
// Function: zd_memcpy
size_t zd_memcpy(zd_mem_buffer *m, void *data, size_t n){

  size_t avail=0;
  avail = (m->size - (m->pos - m->buffer));
  if(avail < n)
    if(zd_realloc(m, (n-avail)+1)== 0)
      return 0;
  
  memcpy(m->pos, data, n);
  m->pos += n;
  return n;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rax
movq 0x8(%rdi), %rdi
subq %rdi, %rax
addq 0x10(%r14), %rax
cmpq %rdx, %rax
jae 0x1584
movq %rbx, %rsi
subq %rax, %rsi
incq %rsi
movq %r14, %rdi
callq 0x14c0
testq %rax, %rax
je 0x159c
movq 0x8(%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x10f0
addq %rbx, 0x8(%r14)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
xorl %ebx, %ebx
jmp 0x1593
// File: /workspace/github_c_makefile_star2_O3/snej[P]zdelta/zd_mem.c
// Function: dread_file
int ZEXPORT dread_file(FILE *input, zd_mem_buffer* buffer){

  int nbread;

  assert(input!=NULL);
  assert(buffer!=NULL);
  zd_alloc(buffer, ZD_BUF_SIZE);
  for(;;){

    /* read data */
    nbread = fread((void *) buffer->pos, 
		   sizeof(Byte), (size_t) ZD_BUF_SIZE, input); 
    buffer->pos=buffer->pos+nbread;

    /* check for end of file */
    if(feof(input)){
      return (buffer->pos - buffer->buffer);
    }

    /* check for io error */
    if(ferror(input)){
      zd_free(buffer);
      return ZD_ERRNO;
    }

    /* increase the buffer */
    if(!zd_realloc(buffer, ZD_BUF_SIZE)){
      zd_free(buffer);
      /* not enough memory */
      return ZD_MEM_ERROR;
    }
  }		
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x164a
movq %rsi, %rbx
testq %rsi, %rsi
je 0x1669
movq %rdi, %r14
movl $0x20000, %esi          # imm = 0x20000
movq %rbx, %rdi
callq 0x1474
leaq 0x8(%rbx), %r15
movq (%r15), %rdi
movl $0x1, %esi
movl $0x20000, %edx          # imm = 0x20000
movq %r14, %rcx
callq 0x1050
cltq
addq %rax, (%r15)
movq %r14, %rdi
callq 0x10e0
testl %eax, %eax
jne 0x161b
movq %r14, %rdi
callq 0x1040
testl %eax, %eax
jne 0x1622
movl $0x20000, %esi          # imm = 0x20000
movq %rbx, %rdi
callq 0x14c0
testq %rax, %rax
jne 0x15d0
movl $0xfffffffc, %ebp       # imm = 0xFFFFFFFC
jmp 0x1627
movl 0x8(%rbx), %ebp
subl (%rbx), %ebp
jmp 0x163d
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpq $0x0, 0x10(%rbx)
je 0x163d
movq (%rbx), %rdi
callq 0x1030
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7a20(%rip), %rdi      # 0x9071
leaq 0x7a25(%rip), %rsi      # 0x907d
leaq 0x7a27(%rip), %rcx      # 0x9086
movl $0x53, %edx
callq 0x1070
leaq 0x7a3e(%rip), %rdi      # 0x90ae
leaq 0x7a06(%rip), %rsi      # 0x907d
leaq 0x7a08(%rip), %rcx      # 0x9086
movl $0x54, %edx
callq 0x1070
// File: /workspace/github_c_makefile_star2_O3/snej[P]zdelta/zdelta.c
// Function: zd_compress
int ZEXPORT zd_compress(const Bytef *ref,  uLong rsize,
			const Bytef *tar,  uLong tsize,
			Bytef *delta, uLongf *dsize)
{
  int rval;
  zd_stream strm;   

  /* init io buffers */
  strm.base[0]  = (Bytef*) ref;
  strm.base_avail[0] = rsize;
  strm.base_out[0] = 0;
  strm.refnum      = 1;

  strm.next_in  = (Bytef*) tar;
  strm.total_in = 0;
  strm.avail_in = tsize;

  strm.next_out  = delta; 
  strm.total_out = 0;
  strm.avail_out = *dsize; 

  /* init the rest of the stream structure */
  strm.zalloc = (alloc_func)0;
  strm.zfree = (free_func)0;
  strm.opaque = (voidpf)0;
  rval = zd_deflateInit(&strm, ZD_DEFAULT_COMPRESSION);
  if (rval != ZD_OK)
  {
    fprintf(stderr, "%s error: %d\n", "deflateInit", rval);
    return rval;
  }

  /* compress the data */
  rval = zd_deflate(&strm,ZD_FINISH);
  if(rval != ZD_STREAM_END){
    zd_deflateEnd(&strm);
    return rval == ZD_OK ? ZD_BUF_ERROR : rval;
  }

  *dsize = strm.total_out;
  /* release memory */
  return zd_deflateEnd(&strm);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %r9, %rbx
movq %rsp, %rax
movq %rdi, 0x30(%rax)
movq %rsi, 0x40(%rax)
xorl %esi, %esi
movq %rsi, 0x38(%rax)
movl $0x1, 0x48(%rax)
movq %rdx, (%rax)
movq %rsi, 0x10(%rax)
movl %ecx, 0x8(%rax)
movq %r8, 0x18(%rax)
movq %rsi, 0x28(%rax)
movl (%r9), %ecx
movl %ecx, 0x20(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rax)
movq %rsi, 0x70(%rax)
leaq 0x79e3(%rip), %rdx      # 0x90bb
movq %rax, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0x90, %ecx
callq 0x2213
testl %eax, %eax
jne 0x1738
movq %rsp, %rdi
movl $0x4, %esi
callq 0x1f40
cmpl $0x1, %eax
jne 0x1713
movq %rsp, %rdi
movq 0x28(%rdi), %rax
movq %rax, (%rbx)
callq 0x253b
movl %eax, %ebp
jmp 0x172a
movl %eax, %r14d
movq %rsp, %rdi
callq 0x253b
testl %r14d, %r14d
movl $0xfffffffb, %ebp       # imm = 0xFFFFFFFB
cmovnel %r14d, %ebp
movl %ebp, %eax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl %eax, %ebp
movq 0xc8af(%rip), %rax      # 0xdff0
movq (%rax), %rdi
leaq 0x7976(%rip), %rsi      # 0x90c1
leaq 0x797d(%rip), %rdx      # 0x90cf
movl %ebp, %ecx
xorl %eax, %eax
callq 0x10d0
jmp 0x172a