// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/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 %rsi, %r15
movq %rdi, %rbx
movl %edx, %ecx
andl $0x3f, %ecx
jne 0x383a1
cmpq $0x1000, %r15           # imm = 0x1000
ja 0x38539
decq %r15
shrq $0x3, %r15
leaq 0x2159b(%rip), %rax     # 0x59800
movzbl (%r15,%rax), %eax
leaq 0x20e0f(%rip), %rcx     # 0x59080
movq (%rcx,%rax,8), %r12
movq 0x35d6c(%rip), %rbp     # 0x6dfe8
movq %fs:0x0, %r15
addq %rbp, %r15
movl %fs:(%rbp), %eax
testl %eax, %eax
je 0x38677
cmpl $0x2, %eax
je 0x386c4
andl $0xfff00, %r14d         # imm = 0xFFF00
jne 0x384e8
leaq 0x8(%r15), %r14
movq (%r14), %r13
addq %r12, %fs:0x18(%rbp)
cmpb $0x1, 0x4b4d7(%rip)     # 0x83794
je 0x384fd
xorl %edx, %edx
cmpq $0x0, 0x4b46b(%rip)     # 0x83738
jne 0x3850d
leaq 0x4c3c6(%rip), %rax     # 0x846a0
movq (%rax), %rsi
notq %rsi
andq %rbx, %rsi
cmpq %rbx, %rsi
je 0x38550
cmpq $0x3800, %r12           # imm = 0x3800
ja 0x38566
testq %r13, %r13
je 0x385f5
cmpq $0x1000, %r12           # imm = 0x1000
ja 0x38612
decq %r12
shrq $0x3, %r12
leaq 0x214e3(%rip), %rax     # 0x59800
movzbl (%r12,%rax), %ebp
cmpb $0x1, 0x4b409(%rip)     # 0x83732
movl %ebp, %r14d
je 0x38627
movq %r14, %rax
shlq $0x5, %rax
leaq (%rax,%r13), %r12
addq $0x20, %r12
leaq 0x4ca58(%rip), %rax     # 0x84da0
movq (%rax), %rax
movl (%rax,%r14,4), %r8d
cmpl %r8d, 0x10(%r12)
je 0x38649
movq 0x18(%r12), %rax
movl 0x10(%r12), %ecx
movq %rbx, (%rax,%rcx,8)
leal 0x1(%rcx), %eax
movl %eax, 0x10(%r12)
movl 0x18(%r13), %eax
incl %eax
movl %eax, 0x18(%r13)
cmpl $0xe4, %eax
je 0x38667
cmpb $0x1, 0x4b408(%rip)     # 0x83794
je 0x38520
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %r13d
shlq %cl, %r13
cmpq $0x3801, %r15           # imm = 0x3801
setae %al
cmpl $0xc, %ecx
setae %cl
orb %al, %cl
jne 0x38405
leaq (%r15,%r13), %rax
decq %rax
movq %r13, %rdi
negq %rdi
andq %rax, %rdi
cmpq $0x1000, %rdi           # imm = 0x1000
ja 0x3871a
decq %rdi
shrq $0x3, %rdi
leaq 0x21417(%rip), %rax     # 0x59800
movzbl (%rdi,%rax), %eax
leaq 0x20c8c(%rip), %rcx     # 0x59080
movq (%rcx,%rax,8), %r12
cmpq $0x4000, %r12           # imm = 0x4000
jb 0x38275
leaq 0x4c124(%rip), %rcx     # 0x84530
leaq 0x4c285(%rip), %rax     # 0x84698
movq (%rax), %rax
cmpq %r15, (%rcx)
jb 0x3848e
cmpq %r13, %rax
jbe 0x3848e
addq $0xfff, %r13            # imm = 0xFFF
andq $-0x1000, %r13          # imm = 0xF000
movl $0x4000, %r12d          # imm = 0x4000
cmpq $0x4001, %r15           # imm = 0x4001
jb 0x3847a
testq %r15, %r15
js 0x38758
leaq -0x1(,%r15,2), %rcx
bsrq %rcx, %rdx
leal -0x3(%rdx), %ecx
movq $-0x1, %rsi
shlq %cl, %rsi
cmpq $0x7, %rdx
notq %rsi
movl $0xf, %r12d
cmovaeq %rsi, %r12
leaq (%r12,%r15), %rcx
notq %r12
andq %rcx, %r12
leaq (%r12,%r13), %rcx
leaq 0x4c0d3(%rip), %rdx     # 0x84558
cmpq (%rdx), %rcx
jbe 0x38275
leaq 0x4c20b(%rip), %rcx     # 0x846a0
movq (%rcx), %rbp
addq %rbp, %r13
notq %rbp
andq %r13, %rbp
je 0x384e0
cmpq %r15, %rax
jae 0x38703
cmpq $0x1000, %r15           # imm = 0x1000
ja 0x38772
leaq -0x1(%r15), %rax
shrq $0x3, %rax
leaq 0x21338(%rip), %rcx     # 0x59800
movzbl (%rax,%rcx), %eax
leaq 0x20bad(%rip), %rcx     # 0x59080
movq (%rcx,%rax,8), %rax
cmpq %r15, %rax
jae 0x38703
xorl %r12d, %r12d
jmp 0x38275
cmpl $0x100, %r14d           # imm = 0x100
jne 0x38681
xorl %r13d, %r13d
jmp 0x382b1
movq %rbx, %rdi
callq 0x350e7
movq %rax, %rdx
jmp 0x382c5
movq %r15, %rdi
movq %rbx, %rsi
movq %rdx, %r14
callq 0x4aed0
jmp 0x386bc
movq %rbx, %rdi
movq %rdx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x50866
movq %rsp, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x13944
movq (%r12), %r12
jmp 0x38275
movq %r15, %rdi
movq %rbx, %rsi
movq %rdx, %r14
movq %r13, %rdx
callq 0x488cb
jmp 0x386bc
movq %rdx, %r14
testq %r13, %r13
je 0x386b1
leaq 0x4c857(%rip), %rax     # 0x84dd0
cmpq %r12, (%rax)
jb 0x386b1
movq %r12, %rdi
callq 0x39850
movl %eax, %ebp
cmpb $0x1, 0x4b19f(%rip)     # 0x83732
je 0x3872e
movl %ebp, %eax
leaq 0x4c7fe(%rip), %rcx     # 0x84da0
movq (%rcx), %rcx
movl (%rcx,%rax,4), %ecx
shlq $0x5, %rax
leaq (%rax,%r13), %r12
addq $0x20, %r12
cmpl %ecx, 0x10(%r12)
movq %r14, %rdx
je 0x3873e
movq 0x18(%r12), %rax
movl 0x10(%r12), %ecx
movq %rbx, (%rax,%rcx,8)
leal 0x1(%rcx), %eax
movl %eax, 0x10(%r12)
movl 0x18(%r13), %eax
incl %eax
movl %eax, 0x18(%r13)
cmpl $0xe4, %eax
jne 0x38385
movq %r15, %rdi
movq %r13, %rsi
jmp 0x38670
movq %rbx, %rcx
subq %rsi, %rcx
shrq $0xc, %rcx
movq (%rsi), %rdi
movq %rdx, %r14
movq %rbx, %rdx
callq 0x3b9e8
jmp 0x386bc
movq %r12, %rdi
movq %rdx, %r14
callq 0x39850
movq %r14, %rdx
movl %eax, %ebp
jmp 0x38322
leaq (%r14,%r14,2), %rsi
shlq $0x5, %rsi
addq 0x35992(%rip), %rsi     # 0x6dfc8
movq %rbx, %rdi
movq %rdx, %r12
callq 0x3b00b
movq %r12, %rdx
jmp 0x38332
shrl %r8d
movq %r15, %rdi
movq %r13, %rsi
movq %rdx, %r14
movq %r12, %rdx
movl %ebp, %ecx
callq 0x4e87e
movq %r14, %rdx
jmp 0x3835a
movq %r15, %rdi
movq %r13, %rsi
movq %rdx, %r14
callq 0x4e7cd
jmp 0x386bc
movl $0x1, %fs:(%rbp)
jmp 0x386cc
shrl $0x8, %r14d
addl $-0x2, %r14d
leaq 0x4c728(%rip), %rax     # 0x84db8
movq (%rax), %rax
leaq (%rax,%r14,8), %r14
cmpq $0x0, (%r14)
jne 0x382ae
movq %r15, %rdi
movq %r14, %rsi
callq 0x1398e
jmp 0x382ae
movq (%rsi), %rdi
movq %rbx, %rdx
callq 0x3bb14
movq %r14, %rdx
jmp 0x38385
movl $0x3, %fs:(%rbp)
leaq 0x4c731(%rip), %rax     # 0x84e04
movl (%rax), %edi
movq %r15, %rsi
callq 0x12990
testl %eax, %eax
je 0x3829d
leaq 0x214c8(%rip), %rdi     # 0x59bb4
callq 0x4f37c
cmpb $0x1, 0x4b038(%rip)     # 0x83730
jne 0x3829d
callq 0x120c0
movl $0xfff, %ecx            # imm = 0xFFF
subq %rbp, %rcx
xorl %r12d, %r12d
cmpq %rax, %rcx
cmovaeq %rax, %r12
jmp 0x38275
movq %rsp, %r12
movq %r12, %rsi
callq 0x138ab
movq (%r12), %r12
jmp 0x383f8
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3b9ed
jmp 0x38599
shrl %ecx
movq %r15, %rdi
movq %r12, %rsi
movl %ebp, %edx
movq %r13, %r8
callq 0x4ea32
movq %r14, %rdx
jmp 0x385c2
movq %r15, %rcx
btrq $0x3f, %rcx
cmpq $0x1, %rcx
movl $0x40, %edx
sbbq $0x0, %rdx
jmp 0x38452
movq %rsp, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x138fa
movq (%r12), %rax
jmp 0x384d7