// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/deps/jemalloc/include/jemalloc/internal/tcache.h
// Function: tcache_alloc_large
JEMALLOC_INLINE void *
tcache_alloc_large(tcache_t *tcache, size_t size, bool zero)
{
	void *ret;
	size_t binind;
	tcache_bin_t *tbin;

	size = PAGE_CEILING(size);
	assert(size <= tcache_maxclass);
	binind = NBINS + (size >> LG_PAGE) - 1;
	assert(binind < nhbins);
	tbin = &tcache->tbins[binind];
	ret = tcache_alloc_easy(tbin);
	if (ret == NULL) {
		/*
		 * Only allocate one large object at a time, because it's quite
		 * expensive to create one and not use it.
		 */
		ret = arena_malloc_large(tcache->arena, size, zero);
		if (ret == NULL)
			return (NULL);
	} else {
		if (config_prof && prof_promote && size == PAGE) {
			arena_chunk_t *chunk =
			    (arena_chunk_t *)CHUNK_ADDR2BASE(ret);
			size_t pageind = (((uintptr_t)ret - (uintptr_t)chunk) >>
			    LG_PAGE);
			arena_mapbits_large_binind_set(chunk, pageind,
			    BININD_INVALID);
		}
		if (zero == false) {
			if (config_fill) {
				if (opt_junk)
					memset(ret, 0xa5, size);
				else if (opt_zero)
					memset(ret, 0, size);
			}
		} else {
			VALGRIND_MAKE_MEM_UNDEFINED(ret, size);
			memset(ret, 0, size);
		}

		if (config_stats)
			tbin->tstats.nrequests++;
		if (config_prof)
			tcache->prof_accumbytes += size;
	}

	tcache_event(tcache);
	return (ret);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
movq -0x18(%rbp), %rax
addq $0xfff, %rax            # imm = 0xFFF
andq $-0x1000, %rax          # imm = 0xF000
movq %rax, -0x18(%rbp)
jmp 0xb5310
movq -0x18(%rbp), %rax
shrq $0xc, %rax
addq $0x1c, %rax
subq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0xb5326
movq -0x10(%rbp), %rax
addq $0x28, %rax
movq -0x30(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0xb5640
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0xb5387
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movb -0x19(%rbp), %al
andb $0x1, %al
movzbl %al, %edx
callq 0xb6670
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0xb5382
movq $0x0, -0x8(%rbp)
jmp 0xb5452
jmp 0xb5441
movb -0x19(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0xb53cd
testb $0x1, 0x73110(%rip)     # 0x1284ab
je 0xb53b1
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rdx
movl $0xa5, %esi
callq 0x1f110
jmp 0xb53cb
testb $0x1, 0x73104(%rip)     # 0x1284bc
je 0xb53c9
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rdx
xorl %esi, %esi
callq 0x1f110
jmp 0xb53cb
jmp 0xb5433
movq $0x4d430001, -0x70(%rbp) # imm = 0x4D430001
movq -0x28(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movq $0x0, -0x58(%rbp)
movq $0x0, -0x50(%rbp)
movq $0x0, -0x48(%rbp)
leaq -0x70(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
rolq $0x3, %rdi
rolq $0xd, %rdi
rolq $0x3d, %rdi
rolq $0x33, %rdi
xchgq %rbx, %rbx
movq %rdx, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rdx
xorl %esi, %esi
callq 0x1f110
movq -0x38(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rdi
callq 0xb56c0
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nop