// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/arena.c
// Function: je_arena_malloc_large
void *
arena_malloc_large(tsdn_t *tsdn, arena_t *arena, szind_t binind, bool zero)
{
	void *ret;
	size_t usize;
	uintptr_t random_offset;
	arena_run_t *run;
	arena_chunk_map_misc_t *miscelm;
	UNUSED bool idump JEMALLOC_CC_SILENCE_INIT(false);

	/* Large allocation. */
	usize = index2size(binind);
	malloc_mutex_lock(tsdn, &arena->lock);
	if (config_cache_oblivious) {
		uint64_t r;

		/*
		 * Compute a uniformly distributed offset within the first page
		 * that is a multiple of the cacheline size, e.g. [0 .. 63) * 64
		 * for 4 KiB pages and 64-byte cachelines.
		 */
		r = prng_lg_range_zu(&arena->offset_state, LG_PAGE -
		    LG_CACHELINE, false);
		random_offset = ((uintptr_t)r) << LG_CACHELINE;
	} else
		random_offset = 0;
	run = arena_run_alloc_large(tsdn, arena, usize + large_pad, zero);
	if (run == NULL) {
		malloc_mutex_unlock(tsdn, &arena->lock);
		return (NULL);
	}
	miscelm = arena_run_to_miscelm(run);
	ret = (void *)((uintptr_t)arena_miscelm_to_rpages(miscelm) +
	    random_offset);
	if (config_stats) {
		szind_t index = binind - NBINS;

		arena->stats.nmalloc_large++;
		arena->stats.nrequests_large++;
		arena->stats.allocated_large += usize;
		arena->stats.lstats[index].nmalloc++;
		arena->stats.lstats[index].nrequests++;
		arena->stats.lstats[index].curruns++;
	}
	if (config_prof)
		idump = arena_prof_accum_locked(arena, usize);
	malloc_mutex_unlock(tsdn, &arena->lock);
	if (config_prof && idump)
		prof_idump(tsdn);

	if (!zero) {
		if (config_fill) {
			if (unlikely(opt_junk_alloc))
				memset(ret, JEMALLOC_ALLOC_JUNK, usize);
			else if (unlikely(opt_zero))
				memset(ret, 0, usize);
		}
	}

	arena_decay_tick(tsdn, arena);
	return (ret);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %r14d
movl %edx, %r13d
movq %rsi, %rbx
movq %rdi, %r15
movl %edx, %eax
leaq 0x2e5fc(%rip), %rcx     # 0x3b640
movq (%rcx,%rax,8), %rbp
leaq 0x10(%rsi), %rdi
movq %rdi, 0x18(%rsp)
callq 0xb5a0
movabsq $0x5851f42d4c957f2d, %rax # imm = 0x5851F42D4C957F2D
imulq 0xf0(%rbx), %rax
movabsq $0x14057b7ef767814f, %r12 # imm = 0x14057B7EF767814F
addq %rax, %r12
movq %r12, 0xf0(%rbx)
leaq 0x1000(%rbp), %rdx
movq %r15, 0x20(%rsp)
movq %r15, %rdi
movq %rbx, %rsi
movl %r14d, 0xc(%rsp)
movl %r14d, %ecx
callq 0x235ca
testq %rax, %rax
je 0xd188
shrq $0x34, %r12
andl $-0x40, %r12d
addq $-0x18, %rax
leaq 0x40019(%rip), %rcx     # 0x4d0d0
movq (%rcx), %r15
notq %r15
andq %rax, %r15
movq 0x3ff01(%rip), %rcx     # 0x4cfc8
addq %r15, %rcx
subq %rcx, %rax
pushq $0x60
popq %rcx
xorl %edx, %edx
divq %rcx
addq 0x3fee4(%rip), %rax     # 0x4cfc0
shlq $0xc, %rax
incq 0xa0(%rbx)
addl $-0x27, %r13d
incq 0xb0(%rbx)
movq %rbp, 0x10(%rsp)
addq %rbp, 0x98(%rbx)
movq 0xd0(%rbx), %rcx
shlq $0x5, %r13
incq (%rcx,%r13)
addq %r12, %r15
incq 0x10(%rcx,%r13)
addq %rax, %r15
incq 0x18(%rcx,%r13)
movq 0x18(%rsp), %rdi
callq 0xb380
cmpb $0x0, 0xc(%rsp)
movq 0x20(%rsp), %r14
jne 0xd14b
leaq 0x3f3e7(%rip), %rax     # 0x4c521
cmpb $0x1, (%rax)
je 0xd1b6
leaq 0x3f3ed(%rip), %rax     # 0x4c533
cmpb $0x1, (%rax)
je 0xd1c0
testq %r14, %r14
je 0xd195
movl (%rbx), %esi
movq 0x38(%r14), %rax
testq %rax, %rax
je 0xd1a7
cmpl %esi, 0x40(%r14)
jbe 0xd1a7
leaq (%rax,%rsi,8), %rax
testq %rax, %rax
je 0xd195
movl (%rax), %ecx
testl %ecx, %ecx
jle 0xd1b1
leal -0x1(%rcx), %edx
movl %edx, (%rax)
testl %ecx, %ecx
jg 0xd195
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x226c8
jmp 0xd195
movq 0x18(%rsp), %rdi
callq 0xb380
xorl %r15d, %r15d
movq %r15, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x1afa2
jmp 0xd165
movl 0x4(%rax), %edx
jmp 0xd173
movq %r15, %rdi
movl $0xa5, %esi
jmp 0xd1c5
movq %r15, %rdi
xorl %esi, %esi
movq 0x10(%rsp), %rdx
callq 0xb230
jmp 0xd14b