// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/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 $0x818, %rsp            # imm = 0x818
movq %rsi, %r14
movq %rdi, %r11
movq 0x3aa1f(%rip), %rdi     # 0x847f8
movq %rdi, 0x10(%rsp)
leaq 0x3aa1b(%rip), %rcx     # 0x84800
cmpq %rcx, %rdi
je 0x49e8d
movq 0x8(%r14), %rsi
leaq 0x10(%rsp), %rax
xorl %edx, %edx
xorl %r8d, %r8d
cmpq 0x8(%rdi), %rsi
seta %r8b
sbbl $0x0, %r8d
jne 0x49e1d
movq 0x10(%r14), %r9
xorl %r8d, %r8d
cmpq 0x10(%rdi), %r9
seta %r8b
sbbl $0x0, %r8d
movl %r8d, 0x8(%rax)
testl %r8d, %r8d
js 0x49e5f
movq 0x30(%rdi), %r9
andq $-0x2, %r9
movq %r9, 0x10(%rax)
movb $0x1, %r10b
testl %r8d, %r8d
jne 0x49e75
leaq 0x10(%rax), %rdi
movl $0x1, 0x8(%rax)
cmpq %rcx, %r9
je 0x49e6c
movl $0xffffffff, 0x8(%rdi)  # imm = 0xFFFFFFFF
movq 0x28(%r9), %r9
movq %r9, 0x10(%rdi)
addq $0x10, %rdi
jmp 0x49e45
movq 0x28(%rdi), %rdi
movq %rdi, 0x10(%rax)
movb $0x1, %r10b
jmp 0x49e75
xorl %r10d, %r10d
movq %rax, %rdx
movq %rdi, %rax
testb %r10b, %r10b
je 0x49e94
movq 0x10(%rax), %rdi
addq $0x10, %rax
cmpq %rcx, %rdi
jne 0x49df9
jmp 0x49e94
leaq 0x10(%rsp), %rax
xorl %edx, %edx
leaq -0x10(%rax), %rsi
movq -0x10(%rax), %rdi
cmpq %r14, %rdi
je 0x49f13
movq 0x30(%rdi), %r8
movl %r8d, %r9d
andl $0x1, %r9d
andq $-0x2, %r8
movq 0x30(%r14), %r10
andl $0x1, %r10d
orq %r10, %r8
movq %r8, 0x30(%rdi)
movq 0x28(%r14), %r8
movq %r8, 0x28(%rdi)
movq 0x30(%r14), %r8
andq $-0x2, %r8
orq %r10, %r8
movq %r8, 0x30(%rdi)
movq 0x30(%r14), %r8
andq $-0x2, %r8
orq %r9, %r8
movq %r8, 0x30(%r14)
movq %rdi, (%rdx)
movq %r14, (%rsi)
leaq 0x10(%rsp), %rdi
cmpq %rdi, %rdx
je 0x49f4f
cmpl $0x0, -0x8(%rdx)
movq (%rdx), %rdi
js 0x49f5b
movq -0x10(%rdx), %rdx
movq 0x30(%rdx), %r8
andl $0x1, %r8d
orq %rdi, %r8
movq %r8, 0x30(%rdx)
jmp 0x49f73
movq 0x28(%r14), %rdx
cmpq %rcx, %rdx
je 0x49f65
andb $-0x2, 0x30(%rdx)
leaq 0x10(%rsp), %rcx
cmpq %rcx, %rsi
je 0x4a20f
cmpl $0x0, -0x18(%rax)
js 0x4a11f
movq -0x20(%rax), %rax
movq 0x30(%rax), %rcx
andl $0x1, %ecx
orq %rdx, %rcx
movq %rcx, 0x30(%rax)
jmp 0x4a216
movq (%rdx), %rdx
movq %rdx, 0x3a89f(%rip)     # 0x847f8
jmp 0x49f73
movq -0x10(%rdx), %rdx
movq %rdi, 0x28(%rdx)
jmp 0x49f73
leaq 0x10(%rsp), %rdx
cmpq %rdx, %rsi
je 0x4a12c
movq (%rsi), %rdx
testb $0x1, 0x30(%rdx)
jne 0x4a112
movq %rcx, -0x10(%rax)
leaq -0x20(%rax), %rdx
leaq 0x10(%rsp), %rcx
cmpq %rcx, %rdx
jb 0x4a101
addq $-0x30, %rax
leaq 0x10(%rax), %rsi
cmpl $0x0, 0x18(%rax)
movq 0x20(%rax), %r8
js 0x49ff1
movq (%rsi), %rdi
movq 0x28(%rdi), %rdx
movq 0x30(%rdi), %r10
andl $0x1, %r10d
orq %r8, %r10
movq %r10, 0x30(%rdi)
movq 0x30(%rdx), %r9
testb $0x1, %r9b
jne 0x4a138
testb $0x1, %r10b
jne 0x4a168
movq 0x28(%rdx), %r10
movq 0x30(%r10), %r8
testb $0x1, %r8b
jne 0x4a028
orq $0x1, %r9
movq %r9, 0x30(%rdx)
jmp 0x4a0cf
movq (%rsi), %rdx
movq %r8, 0x28(%rdx)
movq 0x30(%rdx), %r9
testb $0x1, %r9b
jne 0x4a187
movq 0x28(%r9), %r8
movq 0x30(%r8), %rdi
testb $0x1, %dil
jne 0x4a06b
orq $0x1, %r8
movq %r8, 0x30(%rdx)
movq %rdx, 0x28(%r9)
movq %r9, (%rsi)
jmp 0x4a0e7
movq %r8, %r9
andq $-0x2, %r9
movq %r9, 0x30(%r10)
movq 0x30(%rdx), %r9
movq %r9, %r10
andq $-0x2, %r10
movq %r10, 0x28(%rdi)
andl $0x1, %r9d
orq %rdi, %r9
movq %r9, 0x30(%rdx)
cmpq %rcx, %rsi
je 0x4a0bf
cmpl $0x0, 0x8(%rax)
js 0x4a0c8
movq (%rax), %rsi
movq 0x30(%rsi), %rdi
andl $0x1, %edi
orq %rdx, %rdi
movq %rdi, 0x30(%rsi)
jmp 0x4a0cf
movq %rdi, %r10
andq $-0x2, %r10
movq %r10, 0x30(%r8)
movq %r10, 0x28(%r9)
movq %r9, 0x30(%r8)
movq 0x30(%rdx), %r9
andl $0x1, %r9d
orq %r8, %r9
movq %r9, 0x30(%rdx)
andq $-0x2, %r8
andl $0x1, %r9d
orq 0x28(%r8), %r9
movq %r9, 0x30(%rdx)
movq %rdx, 0x28(%r8)
cmpq %rcx, %rsi
je 0x4a0da
cmpl $0x0, 0x8(%rax)
movq (%rax), %rdx
js 0x4a0e3
movq 0x30(%rdx), %rsi
andl $0x1, %esi
orq %r8, %rsi
movq %rsi, 0x30(%rdx)
jmp 0x4a0e7
movq %rdx, 0x3a732(%rip)     # 0x847f8
jmp 0x4a0cf
movq (%rax), %rsi
movq %rdx, 0x28(%rsi)
testb $0x1, %r8b
je 0x4a0f1
jmp 0x4a216
movq %r8, 0x3a717(%rip)      # 0x847f8
jmp 0x4a0e7
movq %r8, 0x28(%rdx)
testb $0x1, %dil
jne 0x4a216
leaq -0x10(%rax), %rdx
cmpq %rcx, %rax
movq %rdx, %rax
jae 0x49f9a
movq 0x10(%rsp), %rax
movq %rax, 0x3a6eb(%rip)     # 0x847f8
jmp 0x4a216
movq -0x20(%rax), %rax
movq %rcx, 0x28(%rax)
jmp 0x4a216
movq -0x20(%rax), %rax
movq %rdx, 0x28(%rax)
jmp 0x4a216
movq %rcx, 0x3a6c5(%rip)     # 0x847f8
jmp 0x4a216
andq $-0x2, %r9
movq 0x28(%r9), %r8
movq 0x30(%r8), %r10
testb $0x1, %r10b
jne 0x4a1ac
orb $0x1, 0x30(%r9)
movq 0x30(%rdx), %r8
andq $-0x2, %r8
movq %r8, 0x28(%rdi)
andq $-0x2, %rdi
movq %rdi, 0x30(%rdx)
jmp 0x4a206
movq 0x28(%rdx), %rcx
testb $0x1, 0x30(%rcx)
jne 0x4a47e
orq $0x1, %r9
movq %r9, 0x30(%rdx)
andb $-0x2, 0x30(%rdi)
jmp 0x4a216
andq $-0x2, %r9
movq 0x28(%r9), %rcx
testb $0x1, 0x30(%rcx)
jne 0x4a4bd
leaq 0x28(%r9), %rdi
orq $0x1, %rcx
movq %rcx, %rsi
movq %r9, %rcx
jmp 0x4a4f7
andq $-0x2, %r10
movq %r10, 0x30(%r8)
movq 0x30(%rdx), %r9
movq %r9, %r8
andq $-0x2, %r8
movq %r8, 0x28(%rdi)
andl $0x1, %r9d
orq %rdi, %r9
movq %r9, 0x30(%rdx)
movq 0x30(%r8), %r9
movq %r9, %r10
andq $-0x2, %r10
movq %r10, 0x28(%rdi)
andl $0x1, %r9d
orq %rdi, %r9
movq %r9, 0x30(%r8)
movq 0x30(%rdx), %rdi
andl $0x1, %edi
leaq (%rdi,%r8), %r9
movq %r9, 0x30(%rdx)
orq 0x28(%r8), %rdi
movq %rdi, 0x30(%rdx)
movq %rdx, 0x28(%r8)
movq %r8, %rdx
cmpq %rcx, %rsi
jne 0x4a4a7
movq %rdx, 0x3a5e2(%rip)     # 0x847f8
movq 0x8(%r11), %r15
movq 0x18(%r14), %r12
testq %r12, %r12
movq %r11, 0x8(%rsp)
je 0x4a33e
leaq 0x3a46d(%rip), %rbp     # 0x846a0
movq (%rbp), %rax
notq %rax
andq %r12, %rax
cmpq %rax, %r12
je 0x4a5ef
movq (%rax), %r13
movq (%rbp), %rax
notq %rax
andq %r12, %rax
movq %r12, %rcx
subq %rax, %rcx
je 0x4a604
shrq $0xc, %rcx
leaq 0x3a2de(%rip), %rdx     # 0x84548
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 0x4a626
movl %ecx, %eax
leaq 0xedf1(%rip), %rcx      # 0x59080
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 0x4a616
shrq $0xc, %rcx
leaq 0x3a28b(%rip), %rax     # 0x84548
movq %rcx, %rdx
subq (%rax), %rdx
movq 0x68(%rsi,%rdx,8), %rax
testb $0x2, %al
jne 0x4a63a
testq %r15, %r15
je 0x4a66c
shrl $0x5, %eax
movzbl %al, %ebp
leaq 0x3944c(%rip), %rax     # 0x83732
cmpb $0x1, (%rax)
movl %ebp, %ebx
je 0x4a68e
movl %ebp, %eax
shll $0x5, %eax
leaq (%r15,%rax), %r13
addq $0x20, %r13
leaq 0x3aa9b(%rip), %rax     # 0x84da0
movq (%rax), %rax
movl (%rax,%rbx,4), %r8d
cmpl %r8d, 0x10(%r13)
je 0x4a6ae
movq 0x18(%r13), %rax
movl 0x10(%r13), %ecx
movq %r12, (%rax,%rcx,8)
leal 0x1(%rcx), %eax
movl %eax, 0x10(%r13)
movl 0x18(%r15), %eax
incl %eax
movl %eax, 0x18(%r15)
cmpl $0xe4, %eax
je 0x4a679
leaq 0x40(%r14), %rsi
movq %r11, %rdi
callq 0x50af7
leaq 0x3a34f(%rip), %r13     # 0x846a0
movq (%r13), %rax
notq %rax
andq %r14, %rax
cmpq %r14, %rax
je 0x4a522
movq (%rax), %r12
movq (%r13), %rax
notq %rax
andq %r14, %rax
cmpq %r14, %rax
je 0x4a532
movq %r14, %rcx
subq %rax, %rcx
shrq $0xc, %rcx
leaq 0x3a1bd(%rip), %rdx     # 0x84548
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 0x4a54f
movl %ecx, %eax
leaq 0xecd0(%rip), %rcx      # 0x59080
movq (%rcx,%rax,8), %rax
movq 0x8(%rsp), %rdi
negq %rax
lock
xaddq %rax, 0x58(%r12)
movq (%r13), %rsi
notq %rsi
andq %r14, %rsi
cmpq %r14, %rsi
je 0x4a53f
movq %r14, %rcx
subq %rsi, %rcx
shrq $0xc, %rcx
leaq 0x3a161(%rip), %rax     # 0x84548
movq %rcx, %rdx
subq (%rax), %rdx
movq 0x68(%rsi,%rdx,8), %rax
testb $0x2, %al
jne 0x4a563
testq %r15, %r15
je 0x4a598
shrl $0x5, %eax
movzbl %al, %ebp
leaq 0x39322(%rip), %rax     # 0x83732
cmpb $0x1, (%rax)
movl %ebp, %ebx
je 0x4a5b5
movl %ebp, %eax
shll $0x5, %eax
leaq (%r15,%rax), %r12
addq $0x20, %r12
leaq 0x3a971(%rip), %rax     # 0x84da0
movq (%rax), %rax
movl (%rax,%rbx,4), %r8d
cmpl %r8d, 0x10(%r12)
je 0x4a5d5
movq 0x18(%r12), %rax
movl 0x10(%r12), %ecx
movq %r14, (%rax,%rcx,8)
leal 0x1(%rcx), %eax
movl %eax, 0x10(%r12)
movl 0x18(%r15), %eax
incl %eax
movl %eax, 0x18(%r15)
cmpl $0xe4, %eax
je 0x4a5a8
addq $0x818, %rsp            # imm = 0x818
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
andq $-0x2, %r8
movq %r8, 0x30(%rdi)
orb $0x1, 0x30(%rdx)
andb $-0x2, 0x30(%rcx)
movq 0x30(%rdx), %rcx
movq %rcx, %rsi
andq $-0x2, %rsi
movq %rsi, 0x28(%rdi)
andl $0x1, %ecx
orq %rdi, %rcx
movq %rcx, 0x30(%rdx)
cmpl $0x0, 0x8(%rax)
js 0x4a4b5
movq (%rax), %rax
jmp 0x49f3c
movq (%rax), %rax
jmp 0x4a123
movq %r9, 0x30(%rdx)
movq 0x30(%rcx), %rsi
movq %rsi, %rdi
andq $-0x2, %rdi
movq %rdi, 0x28(%r9)
andl $0x1, %esi
orq %r9, %rsi
movq %rsi, 0x30(%rcx)
movq 0x30(%rdx), %rsi
andl $0x1, %esi
orq %rcx, %rsi
movq %rsi, 0x30(%rdx)
andq $-0x2, %rcx
leaq 0x28(%rcx), %rdi
andl $0x1, %esi
orq 0x28(%rcx), %rsi
movq %rsi, 0x30(%rdx)
movq %rdx, (%rdi)
cmpl $0x0, 0x8(%rax)
js 0x4a51a
movq (%rax), %rax
movq 0x30(%rax), %rdx
andl $0x1, %edx
orq %rcx, %rdx
movq %rdx, 0x30(%rax)
jmp 0x4a216
movq (%rax), %rax
jmp 0x4a116
movq %r14, %rdi
callq 0x48ccc
movq %rax, %r12
jmp 0x4a367
movq %r14, %rdi
callq 0x48cd7
jmp 0x4a3b4
movq %r14, %rsi
movq %r15, %rdx
callq 0x488cb
jmp 0x4a46c
shrq %rax
andq $-0x1000, %rax          # imm = 0xF000
addq $-0x1000, %rax          # imm = 0xF000
jmp 0x4a3b4
testq %r15, %r15
je 0x4a588
shrq %rax
andq $-0x1000, %rax          # imm = 0xF000
leaq -0x1000(%rax), %r12
leaq 0x3a851(%rip), %rcx     # 0x84dd0
cmpq (%rcx), %r12
jbe 0x4a6cb
movq (%rsi), %rdi
movq %r14, %rdx
callq 0x3bb14
jmp 0x4a46c
movq (%rsi), %rdi
movq %r14, %rdx
callq 0x3b9e8
jmp 0x4a46c
movq %r15, %rsi
callq 0x4e7cd
jmp 0x4a46c
leaq (%rbx,%rbx,2), %rsi
shll $0x5, %esi
addq 0x23a05(%rip), %rsi     # 0x6dfc8
movq %r14, %rdi
callq 0x3b00b
movq 0x8(%rsp), %rdi
jmp 0x4a41b
shrl %r8d
movq %r15, %rsi
movq %r12, %rdx
movl %ebp, %ecx
callq 0x4e87e
movq 0x8(%rsp), %rdi
jmp 0x4a441
movq %r12, %rdi
callq 0x48ccc
movq 0x8(%rsp), %r11
movq %rax, %r13
jmp 0x4a249
movq %r12, %rdi
callq 0x48cd7
movq 0x8(%rsp), %r11
jmp 0x4a293
movq %r11, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x488cb
jmp 0x4a684
shrq %rax
andq $-0x1000, %rax          # imm = 0xF000
addq $-0x1000, %rax          # imm = 0xF000
jmp 0x4a293
testq %r15, %r15
je 0x4a65f
shrq %rax
andq $-0x1000, %rax          # imm = 0xF000
leaq -0x1000(%rax), %r13
leaq 0x3a77a(%rip), %rcx     # 0x84dd0
cmpq (%rcx), %r13
jbe 0x4a737
movq (%rsi), %rdi
movq %r12, %rdx
callq 0x3bb14
jmp 0x4a684
movq (%rsi), %rdi
movq %r12, %rdx
callq 0x3b9e8
jmp 0x4a684
movq %r11, %rdi
movq %r15, %rsi
callq 0x4e7cd
movq 0x8(%rsp), %r11
jmp 0x4a33e
leaq (%rbx,%rbx,2), %rsi
shll $0x5, %esi
addq 0x2392c(%rip), %rsi     # 0x6dfc8
movq %r12, %rdi
callq 0x3b00b
movq 0x8(%rsp), %r11
jmp 0x4a2f1
shrl %r8d
movq %r11, %rdi
movq %r15, %rsi
movq %r13, %rdx
movl %ebp, %ecx
callq 0x4e87e
movq 0x8(%rsp), %r11
jmp 0x4a316
cmpq $0x1000, %r12           # imm = 0x1000
ja 0x4a7a1
addq $-0x1001, %rax          # imm = 0xEFFF
shrq $0x3, %rax
leaq 0xf117(%rip), %rcx      # 0x59800
movzbl (%rcx,%rax), %ebp
leaq 0x3903e(%rip), %rax     # 0x83732
cmpb $0x1, (%rax)
je 0x4a7b5
movl %ebp, %eax
leaq 0x3a69a(%rip), %rcx     # 0x84da0
movq (%rcx), %rcx
movl (%rcx,%rax,4), %ecx
shlq $0x5, %rax
leaq (%r15,%rax), %r12
addq $0x20, %r12
cmpl %ecx, 0x10(%r12)
jne 0x4a441
shrl %ecx
movq %r12, %rsi
movl %ebp, %edx
movq %r15, %r8
callq 0x4ea32
jmp 0x4a5e5
cmpq $0x1000, %r13           # imm = 0x1000
ja 0x4a7ca
addq $-0x1001, %rax          # imm = 0xEFFF
shrq $0x3, %rax
leaq 0xf0ab(%rip), %rcx      # 0x59800
movzbl (%rcx,%rax), %ebp
leaq 0x38fd2(%rip), %rax     # 0x83732
cmpb $0x1, (%rax)
je 0x4a7de
movl %ebp, %eax
leaq 0x3a632(%rip), %rcx     # 0x84da0
movq (%rcx), %rcx
movl (%rcx,%rax,4), %ecx
shlq $0x5, %rax
leaq (%r15,%rax), %r13
addq $0x20, %r13
cmpl %ecx, 0x10(%r13)
jne 0x4a316
shrl %ecx
movq %r11, %rdi
movq %r13, %rsi
movl %ebp, %edx
movq %r15, %r8
callq 0x4ea32
jmp 0x4a6c1
movq %r12, %rdi
callq 0x4aaf4
movq 0x8(%rsp), %rdi
movl %eax, %ebp
jmp 0x4a6ed
movq %r14, %rdi
movq %r12, %rsi
callq 0x3b9ed
movq 0x8(%rsp), %rdi
jmp 0x4a6fd
movq %r13, %rdi
callq 0x4aaf4
movq 0x8(%rsp), %r11
movl %eax, %ebp
jmp 0x4a759
movq %r12, %rdi
movq %r13, %rsi
callq 0x3b9ed
movq 0x8(%rsp), %r11
jmp 0x4a765