// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/deps/jemalloc/src/arena.c
// Function: arena_palloc_large
static void *
arena_palloc_large(tsd_t *tsd, arena_t *arena, size_t usize, size_t alignment,
    bool zero)
{
	void *ret;
	size_t alloc_size, leadsize, trailsize;
	arena_run_t *run;
	arena_chunk_t *chunk;
	arena_chunk_map_misc_t *miscelm;
	void *rpages;

	assert(usize == PAGE_CEILING(usize));

	arena = arena_choose(tsd, arena);
	if (unlikely(arena == NULL))
		return (NULL);

	alignment = PAGE_CEILING(alignment);
	alloc_size = usize + large_pad + alignment - PAGE;

	malloc_mutex_lock(&arena->lock);
	run = arena_run_alloc_large(arena, alloc_size, false);
	if (run == NULL) {
		malloc_mutex_unlock(&arena->lock);
		return (NULL);
	}
	chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(run);
	miscelm = arena_run_to_miscelm(run);
	rpages = arena_miscelm_to_rpages(miscelm);

	leadsize = ALIGNMENT_CEILING((uintptr_t)rpages, alignment) -
	    (uintptr_t)rpages;
	assert(alloc_size >= leadsize + usize);
	trailsize = alloc_size - leadsize - usize - large_pad;
	if (leadsize != 0) {
		arena_chunk_map_misc_t *head_miscelm = miscelm;
		arena_run_t *head_run = run;

		miscelm = arena_miscelm_get(chunk,
		    arena_miscelm_to_pageind(head_miscelm) + (leadsize >>
		    LG_PAGE));
		run = &miscelm->run;

		arena_run_trim_head(arena, chunk, head_run, alloc_size,
		    alloc_size - leadsize);
	}
	if (trailsize != 0) {
		arena_run_trim_tail(arena, chunk, run, usize + large_pad +
		    trailsize, usize + large_pad, false);
	}
	if (arena_run_init_large(arena, run, usize + large_pad, zero)) {
		size_t run_ind =
		    arena_miscelm_to_pageind(arena_run_to_miscelm(run));
		bool dirty = (arena_mapbits_dirty_get(chunk, run_ind) != 0);
		bool decommitted = (arena_mapbits_decommitted_get(chunk,
		    run_ind) != 0);

		assert(decommitted); /* Cause of OOM. */
		arena_run_dalloc(arena, run, dirty, false, decommitted);
		malloc_mutex_unlock(&arena->lock);
		return (NULL);
	}
	ret = arena_miscelm_to_rpages(miscelm);

	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++;
	}
	malloc_mutex_unlock(&arena->lock);

	if (config_fill && !zero) {
		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 $0x210, %rsp            # imm = 0x210
movb %r8b, %al
movq %rdi, -0x190(%rbp)
movq %rsi, -0x198(%rbp)
movq %rdx, -0x1a0(%rbp)
movq %rcx, -0x1a8(%rbp)
andb $0x1, %al
movb %al, -0x1a9(%rbp)
jmp 0x3f2c4
movq -0x190(%rbp), %rdi
movq -0x198(%rbp), %rsi
callq 0x4cd10
movq %rax, -0x198(%rbp)
cmpq $0x0, -0x198(%rbp)
sete %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x3f30a
movq $0x0, -0x188(%rbp)
jmp 0x3fb03
movq -0x1a8(%rbp), %rax
addq $0xfff, %rax            # imm = 0xFFF
andq $-0x1000, %rax          # imm = 0xF000
movq %rax, -0x1a8(%rbp)
movq -0x1a0(%rbp), %rax
addq $0x1000, %rax           # imm = 0x1000
addq -0x1a8(%rbp), %rax
subq $0x1000, %rax           # imm = 0x1000
movq %rax, -0x1c0(%rbp)
movq -0x198(%rbp), %rdi
addq $0x8, %rdi
callq 0x3c3a0
movq -0x198(%rbp), %rdi
movq -0x1c0(%rbp), %rsi
xorl %edx, %edx
callq 0x3e050
movq %rax, -0x1d8(%rbp)
cmpq $0x0, -0x1d8(%rbp)
jne 0x3f39b
movq -0x198(%rbp), %rdi
addq $0x8, %rdi
callq 0x3c3c0
movq $0x0, -0x188(%rbp)
jmp 0x3fb03
movq -0x1d8(%rbp), %rax
leaq 0x63387(%rip), %rcx     # 0xa2730
movq (%rcx), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq %rax, -0x1e0(%rbp)
movq -0x1d8(%rbp), %rax
movq %rax, -0x158(%rbp)
movq -0x158(%rbp), %rax
subq $0x10, %rax
movq %rax, -0x160(%rbp)
movq -0x160(%rbp), %rax
movq %rax, -0x1e8(%rbp)
movq -0x1e8(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rax
leaq 0x6332c(%rip), %rcx     # 0xa2730
movq (%rcx), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq %rax, -0x130(%rbp)
movq -0x128(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0x100(%rbp), %rax
leaq 0x632ff(%rip), %rcx     # 0xa2730
movq (%rcx), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq %rax, -0x108(%rbp)
movq -0x100(%rbp), %rax
movq -0x108(%rbp), %rcx
addq 0x63189(%rip), %rcx     # 0xa25e0
subq %rcx, %rax
movl $0x60, %ecx
xorl %edx, %edx
divq %rcx
addq 0x6316d(%rip), %rax     # 0xa25d8
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rax
movq %rax, -0x138(%rbp)
movq -0x130(%rbp), %rax
movq -0x138(%rbp), %rcx
shlq $0xc, %rcx
addq %rcx, %rax
movq %rax, -0x1f0(%rbp)
movq -0x1f0(%rbp), %rax
movq -0x1a8(%rbp), %rcx
subq $0x1, %rcx
addq %rcx, %rax
xorl %ecx, %ecx
subq -0x1a8(%rbp), %rcx
andq %rcx, %rax
movq -0x1f0(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x1c8(%rbp)
jmp 0x3f4d0
movq -0x1c0(%rbp), %rax
subq -0x1c8(%rbp), %rax
subq -0x1a0(%rbp), %rax
subq $0x1000, %rax           # imm = 0x1000
movq %rax, -0x1d0(%rbp)
cmpq $0x0, -0x1c8(%rbp)
je 0x3f614
movq -0x1e8(%rbp), %rax
movq %rax, -0x1f8(%rbp)
movq -0x1d8(%rbp), %rax
movq %rax, -0x200(%rbp)
movq -0x1e0(%rbp), %rcx
movq -0x1f8(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rax
leaq 0x631f1(%rip), %rdx     # 0xa2730
movq (%rdx), %rdx
xorq $-0x1, %rdx
andq %rdx, %rax
movq %rax, -0xc0(%rbp)
movq -0xb8(%rbp), %rax
movq -0xc0(%rbp), %rdx
addq 0x6307b(%rip), %rdx     # 0xa25e0
subq %rdx, %rax
movl $0x60, %esi
xorl %edx, %edx
divq %rsi
addq 0x6305f(%rip), %rax     # 0xa25d8
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rax
movq -0x1c8(%rbp), %rdx
shrq $0xc, %rdx
addq %rdx, %rax
movq %rcx, -0x118(%rbp)
movq %rax, -0x120(%rbp)
movq -0x118(%rbp), %rax
addq 0x6302f(%rip), %rax     # 0xa25e0
imulq $0x60, -0x120(%rbp), %rcx
addq %rcx, %rax
xorl %ecx, %ecx
subq 0x63013(%rip), %rcx     # 0xa25d8
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x1e8(%rbp)
movq -0x1e8(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x1d8(%rbp)
movq -0x198(%rbp), %rdi
movq -0x1e0(%rbp), %rsi
movq -0x200(%rbp), %rdx
movq -0x1c0(%rbp), %rcx
movq -0x1c0(%rbp), %r8
subq -0x1c8(%rbp), %r8
callq 0x4cd90
cmpq $0x0, -0x1d0(%rbp)
je 0x3f65e
movq -0x198(%rbp), %rdi
movq -0x1e0(%rbp), %rsi
movq -0x1d8(%rbp), %rdx
movq -0x1a0(%rbp), %rcx
addq $0x1000, %rcx           # imm = 0x1000
addq -0x1d0(%rbp), %rcx
movq -0x1a0(%rbp), %r8
addq $0x1000, %r8            # imm = 0x1000
xorl %r9d, %r9d
callq 0x4d540
movq -0x198(%rbp), %rdi
movq -0x1d8(%rbp), %rsi
movq -0x1a0(%rbp), %rdx
addq $0x1000, %rdx           # imm = 0x1000
movb -0x1a9(%rbp), %al
andb $0x1, %al
movzbl %al, %ecx
callq 0x4dd60
testb $0x1, %al
jne 0x3f693
jmp 0x3f89d
movq -0x1d8(%rbp), %rax
movq %rax, -0x168(%rbp)
movq -0x168(%rbp), %rax
subq $0x10, %rax
movq %rax, -0x170(%rbp)
movq -0x170(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
leaq 0x63061(%rip), %rcx     # 0xa2730
movq (%rcx), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq %rax, -0xd8(%rbp)
movq -0xd0(%rbp), %rax
movq -0xd8(%rbp), %rcx
addq 0x62eeb(%rip), %rcx     # 0xa25e0
subq %rcx, %rax
movl $0x60, %ecx
xorl %edx, %edx
divq %rcx
addq 0x62ecf(%rip), %rax     # 0xa25d8
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0x208(%rbp)
movq -0x1e0(%rbp), %rcx
movq -0x208(%rbp), %rax
movq %rcx, -0xa0(%rbp)
movq %rax, -0xa8(%rbp)
movq -0xa0(%rbp), %rcx
movq -0xa8(%rbp), %rax
movq %rcx, -0x90(%rbp)
movq %rax, -0x98(%rbp)
movq -0x90(%rbp), %rcx
movq -0x98(%rbp), %rax
movq %rcx, -0x78(%rbp)
movq %rax, -0x80(%rbp)
movq -0x78(%rbp), %rcx
movq -0x80(%rbp), %rax
movq %rcx, -0x68(%rbp)
movq %rax, -0x70(%rbp)
movq -0x68(%rbp), %rax
addq $0x68, %rax
movq -0x70(%rbp), %rcx
subq 0x62e49(%rip), %rcx     # 0xa25d8
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
andq $0x10, %rax
cmpq $0x0, %rax
setne %al
andb $0x1, %al
movb %al, -0x209(%rbp)
movq -0x1e0(%rbp), %rcx
movq -0x208(%rbp), %rax
movq %rcx, -0x50(%rbp)
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, -0x40(%rbp)
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0x28(%rbp)
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, -0x18(%rbp)
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
addq $0x68, %rax
movq -0x20(%rbp), %rcx
subq 0x62db7(%rip), %rcx     # 0xa25d8
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
andq $0x4, %rax
cmpq $0x0, %rax
setne %al
andb $0x1, %al
movb %al, -0x20a(%rbp)
jmp 0x3f850
movq -0x198(%rbp), %rdi
movq -0x1d8(%rbp), %rsi
movb -0x209(%rbp), %dl
movb -0x20a(%rbp), %al
xorl %ecx, %ecx
andb $0x1, %dl
andb $0x1, %al
movzbl %dl, %edx
movzbl %al, %r8d
callq 0x48da0
movq -0x198(%rbp), %rdi
addq $0x8, %rdi
callq 0x3c3c0
movq $0x0, -0x188(%rbp)
jmp 0x3fb03
movq -0x1e8(%rbp), %rax
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rax
leaq 0x62e77(%rip), %rcx     # 0xa2730
movq (%rcx), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq %rax, -0x148(%rbp)
movq -0x140(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0xe8(%rbp), %rax
leaq 0x62e4a(%rip), %rcx     # 0xa2730
movq (%rcx), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq %rax, -0xf0(%rbp)
movq -0xe8(%rbp), %rax
movq -0xf0(%rbp), %rcx
addq 0x62cd4(%rip), %rcx     # 0xa25e0
subq %rcx, %rax
movl $0x60, %ecx
xorl %edx, %edx
divq %rcx
addq 0x62cb8(%rip), %rax     # 0xa25d8
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0x148(%rbp), %rax
movq -0x150(%rbp), %rcx
shlq $0xc, %rcx
addq %rcx, %rax
movq %rax, -0x1b8(%rbp)
movq -0x1a0(%rbp), %rax
movq %rax, -0x180(%rbp)
cmpq $0x1000, -0x180(%rbp) # imm = 0x1000
setbe %al
testb $0x1, %al
jne 0x3f973
jmp 0x3f9a5
movq -0x180(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rcx
subq $0x1, %rcx
shrq $0x3, %rcx
leaq 0x4f2ef(%rip), %rax     # 0x8ec80
movzbl (%rax,%rcx), %eax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl %eax, -0x174(%rbp)
jmp 0x3f9b7
movq -0x180(%rbp), %rdi
callq 0x4ca20
movl %eax, -0x174(%rbp)
movl -0x174(%rbp), %eax
subl $0x27, %eax
movl %eax, -0x210(%rbp)
movq -0x198(%rbp), %rax
movq 0x68(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x68(%rax)
movq -0x198(%rbp), %rax
movq 0x78(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x78(%rax)
movq -0x1a0(%rbp), %rcx
movq -0x198(%rbp), %rax
addq 0x60(%rax), %rcx
movq %rcx, 0x60(%rax)
movq -0x198(%rbp), %rax
movq 0x98(%rax), %rax
movl -0x210(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x198(%rbp), %rax
movq 0x98(%rax), %rax
movl -0x210(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movq -0x198(%rbp), %rax
movq 0x98(%rax), %rax
movl -0x210(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rax)
movq -0x198(%rbp), %rdi
addq $0x8, %rdi
callq 0x3c3c0
testb $0x1, -0x1a9(%rbp)
jne 0x3faf5
leaq 0x61c0c(%rip), %rax     # 0xa16a1
movb (%rax), %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x3fac2
movq -0x1b8(%rbp), %rdi
movq -0x1a0(%rbp), %rdx
movl $0xa5, %esi
callq 0x10250
jmp 0x3faf3
leaq 0x61bea(%rip), %rax     # 0xa16b3
movb (%rax), %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x3faf1
movq -0x1b8(%rbp), %rdi
movq -0x1a0(%rbp), %rdx
xorl %esi, %esi
callq 0x10250
jmp 0x3faf3
jmp 0x3faf5
movq -0x1b8(%rbp), %rax
movq %rax, -0x188(%rbp)
movq -0x188(%rbp), %rax
addq $0x210, %rsp            # imm = 0x210
popq %rbp
retq
nopw %cs:(%rax,%rax)