// File: /workspace/github_c_makefile_star2_O2/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/jemalloc.c
// Function: ifree
JEMALLOC_INLINE_C void
ifree(tsd_t *tsd, void *ptr, tcache_t *tcache, bool slow_path)
{
	size_t usize;
	UNUSED size_t rzsize JEMALLOC_CC_SILENCE_INIT(0);

	witness_assert_lockless(tsd_tsdn(tsd));

	assert(ptr != NULL);
	assert(malloc_initialized() || IS_INITIALIZER);

	if (config_prof && opt_prof) {
		usize = isalloc(tsd_tsdn(tsd), ptr, config_prof);
		prof_free(tsd, ptr, usize);
	} else if (config_stats || config_valgrind)
		usize = isalloc(tsd_tsdn(tsd), ptr, config_prof);
	if (config_stats)
		*tsd_thread_deallocatedp_get(tsd) += usize;

	if (likely(!slow_path))
		iqalloc(tsd, ptr, tcache, false);
	else {
		if (config_valgrind && unlikely(in_valgrind))
			rzsize = p2rz(tsd_tsdn(tsd), ptr);
		iqalloc(tsd, ptr, tcache, true);
		JEMALLOC_VALGRIND_FREE(ptr, rzsize);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x3424c(%rip), %r13     # 0x490d0
movq (%r13), %rax
notq %rax
andq %rsi, %rax
cmpq %rsi, %rax
je 0x14f83
movq %rbx, %rcx
subq %rax, %rcx
shrq $0xc, %rcx
leaq 0x34118(%rip), %rdx     # 0x48fc0
subq (%rdx), %rcx
movq 0x78(%rax,%rcx,8), %rax
movl %eax, %ecx
shrl $0x5, %ecx
movl $0xff, %edx
andl %edx, %ecx
cmpl %edx, %ecx
je 0x15079
movl %ecx, %eax
leaq 0x21373(%rip), %rcx     # 0x36240
movq (%rcx,%rax,8), %rax
addq %rax, 0x18(%r15)
testb %bpl, %bpl
jne 0x14f93
movq (%r13), %rdx
notq %rdx
andq %rbx, %rdx
cmpq %rbx, %rdx
je 0x1508d
movq %rbx, %r8
subq %rdx, %r8
shrq $0xc, %r8
leaq 0x340be(%rip), %rax     # 0x48fc0
movq %r8, %rcx
subq (%rax), %rcx
movq 0x78(%rdx,%rcx,8), %rax
testb $0x2, %al
jne 0x150a6
testq %r14, %r14
je 0x150e3
shrl $0x5, %eax
movzbl %al, %ecx
movl %ecx, %eax
shll $0x5, %eax
leaq (%r14,%rax), %r12
addq $0x28, %r12
leaq 0x34540(%rip), %rax     # 0x49478
movq (%rax), %rax
movl 0x10(%r12), %r8d
cmpl (%rax,%rcx,4), %r8d
je 0x15120
incl %r8d
movl %r8d, 0x10(%r12)
movq 0x18(%r12), %rax
shlq $0x3, %r8
negq %r8
movq %rbx, (%rax,%r8)
movl 0x18(%r14), %eax
testl %eax, %eax
jle 0x150ff
decl %eax
movl %eax, 0x18(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movq %rbx, %rsi
callq 0x292e1
jmp 0x14ed1
cmpb $0x1, 0x33602(%rip)     # 0x4859c
je 0x151a2
xorl %r12d, %r12d
cmpq $0x0, 0x3357d(%rip)     # 0x48528
jne 0x1525f
movq (%r13), %rdx
notq %rdx
andq %rbx, %rdx
cmpq %rbx, %rdx
je 0x151b5
movq %rbx, %r8
subq %rdx, %r8
shrq $0xc, %r8
leaq 0x33feb(%rip), %rax     # 0x48fc0
movq %r8, %rcx
subq (%rax), %rcx
movq 0x78(%rdx,%rcx,8), %rax
testb $0x2, %al
jne 0x151c5
testq %r14, %r14
je 0x151fd
shrl $0x5, %eax
movzbl %al, %r13d
cmpb $0x1, 0x33523(%rip)     # 0x48522
je 0x15228
movl %r13d, %eax
shll $0x5, %eax
leaq (%r14,%rax), %rbp
addq $0x28, %rbp
leaq 0x3445e(%rip), %rax     # 0x49478
movq (%rax), %rax
movl 0x10(%rbp), %r8d
cmpl (%rax,%r13,4), %r8d
je 0x15242
incl %r8d
movl %r8d, 0x10(%rbp)
movq 0x18(%rbp), %rax
shlq $0x3, %r8
negq %r8
movq %rbx, (%rax,%r8)
movl 0x18(%r14), %eax
testl %eax, %eax
jle 0x15210
decl %eax
movl %eax, 0x18(%r14)
cmpb $0x1, 0x33542(%rip)     # 0x4859c
jne 0x14f74
movq %rbx, %rdi
movq %r12, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3251a
shrq %rax
andq $-0x1000, %rax          # imm = 0xF000
addq $-0x1000, %rax          # imm = 0xF000
jmp 0x14ed1
movq %r15, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x28fb2
testq %r14, %r14
je 0x150c7
shrq %rax
andq $-0x1000, %rax          # imm = 0xF000
leaq -0x1000(%rax), %rdi
leaq 0x343de(%rip), %rcx     # 0x494a0
cmpq (%rcx), %rdi
jbe 0x1513b
movq (%rdx), %rsi
movq %r15, %rdi
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1cc1f
movq (%rdx), %rsi
movq %r15, %rdi
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1ca94
movl 0x1c(%r14), %eax
movl %eax, 0x18(%r14)
movq %r15, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x30129
shrl %r8d
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x301d3
movl 0x10(%r12), %r8d
jmp 0x14f4a
cmpq $0x1000, %rdi           # imm = 0x1000
ja 0x152d8
addq $-0x1001, %rax          # imm = 0xEFFF
shrq $0x3, %rax
leaq 0x21867(%rip), %rcx     # 0x369c0
movzbl (%rax,%rcx), %eax
movl %eax, %edx
movq %rdx, %rcx
shlq $0x5, %rcx
leaq (%r14,%rcx), %r12
addq $0x28, %r12
leaq 0x34303(%rip), %rcx     # 0x49478
movq (%rcx), %rsi
movl 0x10(%r12), %ecx
cmpl (%rsi,%rdx,4), %ecx
je 0x152e2
incl %ecx
movl %ecx, 0x10(%r12)
movq 0x18(%r12), %rax
shlq $0x3, %rcx
negq %rcx
movq %rbx, (%rax,%rcx)
jmp 0x14f62
movq %r15, %rdi
movq %rbx, %rsi
callq 0x13779
movq %rax, %r12
jmp 0x14fa3
movq %r15, %rdi
movq %rbx, %rsi
callq 0x28fb2
jmp 0x15053
testq %r14, %r14
je 0x151ea
shrq %rax
andq $-0x1000, %rax          # imm = 0xF000
leaq -0x1000(%rax), %r13
leaq 0x342bf(%rip), %rcx     # 0x494a0
cmpq (%rcx), %r13
jbe 0x1526f
movq (%rdx), %rsi
movq %r15, %rdi
movq %rbx, %rcx
callq 0x1cc1f
jmp 0x15053
movq (%rdx), %rsi
movq %r15, %rdi
movq %rbx, %rcx
callq 0x1ca94
jmp 0x15053
movl 0x1c(%r14), %eax
movl %eax, 0x18(%r14)
movq %r15, %rdi
movq %r14, %rsi
callq 0x30129
jmp 0x15053
movl %r13d, %esi
shll $0x6, %esi
addq 0x32da3(%rip), %rsi     # 0x47fd8
movq %rbx, %rdi
callq 0x1b8a9
jmp 0x15005
shrl %r8d
movq %r15, %rdi
movq %r14, %rsi
movq %rbp, %rdx
movl %r13d, %ecx
callq 0x301d3
movl 0x10(%rbp), %r8d
jmp 0x1502b
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2af4b
jmp 0x15053
cmpq $0x1000, %r13           # imm = 0x1000
ja 0x152fe
addq $-0x1001, %rax          # imm = 0xEFFF
shrq $0x3, %rax
leaq 0x21733(%rip), %rcx     # 0x369c0
movzbl (%rax,%rcx), %ebp
cmpb $0x1, 0x3328a(%rip)     # 0x48522
je 0x1530a
movl %ebp, %eax
movq %rax, %rcx
shlq $0x5, %rcx
leaq (%r14,%rcx), %r13
addq $0x28, %r13
leaq 0x341c6(%rip), %rcx     # 0x49478
movq (%rcx), %rdx
movl 0x10(%r13), %ecx
cmpl (%rdx,%rax,4), %ecx
je 0x15317
incl %ecx
movl %ecx, 0x10(%r13)
movq 0x18(%r13), %rax
shlq $0x3, %rcx
negq %rcx
movq %rbx, (%rax,%rcx)
jmp 0x15041
callq 0x19a84
jmp 0x1515d
shrl %ecx
movq %r15, %rdi
movq %r12, %rsi
movl %eax, %edx
movq %r14, %r8
callq 0x303be
movl 0x10(%r12), %ecx
jmp 0x15186
movq %r13, %rdi
callq 0x19a84
movl %eax, %ebp
jmp 0x15291
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1cae2
jmp 0x1529a
shrl %ecx
movq %r15, %rdi
movq %r13, %rsi
movl %ebp, %edx
movq %r14, %r8
callq 0x303be
movl 0x10(%r13), %ecx
jmp 0x152be