LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/prof.c
// Function: prof_printf
static bool
prof_printf(bool propagate_err, const char *format, ...)
{
	bool ret;
	va_list ap;
	char buf[PROF_PRINTF_BUFSIZE];

	va_start(ap, format);
	malloc_vsnprintf(buf, sizeof(buf), format, ap);
	va_end(ap);
	ret = prof_write(propagate_err, buf);

	return (ret);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movq %rsi, %r10
movl %edi, %ebx
leaq 0x20(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x8d6b5
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rsp, %rcx
movq %rax, (%rcx)
leaq 0x170(%rsp), %rax
movq %rax, 0x8(%rcx)
movq %rsi, 0x10(%rcx)
leaq 0xd0(%rsp), %r14
movl $0x80, %esi
movq %r14, %rdi
movq %r10, %rdx
callq 0x91465
movl %ebx, %edi
movq %r14, %rsi
callq 0x8d763
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/prof.c
// Function: prof_flush
static bool
prof_flush(bool propagate_err)
{
	bool ret = false;
	ssize_t err;

	cassert(config_prof);

	err = write(prof_dump_fd, prof_dump_buf, prof_dump_buf_end);
	if (err == -1) {
		if (propagate_err == false) {
			malloc_write("<jemalloc>: write() failed during heap "
			    "profile flush\n");
			if (opt_abort)
				abort();
		}
		ret = true;
	}
	prof_dump_buf_end = 0;

	return (ret);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edi, %ebp
movl 0x5345b(%rip), %edi     # 0xe0b68
movl 0x53459(%rip), %edx     # 0xe0b6c
leaq 0x53456(%rip), %rsi     # 0xe0b70
callq 0x1fb30
movq %rax, %rbx
cmpq $-0x1, %rax
setne %al
orb %bpl, %al
jne 0x8d746
leaq 0x15f00(%rip), %rdi     # 0xa3635
callq 0x9124c
leaq 0x51419(%rip), %rax     # 0xdeb5a
cmpb $0x1, (%rax)
je 0x8d75e
cmpq $-0x1, %rbx
sete %al
movl $0x0, 0x53415(%rip)     # 0xe0b6c
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x1f1b0
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/prof.c
// Function: prof_write
static bool
prof_write(bool propagate_err, const char *s)
{
	unsigned i, slen, n;

	cassert(config_prof);

	i = 0;
	slen = strlen(s);
	while (i < slen) {
		/* Flush the buffer if it is full. */
		if (prof_dump_buf_end == PROF_DUMP_BUFSIZE)
			if (prof_flush(propagate_err) && propagate_err)
				return (true);

		if (prof_dump_buf_end + slen <= PROF_DUMP_BUFSIZE) {
			/* Finish writing. */
			n = slen - i;
		} else {
			/* Write as much of s as will fit. */
			n = PROF_DUMP_BUFSIZE - prof_dump_buf_end;
		}
		memcpy(&prof_dump_buf[prof_dump_buf_end], &s[i], n);
		prof_dump_buf_end += n;
		i += n;
	}

	return (false);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
movq %rsi, %rdi
callq 0x1f4f0
movq %rax, %r14
testl %r14d, %r14d
setne %r15b
je 0x8d7fd
xorl %r13d, %r13d
movzbl %bpl, %ebp
cmpl $0x10000, 0x533d4(%rip) # imm = 0x10000
jne 0x8d7a6
movl %ebp, %edi
callq 0x8d702
testb %bpl, %al
jne 0x8d7fd
movl 0x533bf(%rip), %r12d    # 0xe0b6c
leal (%r12,%r14), %eax
movl %r14d, %ecx
subl %r13d, %ecx
movl $0x10000, %r15d         # imm = 0x10000
subl %r12d, %r15d
cmpl $0x10001, %eax          # imm = 0x10001
cmovbl %ecx, %r15d
movq %r12, %rdi
leaq 0x5339d(%rip), %rax     # 0xe0b70
addq %rax, %rdi
movl %r13d, %esi
addq %rbx, %rsi
movq %r15, %rdx
callq 0x1fbd0
leal (%r15,%r12), %eax
movl %eax, 0x5337e(%rip)     # 0xe0b6c
addl %r13d, %r15d
movl %r15d, %r13d
cmpl %r14d, %r15d
setb %r15b
jb 0x8d78e
andb $0x1, %r15b
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/quarantine.c
// Function: quarantine_drain
static void
quarantine_drain(quarantine_t *quarantine, size_t upper_bound)
{

	while (quarantine->curbytes > upper_bound && quarantine->curobjs > 0) {
		quarantine_obj_t *obj = &quarantine->objs[quarantine->first];
		assert(obj->usize == isalloc(obj->ptr, config_prof));
		idalloc(obj->ptr);
		quarantine->curbytes -= obj->usize;
		quarantine->curobjs--;
		quarantine->first = (quarantine->first + 1) & ((ZU(1) <<
		    quarantine->lg_maxobjs) - 1);
	}
}

// Assembly:
cmpq %rsi, (%rdi)
jbe 0x8e059
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x20(%rdi), %r15
cmpq $0x0, 0x8(%r14)
je 0x8e04e
movq 0x10(%r14), %r12
shlq $0x4, %r12
movq (%r15,%r12), %rdi
callq 0x8dd43
movq (%r14), %rax
movq 0x10(%r14), %rdx
subq 0x8(%r15,%r12), %rax
movq %rax, (%r14)
decq 0x8(%r14)
incq %rdx
movb 0x18(%r14), %cl
movq $-0x1, %rsi
shlq %cl, %rsi
notq %rsi
andq %rdx, %rsi
movq %rsi, 0x10(%r14)
cmpq %rbx, %rax
ja 0x8e003
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/quarantine.c
// Function: quarantine_cleanup
static void
quarantine_cleanup(void *arg)
{
	quarantine_t *quarantine = *(quarantine_t **)arg;

	if (quarantine == QUARANTINE_STATE_REINCARNATED) {
		/*
		 * Another destructor deallocated memory after this destructor
		 * was called.  Reset quarantine to QUARANTINE_STATE_PURGATORY
		 * in order to receive another callback.
		 */
		quarantine = QUARANTINE_STATE_PURGATORY;
		quarantine_tsd_set(&quarantine);
	} else if (quarantine == QUARANTINE_STATE_PURGATORY) {
		/*
		 * The previous time this destructor was called, we set the key
		 * to QUARANTINE_STATE_PURGATORY so that other destructors
		 * wouldn't cause re-creation of the quarantine.  This time, do
		 * nothing, so that the destructor will not be called again.
		 */
	} else if (quarantine != NULL) {
		quarantine_drain(quarantine, 0);
		idalloc(quarantine);
		quarantine = QUARANTINE_STATE_PURGATORY;
		quarantine_tsd_set(&quarantine);
	}
}

// Assembly:
pushq %rbx
movq (%rdi), %rbx
cmpq $0x1, %rbx
je 0x8e189
testq $-0x3, %rbx
je 0x8e1cd
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8dfec
movq %rbx, %rdi
callq 0x8dd43
movq %fs:0x0, %rax
leaq -0x10(%rax), %rsi
movq $0x2, %fs:-0x10
movl 0x629c8(%rip), %edi     # 0xf0b74
callq 0x1f1c0
testl %eax, %eax
je 0x8e1cd
leaq 0x154dd(%rip), %rdi     # 0xa3699
callq 0x9124c
leaq 0x50992(%rip), %rax     # 0xdeb5a
cmpb $0x1, (%rax)
je 0x8e1cf
popq %rbx
retq
callq 0x1f1b0
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/tcache.c
// Function: tcache_event_hard
void
tcache_event_hard(tcache_t *tcache)
{
	size_t binind = tcache->next_gc_bin;
	tcache_bin_t *tbin = &tcache->tbins[binind];
	tcache_bin_info_t *tbin_info = &tcache_bin_info[binind];

	if (tbin->low_water > 0) {
		/*
		 * Flush (ceiling) 3/4 of the objects below the low water mark.
		 */
		if (binind < NBINS) {
			tcache_bin_flush_small(tbin, binind, tbin->ncached -
			    tbin->low_water + (tbin->low_water >> 2), tcache);
		} else {
			tcache_bin_flush_large(tbin, binind, tbin->ncached -
			    tbin->low_water + (tbin->low_water >> 2), tcache);
		}
		/*
		 * Reduce fill count by 2X.  Limit lg_fill_div such that the
		 * fill count is always at least 1.
		 */
		if ((tbin_info->ncached_max >> (tbin->lg_fill_div+1)) >= 1)
			tbin->lg_fill_div++;
	} else if (tbin->low_water < 0) {
		/*
		 * Increase fill count by 2X.  Make sure lg_fill_div stays
		 * greater than 0.
		 */
		if (tbin->lg_fill_div > 1)
			tbin->lg_fill_div--;
	}
	tbin->low_water = tbin->ncached;

	tcache->next_gc_bin++;
	if (tcache->next_gc_bin == nhbins)
		tcache->next_gc_bin = 0;
	tcache->ev_cnt = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x24(%rdi), %r15d
movq %r15, %rax
shlq $0x5, %rax
leaq (%rdi,%rax), %r14
addq $0x28, %r14
movl 0x8(%r14), %eax
testl %eax, %eax
jle 0x90863
movq 0x6034e(%rip), %r12     # 0xf0b90
movl %eax, %edx
shrl $0x2, %edx
subl %eax, %edx
addl 0x10(%r14), %edx
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rcx
cmpl $0x1b, %r15d
ja 0x90876
callq 0x908bd
jmp 0x9087b
jns 0x9088f
movl 0xc(%r14), %eax
cmpl $0x2, %eax
jb 0x9088f
decl %eax
movl %eax, 0xc(%r14)
jmp 0x9088f
callq 0x90ac1
movl (%r12,%r15,4), %eax
movl 0xc(%r14), %ecx
incl %ecx
shrl %cl, %eax
testl %eax, %eax
je 0x9088f
movl %ecx, 0xc(%r14)
movl 0x10(%r14), %eax
movl %eax, 0x8(%r14)
movl 0x24(%rbx), %eax
incl %eax
movl %eax, 0x24(%rbx)
xorl %ecx, %ecx
cmpq %rax, 0x602f0(%rip)     # 0xf0b98
cmovel %ecx, %eax
movl %eax, 0x24(%rbx)
movl %ecx, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/tcache.c
// Function: tcache_alloc_small_hard
void *
tcache_alloc_small_hard(tcache_t *tcache, tcache_bin_t *tbin, size_t binind)
{
	void *ret;

	arena_tcache_fill_small(tcache->arena, tbin, binind,
	    config_prof ? tcache->prof_accumbytes : 0);
	if (config_prof)
		tcache->prof_accumbytes = 0;
	ret = tcache_alloc_easy(tbin);

	return (ret);
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
movq 0x18(%rdi), %rdi
xorl %ecx, %ecx
callq 0x80210
movl 0x10(%rbx), %eax
testl %eax, %eax
je 0x90c5b
decl %eax
movl %eax, 0x10(%rbx)
cmpl 0x8(%rbx), %eax
jge 0x90c4f
movl %eax, 0x8(%rbx)
movq 0x18(%rbx), %rcx
movl %eax, %eax
movq (%rcx,%rax,8), %rax
jmp 0x90c64
movl $0xffffffff, 0x8(%rbx)  # imm = 0xFFFFFFFF
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/tcache.c
// Function: tcache_arena_dissociate
void
tcache_arena_dissociate(tcache_t *tcache)
{

	if (config_stats) {
		/* Unlink from list of extant tcaches. */
		malloc_mutex_lock(&tcache->arena->lock);
		ql_remove(&tcache->arena->tcache_ql, tcache, link);
		malloc_mutex_unlock(&tcache->arena->lock);
		tcache_stats_merge(tcache, tcache->arena);
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
addq $0x8, %rdi
callq 0x1faa0
movq 0x18(%rbx), %rdi
movq 0x78(%rdi), %rax
cmpq %rbx, %rax
jne 0x90cdd
movq (%rax), %rax
movq %rax, 0x78(%rdi)
cmpq %rbx, 0x78(%rdi)
je 0x90cfd
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq %rax, (%rcx)
movq (%rbx), %rax
movq %rcx, 0x8(%rax)
movq %rbx, (%rbx)
movq %rbx, 0x8(%rbx)
jmp 0x90d05
movq $0x0, 0x78(%rdi)
addq $0x8, %rdi
callq 0x1fbb0
movq 0x18(%rbx), %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x90d1b
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/tcache.c
// Function: tcache_create
tcache_t *
tcache_create(arena_t *arena)
{
	tcache_t *tcache;
	size_t size, stack_offset;
	unsigned i;

	size = offsetof(tcache_t, tbins) + (sizeof(tcache_bin_t) * nhbins);
	/* Naturally align the pointer stacks. */
	size = PTR_CEILING(size);
	stack_offset = size;
	size += stack_nelms * sizeof(void *);
	/*
	 * Round up to the nearest multiple of the cacheline size, in order to
	 * avoid the possibility of false cacheline sharing.
	 *
	 * That this works relies on the same logic as in ipalloc(), but we
	 * cannot directly call ipalloc() here due to tcache bootstrapping
	 * issues.
	 */
	size = (size + CACHELINE_MASK) & (-CACHELINE);

	if (size <= SMALL_MAXCLASS)
		tcache = (tcache_t *)arena_malloc_small(arena, size, true);
	else if (size <= tcache_maxclass)
		tcache = (tcache_t *)arena_malloc_large(arena, size, true);
	else
		tcache = (tcache_t *)icallocx(size, false, arena);

	if (tcache == NULL)
		return (NULL);

	tcache_arena_associate(tcache, arena);

	assert((TCACHE_NSLOTS_SMALL_MAX & 1U) == 0);
	for (i = 0; i < nhbins; i++) {
		tcache->tbins[i].lg_fill_div = 1;
		tcache->tbins[i].avail = (void **)((uintptr_t)tcache +
		    (uintptr_t)stack_offset);
		stack_offset += tcache_bin_info[i].ncached_max * sizeof(void *);
	}

	tcache_tsd_set(&tcache);

	return (tcache);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x5fdc3(%rip), %r15d    # 0xf0b98
shll $0x5, %r15d
addl $0x2f, %r15d
andl $-0x18, %r15d
movl 0x5fdb9(%rip), %eax     # 0xf0ba0
leaq (%r15,%rax,8), %r14
addq $0x3f, %r14
andq $-0x40, %r14
cmpq $0xe00, %r14            # imm = 0xE00
ja 0x90e0e
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x80961
jmp 0x90e64
cmpq 0x5fd93(%rip), %r14     # 0xf0ba8
jbe 0x90e32
leaq 0x4eb12(%rip), %rax     # 0xdf930
cmpq %r14, (%rax)
jae 0x90e37
movq %r14, %rdi
movl $0x1, %esi
callq 0x8b6a4
jmp 0x90e64
movq %rbx, %rdi
jmp 0x90e57
movq %rbx, %rdi
testq %rbx, %rbx
jne 0x90e57
movq 0x350f2(%rip), %rax     # 0xc5f38
movq %fs:(%rax), %rdi
testq %rdi, %rdi
jne 0x90e57
callq 0x7c332
movq %rax, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x80be1
movq %rax, %r14
testq %rax, %rax
je 0x90f06
movq %r14, %rdi
movq %rbx, %rsi
callq 0x90c66
movq 0x5fd16(%rip), %rax     # 0xf0b98
testq %rax, %rax
je 0x90ec1
leaq 0x28(%r14), %rcx
movl $0x1, %edx
xorl %esi, %esi
movq %rsi, %rdi
shlq $0x5, %rdi
movl $0x1, 0xc(%rcx,%rdi)
leaq (%r15,%r14), %r8
movq %r8, 0x18(%rcx,%rdi)
movq 0x5fcdf(%rip), %rdi     # 0xf0b90
movl (%rdi,%rsi,4), %esi
leaq (%r15,%rsi,8), %r15
movl %edx, %esi
incl %edx
cmpq %rsi, %rax
ja 0x90e92
movq %fs:0x0, %rax
leaq -0x8(%rax), %rsi
movq %r14, %fs:-0x8
movl 0x5fcd0(%rip), %edi     # 0xf0bb0
callq 0x1f1c0
testl %eax, %eax
je 0x90f09
leaq 0x121a6(%rip), %rdi     # 0xa3096
callq 0x9124c
leaq 0x4dc5e(%rip), %rax     # 0xdeb5a
cmpb $0x1, (%rax)
jne 0x90f09
callq 0x1f1b0
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/tcache.c
// Function: tcache_boot0
bool
tcache_boot0(void)
{
	unsigned i;

	/*
	 * If necessary, clamp opt_lg_tcache_max, now that arena_maxclass is
	 * known.
	 */
	if (opt_lg_tcache_max < 0 || (1U << opt_lg_tcache_max) < SMALL_MAXCLASS)
		tcache_maxclass = SMALL_MAXCLASS;
	else if ((1U << opt_lg_tcache_max) > arena_maxclass)
		tcache_maxclass = arena_maxclass;
	else
		tcache_maxclass = (1U << opt_lg_tcache_max);

	nhbins = NBINS + (tcache_maxclass >> LG_PAGE);

	/* Initialize tcache_bin_info. */
	tcache_bin_info = (tcache_bin_info_t *)base_alloc(nhbins *
	    sizeof(tcache_bin_info_t));
	if (tcache_bin_info == NULL)
		return (true);
	stack_nelms = 0;
	for (i = 0; i < NBINS; i++) {
		if ((arena_bin_info[i].nregs << 1) <= TCACHE_NSLOTS_SMALL_MAX) {
			tcache_bin_info[i].ncached_max =
			    (arena_bin_info[i].nregs << 1);
		} else {
			tcache_bin_info[i].ncached_max =
			    TCACHE_NSLOTS_SMALL_MAX;
		}
		stack_nelms += tcache_bin_info[i].ncached_max;
	}
	for (; i < nhbins; i++) {
		tcache_bin_info[i].ncached_max = TCACHE_NSLOTS_LARGE;
		stack_nelms += tcache_bin_info[i].ncached_max;
	}

	return (false);
}

// Assembly:
movq 0x38e4d(%rip), %rcx     # 0xc9f98
movl $0xe00, %eax            # imm = 0xE00
testq %rcx, %rcx
js 0x91172
cmpl $0xc, %ecx
jb 0x91172
movl $0x1, %eax
shll %cl, %eax
leaq 0x4e7c8(%rip), %rcx     # 0xdf930
movq (%rcx), %rcx
cmpq %rax, %rcx
cmovbq %rcx, %rax
pushq %rax
movq %rax, 0x5fa2e(%rip)     # 0xf0ba8
shrq $0xc, %rax
leaq 0x1c(%rax), %rcx
movq %rcx, 0x5fa0f(%rip)     # 0xf0b98
leaq 0x70(,%rax,4), %rdi
callq 0x85158
movq %rax, 0x5f9f3(%rip)     # 0xf0b90
testq %rax, %rax
je 0x91217
movl $0x0, 0x5f9f4(%rip)     # 0xf0ba0
leaq 0x4da4d(%rip), %rdx     # 0xdec00
addq $0x20, %rdx
xorl %esi, %esi
movl $0xc8, %edi
xorl %ecx, %ecx
movl (%rdx), %r8d
addl %r8d, %r8d
cmpl %edi, %r8d
cmovael %edi, %r8d
movl %r8d, (%rax,%rsi,4)
addl %r8d, %ecx
incq %rsi
addq $0x68, %rdx
cmpq $0x1c, %rsi
jne 0x911c0
movl %ecx, 0x5f9b9(%rip)     # 0xf0ba0
movq 0x5f9aa(%rip), %rdx     # 0xf0b98
cmpq $0x1d, %rdx
jb 0x91217
movl $0x1c, %edi
movl $0x1d, %esi
movl $0x14, (%rax,%rdi,4)
addl $0x14, %ecx
movl %esi, %edi
incl %esi
cmpq %rdi, %rdx
ja 0x911fe
movl %ecx, 0x5f989(%rip)     # 0xf0ba0
testq %rax, %rax
sete %al
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/util.c
// Function: buferror
int
buferror(char *buf, size_t buflen)
{

#ifdef _WIN32
	FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), 0,
	    (LPSTR)buf, buflen, NULL);
	return (0);
#elif defined(_GNU_SOURCE)
	char *b = strerror_r(errno, buf, buflen);
	if (b != buf) {
		strncpy(buf, b, buflen);
		buf[buflen-1] = '\0';
	}
	return (0);
#else
	return (strerror_r(errno, buf, buflen));
#endif
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x1f810
movl (%rax), %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1f380
cmpq %r14, %rax
je 0x912dd
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x1f9d0
movb $0x0, -0x1(%r14,%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/ckh.c
// Function: ckh_new
bool
ckh_new(ckh_t *ckh, size_t minitems, ckh_hash_t *hash, ckh_keycomp_t *keycomp)
{
	bool ret;
	size_t mincells, usize;
	unsigned lg_mincells;

	assert(minitems > 0);
	assert(hash != NULL);
	assert(keycomp != NULL);

#ifdef CKH_COUNT
	ckh->ngrows = 0;
	ckh->nshrinks = 0;
	ckh->nshrinkfails = 0;
	ckh->ninserts = 0;
	ckh->nrelocs = 0;
#endif
	ckh->prng_state = 42; /* Value doesn't really matter. */
	ckh->count = 0;

	/*
	 * Find the minimum power of 2 that is large enough to fit aBaseCount
	 * entries.  We are using (2+,2) cuckoo hashing, which has an expected
	 * maximum load factor of at least ~0.86, so 0.75 is a conservative load
	 * factor that will typically allow 2^aLgMinItems to fit without ever
	 * growing the table.
	 */
	assert(LG_CKH_BUCKET_CELLS > 0);
	mincells = ((minitems + (3 - (minitems % 3))) / 3) << 2;
	for (lg_mincells = LG_CKH_BUCKET_CELLS;
	    (ZU(1) << lg_mincells) < mincells;
	    lg_mincells++)
		; /* Do nothing. */
	ckh->lg_minbuckets = lg_mincells - LG_CKH_BUCKET_CELLS;
	ckh->lg_curbuckets = lg_mincells - LG_CKH_BUCKET_CELLS;
	ckh->hash = hash;
	ckh->keycomp = keycomp;

	usize = sa2u(sizeof(ckhc_t) << lg_mincells, CACHELINE);
	if (usize == 0) {
		ret = true;
		goto label_return;
	}
	ckh->tab = (ckhc_t *)ipalloc(usize, CACHELINE, true);
	if (ckh->tab == NULL) {
		ret = true;
		goto label_return;
	}

	ret = false;
label_return:
	return (ret);
}

// Assembly:
pushq %rbx
movq %rcx, %r8
movq %rdx, %r9
movq %rdi, %rbx
movl $0x2a, (%rdi)
movq $0x0, 0x8(%rdi)
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
movq %rsi, %rax
mulq %rcx
shrq %rdx
leaq (%rdx,%rdx,2), %rdx
movq %rsi, %rax
subq %rdx, %rax
xorq $0x3, %rax
addq %rsi, %rax
mulq %rcx
addq %rdx, %rdx
andq $-0x4, %rdx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
leal 0x3(%rax), %ecx
movl $0x1, %esi
shlq %cl, %rsi
incl %eax
cmpq %rdx, %rsi
jb 0x92753
movl %eax, 0x10(%rbx)
movl %eax, 0x14(%rbx)
movq %r9, 0x18(%rbx)
movl $0x10, %eax
shlq %cl, %rax
movq %r8, 0x20(%rbx)
leaq 0x3f(%rax), %rdi
andq $-0x40, %rdi
cmpq %rax, %rdi
jae 0x927a0
xorl %edi, %edi
testq %rdi, %rdi
je 0x927dc
callq 0x92822
movq %rax, 0x28(%rbx)
testq %rax, %rax
sete %al
jmp 0x927de
leaq 0x4d189(%rip), %rcx     # 0xdf930
movq (%rcx), %rcx
cmpq %rcx, %rdi
jbe 0x927e0
leaq 0xfff(%rax), %rdi
andq $-0x1000, %rdi          # imm = 0xF000
cmpq %rax, %rdi
jb 0x92788
cmpq %rcx, %rdi
jbe 0x9278a
leaq 0x4d0b2(%rip), %rax     # 0xdf880
movq (%rax), %rax
addq %rax, %rdi
notq %rax
andq %rax, %rdi
jmp 0x9278a
movb $0x1, %al
popq %rbx
retq
cmpq $0xe00, %rdi            # imm = 0xE00
ja 0x9280f
decq %rdi
shrq $0x3, %rdi
leaq 0x108c9(%rip), %rax     # 0xa30c0
movzbl (%rax,%rdi), %eax
imulq $0x68, %rax, %rax
leaq 0x4c3fa(%rip), %rcx     # 0xdec00
movq (%rcx,%rax), %rdi
jmp 0x9278a
addq $0xfff, %rdi            # imm = 0xFFF
andq $-0x1000, %rdi          # imm = 0xF000
jmp 0x9278a
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/ckh.c
// Function: ckh_insert
bool
ckh_insert(ckh_t *ckh, const void *key, const void *data)
{
	bool ret;

	assert(ckh != NULL);
	assert(ckh_search(ckh, key, NULL, NULL));

#ifdef CKH_COUNT
	ckh->ninserts++;
#endif

	while (ckh_try_insert(ckh, &key, &data)) {
		if (ckh_grow(ckh)) {
			ret = true;
			goto label_return;
		}
	}

	ret = false;
label_return:
	return (ret);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %rax
movq %rsi, (%rax)
leaq 0x18(%rsp), %rcx
movq %rdx, (%rcx)
movq %rax, %rsi
movq %rcx, %rdx
callq 0x9302f
testb %al, %al
je 0x9301e
movb %al, 0x7(%rsp)
movl 0x14(%rbx), %eax
movq %rax, 0x10(%rsp)
leal 0x2(%rax), %ebp
movq %rbp, %r14
incq %rbp
movl $0x10, %eax
movl %ebp, %ecx
shlq %cl, %rax
leaq 0x3f(%rax), %rdi
andq $-0x40, %rdi
cmpq %rax, %rdi
jae 0x92f37
xorl %edi, %edi
movl $0x4, %r15d
testq %rdi, %rdi
je 0x92ff9
callq 0x92822
testq %rax, %rax
je 0x92ff9
movq 0x28(%rbx), %rcx
movq %rax, 0x28(%rbx)
decl %r14d
movl %r14d, 0x14(%rbx)
movq 0x8(%rbx), %r14
movq $0x0, 0x8(%rbx)
testq %r14, %r14
setne %r13b
movq %rcx, 0x8(%rsp)
je 0x92fc4
leaq 0x8(%rcx), %r12
xorl %r15d, %r15d
movq -0x8(%r12), %rax
testq %rax, %rax
je 0x92f25
movq %rax, 0x30(%rsp)
movq (%r12), %rax
movq %rax, 0x28(%rsp)
movq %rbx, %rdi
leaq 0x30(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x9302f
testb %al, %al
jne 0x92fc0
incq %r15
addq $0x10, %r12
cmpq %r14, %r15
setb %r13b
jb 0x92ef0
jmp 0x92fc4
leaq 0x4c9f2(%rip), %rcx     # 0xdf930
movq (%rcx), %rcx
cmpq %rcx, %rdi
jbe 0x92f7e
leaq 0xfff(%rax), %rdi
andq $-0x1000, %rdi          # imm = 0xF000
cmpq %rax, %rdi
jb 0x92e9d
cmpq %rcx, %rdi
jbe 0x92e9f
leaq 0x4c913(%rip), %rax     # 0xdf880
movq (%rax), %rax
addq %rax, %rdi
notq %rax
andq %rax, %rdi
jmp 0x92e9f
cmpq $0xe00, %rdi            # imm = 0xE00
ja 0x92fad
decq %rdi
shrq $0x3, %rdi
leaq 0x1012b(%rip), %rax     # 0xa30c0
movzbl (%rax,%rdi), %eax
imulq $0x68, %rax, %rax
leaq 0x4bc5c(%rip), %rcx     # 0xdec00
movq (%rcx,%rax), %rdi
jmp 0x92e9f
addq $0xfff, %rdi            # imm = 0xFFF
andq $-0x1000, %rdi          # imm = 0xF000
jmp 0x92e9f
movq %r14, 0x8(%rbx)
testb $0x1, %r13b
je 0x92fe9
movq 0x28(%rbx), %rdi
callq 0x92b0f
movq 0x8(%rsp), %rax
movq %rax, 0x28(%rbx)
movq 0x10(%rsp), %rax
movl %eax, 0x14(%rbx)
xorl %r15d, %r15d
jmp 0x92ff9
movq 0x8(%rsp), %rdi
callq 0x92b0f
movl $0x3, %r15d
testl %r15d, %r15d
je 0x92e7c
cmpl $0x3, %r15d
jne 0x9301a
movq %rbx, %rdi
leaq 0x20(%rsp), %rsi
leaq 0x18(%rsp), %rdx
jmp 0x92e60
movb 0x7(%rsp), %al
andb $0x1, %al
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/ckh.c
// Function: ckh_string_hash
void
ckh_string_hash(const void *key, unsigned minbits, size_t *hash1, size_t *hash2)
{
	size_t ret1, ret2;
	uint64_t h;

	assert(minbits <= 32 || (SIZEOF_PTR == 8 && minbits <= 64));
	assert(hash1 != NULL);
	assert(hash2 != NULL);

	h = hash(key, strlen((const char *)key), UINT64_C(0x94122f335b332aea));
	if (minbits <= 32) {
		/*
		 * Avoid doing multiple hashes, since a single hash provides
		 * enough bits.
		 */
		ret1 = h & ZU(0xffffffffU);
		ret2 = h >> 32;
	} else {
		ret1 = h;
		ret2 = hash(key, strlen((const char *)key),
		    UINT64_C(0x8432a476666bbc13));
	}

	*hash1 = ret1;
	*hash2 = ret2;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
movabsq $-0x395b586ca42e166b, %r12 # imm = 0xC6A4A7935BD1E995
callq 0x1f4f0
movq %rax, %rcx
imulq %r12, %rcx
movabsq $-0x6bedd0cca4ccd516, %rdi # imm = 0x94122F335B332AEA
xorq %rcx, %rdi
movq %rax, %rdx
shrq $0x3, %rdx
cmpq $0x8, %rax
jae 0x936fa
movq %r15, %r8
movq %rdi, %rsi
jmp 0x9372e
leaq (,%rdx,8), %r9
movq %r15, %r8
movq (%r8), %r10
imulq %r12, %r10
addq $0x8, %r8
movq %r10, %rsi
shrq $0x2f, %rsi
xorq %r10, %rsi
imulq %r12, %rsi
xorq %rdi, %rsi
imulq %r12, %rsi
movq %rsi, %rdi
addq $-0x8, %r9
jne 0x93705
movl %eax, %edi
andl $0x7, %edi
leaq 0x10f96(%rip), %r9      # 0xa46d0
movslq (%r9,%rdi,4), %r10
addq %r9, %r10
jmpq *%r10
movzbl 0x6(%r8), %r9d
shlq $0x30, %r9
xorq %r9, %rsi
movzbl 0x5(%r8), %r9d
shlq $0x28, %r9
xorq %r9, %rsi
movzbl 0x4(%r8), %r9d
shlq $0x20, %r9
xorq %r9, %rsi
movzbl 0x3(%r8), %r9d
shll $0x18, %r9d
xorq %r9, %rsi
movzbl 0x2(%r8), %r9d
shll $0x10, %r9d
xorq %r9, %rsi
movzbl 0x1(%r8), %r9d
shll $0x8, %r9d
xorq %r9, %rsi
movzbl (%r8), %r8d
xorq %rsi, %r8
imulq %r12, %r8
movq %r8, %rsi
movq %rsi, %r8
shrq $0x2f, %r8
xorq %rsi, %r8
imulq %r12, %r8
movq %r8, %rsi
shrq $0x2f, %rsi
xorq %r8, %rsi
cmpl $0x20, %ebp
ja 0x937c2
movl %esi, %esi
shrq $0x20, %r8
jmp 0x93882
movabsq $-0x7bcd5b89999443ed, %r8 # imm = 0x8432A476666BBC13
xorq %r8, %rcx
cmpq $0x8, %rax
jae 0x937da
movq %rcx, %rax
jmp 0x93807
shlq $0x3, %rdx
movq (%r15), %r8
imulq %r12, %r8
addq $0x8, %r15
movq %r8, %rax
shrq $0x2f, %rax
xorq %r8, %rax
imulq %r12, %rax
xorq %rcx, %rax
imulq %r12, %rax
movq %rax, %rcx
addq $-0x8, %rdx
jne 0x937de
leaq 0x10ee2(%rip), %rcx     # 0xa46f0
movslq (%rcx,%rdi,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
movzbl 0x6(%r15), %ecx
shlq $0x30, %rcx
xorq %rcx, %rax
movzbl 0x5(%r15), %ecx
shlq $0x28, %rcx
xorq %rcx, %rax
movzbl 0x4(%r15), %ecx
shlq $0x20, %rcx
xorq %rcx, %rax
movzbl 0x3(%r15), %ecx
shll $0x18, %ecx
xorq %rcx, %rax
movzbl 0x2(%r15), %ecx
shll $0x10, %ecx
xorq %rcx, %rax
movzbl 0x1(%r15), %ecx
shll $0x8, %ecx
xorq %rcx, %rax
movzbl (%r15), %ecx
xorq %rax, %rcx
imulq %r12, %rcx
movq %rcx, %rax
movq %rax, %rcx
shrq $0x2f, %rcx
xorq %rax, %rcx
imulq %r12, %rcx
movq %rcx, %r8
shrq $0x2f, %r8
xorq %rcx, %r8
movq %rsi, (%r14)
movq %r8, (%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/discnt-cli.c
// Function: bytesToHuman
void bytesToHuman(char *s, long long n) {
    double d;

    if (n < 0) {
        *s = '-';
        s++;
        n = -n;
    }
    if (n < 1024) {
        /* Bytes */
        sprintf(s,"%lldB",n);
        return;
    } else if (n < (1024*1024)) {
        d = (double)n/(1024);
        sprintf(s,"%.2fK",d);
    } else if (n < (1024LL*1024*1024)) {
        d = (double)n/(1024*1024);
        sprintf(s,"%.2fM",d);
    } else if (n < (1024LL*1024*1024*1024)) {
        d = (double)n/(1024LL*1024*1024);
        sprintf(s,"%.2fG",d);
    }
}

// Assembly:
movq %rsi, %rdx
testq %rsi, %rsi
jns 0x13e01
movb $0x2d, (%rdi)
incq %rdi
negq %rdx
cmpq $0x3ff, %rdx            # imm = 0x3FF
jg 0x13e18
leaq 0x2643c(%rip), %rsi     # 0x3a24d
xorl %eax, %eax
jmp 0xc5a0
cmpq $0xfffff, %rdx          # imm = 0xFFFFF
jg 0x13e37
cvtsi2sd %rdx, %xmm0
mulsd 0x25942(%rip), %xmm0    # 0x39770
leaq 0x2641e(%rip), %rsi     # 0x3a253
jmp 0x13e79
cmpq $0x3fffffff, %rdx       # imm = 0x3FFFFFFF
jg 0x13e56
cvtsi2sd %rdx, %xmm0
mulsd 0x2591b(%rip), %xmm0    # 0x39768
leaq 0x26405(%rip), %rsi     # 0x3a259
jmp 0x13e79
movabsq $0xffffffffff, %rax     # imm = 0xFFFFFFFFFF
cmpq %rax, %rdx
jg 0x13e80
cvtsi2sd %rdx, %xmm0
mulsd 0x258ee(%rip), %xmm0    # 0x39760
leaq 0x263e6(%rip), %rsi     # 0x3a25f
movb $0x1, %al
jmp 0xc5a0
retq
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/discnt-cli.c
// Function: compute_something_fast
unsigned long compute_something_fast(void) {
    unsigned char s[256], i, j, t;
    int count = 1000, k;
    unsigned long output = 0;

    for (k = 0; k < 256; k++) s[k] = k;

    i = 0;
    j = 0;
    while(count--) {
        i++;
        j = j + s[i];
        t = s[i];
        s[i] = s[j];
        s[j] = t;
        output += s[(s[i]+s[j])&255];
    }
    return output;
}

// Assembly:
subq $0x88, %rsp
xorl %eax, %eax
movb %al, -0x80(%rsp,%rax)
incq %rax
cmpq $0x100, %rax            # imm = 0x100
jne 0x13e8a
xorl %eax, %eax
movl $0xfffffc18, %ecx       # imm = 0xFFFFFC18
movl $0xff, %edx
xorl %esi, %esi
leal 0x3e9(%rcx), %edi
andl %edx, %edi
movzbl -0x80(%rsp,%rdi), %r8d
addl %r8d, %esi
movl %esi, %r9d
andl %edx, %r9d
movb -0x80(%rsp,%r9), %r10b
movb %r10b, -0x80(%rsp,%rdi)
movb %r8b, -0x80(%rsp,%r9)
movb -0x80(%rsp,%rdi), %dil
addb %r8b, %dil
movzbl %dil, %edi
movzbl -0x80(%rsp,%rdi), %edi
addq %rdi, %rax
incl %ecx
jne 0x13ea7
addq $0x88, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/discnt-cli.c
// Function: cliConnect
static int cliConnect(int force) {
    if (context == NULL || force) {
        if (context != NULL)
            redisFree(context);

        if (config.hostsocket == NULL) {
            context = redisConnect(config.hostip,config.hostport);
        } else {
            context = redisConnectUnix(config.hostsocket);
        }

        if (context->err) {
            fprintf(stderr,"Could not connect to Discnt at ");
            if (config.hostsocket == NULL)
                fprintf(stderr,"%s:%d: %s\n",config.hostip,config.hostport,context->errstr);
            else
                fprintf(stderr,"%s: %s\n",config.hostsocket,context->errstr);
            redisFree(context);
            context = NULL;
            return REDIS_ERR;
        }

        /* Set aggressive KEEP_ALIVE socket option in the Discnt context socket
         * in order to prevent timeouts caused by the execution of long
         * commands. At the same time this improves the detection of real
         * errors. */
        anetKeepAlive(NULL, context->fd, DISCNT_CLI_KEEPALIVE_INTERVAL);

        /* Do AUTH and select the right DB. */
        if (cliAuth() != REDIS_OK)
            return REDIS_ERR;
    }
    return REDIS_OK;
}

// Assembly:
pushq %rbx
movl %edi, %eax
movq 0x37593(%rip), %rdi     # 0x4cc98
testq %rdi, %rdi
setne %cl
testl %eax, %eax
sete %al
xorl %ebx, %ebx
testb %cl, %al
jne 0x157a5
testq %rdi, %rdi
je 0x15724
callq 0x18754
movq 0x3746d(%rip), %rdi     # 0x4cb98
testq %rdi, %rdi
je 0x15737
callq 0x188e7
jmp 0x15749
movq 0x3744a(%rip), %rdi     # 0x4cb88
movl 0x3744c(%rip), %esi     # 0x4cb90
callq 0x187ac
movq %rax, 0x37548(%rip)     # 0x4cc98
cmpl $0x0, (%rax)
jne 0x1579b
movl 0x84(%rax), %esi
xorl %ebx, %ebx
xorl %edi, %edi
movl $0xf, %edx
callq 0x1099e
movq 0x37470(%rip), %rdx     # 0x4cbe0
testq %rdx, %rdx
je 0x157a5
movq 0x3751c(%rip), %rdi     # 0x4cc98
leaq 0x2545a(%rip), %rsi     # 0x3abdd
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x19075
testq %rax, %rax
je 0x157a0
movq %rax, %rdi
callq 0x17418
jmp 0x157a5
callq 0xc855
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/discnt-cli.c
// Function: cliVersion
static sds cliVersion(void) {
    sds version;
    version = sdscatprintf(sdsempty(), "%s", DISCNT_VERSION);

    /* Add git commit and working tree status when available */
    if (strtoll(discntGitSHA1(),NULL,16)) {
        version = sdscatprintf(version, " (git:%s", discntGitSHA1());
        if (strtoll(discntGitDirty(),NULL,10))
            version = sdscatprintf(version, "-dirty");
        version = sdscat(version, ")");
    }
    return version;
}

// Assembly:
pushq %rbx
callq 0x1195b
leaq 0x23841(%rip), %rsi     # 0x39032
leaq 0x245a5(%rip), %rdx     # 0x39d9d
movq %rax, %rdi
xorl %eax, %eax
callq 0x125ea
movq %rax, %rbx
callq 0x16a58
movq %rax, %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0xc350
testq %rax, %rax
je 0x15877
callq 0x16a58
leaq 0x25370(%rip), %rsi     # 0x3ab9a
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x125ea
movq %rax, %rbx
callq 0x16a60
movq %rax, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0xc350
testq %rax, %rax
je 0x15867
leaq 0x25349(%rip), %rsi     # 0x3aba3
movq %rbx, %rdi
xorl %eax, %eax
callq 0x125ea
movq %rax, %rbx
leaq 0x23ead(%rip), %rsi     # 0x3971b
movq %rbx, %rdi
popq %rbx
jmp 0x12259
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/discnt-cli.c
// Function: getLongInfoField
static long getLongInfoField(char *info, char *field) {
    char *value = getInfoField(info,field);
    long l;

    if (!value) return LONG_MIN;
    l = strtol(value,NULL,10);
    free(value);
    return l;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
callq 0xc640
testq %rax, %rax
je 0x158f1
movq %rax, %r14
movq %rbx, %rdi
callq 0xc1b0
addq %rax, %r14
incq %r14
movq %r14, %rdi
movl $0xd, %esi
callq 0xc1d0
movq %rax, %rbx
movq %r14, %rdi
movl $0x2c, %esi
callq 0xc1d0
cmpq %rbx, %rax
movq %rbx, %r15
cmovbq %rax, %r15
testq %rax, %rax
cmoveq %rbx, %r15
subq %r14, %r15
leaq 0x1(%r15), %rdi
callq 0xc3f0
movq %rax, %rbx
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xc3a0
movb $0x0, (%rbx,%r15)
jmp 0x158f3
xorl %ebx, %ebx
testq %rbx, %rbx
je 0x15917
movq %rbx, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0xc390
movq %rax, %r14
movq %rbx, %rdi
callq 0xc060
movq %r14, %rax
jmp 0x15921
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/discnt-cli.c
// Function: completionCallback
static void completionCallback(const char *buf, linenoiseCompletions *lc) {
    size_t startpos = 0;
    int mask;
    int i;
    size_t matchlen;
    sds tmp;

    if (strncasecmp(buf,"help ",5) == 0) {
        startpos = 5;
        while (isspace(buf[startpos])) startpos++;
        mask = CLI_HELP_COMMAND | CLI_HELP_GROUP;
    } else {
        mask = CLI_HELP_COMMAND;
    }

    for (i = 0; i < helpEntriesLen; i++) {
        if (!(helpEntries[i].type & mask)) continue;

        matchlen = strlen(buf+startpos);
        if (strncasecmp(buf+startpos,helpEntries[i].full,matchlen) == 0) {
            tmp = sdsnewlen(buf,startpos);
            tmp = sdscat(tmp,helpEntries[i].full);
            linenoiseAddCompletion(lc,tmp);
            sdsfree(tmp);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x10(%rsp)
movq %rdi, %rbx
leaq 0x255e9(%rip), %rsi     # 0x3af38
movl $0x5, %edx
callq 0xc400
testl %eax, %eax
movq %rbx, 0x8(%rsp)
je 0x1596c
movl $0x1, %ebp
xorl %r15d, %r15d
jmp 0x1598f
callq 0xc690
movq (%rax), %rax
movl $0x4, %r15d
movsbq 0x1(%rbx,%r15), %rcx
incq %r15
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x1597a
movl $0x3, %ebp
cmpb $0x1, 0x372f2(%rip)     # 0x4cc88
jne 0x15a29
movq 0x8(%rsp), %rax
leaq (%rax,%r15), %r12
movl $0x10, %ebx
xorl %r14d, %r14d
movq 0x372dc(%rip), %r13     # 0x4cc90
testl %ebp, -0x10(%r13,%rbx)
je 0x15a0f
movq %r12, %rdi
callq 0xc1b0
movq (%r13,%rbx), %rsi
movq %r12, %rdi
movq %rax, %rdx
callq 0xc400
testl %eax, %eax
jne 0x15a0f
movq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x11848
movq 0x372a5(%rip), %rcx     # 0x4cc90
movq (%rcx,%rbx), %rsi
movq %rax, %rdi
callq 0x12259
movq %rax, %r13
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x19e99
movq %r13, %rdi
callq 0x119ef
cmpb $0x1, 0x37272(%rip)     # 0x4cc88
jne 0x15a29
leaq 0x1(%r14), %rax
addq $0x20, %rbx
cmpq $0x31, %r14
movq %rax, %r14
jb 0x159ad
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/discnt-cli.c
// Function: cliRefreshPrompt
static void cliRefreshPrompt(void) {
    int len;

    if (config.hostsocket != NULL)
        len = snprintf(config.prompt,sizeof(config.prompt),"discnt %s",
                       config.hostsocket);
    else
        len = snprintf(config.prompt,sizeof(config.prompt),
                       strchr(config.hostip,':') ? "[%s]:%d" : "%s:%d",
                       config.hostip, config.hostport);
    snprintf(config.prompt+len,sizeof(config.prompt)-len,"> ");
}

// Assembly:
pushq %rbx
movq 0x37158(%rip), %rcx     # 0x4cb98
testq %rcx, %rcx
je 0x15a61
leaq 0x371ac(%rip), %rdi     # 0x4cbf8
leaq 0x254eb(%rip), %rdx     # 0x3af3e
movl $0x80, %esi
xorl %eax, %eax
callq 0xc1f0
jmp 0x15aa7
movq 0x37120(%rip), %rbx     # 0x4cb88
movq %rbx, %rdi
movl $0x3a, %esi
callq 0xc1d0
testq %rax, %rax
leaq 0x2367d(%rip), %rax     # 0x390fc
leaq 0x2366e(%rip), %rdx     # 0x390f4
cmoveq %rax, %rdx
movl 0x370ff(%rip), %r8d     # 0x4cb90
leaq 0x37160(%rip), %rdi     # 0x4cbf8
movl $0x80, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0xc1f0
cltq
leaq 0x370d8(%rip), %rcx     # 0x4cb88
leaq (%rax,%rcx), %rdi
addq $0x70, %rdi
movl $0x80, %esi
subq %rax, %rsi
leaq 0x2544d(%rip), %rdx     # 0x3af14
xorl %eax, %eax
popq %rbx
jmp 0xc1f0
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/discnt-cli.c
// Function: cliOutputCommandHelp
static void cliOutputCommandHelp(struct commandHelp *help, int group) {
    printf("\r\n  \x1b[1m%s\x1b[0m \x1b[90m%s\x1b[0m\r\n", help->name, help->params);
    printf("  \x1b[33msummary:\x1b[0m %s\r\n", help->summary);
    printf("  \x1b[33msince:\x1b[0m %s\r\n", help->since);
    if (group) {
        printf("  \x1b[33mgroup:\x1b[0m %s\r\n", commandGroups[help->group]);
    }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq (%rdi), %rsi
movq 0x8(%rdi), %rdx
leaq 0x24f8a(%rip), %rdi     # 0x3b07b
xorl %eax, %eax
callq 0xc1e0
movq 0x10(%rbx), %rsi
leaq 0x24f95(%rip), %rdi     # 0x3b098
xorl %eax, %eax
callq 0xc1e0
movq 0x20(%rbx), %rsi
leaq 0x24f9c(%rip), %rdi     # 0x3b0b1
xorl %eax, %eax
callq 0xc1e0
testl %ebp, %ebp
je 0x16143
movslq 0x18(%rbx), %rax
leaq 0x342d5(%rip), %rcx     # 0x4a400
movq (%rcx,%rax,8), %rsi
leaq 0x24f92(%rip), %rdi     # 0x3b0c8
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xc1e0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/discnt-cli.c
// Function: cliFormatReplyRaw
static sds cliFormatReplyRaw(redisReply *r) {
    sds out = sdsempty(), tmp;
    size_t i;

    switch (r->type) {
    case REDIS_REPLY_NIL:
        /* Nothing... */
        break;
    case REDIS_REPLY_ERROR:
        out = sdscatlen(out,r->str,r->len);
        out = sdscatlen(out,"\n",1);
        break;
    case REDIS_REPLY_STATUS:
    case REDIS_REPLY_STRING:
        out = sdscatlen(out,r->str,r->len);
        break;
    case REDIS_REPLY_INTEGER:
        out = sdscatprintf(out,"%lld",r->integer);
        break;
    case REDIS_REPLY_ARRAY:
        for (i = 0; i < r->elements; i++) {
            if (i > 0) out = sdscat(out,config.mb_delim);
            tmp = cliFormatReplyRaw(r->element[i]);
            out = sdscatlen(out,tmp,sdslen(tmp));
            sdsfree(tmp);
        }
        break;
    default:
        fprintf(stderr,"Unknown reply type: %d\n", r->type);
        exit(1);
    }
    return out;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r14
callq 0x1195b
movq %rax, %rbx
movl (%r14), %edi
leal -0x1(%rdi), %eax
cmpl $0x5, %eax
ja 0x16279
leaq 0x23648(%rip), %rcx     # 0x397bc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x18(%r14), %rsi
movslq 0x10(%r14), %rdx
movq %rbx, %rdi
jmp 0x1624d
cmpq $0x0, 0x20(%r14)
je 0x16221
xorl %r12d, %r12d
leaq 0x23632(%rip), %r13     # 0x397d4
testq %r12, %r12
je 0x161b9
movq 0x36a42(%rip), %rsi     # 0x4cbf0
movq %rbx, %rdi
callq 0x12259
movq %rax, %rbx
movq 0x28(%r14), %rax
movq (%rax,%r12,8), %rdi
callq 0x1614a
movq %rax, %r15
movzbl -0x1(%rax), %edx
movl %edx, %eax
andl $0x7, %eax
cmpl $0x4, %eax
ja 0x16200
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
shrl $0x3, %edx
jmp 0x16202
movq -0x11(%r15), %rdx
jmp 0x16202
movzwl -0x5(%r15), %edx
jmp 0x16202
movl -0x9(%r15), %edx
jmp 0x16202
movzbl -0x3(%r15), %edx
jmp 0x16202
xorl %edx, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x12189
movq %rax, %rbx
movq %r15, %rdi
callq 0x119ef
incq %r12
cmpq 0x20(%r14), %r12
jb 0x161a2
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x18(%r14), %rsi
movslq 0x10(%r14), %rdx
movq %rbx, %rdi
callq 0x12189
leaq 0x24953(%rip), %rsi     # 0x3ab98
movl $0x1, %edx
movq %rax, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x12189
movq 0x8(%r14), %rdx
leaq 0x24e79(%rip), %rsi     # 0x3b0df
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x125ea
callq 0xc8d8
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/discnt-cli.c
// Function: cliFormatReplyCSV
static sds cliFormatReplyCSV(redisReply *r) {
    unsigned int i;

    sds out = sdsempty();
    switch (r->type) {
    case REDIS_REPLY_ERROR:
        out = sdscat(out,"ERROR,");
        out = sdscatrepr(out,r->str,strlen(r->str));
    break;
    case REDIS_REPLY_STATUS:
        out = sdscatrepr(out,r->str,r->len);
    break;
    case REDIS_REPLY_INTEGER:
        out = sdscatprintf(out,"%lld",r->integer);
    break;
    case REDIS_REPLY_STRING:
        out = sdscatrepr(out,r->str,r->len);
    break;
    case REDIS_REPLY_NIL:
        out = sdscat(out,"NIL\n");
    break;
    case REDIS_REPLY_ARRAY:
        for (i = 0; i < r->elements; i++) {
            sds tmp = cliFormatReplyCSV(r->element[i]);
            out = sdscatlen(out,tmp,sdslen(tmp));
            if (i != r->elements-1) out = sdscat(out,",");
            sdsfree(tmp);
        }
    break;
    default:
        fprintf(stderr,"Unknown reply type: %d\n", r->type);
        exit(1);
    }
    return out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1195b
movq %rax, %r14
movl (%rbx), %edi
leal -0x1(%rdi), %eax
cmpl $0x5, %eax
ja 0x16600
leaq 0x23363(%rip), %rcx     # 0x39814
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x18(%rbx), %rsi
movslq 0x10(%rbx), %rdx
movq %r14, %rdi
jmp 0x165ed
leaq 0x24c75(%rip), %rsi     # 0x3b146
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x12259
cmpq $0x0, 0x20(%rbx)
je 0x16591
movl $0x1, %ebp
xorl %r15d, %r15d
leaq 0x2332b(%rip), %r13     # 0x3982c
movq 0x28(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x16486
movq %rax, %r12
movzbl -0x1(%rax), %edx
movl %edx, %eax
andl $0x7, %eax
cmpl $0x4, %eax
ja 0x1654c
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
shrl $0x3, %edx
jmp 0x1654e
movq -0x11(%r12), %rdx
jmp 0x1654e
movzwl -0x5(%r12), %edx
jmp 0x1654e
movl -0x9(%r12), %edx
jmp 0x1654e
movzbl -0x3(%r12), %edx
jmp 0x1654e
xorl %edx, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x12189
movq %rax, %r14
movq 0x20(%rbx), %rax
decq %rax
cmpq %r15, %rax
je 0x1657a
movq %r14, %rdi
leaq 0x24bd2(%rip), %rsi     # 0x3b144
callq 0x12259
movq %rax, %r14
movq %r12, %rdi
callq 0x119ef
movl %ebp, %r15d
incl %ebp
cmpq %r15, 0x20(%rbx)
ja 0x16501
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rbx), %rdx
leaq 0x24b31(%rip), %rsi     # 0x3b0df
movq %r14, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x125ea
leaq 0x24b72(%rip), %rsi     # 0x3b13f
movq %r14, %rdi
callq 0x12259
movq %rax, %r14
movq 0x18(%rbx), %rbx
movq %rbx, %rdi
callq 0xc1b0
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x132e4
callq 0xc91e
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/deps/linenoise/linenoise.c
// Function: linenoiseAddCompletion
void linenoiseAddCompletion(linenoiseCompletions *lc, const char *str) {
    size_t len = strlen(str);
    char *copy, **cvec;

    copy = malloc(len+1);
    if (copy == NULL) return;
    memcpy(copy,str,len+1);
    cvec = realloc(lc->cvec,sizeof(char*)*(lc->len+1));
    if (cvec == NULL) {
        free(copy);
        return;
    }
    lc->cvec = cvec;
    lc->cvec[lc->len++] = copy;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0xc1b0
movq %rax, %r12
incq %r12
movq %r12, %rdi
callq 0xc3f0
testq %rax, %rax
je 0x19efe
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xc3a0
movq (%rbx), %rax
movq 0x8(%rbx), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0xc450
testq %rax, %rax
je 0x19f0a
movq %rax, 0x8(%rbx)
movq (%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%rbx)
movq %r14, (%rax,%rcx,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xc060
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/deps/linenoise/linenoise.c
// Function: linenoiseEditInsert
int linenoiseEditInsert(struct linenoiseState *l, char c) {
    if (l->len < l->buflen) {
        if (l->len == l->pos) {
            l->buf[l->pos] = c;
            l->pos++;
            l->len++;
            l->buf[l->len] = '\0';
            if ((!mlmode && l->plen+l->len < l->cols) /* || mlmode */) {
                /* Avoid a full update of the line in the
                 * trivial case. */
                if (write(l->ofd,&c,1) == -1) return -1;
            } else {
                refreshLine(l);
            }
        } else {
            memmove(l->buf+l->pos+1,l->buf+l->pos,l->len-l->pos);
            l->buf[l->pos] = c;
            l->len++;
            l->pos++;
            l->buf[l->len] = '\0';
            refreshLine(l);
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movb %bpl, 0x7(%rsp)
movq 0x38(%rdi), %rdx
cmpq 0x10(%rdi), %rdx
jae 0x19fd0
movq %rdi, %rbx
movq 0x28(%rdi), %rax
movq 0x8(%rdi), %rsi
addq %rax, %rsi
subq %rax, %rdx
jne 0x19f9a
movb %bpl, (%rsi)
incq 0x28(%rbx)
movq 0x8(%rbx), %rax
movq 0x38(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x38(%rbx)
movb $0x0, 0x1(%rax,%rcx)
cmpl $0x0, 0x32d75(%rip)     # 0x4cce0
jne 0x19fc8
movq 0x38(%rbx), %rax
addq 0x20(%rbx), %rax
cmpq 0x40(%rbx), %rax
jae 0x19fc8
movl 0x4(%rbx), %edi
leaq 0x7(%rsp), %rsi
movl $0x1, %edx
callq 0xc170
cmpq $-0x1, %rax
jne 0x19fd0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x19fd2
leaq 0x1(%rsi), %rdi
callq 0xc4d0
movq 0x8(%rbx), %rax
movq 0x28(%rbx), %rcx
movb %bpl, (%rax,%rcx)
movq 0x8(%rbx), %rax
movq 0x38(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x38(%rbx)
incq 0x28(%rbx)
movb $0x0, 0x1(%rax,%rcx)
movq %rbx, %rdi
callq 0x19fd9
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/deps/linenoise/linenoise.c
// Function: linenoiseEditHistoryNext
void linenoiseEditHistoryNext(struct linenoiseState *l, int dir) {
    if (history_len > 1) {
        /* Update the current history entry before to
         * overwrite it with the next one. */
        free(history[history_len - 1 - l->history_index]);
        history[history_len - 1 - l->history_index] = strdup(l->buf);
        /* Show the new entry */
        l->history_index += (dir == LINENOISE_HISTORY_PREV) ? 1 : -1;
        if (l->history_index < 0) {
            l->history_index = 0;
            return;
        } else if (l->history_index >= history_len) {
            l->history_index = history_len-1;
            return;
        }
        strncpy(l->buf,history[history_len - 1 - l->history_index],l->buflen);
        l->buf[l->buflen-1] = '\0';
        l->len = l->pos = strlen(l->buf);
        refreshLine(l);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl 0x32704(%rip), %r14d    # 0x4ccf0
cmpl $0x2, %r14d
jl 0x1a6a3
movl %esi, %ebp
movq %rdi, %rbx
movq 0x326f6(%rip), %r15     # 0x4ccf8
movl 0x50(%rdi), %eax
notl %eax
addl %r14d, %eax
cltq
movq (%r15,%rax,8), %rdi
callq 0xc060
movq 0x8(%rbx), %rdi
callq 0xc600
movl 0x50(%rbx), %ecx
movl %ecx, %edx
notl %edx
addl %r14d, %edx
movslq %edx, %rdx
movq %rax, (%r15,%rdx,8)
xorl %eax, %eax
cmpl $0x1, %ebp
sete %al
leal -0x1(,%rax,2), %eax
addl %ecx, %eax
movl %eax, 0x50(%rbx)
js 0x1a693
cmpl %r14d, %eax
jge 0x1a69c
notl %eax
addl %eax, %r14d
movslq %r14d, %rax
movq (%r15,%rax,8), %rsi
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rdx
callq 0xc0b0
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, -0x1(%rax,%rcx)
movq 0x8(%rbx), %rdi
callq 0xc1b0
movq %rax, 0x28(%rbx)
movq %rax, 0x38(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x19fd9
movl $0x0, 0x50(%rbx)
jmp 0x1a6a3
decl %r14d
movl %r14d, 0x50(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/deps/linenoise/linenoise.c
// Function: linenoiseEditDelete
void linenoiseEditDelete(struct linenoiseState *l) {
    if (l->len > 0 && l->pos < l->len) {
        memmove(l->buf+l->pos,l->buf+l->pos+1,l->len-l->pos-1);
        l->len--;
        l->buf[l->len] = '\0';
        refreshLine(l);
    }
}

// Assembly:
pushq %rbx
movq 0x38(%rdi), %rdx
testq %rdx, %rdx
je 0x1a6fb
movq %rdi, %rbx
movq 0x28(%rdi), %rax
cmpq %rdx, %rax
jae 0x1a6fb
movq 0x8(%rbx), %rdi
leaq (%rdi,%rax), %rsi
incq %rsi
addq %rax, %rdi
notq %rax
addq %rax, %rdx
callq 0xc4d0
movq 0x8(%rbx), %rax
movq 0x38(%rbx), %rcx
leaq -0x1(%rcx), %rdx
movq %rdx, 0x38(%rbx)
movb $0x0, -0x1(%rax,%rcx)
movq %rbx, %rdi
popq %rbx
jmp 0x19fd9
popq %rbx
retq