	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function prof_gctx_finish
_prof_gctx_finish:                      ## @prof_gctx_finish
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r13
	xorl	%esi, %esi
	callq	_prof_tdata_get
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_gctx_tree_first
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	%rax, %rbx
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	callq	_tsd_tsdn
	movl	(%rbx), %esi
	movq	%rax, %rdi
	callq	_malloc_mutex_unlock
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_gctx_tree_first
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_9
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_gctx_tree_remove
	movq	%r13, %rdi
	callq	_tsd_tsdn
	movl	(%rbx), %esi
	movq	%rax, %rdi
	callq	_malloc_mutex_lock
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	leaq	8(%rbx), %r12
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	_prof_tctx_finish_iter@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r13, %rdi
	callq	_tsd_tsdn
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	movq	%rax, %rcx
	callq	_tctx_tree_iter
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=2
	movq	%rax, %r14
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_tctx_tree_next
	movq	%rax, %r15
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_tctx_tree_remove
	movq	%r13, %rdi
	callq	_tsd_tsdn
	movq	%rax, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	$1, %r8d
	movl	$1, %r9d
	callq	_idalloctm
	testq	%r15, %r15
	jne	LBB0_3
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	decl	4(%rbx)
	movq	%rbx, %rdi
	callq	_prof_gctx_should_destroy
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	4(%rbx)
	movq	%r13, %rdi
	callq	_tsd_tsdn
	movl	(%rbx), %esi
	movq	%rax, %rdi
	callq	_malloc_mutex_unlock
	movq	%r13, %rdi
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, %rsi
	movq	%rbx, %rdx
	callq	_prof_gctx_try_destroy
	jmp	LBB0_8
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_prof_tctx_finish_iter,4,2      ## @prof_tctx_finish_iter
	.no_dead_strip	_prof_gctx_finish
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function prof_gctx_finish
_prof_gctx_finish:                      ; @prof_gctx_finish
	.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
	mov	w1, #0
	bl	_prof_tdata_get
	mov	x21, x0
	mov	x0, x19
	bl	_gctx_tree_first
	cbz	x0, LBB0_9
; %bb.1:
	mov	x22, x0
Lloh0:
	adrp	x26, _prof_tctx_finish_iter@GOTPAGE
Lloh1:
	ldr	x26, [x26, _prof_tctx_finish_iter@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	bl	_tsd_tsdn
	ldr	w1, [x22]
	bl	_malloc_mutex_unlock
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_gctx_tree_first
	mov	x22, x0
	cbz	x0, LBB0_9
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	mov	x0, x19
	mov	x1, x22
	bl	_gctx_tree_remove
	mov	x0, x20
	bl	_tsd_tsdn
	mov	x23, x22
	ldr	w1, [x23], #8
	bl	_malloc_mutex_lock
	mov	x24, #0
LBB0_5:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w25, [x26]
	mov	x0, x20
	bl	_tsd_tsdn
	mov	x3, x0
	mov	x0, x23
	mov	x1, x24
	mov	x2, x25
	bl	_tctx_tree_iter
	cbz	x0, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	mov	x25, x0
	mov	x0, x23
	mov	x1, x25
	bl	_tctx_tree_next
	mov	x24, x0
	mov	x0, x23
	mov	x1, x25
	bl	_tctx_tree_remove
	mov	x0, x20
	bl	_tsd_tsdn
	mov	x1, x25
	mov	x2, #0
	mov	x3, #0
	mov	w4, #1
	mov	w5, #1
	bl	_idalloctm
	cbnz	x24, LBB0_5
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x22, #4]
	sub	w8, w8, #1
	str	w8, [x22, #4]
	mov	x0, x22
	bl	_prof_gctx_should_destroy
	cbz	x0, LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x22, #4]
	add	w8, w8, #1
	str	w8, [x22, #4]
	mov	x0, x20
	bl	_tsd_tsdn
	ldr	w1, [x22]
	bl	_malloc_mutex_unlock
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	mov	x3, x21
	bl	_prof_gctx_try_destroy
	b	LBB0_3
LBB0_9:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_prof_tctx_finish_iter,4,2      ; @prof_tctx_finish_iter
	.no_dead_strip	_prof_gctx_finish
.subsections_via_symbols
