	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kern_mprotect                  ## -- Begin function kern_mprotect
	.p2align	4, 0x90
_kern_mprotect:                         ## @kern_mprotect
	.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	%ecx, %r13d
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	__PROT_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_PROT_MAX
	orl	%ebx, %eax
	notl	%eax
	testl	%r13d, %eax
	jne	LBB0_12
## %bb.1:
	movl	%r13d, %edi
	callq	_PROT_MAX_EXTRACT
	movl	%eax, %ebx
	movl	%r13d, %edi
	callq	_PROT_EXTRACT
	movl	%eax, %r13d
	movq	_PAGE_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	andq	%r15, %rdi
	subq	%rdi, %r15
	addq	%r12, %rdi
	callq	_round_page
	movq	%rax, %r12
	addq	%r15, %r12
	jb	LBB0_12
## %bb.2:
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.3:
	movl	%ebx, %eax
	notl	%eax
	testl	%eax, %r13d
	jne	LBB0_12
## %bb.4:
	movq	(%r14), %rax
	movq	(%rax), %rdi
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rsi
	movq	%r12, %rdx
	movl	%ebx, %ecx
	callq	_vm_map_protect
	cmpl	$128, %eax
	jne	LBB0_6
LBB0_5:
	movq	(%r14), %rax
	movq	(%rax), %rdi
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rsi
	movq	%r12, %rdx
	movl	%r13d, %ecx
	callq	_vm_map_protect
LBB0_6:
	cmpl	$128, %eax
	je	LBB0_7
## %bb.8:
	cmpl	$129, %eax
	je	LBB0_11
## %bb.9:
	cmpl	$130, %eax
	jne	LBB0_12
## %bb.10:
	movq	_EACCES@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_12:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_11:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	__PROT_ALL,4,2                  ## @_PROT_ALL
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PAGE_MASK,8,3                  ## @PAGE_MASK
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_EACCES,4,2                     ## @EACCES
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_SV_ILP32,4,2                   ## @SV_ILP32
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kern_mprotect                  ; -- Begin function kern_mprotect
	.p2align	2
_kern_mprotect:                         ; @kern_mprotect
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x3
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, __PROT_ALL@GOTPAGE
Lloh1:
	ldr	x8, [x8, __PROT_ALL@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	mov	x0, x23
	bl	_PROT_MAX
	orr	w8, w0, w23
	bics	wzr, w20, w8
	b.ne	LBB0_10
; %bb.1:
	mov	x0, x20
	bl	_PROT_MAX_EXTRACT
	mov	x23, x0
	mov	x0, x20
	bl	_PROT_EXTRACT
	mov	x20, x0
Lloh3:
	adrp	x8, _PAGE_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PAGE_MASK@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	and	x8, x8, x21
	sub	x21, x21, x8
	add	x0, x8, x22
	bl	_round_page
	adds	x22, x21, x0
	b.hs	LBB0_10
; %bb.2:
	cbz	w23, LBB0_5
; %bb.3:
	bics	wzr, w20, w23
	b.ne	LBB0_10
; %bb.4:
	ldr	x8, [x19]
	ldr	x0, [x8]
Lloh6:
	adrp	x8, _TRUE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh8:
	ldr	w4, [x8]
	mov	x1, x21
	mov	x2, x22
	mov	x3, x23
	bl	_vm_map_protect
	cmp	w0, #128
	b.ne	LBB0_6
LBB0_5:
	ldr	x8, [x19]
	ldr	x0, [x8]
Lloh9:
	adrp	x8, _FALSE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh11:
	ldr	w4, [x8]
	mov	x1, x21
	mov	x2, x22
	mov	x3, x20
	bl	_vm_map_protect
LBB0_6:
	cmp	w0, #128
	b.eq	LBB0_13
; %bb.7:
	cmp	w0, #129
	b.eq	LBB0_14
; %bb.8:
	cmp	w0, #130
	b.ne	LBB0_10
; %bb.9:
Lloh12:
	adrp	x8, _EACCES@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
LBB0_12:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_13:
	mov	w0, #0
	b	LBB0_12
LBB0_14:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	__PROT_ALL,4,2                  ; @_PROT_ALL
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PAGE_MASK,8,3                  ; @PAGE_MASK
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_EACCES,4,2                     ; @EACCES
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_SV_ILP32,4,2                   ; @SV_ILP32
.subsections_via_symbols
