// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movb %cl, %al
movq %rdi, -0xe8(%rbp)
movq %rsi, -0xf0(%rbp)
movl %edx, -0xf4(%rbp)
andb $0x1, %al
movb %al, -0xf5(%rbp)
movb $0x0, -0x121(%rbp)
movl -0xf4(%rbp), %eax
movl %eax, -0xc4(%rbp)
movl -0xc4(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0x5349f(%rip), %rax     # 0x90300
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0xe8(%rbp), %rdi
movq -0xf0(%rbp), %rsi
addq $0x10, %rsi
callq 0x3a660
movq -0xf0(%rbp), %rax
addq $0xf0, %rax
movq %rax, -0xa0(%rbp)
movl $0x6, -0xa4(%rbp)
movb $0x0, -0xa5(%rbp)
testb $0x1, -0xa5(%rbp)
je 0x3cf20
jmp 0x3cebb
movq -0xa0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x42d00
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rax
movq %rax, -0x10(%rbp)
movabsq $0x5851f42d4c957f2d, %rax # imm = 0x5851F42D4C957F2D
imulq -0x10(%rbp), %rax
movabsq $0x14057b7ef767814f, %rcx # imm = 0x14057B7EF767814F
addq %rcx, %rax
movq %rax, -0xb8(%rbp)
movq -0xa0(%rbp), %rdi
movq -0xc0(%rbp), %rsi
movq -0xb8(%rbp), %rdx
callq 0x4d8b0
testb $0x1, %al
jne 0x3cebb
jmp 0x3cf62
movq -0xa0(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
movabsq $0x5851f42d4c957f2d, %rax # imm = 0x5851F42D4C957F2D
imulq -0x8(%rbp), %rax
movabsq $0x14057b7ef767814f, %rcx # imm = 0x14057B7EF767814F
addq %rcx, %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rcx
movq -0xa0(%rbp), %rax
movq %rcx, (%rax)
movq -0xb8(%rbp), %rax
movl -0xa4(%rbp), %ecx
movl %ecx, %edx
movl $0x40, %ecx
subq %rdx, %rcx
shrq %cl, %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x130(%rbp), %rax
shlq $0x6, %rax
movq %rax, -0x110(%rbp)
movq -0xe8(%rbp), %rdi
movq -0xf0(%rbp), %rsi
movq -0x108(%rbp), %rdx
addq $0x1000, %rdx           # imm = 0x1000
movb -0xf5(%rbp), %al
andb $0x1, %al
movzbl %al, %ecx
callq 0x3d2f0
movq %rax, -0x118(%rbp)
cmpq $0x0, -0x118(%rbp)
jne 0x3d007
movq -0xe8(%rbp), %rdi
movq -0xf0(%rbp), %rsi
addq $0x10, %rsi
callq 0x3a6b0
movq $0x0, -0xe0(%rbp)
jmp 0x3d2d6
movq -0x118(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
subq $0x18, %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x120(%rbp)
movq -0x120(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
leaq 0x67065(%rip), %rcx     # 0xa40b0
movq (%rcx), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq %rax, -0x80(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
leaq 0x67044(%rip), %rcx     # 0xa40b0
movq (%rcx), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rax
movq -0x68(%rbp), %rcx
addq 0x66f1f(%rip), %rcx     # 0xa3fa8
subq %rcx, %rax
movl $0x60, %ecx
xorl %edx, %edx
divq %rcx
addq 0x66f03(%rip), %rax     # 0xa3fa0
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x80(%rbp), %rax
movq -0x88(%rbp), %rcx
shlq $0xc, %rcx
addq %rcx, %rax
addq -0x110(%rbp), %rax
movq %rax, -0x100(%rbp)
movl -0xf4(%rbp), %eax
subl $0x27, %eax
movl %eax, -0x134(%rbp)
movq -0xf0(%rbp), %rax
movq 0xa0(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0xa0(%rax)
movq -0xf0(%rbp), %rax
movq 0xb0(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0xb0(%rax)
movq -0x108(%rbp), %rcx
movq -0xf0(%rbp), %rax
addq 0x98(%rax), %rcx
movq %rcx, 0x98(%rax)
movq -0xf0(%rbp), %rax
movq 0xd0(%rax), %rax
movl -0x134(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0xf0(%rbp), %rax
movq 0xd0(%rax), %rax
movl -0x134(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movq -0xf0(%rbp), %rax
movq 0xd0(%rax), %rax
movl -0x134(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rax)
movq -0xe8(%rbp), %rdi
movq -0xf0(%rbp), %rsi
addq $0x10, %rsi
callq 0x3a6b0
testb $0x1, -0xf5(%rbp)
jne 0x3d223
leaq 0x6633e(%rip), %rax     # 0xa3501
movb (%rax), %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x3d1f0
movq -0x100(%rbp), %rdi
movq -0x108(%rbp), %rdx
movl $0xa5, %esi
callq 0xb210
jmp 0x3d221
leaq 0x6631c(%rip), %rax     # 0xa3513
movb (%rax), %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x3d21f
movq -0x100(%rbp), %rdi
movq -0x108(%rbp), %rdx
xorl %esi, %esi
callq 0xb210
jmp 0x3d221
jmp 0x3d223
movq -0xe8(%rbp), %rcx
movq -0xf0(%rbp), %rax
movq %rcx, -0xd0(%rbp)
movq %rax, -0xd8(%rbp)
movq -0xd0(%rbp), %rcx
movq -0xd8(%rbp), %rax
movq %rcx, -0x38(%rbp)
movq %rax, -0x40(%rbp)
movl $0x1, -0x44(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
sete %al
testb $0x1, %al
jne 0x3d272
jmp 0x3d274
jmp 0x3d2c8
movq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
movq -0x40(%rbp), %rax
movl (%rax), %esi
callq 0x4d580
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
sete %al
testb $0x1, %al
jne 0x3d2a5
jmp 0x3d2a7
jmp 0x3d2c8
movq -0x58(%rbp), %rdi
movl -0x44(%rbp), %esi
callq 0x4d5e0
testb $0x1, %al
jne 0x3d2b9
jmp 0x3d2c8
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rsi
xorl %edx, %edx
callq 0x3b8a0
movq -0x100(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rax
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
nopw %cs:(%rax,%rax)