// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x2fde5(%rip), %r12     # 0x4d0d0
movq (%r12), %rax
notq %rax
andq %rsi, %rax
cmpq %rsi, %rax
je 0x1d3ef
movq %r15, %rcx
subq %rax, %rcx
shrq $0xc, %rcx
leaq 0x2fcb1(%rip), %rdx     # 0x4cfc0
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 0x1d412
movl %ecx, %eax
leaq 0x1e30c(%rip), %rcx     # 0x3b640
movq (%rcx,%rax,8), %rax
addq %rax, 0x18(%r14)
testb %bpl, %bpl
jne 0x1d3ff
movq (%r12), %rdx
notq %rdx
andq %r15, %rdx
cmpq %r15, %rdx
je 0x1d426
movq %r15, %r8
subq %rdx, %r8
shrq $0xc, %r8
leaq 0x2fc57(%rip), %rax     # 0x4cfc0
movq %r8, %rcx
subq (%rax), %rcx
movq 0x78(%rdx,%rcx,8), %rax
testb $0x2, %al
jne 0x1d439
testq %rbx, %rbx
je 0x1d470
shrl $0x5, %eax
movzbl %al, %ecx
movl %ecx, %eax
shll $0x5, %eax
leaq (%rbx,%rax), %r12
addq $0x28, %r12
leaq 0x300d9(%rip), %rax     # 0x4d478
movq (%rax), %rax
movl (%rax,%rcx,4), %r8d
cmpl %r8d, 0x10(%r12)
je 0x1d4a1
movl 0x10(%r12), %eax
incl %eax
movl %eax, 0x10(%r12)
movq 0x18(%r12), %rcx
shlq $0x3, %rax
negq %rax
movq %r15, (%rcx,%rax)
movl 0x18(%rbx), %eax
testl %eax, %eax
jle 0x1d486
leal -0x1(%rax), %ecx
movl %ecx, 0x18(%rbx)
testl %eax, %eax
jle 0x1d48e
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movq %r15, %rsi
callq 0x2e4e2
jmp 0x1d338
movq %r14, %rdi
movq %r15, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0xbd5a
jmp 0x1d3e6
shrq %rax
andq $-0x1000, %rax          # imm = 0xF000
addq $-0x1000, %rax          # imm = 0xF000
jmp 0x1d338
movq %r14, %rdi
movq %r15, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x11227
testq %rbx, %rbx
je 0x1d45a
shrq %rax
andq $-0x1000, %rax          # imm = 0xF000
leaq -0x1000(%rax), %rdi
leaq 0x3004b(%rip), %rcx     # 0x4d4a0
cmpq (%rcx), %rdi
jbe 0x1d4b7
movq (%rdx), %rsi
movq %r14, %rdi
movq %r15, %rcx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xdfd3
movq (%rdx), %rsi
movq %r14, %rdi
movq %r15, %rcx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xdf6b
movl 0x1c(%rbx), %ecx
jmp 0x1d3db
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x350b5
shrl %r8d
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x35162
jmp 0x1d3b1
cmpq $0x1000, %rdi           # imm = 0x1000
ja 0x1d512
addq $-0x1001, %rax          # imm = 0xEFFF
shrq $0x3, %rax
leaq 0x1e8ef(%rip), %rcx     # 0x3bdc0
movzbl (%rax,%rcx), %eax
movl %eax, %edx
leaq 0x2ff9a(%rip), %rcx     # 0x4d478
movq (%rcx), %rcx
movl (%rcx,%rdx,4), %ecx
shlq $0x5, %rdx
leaq (%rbx,%rdx), %r12
addq $0x28, %r12
cmpl %ecx, 0x10(%r12)
jne 0x1d3b1
shrl %ecx
movq %r14, %rdi
movq %r12, %rsi
movl %eax, %edx
movq %rbx, %r8
callq 0x353a2
jmp 0x1d3b1
callq 0xb8ec
jmp 0x1d4d5