// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/jemalloc/src/arena.c
// Function: je_arena_malloc_large
void *
arena_malloc_large(arena_t *arena, size_t size, bool zero)
{
	void *ret;
	size_t usize;
	uintptr_t random_offset;
	arena_run_t *run;
	arena_chunk_map_misc_t *miscelm;
	UNUSED bool idump;

	/* Large allocation. */
	usize = s2u(size);
	malloc_mutex_lock(&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.
		 */
		prng64(r, LG_PAGE - LG_CACHELINE, arena->offset_state,
		    UINT64_C(6364136223846793009),
		    UINT64_C(1442695040888963409));
		random_offset = ((uintptr_t)r) << LG_CACHELINE;
	} else
		random_offset = 0;
	run = arena_run_alloc_large(arena, usize + large_pad, zero);
	if (run == NULL) {
		malloc_mutex_unlock(&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 = size2index(usize) - 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(&arena->lock);
	if (config_prof && idump)
		prof_idump();

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

	return (ret);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebp
movq %rdi, %r15
cmpq $0x1000, %rsi           # imm = 0x1000
ja 0x28b80
decq %rsi
shrq $0x3, %rsi
leaq 0x1f5a1(%rip), %rax     # 0x47fc0
movzbl (%rax,%rsi), %eax
leaq 0x1ee16(%rip), %rcx     # 0x47840
movq (%rcx,%rax,8), %r14
leaq 0x8(%r15), %r12
movq %r12, %rdi
callq 0x106d0
movabsq $0x5851f42d4c957f31, %rax # imm = 0x5851F42D4C957F31
imulq 0xb8(%r15), %rax
movabsq $0x14057b7ef7678151, %rbx # imm = 0x14057B7EF7678151
addq %rax, %rbx
movq %rbx, 0xb8(%r15)
leaq 0x1000(%r14), %rsi
movzbl %bpl, %edx
movq %r15, %rdi
callq 0x28bc3
testq %rax, %rax
je 0x28b63
movl %ebp, 0xc(%rsp)
shrq $0x34, %rbx
addq $-0x10, %rax
leaq 0x32c21(%rip), %rcx     # 0x5b6b0
movq (%rcx), %r13
notq %r13
andq %rax, %r13
movq 0x32ac1(%rip), %rcx     # 0x5b560
addq %r13, %rcx
subq %rcx, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rcx
movq %rdx, %rbp
shrq $0x6, %rbp
addq 0x32a98(%rip), %rbp     # 0x5b558
andl $-0x40, %ebx
shlq $0xc, %rbp
addq %rbx, %r13
cmpq $0x1000, %r14           # imm = 0x1000
ja 0x28b98
leaq -0x1(%r14), %rax
shrq $0x3, %rax
leaq 0x1f4da(%rip), %rcx     # 0x47fc0
movzbl (%rcx,%rax), %eax
addq %rbp, %r13
incq 0x78(%r15)
addl $-0x27, %eax
movq %r14, %xmm0
shufpd $0x2, 0x1d50e(%rip), %xmm0 # xmm0 = xmm0[0],mem[1]
movdqu 0x60(%r15), %xmm1
paddq %xmm1, %xmm0
movdqu %xmm0, 0x60(%r15)
movq 0x98(%r15), %rcx
shlq $0x5, %rax
incq (%rcx,%rax)
movdqu 0x10(%rcx,%rax), %xmm0
pcmpeqd %xmm1, %xmm1
psubq %xmm1, %xmm0
movdqu %xmm0, 0x10(%rcx,%rax)
movq %r12, %rdi
callq 0x10440
cmpb $0x0, 0xc(%rsp)
jne 0x28b6e
leaq 0x31ad6(%rip), %rax     # 0x5a621
cmpb $0x1, (%rax)
je 0x28ba5
leaq 0x31adc(%rip), %rax     # 0x5a633
cmpb $0x1, (%rax)
jne 0x28b6e
movq %r13, %rdi
xorl %esi, %esi
jmp 0x28bad
movq %r12, %rdi
callq 0x10440
xorl %r13d, %r13d
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10(%rsp), %r14
movq %rsi, %rdi
movq %r14, %rsi
callq 0x11ecd
movq (%r14), %r14
jmp 0x28a2e
movq %r14, %rdi
callq 0x2da8d
jmp 0x28aea
movq %r13, %rdi
movl $0xa5, %esi
movq %r14, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10270