LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/OhYee[P]computer_application_programming_experiment/utils/kmp/test/test_kmp.c
// Function: test_2
boolean test_2() {
    char *pattern = "ABCABCDABCABCD";
    char *string = "DDABCABCDABCABCDABCABCDDD";
    int   next[15];
    kmp_get_next(pattern, next);

    char *c = string;
    int   pos = 0;
    int   ans = 0;
    while (*c != '\0') {
        kmp_char(*(c++), pattern, &pos, next, &ans);
    }
    if (ans != 2) {
        print_err("test_2 error, want %d, got %d\n", 2, ans);
        return F;
    }
    return T;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
leaq 0x554(%rip), %rax       # 0x21a3
movq %rax, -0x10(%rbp)
leaq 0x558(%rip), %rax       # 0x21b2
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x1570
movq -0x18(%rbp), %rax
movq %rax, -0x68(%rbp)
movl $0x0, -0x6c(%rbp)
movl $0x0, -0x70(%rbp)
movq -0x68(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x1cb8
movq -0x68(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x68(%rbp)
movb (%rax), %al
movq -0x10(%rbp), %rsi
leaq -0x60(%rbp), %rcx
leaq -0x6c(%rbp), %rdx
leaq -0x70(%rbp), %r8
movsbl %al, %edi
callq 0x1650
jmp 0x1c81
cmpl $0x2, -0x70(%rbp)
je 0x1ce2
movl -0x70(%rbp), %edx
leaq 0x504(%rip), %rdi       # 0x21cc
movl $0x2, %esi
movb $0x0, %al
callq 0x18e0
leaq 0x479(%rip), %rax       # 0x2154
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x1cee
leaq 0x467(%rip), %rax       # 0x2150
movl (%rax), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/OhYee[P]computer_application_programming_experiment/utils/kmp/test/test_kmp.c
// Function: test_3
boolean test_3() {
    char *pattern = "AB";
    char *string = "ABABBAB";
    int   next[2];
    kmp_get_next(pattern, next);

    char *c = string;
    int   pos = 0;
    int   ans = 0;
    while (*c != '\0') {
        kmp_char(*(c++), pattern, &pos, next, &ans);
    }
    if (ans != 3) {
        print_err("test_3 error, want %d, got %d\n", 3, ans);
        return F;
    }
    return T;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
leaq 0x4e1(%rip), %rax       # 0x21f0
movq %rax, -0x10(%rbp)
leaq 0x4d1(%rip), %rax       # 0x21eb
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x1570
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x1d78
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb (%rax), %al
movq -0x10(%rbp), %rsi
leaq -0x20(%rbp), %rcx
leaq -0x2c(%rbp), %rdx
leaq -0x30(%rbp), %r8
movsbl %al, %edi
callq 0x1650
jmp 0x1d41
cmpl $0x3, -0x30(%rbp)
je 0x1da2
movl -0x30(%rbp), %edx
leaq 0x46b(%rip), %rdi       # 0x21f3
movl $0x3, %esi
movb $0x0, %al
callq 0x18e0
leaq 0x3b9(%rip), %rax       # 0x2154
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x1dae
leaq 0x3a7(%rip), %rax       # 0x2150
movl (%rax), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/OhYee[P]computer_application_programming_experiment/utils/kmp/test/test_kmp.c
// Function: main
int main() {
    boolean pass = T;

    pass &= test_1();
    pass &= test_2();
    pass &= test_3();

    if (pass) {
        print_ok("All testcases passed\n");
    } else {
        print_err("Some errors!\n");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
leaq 0x37a(%rip), %rax       # 0x2150
movl (%rax), %eax
movl %eax, -0x8(%rbp)
callq 0x1b80
andl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
callq 0x1c40
andl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
callq 0x1d00
andl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
je 0x1e12
leaq 0x409(%rip), %rdi       # 0x2212
movb $0x0, %al
callq 0x19a0
jmp 0x1e20
leaq 0x40f(%rip), %rdi       # 0x2228
movb $0x0, %al
callq 0x18e0
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, -0x19(%rbp)
movb $0x0, -0x1a(%rbp)
cmpl $0x2, -0x8(%rbp)
jge 0x11df
movq 0x2e3d(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
leaq 0xe38(%rip), %rsi       # 0x2004
movb $0x0, %al
callq 0x1060
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x12f4
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x1205
movb $0x1, -0x1a(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
jmp 0x1211
cmpl $0x3, -0x8(%rbp)
jne 0x120f
movb $0x1, -0x19(%rbp)
jmp 0x1211
testb $0x1, -0x19(%rbp)
jne 0x121d
testb $0x1, -0x1a(%rbp)
je 0x1280
testb $0x1, -0x19(%rbp)
je 0x1242
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movl $0x1, %edx
callq 0x1040
movl %eax, -0x20(%rbp)
jmp 0x1252
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1080
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
je 0x127e
movb -0x19(%rbp), %cl
leaq 0xdbe(%rip), %rdi       # 0x2020
leaq 0xdb9(%rip), %rax       # 0x2022
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x1070
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x12f4
jmp 0x1280
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1030
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x12db
movq 0x2d59(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdx
movb -0x1a(%rbp), %sil
leaq 0xd8d(%rip), %rcx       # 0x2042
leaq 0xd7d(%rip), %rax       # 0x2039
testb $0x1, %sil
cmovneq %rax, %rcx
leaq 0xd5e(%rip), %rsi       # 0x2029
movb $0x0, %al
callq 0x1060
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x12f4
movq -0x18(%rbp), %rsi
leaq 0xd4f(%rip), %rdi       # 0x2035
movb $0x0, %al
callq 0x1050
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movsd %xmm0, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movsd 0x4a32(%rip), %xmm0     # 0x7008
movsd %xmm0, 0x30(%rsp)
movl $0x0, 0x2c(%rsp)
movl $0x2, 0x28(%rsp)
movsd 0x30(%rsp), %xmm0
xorl %eax, %eax
ucomisd 0x50(%rsp), %xmm0
movb %al, 0x17(%rsp)
jbe 0x260c
cmpl $0x64, 0x28(%rsp)
setl %al
movb %al, 0x17(%rsp)
movb 0x17(%rsp), %al
testb $0x1, %al
jne 0x2616
jmp 0x2692
cvtsi2sdl 0x28(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x49ee(%rip), %xmm0     # 0x7018
callq 0x21e0
movaps %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
mulsd %xmm1, %xmm0
callq 0x2410
cvttsd2si %xmm0, %eax
movl %eax, 0x2c(%rsp)
xorl %eax, %eax
subl 0x2c(%rsp), %eax
cvtsi2sd %eax, %xmm0
cvtsi2sdl 0x28(%rsp), %xmm1
divsd %xmm1, %xmm0
callq 0x2440
movaps %xmm0, %xmm1
movsd 0x499b(%rip), %xmm0     # 0x7008
subsd %xmm1, %xmm0
cvtsi2sdl 0x2c(%rsp), %xmm1
callq 0x20e0
movsd %xmm0, 0x30(%rsp)
movl 0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
jmp 0x25ec
movl 0x28(%rsp), %eax
decl %eax
cvtsi2sd %eax, %xmm0
movaps 0x497d(%rip), %xmm2     # 0x7020
movq 0x58(%rsp), %xmm1
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x497b(%rip), %xmm2     # 0x7030
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd 0x4940(%rip), %xmm1     # 0x7010
ucomisd %xmm1, %xmm0
jbe 0x26e1
movq $0x0, 0x60(%rsp)
jmp 0x2755
movl 0x28(%rsp), %eax
subl $0x1, %eax
cltq
imulq 0x58(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x1f, %rax
andq $-0x20, %rax
shrq $0x3, %rax
addq $0x80, %rax
movq %rax, 0x18(%rsp)
cmpq $-0x1, 0x18(%rsp)
jbe 0x2724
movq $0x0, 0x60(%rsp)
jmp 0x2755
movl 0x2c(%rsp), %ecx
movq 0x40(%rsp), %rax
movl %ecx, (%rax)
movsd 0x30(%rsp), %xmm0
movq 0x38(%rsp), %rax
movsd %xmm0, (%rax)
movq 0x20(%rsp), %rcx
movq 0x48(%rsp), %rax
movq %rcx, (%rax)
movq 0x18(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
addq $0x68, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movsd %xmm0, 0x28(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movsd 0x487b(%rip), %xmm0     # 0x7008
movsd %xmm0, 0x10(%rsp)
movq 0x30(%rsp), %rdi
movsd 0x28(%rsp), %xmm0
leaq 0x20(%rsp), %rsi
leaq 0x1c(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq 0x25b0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x27cd
movq $0x0, 0x40(%rsp)
jmp 0x2896
movq 0x8(%rsp), %rax
movq 0x7a6f(%rip), %rcx      # 0xa248
movq 0x18(%rcx), %rcx
movq 0x7a64(%rip), %rdx      # 0xa248
subq 0x10(%rdx), %rcx
cmpq %rcx, %rax
jbe 0x27fb
movq $0x0, 0x40(%rsp)
jmp 0x2896
movq 0x8(%rsp), %rdi
callq 0x22a0
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jne 0x281b
movq $0x0, 0x40(%rsp)
jmp 0x2896
movq (%rsp), %rdi
movq 0x8(%rsp), %rdx
xorl %esi, %esi
callq 0x21b0
movq 0x20(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0x48(%rax)
movsd 0x28(%rsp), %xmm0
movq (%rsp), %rax
movsd %xmm0, 0x68(%rax)
movsd 0x10(%rsp), %xmm0
movq (%rsp), %rax
movsd %xmm0, 0x70(%rax)
movl 0x1c(%rsp), %ecx
movq (%rsp), %rax
movl %ecx, 0x78(%rax)
movq 0x30(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0x40(%rax)
movq 0x8(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0x18(%rax)
movq (%rsp), %rdi
addq $0x20, %rdi
movq 0x38(%rsp), %rsi
callq 0x2080
movq (%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x48(%rsp), %rdi
callq 0x2100
movq 0x8(%rsp), %rdi
movl %eax, %esi
leaq 0x30(%rsp), %rcx
movl $0x97c29b3a, %edx       # imm = 0x97C29B3A
callq 0x6640
movq 0x30(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movq 0x50(%rsp), %rcx
cmpl 0x78(%rcx), %eax
jge 0x2945
movq 0x28(%rsp), %rax
movslq 0x1c(%rsp), %rcx
imulq 0x20(%rsp), %rcx
addq %rcx, %rax
movq 0x50(%rsp), %rcx
xorl %edx, %edx
divq 0x48(%rcx)
movq %rdx, 0x10(%rsp)
movq 0x50(%rsp), %rdi
addq $0x7c, %rdi
movq 0x10(%rsp), %rsi
callq 0x2960
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x28f4
movq 0x50(%rsp), %rax
movq 0x58(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x58(%rax)
xorl %eax, %eax
addq $0x58, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x40(%rsp), %rdi
callq 0x2100
movq 0x8(%rsp), %rdi
movl %eax, %esi
leaq 0x30(%rsp), %rcx
movl $0x97c29b3a, %edx       # imm = 0x97C29B3A
callq 0x6640
movq 0x30(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movq 0x48(%rsp), %rcx
cmpl 0x78(%rcx), %eax
jge 0x2a7d
movq 0x28(%rsp), %rax
movslq 0x1c(%rsp), %rcx
imulq 0x20(%rsp), %rcx
addq %rcx, %rax
movq 0x48(%rsp), %rcx
xorl %edx, %edx
divq 0x48(%rcx)
movq %rdx, 0x10(%rsp)
movq 0x48(%rsp), %rdi
addq $0x7c, %rdi
movq 0x10(%rsp), %rsi
callq 0x2ac0
cmpl $0x0, %eax
jne 0x2a6b
movq 0x48(%rsp), %rax
movq 0x60(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x60(%rax)
movq 0x77f3(%rip), %rax      # 0xa248
movq 0x38(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x38(%rax)
movl $0x0, 0x54(%rsp)
jmp 0x2aa9
jmp 0x2a6d
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x29f4
movq 0x48(%rsp), %rax
movq 0x50(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x50(%rax)
movq 0x77b3(%rip), %rax      # 0xa248
movq 0x28(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x28(%rax)
movl $0x1, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
movq 0x18(%rsp), %rdi
callq 0x2100
movq (%rsp), %rdi
movl %eax, %esi
callq 0x2560
movq 0x772a(%rip), %rcx      # 0xa248
movl 0x24(%rcx), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
subl $0x1, %ecx
andl %ecx, %eax
movl %eax, 0x14(%rsp)
movq 0x770e(%rip), %rax      # 0xa248
movl 0x14(%rsp), %ecx
movq 0x40(%rax,%rcx,8), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x2b84
movq 0x8(%rsp), %rdi
addq $0x20, %rdi
movq 0x18(%rsp), %rsi
callq 0x2220
cmpl $0x0, %eax
jne 0x2b74
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x2b8d
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x2b48
movq $0x0, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movsd %xmm0, 0x18(%rsp)
movq 0x28(%rsp), %rax
movq %rax, (%rsp)
movq 0x28(%rsp), %rdi
callq 0x2100
movq (%rsp), %rdi
movl %eax, %esi
callq 0x2560
movq 0x766f(%rip), %rcx      # 0xa248
movl 0x24(%rcx), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
subl $0x1, %ecx
andl %ecx, %eax
movl %eax, 0x14(%rsp)
movq 0x7653(%rip), %rax      # 0xa248
movl 0x14(%rsp), %ecx
movq 0x40(%rax,%rcx,8), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x2c40
movq 0x8(%rsp), %rdi
addq $0x20, %rdi
movq 0x28(%rsp), %rsi
callq 0x2220
cmpl $0x0, %eax
jne 0x2c30
movl $0x1, 0x34(%rsp)
jmp 0x2cdb
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x2c03
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
movsd 0x18(%rsp), %xmm0
callq 0x2760
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x2c6c
movl $0x2, 0x34(%rsp)
jmp 0x2cdb
movq 0x75d5(%rip), %rax      # 0xa248
movl 0x14(%rsp), %ecx
movq 0x40(%rax,%rcx,8), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x8(%rsp), %rdx
movq 0x75b7(%rip), %rax      # 0xa248
movl 0x14(%rsp), %ecx
movq %rdx, 0x40(%rax,%rcx,8)
movq 0x8(%rsp), %rdi
movq 0x75a2(%rip), %rsi      # 0xa248
callq 0x2cf0
movq 0x7596(%rip), %rax      # 0xa248
movl 0x20(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x20(%rax)
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rcx
movq 0x757d(%rip), %rax      # 0xa248
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rdi
callq 0x2af0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x2d4f
movl $0x1, 0x24(%rsp)
jmp 0x2d79
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x28a0
movq 0x74e3(%rip), %rax      # 0xa248
movq 0x30(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x30(%rax)
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/yancanchen[P]mc-bloom-filter/bloom_filter.c
// Function: blooms_get
int blooms_get (char *key, char *subkey)
{
    bloom_t *bloom = blooms_search(key);
    if(!bloom) {
        DEBUG("Error, %s not exited\r\n", key);
        return -1;
    }

    int result = bloom_get(bloom, subkey);
    
    DEBUG("%s:\t%s\t%d\r\n", key, subkey, result);

    return result;    
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rdi
callq 0x2af0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x2dbf
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x2dda
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x29a0
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x2af0
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jne 0x2e1b
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
jmp 0x2f1c
leaq 0x421e(%rip), %rdi      # 0x7040
movb $0x0, %al
callq 0x2170
movq (%rsp), %rsi
addq $0x20, %rsi
leaq 0x4228(%rip), %rdi      # 0x7060
movb $0x0, %al
callq 0x2170
movq (%rsp), %rax
movq 0x40(%rax), %rsi
leaq 0x422a(%rip), %rdi      # 0x7078
movb $0x0, %al
callq 0x2170
movq (%rsp), %rax
movsd 0x68(%rax), %xmm0
leaq 0x423b(%rip), %rdi      # 0x70a0
movb $0x1, %al
callq 0x2170
movq (%rsp), %rax
movsd 0x70(%rax), %xmm0
leaq 0x4247(%rip), %rdi      # 0x70c3
movb $0x1, %al
callq 0x2170
movq (%rsp), %rax
movl 0x78(%rax), %esi
leaq 0x4258(%rip), %rdi      # 0x70e9
movb $0x0, %al
callq 0x2170
movq (%rsp), %rax
movq 0x48(%rax), %rsi
leaq 0x4257(%rip), %rdi      # 0x70fe
movb $0x0, %al
callq 0x2170
movq (%rsp), %rax
movq 0x18(%rax), %rsi
leaq 0x425b(%rip), %rdi      # 0x7118
movb $0x0, %al
callq 0x2170
movq (%rsp), %rax
movq 0x58(%rax), %rsi
leaq 0x425f(%rip), %rdi      # 0x7132
movb $0x0, %al
callq 0x2170
movq (%rsp), %rax
movq 0x50(%rax), %rsi
leaq 0x4261(%rip), %rdi      # 0x714a
movb $0x0, %al
callq 0x2170
movq (%rsp), %rax
movq 0x60(%rax), %rsi
leaq 0x4263(%rip), %rdi      # 0x7162
movb $0x0, %al
callq 0x2170
leaq 0x4272(%rip), %rdi      # 0x717f
movb $0x0, %al
callq 0x2170
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
leaq 0x4105(%rip), %rdi      # 0x7040
movb $0x0, %al
callq 0x2170
movq 0x72ff(%rip), %rdi      # 0xa248
callq 0x3060
cmpl $0x0, %eax
jne 0x2fcf
leaq 0x4247(%rip), %rdi      # 0x71a1
movb $0x0, %al
callq 0x2170
movq 0x72e0(%rip), %rax      # 0xa248
movq (%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x72b8(%rip), %rcx      # 0xa248
cmpq %rcx, %rax
je 0x2fcd
movq 0x20(%rsp), %rsi
addq $0x20, %rsi
leaq 0x420b(%rip), %rdi      # 0x71b0
movb $0x0, %al
callq 0x2170
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x2f84
jmp 0x2fcf
movq 0x7272(%rip), %rax      # 0xa248
movl 0x20(%rax), %esi
leaq 0x41d7(%rip), %rdi      # 0x71b7
movb $0x0, %al
callq 0x2170
movq 0x725a(%rip), %rax      # 0xa248
movq 0x10(%rax), %rsi
leaq 0x41d1(%rip), %rdi      # 0x71ca
movb $0x0, %al
callq 0x2170
movq 0x7241(%rip), %rax      # 0xa248
movq 0x30(%rax), %rsi
leaq 0x41d2(%rip), %rdi      # 0x71e4
movb $0x0, %al
callq 0x2170
movq 0x7228(%rip), %rax      # 0xa248
movq 0x28(%rax), %rsi
leaq 0x41d2(%rip), %rdi      # 0x71fd
movb $0x0, %al
callq 0x2170
movq 0x720f(%rip), %rax      # 0xa248
movq 0x38(%rax), %rsi
leaq 0x41d2(%rip), %rdi      # 0x7216
movb $0x0, %al
callq 0x2170
leaq 0x412d(%rip), %rdi      # 0x717f
movb $0x0, %al
callq 0x2170
addq $0x28, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rdi
callq 0x2100
movq 0x8(%rsp), %rdi
movl %eax, %esi
callq 0x2560
movq 0x7198(%rip), %rcx      # 0xa248
movl 0x24(%rcx), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
subl $0x1, %ecx
andl %ecx, %eax
movl %eax, 0x24(%rsp)
movq 0x717c(%rip), %rax      # 0xa248
movl 0x24(%rsp), %ecx
movq 0x40(%rax,%rcx,8), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x30ef
movl $0x1, 0x34(%rsp)
jmp 0x31ae
movq 0x18(%rsp), %rdi
addq $0x20, %rdi
movq 0x28(%rsp), %rsi
callq 0x2220
cmpl $0x0, %eax
jne 0x3134
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rdx
movq 0x7131(%rip), %rax      # 0xa248
movl 0x24(%rsp), %ecx
movq %rdx, 0x40(%rax,%rcx,8)
movq 0x18(%rsp), %rdi
callq 0x31c0
movl $0x0, 0x34(%rsp)
jmp 0x31ae
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x31a6
movq 0x10(%rsp), %rdi
addq $0x20, %rdi
movq 0x28(%rsp), %rsi
callq 0x2220
cmpl $0x0, %eax
jne 0x3188
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x10(%rsp), %rdi
callq 0x31c0
movl $0x0, 0x34(%rsp)
jmp 0x31ae
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
jmp 0x3142
movl $0x1, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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, (%rsp)
movq (%rsp), %rdi
callq 0x3360
movq (%rsp), %rax
movq 0x18(%rax), %rdx
movq 0x706b(%rip), %rax      # 0xa248
movq 0x10(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x10(%rax)
movq (%rsp), %rdi
callq 0x2030
movq 0x7050(%rip), %rax      # 0xa248
movl 0x20(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x20(%rax)
popq %rax
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq $0x800040, (%rsp)       # imm = 0x800040
movq (%rsp), %rdi
callq 0x22a0
movq %rax, 0x7017(%rip)      # 0xa248
cmpq $0x0, 0x700f(%rip)      # 0xa248
jne 0x3248
movl $0x1, 0x14(%rsp)
jmp 0x32d6
movq 0x6ff9(%rip), %rdi      # 0xa248
movq (%rsp), %rdx
xorl %esi, %esi
callq 0x21b0
movq 0x6fe7(%rip), %rax      # 0xa248
movl $0x14, 0x24(%rax)
movq 0x6fd9(%rip), %rax      # 0xa248
movl $0x0, 0x20(%rax)
movq 0x6fcb(%rip), %rax      # 0xa248
movq $0x0, 0x10(%rax)
movq 0x8(%rsp), %rcx
movq 0x6fb7(%rip), %rax      # 0xa248
movq %rcx, 0x18(%rax)
movq 0x6fac(%rip), %rdi      # 0xa248
callq 0x32e0
movq 0x6fa0(%rip), %rax      # 0xa248
movq $0x0, 0x38(%rax)
movq 0x6f91(%rip), %rax      # 0xa248
movq $0x0, 0x30(%rax)
movq 0x6f82(%rip), %rax      # 0xa248
movq $0x0, 0x28(%rax)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movl %edi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
callq 0x2430
movl %eax, %ecx
movl %ecx, 0x4(%rsp)
subl $-0x1, %eax
je 0x33f8
jmp 0x33ee
movl 0x4(%rsp), %eax
testl %eax, %eax
je 0x3405
jmp 0x3407
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
jmp 0x34a7
jmp 0x340e
xorl %edi, %edi
callq 0x2070
callq 0x21f0
cmpl $-0x1, %eax
jne 0x3425
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
jmp 0x34a7
cmpl $0x0, 0x10(%rsp)
jne 0x3441
leaq 0x3e01(%rip), %rdi      # 0x7234
callq 0x2110
cmpl $0x0, %eax
je 0x343f
jmp 0x343f
jmp 0x3441
cmpl $0x0, 0xc(%rsp)
jne 0x349f
leaq 0x3de7(%rip), %rdi      # 0x7236
movl $0x2, %esi
xorl %edx, %edx
movb $0x0, %al
callq 0x2350
movl %eax, 0x8(%rsp)
cmpl $-0x1, %eax
je 0x349f
movl 0x8(%rsp), %edi
xorl %esi, %esi
callq 0x2150
movl 0x8(%rsp), %edi
movl $0x1, %esi
callq 0x2150
movl 0x8(%rsp), %edi
movl $0x2, %esi
callq 0x2150
cmpl $0x2, 0x8(%rsp)
jle 0x349d
movl 0x8(%rsp), %edi
callq 0x21d0
jmp 0x349f
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/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, 0x6da5(%rip)      # 0xa260
movl $0x0, 0x6d97(%rip)      # 0xa25c
movl $0x0, 0x6d89(%rip)      # 0xa258
movq $0x0, 0x6db6(%rip) # 0xa290
movq $0x0, 0x6da3(%rip) # 0xa288
movq $0x0, 0x6d78(%rip) # 0xa268
movq $0x0, 0x6d75(%rip) # 0xa270
movq $0x0, 0x6d72(%rip) # 0xa278
xorl %eax, %eax
movl %eax, %edi
callq 0x2290
movq %rax, 0x6d6a(%rip)      # 0xa280
popq %rax
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/yancanchen[P]mc-bloom-filter/mc_bloom_filter.c
// Function: init_my_srv_default
void init_my_srv_default(void) {
    my_srv.maxconns = 1024;     /* to limit connections-related memory to about 5MB */
    my_srv.maxcore = 0;
    my_srv.port = 12345;
    my_srv.verbose = 0;
    my_srv.maxbytes = 1024*1024*1024;
    my_srv.lock_memory = 0;
    my_srv.username = 0;
    my_srv.pid_file = 0;
    my_srv.interface.s_addr = htonl(INADDR_ANY);
}

// Assembly:
pushq %rax
movl $0x400, 0x6d1d(%rip)    # imm = 0x400
movl $0x0, 0x6d17(%rip)      # 0xa29c
movl $0x3039, 0x6d11(%rip)   # imm = 0x3039
movl $0x0, 0x6d0b(%rip)      # 0xa2a4
movq $0x40000000, 0x6d0c(%rip) # imm = 0x40000000
movl $0x0, 0x6cfa(%rip)      # 0xa2a8
movq $0x0, 0x6cff(%rip) # 0xa2b8
movq $0x0, 0x6cfc(%rip) # 0xa2c0
xorl %edi, %edi
callq 0x21a0
movl %eax, 0x6cf7(%rip)      # 0xa2c8
popq %rax
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x10(%rsp), %rax
movsbl 0xcc(%rax), %eax
cmpl 0xc(%rsp), %eax
jne 0x3601
jmp 0x3633
movl 0xc(%rsp), %eax
movb %al, %cl
movq 0x10(%rsp), %rax
movb %cl, 0xcc(%rax)
movq 0x10(%rsp), %rax
movl (%rax), %edi
movl $0x6, %esi
movl $0x3, %edx
leaq 0xc(%rsp), %rcx
movl $0x4, %r8d
callq 0x20a0
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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, 0x6c85(%rip)     # 0xa2d0
movl $0x0, 0x6c7f(%rip)      # 0xa2d4
movslq 0x6c74(%rip), %rdi      # 0xa2d0
shlq $0x3, %rdi
callq 0x22a0
movq %rax, 0x6c6c(%rip)      # 0xa2d8
popq %rax
retq
nop
// File: /workspace/github_c_makefile_star2_O0/yancanchen[P]mc-bloom-filter/mc_bloom_filter.c
// Function: event_handler
void event_handler(int fd, short which, void *arg) {
    conn *c;

    c = (conn *)arg;
    c->which = which;

    /* sanity */
    if (fd != c->sfd) {
        if (my_srv.verbose > 0)
            fprintf(stderr, "Catastrophic: event fd doesn't match conn fd!\n");
        conn_close(c);
        return;
    }

    /* do as much I/O as possible until we block */
    drive_machine(c);

    /* wait for next event */
    return;
}

// Assembly:
subq $0x18, %rsp
movw %si, %ax
movl %edi, 0x14(%rsp)
movw %ax, 0x12(%rsp)
movq %rdx, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, (%rsp)
movw 0x12(%rsp), %cx
movq (%rsp), %rax
movw %cx, 0x8a(%rax)
movl 0x14(%rsp), %eax
movq (%rsp), %rcx
cmpl (%rcx), %eax
je 0x3a16
cmpl $0x0, 0x68b3(%rip)      # 0xa2a4
jle 0x3a0b
movq 0x65fe(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
leaq 0x3f25(%rip), %rsi      # 0x7929
movb $0x0, %al
callq 0x2250
movq (%rsp), %rdi
callq 0x3a30
jmp 0x3a1f
movq (%rsp), %rdi
callq 0x55c0
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
addq $0x8, %rdi
callq 0x2180
cmpl $0x1, 0x6856(%rip)      # 0xa2a4
jle 0x3a6f
movq 0x65a1(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
movq 0x10(%rsp), %rax
movl (%rax), %edx
leaq 0x38d2(%rip), %rsi      # 0x733a
movb $0x0, %al
callq 0x2250
movq 0x10(%rsp), %rax
movl (%rax), %edi
callq 0x21d0
movl 0x6853(%rip), %eax      # 0xa2d4
cmpl 0x6849(%rip), %eax      # 0xa2d0
jge 0x3ab2
movq 0x10(%rsp), %rdx
movq 0x6843(%rip), %rax      # 0xa2d8
movl 0x6839(%rip), %ecx      # 0xa2d4
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x682e(%rip)      # 0xa2d4
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x3b47
movq 0x681f(%rip), %rdi      # 0xa2d8
movslq 0x6810(%rip), %rsi      # 0xa2d0
shlq $0x3, %rsi
shlq %rsi
callq 0x22e0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x3b19
movl 0x67f1(%rip), %eax      # 0xa2d0
shll %eax
movl %eax, 0x67e9(%rip)      # 0xa2d0
movq 0x8(%rsp), %rax
movq %rax, 0x67e5(%rip)      # 0xa2d8
movq 0x10(%rsp), %rdx
movq 0x67d9(%rip), %rax      # 0xa2d8
movl 0x67cf(%rip), %ecx      # 0xa2d4
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x67c4(%rip)      # 0xa2d4
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x3b45
movq 0x10(%rsp), %rax
movq 0x90(%rax), %rdi
callq 0x2030
movq 0x10(%rsp), %rax
movq 0xb0(%rax), %rdi
callq 0x2030
movq 0x10(%rsp), %rdi
callq 0x2030
jmp 0x3b47
movl 0x670b(%rip), %eax      # 0xa258
addl $-0x1, %eax
movl %eax, 0x6702(%rip)      # 0xa258
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
cmpl $0x1, 0x672f(%rip)      # 0xa2a4
jle 0x3b9b
movq 0x647a(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
movq 0x10(%rsp), %rax
movl (%rax), %edx
movq 0x8(%rsp), %rcx
leaq 0x37be(%rip), %rsi      # 0x7352
movb $0x0, %al
callq 0x2250
movq 0x8(%rsp), %rdi
callq 0x2100
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %eax
addl $0x2, %eax
movq 0x10(%rsp), %rcx
cmpl 0xc0(%rcx), %eax
jle 0x3bd7
leaq 0x3796(%rip), %rax      # 0x735a
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x2100
movl %eax, 0x4(%rsp)
movq 0x10(%rsp), %rax
movq 0xb0(%rax), %rdi
movq 0x8(%rsp), %rsi
callq 0x2080
movq 0x10(%rsp), %rax
movq 0xb0(%rax), %rdi
leaq 0x359e(%rip), %rsi      # 0x719e
callq 0x23c0
movl 0x4(%rsp), %ecx
addl $0x2, %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0xc4(%rax)
movq 0x10(%rsp), %rax
movq 0xb0(%rax), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0xb8(%rax)
movq 0x10(%rsp), %rax
movl $0x2, 0x4(%rax)
movq 0x10(%rsp), %rax
movl $0x1, 0xc8(%rax)
addq $0x18, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x8(%rsp), %rdi
addq $0x6, %rdi
leaq 0x370e(%rip), %rsi      # 0x737c
movq %rsp, %rdx
movb $0x0, %al
callq 0x22b0
movl %eax, %ecx
movl $0x1, %eax
cmpl %ecx, %eax
jne 0x3c93
movabsq $0xfffffffffff, %rax    # imm = 0xFFFFFFFFFFF
cmpq %rax, (%rsp)
jbe 0x3ca6
movq 0x10(%rsp), %rdi
leaq 0x36e1(%rip), %rsi      # 0x7380
callq 0x3b60
jmp 0x3ce2
movq (%rsp), %rcx
shlq $0x14, %rcx
leaq 0x6593(%rip), %rax      # 0xa248
movq (%rax), %rax
movq %rcx, 0x18(%rax)
leaq 0x6585(%rip), %rax      # 0xa248
movq (%rax), %rax
movq 0x18(%rax), %rax
movq %rax, 0x65df(%rip)      # 0xa2b0
movq 0x10(%rsp), %rdi
leaq 0x3ae0(%rip), %rsi      # 0x77bd
callq 0x3b60
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rax
cmpl $0x0, 0xa4(%rax)
jne 0x51e4
movl $0x0, 0x24(%rsp)
jmp 0x52c4
movq 0x18(%rsp), %rax
movq 0x98(%rax), %rdi
movq 0x18(%rsp), %rax
movslq 0xa4(%rax), %rdx
movl $0xa, %esi
callq 0x2200
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x5220
movl $0x0, 0x24(%rsp)
jmp 0x52c4
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movq 0x98(%rcx), %rcx
subq %rcx, %rax
cmpq $0x1, %rax
jle 0x5264
movq 0x10(%rsp), %rax
movsbl -0x1(%rax), %eax
cmpl $0xd, %eax
jne 0x5264
movq 0x10(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movb $0x0, (%rax)
movq 0x18(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0x98(%rax), %rsi
callq 0x4bc0
movq 0x8(%rsp), %rdx
movq 0x18(%rsp), %rax
movq 0x98(%rax), %rax
subq %rax, %rdx
movq 0x18(%rsp), %rax
movslq 0xa4(%rax), %rcx
subq %rdx, %rcx
movl %ecx, 0xa4(%rax)
movq 0x8(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x98(%rax)
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movl %esi, 0x4(%rsp)
movq 0x8(%rsp), %rax
movswl 0x88(%rax), %eax
cmpl 0x4(%rsp), %eax
jne 0x552c
movl $0x1, 0x14(%rsp)
jmp 0x55ad
movq 0x8(%rsp), %rdi
addq $0x8, %rdi
callq 0x2180
cmpl $-0x1, %eax
jne 0x5549
movl $0x0, 0x14(%rsp)
jmp 0x55ad
movq 0x8(%rsp), %rdi
addq $0x8, %rdi
movq 0x8(%rsp), %rax
movl (%rax), %esi
movl 0x4(%rsp), %eax
movq 0x8(%rsp), %r8
leaq -0x1bb9(%rip), %rcx     # 0x39b0
movswl %ax, %edx
callq 0x2330
movl 0x4(%rsp), %eax
movw %ax, %cx
movq 0x8(%rsp), %rax
movw %cx, 0x88(%rax)
movq 0x8(%rsp), %rdi
addq $0x8, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2230
cmpl $-0x1, %eax
jne 0x55a5
movl $0x0, 0x14(%rsp)
jmp 0x55ad
movl $0x1, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x2450
movl %eax, 0x10(%rsp)
cmpl $-0x1, %eax
jne 0x5c34
leaq 0x1d33(%rip), %rdi      # 0x7958
callq 0x2380
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
jmp 0x5c95
movl 0x10(%rsp), %edi
movl $0x3, %esi
xorl %edx, %edx
movb $0x0, %al
callq 0x20b0
movl %eax, 0xc(%rsp)
cmpl $0x0, %eax
jl 0x5c6e
movl 0x10(%rsp), %edi
movl 0xc(%rsp), %edx
orl $0x800, %edx            # imm = 0x800
movl $0x4, %esi
movb $0x0, %al
callq 0x20b0
cmpl $0x0, %eax
jge 0x5c8d
leaq 0x1c17(%rip), %rdi      # 0x788c
callq 0x2380
movl 0x10(%rsp), %edi
callq 0x21d0
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
jmp 0x5c95
movl 0x10(%rsp), %eax
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movl %edi, 0x20(%rsp)
leaq 0x14(%rsp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x21b0
movl $0x1, (%rsp)
callq 0x5c00
movl %eax, 0x1c(%rsp)
cmpl $-0x1, %eax
jne 0x5cdb
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x5dd5
movl 0x1c(%rsp), %edi
movl $0x1, %esi
movl $0x2, %edx
movq %rsp, %rcx
movl $0x4, %r8d
callq 0x20a0
movl 0x1c(%rsp), %edi
movl $0x1, %esi
movl $0x9, %edx
movq %rsp, %rcx
movl $0x4, %r8d
callq 0x20a0
movl 0x1c(%rsp), %edi
movl $0x1, %esi
movl $0xd, %edx
leaq 0x14(%rsp), %rcx
movl $0x8, %r8d
callq 0x20a0
leaq 0x4(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x21b0
movw $0x2, 0x4(%rsp)
movl 0x20(%rsp), %eax
movzwl %ax, %edi
callq 0x2140
movw %ax, 0x6(%rsp)
movl 0x4568(%rip), %eax      # 0xa2c8
movl %eax, 0x8(%rsp)
movl 0x1c(%rsp), %edi
leaq 0x4(%rsp), %rsi
movl $0x10, %edx
callq 0x2300
cmpl $-0x1, %eax
jne 0x5d9b
leaq 0x1bde(%rip), %rdi      # 0x7961
callq 0x2380
movl 0x1c(%rsp), %edi
callq 0x21d0
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x5dd5
movl 0x1c(%rsp), %edi
movl $0x400, %esi            # imm = 0x400
callq 0x22c0
cmpl $-0x1, %eax
jne 0x5dcd
leaq 0x1bb3(%rip), %rdi      # 0x7968
callq 0x2380
movl 0x1c(%rsp), %edi
callq 0x21d0
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x5dd5
movl 0x1c(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rax
movl $0x0, 0x4(%rsp)
cmpl $0x0, 0x44f0(%rip)      # 0xa2e0
je 0x5dfd
movl 0x44e8(%rip), %edi      # 0xa2e0
callq 0x21d0
movl $0x3, 0x4(%rsp)
cmpl $0x1f4, 0x4(%rsp)       # imm = 0x1F4
jg 0x5e25
movl 0x4(%rsp), %edi
callq 0x21d0
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x5e05
callq 0x20d0
movl %eax, %edi
movl $0x6, %esi
callq 0x2280
popq %rax
retq
nopl (%rax,%rax)