	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function unload
_unload:                                ## @unload
	.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
	movl	%esi, %r14d
	movq	%rdi, %r12
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_check_permission
	leaq	L_.str(%rip), %rdi
	movq	%r12, %rsi
	callq	_printf
	movq	_errno@GOTPCREL(%rip), %r13
	movl	$0, (%r13)
	movq	_MODCTL_UNLOAD@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r12, %rdi
	callq	___UNCONST
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_modctl
	cmpl	$-1, %eax
	jne	LBB0_3
## %bb.1:
	movl	(%r13), %r15d
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r15d, %edi
	callq	_strerror
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movq	%r12, %rdx
	movq	%rax, %rcx
	callq	_fprintf
	testl	%r14d, %r14d
	je	LBB0_3
## %bb.2:
	leaq	L_.str.2(%rip), %rdi
	callq	_atf_tc_fail
LBB0_3:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unloading module %s\n"

	.comm	_errno,4,2                      ## @errno
	.comm	_MODCTL_UNLOAD,4,2              ## @MODCTL_UNLOAD
	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"modctl(MODCTL_UNLOAD, %s) failed: %s\n"

L_.str.2:                               ## @.str.2
	.asciz	"Module unload failed"

	.no_dead_strip	_unload
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function unload
_unload:                                ; @unload
	.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	x19, x1
	mov	x20, x0
	bl	_check_permission
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_printf
Lloh2:
	adrp	x22, _errno@GOTPAGE
Lloh3:
	ldr	x22, [x22, _errno@GOTPAGEOFF]
	str	wzr, [x22]
Lloh4:
	adrp	x8, _MODCTL_UNLOAD@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MODCTL_UNLOAD@GOTPAGEOFF]
Lloh6:
	ldr	w21, [x8]
	mov	x0, x20
	bl	___UNCONST
	mov	x1, x0
	mov	x0, x21
	bl	_modctl
	mov	w21, #0
	cmn	w0, #1
	b.ne	LBB0_3
; %bb.1:
	ldr	w21, [x22]
Lloh7:
	adrp	x8, _stderr@GOTPAGE
Lloh8:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh9:
	ldr	w22, [x8]
	mov	x0, x21
	bl	_strerror
	mov	x3, x0
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	mov	x2, x20
	bl	_fprintf
	cbz	w19, LBB0_3
; %bb.2:
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_atf_tc_fail
LBB0_3:
	mov	x0, x21
	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	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unloading module %s\n"

	.comm	_errno,4,2                      ; @errno
	.comm	_MODCTL_UNLOAD,4,2              ; @MODCTL_UNLOAD
	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"modctl(MODCTL_UNLOAD, %s) failed: %s\n"

l_.str.2:                               ; @.str.2
	.asciz	"Module unload failed"

	.no_dead_strip	_unload
.subsections_via_symbols
