// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/jemalloc/src/jemalloc.c
// Function: je_sdallocx
JEMALLOC_NOTHROW
je_sdallocx(void *ptr, size_t size, int flags)
{
	tsd_t *tsd;
	tcache_t *tcache;
	size_t usize;

	assert(ptr != NULL);
	assert(malloc_initialized() || IS_INITIALIZER);
	usize = inallocx(size, flags);
	assert(usize == isalloc(ptr, config_prof));

	tsd = tsd_fetch();
	if (unlikely((flags & MALLOCX_TCACHE_MASK) != 0)) {
		if ((flags & MALLOCX_TCACHE_MASK) == MALLOCX_TCACHE_NONE)
			tcache = NULL;
		else
			tcache = tcaches_get(tsd, MALLOCX_TCACHE_GET(flags));
	} else
		tcache = tcache_get(tsd, false);

	UTRACE(ptr, 0, 0);
	isfree(tsd, ptr, usize, tcache);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
movq %rdi, %rbx
movl %edx, %ecx
pushq $-0x1
popq %rax
pushq $0x7
popq %rdx
pushq $0x40
popq %rdi
andl $0x3f, %ecx
jne 0x20660
cmpq $0x1000, %rsi           # imm = 0x1000
ja 0x207ed
decq %rsi
shrq $0x3, %rsi
leaq 0x225d5(%rip), %rax     # 0x42b00
movzbl (%rsi,%rax), %eax
leaq 0x21e4a(%rip), %rcx     # 0x42380
movq (%rcx,%rax,8), %r12
movq 0x33aaf(%rip), %rbp     # 0x53ff0
movq %fs:0x0, %r15
addq %rbp, %r15
movl %fs:(%rbp), %eax
testl %eax, %eax
je 0x20913
cmpl $0x2, %eax
je 0x20975
andl $0xfff00, %r14d         # imm = 0xFFF00
jne 0x2079f
movq %fs:0x8(%rbp), %r13
addq %r12, %fs:0x18(%rbp)
cmpb $0x1, 0x36104(%rip)     # 0x56684
je 0x207b4
xorl %r14d, %r14d
cmpq $0x0, 0x36097(%rip)     # 0x56628
jne 0x207c4
leaq 0x37112(%rip), %rax     # 0x576b0
movq (%rax), %rsi
notq %rsi
andq %rbx, %rsi
cmpq %rbx, %rsi
je 0x20824
cmpq $0x3800, %r12           # imm = 0x3800
ja 0x20837
testq %r13, %r13
je 0x208a7
cmpq $0x1000, %r12           # imm = 0x1000
ja 0x208d1
decq %r12
shrq $0x3, %r12
leaq 0x2251f(%rip), %rax     # 0x42b00
movzbl (%r12,%rax), %eax
movl %eax, %r12d
cmpb $0x1, 0x36032(%rip)     # 0x56622
je 0x208de
movq %r12, %rax
shlq $0x5, %rax
leaq (%rax,%r13), %rbp
addq $0x20, %rbp
leaq 0x377a4(%rip), %rax     # 0x57db0
movq (%rax), %rax
movl 0x10(%rbp), %r8d
cmpl (%rax,%r12,4), %r8d
je 0x208f6
movq 0x18(%rbp), %rax
movl %r8d, %ecx
movq %rbx, (%rax,%rcx,8)
incl %r8d
movl %r8d, 0x10(%rbp)
movl 0x18(%r13), %eax
incl %eax
movl %eax, 0x18(%r13)
cmpl $0xd3, %eax
je 0x208c1
cmpb $0x1, 0x36039(%rip)     # 0x56684
je 0x207d4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %r8
shlq %cl, %r8
cmpq $0x3801, %rsi           # imm = 0x3801
setae %r9b
cmpl $0xc, %ecx
setae %cl
orb %r9b, %cl
jne 0x206c5
leaq (%rsi,%r8), %rcx
decq %rcx
movq %r8, %r9
negq %r9
andq %rcx, %r9
cmpq $0x1000, %r9            # imm = 0x1000
ja 0x209e0
decq %r9
shrq $0x3, %r9
leaq 0x22458(%rip), %rcx     # 0x42b00
movzbl (%r9,%rcx), %ecx
leaq 0x21ccc(%rip), %r9      # 0x42380
movq (%r9,%rcx,8), %r12
cmpq $0x4000, %r12           # imm = 0x4000
jb 0x2053a
leaq 0x36e74(%rip), %rcx     # 0x57540
leaq 0x36fd5(%rip), %r9      # 0x576a8
movq (%r9), %r9
cmpq %rsi, (%rcx)
jb 0x20745
cmpq %r8, %r9
jbe 0x20745
addq $0xfff, %r8             # imm = 0xFFF
andq $-0x1000, %r8           # imm = 0xF000
movl $0x4000, %r12d          # imm = 0x4000
cmpq $0x4001, %rsi           # imm = 0x4001
jb 0x20731
testq %rsi, %rsi
js 0x20a3b
leaq -0x1(,%rsi,2), %rcx
bsrq %rcx, %r10
leal -0x3(%r10), %ecx
movq %rax, %r12
shlq %cl, %r12
cmpq $0x6, %r10
notq %r12
cmovbq %rdx, %r12
leaq (%r12,%rsi), %rcx
notq %r12
andq %rcx, %r12
leaq (%r12,%r8), %rcx
leaq 0x36e2c(%rip), %r10     # 0x57568
cmpq (%r10), %rcx
jbe 0x2053a
leaq 0x36f64(%rip), %rcx     # 0x576b0
movq (%rcx), %r10
addq %r10, %r8
notq %r10
andq %r8, %r10
je 0x20797
cmpq %rsi, %r9
jae 0x209b4
cmpq $0x1000, %rsi           # imm = 0x1000
ja 0x20a53
leaq -0x1(%rsi), %rax
shrq $0x3, %rax
leaq 0x22381(%rip), %rcx     # 0x42b00
movzbl (%rax,%rcx), %eax
leaq 0x21bf6(%rip), %rcx     # 0x42380
movq (%rcx,%rax,8), %r9
cmpq %rsi, %r9
jae 0x209b4
xorl %r12d, %r12d
jmp 0x2053a
cmpl $0x100, %r14d           # imm = 0x100
jne 0x2091d
xorl %r13d, %r13d
jmp 0x20574
movq %rbx, %rdi
callq 0x1ce55
movq %rax, %r14
jmp 0x20589
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3366e
jmp 0x20644
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x38fee
testq %rsi, %rsi
js 0x209cb
leaq -0x1(,%rsi,2), %rcx
bsrq %rcx, %rdi
leal -0x3(%rdi), %ecx
shlq %cl, %rax
cmpq $0x6, %rdi
notq %rax
cmovbq %rdx, %rax
addq %rax, %rsi
notq %rax
andq %rsi, %rax
movq %rax, %r12
jmp 0x2053a
movq %r15, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x30dbc
jmp 0x20644
testq %r13, %r13
je 0x20965
leaq 0x37599(%rip), %rax     # 0x57de0
cmpq %r12, (%rax)
jb 0x20965
movq %r12, %rdi
callq 0x21e78
movl %eax, %ebp
cmpb $0x1, 0x35dc1(%rip)     # 0x56622
je 0x20a0f
movl %ebp, %eax
movq %rax, %rcx
shlq $0x5, %rcx
leaq (%rcx,%r13), %r12
addq $0x20, %r12
leaq 0x37531(%rip), %rcx     # 0x57db0
movq (%rcx), %rdx
movl 0x10(%r12), %ecx
cmpl (%rdx,%rax,4), %ecx
je 0x20a1f
movq 0x18(%r12), %rax
movl %ecx, %edx
movq %rbx, (%rax,%rdx,8)
incl %ecx
movl %ecx, 0x10(%r12)
jmp 0x2062f
movq %rbx, %rcx
subq %rsi, %rcx
shrq $0xc, %rcx
movq (%rsi), %rdi
movq %rbx, %rdx
callq 0x244f0
jmp 0x20644
movq %r15, %rdi
movq %r13, %rsi
callq 0x36f85
jmp 0x20644
movq %r12, %rdi
callq 0x21e78
jmp 0x205e6
imulq $0x60, %r12, %rsi
addq 0x336ef(%rip), %rsi     # 0x53fd8
movq %rbx, %rdi
callq 0x233ee
jmp 0x205f6
shrl %r8d
movq %r15, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movl %r12d, %ecx
callq 0x37034
movl 0x10(%rbp), %r8d
jmp 0x2061d
movl $0x1, %fs:(%rbp)
jmp 0x2097d
shrl $0x8, %r14d
addl $-0x2, %r14d
leaq 0x3749c(%rip), %rax     # 0x57dc8
movq (%rax), %rax
movq (%rax,%r14,8), %r13
testq %r13, %r13
jne 0x20574
movq %r15, %rdi
xorl %esi, %esi
movq %rax, (%rsp)
callq 0x21e62
movq %r15, %rdi
movq %rax, %rsi
callq 0x375ec
movq %rax, %r13
movq (%rsp), %rax
movq %r13, (%rax,%r14,8)
jmp 0x20574
movq (%rsi), %rdi
movq %rbx, %rdx
callq 0x24608
jmp 0x20644
movl $0x3, %fs:(%rbp)
leaq 0x37490(%rip), %rax     # 0x57e14
movl (%rax), %edi
movq %r15, %rsi
callq 0x106f0
testl %eax, %eax
je 0x20562
leaq 0x2251c(%rip), %rdi     # 0x42eb9
callq 0x37d1c
cmpb $0x1, 0x35c77(%rip)     # 0x56620
jne 0x20562
callq 0x10090
movl $0xfff, %eax            # imm = 0xFFF
subq %r10, %rax
xorl %r12d, %r12d
cmpq %r9, %rax
cmovaeq %r9, %r12
jmp 0x2053a
movq %rsi, %rcx
btrq $0x3f, %rcx
cmpq $0x1, %rcx
sbbq $0x0, %rdi
jmp 0x20802
leaq -0x1(,%r9,2), %rcx
bsrq %rcx, %r10
leal -0x3(%r10), %ecx
movq %rax, %r12
shlq %cl, %r12
cmpq $0x6, %r10
notq %r12
cmovbq %rdx, %r12
addq %r12, %r9
notq %r12
andq %r9, %r12
jmp 0x206b8
movq %rbx, %rdi
movq %r12, %rsi
callq 0x244f5
jmp 0x20867
shrl %ecx
movq %r15, %rdi
movq %r12, %rsi
movl %ebp, %edx
movq %r13, %r8
callq 0x371b7
movl 0x10(%r12), %ecx
jmp 0x20890
movq %rsi, %rcx
btrq $0x3f, %rcx
cmpq $0x1, %rcx
movq %rdi, %r10
sbbq $0x0, %r10
jmp 0x20712
testq %rsi, %rsi
js 0x20a87
leaq -0x1(,%rsi,2), %rcx
bsrq %rcx, %rdi
leal -0x3(%rdi), %ecx
shlq %cl, %rax
cmpq $0x6, %rdi
notq %rax
cmovbq %rdx, %rax
leaq (%rax,%rsi), %rcx
notq %rax
andq %rcx, %rax
movq %rax, %r9
jmp 0x2078e
movq %rsi, %rcx
btrq $0x3f, %rcx
cmpq $0x1, %rcx
sbbq $0x0, %rdi
jmp 0x20a64