LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/chunk.c
// Function: chunk_unmap
void
chunk_unmap(void *chunk, size_t size)
{
	assert(chunk != NULL);
	assert(CHUNK_ADDR2BASE(chunk) == chunk);
	assert(size != 0);
	assert((size & chunksize_mask) == 0);

	if (config_dss && chunk_in_dss(chunk))
		chunk_record(&chunks_szad_dss, &chunks_ad_dss, chunk, size);
	else if (chunk_dealloc_mmap(chunk, size))
		chunk_record(&chunks_szad_mmap, &chunks_ad_mmap, chunk, size);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r12
movq %rdi, %rbx
callq 0x85c7e
testb %al, %al
je 0x85801
movq %rbx, %rdi
movq %r12, %rsi
callq 0x85b30
movl %eax, %ebp
callq 0x8523f
movq %rax, %r15
leaq 0x5a174(%rip), %rdi     # 0xdf838
callq 0x1faa0
leaq (%rbx,%r12), %rax
leaq 0x8(%rsp), %rsi
movq %rax, 0x28(%rsi)
leaq 0x5a113(%rip), %rdi     # 0xdf7f0
callq 0x8ad67
testq %rax, %rax
je 0x856f5
movq %rax, %r14
movq 0x28(%rax), %rax
cmpq 0x30(%rsp), %rax
je 0x85731
testq %r15, %r15
je 0x857f5
movq %rbx, 0x28(%r15)
movq %r12, 0x30(%r15)
xorb $0x1, %bpl
movb %bpl, 0x38(%r15)
leaq 0x5a0db(%rip), %rdi     # 0xdf7f0
movq %r15, %rsi
callq 0x8ae18
leaq 0x5a084(%rip), %rdi     # 0xdf7a8
movq %r15, %rsi
callq 0x8a344
movq %r15, %r14
jmp 0x8576b
leaq 0x5a070(%rip), %r13     # 0xdf7a8
movq %r13, %rdi
movq %r14, %rsi
callq 0x8a4bf
movq %rbx, 0x28(%r14)
addq %r12, 0x30(%r14)
xorb $0x1, %bpl
andb %bpl, 0x38(%r14)
movq %r13, %rdi
movq %r14, %rsi
callq 0x8a344
testq %r15, %r15
je 0x8576b
movq %r15, %rdi
callq 0x8528a
leaq 0x5a07e(%rip), %rdi     # 0xdf7f0
movq %r14, %rsi
callq 0x8acc6
testq %rax, %rax
je 0x857f5
movq %rax, %r15
movq 0x30(%rax), %rax
addq 0x28(%r15), %rax
cmpq %rbx, %rax
jne 0x857f5
leaq 0x5a012(%rip), %rbx     # 0xdf7a8
movq %rbx, %rdi
movq %r15, %rsi
callq 0x8a4bf
leaq 0x5a048(%rip), %rdi     # 0xdf7f0
movq %r15, %rsi
callq 0x8af83
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8a4bf
movq 0x28(%r15), %rax
movq %rax, 0x28(%r14)
movq 0x30(%r15), %rax
addq %rax, 0x30(%r14)
cmpb $0x1, 0x38(%r14)
jne 0x857d8
movb 0x38(%r15), %al
jmp 0x857da
xorl %eax, %eax
movb %al, 0x38(%r14)
leaq 0x59fc3(%rip), %rdi     # 0xdf7a8
movq %r14, %rsi
callq 0x8a344
movq %r15, %rdi
callq 0x8528a
leaq 0x5a03c(%rip), %rdi     # 0xdf838
callq 0x1fbb0
addq $0x48, %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/chunk.c
// Function: chunk_dealloc
void
chunk_dealloc(void *chunk, size_t size, bool unmap)
{

	assert(chunk != NULL);
	assert(CHUNK_ADDR2BASE(chunk) == chunk);
	assert(size != 0);
	assert((size & chunksize_mask) == 0);

	if (config_ivsalloc)
		rtree_set(chunks_rtree, (uintptr_t)chunk, NULL);
	if (config_stats || config_prof) {
		malloc_mutex_lock(&chunks_mtx);
		assert(stats_chunks.curchunks >= (size / chunksize));
		stats_chunks.curchunks -= (size / chunksize);
		malloc_mutex_unlock(&chunks_mtx);
	}

	if (unmap)
		chunk_unmap(chunk, size);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x5a012(%rip), %r15     # 0xdf838
movq %r15, %rdi
callq 0x1faa0
movq %rbx, %rax
xorl %edx, %edx
divq 0x5a026(%rip)           # 0xdf860
subq %rax, 0x5a037(%rip)     # 0xdf878
movq %r15, %rdi
callq 0x1fbb0
testl %ebp, %ebp
je 0x85862
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x85687
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/chunk_dss.c
// Function: chunk_in_dss
bool
chunk_in_dss(void *chunk)
{
	bool ret;

	cassert(config_dss);

	malloc_mutex_lock(&dss_mtx);
	if ((uintptr_t)chunk >= (uintptr_t)dss_base
	    && (uintptr_t)chunk < (uintptr_t)dss_max)
		ret = true;
	else
		ret = false;
	malloc_mutex_unlock(&dss_mtx);

	return (ret);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x59e6f(%rip), %r14     # 0xdf938
movq %r14, %rdi
callq 0x1faa0
cmpq %rbx, 0x59e98(%rip)     # 0xdf970
setbe %al
cmpq %rbx, 0x59e86(%rip)     # 0xdf968
seta %bl
andb %al, %bl
movq %r14, %rdi
callq 0x1fbb0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/chunk_dss.c
// Function: chunk_dss_boot
bool
chunk_dss_boot(void)
{

	cassert(config_dss);

	if (malloc_mutex_init(&dss_mtx))
		return (true);
	dss_base = sbrk(0);
	dss_prev = dss_base;
	dss_max = dss_base;

	return (false);
}

// Assembly:
pushq %rbx
leaq 0x59e37(%rip), %rdi     # 0xdf938
callq 0x8bd44
movl %eax, %ebx
testb %al, %al
jne 0x85b28
xorl %edi, %edi
callq 0x1f3e0
movq %rax, 0x59e56(%rip)     # 0xdf970
movq %rax, 0x59e3f(%rip)     # 0xdf960
movq %rax, 0x59e40(%rip)     # 0xdf968
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/chunk_mmap.c
// Function: chunk_alloc_mmap
void *
chunk_alloc_mmap(size_t size, size_t alignment, bool *zero)
{
	void *ret;
	size_t offset;

	/*
	 * Ideally, there would be a way to specify alignment to mmap() (like
	 * NetBSD has), but in the absence of such a feature, we have to work
	 * hard to efficiently create aligned mappings.  The reliable, but
	 * slow method is to create a mapping that is over-sized, then trim the
	 * excess.  However, that always results in one or two calls to
	 * pages_unmap().
	 *
	 * Optimistically try mapping precisely the right amount before falling
	 * back to the slow method, with the expectation that the optimistic
	 * approach works most of the time.
	 */

	assert(alignment != 0);
	assert((alignment & chunksize_mask) == 0);

	ret = pages_map(NULL, size);
	if (ret == NULL)
		return (NULL);
	offset = ALIGNMENT_ADDR2OFFSET(ret, alignment);
	if (offset != 0) {
		pages_unmap(ret, size);
		return (chunk_alloc_mmap_slow(size, alignment, zero));
	}

	assert(ret != NULL);
	*zero = true;
	return (ret);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
xorl %edi, %edi
movq %r15, %rsi
movl $0x3, %edx
movl $0x22, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %r9d, %r9d
callq 0x1fc00
movq %rax, %r13
incq %rax
cmpq $0x2, %rax
jb 0x85c25
movq %rbx, (%rsp)
leaq -0x1(%r14), %rbp
testq %r13, %rbp
je 0x85c1b
movq %r13, %rdi
movq %r15, %rsi
callq 0x85c37
leaq (%r15,%r14), %r12
addq $-0x1000, %r12          # imm = 0xF000
cmpq %r15, %r12
jae 0x85bb7
xorl %r12d, %r12d
jmp 0x85c25
negq %r14
xorl %edi, %edi
movq %r12, %rsi
movl $0x3, %edx
movl $0x22, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %r9d, %r9d
callq 0x1fc00
leaq 0x1(%rax), %rcx
cmpq $0x2, %rcx
jb 0x85bb2
leaq (%rax,%rbp), %r13
andq %r14, %r13
movq %r13, %rbx
subq %rax, %rbx
movq %r13, %rsi
subq %rax, %rsi
je 0x85bfe
movq %rax, %rdi
callq 0x85c37
leaq (%rbx,%r15), %rax
cmpq %rax, %r12
je 0x85c16
movq %r12, %rsi
subq %rax, %rsi
leaq (%r15,%r13), %rdi
callq 0x85c37
testq %r13, %r13
je 0x85bba
movq (%rsp), %rax
movb $0x1, (%rax)
movq %r13, %r12
movq %r12, %rax
addq $0x8, %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/ctl.c
// Function: ctl_byname
int
ctl_byname(const char *name, void *oldp, size_t *oldlenp, void *newp,
    size_t newlen)
{
	int ret;
	size_t depth;
	ctl_node_t const *nodes[CTL_MAX_DEPTH];
	size_t mib[CTL_MAX_DEPTH];
	const ctl_named_node_t *node;

	if (ctl_initialized == false && ctl_init()) {
		ret = EAGAIN;
		goto label_return;
	}

	depth = CTL_MAX_DEPTH;
	ret = ctl_lookup(name, nodes, mib, &depth);
	if (ret != 0)
		goto label_return;

	node = ctl_named_node(nodes[depth-1]);
	if (node != NULL && node->ctl)
		ret = node->ctl(mib, depth, oldp, oldlenp, newp, newlen);
	else {
		/* The name refers to a partial path through the ctl tree. */
		ret = ENOENT;
	}

label_return:
	return(ret);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
cmpb $0x0, 0x59cd0(%rip)     # 0xdf978
jne 0x85cb8
movl $0xb, %ebp
callq 0x85d1f
testb %al, %al
jne 0x85d0e
leaq 0x8(%rsp), %rcx
movq $0x6, (%rcx)
leaq 0x40(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movq %r13, %rdi
callq 0x85e0b
movl %eax, %ebp
testl %eax, %eax
jne 0x85d0e
movq 0x8(%rsp), %rsi
movq 0x38(%rsp,%rsi,8), %rax
movl $0x2, %ebp
cmpb $0x1, (%rax)
jne 0x85d0e
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x85d0e
leaq 0x10(%rsp), %rdi
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r8
movq %rbx, %r9
callq *%rax
movl %eax, %ebp
movl %ebp, %eax
addq $0x78, %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/ctl.c
// Function: ctl_init
static bool
ctl_init(void)
{
	bool ret;

	malloc_mutex_lock(&ctl_mtx);
	if (ctl_initialized == false) {
		/*
		 * Allocate space for one extra arena stats element, which
		 * contains summed stats across all arenas.
		 */
		assert(narenas_auto == narenas_total_get());
		ctl_stats.narenas = narenas_auto;
		ctl_stats.arenas = (ctl_arena_stats_t *)base_alloc(
		    (ctl_stats.narenas + 1) * sizeof(ctl_arena_stats_t));
		if (ctl_stats.arenas == NULL) {
			ret = true;
			goto label_return;
		}
		memset(ctl_stats.arenas, 0, (ctl_stats.narenas + 1) *
		    sizeof(ctl_arena_stats_t));

		/*
		 * Initialize all stats structures, regardless of whether they
		 * ever get used.  Lazy initialization would allow errors to
		 * cause inconsistent state to be viewable by the application.
		 */
		if (config_stats) {
			unsigned i;
			for (i = 0; i <= ctl_stats.narenas; i++) {
				if (ctl_arena_init(&ctl_stats.arenas[i])) {
					ret = true;
					goto label_return;
				}
			}
		}
		ctl_stats.arenas[ctl_stats.narenas].initialized = true;

		ctl_epoch = 0;
		ctl_refresh();
		ctl_initialized = true;
	}

	ret = false;
label_return:
	malloc_mutex_unlock(&ctl_mtx);
	return (ret);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
leaq 0x59c56(%rip), %rdi     # 0xdf980
callq 0x1faa0
cmpb $0x0, 0x59c42(%rip)     # 0xdf978
je 0x85d3c
xorl %ebx, %ebx
jmp 0x85d90
leaq 0x58e3d(%rip), %rax     # 0xdeb80
movl (%rax), %eax
movl %eax, 0x59ca5(%rip)     # 0xdf9f0
incl %eax
imulq $0x870, %rax, %rdi      # imm = 0x870
callq 0x85158
movq %rax, 0x59c98(%rip)     # 0xdf9f8
movb $0x1, %bl
testq %rax, %rax
je 0x85d90
movl 0x59c83(%rip), %ecx     # 0xdf9f0
incl %ecx
imulq $0x870, %rcx, %rdx      # imm = 0x870
movq %rax, %rdi
xorl %esi, %esi
callq 0x1f110
movq 0x59c71(%rip), %rdi     # 0xdf9f8
callq 0x8619c
testb %al, %al
je 0x85da3
leaq 0x59be9(%rip), %rdi     # 0xdf980
callq 0x1fbb0
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
movl $0x1, %ecx
movl 0x59c42(%rip), %ebp     # 0xdf9f0
cmpl %ebp, %ecx
ja 0x85dd7
movl %ecx, %r14d
movl %ecx, %eax
imulq $0x870, %rax, %rdi      # imm = 0x870
addq 0x59c33(%rip), %rdi     # 0xdf9f8
callq 0x8619c
leal 0x1(%r14), %ecx
testb %al, %al
je 0x85da8
cmpl %ebp, %r14d
jbe 0x85d90
movq 0x59c1a(%rip), %rax     # 0xdf9f8
movl 0x59c0c(%rip), %ecx     # 0xdf9f0
imulq $0x870, %rcx, %rcx      # imm = 0x870
movb $0x1, %bl
movb %bl, (%rax,%rcx)
movq $0x0, 0x59c05(%rip) # 0xdfa00
callq 0x861da
movb %bl, 0x59b72(%rip)      # 0xdf978
jmp 0x85d38
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/ctl.c
// Function: thread_tcache_flush_ctl
static int
thread_tcache_flush_ctl(const size_t *mib, size_t miblen, void *oldp,
    size_t *oldlenp, void *newp, size_t newlen)
{
	int ret;

	if (config_tcache == false)
		return (ENOENT);

	READONLY();
	WRITEONLY();

	tcache_flush();

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

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl $0x1, %ebx
orq %r9, %r8
jne 0x86c1b
orq %rcx, %rdx
jne 0x86c1b
movq 0x3f38c(%rip), %r14     # 0xc5f58
movq %fs:(%r14), %rdi
xorl %ebx, %ebx
cmpq $0x4, %rdi
jb 0x86c1b
callq 0x90f12
movq %fs:0x0, %rsi
addq %r14, %rsi
movq $0x0, %fs:(%r14)
leaq 0x69fb8(%rip), %rax     # 0xf0bb0
movl (%rax), %edi
callq 0x1f1c0
testl %eax, %eax
je 0x86c1b
leaq 0x1c48c(%rip), %rdi     # 0xa3096
callq 0x9124c
leaq 0x57f44(%rip), %rax     # 0xdeb5a
cmpb $0x1, (%rax)
je 0x86c25
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x1f1b0
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/ctl.c
// Function: arena_i_dss_ctl
static int
arena_i_dss_ctl(const size_t *mib, size_t miblen, void *oldp, size_t *oldlenp,
    void *newp, size_t newlen)
{
	int ret, i;
	bool match, err;
	const char *dss;
	unsigned arena_ind = mib[1];
	dss_prec_t dss_prec_old = dss_prec_limit;
	dss_prec_t dss_prec = dss_prec_limit;

	malloc_mutex_lock(&ctl_mtx);
	WRITE(dss, const char *);
	match = false;
	for (i = 0; i < dss_prec_limit; i++) {
		if (strcmp(dss_prec_names[i], dss) == 0) {
			dss_prec = i;
			match = true;
			break;
		}
	}
	if (match == false) {
		ret = EINVAL;
		goto label_return;
	}

	if (arena_ind < ctl_stats.narenas) {
		arena_t *arena = arenas[arena_ind];
		if (arena != NULL) {
			dss_prec_old = arena_dss_prec_get(arena);
			arena_dss_prec_set(arena, dss_prec);
			err = false;
		} else
			err = true;
	} else {
		dss_prec_old = chunk_dss_prec_get();
		err = chunk_dss_prec_set(dss_prec);
	}
	dss = dss_prec_names[dss_prec_old];
	READ(dss, const char *);
	if (err) {
		ret = EFAULT;
		goto label_return;
	}

	ret = 0;
label_return:
	malloc_mutex_unlock(&ctl_mtx);
	return (ret);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r12
movq %r8, %r15
movq %rcx, %r14
movq %rdx, %rbx
movq 0x8(%rdi), %r13
leaq 0x58257(%rip), %rdi     # 0xdf980
callq 0x1faa0
testq %r15, %r15
je 0x8774a
movl $0x16, %ebp
cmpq $0x8, %r12
jne 0x87855
movq (%r15), %rax
movq %rax, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
movq 0x8(%rsp), %r12
leaq 0x427f5(%rip), %rbx     # 0xc9f50
movq (%rbx), %rdi
movq %r12, %rsi
callq 0x1f880
testl %eax, %eax
je 0x87794
xorl %r15d, %r15d
cmpq $0x2, %r15
je 0x8779b
movq 0x8(%rbx,%r15,8), %rdi
movq %r12, %rsi
callq 0x1f880
incq %r15
testl %eax, %eax
jne 0x8776d
leaq -0x1(%r15), %rax
cmpq $0x2, %rax
setae %al
jmp 0x877a4
xorl %eax, %eax
xorl %r15d, %r15d
jmp 0x877a4
setae %al
movl $0x3, %r15d
movl $0x16, %ebp
testb %al, %al
jne 0x87855
cmpl %r13d, 0x58238(%rip)    # 0xdf9f0
jbe 0x877ed
movl %r13d, %eax
leaq 0x573b4(%rip), %rcx     # 0xdeb78
movq (%rcx), %rcx
movq (%rcx,%rax,8), %r13
testq %r13, %r13
sete %al
je 0x877ff
movq %r13, %rdi
callq 0x8276c
movl %eax, %r12d
movq %r13, %rdi
movl %r15d, %esi
callq 0x82797
xorl %eax, %eax
jmp 0x87805
callq 0x85930
movl %eax, %r12d
movl %r15d, %edi
callq 0x85933
jmp 0x87805
movl $0x3, %r12d
movl %r12d, %ecx
movq (%rbx,%rcx,8), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
sete %dl
testq %r14, %r14
sete %sil
orb %dl, %sil
jne 0x87834
movq (%r14), %rsi
cmpq $0x8, %rsi
jne 0x87842
movq %rcx, (%rdi)
xorl %ecx, %ecx
testb %al, %al
movl $0xe, %ebp
cmovel %ecx, %ebp
jmp 0x87855
movl $0x8, %edx
cmovbq %rsi, %rdx
leaq 0x8(%rsp), %rsi
callq 0x1fbd0
leaq 0x58124(%rip), %rdi     # 0xdf980
callq 0x1fbb0
movl %ebp, %eax
addq $0x18, %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/ctl.c
// Function: arenas_purge_ctl
static int
arenas_purge_ctl(const size_t *mib, size_t miblen, void *oldp, size_t *oldlenp,
    void *newp, size_t newlen)
{
	int ret;
	unsigned arena_ind;

	malloc_mutex_lock(&ctl_mtx);
	WRITEONLY();
	arena_ind = UINT_MAX;
	WRITE(arena_ind, unsigned);
	if (newp != NULL && arena_ind >= ctl_stats.narenas)
		ret = EFAULT;
	else {
		if (arena_ind == UINT_MAX)
			arena_ind = ctl_stats.narenas;
		arena_purge(arena_ind);
		ret = 0;
	}

label_return:
	malloc_mutex_unlock(&ctl_mtx);
	return (ret);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r9, %r14
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r12
leaq 0x57d2d(%rip), %rdi     # 0xdf980
callq 0x1faa0
movl $0x1, %ebp
orq %r15, %r12
jne 0x87ca5
testq %rbx, %rbx
je 0x87c76
movl $0x16, %ebp
cmpq $0x4, %r14
jne 0x87ca5
movl (%rbx), %eax
jmp 0x87c7b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rbx, %rbx
sete %cl
movl 0x57d69(%rip), %edi     # 0xdf9f0
cmpl %edi, %eax
setb %dl
orb %cl, %dl
movl $0xe, %ebp
cmpb $0x1, %dl
jne 0x87ca5
cmpl $-0x1, %eax
cmovnel %eax, %edi
callq 0x87872
xorl %ebp, %ebp
leaq 0x57cd4(%rip), %rdi     # 0xdf980
callq 0x1fbb0
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/huge.c
// Function: huge_palloc
void *
huge_palloc(size_t size, size_t alignment, bool zero)
{
	void *ret;
	size_t csize;
	extent_node_t *node;
	bool is_zeroed;

	/* Allocate one or more contiguous chunks for this request. */

	csize = CHUNK_CEILING(size);
	if (csize == 0) {
		/* size is large enough to cause size_t wrap-around. */
		return (NULL);
	}

	/* Allocate an extent node with which to track the chunk. */
	node = base_node_alloc();
	if (node == NULL)
		return (NULL);

	/*
	 * Copy zero into is_zeroed and pass the copy to chunk_alloc(), so that
	 * it is possible to make correct junk/zero fill decisions below.
	 */
	is_zeroed = zero;
	ret = chunk_alloc(csize, alignment, false, &is_zeroed,
	    chunk_dss_prec_get());
	if (ret == NULL) {
		base_node_dealloc(node);
		return (NULL);
	}

	/* Insert node into huge. */
	node->addr = ret;
	node->size = csize;

	malloc_mutex_lock(&huge_mtx);
	extent_tree_ad_insert(&huge, node);
	if (config_stats) {
		stats_cactive_add(csize);
		huge_nmalloc++;
		huge_allocated += csize;
	}
	malloc_mutex_unlock(&huge_mtx);

	if (config_fill && zero == false) {
		if (opt_junk)
			memset(ret, 0xa5, csize);
		else if (opt_zero && is_zeroed == false)
			memset(ret, 0, csize);
	}

	return (ret);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
leaq 0x541b8(%rip), %rax     # 0xdf880
movq (%rax), %rbx
addq %rbx, %rdi
notq %rbx
andq %rdi, %rbx
je 0x8b783
movl %edx, %ebp
movq %rsi, %r14
callq 0x8523f
testq %rax, %rax
je 0x8b783
movq %rax, %r15
leaq 0xf(%rsp), %r12
movb %bpl, (%r12)
callq 0x85930
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %r12, %rcx
movl %eax, %r8d
callq 0x85410
testq %rax, %rax
je 0x8b77b
movq %rax, %r14
movq %rax, 0x28(%r15)
movq %rbx, 0x30(%r15)
leaq 0x542e0(%rip), %r12     # 0xdfa08
movq %r12, %rdi
callq 0x1faa0
leaq 0x542f9(%rip), %rdi     # 0xdfa30
movq %r15, %rsi
callq 0x8ae18
leaq 0x6543a(%rip), %rax     # 0xf0b80
lock
addq %rbx, (%rax)
incq 0x54327(%rip)           # 0xdfa78
addq %rbx, 0x54328(%rip)     # 0xdfa80
movq %r12, %rdi
callq 0x1fbb0
testb %bpl, %bpl
jne 0x8b786
leaq 0x533ef(%rip), %rax     # 0xdeb5b
cmpb $0x1, (%rax)
jne 0x8b796
movq %r14, %rdi
movl $0xa5, %esi
jmp 0x8b7ae
movq %r15, %rdi
callq 0x8528a
xorl %r14d, %r14d
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x533cf(%rip), %rax     # 0xdeb6c
cmpb $0x1, (%rax)
jne 0x8b786
cmpb $0x0, 0xf(%rsp)
jne 0x8b786
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x1f110
jmp 0x8b786
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/huge.c
// Function: huge_ralloc_no_move
void *
huge_ralloc_no_move(void *ptr, size_t oldsize, size_t size, size_t extra)
{

	/*
	 * Avoid moving the allocation if the size class can be left the same.
	 */
	if (oldsize > arena_maxclass
	    && CHUNK_CEILING(oldsize) >= CHUNK_CEILING(size)
	    && CHUNK_CEILING(oldsize) <= CHUNK_CEILING(size+extra)) {
		assert(CHUNK_CEILING(oldsize) == oldsize);
		if (config_fill && opt_junk && size < oldsize) {
			memset((void *)((uintptr_t)ptr + size), 0x5a,
			    oldsize - size);
		}
		return (ptr);
	}

	/* Reallocation would require a move. */
	return (NULL);
}

// Assembly:
pushq %rbx
movq %rsi, %rax
leaq 0x5416d(%rip), %rsi     # 0xdf930
cmpq %rax, (%rsi)
jae 0x8b7fc
movq %rdi, %rbx
leaq 0x540ae(%rip), %rsi     # 0xdf880
movq (%rsi), %rdi
leaq (%rdi,%rax), %rsi
movq %rdi, %r8
notq %r8
andq %r8, %rsi
leaq (%rdi,%rdx), %r9
andq %r8, %r9
cmpq %r9, %rsi
jb 0x8b7fc
addq %rdx, %rcx
addq %rdi, %rcx
andq %r8, %rcx
cmpq %rcx, %rsi
jbe 0x8b803
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
subq %rdx, %rax
jbe 0x8b7fe
leaq 0x5334c(%rip), %rcx     # 0xdeb5b
cmpb $0x0, (%rcx)
je 0x8b7fe
addq %rbx, %rdx
movq %rdx, %rdi
movl $0x5a, %esi
movq %rax, %rdx
callq 0x1f110
jmp 0x8b7fe
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/huge.c
// Function: huge_dalloc
void
huge_dalloc(void *ptr, bool unmap)
{
	extent_node_t *node, key;

	malloc_mutex_lock(&huge_mtx);

	/* Extract from tree of huge allocations. */
	key.addr = ptr;
	node = extent_tree_ad_search(&huge, &key);
	assert(node != NULL);
	assert(node->addr == ptr);
	extent_tree_ad_remove(&huge, node);

	if (config_stats) {
		stats_cactive_sub(node->size);
		huge_ndalloc++;
		huge_allocated -= node->size;
	}

	malloc_mutex_unlock(&huge_mtx);

	if (unmap && config_fill && config_dss && opt_junk)
		memset(node->addr, 0x5a, node->size);

	chunk_dealloc(node->addr, node->size, unmap);

	base_node_dealloc(node);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, %ebx
movq %rdi, %r14
leaq 0x53e73(%rip), %r15     # 0xdfa08
movq %r15, %rdi
callq 0x1faa0
leaq 0x8(%rsp), %rsi
movq %r14, 0x28(%rsi)
leaq 0x53e83(%rip), %r14     # 0xdfa30
movq %r14, %rdi
callq 0x8ad31
movq %rax, %r12
movq %r14, %rdi
movq %rax, %rsi
callq 0x8af83
xorl %eax, %eax
subq 0x30(%r12), %rax
leaq 0x64faf(%rip), %rcx     # 0xf0b80
lock
addq %rax, (%rcx)
incq 0x53eac(%rip)           # 0xdfa88
movq 0x30(%r12), %rax
subq %rax, 0x53e98(%rip)     # 0xdfa80
movq %r15, %rdi
callq 0x1fbb0
movq 0x28(%r12), %rdi
movq 0x30(%r12), %rsi
movl %ebx, %edx
callq 0x85810
movq %r12, %rdi
callq 0x8528a
addq $0x48, %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/huge.c
// Function: huge_salloc
size_t
huge_salloc(const void *ptr)
{
	size_t ret;
	extent_node_t *node, key;

	malloc_mutex_lock(&huge_mtx);

	/* Extract from tree of huge allocations. */
	key.addr = __DECONST(void *, ptr);
	node = extent_tree_ad_search(&huge, &key);
	assert(node != NULL);

	ret = node->size;

	malloc_mutex_unlock(&huge_mtx);

	return (ret);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x53de2(%rip), %r14     # 0xdfa08
movq %r14, %rdi
callq 0x1faa0
leaq 0x8(%rsp), %rsi
movq %rbx, 0x28(%rsi)
leaq 0x53df2(%rip), %rdi     # 0xdfa30
callq 0x8ad31
movq 0x30(%rax), %rbx
movq %r14, %rdi
callq 0x1fbb0
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/huge.c
// Function: huge_prof_ctx_get
prof_ctx_t *
huge_prof_ctx_get(const void *ptr)
{
	prof_ctx_t *ret;
	extent_node_t *node, key;

	malloc_mutex_lock(&huge_mtx);

	/* Extract from tree of huge allocations. */
	key.addr = __DECONST(void *, ptr);
	node = extent_tree_ad_search(&huge, &key);
	assert(node != NULL);

	ret = node->prof_ctx;

	malloc_mutex_unlock(&huge_mtx);

	return (ret);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x53d9d(%rip), %r14     # 0xdfa08
movq %r14, %rdi
callq 0x1faa0
leaq 0x8(%rsp), %rsi
movq %rbx, 0x28(%rsi)
leaq 0x53dad(%rip), %rdi     # 0xdfa30
callq 0x8ad31
movq 0x20(%rax), %rbx
movq %r14, %rdi
callq 0x1fbb0
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/huge.c
// Function: huge_prof_ctx_set
void
huge_prof_ctx_set(const void *ptr, prof_ctx_t *ctx)
{
	extent_node_t *node, key;

	malloc_mutex_lock(&huge_mtx);

	/* Extract from tree of huge allocations. */
	key.addr = __DECONST(void *, ptr);
	node = extent_tree_ad_search(&huge, &key);
	assert(node != NULL);

	node->prof_ctx = ctx;

	malloc_mutex_unlock(&huge_mtx);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x53d53(%rip), %r15     # 0xdfa08
movq %r15, %rdi
callq 0x1faa0
movq %rsp, %rsi
movq %r14, 0x28(%rsi)
leaq 0x53d65(%rip), %rdi     # 0xdfa30
callq 0x8ad31
movq %rbx, 0x20(%rax)
movq %r15, %rdi
callq 0x1fbb0
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/prof.c
// Function: prof_leave
static inline void
prof_leave(prof_tdata_t *prof_tdata)
{
	bool idump, gdump;

	cassert(config_prof);

	malloc_mutex_unlock(&bt2ctx_mtx);

	assert(prof_tdata->enq);
	prof_tdata->enq = false;
	idump = prof_tdata->enq_idump;
	prof_tdata->enq_idump = false;
	gdump = prof_tdata->enq_gdump;
	prof_tdata->enq_gdump = false;

	if (idump)
		prof_idump();
	if (gdump)
		prof_gdump();
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x546a0(%rip), %rdi     # 0xe0b28
callq 0x1fbb0
movb $0x0, 0x58(%rbx)
movb 0x59(%rbx), %al
movb 0x5a(%rbx), %bpl
movw $0x0, 0x59(%rbx)
cmpb $0x1, %al
jne 0x8c4a7
callq 0x8c8fb
addq $0x8, %rsp
testb %bpl, %bpl
je 0x8c4b7
popq %rbx
popq %rbp
jmp 0x8cf3b
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/prof.c
// Function: prof_ctx_merge
static void
prof_ctx_merge(prof_ctx_t *ctx, prof_thr_cnt_t *cnt)
{
	bool destroy;

	cassert(config_prof);

	/* Merge cnt stats and detach from ctx. */
	malloc_mutex_lock(ctx->lock);
	ctx->cnt_merged.curobjs += cnt->cnts.curobjs;
	ctx->cnt_merged.curbytes += cnt->cnts.curbytes;
	ctx->cnt_merged.accumobjs += cnt->cnts.accumobjs;
	ctx->cnt_merged.accumbytes += cnt->cnts.accumbytes;
	ql_remove(&ctx->cnts_ql, cnt, cnts_link);
	if (opt_prof_accum == false && ql_first(&ctx->cnts_ql) == NULL &&
	    ctx->cnt_merged.curobjs == 0 && ctx->nlimbo == 0) {
		/*
		 * Increment ctx->nlimbo in order to keep another thread from
		 * winning the race to destroy ctx while this one has ctx->lock
		 * dropped.  Without this, it would be possible for another
		 * thread to:
		 *
		 * 1) Sample an allocation associated with ctx.
		 * 2) Deallocate the sampled object.
		 * 3) Successfully prof_ctx_destroy(ctx).
		 *
		 * The result would be that ctx no longer exists by the time
		 * this thread accesses it in prof_ctx_destroy().
		 */
		ctx->nlimbo++;
		destroy = true;
	} else
		destroy = false;
	malloc_mutex_unlock(ctx->lock);
	if (destroy)
		prof_ctx_destroy(ctx);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x1faa0
movq 0x38(%rbx), %rax
movq 0x58(%rbx), %rcx
addq 0x30(%r14), %rax
movq %rax, 0x38(%rbx)
movq 0x38(%r14), %rdx
addq %rdx, 0x40(%rbx)
movq 0x40(%r14), %rdx
addq %rdx, 0x48(%rbx)
movq 0x48(%r14), %rdx
addq %rdx, 0x50(%rbx)
cmpq %r14, %rcx
jne 0x8c7aa
movq (%rcx), %rcx
movq %rcx, 0x58(%rbx)
cmpq %r14, 0x58(%rbx)
je 0x8c7ca
movq (%r14), %rcx
movq 0x8(%r14), %rdx
movq %rcx, (%rdx)
movq (%r14), %rcx
movq %rdx, 0x8(%rcx)
movq %r14, (%r14)
movq %r14, 0x8(%r14)
jmp 0x8c7d2
movq $0x0, 0x58(%rbx)
cmpb $0x0, 0x532bb(%rip)     # 0xdfa94
jne 0x8c7e7
orq 0x58(%rbx), %rax
jne 0x8c7e7
cmpl $0x0, 0x10(%rbx)
je 0x8c7f7
movq 0x8(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1fbb0
movl $0x1, 0x10(%rbx)
movq 0x8(%rbx), %rdi
callq 0x1fbb0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x8c813
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/prof.c
// Function: prof_ctx_destroy
static void
prof_ctx_destroy(prof_ctx_t *ctx)
{
	prof_tdata_t *prof_tdata;

	cassert(config_prof);

	/*
	 * Check that ctx is still unused by any thread cache before destroying
	 * it.  prof_lookup() increments ctx->nlimbo in order to avoid a race
	 * condition with this function, as does prof_ctx_merge() in order to
	 * avoid a race between the main body of prof_ctx_merge() and entry
	 * into this function.
	 */
	prof_tdata = *prof_tdata_tsd_get();
	assert((uintptr_t)prof_tdata > (uintptr_t)PROF_TDATA_STATE_MAX);
	prof_enter(prof_tdata);
	malloc_mutex_lock(ctx->lock);
	if (ql_first(&ctx->cnts_ql) == NULL && ctx->cnt_merged.curobjs == 0 &&
	    ctx->nlimbo == 1) {
		assert(ctx->cnt_merged.curbytes == 0);
		assert(ctx->cnt_merged.accumobjs == 0);
		assert(ctx->cnt_merged.accumbytes == 0);
		/* Remove ctx from bt2ctx. */
		if (ckh_remove(&bt2ctx, ctx->bt, NULL, NULL))
			assert(false);
		prof_leave(prof_tdata);
		/* Destroy ctx. */
		malloc_mutex_unlock(ctx->lock);
		bt_destroy(ctx->bt);
		idalloc(ctx);
	} else {
		/*
		 * Compensate for increment in prof_ctx_merge() or
		 * prof_lookup().
		 */
		ctx->nlimbo--;
		malloc_mutex_unlock(ctx->lock);
		prof_leave(prof_tdata);
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq %fs:-0x18, %r14
movb $0x1, 0x58(%r14)
leaq 0x542f9(%rip), %rdi     # 0xe0b28
callq 0x1faa0
movq 0x8(%rbx), %rdi
callq 0x1faa0
cmpq $0x0, 0x58(%rbx)
jne 0x8c8b4
cmpq $0x0, 0x38(%rbx)
jne 0x8c8b4
cmpl $0x1, 0x10(%rbx)
jne 0x8c8b4
movq (%rbx), %rsi
leaq 0x5323d(%rip), %rdi     # 0xdfa98
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x932a3
leaq 0x542bd(%rip), %rdi     # 0xe0b28
callq 0x1fbb0
movb $0x0, 0x58(%r14)
movb 0x59(%r14), %al
movb 0x5a(%r14), %bpl
movw $0x0, 0x59(%r14)
cmpb $0x1, %al
jne 0x8c88d
callq 0x8c8fb
testb %bpl, %bpl
je 0x8c897
callq 0x8cf3b
movq 0x8(%rbx), %rdi
callq 0x1fbb0
movq (%rbx), %rdi
callq 0x8c4ba
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x8c4ba
decl 0x10(%rbx)
movq 0x8(%rbx), %rdi
callq 0x1fbb0
leaq 0x54261(%rip), %rdi     # 0xe0b28
callq 0x1fbb0
movb $0x0, 0x58(%r14)
movb 0x59(%r14), %al
movb 0x5a(%r14), %bl
movw $0x0, 0x59(%r14)
cmpb $0x1, %al
jne 0x8c8e9
callq 0x8c8fb
testb %bl, %bl
je 0x8c8f6
popq %rbx
popq %r14
popq %rbp
jmp 0x8cf3b
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/prof.c
// Function: prof_idump
void
prof_idump(void)
{
	prof_tdata_t *prof_tdata;
	char filename[PATH_MAX + 1];

	cassert(config_prof);

	if (prof_booted == false)
		return;
	/*
	 * Don't call prof_tdata_get() here, because it could cause recursive
	 * allocation.
	 */
	prof_tdata = *prof_tdata_tsd_get();
	if ((uintptr_t)prof_tdata <= (uintptr_t)PROF_TDATA_STATE_MAX)
		return;
	if (prof_tdata->enq) {
		prof_tdata->enq_idump = true;
		return;
	}

	if (opt_prof_prefix[0] != '\0') {
		malloc_mutex_lock(&prof_dump_seq_mtx);
		prof_dump_filename(filename, 'i', prof_dump_iseq);
		prof_dump_iseq++;
		malloc_mutex_unlock(&prof_dump_seq_mtx);
		prof_dump(false, filename, false);
	}
}

// Assembly:
cmpb $0x1, 0x531c6(%rip)     # 0xdfac8
jne 0x8c97c
movq %fs:-0x18, %rax
cmpq $0x3, %rax
jb 0x8c97c
cmpb $0x1, 0x58(%rax)
jne 0x8c91e
movb $0x1, 0x59(%rax)
retq
cmpb $0x0, 0x531ab(%rip)     # 0xdfad0
je 0x8c97c
pushq %r14
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
leaq 0x541a0(%rip), %rbx     # 0xe0ad8
movq %rbx, %rdi
callq 0x1faa0
movq 0x541b9(%rip), %rdx     # 0xe0b00
movq %rsp, %r14
movq %r14, %rdi
movl $0x69, %esi
callq 0x8c97d
incq 0x541a2(%rip)           # 0xe0b00
movq %rbx, %rdi
callq 0x1fbb0
xorl %edi, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x8c9f1
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/prof.c
// Function: prof_dump_filename
static void
prof_dump_filename(char *filename, char v, int64_t vseq)
{

	cassert(config_prof);

	if (vseq != UINT64_C(0xffffffffffffffff)) {
	        /* "<prefix>.<pid>.<seq>.v<vseq>.heap" */
		malloc_snprintf(filename, DUMP_FILENAME_BUFSIZE,
		    "%s.%d.%"PRIu64".%c%"PRId64".heap",
		    opt_prof_prefix, (int)getpid(), prof_dump_seq, v, vseq);
	} else {
	        /* "<prefix>.<pid>.<seq>.<v>.heap" */
		malloc_snprintf(filename, DUMP_FILENAME_BUFSIZE,
		    "%s.%d.%"PRIu64".%c.heap",
		    opt_prof_prefix, (int)getpid(), prof_dump_seq, v);
	}
	prof_dump_seq++;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movl %esi, %ebx
movq %rdi, %r14
callq 0x1f410
movq 0x541ca(%rip), %r9      # 0xe0b60
cmpq $-0x1, %r15
je 0x8c9bb
leaq 0x16b32(%rip), %rdx     # 0xa34d5
leaq 0x53126(%rip), %rcx     # 0xdfad0
movl $0x1001, %esi           # imm = 0x1001
movq %r14, %rdi
movl %eax, %r8d
xorl %eax, %eax
pushq %r15
jmp 0x8c9da
subq $0x8, %rsp
leaq 0x16b24(%rip), %rdx     # 0xa34ea
leaq 0x53103(%rip), %rcx     # 0xdfad0
movl $0x1001, %esi           # imm = 0x1001
movq %r14, %rdi
movl %eax, %r8d
xorl %eax, %eax
pushq %rbx
callq 0x9216e
addq $0x10, %rsp
incq 0x54175(%rip)           # 0xe0b60
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/prof.c
// Function: prof_mdump
bool
prof_mdump(const char *filename)
{
	char filename_buf[DUMP_FILENAME_BUFSIZE];

	cassert(config_prof);

	if (opt_prof == false || prof_booted == false)
		return (true);

	if (filename == NULL) {
		/* No filename specified, so automatically generate one. */
		if (opt_prof_prefix[0] == '\0')
			return (true);
		malloc_mutex_lock(&prof_dump_seq_mtx);
		prof_dump_filename(filename_buf, 'm', prof_dump_mseq);
		prof_dump_mseq++;
		malloc_mutex_unlock(&prof_dump_seq_mtx);
		filename = filename_buf;
	}
	return (prof_dump(true, filename, false));
}

// Assembly:
movb $0x1, %al
cmpb $0x0, 0x52bcb(%rip)     # 0xdfa91
je 0x8cf3a
cmpb $0x1, 0x52bf9(%rip)     # 0xdfac8
jne 0x8cf3a
pushq %r14
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
movq %rdi, %rbx
testq %rdi, %rdi
jne 0x8cf21
cmpb $0x0, 0x52be6(%rip)     # 0xdfad0
je 0x8cf30
leaq 0x53be5(%rip), %r14     # 0xe0ad8
movq %r14, %rdi
callq 0x1faa0
movq 0x53c06(%rip), %rdx     # 0xe0b08
movq %rsp, %rbx
movq %rbx, %rdi
movl $0x6d, %esi
callq 0x8c97d
incq 0x53bef(%rip)           # 0xe0b08
movq %r14, %rdi
callq 0x1fbb0
movl $0x1, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x8c9f1
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/prof.c
// Function: prof_gdump
void
prof_gdump(void)
{
	prof_tdata_t *prof_tdata;
	char filename[DUMP_FILENAME_BUFSIZE];

	cassert(config_prof);

	if (prof_booted == false)
		return;
	/*
	 * Don't call prof_tdata_get() here, because it could cause recursive
	 * allocation.
	 */
	prof_tdata = *prof_tdata_tsd_get();
	if ((uintptr_t)prof_tdata <= (uintptr_t)PROF_TDATA_STATE_MAX)
		return;
	if (prof_tdata->enq) {
		prof_tdata->enq_gdump = true;
		return;
	}

	if (opt_prof_prefix[0] != '\0') {
		malloc_mutex_lock(&prof_dump_seq_mtx);
		prof_dump_filename(filename, 'u', prof_dump_useq);
		prof_dump_useq++;
		malloc_mutex_unlock(&prof_dump_seq_mtx);
		prof_dump(false, filename, false);
	}
}

// Assembly:
cmpb $0x1, 0x52b86(%rip)     # 0xdfac8
jne 0x8cfbc
movq %fs:-0x18, %rax
cmpq $0x3, %rax
jb 0x8cfbc
cmpb $0x1, 0x58(%rax)
jne 0x8cf5e
movb $0x1, 0x5a(%rax)
retq
cmpb $0x0, 0x52b6b(%rip)     # 0xdfad0
je 0x8cfbc
pushq %r14
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
leaq 0x53b60(%rip), %rbx     # 0xe0ad8
movq %rbx, %rdi
callq 0x1faa0
movq 0x53b89(%rip), %rdx     # 0xe0b10
movq %rsp, %r14
movq %r14, %rdi
movl $0x75, %esi
callq 0x8c97d
incq 0x53b72(%rip)           # 0xe0b10
movq %rbx, %rdi
callq 0x1fbb0
xorl %edi, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x8c9f1
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/prof.c
// Function: prof_tdata_init
prof_tdata_t *
prof_tdata_init(void)
{
	prof_tdata_t *prof_tdata;

	cassert(config_prof);

	/* Initialize an empty cache for this thread. */
	prof_tdata = (prof_tdata_t *)imalloc(sizeof(prof_tdata_t));
	if (prof_tdata == NULL)
		return (NULL);

	if (ckh_new(&prof_tdata->bt2cnt, PROF_CKH_MINITEMS,
	    prof_bt_hash, prof_bt_keycomp)) {
		idalloc(prof_tdata);
		return (NULL);
	}
	ql_new(&prof_tdata->lru_ql);

	prof_tdata->vec = imalloc(sizeof(void *) * PROF_BT_MAX);
	if (prof_tdata->vec == NULL) {
		ckh_delete(&prof_tdata->bt2cnt);
		idalloc(prof_tdata);
		return (NULL);
	}

	prof_tdata->prng_state = 0;
	prof_tdata->threshold = 0;
	prof_tdata->accum = 0;

	prof_tdata->enq = false;
	prof_tdata->enq_idump = false;
	prof_tdata->enq_gdump = false;

	prof_tdata_tsd_set(&prof_tdata);

	return (prof_tdata);
}

// Assembly:
pushq %rbx
movl $0x60, %edi
callq 0x8c241
testq %rax, %rax
je 0x8d06e
movq %rax, %rbx
leaq 0x9a(%rip), %rdx        # 0x8d075
leaq 0x190(%rip), %rcx       # 0x8d172
movl $0x40, %esi
movq %rax, %rdi
callq 0x92708
testb %al, %al
jne 0x8d066
movq $0x0, 0x30(%rbx)
movl $0x400, %edi            # imm = 0x400
callq 0x8c241
movq %rax, 0x38(%rbx)
testq %rax, %rax
je 0x8d05e
movq %fs:0x0, %rax
leaq -0x18(%rax), %rsi
xorps %xmm0, %xmm0
movups %xmm0, 0x4b(%rbx)
movups %xmm0, 0x40(%rbx)
movq %rbx, %fs:-0x18
movl 0x53b20(%rip), %edi     # 0xe0b58
callq 0x1f1c0
testl %eax, %eax
je 0x8d070
leaq 0x16623(%rip), %rdi     # 0xa366b
callq 0x9124c
leaq 0x51b06(%rip), %rax     # 0xdeb5a
cmpb $0x1, (%rax)
jne 0x8d070
callq 0x1f1b0
movq %rbx, %rdi
callq 0x92b09
movq %rbx, %rdi
callq 0x8c4ba
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/prof.c
// Function: prof_bt_hash
static void
prof_bt_hash(const void *key, unsigned minbits, size_t *hash1, size_t *hash2)
{
	size_t ret1, ret2;
	uint64_t h;
	prof_bt_t *bt = (prof_bt_t *)key;

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

	h = hash(bt->vec, bt->len * sizeof(void *),
	    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(bt->vec, bt->len * sizeof(void *),
		    UINT64_C(0x8432a476666bbc13));
	}

	*hash1 = ret1;
	*hash2 = ret2;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movabsq $-0x395b586ca42e166b, %rax # imm = 0xC6A4A7935BD1E995
movq (%rdi), %r8
movl 0x8(%rdi), %edi
movabsq $0x35253c9ade8f4ca8, %r9 # imm = 0x35253C9ADE8F4CA8
imulq %rdi, %r9
movabsq $-0x6bedd0cca4ccd516, %r10 # imm = 0x94122F335B332AEA
xorq %r9, %r10
testq %rdi, %rdi
je 0x8d0df
leaq (,%rdi,8), %r11
xorl %ebx, %ebx
movq (%r8,%rbx), %r15
imulq %rax, %r15
movq %r15, %r14
shrq $0x2f, %r14
xorq %r15, %r14
imulq %rax, %r14
xorq %r10, %r14
imulq %rax, %r14
addq $0x8, %rbx
movq %r14, %r10
cmpq %rbx, %r11
jne 0x8d0b4
jmp 0x8d0e2
movq %r10, %r14
movq %r14, %r11
shrq $0x2f, %r11
xorq %r14, %r11
imulq %rax, %r11
movq %r11, %r10
shrq $0x2f, %r10
xorq %r11, %r10
cmpl $0x20, %esi
ja 0x8d108
movl %r10d, %r10d
shrq $0x20, %r11
jmp 0x8d166
movabsq $-0x7bcd5b89999443ed, %rsi # imm = 0x8432A476666BBC13
xorq %rsi, %r9
testq %rdi, %rdi
je 0x8d14b
shlq $0x3, %rdi
xorl %esi, %esi
movq (%r8,%rsi), %rbx
imulq %rax, %rbx
movq %rbx, %r11
shrq $0x2f, %r11
xorq %rbx, %r11
imulq %rax, %r11
xorq %r9, %r11
imulq %rax, %r11
addq $0x8, %rsi
movq %r11, %r9
cmpq %rsi, %rdi
jne 0x8d120
jmp 0x8d14e
movq %r9, %r11
movq %r11, %rsi
shrq $0x2f, %rsi
xorq %r11, %rsi
imulq %rax, %rsi
movq %rsi, %r11
shrq $0x2f, %r11
xorq %rsi, %r11
movq %r10, (%rdx)
movq %r11, (%rcx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/prof.c
// Function: prof_tdata_cleanup
void
prof_tdata_cleanup(void *arg)
{
	prof_thr_cnt_t *cnt;
	prof_tdata_t *prof_tdata = *(prof_tdata_t **)arg;

	cassert(config_prof);

	if (prof_tdata == PROF_TDATA_STATE_REINCARNATED) {
		/*
		 * Another destructor deallocated memory after this destructor
		 * was called.  Reset prof_tdata to PROF_TDATA_STATE_PURGATORY
		 * in order to receive another callback.
		 */
		prof_tdata = PROF_TDATA_STATE_PURGATORY;
		prof_tdata_tsd_set(&prof_tdata);
	} else if (prof_tdata == PROF_TDATA_STATE_PURGATORY) {
		/*
		 * The previous time this destructor was called, we set the key
		 * to PROF_TDATA_STATE_PURGATORY so that other destructors
		 * wouldn't cause re-creation of the prof_tdata.  This time, do
		 * nothing, so that the destructor will not be called again.
		 */
	} else if (prof_tdata != NULL) {
		/*
		 * Delete the hash table.  All of its contents can still be
		 * iterated over via the LRU.
		 */
		ckh_delete(&prof_tdata->bt2cnt);
		/*
		 * Iteratively merge cnt's into the global stats and delete
		 * them.
		 */
		while ((cnt = ql_last(&prof_tdata->lru_ql, lru_link)) != NULL) {
			ql_remove(&prof_tdata->lru_ql, cnt, lru_link);
			prof_ctx_merge(cnt->ctx, cnt);
			idalloc(cnt);
		}
		idalloc(prof_tdata->vec);
		idalloc(prof_tdata);
		prof_tdata = PROF_TDATA_STATE_PURGATORY;
		prof_tdata_tsd_set(&prof_tdata);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %rbx
cmpq $0x1, %rbx
je 0x8d234
testq $-0x3, %rbx
je 0x8d278
movq %rbx, %rdi
callq 0x92b09
movq 0x30(%rbx), %rax
testq %rax, %rax
je 0x8d1cc
movq 0x18(%rax), %r14
jmp 0x8d1cf
xorl %r14d, %r14d
testq %r14, %r14
je 0x8d223
cmpq %r14, %rax
jne 0x8d1e1
movq 0x10(%rax), %rax
movq %rax, 0x30(%rbx)
cmpq %r14, 0x30(%rbx)
je 0x8d205
movq 0x10(%r14), %rax
movq 0x18(%r14), %rcx
movq %rax, 0x10(%rcx)
movq 0x10(%r14), %rax
movq %rcx, 0x18(%rax)
movq %r14, 0x10(%r14)
movq %r14, 0x18(%r14)
jmp 0x8d20d
movq $0x0, 0x30(%rbx)
movq 0x20(%r14), %rdi
movq %r14, %rsi
callq 0x8c763
movq %r14, %rdi
callq 0x8c4ba
jmp 0x8d1bd
movq 0x38(%rbx), %rdi
callq 0x8c4ba
movq %rbx, %rdi
callq 0x8c4ba
movq %fs:0x0, %rax
leaq -0x18(%rax), %rsi
movq $0x2, %fs:-0x18
movl 0x53901(%rip), %edi     # 0xe0b58
callq 0x1f1c0
testl %eax, %eax
je 0x8d278
leaq 0x16404(%rip), %rdi     # 0xa366b
callq 0x9124c
leaq 0x518e7(%rip), %rax     # 0xdeb5a
cmpb $0x1, (%rax)
je 0x8d280
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x1f1b0
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/prof.c
// Function: prof_boot2
bool
prof_boot2(void)
{

	cassert(config_prof);

	if (opt_prof) {
		unsigned i;

		if (ckh_new(&bt2ctx, PROF_CKH_MINITEMS, prof_bt_hash,
		    prof_bt_keycomp))
			return (true);
		if (malloc_mutex_init(&bt2ctx_mtx))
			return (true);
		if (prof_tdata_tsd_boot()) {
			malloc_write(
			    "<jemalloc>: Error in pthread_key_create()\n");
			abort();
		}

		if (malloc_mutex_init(&prof_dump_seq_mtx))
			return (true);

		if (atexit(prof_fdump) != 0) {
			malloc_write("<jemalloc>: Error in atexit()\n");
			if (opt_abort)
				abort();
		}

		ctx_locks = (malloc_mutex_t *)base_alloc(PROF_NCTX_LOCKS *
		    sizeof(malloc_mutex_t));
		if (ctx_locks == NULL)
			return (true);
		for (i = 0; i < PROF_NCTX_LOCKS; i++) {
			if (malloc_mutex_init(&ctx_locks[i]))
				return (true);
		}
	}

#ifdef JEMALLOC_PROF_LIBGCC
	/*
	 * Cause the backtracing machinery to allocate its internal state
	 * before enabling profiling.
	 */
	_Unwind_Backtrace(prof_unwind_init_callback, NULL);
#endif

	prof_booted = true;

	return (false);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpb $0x1, 0x52789(%rip)     # 0xdfa91
jne 0x8d3de
leaq 0x52783(%rip), %rdi     # 0xdfa98
leaq -0x2a7(%rip), %rdx      # 0x8d075
leaq -0x1b1(%rip), %rcx      # 0x8d172
movl $0x40, %esi
callq 0x92708
movb $0x1, %bl
testb %al, %al
jne 0x8d3e7
leaq 0x537ea(%rip), %rdi     # 0xe0b28
callq 0x8bd44
testb %al, %al
jne 0x8d3e7
leaq 0x53806(%rip), %rdi     # 0xe0b58
leaq -0x1c2(%rip), %rsi      # 0x8d197
callq 0x1f5a0
testl %eax, %eax
jne 0x8d3f1
movb $0x1, 0x52723(%rip)     # 0xdfa90
leaq 0x53764(%rip), %rdi     # 0xe0ad8
callq 0x8bd44
testb %al, %al
jne 0x8d3e7
leaq 0x7e(%rip), %rdi        # 0x8d402
callq 0x93a20
testl %eax, %eax
je 0x8d3a5
leaq 0x15bb7(%rip), %rdi     # 0xa2f4b
callq 0x9124c
leaq 0x517ba(%rip), %rax     # 0xdeb5a
cmpb $0x1, (%rax)
je 0x8d3fd
movl $0xa000, %edi           # imm = 0xA000
callq 0x85158
movq %rax, 0x5379a(%rip)     # 0xe0b50
testq %rax, %rax
je 0x8d3e7
xorl %r14d, %r14d
movq 0x5378b(%rip), %rdi     # 0xe0b50
addq %r14, %rdi
callq 0x8bd44
testb %al, %al
jne 0x8d3e7
addq $0x28, %r14
cmpq $0xa000, %r14           # imm = 0xA000
jne 0x8d3be
movb $0x1, 0x526e3(%rip)     # 0xdfac8
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x160b2(%rip), %rdi     # 0xa34aa
callq 0x9124c
callq 0x1f1b0
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/prof.c
// Function: prof_fdump
static void
prof_fdump(void)
{
	char filename[DUMP_FILENAME_BUFSIZE];

	cassert(config_prof);

	if (prof_booted == false)
		return;

	if (opt_prof_final && opt_prof_prefix[0] != '\0') {
		malloc_mutex_lock(&prof_dump_seq_mtx);
		prof_dump_filename(filename, 'f', UINT64_C(0xffffffffffffffff));
		malloc_mutex_unlock(&prof_dump_seq_mtx);
		prof_dump(false, filename, opt_prof_leak);
	}
}

// Assembly:
cmpb $0x1, 0x526bf(%rip)     # 0xdfac8
jne 0x8d4a0
cmpb $0x1, 0x3cb72(%rip)     # 0xc9f88
jne 0x8d4a0
cmpb $0x0, 0x526ad(%rip)     # 0xdfad0
je 0x8d4a0
pushq %r14
pushq %rbx
subq $0x1018, %rsp           # imm = 0x1018
leaq 0x536a2(%rip), %rbx     # 0xe0ad8
movq %rbx, %rdi
callq 0x1faa0
callq 0x1f410
movq 0x53716(%rip), %r9      # 0xe0b60
movl $0x66, (%rsp)
leaq 0x16092(%rip), %rdx     # 0xa34ea
leaq 0x52671(%rip), %rcx     # 0xdfad0
leaq 0x10(%rsp), %r14
movl $0x1001, %esi           # imm = 0x1001
movq %r14, %rdi
movl %eax, %r8d
xorl %eax, %eax
callq 0x9216e
incq 0x536e3(%rip)           # 0xe0b60
movq %rbx, %rdi
callq 0x1fbb0
movzbl 0x52607(%rip), %edx     # 0xdfa93
xorl %edi, %edi
movq %r14, %rsi
callq 0x8c9f1
addq $0x1018, %rsp           # imm = 0x1018
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/prof.c
// Function: prof_prefork
void
prof_prefork(void)
{

	if (opt_prof) {
		unsigned i;

		malloc_mutex_lock(&bt2ctx_mtx);
		malloc_mutex_lock(&prof_dump_seq_mtx);
		for (i = 0; i < PROF_NCTX_LOCKS; i++)
			malloc_mutex_lock(&ctx_locks[i]);
	}
}

// Assembly:
cmpb $0x1, 0x525e9(%rip)     # 0xdfa91
jne 0x8d4e2
pushq %rbx
leaq 0x53676(%rip), %rdi     # 0xe0b28
callq 0x1faa0
leaq 0x5361a(%rip), %rdi     # 0xe0ad8
callq 0x1faa0
xorl %ebx, %ebx
movq 0x53684(%rip), %rdi     # 0xe0b50
addq %rbx, %rdi
callq 0x1faa0
addq $0x28, %rbx
cmpq $0xa000, %rbx           # imm = 0xA000
jne 0x8d4c5
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/prof.c
// Function: prof_postfork_parent
void
prof_postfork_parent(void)
{

	if (opt_prof) {
		unsigned i;

		for (i = 0; i < PROF_NCTX_LOCKS; i++)
			malloc_mutex_postfork_parent(&ctx_locks[i]);
		malloc_mutex_postfork_parent(&prof_dump_seq_mtx);
		malloc_mutex_postfork_parent(&bt2ctx_mtx);
	}
}

// Assembly:
cmpb $0x1, 0x525a7(%rip)     # 0xdfa91
jne 0x8d524
pushq %rbx
xorl %ebx, %ebx
movq 0x5365a(%rip), %rdi     # 0xe0b50
addq %rbx, %rdi
callq 0x8bd98
addq $0x28, %rbx
cmpq $0xa000, %rbx           # imm = 0xA000
jne 0x8d4ef
leaq 0x535c6(%rip), %rdi     # 0xe0ad8
callq 0x8bd98
leaq 0x5360a(%rip), %rdi     # 0xe0b28
popq %rbx
jmp 0x8bd98
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/prof.c
// Function: prof_postfork_child
void
prof_postfork_child(void)
{

	if (opt_prof) {
		unsigned i;

		for (i = 0; i < PROF_NCTX_LOCKS; i++)
			malloc_mutex_postfork_child(&ctx_locks[i]);
		malloc_mutex_postfork_child(&prof_dump_seq_mtx);
		malloc_mutex_postfork_child(&bt2ctx_mtx);
	}
}

// Assembly:
cmpb $0x1, 0x52565(%rip)     # 0xdfa91
jne 0x8d566
pushq %rbx
xorl %ebx, %ebx
movq 0x53618(%rip), %rdi     # 0xe0b50
addq %rbx, %rdi
callq 0x8bd9d
addq $0x28, %rbx
cmpq $0xa000, %rbx           # imm = 0xA000
jne 0x8d531
leaq 0x53584(%rip), %rdi     # 0xe0ad8
callq 0x8bd9d
leaq 0x535c8(%rip), %rdi     # 0xe0b28
popq %rbx
jmp 0x8bd9d
retq