// File: /workspace/github_c_makefile_star2_O2/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/prof.c
// Function: prof_tdata_destroy_locked
static void
prof_tdata_destroy_locked(tsd_t *tsd, prof_tdata_t *tdata,
    bool even_if_attached)
{

	malloc_mutex_assert_owner(tsd_tsdn(tsd), &tdatas_mtx);

	tdata_tree_remove(&tdatas, tdata);

	assert(prof_tdata_should_destroy_unlocked(tdata, even_if_attached));

	if (tdata->thread_name != NULL)
		idalloctm(tsd_tsdn(tsd), tdata->thread_name, NULL, true, true);
	ckh_delete(tsd, &tdata->bt2tctx);
	idalloctm(tsd_tsdn(tsd), tdata, NULL, true, true);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x800, %rsp            # imm = 0x800
movq %rsi, %rbx
movq %rdi, %r14
movq 0x1f144(%rip), %r15     # 0x492b0
leaq 0x10(%rsp), %r12
movq %r15, -0x10(%r12)
testq %r15, %r15
je 0x2a1b2
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2ab81
movl %eax, -0x8(%r12)
testl %eax, %eax
js 0x2a1a4
movq 0x30(%r15), %r15
andq $-0x2, %r15
movq %r15, (%r12)
testl %eax, %eax
jne 0x2a1ac
jmp 0x2a238
movq 0x28(%r15), %r15
movq %r15, (%r12)
addq $0x10, %r12
jmp 0x2a176
addq $-0x10, %r12
xorl %eax, %eax
leaq -0x10(%r12), %rdx
movq -0x10(%r12), %rcx
cmpq %rbx, %rcx
je 0x2a264
movq 0x30(%rcx), %rsi
movl %esi, %edi
andl $0x1, %edi
andq $-0x2, %rsi
movq 0x30(%rbx), %r8
andl $0x1, %r8d
orq %r8, %rsi
movq %rsi, 0x30(%rcx)
movq 0x28(%rbx), %rsi
movq %rsi, 0x28(%rcx)
movq 0x30(%rbx), %rsi
andq $-0x2, %rsi
orq %r8, %rsi
movq %rsi, 0x30(%rcx)
movq 0x30(%rbx), %rsi
andq $-0x2, %rsi
orq %rdi, %rsi
movq %rsi, 0x30(%rbx)
movq %rcx, (%rax)
movq %rbx, (%rdx)
movq %rsp, %rcx
cmpq %rcx, %rax
je 0x2a297
cmpl $0x0, -0x8(%rax)
movq (%rax), %rcx
js 0x2a2a3
movq -0x10(%rax), %rax
movq 0x30(%rax), %rdx
andl $0x1, %edx
orq %rcx, %rdx
movq %rdx, 0x30(%rax)
jmp 0x2a2ab
movl $0x1, -0x8(%r12)
leaq -0x10(%r12), %rax
testq %r15, %r15
je 0x2a1b8
orl $-0x1, 0x8(%r12)
movq 0x28(%r15), %r15
movq %r15, 0x10(%r12)
addq $0x10, %r12
jmp 0x2a246
movq 0x28(%rbx), %rax
testq %rax, %rax
je 0x2a382
andb $-0x2, 0x30(%rax)
movq %rsp, %rcx
cmpq %rcx, %rdx
je 0x2a4f1
cmpl $0x0, -0x18(%r12)
js 0x2a400
movq -0x20(%r12), %rcx
jmp 0x2a532
movq (%rax), %rax
movq %rax, 0x1f00f(%rip)     # 0x492b0
jmp 0x2a2ab
movq -0x10(%rax), %rax
movq %rcx, 0x28(%rax)
movq %rbx, %rcx
testb $0x1, 0x30(%rcx)
jne 0x2a373
andq $0x0, -0x10(%r12)
addq $-0x30, %r12
movq %rsp, %rcx
leaq 0x10(%r12), %rdx
cmpq %rcx, %rdx
jb 0x2a39b
cmpl $0x0, 0x18(%r12)
movq 0x20(%r12), %r8
js 0x2a32f
movq (%rdx), %rsi
movq 0x28(%rsi), %rax
movq 0x30(%rsi), %r9
andl $0x1, %r9d
orq %r8, %r9
movq %r9, 0x30(%rsi)
movq 0x30(%rax), %rdi
testb $0x1, %dil
jne 0x2a3a4
testb $0x1, %r9b
jne 0x2a3dc
movq 0x28(%rax), %r8
testq %r8, %r8
je 0x2a325
movq 0x30(%r8), %r9
testb $0x1, %r9b
jne 0x2a42e
orq $0x1, %rdi
movq %rdi, 0x30(%rax)
jmp 0x2a36a
movq (%rdx), %rax
movq %r8, 0x28(%rax)
movq 0x30(%rax), %rsi
testb $0x1, %sil
jne 0x2a40a
movq 0x28(%rsi), %rdi
testq %rdi, %rdi
je 0x2a35b
movq 0x30(%rdi), %r8
testb $0x1, %r8b
jne 0x2a454
orq $0x1, %rdi
movq %rdi, 0x30(%rax)
movq %rax, 0x28(%rsi)
movq %rsi, (%rdx)
addq $-0x10, %r12
jmp 0x2a2c5
movq -0x20(%r12), %rax
andq $0x0, 0x28(%rax)
jmp 0x2a5bd
movq %rsp, %rax
cmpq %rax, %rdx
jne 0x2a2ae
andq $0x0, 0x1ef1a(%rip)     # 0x492b0
jmp 0x2a5bd
movq (%rsp), %rax
jmp 0x2a4f1
andq $-0x2, %rdi
movq 0x28(%rdi), %r8
testq %r8, %r8
je 0x2a3bf
movq 0x30(%r8), %r9
testb $0x1, %r9b
jne 0x2a4a0
orb $0x1, 0x30(%rdi)
movq 0x30(%rax), %rdi
andq $-0x2, %rdi
movq %rdi, 0x28(%rsi)
andq $-0x2, %rsi
movq %rsi, 0x30(%rax)
jmp 0x2a4ec
movq 0x28(%rax), %rcx
testq %rcx, %rcx
je 0x2a3ef
testb $0x1, 0x30(%rcx)
jne 0x2a4fd
orq $0x1, %rdi
movq %rdi, 0x30(%rax)
andb $-0x2, 0x30(%rsi)
jmp 0x2a5bd
movq -0x20(%r12), %rcx
jmp 0x2a546
andq $-0x2, %rsi
movq 0x28(%rsi), %rcx
testq %rcx, %rcx
je 0x2a421
testb $0x1, 0x30(%rcx)
jne 0x2a54c
leaq 0x28(%rsi), %rdx
orq $0x1, %rcx
jmp 0x2a583
andq $-0x2, %r9
movq %r9, 0x30(%r8)
movq 0x30(%rax), %rdi
movq %rdi, %r8
andq $-0x2, %r8
movq %r8, 0x28(%rsi)
andl $0x1, %edi
orq %rsi, %rdi
movq %rdi, 0x30(%rax)
jmp 0x2a4ec
andq $-0x2, %r8
movq %r8, 0x28(%rsi)
movq %rsi, 0x30(%rdi)
movl 0x30(%rax), %esi
orl %edi, %esi
andq $-0x2, %rdi
andl $0x1, %esi
orq 0x28(%rdi), %rsi
movq %rsi, 0x30(%rax)
movq %rax, 0x28(%rdi)
cmpq %rcx, %rdx
je 0x2a5b0
cmpl $0x0, 0x8(%r12)
movq (%r12), %rax
js 0x2a5b9
movq 0x30(%rax), %rcx
andl $0x1, %ecx
orq %rdi, %rcx
jmp 0x2a5a0
andq $-0x2, %r9
movq %r9, 0x30(%r8)
movq 0x30(%rax), %rdi
movq %rdi, %r8
andq $-0x2, %r8
andl $0x1, %edi
orq %rsi, %rdi
movq %rdi, 0x30(%rax)
movq 0x30(%r8), %rdi
movq %rdi, %r9
andq $-0x2, %r9
movq %r9, 0x28(%rsi)
andl $0x1, %edi
orq %rsi, %rdi
movq %rdi, 0x30(%r8)
movq 0x30(%rax), %rsi
andl $0x1, %esi
orq 0x28(%r8), %rsi
movq %rsi, 0x30(%rax)
movq %rax, 0x28(%r8)
movq %r8, %rax
cmpq %rcx, %rdx
jne 0x2a526
movq %rax, 0x1edb8(%rip)     # 0x492b0
jmp 0x2a5bd
andq $-0x2, %r8
movq %r8, 0x30(%rsi)
orb $0x1, 0x30(%rax)
andb $-0x2, 0x30(%rcx)
movq 0x30(%rax), %rcx
movq %rcx, %rdx
andq $-0x2, %rdx
movq %rdx, 0x28(%rsi)
andl $0x1, %ecx
orq %rsi, %rcx
movq %rcx, 0x30(%rax)
cmpl $0x0, 0x8(%r12)
js 0x2a542
movq (%r12), %rcx
movq 0x30(%rcx), %rdx
andl $0x1, %edx
orq %rax, %rdx
movq %rdx, 0x30(%rcx)
jmp 0x2a5bd
movq (%r12), %rcx
movq %rax, 0x28(%rcx)
jmp 0x2a5bd
movq %rsi, 0x30(%rax)
movq 0x30(%rcx), %rdx
movq %rdx, %rdi
andq $-0x2, %rdi
movq %rdi, 0x28(%rsi)
andl $0x1, %edx
orq %rsi, %rdx
movq %rdx, 0x30(%rcx)
movl 0x30(%rax), %edi
orl %ecx, %edi
movq %rcx, %rsi
andq $-0x2, %rsi
leaq 0x28(%rsi), %rdx
andl $0x1, %edi
orq 0x28(%rsi), %rdi
movq %rdi, %rcx
movq %rcx, 0x30(%rax)
movq %rax, (%rdx)
cmpl $0x0, 0x8(%r12)
js 0x2a5a6
movq (%r12), %rax
movq 0x30(%rax), %rcx
andl $0x1, %ecx
orq %rsi, %rcx
movq %rcx, 0x30(%rax)
jmp 0x2a5bd
movq (%r12), %rax
movq %rsi, 0x28(%rax)
jmp 0x2a5bd
movq %rdi, 0x1ecf9(%rip)     # 0x492b0
jmp 0x2a5bd
movq %rdi, 0x28(%rax)
movq 0x18(%rbx), %r15
testq %r15, %r15
je 0x2a677
leaq 0x1eaff(%rip), %r13     # 0x490d0
movq (%r13), %rax
notq %rax
andq %r15, %rax
cmpq %rax, %r15
je 0x2a78a
movq (%rax), %r12
cmpq %rax, %r15
je 0x2a7a4
movq %r15, %rcx
subq %rax, %rcx
shrq $0xc, %rcx
leaq 0x1e9bf(%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 0x2a7c4
movl %ecx, %eax
leaq 0xbc1a(%rip), %rcx      # 0x36240
movq (%rcx,%rax,8), %rax
negq %rax
lock
xaddq %rax, 0x90(%r12)
movq (%r13), %rdx
notq %rdx
andq %r15, %rdx
movq %r15, %r8
subq %rdx, %r8
je 0x2a7b4
shrq $0xc, %r8
leaq 0x1e968(%rip), %rax     # 0x48fc0
movq %r8, %rcx
subq (%rax), %rcx
testb $0x2, 0x78(%rdx,%rcx,8)
movq (%rdx), %rsi
movq %r14, %rdi
movq %r15, %rcx
jne 0x2a7d8
callq 0x1ca94
leaq 0x40(%rbx), %rsi
movq %r14, %rdi
callq 0x32888
leaq 0x1ea46(%rip), %r12     # 0x490d0
movq (%r12), %rax
notq %rax
andq %rbx, %rax
cmpq %rbx, %rax
je 0x2a73b
movq (%rax), %r15
cmpq %rbx, %rax
je 0x2a755
movq %rbx, %rcx
subq %rax, %rcx
shrq $0xc, %rcx
leaq 0x1e906(%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 0x2a76f
movl %ecx, %eax
leaq 0xbb61(%rip), %rcx      # 0x36240
movq (%rcx,%rax,8), %rax
negq %rax
lock
xaddq %rax, 0x90(%r15)
movq (%r12), %rdx
notq %rdx
andq %rbx, %rdx
cmpq %rbx, %rdx
je 0x2a762
movq %rbx, %r8
subq %rdx, %r8
shrq $0xc, %r8
leaq 0x1e8b1(%rip), %rax     # 0x48fc0
movq %r8, %rcx
subq (%rax), %rcx
testb $0x2, 0x78(%rdx,%rcx,8)
movq (%rdx), %rsi
movq %r14, %rdi
movq %rbx, %rcx
jne 0x2a783
callq 0x1ca94
addq $0x800, %rsp            # imm = 0x800
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rbx, %rdi
callq 0x28ce3
movq %rax, %r15
movq (%r12), %rax
notq %rax
andq %rbx, %rax
jmp 0x2a6a0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x292e1
jmp 0x2a6e3
movq %r14, %rdi
movq %rbx, %rsi
callq 0x28fb2
jmp 0x2a72a
shrq %rax
andq $-0x1000, %rax          # imm = 0xF000
addq $-0x1000, %rax          # imm = 0xF000
jmp 0x2a6e3
callq 0x1cc1f
jmp 0x2a72a
movq %r15, %rdi
callq 0x28ce3
movq %rax, %r12
movq (%r13), %rax
notq %rax
andq %r15, %rax
jmp 0x2a5e7
movq %r14, %rdi
movq %r15, %rsi
callq 0x292e1
jmp 0x2a62a
movq %r14, %rdi
movq %r15, %rsi
callq 0x28fb2
jmp 0x2a677
shrq %rax
andq $-0x1000, %rax          # imm = 0xF000
addq $-0x1000, %rax          # imm = 0xF000
jmp 0x2a62a
callq 0x1cc1f
jmp 0x2a677