// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/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)
{
	tcache_t *tcache;

	assert(prof_tdata_should_destroy(tdata, even_if_attached));
	assert(tsd_prof_tdata_get(tsd) != tdata);

	tdata_tree_remove(&tdatas, tdata);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x808, %rsp            # imm = 0x808
movq %rsi, %r14
movq %rdi, %rbx
movq 0x23a5f(%rip), %rsi     # 0x5b808
movq %rsi, (%rsp)
leaq 0x23a5c(%rip), %rcx     # 0x5b810
cmpq %rcx, %rsi
je 0x37e13
movq 0x8(%r14), %rdx
leaq 0x10(%rsp), %rax
xorl %edi, %edi
cmpq 0x8(%rsi), %rdx
seta %dil
sbbl $0x0, %edi
jne 0x37de2
movq 0x10(%r14), %r8
xorl %edi, %edi
cmpq 0x10(%rsi), %r8
seta %dil
sbbl $0x0, %edi
movl %edi, -0x8(%rax)
testl %edi, %edi
js 0x37dfd
movq 0x30(%rsi), %rsi
andq $-0x2, %rsi
movq %rsi, (%rax)
testl %edi, %edi
jne 0x37e04
jmp 0x37eda
movq 0x28(%rsi), %rsi
movq %rsi, (%rax)
addq $0x10, %rax
cmpq %rcx, %rsi
jne 0x37dc2
addq $-0x10, %rax
jmp 0x37e16
movq %rsp, %rax
xorl %edx, %edx
leaq -0x10(%rax), %rdi
movq -0x10(%rax), %rsi
cmpq %r14, %rsi
je 0x37e9c
movq 0x30(%rsi), %r8
movl %r8d, %r9d
andl $0x1, %r9d
andq $-0x2, %r8
movq 0x30(%r14), %r10
andl $0x1, %r10d
orq %r10, %r8
movq %r8, 0x30(%rsi)
movq 0x28(%r14), %r8
movq %r8, 0x28(%rsi)
movq 0x30(%r14), %r8
andq $-0x2, %r8
orq %r10, %r8
movq %r8, 0x30(%rsi)
movq 0x30(%r14), %r8
andq $-0x2, %r8
orq %r9, %r8
movq %r8, 0x30(%r14)
movq %rsi, (%rdx)
movq %r14, (%rdi)
movq %rsp, %rsi
cmpq %rsi, %rdx
je 0x37f03
cmpl $0x0, -0x8(%rdx)
movq (%rdx), %rsi
js 0x37f0f
movq -0x10(%rdx), %rdx
movq 0x30(%rdx), %rdi
andl $0x1, %edi
orq %rsi, %rdi
movq %rdi, 0x30(%rdx)
jmp 0x37f17
movq 0x28(%r14), %rdx
cmpq %rcx, %rdx
je 0x37ff6
andb $-0x2, 0x30(%rdx)
movq %rsp, %rcx
cmpq %rcx, %rdi
je 0x3809b
cmpl $0x0, -0x18(%rax)
js 0x3800e
movq -0x20(%rax), %rax
movq 0x30(%rax), %rcx
andl $0x1, %ecx
orq %rdx, %rcx
movq %rcx, 0x30(%rax)
jmp 0x380a2
movl $0x1, -0x8(%rax)
leaq -0x10(%rax), %rdx
cmpq %rcx, %rsi
je 0x37e18
movl $0xffffffff, 0x8(%rax)  # imm = 0xFFFFFFFF
movq 0x28(%rsi), %rsi
movq %rsi, 0x10(%rax)
addq $0x10, %rax
jmp 0x37ee5
movq (%rdx), %rdx
movq %rdx, 0x238fb(%rip)     # 0x5b808
jmp 0x37f17
movq -0x10(%rdx), %rdx
movq %rsi, 0x28(%rdx)
movq %r14, %rsi
testb $0x1, 0x30(%rsi)
jne 0x37fe9
movq %rcx, -0x10(%rax)
leaq -0x20(%rax), %rdx
movq %rsp, %rcx
cmpq %rcx, %rdx
jb 0x37fd9
addq $-0x30, %rax
cmpl $0x0, 0x18(%rax)
movq 0x20(%rax), %r8
js 0x37f91
movq 0x10(%rax), %rsi
movq 0x28(%rsi), %rdx
movq 0x30(%rsi), %r9
andl $0x1, %r9d
orq %r8, %r9
movq %r9, 0x30(%rsi)
movq 0x30(%rdx), %rdi
testb $0x1, %dil
jne 0x3801b
testb $0x1, %r9b
jne 0x38051
movq 0x28(%rdx), %r8
movq 0x30(%r8), %r9
testb $0x1, %r9b
jne 0x3806d
orq $0x1, %rdi
movq %rdi, 0x30(%rdx)
jmp 0x37fc9
movq 0x10(%rax), %rdx
movq %r8, 0x28(%rdx)
movq 0x30(%rdx), %rsi
testb $0x1, %sil
jne 0x382e9
movq 0x28(%rsi), %rdi
movq 0x30(%rdi), %r8
testb $0x1, %r8b
jne 0x3830e
orq $0x1, %rdi
movq %rdi, 0x30(%rdx)
movq %rdx, 0x28(%rsi)
movq %rsi, 0x10(%rax)
leaq -0x10(%rax), %rdx
cmpq %rcx, %rax
movq %rdx, %rax
jae 0x37f3c
movq (%rsp), %rax
movq %rax, 0x23824(%rip)     # 0x5b808
jmp 0x380a2
movq -0x20(%rax), %rax
movq %rcx, 0x28(%rax)
jmp 0x380a2
movq %rsp, %rdx
cmpq %rdx, %rdi
jne 0x37f1a
movq %rcx, 0x237ff(%rip)     # 0x5b808
jmp 0x380a2
movq -0x20(%rax), %rax
movq %rdx, 0x28(%rax)
jmp 0x380a2
andq $-0x2, %rdi
movq 0x28(%rdi), %r9
movq 0x30(%r9), %r10
leaq 0x10(%rax), %r8
testb $0x1, %r10b
jne 0x3834d
orb $0x1, 0x30(%rdi)
movq 0x30(%rdx), %rdi
andq $-0x2, %rdi
movq %rdi, 0x28(%rsi)
andq $-0x2, %rsi
movq %rdx, %rdi
jmp 0x3839c
movq 0x28(%rdx), %rcx
testb $0x1, 0x30(%rcx)
jne 0x383cd
orq $0x1, %rdi
movq %rdi, 0x30(%rdx)
andb $-0x2, 0x30(%rsi)
jmp 0x380a2
andq $-0x2, %r9
movq %r9, 0x30(%r8)
movq 0x30(%rdx), %rdi
movq %rdi, %r8
andq $-0x2, %r8
movq %r8, 0x28(%rsi)
andl $0x1, %edi
orq %rsi, %rdi
movq %rdi, 0x30(%rdx)
leaq 0x10(%rax), %rsi
cmpq %rcx, %rsi
jne 0x383f6
movq %rdx, 0x23766(%rip)     # 0x5b808
movq 0x8(%rbx), %r15
movq 0x18(%r14), %r12
testq %r12, %r12
je 0x381bd
leaq 0x235f6(%rip), %rbp     # 0x5b6b0
movq (%rbp), %rax
notq %rax
andq %r12, %rax
cmpq %rax, %r12
je 0x38558
movq (%rax), %r13
cmpq %rax, %r12
je 0x38572
movq %r12, %rcx
subq %rax, %rcx
shrq $0xc, %rcx
leaq 0x2346e(%rip), %rdx     # 0x5b558
subq (%rdx), %rcx
movq 0x68(%rax,%rcx,8), %rax
movl %eax, %ecx
shrl $0x5, %ecx
movl $0xff, %edx
andl %edx, %ecx
cmpl %edx, %ecx
je 0x38592
movl %ecx, %eax
leaq 0xf731(%rip), %rcx      # 0x47840
movq (%rcx,%rax,8), %rax
negq %rax
lock
xaddq %rax, 0x58(%r13)
movq (%rbp), %rsi
notq %rsi
andq %r12, %rsi
movq %r12, %rcx
subq %rsi, %rcx
je 0x3857f
shrq $0xc, %rcx
leaq 0x2341b(%rip), %rax     # 0x5b558
movq %rcx, %rdx
subq (%rax), %rdx
movq 0x68(%rsi,%rdx,8), %rax
testb $0x2, %al
jne 0x385a6
testq %r15, %r15
je 0x385db
shrl $0x5, %eax
movzbl %al, %r13d
leaq 0x224bb(%rip), %rax     # 0x5a622
cmpb $0x1, (%rax)
je 0x385fb
movl %r13d, %eax
shll $0x5, %eax
leaq (%r15,%rax), %rbp
addq $0x20, %rbp
leaq 0x23c2b(%rip), %rax     # 0x5bdb0
movq (%rax), %rax
movl 0x10(%rbp), %r8d
cmpl (%rax,%r13,4), %r8d
je 0x3861d
movq 0x18(%rbp), %rax
movl %r8d, %ecx
movq %r12, (%rax,%rcx,8)
incl %r8d
movl %r8d, 0x10(%rbp)
movl 0x18(%r15), %eax
incl %eax
movl %eax, 0x18(%r15)
cmpl $0xd3, %eax
je 0x385eb
leaq 0x40(%r14), %rsi
movq %rbx, %rdi
callq 0x3eac6
leaq 0x234e0(%rip), %r13     # 0x5b6b0
movq (%r13), %rax
notq %rax
andq %r14, %rax
cmpq %r14, %rax
je 0x3847d
movq (%rax), %r12
cmpq %r14, %rax
je 0x38497
movq %r14, %rcx
subq %rax, %rcx
shrq $0xc, %rcx
leaq 0x23358(%rip), %rdx     # 0x5b558
subq (%rdx), %rcx
movq 0x68(%rax,%rcx,8), %rax
movl %eax, %ecx
shrl $0x5, %ecx
movl $0xff, %edx
andl %edx, %ecx
cmpl %edx, %ecx
je 0x384b7
movl %ecx, %eax
leaq 0xf61b(%rip), %rcx      # 0x47840
movq (%rcx,%rax,8), %rax
negq %rax
lock
xaddq %rax, 0x58(%r12)
movq (%r13), %rsi
notq %rsi
andq %r14, %rsi
cmpq %r14, %rsi
je 0x384a4
movq %r14, %rcx
subq %rsi, %rcx
shrq $0xc, %rcx
leaq 0x23301(%rip), %rax     # 0x5b558
movq %rcx, %rdx
subq (%rax), %rdx
movq 0x68(%rsi,%rdx,8), %rax
testb $0x2, %al
jne 0x384cb
testq %r15, %r15
je 0x38500
shrl $0x5, %eax
movzbl %al, %r12d
leaq 0x223a1(%rip), %rax     # 0x5a622
cmpb $0x1, (%rax)
je 0x38520
movl %r12d, %eax
shll $0x5, %eax
leaq (%r15,%rax), %r13
addq $0x20, %r13
leaq 0x23b11(%rip), %rax     # 0x5bdb0
movq (%rax), %rax
movl 0x10(%r13), %r8d
cmpl (%rax,%r12,4), %r8d
je 0x3853b
movq 0x18(%r13), %rax
movl %r8d, %ecx
movq %r14, (%rax,%rcx,8)
incl %r8d
movl %r8d, 0x10(%r13)
movl 0x18(%r15), %eax
incl %eax
movl %eax, 0x18(%r15)
cmpl $0xd3, %eax
je 0x38510
addq $0x808, %rsp            # imm = 0x808
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
andq $-0x2, %rsi
movq 0x28(%rsi), %rcx
testb $0x1, 0x30(%rcx)
jne 0x3840c
leaq 0x28(%rsi), %r8
orq $0x1, %rcx
movq %rcx, %rdi
movq %rsi, %rcx
jmp 0x38446
andq $-0x2, %r8
movq %r8, 0x28(%rsi)
movq %rsi, 0x30(%rdi)
movl 0x30(%rdx), %esi
orl %edi, %esi
andq $-0x2, %rdi
andl $0x1, %esi
orq 0x28(%rdi), %rsi
movq %rsi, 0x30(%rdx)
movq %rdx, 0x28(%rdi)
leaq 0x10(%rax), %rdx
cmpq %rcx, %rdx
je 0x383c1
cmpl $0x0, 0x8(%rax)
movq (%rax), %rax
jns 0x383b2
jmp 0x3846c
andq $-0x2, %r10
movq %r10, 0x30(%r9)
movq 0x30(%rdx), %r9
movq %r9, %rdi
andq $-0x2, %rdi
andl $0x1, %r9d
orq %rsi, %r9
movq %r9, 0x30(%rdx)
movq 0x30(%rdi), %r9
movq %r9, %r10
andq $-0x2, %r10
movq %r10, 0x28(%rsi)
andl $0x1, %r9d
orq %rsi, %r9
movq %r9, 0x30(%rdi)
movq 0x30(%rdx), %rsi
andl $0x1, %esi
leaq (%rsi,%rdi), %r9
movq %r9, 0x30(%rdx)
orq 0x28(%rdi), %rsi
movq %rdx, 0x28(%rdi)
movq %rsi, 0x30(%rdx)
cmpq %rcx, %r8
je 0x383c1
cmpl $0x0, 0x8(%rax)
js 0x38469
movq (%rax), %rax
movq 0x30(%rax), %rcx
andl $0x1, %ecx
orq %rdi, %rcx
jmp 0x37ed1
movq %rdi, 0x23440(%rip)     # 0x5b808
jmp 0x380a2
andq $-0x2, %r8
movq %r8, 0x30(%rsi)
orb $0x1, 0x30(%rdx)
andb $-0x2, 0x30(%rcx)
movq 0x30(%rdx), %rcx
movq %rcx, %rdi
andq $-0x2, %rdi
movq %rdi, 0x28(%rsi)
andl $0x1, %ecx
orq %rsi, %rcx
movq %rcx, 0x30(%rdx)
cmpl $0x0, 0x8(%rax)
js 0x38404
movq (%rax), %rax
jmp 0x37ec7
movq (%rax), %rax
jmp 0x38012
movq %rsi, 0x30(%rdx)
movq 0x30(%rcx), %rdi
movq %rdi, %r8
andq $-0x2, %r8
movq %r8, 0x28(%rsi)
andl $0x1, %edi
orq %rsi, %rdi
movq %rdi, 0x30(%rcx)
movq 0x30(%rdx), %rdi
andl $0x1, %edi
orq %rcx, %rdi
movq %rdi, 0x30(%rdx)
andq $-0x2, %rcx
leaq 0x28(%rcx), %r8
andl $0x1, %edi
orq 0x28(%rcx), %rdi
movq %rdx, (%r8)
movq %rdi, 0x30(%rdx)
cmpl $0x0, 0x8(%rax)
js 0x38475
movq (%rax), %rax
movq 0x30(%rax), %rdx
andl $0x1, %edx
orq %rcx, %rdx
movq %rdx, 0x30(%rax)
jmp 0x380a2
movq (%rax), %rax
movq %rdi, 0x28(%rax)
jmp 0x380a2
movq (%rax), %rax
jmp 0x37fed
movq %r14, %rdi
callq 0x36d3b
movq %rax, %r12
movq (%r13), %rax
notq %rax
andq %r14, %rax
jmp 0x381e6
movq %r14, %rdi
callq 0x36d46
jmp 0x38229
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x36925
jmp 0x382d7
shrq %rax
andq $-0x1000, %rax          # imm = 0xF000
addq $-0x1000, %rax          # imm = 0xF000
jmp 0x38229
testq %r15, %r15
je 0x384f0
shrq %rax
andq $-0x1000, %rax          # imm = 0xF000
leaq -0x1000(%rax), %r12
leaq 0x238f9(%rip), %rcx     # 0x5bde0
cmpq (%rcx), %r12
jbe 0x3863a
movq (%rsi), %rdi
movq %r14, %rdx
callq 0x299db
jmp 0x382d7
movq (%rsi), %rdi
movq %r14, %rdx
callq 0x298af
jmp 0x382d7
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3c7e1
jmp 0x382d7
leaq (%r12,%r12,2), %rsi
shll $0x5, %esi
addq 0x1faaa(%rip), %rsi     # 0x57fd8
movq %r14, %rdi
callq 0x2859f
jmp 0x3828a
shrl %r8d
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
movl %r12d, %ecx
callq 0x3c88f
movl 0x10(%r13), %r8d
jmp 0x382b0
movq %r12, %rdi
callq 0x36d3b
movq %rax, %r13
movq (%rbp), %rax
notq %rax
andq %r12, %rax
jmp 0x380d0
movq %r12, %rdi
callq 0x36d46
jmp 0x38113
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x36925
jmp 0x381bd
shrq %rax
andq $-0x1000, %rax          # imm = 0xF000
addq $-0x1000, %rax          # imm = 0xF000
jmp 0x38113
testq %r15, %r15
je 0x385cb
shrq %rax
andq $-0x1000, %rax          # imm = 0xF000
leaq -0x1000(%rax), %r13
leaq 0x2381e(%rip), %rcx     # 0x5bde0
cmpq (%rcx), %r13
jbe 0x386ac
movq (%rsi), %rdi
movq %r12, %rdx
callq 0x299db
jmp 0x381bd
movq (%rsi), %rdi
movq %r12, %rdx
callq 0x298af
jmp 0x381bd
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3c7e1
jmp 0x381bd
leaq (,%r13,2), %rsi
addq %r13, %rsi
shll $0x5, %esi
addq 0x1f9c8(%rip), %rsi     # 0x57fd8
movq %r12, %rdi
callq 0x2859f
jmp 0x38170
shrl %r8d
movq %rbx, %rdi
movq %r15, %rsi
movq %rbp, %rdx
movl %r13d, %ecx
callq 0x3c88f
movl 0x10(%rbp), %r8d
jmp 0x38196
cmpq $0x1000, %r12           # imm = 0x1000
ja 0x38717
addq $-0x1001, %rax          # imm = 0xEFFF
shrq $0x3, %rax
leaq 0xf968(%rip), %rcx      # 0x47fc0
movzbl (%rcx,%rax), %ebp
leaq 0x21fbf(%rip), %rax     # 0x5a622
cmpb $0x1, (%rax)
je 0x38726
movl %ebp, %eax
movq %rax, %rcx
shlq $0x5, %rcx
leaq (%r15,%rcx), %r12
addq $0x20, %r12
leaq 0x2372c(%rip), %rcx     # 0x5bdb0
movq (%rcx), %rdx
movl 0x10(%r12), %ecx
cmpl (%rdx,%rax,4), %ecx
je 0x38736
movq 0x18(%r12), %rax
movl %ecx, %edx
movq %r14, (%rax,%rdx,8)
incl %ecx
movl %ecx, 0x10(%r12)
jmp 0x382c2
cmpq $0x1000, %r13           # imm = 0x1000
ja 0x38752
addq $-0x1001, %rax          # imm = 0xEFFF
shrq $0x3, %rax
leaq 0xf8f6(%rip), %rcx      # 0x47fc0
movzbl (%rcx,%rax), %ebp
leaq 0x21f4d(%rip), %rax     # 0x5a622
cmpb $0x1, (%rax)
je 0x38761
movl %ebp, %eax
movq %rax, %rcx
shlq $0x5, %rcx
leaq (%r15,%rcx), %r13
addq $0x20, %r13
leaq 0x236ba(%rip), %rcx     # 0x5bdb0
movq (%rcx), %rdx
movl 0x10(%r13), %ecx
cmpl (%rdx,%rax,4), %ecx
je 0x38771
movq 0x18(%r13), %rax
movl %ecx, %edx
movq %r12, (%rax,%rdx,8)
incl %ecx
movl %ecx, 0x10(%r13)
jmp 0x381a8
movq %r12, %rdi
callq 0x38a8d
movl %eax, %ebp
jmp 0x3865c
movq %r14, %rdi
movq %r12, %rsi
callq 0x298b4
jmp 0x3866c
shrl %ecx
movq %rbx, %rdi
movq %r12, %rsi
movl %ebp, %edx
movq %r15, %r8
callq 0x3ca47
movl 0x10(%r12), %ecx
jmp 0x38695
movq %r13, %rdi
callq 0x38a8d
movl %eax, %ebp
jmp 0x386ce
movq %r12, %rdi
movq %r13, %rsi
callq 0x298b4
jmp 0x386de
shrl %ecx
movq %rbx, %rdi
movq %r13, %rsi
movl %ebp, %edx
movq %r15, %r8
callq 0x3ca47
movl 0x10(%r13), %ecx
jmp 0x38702