	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_permission
_check_permission:                      ## @check_permission
	.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	_MODCTL_EXISTS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_modctl
	testl	%eax, %eax
	je	LBB0_7
## %bb.1:
	movq	_errno@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movq	_ENOSYS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_5
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_3:
	movq	_EPERM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
LBB0_5:
	callq	_atf_tc_skip
LBB0_6:
	movq	(%rbx), %rcx
	leaq	L_.str.2(%rip), %rdx
	movq	%rcx, %rdi
	xorl	%esi, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_ATF_REQUIRE_EQ_MSG             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MODCTL_EXISTS,4,2              ## @MODCTL_EXISTS
	.comm	_errno,8,3                      ## @errno
	.comm	_ENOSYS,8,3                     ## @ENOSYS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Kernel does not have 'options MODULAR'."

	.comm	_EPERM,8,3                      ## @EPERM
L_.str.1:                               ## @.str.1
	.asciz	"Module loading administratively forbidden"

L_.str.2:                               ## @.str.2
	.asciz	"unexpected error %d from modctl(MODCTL_EXISTS, 0)"

	.no_dead_strip	_check_permission
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_permission
_check_permission:                      ; @check_permission
	.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, _MODCTL_EXISTS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MODCTL_EXISTS@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_modctl
	cbz	w0, LBB0_3
; %bb.1:
Lloh3:
	adrp	x19, _errno@GOTPAGE
Lloh4:
	ldr	x19, [x19, _errno@GOTPAGEOFF]
	ldr	x8, [x19]
Lloh5:
	adrp	x9, _ENOSYS@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ENOSYS@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_6
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
Lloh10:
	adrp	x9, _EPERM@GOTPAGE
Lloh11:
	ldr	x9, [x9, _EPERM@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.5:
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_6:
	bl	_atf_tc_skip
LBB0_7:
	ldr	x0, [x19]
Lloh15:
	adrp	x2, l_.str.2@PAGE
Lloh16:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	w1, #0
	mov	x3, x0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ATF_REQUIRE_EQ_MSG
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_MODCTL_EXISTS,4,2              ; @MODCTL_EXISTS
	.comm	_errno,8,3                      ; @errno
	.comm	_ENOSYS,8,3                     ; @ENOSYS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Kernel does not have 'options MODULAR'."

	.comm	_EPERM,8,3                      ; @EPERM
l_.str.1:                               ; @.str.1
	.asciz	"Module loading administratively forbidden"

l_.str.2:                               ; @.str.2
	.asciz	"unexpected error %d from modctl(MODCTL_EXISTS, 0)"

	.no_dead_strip	_check_permission
.subsections_via_symbols
