	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_unload_dll
_handle_unload_dll:                     ## @handle_unload_dll
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_current_event@GOTPCREL(%rip), %rax
	movl	$4096, %esi                     ## imm = 0x1000
	addq	(%rax), %rsi
	movq	_solib_start@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rax
	movq	16(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpq	%rsi, (%rbx)
	jne	LBB0_1
## %bb.3:
	movq	16(%rbx), %rcx
	movq	%rcx, 16(%rax)
	testq	%rcx, %rcx
	jne	LBB0_5
## %bb.4:
	movq	_solib_end@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
LBB0_5:
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.6:
	callq	_free_objfile
LBB0_7:
	movq	%rbx, %rdi
	callq	_xfree
	movl	$1, %eax
	jmp	LBB0_9
LBB0_8:
	leaq	L_.str(%rip), %rdi
	callq	_error
	xorl	%eax, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_current_event,8,3              ## @current_event
	.comm	_solib_start,24,3               ## @solib_start
	.comm	_solib_end,8,3                  ## @solib_end
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error: dll starting at 0x%lx not found.\n"

	.no_dead_strip	_handle_unload_dll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_unload_dll
_handle_unload_dll:                     ; @handle_unload_dll
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _current_event@GOTPAGE
Lloh1:
	ldr	x8, [x8, _current_event@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	add	x1, x8, #1, lsl #12             ; =4096
Lloh3:
	adrp	x19, _solib_start@GOTPAGE
Lloh4:
	ldr	x19, [x19, _solib_start@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x8, x19
	ldr	x19, [x19, #16]
	cbz	x19, LBB0_7
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x9, [x19]
	cmp	x9, x1
	b.ne	LBB0_1
; %bb.3:
	ldr	x9, [x19, #16]
	str	x9, [x8, #16]
	cbz	x9, LBB0_9
; %bb.4:
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_6
LBB0_5:
	bl	_free_objfile
LBB0_6:
	mov	x0, x19
	bl	_xfree
	mov	w0, #1
	b	LBB0_8
LBB0_7:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_error
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_9:
Lloh7:
	adrp	x9, _solib_end@GOTPAGE
Lloh8:
	ldr	x9, [x9, _solib_end@GOTPAGEOFF]
Lloh9:
	str	x8, [x9]
	ldr	x0, [x19, #8]
	cbnz	x0, LBB0_5
	b	LBB0_6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotStr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_current_event,8,3              ; @current_event
	.comm	_solib_start,24,3               ; @solib_start
	.comm	_solib_end,8,3                  ; @solib_end
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error: dll starting at 0x%lx not found.\n"

	.no_dead_strip	_handle_unload_dll
.subsections_via_symbols
