LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/PARKINHYO[P]BlackjackGame/shm/shm_client.c
// Function: set_shutdown
void *set_shutdown ()
{
        printf("[SIGNAL] : Got shutdown signal\n");
        shmctl( gnShmID2, IPC_RMID, 0 );
        printf("[SIGNAL] : Shared meory segment marked for deletion\n");;
        semctl( gnSemID2, IPC_RMID, 0 );
        printf("[SIGNAL] : Semapore segment marked for deletion\n");
        exit (1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xbe5(%rip), %rdi       # 0x2104
callq 0x1060
movl 0x2c66(%rip), %edi      # 0x4190
xorl %esi, %esi
xorl %edx, %edx
callq 0x10f0
leaq 0xbe9(%rip), %rdi       # 0x2123
callq 0x1060
movl 0x2c4f(%rip), %edi      # 0x4194
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x1110
leaq 0xc00(%rip), %rdi       # 0x2157
callq 0x1060
movl $0x1, %edi
callq 0x1160
// File: /workspace/github_c_makefile_star2_O1/wtakuo[P]SVM/vmdebug.c
// Function: dump_vm
void dump_vm (long nsteps, Bcode *ip, Bcode code[],
              Value *lv, Value *fp, Value *sp, Value *vs_base,
              Value gv[], size_t gv_size, vm_mode_t mode) {
    long i;
    Value *p;
    if (mode == vm_normal_mode) return;

    /* global variables */
    for (i = 0; i < gv_size; i++) {
        printf("gv[%ld]=0x%08lx ", i, gv[i]);
        if ((i+1) % 4 == 0) printf("\n");
    }
    if (i % 4 != 0) printf("\n");
    /* value stack */
    i = 0;
    for (p = vs_base - 1; p >= sp; p--) {
        printf("vs[%ld]=0x%08lx ", vs_base - 1 - p, *p);
        if ((i+1) % 4 == 0) printf("\n");
        i++;
    }
    if (i % 4 != 0) printf("\n");
    /* machine state */
    printf("lv=%p (%ld), fp=%p (%ld), sp=%p (%ld)\n", 
           lv, vs_base - lv, 
           fp, vs_base - fp,
           sp, vs_base - sp);
    /* next instruction */
    printf("nsteps=%ld, ip=%p, pc=%ld, inst=%s\n",
           nsteps, 
           ip,
           ip - code, 
           instr_name(ip[0]));

    if (mode == vm_step_mode) {
        printf("next? [Y/n]");
        switch (getchar()) {
        case 'n':
        case 'N':
            exit(EXIT_SUCCESS);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
cmpl $0x0, 0x88(%rsp)
je 0x1790
movq %r9, %r12
movq %rcx, 0x18(%rsp)
movq %r8, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq %rdi, 0x10(%rsp)
movq %rsi, 0x30(%rsp)
movq 0x80(%rsp), %rbx
movq 0x70(%rsp), %r13
testq %rbx, %rbx
je 0x1696
movq 0x78(%rsp), %rbp
leaq 0xab4(%rip), %r14       # 0x210e
xorl %r15d, %r15d
movq (%rbp,%r15,8), %rdx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x1050
incq %r15
testb $0x3, %r15b
jne 0x1682
movl $0xa, %edi
callq 0x1040
cmpq %r15, %rbx
jne 0x165d
testb $0x3, %bl
je 0x1696
movl $0xa, %edi
callq 0x1040
leaq -0x8(%r13), %r15
cmpq %r12, %r15
jb 0x16ef
leaq 0xa79(%rip), %r14       # 0x211f
xorl %ebx, %ebx
xorl %ebp, %ebp
movq %rbx, %rsi
sarq $0x3, %rsi
movq (%r15), %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x1050
leal 0x1(%rbp), %eax
testb $0x3, %al
jne 0x16cf
movl $0xa, %edi
callq 0x1040
addq $-0x8, %r15
addq $0x8, %rbx
incq %rbp
cmpq %r12, %r15
jae 0x16aa
testb $0x3, %bpl
je 0x16ef
movl $0xa, %edi
callq 0x1040
movq %r13, %rdx
movq 0x18(%rsp), %rsi
subq %rsi, %rdx
sarq $0x3, %rdx
movq %r13, %r8
movq 0x20(%rsp), %rcx
subq %rcx, %r8
sarq $0x3, %r8
subq %r12, %r13
sarq $0x3, %r13
movq %r13, (%rsp)
leaq 0xa11(%rip), %rdi       # 0x2130
movq %r12, %r9
xorl %eax, %eax
callq 0x1050
movq 0x30(%rsp), %rdx
movq %rdx, %rcx
subq 0x28(%rsp), %rcx
movzbl (%rdx), %eax
cmpq $0x36, %rax
ja 0x174f
leaq 0xaee(%rip), %rsi       # 0x2234
movslq (%rsi,%rax,4), %r8
addq %rsi, %r8
jmp 0x1756
leaq 0xad8(%rip), %r8        # 0x222e
movl 0x88(%rsp), %ebx
movq 0x10(%rsp), %rsi
leaq 0x9ee(%rip), %rdi       # 0x2157
xorl %eax, %eax
callq 0x1050
cmpl $0x2, %ebx
jne 0x1790
leaq 0x9ff(%rip), %rdi       # 0x217b
xorl %eax, %eax
callq 0x1050
callq 0x1060
orl $0x20, %eax
cmpl $0x6e, %eax
je 0x179f
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %edi, %edi
callq 0x10b0
nop
// File: /workspace/github_c_makefile_star2_O1/wtakuo[P]SVM/vmtest.c
// Function: main
int main (int argc, char *argv[]) {
    vm_mode_t mode = vm_normal_mode;
    int n = 0;
    int i = 1;

    while (i < argc && argv[i][0] == '-') {
        char *arg = argv[i];
        int j = 1;
        while (arg[j] != '\0') {
            switch (arg[j]) {
            case 't':
                mode = vm_trace_mode;
                break;
            case 's':
                mode = vm_step_mode;
                break;
            default:
                fprintf(stderr, "usage: %s [-t][-s] [n]\n", argv[0]);
                return EXIT_FAILURE;
            }
            j++;
        }
        i++;
    }
    if (i < argc) {
        n = atoi(argv[i]);
    }

    vmtest(n, mode);

    return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %ebp
movl $0x1, %r12d
xorl %ebx, %ebx
xorl %r15d, %r15d
xorl %eax, %eax
cmpl %ebp, %r12d
jge 0x1835
movslq %r12d, %rcx
movq (%r14,%rcx,8), %rdi
cmpb $0x2d, (%rdi)
jne 0x182e
movb 0x1(%rdi), %cl
testb %cl, %cl
sete %r13b
je 0x180e
addq $0x2, %rdi
movl $0x1, %edx
cmpb $0x74, %cl
je 0x17fc
movzbl %cl, %ecx
cmpl $0x73, %ecx
jne 0x181f
movl $0x2, %edx
movb (%rdi), %cl
incq %rdi
movl %edx, %r15d
testb %cl, %cl
sete %r13b
jne 0x17e5
jmp 0x1811
movl %r15d, %edx
incl %r12d
movl %edx, %r15d
testb $0x1, %r13b
jne 0x17c5
jmp 0x1841
movq %r14, %rdi
callq 0x1104
movl $0x1, %eax
jmp 0x1817
callq 0x10a0
movl %eax, %ebx
movl %ebx, %edi
movl %r15d, %esi
callq 0x1850
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wtakuo[P]SVM/test3.c
// Function: vmtest
void vmtest (int n, vm_mode_t trace) {
    int codelen = sizeof(code)/sizeof(Bcode);
    Function f = new_function(2, 0, code + 12, codelen - 12);
    gv[0] = (Value)n;
    gv[1] = (Value)f;

    vm(code, codelen, vs_base, VS_SIZE, gv, GV_SIZE, trace);

    delete_function(f);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
movl %edi, %ebp
leaq 0x2819(%rip), %rdx      # 0x407c
movl $0x2, %edi
movl $0x17, %ecx
xorl %esi, %esi
callq 0x15bc
movq %rax, %r14
leaq 0x27f2(%rip), %rdi      # 0x4070
movslq %ebp, %rax
movq %rax, 0x2828(%rip)      # 0x40b0
leaq 0x2821(%rip), %r8       # 0x40b0
movq %r14, 0x2822(%rip)      # 0x40b8
movl %ebx, (%rsp)
leaq 0x3050(%rip), %rdx      # 0x48f0
movl $0x23, %esi
movl $0x100, %ecx            # imm = 0x100
movl $0x8, %r9d
callq 0x121c
movq %r14, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x15ff
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/jemalloc.c
// Function: a0ialloc
static void *
a0ialloc(size_t size, bool zero, bool is_metadata)
{

	if (unlikely(malloc_init_a0()))
		return (NULL);

	return (iallocztm(TSDN_NULL, size, size2index(size), zero, NULL,
	    is_metadata, arena_get(TSDN_NULL, 0, true), true));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
cmpl $0x3, 0x40bee(%rip)     # 0x4c35c
je 0xb842
cmpq $0x1000, %rbx           # imm = 0x1000
ja 0xb853
leaq -0x1(%rbx), %rax
shrq $0x3, %rax
leaq 0x30630(%rip), %rcx     # 0x3bdc0
movzbl (%rax,%rcx), %r15d
movq 0x40e14(%rip), %rax     # 0x4c5b0
movq (%rax), %rsi
testq %rsi, %rsi
je 0xb863
movzbl %r14b, %r8d
xorl %edi, %edi
movq %rbx, %rdx
movl %r15d, %ecx
callq 0xd1d4
movq %rax, %rbx
testb %bpl, %bpl
je 0xb834
testq %rbx, %rbx
je 0xb834
leaq 0x41903(%rip), %r15     # 0x4d0d0
movq (%r15), %rax
notq %rax
andq %rbx, %rax
cmpq %rax, %rbx
je 0xb884
movq (%rax), %r14
movq (%r15), %rax
notq %rax
andq %rbx, %rax
movq %rbx, %rcx
subq %rax, %rcx
je 0xb894
shrq $0xc, %rcx
leaq 0x417be(%rip), %rdx     # 0x4cfc0
subq (%rdx), %rcx
movq 0x78(%rax,%rcx,8), %rax
movl %eax, %ecx
shrl $0x5, %ecx
movl $0xff, %edx
andl %edx, %ecx
cmpl %edx, %ecx
je 0xb8a0
movl %ecx, %eax
leaq 0x2fe19(%rip), %rcx     # 0x3b640
movq (%rcx,%rax,8), %rax
lock
xaddq %rax, 0x90(%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x208ea
testb %al, %al
je 0xb774
xorl %ebx, %ebx
jmp 0xb834
movq %rbx, %rdi
callq 0xb8ec
movl %eax, %r15d
jmp 0xb795
xorl %esi, %esi
lock
xaddq %rsi, (%rax)
testq %rsi, %rsi
jne 0xb7a8
xorl %edi, %edi
xorl %esi, %esi
callq 0x1ae84
movq %rax, %rsi
jmp 0xb7a8
movq %rbx, %rdi
callq 0x2e39f
movq %rax, %r14
jmp 0xb7e2
xorl %edi, %edi
movq %rbx, %rsi
callq 0x2e4e2
jmp 0xb82b
shrq %rax
andq $-0x1000, %rax          # imm = 0xF000
addq $-0x1000, %rax          # imm = 0xF000
jmp 0xb82b
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/include/jemalloc/internal/jemalloc_internal.h
// Function: imemalign.cold.3
JEMALLOC_ALWAYS_INLINE size_t
s2u(size_t size)
{

	assert(size > 0);
	if (likely(size <= LOOKUP_MAXCLASS))
		return (s2u_lookup(size));
	return (s2u_compute(size));
}

// Assembly:
cmpq $0x1001, %rdi           # imm = 0x1001
jae 0xbafe
leaq -0x1(%rsi), %rax
shrq $0x3, %rax
leaq 0x302df(%rip), %rcx     # 0x3bdc0
movzbl (%rax,%rcx), %eax
leaq 0x2fb54(%rip), %rcx     # 0x3b640
movq (%rcx,%rax,8), %rax
movq %rax, (%rdx)
cmpq %rsi, %rax
jae 0xbafb
movb $0x1, %al
retq
xorl %eax, %eax
retq
movabsq $0x7000000000000000, %rax # imm = 0x7000000000000000
cmpq %rax, %rdi
ja 0xbb3d
leaq -0x1(,%rsi,2), %rax
bsrq %rax, %rax
movl %eax, %ecx
addb $-0x3, %cl
pushq $-0x1
popq %rdi
shlq %cl, %rdi
cmpl $0x6, %eax
notq %rdi
pushq $0x7
popq %rax
cmovaeq %rdi, %rax
leaq (%rax,%rsi), %rcx
notq %rax
andq %rcx, %rax
jmp 0xbaf0
xorl %eax, %eax
jmp 0xbaf0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/arena.c
// Function: je_arena_dalloc_small
void
arena_dalloc_small(tsdn_t *tsdn, arena_t *arena, arena_chunk_t *chunk,
    void *ptr, size_t pageind)
{
	arena_chunk_map_bits_t *bitselm;

	if (config_debug) {
		/* arena_ptr_small_binind_get() does extra sanity checking. */
		assert(arena_ptr_small_binind_get(ptr, arena_mapbits_get(chunk,
		    pageind)) != BININD_INVALID);
	}
	bitselm = arena_bitselm_get_mutable(chunk, pageind);
	arena_dalloc_bin(tsdn, arena, chunk, ptr, pageind, bitselm);
	arena_decay_tick(tsdn, arena);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x238bc
testq %r14, %r14
je 0xdfa8
movl (%rbx), %esi
movq 0x38(%r14), %rax
testq %rax, %rax
je 0xdfb0
cmpl %esi, 0x40(%r14)
jbe 0xdfb0
leaq (%rax,%rsi,8), %rax
testq %rax, %rax
je 0xdfa8
movl (%rax), %ecx
testl %ecx, %ecx
jle 0xdfba
leal -0x1(%rcx), %edx
movl %edx, (%rax)
testl %ecx, %ecx
jle 0xdfbf
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rdi
callq 0x1afa2
jmp 0xdf94
movl 0x4(%rax), %edx
jmp 0xdfa2
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x226c8
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/arena.c
// Function: je_arena_dalloc_large
void
arena_dalloc_large(tsdn_t *tsdn, arena_t *arena, arena_chunk_t *chunk,
    void *ptr)
{

	malloc_mutex_lock(tsdn, &arena->lock);
	arena_dalloc_large_locked_impl(tsdn, arena, chunk, ptr, false);
	malloc_mutex_unlock(tsdn, &arena->lock);
	arena_decay_tick(tsdn, arena);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x10(%rsi), %r13
movq %r13, %rdi
callq 0xb5a0
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movq %r15, %rcx
xorl %r8d, %r8d
callq 0x2396f
movq %r13, %rdi
callq 0xb380
testq %r14, %r14
je 0xe03e
movl (%rbx), %esi
movq 0x38(%r14), %rax
testq %rax, %rax
je 0xe048
cmpl %esi, 0x40(%r14)
jbe 0xe048
leaq (%rax,%rsi,8), %rax
testq %rax, %rax
je 0xe03e
movl (%rax), %ecx
testl %ecx, %ecx
jle 0xe052
leal -0x1(%rcx), %edx
movl %edx, (%rax)
testl %ecx, %ecx
jle 0xe057
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r14, %rdi
callq 0x1afa2
jmp 0xe02a
movl 0x4(%rax), %edx
jmp 0xe038
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x226c8
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/arena.c
// Function: arena_avail_insert
static void
arena_avail_insert(arena_t *arena, arena_chunk_t *chunk, size_t pageind,
    size_t npages)
{
	pszind_t pind = psz2ind(run_quantize_floor(arena_miscelm_size_get(
	    arena_miscelm_get_const(chunk, pageind))));
	assert(npages == (arena_mapbits_unallocated_size_get(chunk, pageind) >>
	    LG_PAGE));
	assert((npages << LG_PAGE) < chunksize);
	assert(pind2sz(pind) <= chunksize);
	arena_run_heap_insert(&arena->runs_avail[pind],
	    arena_miscelm_get_mutable(chunk, pageind));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x3dd9b(%rip), %rcx     # 0x4cfc8
imulq $0x60, %rdx, %rax
addq %rsi, %rax
addq %rcx, %rax
xorl %r15d, %r15d
xorl %edx, %edx
subq 0x3dd7d(%rip), %rdx     # 0x4cfc0
imulq $0x60, %rdx, %r14
addq %rax, %r14
leaq 0x3de7f(%rip), %rax     # 0x4d0d0
movq (%rax), %rsi
notq %rsi
andq %r14, %rsi
addq %rsi, %rcx
movq %r14, %rax
subq %rcx, %rax
pushq $0x60
popq %rcx
xorl %edx, %edx
divq %rcx
movq 0x78(%rsi,%rax,8), %rdi
shrq %rdi
andq $-0x1000, %rdi          # imm = 0xF000
callq 0xf31c
movabsq $0x7000000000000000, %rcx # imm = 0x7000000000000000
cmpq %rcx, %rax
ja 0xf315
leaq -0x1(,%rax,2), %rcx
bsrq %rcx, %rcx
movl %ecx, %edx
subl $0xe, %edx
cmovbl %r15d, %edx
movl %ecx, %esi
addb $-0x3, %sil
cmpl $0xf, %ecx
movzbl %sil, %esi
pushq $0xc
popq %rcx
cmovael %esi, %ecx
decq %rax
shrq %cl, %rax
shlq %cl, %rax
shrq %cl, %rax
andl $0x3, %eax
leal (%rax,%rdx,4), %ecx
andq $0x0, 0x10(%r14)
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq 0x2318(%rbx,%rcx,8), %rax
testq %rax, %rax
je 0xf302
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0xf2f9
movq %r14, (%rcx)
movq %rax, (%r14)
addq $0x8, %rax
jmp 0xf30c
leaq (%rbx,%rcx,8), %rax
addq $0x2318, %rax           # imm = 0x2318
movq %r14, (%rax)
popq %rbx
popq %r14
popq %r15
retq
movl $0xc7, %ecx
jmp 0xf2cc
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/arena.c
// Function: arena_avail_remove
static void
arena_avail_remove(arena_t *arena, arena_chunk_t *chunk, size_t pageind,
    size_t npages)
{
	pszind_t pind = psz2ind(run_quantize_floor(arena_miscelm_size_get(
	    arena_miscelm_get_const(chunk, pageind))));
	assert(npages == (arena_mapbits_unallocated_size_get(chunk, pageind) >>
	    LG_PAGE));
	assert((npages << LG_PAGE) < chunksize);
	assert(pind2sz(pind) <= chunksize);
	arena_run_heap_remove(&arena->runs_avail[pind],
	    arena_miscelm_get_mutable(chunk, pageind));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x3dc29(%rip), %rcx     # 0x4cfc8
imulq $0x60, %rdx, %rax
addq %rsi, %rax
addq %rcx, %rax
xorl %r15d, %r15d
xorl %edx, %edx
subq 0x3dc0b(%rip), %rdx     # 0x4cfc0
imulq $0x60, %rdx, %r14
addq %rax, %r14
leaq 0x3dd0d(%rip), %rax     # 0x4d0d0
movq (%rax), %rsi
notq %rsi
andq %r14, %rsi
addq %rsi, %rcx
movq %r14, %rax
subq %rcx, %rax
pushq $0x60
popq %rcx
xorl %edx, %edx
divq %rcx
movq 0x78(%rsi,%rax,8), %rdi
shrq %rdi
andq $-0x1000, %rdi          # imm = 0xF000
callq 0xf31c
movabsq $0x7000000000000000, %rcx # imm = 0x7000000000000000
cmpq %rcx, %rax
ja 0xf452
leaq -0x1(,%rax,2), %rcx
bsrq %rcx, %rcx
movl %ecx, %edx
subl $0xe, %edx
cmovbl %r15d, %edx
movl %ecx, %esi
addb $-0x3, %sil
cmpl $0xf, %ecx
movzbl %sil, %esi
pushq $0xc
popq %rcx
cmovael %esi, %ecx
decq %rax
shrq %cl, %rax
shlq %cl, %rax
shrq %cl, %rax
andl $0x3, %eax
leal (%rax,%rdx,4), %eax
leaq (%rbx,%rax,8), %rdi
addq $0x2318, %rdi           # imm = 0x2318
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x25432
movl $0xc7, %eax
jmp 0xf43a
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/arena.c
// Function: arena_dalloc_bin_run
static void
arena_dalloc_bin_run(tsdn_t *tsdn, arena_t *arena, arena_chunk_t *chunk,
    arena_run_t *run, arena_bin_t *bin)
{

	assert(run != bin->runcur);

	malloc_mutex_unlock(tsdn, &bin->lock);
	/******************************/
	malloc_mutex_lock(tsdn, &arena->lock);
	arena_run_dalloc(tsdn, arena, run, true, false, false);
	malloc_mutex_unlock(tsdn, &arena->lock);
	/****************************/
	malloc_mutex_lock(tsdn, &bin->lock);
	if (config_stats)
		bin->stats.curruns--;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq %rcx, %rdi
callq 0xb380
leaq 0x10(%r15), %r13
movq %r13, %rdi
callq 0xb5a0
pushq $0x1
popq %rcx
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xf459
movq %r13, %rdi
callq 0xb380
movq %rbx, %rdi
callq 0xb5a0
decq 0xa0(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/arena.c
// Function: arena_run_alloc_large_helper
static arena_run_t *
arena_run_alloc_large_helper(arena_t *arena, size_t size, bool zero)
{
	arena_run_t *run = arena_run_first_best_fit(arena, size);
	if (run != NULL) {
		if (arena_run_split_large(arena, run, size, zero))
			run = NULL;
	}
	return (run);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
callq 0xf9f8
testq %rax, %rax
je 0xfe4e
movq %rax, %rbx
movzbl %bpl, %r8d
pushq $0x1
popq %rcx
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x25003
movl %eax, %ecx
xorl %eax, %eax
testb %cl, %cl
cmoveq %rbx, %rax
jmp 0xfe50
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/quarantine.c
// Function: quarantine_init
static quarantine_t *
quarantine_init(tsdn_t *tsdn, size_t lg_maxobjs)
{
	quarantine_t *quarantine;
	size_t size;

	size = offsetof(quarantine_t, objs) + ((ZU(1) << lg_maxobjs) *
	    sizeof(quarantine_obj_t));
	quarantine = (quarantine_t *)iallocztm(tsdn, size, size2index(size),
	    false, NULL, true, arena_get(TSDN_NULL, 0, true), true);
	if (quarantine == NULL)
		return (NULL);
	quarantine->curbytes = 0;
	quarantine->curobjs = 0;
	quarantine->first = 0;
	quarantine->lg_maxobjs = lg_maxobjs;

	return (quarantine);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
pushq $0x10
popq %rax
movl %ebx, %ecx
shlq %cl, %rax
movq %rdi, %r14
leaq 0x20(%rax), %r15
cmpq $0xfe0, %rax            # imm = 0xFE0
ja 0x11616
addq $0x1f, %rax
shrq $0x3, %rax
leaq 0x2a87d(%rip), %rcx     # 0x3bdc0
movzbl (%rcx,%rax), %ebp
leaq 0x3b062(%rip), %rax     # 0x4c5b0
movq (%rax), %rax
movq (%rax), %rsi
testq %rsi, %rsi
je 0x11625
movq %r14, %rdi
movq %r15, %rdx
movl %ebp, %ecx
xorl %r8d, %r8d
callq 0xd1d4
testq %rax, %rax
je 0x11601
movq %rax, %r15
leaq 0x3bb50(%rip), %r13     # 0x4d0d0
movq (%r13), %rax
notq %rax
andq %r15, %rax
cmpq %rax, %r15
je 0x11646
movq (%rax), %r12
movq (%r13), %rax
notq %rax
andq %r15, %rax
movq %r15, %rcx
subq %rax, %rcx
je 0x11656
shrq $0xc, %rcx
leaq 0x3ba09(%rip), %rdx     # 0x4cfc0
subq (%rdx), %rcx
movq 0x78(%rax,%rcx,8), %rax
movl %eax, %ecx
shrl $0x5, %ecx
movl $0xff, %edx
andl %edx, %ecx
cmpl %edx, %ecx
je 0x11666
movl %ecx, %eax
leaq 0x2a064(%rip), %rcx     # 0x3b640
movq (%rcx,%rax,8), %rax
lock
xaddq %rax, 0x90(%r12)
testq %r15, %r15
je 0x11601
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
andq $0x0, 0x10(%r15)
movq %rbx, 0x18(%r15)
jmp 0x11604
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
callq 0x1167a
movl %eax, %ebp
jmp 0x11547
xorl %esi, %esi
lock
xaddq %rsi, (%rax)
testq %rsi, %rsi
jne 0x1155d
xorl %edi, %edi
xorl %esi, %esi
callq 0x1ae84
movq %rax, %rsi
jmp 0x1155d
movq %r15, %rdi
callq 0x2e39f
movq %rax, %r12
jmp 0x11596
movq %r14, %rdi
movq %r15, %rsi
callq 0x2e4e2
jmp 0x115e0
shrq %rax
andq $-0x1000, %rax          # imm = 0xF000
addq $-0x1000, %rax          # imm = 0xF000
jmp 0x115e0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/tcache.c
// Function: je_tcaches_create
bool
tcaches_create(tsd_t *tsd, unsigned *r_ind)
{
	arena_t *arena;
	tcache_t *tcache;
	tcaches_t *elm;

	if (tcaches == NULL) {
		tcaches = base_alloc(tsd_tsdn(tsd), sizeof(tcache_t *) *
		    (MALLOCX_TCACHE_MAX+1));
		if (tcaches == NULL)
			return (true);
	}

	if (tcaches_avail == NULL && tcaches_past > MALLOCX_TCACHE_MAX)
		return (true);
	arena = arena_ichoose(tsd, NULL);
	if (unlikely(arena == NULL))
		return (true);
	tcache = tcache_create(tsd_tsdn(tsd), arena);
	if (tcache == NULL)
		return (true);

	if (tcaches_avail != NULL) {
		elm = tcaches_avail;
		tcaches_avail = tcaches_avail->next;
		elm->tcache = tcache;
		*r_ind = (unsigned)(elm - tcaches);
	} else {
		elm = &tcaches[tcaches_past];
		elm->tcache = tcache;
		*r_ind = tcaches_past;
		tcaches_past++;
	}

	return (false);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0x0, 0x3ba4c(%rip)     # 0x4d488
jne 0x11a57
movl $0x7ff0, %esi           # imm = 0x7FF0
movq %r14, %rdi
callq 0xff71
movq %rax, 0x3ba36(%rip)     # 0x4d488
testq %rax, %rax
je 0x11ab3
cmpq $0x0, 0x3ba31(%rip)     # 0x4d490
movb $0x1, %bpl
jne 0x11a70
cmpl $0xffd, 0x3ba2a(%rip)   # imm = 0xFFD
ja 0x11ad6
movq 0x28(%r14), %rsi
testq %rsi, %rsi
je 0x11add
testq %rsi, %rsi
je 0x11ad6
movq %r14, %rdi
callq 0x11700
testq %rax, %rax
je 0x11ad6
movq 0x3b9fe(%rip), %rcx     # 0x4d490
testq %rcx, %rcx
je 0x11ab8
movq (%rcx), %rdx
movq %rdx, 0x3b9ef(%rip)     # 0x4d490
movq %rax, (%rcx)
subq 0x3b9dd(%rip), %rcx     # 0x4d488
shrq $0x3, %rcx
movl %ecx, (%rbx)
jmp 0x11ad4
movb $0x1, %bpl
jmp 0x11ad6
movq 0x3b9c9(%rip), %rcx     # 0x4d488
movl 0x3b9d3(%rip), %edx     # 0x4d498
movq %rax, (%rcx,%rdx,8)
movl %edx, (%rbx)
leal 0x1(%rdx), %eax
movl %eax, 0x3b9c4(%rip)     # 0x4d498
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x1b0d1
movq %rax, %rsi
jmp 0x11a79
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/ae.c
// Function: aeCreateEventLoop
aeEventLoop *aeCreateEventLoop(int setsize) {
    aeEventLoop *eventLoop;
    int i;

    if ((eventLoop = zmalloc(sizeof(*eventLoop))) == NULL) goto err;
    eventLoop->events = zmalloc(sizeof(aeFileEvent)*setsize);
    eventLoop->fired = zmalloc(sizeof(aeFiredEvent)*setsize);
    if (eventLoop->events == NULL || eventLoop->fired == NULL) goto err;
    eventLoop->setsize = setsize;
    eventLoop->lastTime = time(NULL);
    eventLoop->timeEventHead = NULL;
    eventLoop->timeEventNextId = 0;
    eventLoop->stop = 0;
    eventLoop->maxfd = -1;
    eventLoop->beforesleep = NULL;
    if (aeApiCreate(eventLoop) == -1) goto err;
    /* Events with mask == AE_NONE are not set. So let's initialize the
     * vector with it. */
    for (i = 0; i < setsize; i++)
        eventLoop->events[i].mask = AE_NONE;
    return eventLoop;

err:
    if (eventLoop) {
        zfree(eventLoop->events);
        zfree(eventLoop->fired);
        zfree(eventLoop);
    }
    return NULL;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edi, %ebp
movl $0x48, %edi
callq 0x15d39
testq %rax, %rax
je 0x1285a
movq %rax, %rbx
movslq %ebp, %r14
movq %r14, %rdi
shlq $0x5, %rdi
callq 0x15d39
movq %rax, 0x18(%rbx)
shlq $0x3, %r14
movq %r14, %rdi
callq 0x15d39
movq %rax, 0x20(%rbx)
cmpq $0x0, 0x18(%rbx)
sete %cl
testq %rax, %rax
sete %al
orb %cl, %al
jne 0x12840
movl %ebp, 0x4(%rbx)
xorl %r14d, %r14d
xorl %edi, %edi
callq 0xb350
movq %rax, 0x10(%rbx)
movq %r14, 0x28(%rbx)
movq %r14, 0x8(%rbx)
movl $0x0, 0x30(%rbx)
movl $0xffffffff, (%rbx)     # imm = 0xFFFFFFFF
movq %r14, 0x40(%rbx)
movl $0x10, %edi
callq 0x15d39
testq %rax, %rax
je 0x12840
movq %rax, %r14
movslq 0x4(%rbx), %rax
shlq $0x2, %rax
leaq (%rax,%rax,2), %rdi
callq 0x15d39
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x12838
movl $0x400, %edi            # imm = 0x400
callq 0xb4e0
movl %eax, (%r14)
cmpl $-0x1, %eax
je 0x1282f
movq %r14, 0x38(%rbx)
testl %ebp, %ebp
jle 0x1285c
movq 0x18(%rbx), %rax
movl %ebp, %ecx
shlq $0x5, %rcx
xorl %edx, %edx
movl $0x0, (%rax,%rdx)
addq $0x20, %rdx
cmpq %rdx, %rcx
jne 0x1281d
jmp 0x1285c
movq 0x8(%r14), %rdi
callq 0x15e7b
movq %r14, %rdi
callq 0x15e7b
movq 0x18(%rbx), %rdi
callq 0x15e7b
movq 0x20(%rbx), %rdi
callq 0x15e7b
movq %rbx, %rdi
callq 0x15e7b
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/ae.c
// Function: aeResizeSetSize
int aeResizeSetSize(aeEventLoop *eventLoop, int setsize) {
    int i;

    if (setsize == eventLoop->setsize) return AE_OK;
    if (eventLoop->maxfd >= setsize) return AE_ERR;
    if (aeApiResize(eventLoop,setsize) == -1) return AE_ERR;

    eventLoop->events = zrealloc(eventLoop->events,sizeof(aeFileEvent)*setsize);
    eventLoop->fired = zrealloc(eventLoop->fired,sizeof(aeFiredEvent)*setsize);
    eventLoop->setsize = setsize;

    /* Make sure that if we created new slots, they are initialized with
     * an AE_NONE mask. */
    for (i = eventLoop->maxfd+1; i < setsize; i++)
        eventLoop->events[i].mask = AE_NONE;
    return AE_OK;
}

// Assembly:
cmpl %esi, 0x4(%rdi)
jne 0x12870
xorl %eax, %eax
retq
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %esi, (%rdi)
jge 0x1290a
movq 0x38(%r14), %r12
movq 0x8(%r12), %rdi
movslq %ebx, %r15
leaq (,%r15,4), %rax
leaq (%rax,%rax,2), %rsi
callq 0x15de5
movq %rax, 0x8(%r12)
movq 0x18(%r14), %rdi
movq %r15, %rsi
shlq $0x5, %rsi
callq 0x15de5
movq %rax, 0x18(%r14)
movq 0x20(%r14), %rdi
leaq (,%r15,8), %rsi
callq 0x15de5
movq %rax, 0x20(%r14)
movl %r15d, 0x4(%r14)
movslq (%r14), %rax
leal 0x1(%rax), %ecx
cmpl %r15d, %ecx
jge 0x12908
movq 0x18(%r14), %rcx
movq %rax, %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
addq $0x20, %rcx
notl %eax
addl %ebx, %eax
movl $0x0, (%rcx)
addq $0x20, %rcx
decl %eax
jne 0x128fa
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/ae.c
// Function: aeDeleteEventLoop
void aeDeleteEventLoop(aeEventLoop *eventLoop) {
    aeApiFree(eventLoop);
    zfree(eventLoop->events);
    zfree(eventLoop->fired);
    zfree(eventLoop);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x38(%rdi), %r14
movl (%r14), %edi
callq 0xb240
movq 0x8(%r14), %rdi
callq 0x15e7b
movq %r14, %rdi
callq 0x15e7b
movq 0x18(%rbx), %rdi
callq 0x15e7b
movq 0x20(%rbx), %rdi
callq 0x15e7b
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x15e7b
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/ae.c
// Function: aeCreateFileEvent
int aeCreateFileEvent(aeEventLoop *eventLoop, int fd, int mask,
        aeFileProc *proc, void *clientData)
{
    if (fd >= eventLoop->setsize) {
        errno = ERANGE;
        return AE_ERR;
    }
    aeFileEvent *fe = &eventLoop->events[fd];

    if (aeApiAddEvent(eventLoop, fd, mask) == -1)
        return AE_ERR;
    fe->mask |= mask;
    if (mask & AE_READABLE) fe->rfileProc = proc;
    if (mask & AE_WRITABLE) fe->wfileProc = proc;
    fe->clientData = clientData;
    if (fd > eventLoop->maxfd)
        eventLoop->maxfd = fd;
    return AE_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpl %esi, 0x4(%rdi)
jle 0x12a13
movq %rcx, %r12
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
movq %r8, (%rsp)
movslq %esi, %rdx
movq %rdx, %r15
shlq $0x5, %r15
movq 0x18(%rdi), %r13
movq 0x38(%rdi), %rax
leaq 0x8(%rsp), %rcx
movl $0x0, 0x8(%rcx)
movq $0x0, (%rcx)
movl (%r13,%r15), %esi
movl %esi, %edi
orl %ebp, %edi
movl %edi, %r8d
andl $0x1, %r8d
andl $0x2, %edi
leal (%r8,%rdi,2), %edi
movl %edi, (%rcx)
xorl %edi, %edi
testl %esi, %esi
setne %dil
leal 0x1(,%rdi,2), %esi
movl %edx, 0x4(%rcx)
movl (%rax), %edi
callq 0xb250
cmpl $-0x1, %eax
je 0x12a1e
addq %r15, %r13
orl %ebp, (%r13)
testb $0x1, %bpl
je 0x129f5
movq %r12, 0x8(%r13)
testb $0x2, %bpl
movq (%rsp), %rax
je 0x12a03
movq %r12, 0x10(%r13)
movq %rax, 0x18(%r13)
xorl %eax, %eax
cmpl %ebx, (%r14)
jge 0x12a23
movl %ebx, (%r14)
jmp 0x12a23
callq 0xb080
movl $0x22, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/ae.c
// Function: aeDeleteFileEvent
void aeDeleteFileEvent(aeEventLoop *eventLoop, int fd, int mask)
{
    if (fd >= eventLoop->setsize) return;
    aeFileEvent *fe = &eventLoop->events[fd];
    if (fe->mask == AE_NONE) return;

    aeApiDelEvent(eventLoop, fd, mask);
    fe->mask = fe->mask & (~mask);
    if (fd == eventLoop->maxfd && fe->mask == AE_NONE) {
        /* Update the max fd */
        int j;

        for (j = eventLoop->maxfd-1; j >= 0; j--)
            if (eventLoop->events[j].mask != AE_NONE) break;
        eventLoop->maxfd = j;
    }
}

// Assembly:
cmpl %esi, 0x4(%rdi)
jle 0x12af3
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %esi, %r14d
movq %rdi, %rbx
movq 0x18(%rdi), %r15
movslq %esi, %rax
shlq $0x5, %rax
cmpl $0x0, (%r15,%rax)
je 0x12ae9
movl %edx, %ebp
addq %rax, %r15
movq 0x38(%rbx), %rax
leaq 0x8(%rsp), %rcx
movl $0x0, 0x8(%rcx)
movq $0x0, (%rcx)
notl %ebp
movl (%r15), %edx
andl %ebp, %edx
movl %edx, %esi
andl $0x1, %esi
movl %edx, %edi
andl $0x2, %edi
leal (%rsi,%rdi,2), %esi
movl %esi, (%rcx)
movl %r14d, 0x4(%rcx)
movl (%rax), %edi
cmpl $0x1, %edx
movl $0x3, %esi
sbbl $0x0, %esi
movl %r14d, %edx
callq 0xb250
andl (%r15), %ebp
movl %ebp, (%r15)
movl (%rbx), %eax
cmpl %r14d, %eax
jne 0x12ae9
testl %ebp, %ebp
jne 0x12ae9
movl %eax, %ecx
sarl $0x1f, %ecx
andl %eax, %ecx
decl %ecx
leaq -0x1(%rax), %rdx
testl %eax, %eax
jle 0x12ae5
movq 0x18(%rbx), %rsi
movl %edx, %edi
shlq $0x5, %rdi
decl %eax
decq %rdx
cmpl $0x0, (%rsi,%rdi)
je 0x12aca
jmp 0x12ae7
movl %ecx, %eax
movl %eax, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/ae.c
// Function: aeCreateTimeEvent
long long aeCreateTimeEvent(aeEventLoop *eventLoop, long long milliseconds,
        aeTimeProc *proc, void *clientData,
        aeEventFinalizerProc *finalizerProc)
{
    long long id = eventLoop->timeEventNextId++;
    aeTimeEvent *te;

    te = zmalloc(sizeof(*te));
    if (te == NULL) return AE_ERR;
    te->id = id;
    aeAddMillisecondsToNow(milliseconds,&te->when_sec,&te->when_ms);
    te->timeProc = proc;
    te->finalizerProc = finalizerProc;
    te->clientData = clientData;
    te->next = eventLoop->timeEventHead;
    eventLoop->timeEventHead = te;
    return id;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, 0x10(%rsp)
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r14
movq 0x8(%rdi), %rbx
leaq 0x1(%rbx), %rax
movq %rax, 0x8(%rdi)
movl $0x38, %edi
callq 0x15d39
testq %rax, %rax
je 0x12bf1
movq %rax, %rbp
movq %rbx, (%rax)
movq %r12, 0x8(%rsp)
leaq 0x18(%rsp), %r12
movq %r12, %rdi
xorl %esi, %esi
callq 0xb200
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
movq %rcx, %rax
imulq 0x8(%r12)
movq %rdx, %rsi
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rsi
addq %rax, %rsi
movq %r15, %rax
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rdx
addq %rax, %rdx
imulq $0x3e8, %rdx, %rax      # imm = 0x3E8
addq (%r12), %rdx
subq %rax, %r15
leaq (%rsi,%r15), %rax
xorl %ecx, %ecx
cmpq $0x3e8, %rax            # imm = 0x3E8
setge %cl
leaq -0x3e8(%rsi,%r15), %rsi
cmovlq %rax, %rsi
addq %rdx, %rcx
movq %rcx, 0x8(%rbp)
movq %rsi, 0x10(%rbp)
movq %r13, 0x18(%rbp)
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rbp)
movq 0x8(%rsp), %rax
movq %rax, 0x28(%rbp)
movq 0x28(%r14), %rax
movq %rax, 0x30(%rbp)
movq %rbp, 0x28(%r14)
jmp 0x12bf8
movq $-0x1, %rbx
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/ae.c
// Function: aeDeleteTimeEvent
int aeDeleteTimeEvent(aeEventLoop *eventLoop, long long id)
{
    aeTimeEvent *te = eventLoop->timeEventHead;
    while(te) {
        if (te->id == id) {
            te->id = AE_DELETED_EVENT_ID;
            return AE_OK;
        }
        te = te->next;
    }
    return AE_ERR; /* NO event with the specified ID found */
}

// Assembly:
movq 0x28(%rdi), %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rcx, %rcx
je 0x12c2c
cmpq %rsi, (%rcx)
je 0x12c23
movq 0x30(%rcx), %rcx
jmp 0x12c13
movq $-0x1, (%rcx)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/ae.c
// Function: aeWait
int aeWait(int fd, int mask, long long milliseconds) {
    struct pollfd pfd;
    int retmask = 0, retval;

    memset(&pfd, 0, sizeof(pfd));
    pfd.fd = fd;
    if (mask & AE_READABLE) pfd.events |= POLLIN;
    if (mask & AE_WRITABLE) pfd.events |= POLLOUT;

    if ((retval = poll(&pfd, 1, milliseconds))== 1) {
        if (pfd.revents & POLLIN) retmask |= AE_READABLE;
        if (pfd.revents & POLLOUT) retmask |= AE_WRITABLE;
	if (pfd.revents & POLLERR) retmask |= AE_WRITABLE;
        if (pfd.revents & POLLHUP) retmask |= AE_WRITABLE;
        return retmask;
    } else {
        return retval;
    }
}

// Assembly:
pushq %rax
movq $0x0, (%rsp)
movl %edi, (%rsp)
testb $0x1, %sil
je 0x1305b
orb $0x1, 0x4(%rsp)
testb $0x2, %sil
je 0x13066
orb $0x4, 0x4(%rsp)
movq %rsp, %rdi
movl $0x1, %esi
callq 0xb400
cmpl $0x1, %eax
jne 0x13096
movzwl 0x6(%rsp), %ecx
movl %ecx, %eax
andl $0x1, %eax
movl %ecx, %edx
shrl %edx
andl $0x2, %edx
orl %eax, %edx
movl %edx, %eax
orl $0x2, %eax
testb $0x18, %cl
cmovel %edx, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/ae.c
// Function: aeMain
void aeMain(aeEventLoop *eventLoop) {
    eventLoop->stop = 0;
    while (!eventLoop->stop) {
        if (eventLoop->beforesleep != NULL)
            eventLoop->beforesleep(eventLoop);
        aeProcessEvents(eventLoop, AE_ALL_EVENTS);
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x0, 0x30(%rdi)
movq 0x40(%rbx), %rax
testq %rax, %rax
je 0x130b1
movq %rbx, %rdi
callq *%rax
movq %rbx, %rdi
movl $0x3, %esi
callq 0x12c2d
cmpl $0x0, 0x30(%rbx)
je 0x130a3
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/anet.c
// Function: anetSetBlock
int anetSetBlock(char *err, int fd, int non_block) {
    int flags;

    /* Set the socket blocking (if non_block is zero) or non-blocking.
     * Note that fcntl(2) for F_GETFL and F_SETFL can't be
     * interrupted by a signal. */
    if ((flags = fcntl(fd, F_GETFL)) == -1) {
        anetSetError(err, "fcntl(F_GETFL): %s", strerror(errno));
        return ANET_ERR;
    }

    if (non_block)
        flags |= O_NONBLOCK;
    else
        flags &= ~O_NONBLOCK;

    if (fcntl(fd, F_SETFL, flags) == -1) {
        anetSetError(err, "fcntl(F_SETFL,O_NONBLOCK): %s", strerror(errno));
        return ANET_ERR;
    }
    return ANET_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r15d
movl %esi, %r14d
movq %rdi, %rbx
xorl %ebp, %ebp
movl %esi, %edi
movl $0x3, %esi
xorl %eax, %eax
callq 0xb440
cmpl $-0x1, %eax
je 0x13128
xorl %edx, %edx
testl %r15d, %r15d
setne %dl
andl $0xfffff7ff, %eax       # imm = 0xFFFFF7FF
shll $0xb, %edx
orl %eax, %edx
movl %r14d, %edi
movl $0x4, %esi
xorl %eax, %eax
callq 0xb440
cmpl $-0x1, %eax
jne 0x13150
leaq 0x25ef7(%rip), %r14     # 0x3901d
jmp 0x1312f
leaq 0x25edb(%rip), %r14     # 0x3900a
callq 0xb080
movl (%rax), %edi
callq 0xb560
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1315d
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/anet.c
// Function: anetKeepAlive
int anetKeepAlive(char *err, int fd, int interval)
{
    int val = 1;

    if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &val, sizeof(val)) == -1)
    {
        anetSetError(err, "setsockopt SO_KEEPALIVE: %s", strerror(errno));
        return ANET_ERR;
    }

#ifdef __linux__
    /* Default settings are more or less garbage, with the keepalive time
     * set to 7200 by default on Linux. Modify settings to make the feature
     * actually useful. */

    /* Send first probe after interval. */
    val = interval;
    if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &val, sizeof(val)) < 0) {
        anetSetError(err, "setsockopt TCP_KEEPIDLE: %s\n", strerror(errno));
        return ANET_ERR;
    }

    /* Send next probes after the specified interval. Note that we set the
     * delay as interval / 3, as we send three probes before detecting
     * an error (see the next setsockopt call). */
    val = interval/3;
    if (val == 0) val = 1;
    if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, &val, sizeof(val)) < 0) {
        anetSetError(err, "setsockopt TCP_KEEPINTVL: %s\n", strerror(errno));
        return ANET_ERR;
    }

    /* Consider the socket in error state after three we send three ACK
     * probes without getting a reply. */
    val = 3;
    if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPCNT, &val, sizeof(val)) < 0) {
        anetSetError(err, "setsockopt TCP_KEEPCNT: %s\n", strerror(errno));
        return ANET_ERR;
    }
#else
    ((void) interval); /* Avoid unused var warning for non Linux systems. */
#endif

    return ANET_OK;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
leaq 0xc(%rsp), %rcx
movl $0x1, (%rcx)
movl %esi, %edi
movl $0x1, %esi
movl $0x9, %edx
movl $0x4, %r8d
callq 0xb100
cmpl $-0x1, %eax
je 0x132e4
leaq 0xc(%rsp), %rcx
movl %r14d, (%rcx)
movl %ebp, %edi
movl $0x6, %esi
movl $0x4, %edx
movl $0x4, %r8d
callq 0xb100
testl %eax, %eax
js 0x132ed
movslq %r14d, %rax
imulq $0x55555556, %rax, %rax # imm = 0x55555556
movq %rax, %rcx
shrq $0x3f, %rcx
shrq $0x20, %rax
addl %ecx, %eax
addl $0x2, %r14d
cmpl $0x5, %r14d
movl $0x1, %edx
cmovael %eax, %edx
leaq 0xc(%rsp), %rcx
movl %edx, (%rcx)
movl %ebp, %edi
movl $0x6, %esi
movl $0x5, %edx
movl $0x4, %r8d
callq 0xb100
testl %eax, %eax
js 0x132f6
leaq 0xc(%rsp), %rcx
movl $0x3, (%rcx)
movl %ebp, %edi
movl $0x6, %esi
movl $0x6, %edx
movl $0x4, %r8d
callq 0xb100
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jns 0x1331e
leaq 0x25db0(%rip), %r14     # 0x39092
jmp 0x132fd
leaq 0x25d50(%rip), %r14     # 0x3903b
jmp 0x132fd
leaq 0x25d63(%rip), %r14     # 0x39057
jmp 0x132fd
leaq 0x25d77(%rip), %r14     # 0x39074
callq 0xb080
movl (%rax), %edi
callq 0xb560
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1315d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/anet.c
// Function: anetSendTimeout
int anetSendTimeout(char *err, int fd, long long ms) {
    struct timeval tv;

    tv.tv_sec = ms/1000;
    tv.tv_usec = (ms%1000)*1000;
    if (setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv)) == -1) {
        anetSetError(err, "setsockopt SO_SNDTIMEO: %s", strerror(errno));
        return ANET_ERR;
    }
    return ANET_OK;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r8
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
movq %rdx, %rax
imulq %rcx
movq %rdi, %rbx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rdx
addq %rax, %rdx
movq %rsp, %rcx
movq %rdx, (%rcx)
imulq $0x3e8, %rdx, %rax      # imm = 0x3E8
subq %rax, %r8
imulq $0x3e8, %r8, %rax       # imm = 0x3E8
movq %rax, 0x8(%rcx)
movl %esi, %edi
movl $0x1, %esi
movl $0x15, %edx
movl $0x10, %r8d
callq 0xb100
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
jne 0x134cd
callq 0xb080
movl (%rax), %edi
callq 0xb560
leaq 0x25c0c(%rip), %rsi     # 0x390c7
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1315d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/anet.c
// Function: anetGenericResolve
int anetGenericResolve(char *err, char *host, char *ipbuf, size_t ipbuf_len,
                       int flags)
{
    struct addrinfo hints, *info;
    int rv;

    memset(&hints,0,sizeof(hints));
    if (flags & ANET_IP_ONLY) hints.ai_flags = AI_NUMERICHOST;
    hints.ai_family = AF_UNSPEC;
    hints.ai_socktype = SOCK_STREAM;  /* specify socktype to avoid dups */

    if ((rv = getaddrinfo(host, NULL, &hints, &info)) != 0) {
        anetSetError(err, "%s", gai_strerror(rv));
        return ANET_ERR;
    }
    if (info->ai_family == AF_INET) {
        struct sockaddr_in *sa = (struct sockaddr_in *)info->ai_addr;
        inet_ntop(AF_INET, &(sa->sin_addr), ipbuf, ipbuf_len);
    } else {
        struct sockaddr_in6 *sa = (struct sockaddr_in6 *)info->ai_addr;
        inet_ntop(AF_INET6, &(sa->sin6_addr), ipbuf, ipbuf_len);
    }

    freeaddrinfo(info);
    return ANET_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r12
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x30(%rsp)
testb $0x1, %r8b
je 0x13507
movl $0x4, 0x10(%rsp)
movabsq $0x100000000, %rax      # imm = 0x100000000
leaq 0x10(%rsp), %rdx
movq %rax, 0x4(%rdx)
xorl %r15d, %r15d
leaq 0x8(%rsp), %rcx
movq %rsi, %rdi
xorl %esi, %esi
callq 0xb540
testl %eax, %eax
je 0x13553
movl %eax, %edi
callq 0xb1f0
leaq 0x25afa(%rip), %rsi     # 0x39038
movq %r12, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1315d
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
jmp 0x13588
movq 0x8(%rsp), %rax
xorl %ecx, %ecx
cmpl $0x2, 0x4(%rax)
setne %cl
movq 0x18(%rax), %rax
leal 0x2(,%rcx,8), %edi
leaq (%rax,%rcx,4), %rsi
addq $0x4, %rsi
movq %r14, %rdx
movl %ebx, %ecx
callq 0xb040
movq 0x8(%rsp), %rdi
callq 0xb5f0
movl %r15d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/anet.c
// Function: anetUnixGenericConnect
int anetUnixGenericConnect(char *err, char *path, int flags)
{
    int s;
    struct sockaddr_un sa;

    if ((s = anetCreateSocket(err,AF_LOCAL)) == ANET_ERR)
        return ANET_ERR;

    sa.sun_family = AF_LOCAL;
    strncpy(sa.sun_path,path,sizeof(sa.sun_path)-1);
    if (flags & ANET_CONNECT_NONBLOCK) {
        if (anetNonBlock(err,s) != ANET_OK)
            return ANET_ERR;
    }
    if (connect(s,(struct sockaddr*)&sa,sizeof(sa)) == -1) {
        if (errno == EINPROGRESS &&
            flags & ANET_CONNECT_NONBLOCK)
            return s;

        anetSetError(err, "connect: %s", strerror(errno));
        close(s);
        return ANET_ERR;
    }
    return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %r14
callq 0x138f5
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $-0x1, %eax
je 0x138e6
movl %eax, %ebp
leaq 0x4(%rsp), %rdi
movw $0x1, -0x2(%rdi)
movl $0x6b, %edx
movq %r12, %rsi
callq 0xb0a0
testb $0x1, %r15b
je 0x1389a
movq %r14, %rdi
movl %ebp, %esi
movl $0x1, %edx
callq 0x130d4
testl %eax, %eax
jne 0x138e6
leaq 0x2(%rsp), %rsi
movl %ebp, %edi
movl $0x6e, %edx
callq 0xb510
cmpl $-0x1, %eax
jne 0x138e4
callq 0xb080
movl (%rax), %edi
cmpl $0x73, %edi
sete %al
testb %al, %r15b
jne 0x138e4
callq 0xb560
leaq 0x25814(%rip), %rsi     # 0x390e2
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1315d
movl %ebp, %edi
callq 0xb240
jmp 0x138e6
movl %ebp, %ebx
movl %ebx, %eax
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/anet.c
// Function: anetCreateSocket
static int anetCreateSocket(char *err, int domain) {
    int s;
    if ((s = socket(domain, SOCK_STREAM, 0)) == -1) {
        anetSetError(err, "creating socket: %s", strerror(errno));
        return ANET_ERR;
    }

    /* Make sure connection-intensive things like the redis benchmark
     * will be able to close/open sockets a zillion of times */
    if (anetSetReuseAddr(err,s) == ANET_ERR) {
        close(s);
        return ANET_ERR;
    }
    return s;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0xb600
cmpl $-0x1, %eax
je 0x1392b
movl %eax, %ebp
movq %rbx, %rdi
movl %eax, %esi
callq 0x14099
cmpl $-0x1, %eax
jne 0x13950
movl %ebp, %edi
callq 0xb240
jmp 0x1394b
callq 0xb080
movl (%rax), %edi
callq 0xb560
leaq 0x257ee(%rip), %rsi     # 0x3912c
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1315d
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/anet.c
// Function: anetRead
int anetRead(int fd, char *buf, int count)
{
    ssize_t nread, totlen = 0;
    while(totlen != count) {
        nread = read(fd,buf,count-totlen);
        if (nread == 0) return totlen;
        if (nread == -1) return -1;
        totlen += nread;
        buf += nread;
    }
    return totlen;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testl %edx, %edx
je 0x139a7
movq %rsi, %r14
movl %edi, %ebp
movslq %edx, %r15
xorl %ebx, %ebx
movq %r15, %rdx
subq %rbx, %rdx
movl %ebp, %edi
movq %r14, %rsi
callq 0xb280
cmpq $-0x1, %rax
je 0x139ab
testq %rax, %rax
je 0x139b0
addq %rax, %rbx
addq %rax, %r14
cmpq %r15, %rbx
jne 0x1397f
jmp 0x139b0
xorl %ebx, %ebx
jmp 0x139b0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/anet.c
// Function: anetWrite
int anetWrite(int fd, char *buf, int count)
{
    ssize_t nwritten, totlen = 0;
    while(totlen != count) {
        nwritten = write(fd,buf,count-totlen);
        if (nwritten == 0) return totlen;
        if (nwritten == -1) return -1;
        totlen += nwritten;
        buf += nwritten;
    }
    return totlen;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testl %edx, %edx
je 0x139fa
movq %rsi, %r14
movl %edi, %ebp
movslq %edx, %r15
xorl %ebx, %ebx
movq %r15, %rdx
subq %rbx, %rdx
movl %ebp, %edi
movq %r14, %rsi
callq 0xb150
cmpq $-0x1, %rax
je 0x139fe
testq %rax, %rax
je 0x13a03
addq %rax, %rbx
addq %rax, %r14
cmpq %r15, %rbx
jne 0x139d2
jmp 0x13a03
xorl %ebx, %ebx
jmp 0x13a03
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq