// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/deps/jemalloc/src/jemalloc.c
// Function: je_xallocx
JEMALLOC_NOTHROW
je_xallocx(void *ptr, size_t size, size_t extra, int flags)
{
	tsd_t *tsd;
	size_t usize, old_usize;
	UNUSED size_t old_rzsize JEMALLOC_CC_SILENCE_INIT(0);
	size_t alignment = MALLOCX_ALIGN_GET(flags);
	bool zero = flags & MALLOCX_ZERO;

	assert(ptr != NULL);
	assert(size != 0);
	assert(SIZE_T_MAX - size >= extra);
	assert(malloc_initialized() || IS_INITIALIZER);
	malloc_thread_init();
	tsd = tsd_fetch();

	old_usize = isalloc(ptr, config_prof);

	/* Clamp extra if necessary to avoid (size + extra) overflow. */
	if (unlikely(size + extra > HUGE_MAXCLASS)) {
		/* Check for size overflow. */
		if (unlikely(size > HUGE_MAXCLASS)) {
			usize = old_usize;
			goto label_not_resized;
		}
		extra = HUGE_MAXCLASS - size;
	}

	if (config_valgrind && unlikely(in_valgrind))
		old_rzsize = u2rz(old_usize);

	if (config_prof && opt_prof) {
		usize = ixallocx_prof(tsd, ptr, old_usize, size, extra,
		    alignment, zero);
	} else {
		usize = ixallocx_helper(ptr, old_usize, size, extra, alignment,
		    zero);
	}
	if (unlikely(usize == old_usize))
		goto label_not_resized;

	if (config_stats) {
		*tsd_thread_allocatedp_get(tsd) += usize;
		*tsd_thread_deallocatedp_get(tsd) += old_usize;
	}
	JEMALLOC_VALGRIND_REALLOC(false, ptr, usize, false, ptr, old_usize,
	    old_rzsize, false, zero);
label_not_resized:
	UTRACE(ptr, size, ptr);
	return (usize);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3a0, %rsp            # imm = 0x3A0
movq %rdi, -0x2f8(%rbp)
movq %rsi, -0x300(%rbp)
movq %rdx, -0x308(%rbp)
movl %ecx, -0x30c(%rbp)
movq $0x0, -0x330(%rbp)
movl -0x30c(%rbp), %eax
andl $0x3f, %eax
movl %eax, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
andq $-0x2, %rax
movq %rax, -0x338(%rbp)
movl -0x30c(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0x339(%rbp)
jmp 0x3672a
jmp 0x3672c
jmp 0x3672e
jmp 0x36730
jmp 0x36732
jmp 0x36734
jmp 0x36736
cmpq $0x0, 0x6af6a(%rip)     # 0xa16a8
setne %al
testb $0x1, %al
jne 0x3674a
jmp 0x368ab
movq 0x68897(%rip), %rcx     # 0x9efe8
movq %fs:0x0, %rax
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
cmpl $0x1, (%rax)
setne %al
testb $0x1, %al
jne 0x36774
jmp 0x3687d
movq -0x60(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x367f7
movq -0x60(%rbp), %rax
movl $0x1, (%rax)
movq -0x60(%rbp), %rax
movq %rax, -0x58(%rbp)
movq 0x68852(%rip), %rax     # 0x9efe8
movq %fs:0x0, %rdi
addq %rax, %rdi
movq -0x58(%rbp), %rsi
movl $0x50, %edx
callq 0x103b0
leaq 0x6c75d(%rip), %rax     # 0xa2f14
movl (%rax), %edi
movq 0x68828(%rip), %rax     # 0x9efe8
movq %fs:0x0, %rsi
addq %rax, %rsi
callq 0x106d0
cmpl $0x0, %eax
je 0x367f2
leaq 0x5885c(%rip), %rdi     # 0x8f039
callq 0x7c0e0
testb $0x1, 0x6aeb7(%rip)     # 0xa16a0
je 0x367f0
callq 0x10070
jmp 0x367f2
jmp 0x3687b
movq -0x60(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x36877
movq -0x60(%rbp), %rax
movl $0x3, (%rax)
movq -0x60(%rbp), %rax
movq %rax, -0x50(%rbp)
movq 0x687cf(%rip), %rax     # 0x9efe8
movq %fs:0x0, %rdi
addq %rax, %rdi
movq -0x50(%rbp), %rsi
movl $0x50, %edx
callq 0x103b0
leaq 0x6c6da(%rip), %rax     # 0xa2f14
movl (%rax), %edi
movq 0x687a5(%rip), %rax     # 0x9efe8
movq %fs:0x0, %rsi
addq %rax, %rsi
callq 0x106d0
cmpl $0x0, %eax
je 0x36875
leaq 0x587d9(%rip), %rdi     # 0x8f039
callq 0x7c0e0
testb $0x1, 0x6ae34(%rip)     # 0xa16a0
je 0x36873
callq 0x10070
jmp 0x36875
jmp 0x36879
jmp 0x36879
jmp 0x3687b
jmp 0x3687d
movq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x368a9
movq -0x68(%rbp), %rdi
callq 0x6f950
jmp 0x368ab
movq 0x68736(%rip), %rcx     # 0x9efe8
movq %fs:0x0, %rax
addq %rcx, %rax
movq %rax, -0x2d8(%rbp)
movq -0x2d8(%rbp), %rax
cmpl $0x1, (%rax)
setne %al
testb $0x1, %al
jne 0x368db
jmp 0x369fa
movq -0x2d8(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x3696b
movq -0x2d8(%rbp), %rax
movl $0x1, (%rax)
movq -0x2d8(%rbp), %rax
movq %rax, -0x78(%rbp)
movq 0x686de(%rip), %rax     # 0x9efe8
movq %fs:0x0, %rdi
addq %rax, %rdi
movq -0x78(%rbp), %rsi
movl $0x50, %edx
callq 0x103b0
leaq 0x6c5e9(%rip), %rax     # 0xa2f14
movl (%rax), %edi
movq 0x686b4(%rip), %rax     # 0x9efe8
movq %fs:0x0, %rsi
addq %rax, %rsi
callq 0x106d0
cmpl $0x0, %eax
je 0x36966
leaq 0x586e8(%rip), %rdi     # 0x8f039
callq 0x7c0e0
testb $0x1, 0x6ad43(%rip)     # 0xa16a0
je 0x36964
callq 0x10070
jmp 0x36966
jmp 0x369f8
movq -0x2d8(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x369f4
movq -0x2d8(%rbp), %rax
movl $0x3, (%rax)
movq -0x2d8(%rbp), %rax
movq %rax, -0x70(%rbp)
movq 0x68652(%rip), %rax     # 0x9efe8
movq %fs:0x0, %rdi
addq %rax, %rdi
movq -0x70(%rbp), %rsi
movl $0x50, %edx
callq 0x103b0
leaq 0x6c55d(%rip), %rax     # 0xa2f14
movl (%rax), %edi
movq 0x68628(%rip), %rax     # 0x9efe8
movq %fs:0x0, %rsi
addq %rax, %rsi
callq 0x106d0
cmpl $0x0, %eax
je 0x369f2
leaq 0x5865c(%rip), %rdi     # 0x8f039
callq 0x7c0e0
testb $0x1, 0x6acb7(%rip)     # 0xa16a0
je 0x369f0
callq 0x10070
jmp 0x369f2
jmp 0x369f6
jmp 0x369f6
jmp 0x369f8
jmp 0x369fa
movq -0x2d8(%rbp), %rax
movq %rax, -0x318(%rbp)
movq -0x2f8(%rbp), %rax
movq %rax, -0x2e0(%rbp)
movb $0x0, -0x2e1(%rbp)
movq -0x2e0(%rbp), %rcx
movb -0x2e1(%rbp), %al
movq %rcx, -0x1a8(%rbp)
andb $0x1, %al
movb %al, -0x1a9(%rbp)
movq -0x1a8(%rbp), %rax
leaq 0x6bce9(%rip), %rcx     # 0xa2730
movq (%rcx), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq %rax, -0x1c0(%rbp)
movq -0x1c0(%rbp), %rax
cmpq -0x1a8(%rbp), %rax
setne %al
testb $0x1, %al
jne 0x36a72
jmp 0x36cb6
movq -0x1a8(%rbp), %rax
movq -0x1c0(%rbp), %rcx
subq %rcx, %rax
shrq $0xc, %rax
movq %rax, -0x1c8(%rbp)
movq -0x1c0(%rbp), %rcx
movq -0x1c8(%rbp), %rax
movq %rcx, -0x110(%rbp)
movq %rax, -0x118(%rbp)
movq -0x110(%rbp), %rcx
movq -0x118(%rbp), %rax
movq %rcx, -0x100(%rbp)
movq %rax, -0x108(%rbp)
movq -0x100(%rbp), %rcx
movq -0x108(%rbp), %rax
movq %rcx, -0xe8(%rbp)
movq %rax, -0xf0(%rbp)
movq -0xe8(%rbp), %rcx
movq -0xf0(%rbp), %rax
movq %rcx, -0xd8(%rbp)
movq %rax, -0xe0(%rbp)
movq -0xd8(%rbp), %rax
addq $0x68, %rax
movq -0xe0(%rbp), %rcx
leaq 0x6bac1(%rip), %rdx     # 0xa25d8
subq (%rdx), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x120(%rbp)
movq -0x120(%rbp), %rax
andq $0x1fe0, %rax           # imm = 0x1FE0
shrq $0x5, %rax
movl %eax, -0x124(%rbp)
movl -0x124(%rbp), %eax
movl %eax, -0x1cc(%rbp)
movl -0x1cc(%rbp), %eax
movl %eax, %ecx
movb $0x1, %al
cmpq $0xff, %rcx
movb %al, -0x391(%rbp)
je 0x36b7f
xorl %eax, %eax
movb %al, -0x391(%rbp)
jmp 0x36b7f
movb -0x391(%rbp), %al
testb $0x1, %al
jne 0x36b8e
jmp 0x36c74
movq -0x1c0(%rbp), %rcx
movq -0x1c8(%rbp), %rax
movq %rcx, -0x178(%rbp)
movq %rax, -0x180(%rbp)
movq -0x178(%rbp), %rcx
movq -0x180(%rbp), %rax
movq %rcx, -0x168(%rbp)
movq %rax, -0x170(%rbp)
movq -0x168(%rbp), %rcx
movq -0x170(%rbp), %rax
movq %rcx, -0x150(%rbp)
movq %rax, -0x158(%rbp)
movq -0x150(%rbp), %rcx
movq -0x158(%rbp), %rax
movq %rcx, -0x140(%rbp)
movq %rax, -0x148(%rbp)
movq -0x140(%rbp), %rax
addq $0x68, %rax
movq -0x148(%rbp), %rcx
leaq 0x6b9c1(%rip), %rdx     # 0xa25d8
subq (%rdx), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x160(%rbp)
movq -0x160(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x188(%rbp)
movq -0x188(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x130(%rbp), %rax
andq $-0x2000, %rax          # imm = 0xE000
shrq %rax
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rax
subq $0x1000, %rax           # imm = 0x1000
movq %rax, -0x1b8(%rbp)
jmp 0x36cb4
movl -0x1cc(%rbp), %eax
movl %eax, -0x19c(%rbp)
movl -0x19c(%rbp), %eax
movl %eax, -0x18c(%rbp)
movl -0x18c(%rbp), %eax
movl %eax, %ecx
leaq 0x57865(%rip), %rax     # 0x8e500
movq (%rax,%rcx,8), %rax
movq %rax, -0x198(%rbp)
movq -0x198(%rbp), %rax
movq %rax, -0x1b8(%rbp)
jmp 0x36cc9
movq -0x1a8(%rbp), %rdi
callq 0x63ba0
movq %rax, -0x1b8(%rbp)
movq -0x1b8(%rbp), %rax
movq %rax, -0x328(%rbp)
movq -0x300(%rbp), %rax
addq -0x308(%rbp), %rax
movabsq $-0x2000000000000000, %rcx # imm = 0xE000000000000000
cmpq %rcx, %rax
seta %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x36d56
movabsq $-0x2000000000000000, %rax # imm = 0xE000000000000000
cmpq %rax, -0x300(%rbp)
seta %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x36d3e
movq -0x328(%rbp), %rax
movq %rax, -0x320(%rbp)
jmp 0x372b9
movabsq $-0x2000000000000000, %rax # imm = 0xE000000000000000
subq -0x300(%rbp), %rax
movq %rax, -0x308(%rbp)
movb 0x6a9a8(%rip), %al      # 0xa1704
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x36d80
movq -0x328(%rbp), %rdi
callq 0x2f6b0
movq %rax, -0x330(%rbp)
movq -0x2f8(%rbp), %r8
movq -0x328(%rbp), %rdi
movq -0x300(%rbp), %rsi
movq -0x308(%rbp), %rdx
movq -0x338(%rbp), %rcx
movb -0x339(%rbp), %al
movq %r8, -0x298(%rbp)
movq %rdi, -0x2a0(%rbp)
movq %rsi, -0x2a8(%rbp)
movq %rdx, -0x2b0(%rbp)
movq %rcx, -0x2b8(%rbp)
andb $0x1, %al
movb %al, -0x2b9(%rbp)
movq -0x298(%rbp), %r8
movq -0x2a0(%rbp), %rdi
movq -0x2a8(%rbp), %rsi
movq -0x2b0(%rbp), %rdx
movq -0x2b8(%rbp), %rcx
movb -0x2b9(%rbp), %al
movq %r8, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
andb $0x1, %al
movb %al, -0x31(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x36e38
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
je 0x36e38
movb $0x1, -0x1(%rbp)
jmp 0x36e5b
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movb -0x31(%rbp), %al
andb $0x1, %al
movzbl %al, %r8d
callq 0x402d0
andb $0x1, %al
movb %al, -0x1(%rbp)
testb $0x1, -0x1(%rbp)
jne 0x36e63
jmp 0x36e76
movq -0x2a0(%rbp), %rax
movq %rax, -0x290(%rbp)
jmp 0x3714d
movq -0x298(%rbp), %rax
movq %rax, -0x280(%rbp)
movb $0x0, -0x281(%rbp)
movq -0x280(%rbp), %rcx
movb -0x281(%rbp), %al
movq %rcx, -0x250(%rbp)
andb $0x1, %al
movb %al, -0x251(%rbp)
movq -0x250(%rbp), %rax
leaq 0x6b87b(%rip), %rcx     # 0xa2730
movq (%rcx), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq %rax, -0x268(%rbp)
movq -0x268(%rbp), %rax
cmpq -0x250(%rbp), %rax
setne %al
testb $0x1, %al
jne 0x36ee0
jmp 0x3711e
movq -0x250(%rbp), %rax
movq -0x268(%rbp), %rcx
subq %rcx, %rax
shrq $0xc, %rax
movq %rax, -0x270(%rbp)
movq -0x268(%rbp), %rcx
movq -0x270(%rbp), %rax
movq %rcx, -0xb8(%rbp)
movq %rax, -0xc0(%rbp)
movq -0xb8(%rbp), %rcx
movq -0xc0(%rbp), %rax
movq %rcx, -0xa8(%rbp)
movq %rax, -0xb0(%rbp)
movq -0xa8(%rbp), %rcx
movq -0xb0(%rbp), %rax
movq %rcx, -0x90(%rbp)
movq %rax, -0x98(%rbp)
movq -0x90(%rbp), %rcx
movq -0x98(%rbp), %rax
movq %rcx, -0x80(%rbp)
movq %rax, -0x88(%rbp)
movq -0x80(%rbp), %rax
addq $0x68, %rax
movq -0x88(%rbp), %rcx
leaq 0x6b659(%rip), %rdx     # 0xa25d8
subq (%rdx), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rax
andq $0x1fe0, %rax           # imm = 0x1FE0
shrq $0x5, %rax
movl %eax, -0xcc(%rbp)
movl -0xcc(%rbp), %eax
movl %eax, -0x274(%rbp)
movl -0x274(%rbp), %eax
movl %eax, %ecx
movb $0x1, %al
cmpq $0xff, %rcx
movb %al, -0x392(%rbp)
je 0x36fe7
xorl %eax, %eax
movb %al, -0x392(%rbp)
jmp 0x36fe7
movb -0x392(%rbp), %al
testb $0x1, %al
jne 0x36ff6
jmp 0x370dc
movq -0x268(%rbp), %rcx
movq -0x270(%rbp), %rax
movq %rcx, -0x220(%rbp)
movq %rax, -0x228(%rbp)
movq -0x220(%rbp), %rcx
movq -0x228(%rbp), %rax
movq %rcx, -0x210(%rbp)
movq %rax, -0x218(%rbp)
movq -0x210(%rbp), %rcx
movq -0x218(%rbp), %rax
movq %rcx, -0x1f8(%rbp)
movq %rax, -0x200(%rbp)
movq -0x1f8(%rbp), %rcx
movq -0x200(%rbp), %rax
movq %rcx, -0x1e8(%rbp)
movq %rax, -0x1f0(%rbp)
movq -0x1e8(%rbp), %rax
addq $0x68, %rax
movq -0x1f0(%rbp), %rcx
leaq 0x6b559(%rip), %rdx     # 0xa25d8
subq (%rdx), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x208(%rbp)
movq -0x208(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movq -0x1d8(%rbp), %rax
andq $-0x2000, %rax          # imm = 0xE000
shrq %rax
movq %rax, -0x1e0(%rbp)
movq -0x1e0(%rbp), %rax
subq $0x1000, %rax           # imm = 0x1000
movq %rax, -0x260(%rbp)
jmp 0x3711c
movl -0x274(%rbp), %eax
movl %eax, -0x244(%rbp)
movl -0x244(%rbp), %eax
movl %eax, -0x234(%rbp)
movl -0x234(%rbp), %eax
movl %eax, %ecx
leaq 0x573fd(%rip), %rax     # 0x8e500
movq (%rax,%rcx,8), %rax
movq %rax, -0x240(%rbp)
movq -0x240(%rbp), %rax
movq %rax, -0x260(%rbp)
jmp 0x37131
movq -0x250(%rbp), %rdi
callq 0x63ba0
movq %rax, -0x260(%rbp)
movq -0x260(%rbp), %rax
movq %rax, -0x2c8(%rbp)
movq -0x2c8(%rbp), %rax
movq %rax, -0x290(%rbp)
movq -0x290(%rbp), %rax
movq %rax, -0x320(%rbp)
movq -0x320(%rbp), %rax
cmpq -0x328(%rbp), %rax
sete %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x37182
jmp 0x372b9
movq -0x320(%rbp), %rcx
movq -0x318(%rbp), %rax
movq %rax, -0x2f0(%rbp)
movq -0x2f0(%rbp), %rax
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x328(%rbp), %rcx
movq -0x318(%rbp), %rax
movq %rax, -0x2d0(%rbp)
movq -0x2d0(%rbp), %rax
addq 0x18(%rax), %rcx
movq %rcx, 0x18(%rax)
movb 0x6a534(%rip), %al      # 0xa1704
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x372b5
movq -0x2f8(%rbp), %rdi
callq 0x27a60
movq %rax, -0x348(%rbp)
movq $0x130b, -0x380(%rbp) # imm = 0x130B
movq -0x2f8(%rbp), %rax
movq %rax, -0x378(%rbp)
movq -0x328(%rbp), %rax
movq %rax, -0x370(%rbp)
movq -0x320(%rbp), %rax
movq %rax, -0x368(%rbp)
movq -0x348(%rbp), %rax
movq %rax, -0x360(%rbp)
movq $0x0, -0x358(%rbp)
leaq -0x380(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
rolq $0x3, %rdi
rolq $0xd, %rdi
rolq $0x3d, %rdi
rolq $0x33, %rdi
xchgq %rbx, %rbx
movq %rdx, -0x388(%rbp)
movq -0x388(%rbp), %rax
movq %rax, -0x390(%rbp)
testb $0x1, -0x339(%rbp)
je 0x372b3
movq -0x328(%rbp), %rax
cmpq -0x320(%rbp), %rax
jae 0x372b3
movq -0x2f8(%rbp), %rdi
addq -0x328(%rbp), %rdi
movq -0x320(%rbp), %rsi
subq -0x328(%rbp), %rsi
callq 0x7fb10
jmp 0x372b5
jmp 0x372b7
jmp 0x372b9
movq -0x320(%rbp), %rax
addq $0x3a0, %rsp            # imm = 0x3A0
popq %rbp
retq
nopl (%rax)