	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function prof_tctx_destroy
_prof_tctx_destroy:                     ## @prof_tctx_destroy
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	8(%rsi), %r15
	movq	48(%rsi), %r12
	callq	_tsd_tsdn
	movq	8(%rbx), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_malloc_mutex_assert_owner
	xorl	%edi, %edi
	cmpq	$0, 16(%rbx)
	sete	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpq	$0, 24(%rbx)
	sete	%dil
	callq	_assert
	movq	_opt_prof_accum@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	$0, (%rax)
	sete	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpq	$0, 32(%rbx)
	sete	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpq	$0, 40(%rbx)
	sete	%dil
	callq	_assert
	leaq	4(%r15), %rsi
	leaq	12(%r12), %rdx
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_ckh_remove
	movq	%r14, %rdi
	callq	_tsd_tsdn
	movl	%eax, %edi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_prof_tdata_should_destroy
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	callq	_tsd_tsdn
	movl	(%r15), %esi
	movl	%eax, %edi
	callq	_malloc_mutex_unlock
	movq	%r14, %rdi
	callq	_tsd_tsdn
	movl	(%r12), %esi
	movl	%eax, %edi
	callq	_malloc_mutex_lock
	movl	(%rbx), %eax
	cmpl	$129, %eax
	je	LBB0_5
## %bb.1:
	cmpl	$128, %eax
	jne	LBB0_6
## %bb.2:
	leaq	8(%r12), %rdi
	movq	%rbx, %rsi
	callq	_tctx_tree_remove
	movq	%r12, %rdi
	callq	_prof_gctx_should_destroy
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	incl	4(%r12)
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	xorl	%r13d, %r13d
	jmp	LBB0_8
LBB0_5:
	movq	_prof_tctx_state_purgatory@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	jmp	LBB0_7
LBB0_6:
	xorl	%eax, %eax
	callq	_not_reached
LBB0_7:
	movb	$1, %al
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movb	$1, %r13b
LBB0_8:
	movq	%r14, %rdi
	callq	_tsd_tsdn
	movl	(%r12), %esi
	movl	%eax, %edi
	callq	_malloc_mutex_unlock
	testb	%r13b, %r13b
	jne	LBB0_10
## %bb.9:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_prof_tdata_get
	movq	%r14, %rdi
	movl	%eax, %esi
	movq	%r12, %rdx
	movq	%r15, %rcx
	callq	_prof_gctx_try_destroy
LBB0_10:
	movq	%r14, %rdi
	callq	_tsd_tsdn
	movq	8(%rbx), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_malloc_mutex_assert_not_owner
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_12
## %bb.11:
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_prof_tdata_destroy
LBB0_12:
	cmpb	$0, -44(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_14
## %bb.13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	%r14, %rdi
	callq	_tsd_tsdn
	movl	%eax, %edi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	$1, %r8d
	movl	$1, %r9d
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_idalloctm                      ## TAILCALL
LBB0_3:
	movb	$1, %r13b
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_opt_prof_accum,4,2             ## @opt_prof_accum
	.comm	_prof_tctx_state_purgatory,4,2  ## @prof_tctx_state_purgatory
	.no_dead_strip	_prof_tctx_destroy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function prof_tctx_destroy
_prof_tctx_destroy:                     ; @prof_tctx_destroy
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x20, x0
	ldr	x21, [x1, #8]
	ldr	x22, [x1, #48]
	bl	_tsd_tsdn
	ldr	x8, [x19, #8]
	ldr	w1, [x8]
	bl	_malloc_mutex_assert_owner
	ldr	x8, [x19, #16]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	ldr	x8, [x19, #24]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
Lloh0:
	adrp	x8, _opt_prof_accum@GOTPAGE
Lloh1:
	ldr	x8, [x8, _opt_prof_accum@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #0
	cset	w0, eq
	bl	_assert
	ldr	x8, [x19, #32]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	ldr	x8, [x19, #40]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	add	x1, x21, #4
	add	x2, x22, #12
	mov	x0, x20
	mov	x3, #0
	mov	x4, #0
	bl	_ckh_remove
	mov	x0, x20
	bl	_tsd_tsdn
	mov	x1, x21
	mov	w2, #0
	bl	_prof_tdata_should_destroy
	mov	x23, x0
	mov	x0, x20
	bl	_tsd_tsdn
	ldr	w1, [x21]
	bl	_malloc_mutex_unlock
	mov	x0, x20
	bl	_tsd_tsdn
	ldr	w1, [x22]
	bl	_malloc_mutex_lock
	ldr	w8, [x19]
	cmp	w8, #129
	b.eq	LBB0_4
; %bb.1:
	cmp	w8, #128
	b.ne	LBB0_5
; %bb.2:
	add	x0, x22, #8
	mov	x1, x19
	bl	_tctx_tree_remove
	mov	x0, x22
	bl	_prof_gctx_should_destroy
	mov	w24, #0
	cbz	w0, LBB0_7
; %bb.3:
	mov	w25, #0
	ldr	w8, [x22, #4]
	add	w8, w8, #1
	str	w8, [x22, #4]
	b	LBB0_8
LBB0_4:
Lloh3:
	adrp	x8, _prof_tctx_state_purgatory@GOTPAGE
Lloh4:
	ldr	x8, [x8, _prof_tctx_state_purgatory@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19]
	b	LBB0_6
LBB0_5:
	bl	_not_reached
LBB0_6:
	mov	w24, #1
LBB0_7:
	mov	w25, #1
LBB0_8:
	mov	x0, x20
	bl	_tsd_tsdn
	ldr	w1, [x22]
	bl	_malloc_mutex_unlock
	tbnz	w25, #0, LBB0_10
; %bb.9:
	mov	x0, x20
	mov	w1, #0
	bl	_prof_tdata_get
	mov	x1, x0
	mov	x0, x20
	mov	x2, x22
	mov	x3, x21
	bl	_prof_gctx_try_destroy
LBB0_10:
	mov	x0, x20
	bl	_tsd_tsdn
	ldr	x8, [x19, #8]
	ldr	w1, [x8]
	bl	_malloc_mutex_assert_not_owner
	cbz	w23, LBB0_12
; %bb.11:
	mov	x0, x20
	mov	x1, x21
	mov	w2, #0
	bl	_prof_tdata_destroy
LBB0_12:
	tbz	w24, #0, LBB0_14
; %bb.13:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_14:
	mov	x0, x20
	bl	_tsd_tsdn
	mov	x1, x19
	mov	x2, #0
	mov	x3, #0
	mov	w4, #1
	mov	w5, #1
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_idalloctm
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_opt_prof_accum,4,2             ; @opt_prof_accum
	.comm	_prof_tctx_state_purgatory,4,2  ; @prof_tctx_state_purgatory
	.no_dead_strip	_prof_tctx_destroy
.subsections_via_symbols
