// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movb %dl, %al
movq %rdi, -0xe0(%rbp)
movq %rsi, -0xe8(%rbp)
andb $0x1, %al
movb %al, -0xe9(%rbp)
movq -0xe8(%rbp), %rax
movq %rax, -0xc0(%rbp)
cmpq $0x1000, -0xc0(%rbp) # imm = 0x1000
setbe %al
testb $0x1, %al
jne 0x3db95
jmp 0x3dbf6
movq -0xc0(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rcx
subq $0x1, %rcx
shrq $0x3, %rcx
leaq 0x510c5(%rip), %rax     # 0x8ec80
movzbl (%rax,%rcx), %eax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, %ecx
leaq 0x5092a(%rip), %rax     # 0x8e500
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0xb8(%rbp)
jmp 0x3dcc4
movq -0xc0(%rbp), %rax
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
setl %al
testb $0x1, %al
jne 0x3dc0f
jmp 0x3dc31
movq -0x8(%rbp), %rdx
shlq %rdx
movl $0x3f, %eax
movl $0x40, %ecx
cmpq $0x0, %rdx
cmovneq %rcx, %rax
movq %rax, -0x138(%rbp)
jmp 0x3dc48
movq -0x8(%rbp), %rdi
shlq %rdi
subq $0x1, %rdi
callq 0x4cb20
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x6, -0x10(%rbp)
jae 0x3dc68
movl $0x3, %eax
movq %rax, -0x140(%rbp)
jmp 0x3dc7b
movq -0x10(%rbp), %rax
subq $0x2, %rax
subq $0x1, %rax
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
addq -0x28(%rbp), %rax
movq -0x28(%rbp), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0xe0(%rbp), %rdi
addq $0x8, %rdi
callq 0x3c3a0
jmp 0x3dce4
jmp 0x3dce6
jmp 0x3dce8
jmp 0x3dcea
movq -0xe0(%rbp), %rcx
movabsq $0x5851f42d4c957f31, %rax # imm = 0x5851F42D4C957F31
imulq 0xb8(%rcx), %rax
movabsq $0x14057b7ef7678151, %rcx # imm = 0x14057B7EF7678151
addq %rcx, %rax
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rcx
movq -0xe0(%rbp), %rax
movq %rcx, 0xb8(%rax)
movq -0x128(%rbp), %rax
shrq $0x3a, %rax
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rax
shlq $0x6, %rax
movq %rax, -0x108(%rbp)
movq -0xe0(%rbp), %rdi
movq -0x100(%rbp), %rsi
addq $0x1000, %rsi           # imm = 0x1000
movb -0xe9(%rbp), %al
andb $0x1, %al
movzbl %al, %edx
callq 0x3e050
movq %rax, -0x110(%rbp)
cmpq $0x0, -0x110(%rbp)
jne 0x3dda6
movq -0xe0(%rbp), %rdi
addq $0x8, %rdi
callq 0x3c3c0
movq $0x0, -0xd8(%rbp)
jmp 0x3e032
movq -0x110(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
subq $0x10, %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
leaq 0x64940(%rip), %rcx     # 0xa2730
movq (%rcx), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq %rax, -0x98(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
leaq 0x64919(%rip), %rcx     # 0xa2730
movq (%rcx), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq %rax, -0x80(%rbp)
movq -0x78(%rbp), %rax
movq -0x80(%rbp), %rcx
addq 0x647ac(%rip), %rcx     # 0xa25e0
subq %rcx, %rax
movl $0x60, %ecx
xorl %edx, %edx
divq %rcx
addq 0x64790(%rip), %rax     # 0xa25d8
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x98(%rbp), %rax
movq -0xa0(%rbp), %rcx
shlq $0xc, %rcx
addq %rcx, %rax
addq -0x108(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0x100(%rbp), %rax
movq %rax, -0xd0(%rbp)
cmpq $0x1000, -0xd0(%rbp) # imm = 0x1000
setbe %al
testb $0x1, %al
jne 0x3dea2
jmp 0x3ded4
movq -0xd0(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rcx
subq $0x1, %rcx
shrq $0x3, %rcx
leaq 0x50dc0(%rip), %rax     # 0x8ec80
movzbl (%rax,%rcx), %eax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movl %eax, -0xc4(%rbp)
jmp 0x3dee6
movq -0xd0(%rbp), %rdi
callq 0x4ca20
movl %eax, -0xc4(%rbp)
movl -0xc4(%rbp), %eax
subl $0x27, %eax
movl %eax, -0x12c(%rbp)
movq -0xe0(%rbp), %rax
movq 0x68(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x68(%rax)
movq -0xe0(%rbp), %rax
movq 0x78(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x78(%rax)
movq -0x100(%rbp), %rcx
movq -0xe0(%rbp), %rax
addq 0x60(%rax), %rcx
movq %rcx, 0x60(%rax)
movq -0xe0(%rbp), %rax
movq 0x98(%rax), %rax
movl -0x12c(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0xe0(%rbp), %rax
movq 0x98(%rax), %rax
movl -0x12c(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movq -0xe0(%rbp), %rax
movq 0x98(%rax), %rax
movl -0x12c(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rax)
movq -0xe0(%rbp), %rdi
addq $0x8, %rdi
callq 0x3c3c0
testb $0x1, -0xe9(%rbp)
jne 0x3e024
leaq 0x636dd(%rip), %rax     # 0xa16a1
movb (%rax), %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x3dff1
movq -0xf8(%rbp), %rdi
movq -0x100(%rbp), %rdx
movl $0xa5, %esi
callq 0x10250
jmp 0x3e022
leaq 0x636bb(%rip), %rax     # 0xa16b3
movb (%rax), %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x3e020
movq -0xf8(%rbp), %rdi
movq -0x100(%rbp), %rdx
xorl %esi, %esi
callq 0x10250
jmp 0x3e022
jmp 0x3e024
movq -0xf8(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rax
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
nopw %cs:(%rax,%rax)