	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dlclose_locked
_dlclose_locked:                        ## @dlclose_locked
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	callq	_dlcheck
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	_UTRACE_DLCLOSE_START@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%rbx), %r8d
	movq	16(%rbx), %r9
	movq	%r15, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_LD_UTRACE
	decl	8(%rbx)
	cmpl	$1, (%rbx)
	jne	LBB0_4
## %bb.3:
	movq	_list_fini@GOTPCREL(%rip), %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	_objlist_call_fini
	movq	%rbx, %rdi
	callq	_unref_dag
	movq	_RT_DELETE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	addq	$4, %rsi
	callq	_GDB_STATE
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_unload_object
	movq	_RT_CONSISTENT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_GDB_STATE
	jmp	LBB0_5
LBB0_1:
	movl	$-1, %ebx
	jmp	LBB0_6
LBB0_4:
	movq	%rbx, %rdi
	callq	_unref_dag
LBB0_5:
	movq	_UTRACE_DLCLOSE_STOP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%ebx, %ebx
	movq	%r15, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_LD_UTRACE
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UTRACE_DLCLOSE_START,4,2       ## @UTRACE_DLCLOSE_START
	.comm	_list_fini,4,2                  ## @list_fini
	.comm	_RT_DELETE,4,2                  ## @RT_DELETE
	.comm	_RT_CONSISTENT,4,2              ## @RT_CONSISTENT
	.comm	_UTRACE_DLCLOSE_STOP,4,2        ## @UTRACE_DLCLOSE_STOP
	.no_dead_strip	_dlclose_locked
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dlclose_locked
_dlclose_locked:                        ; @dlclose_locked
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
	bl	_dlcheck
	cbz	x0, LBB0_3
; %bb.1:
	mov	x21, x0
Lloh0:
	adrp	x8, _UTRACE_DLCLOSE_START@GOTPAGE
Lloh1:
	ldr	x8, [x8, _UTRACE_DLCLOSE_START@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w4, [x21, #8]
	ldr	x5, [x21, #16]
	mov	x1, x19
	mov	x2, #0
	mov	w3, #0
	bl	_LD_UTRACE
	ldr	w8, [x21, #8]
	sub	w8, w8, #1
	str	w8, [x21, #8]
	ldr	w8, [x21]
	cmp	w8, #1
	b.ne	LBB0_4
; %bb.2:
Lloh3:
	adrp	x0, _list_fini@GOTPAGE
Lloh4:
	ldr	x0, [x0, _list_fini@GOTPAGEOFF]
	mov	x1, x21
	mov	x2, x20
	bl	_objlist_call_fini
	mov	x0, x21
	bl	_unref_dag
Lloh5:
	adrp	x8, _RT_DELETE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RT_DELETE@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	add	x1, x21, #4
	bl	_GDB_STATE
	mov	x0, x21
	mov	x1, x20
	bl	_unload_object
Lloh8:
	adrp	x8, _RT_CONSISTENT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RT_CONSISTENT@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	mov	x1, #0
	bl	_GDB_STATE
	b	LBB0_5
LBB0_3:
	mov	w0, #-1
	b	LBB0_6
LBB0_4:
	mov	x0, x21
	bl	_unref_dag
LBB0_5:
Lloh11:
	adrp	x8, _UTRACE_DLCLOSE_STOP@GOTPAGE
Lloh12:
	ldr	x8, [x8, _UTRACE_DLCLOSE_STOP@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	mov	x1, x19
	mov	x2, #0
	mov	w3, #0
	mov	w4, #0
	mov	x5, #0
	bl	_LD_UTRACE
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_UTRACE_DLCLOSE_START,4,2       ; @UTRACE_DLCLOSE_START
	.comm	_list_fini,4,2                  ; @list_fini
	.comm	_RT_DELETE,4,2                  ; @RT_DELETE
	.comm	_RT_CONSISTENT,4,2              ; @RT_CONSISTENT
	.comm	_UTRACE_DLCLOSE_STOP,4,2        ; @UTRACE_DLCLOSE_STOP
	.no_dead_strip	_dlclose_locked
.subsections_via_symbols
