	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SYS_ProtectRange               ## -- Begin function SYS_ProtectRange
	.p2align	4, 0x90
_SYS_ProtectRange:                      ## @SYS_ProtectRange
	.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
                                        ## kill: def $edx killed $edx def $rdx
	movq	_SYS_PROTECTCHANMAX@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	jle	LBB0_4
## %bb.1:
	movl	%ecx, %r14d
	movl	%edi, %r15d
	movl	%esi, %eax
	andl	$-1024, %eax                    ## imm = 0xFC00
	leal	(%rdx,%rsi), %r12d
	addl	$1023, %r12d                    ## imm = 0x3FF
	andl	$-1024, %r12d                   ## imm = 0xFC00
	movslq	%eax, %rbx
	movl	%r12d, %esi
	subl	%ebx, %esi
	movq	%rbx, %rdi
	callq	_DCFlushRange
	callq	__CPU_ISR_Disable
	movl	%r15d, %edi
	callq	_IRQMASK
	movl	%eax, %edi
	callq	___UnmaskIrq
	movl	%ebx, %edi
	movl	$10, %esi
	movl	$16, %edx
	callq	__SHIFTR
	movq	__memReg@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rcx
	movq	%rdx, %rbx
	leal	(,%r15,4), %edx
	movslq	%edx, %rdx
	movl	%eax, (%rcx,%rdx,4)
	movl	%r12d, %edi
	movl	$10, %esi
	movl	$16, %edx
	callq	__SHIFTR
	movq	(%rbx), %rcx
	leal	1(,%r15,4), %edx
	movslq	%edx, %rdx
	movl	%eax, (%rcx,%rdx,4)
	movl	32(%rcx), %r13d
	leal	(%r15,%r15), %r12d
	movl	$3, %edi
	movl	%r12d, %esi
	movl	$2, %edx
	callq	__SHIFTL
	movl	%eax, %ebx
	notl	%ebx
	andl	%r13d, %ebx
	movl	%r14d, %edi
	movl	%r12d, %esi
	movl	$2, %edx
	callq	__SHIFTL
	orl	%ebx, %eax
	movq	__memReg@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, 32(%rcx)
	movq	_SYS_PROTECTRDWR@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_3
## %bb.2:
	movl	%r15d, %edi
	callq	_IRQMASK
	movl	%eax, %edi
	callq	___MaskIrq
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	__CPU_ISR_Restore               ## TAILCALL
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SYS_PROTECTCHANMAX,4,2         ## @SYS_PROTECTCHANMAX
	.comm	__memReg,8,3                    ## @_memReg
	.comm	_SYS_PROTECTRDWR,4,2            ## @SYS_PROTECTRDWR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SYS_ProtectRange               ; -- Begin function SYS_ProtectRange
	.p2align	2
_SYS_ProtectRange:                      ; @SYS_ProtectRange
	.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
Lloh0:
	adrp	x8, _SYS_PROTECTCHANMAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SYS_PROTECTCHANMAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	b.le	LBB0_4
; %bb.1:
	mov	x20, x3
	mov	x19, x0
	and	w21, w1, #0xfffffc00
	add	w8, w2, w1
	add	w8, w8, #1023
	and	w22, w8, #0xfffffc00
	sxtw	x0, w21
	sub	w1, w22, w21
	bl	_DCFlushRange
	bl	__CPU_ISR_Disable
	mov	x0, x19
	bl	_IRQMASK
	bl	___UnmaskIrq
	mov	x0, x21
	mov	w1, #10
	mov	w2, #16
	bl	__SHIFTR
Lloh3:
	adrp	x23, __memReg@GOTPAGE
Lloh4:
	ldr	x23, [x23, __memReg@GOTPAGEOFF]
	ldr	x8, [x23]
	lsl	w9, w19, #2
	sbfiz	x21, x9, #2, #32
	str	w0, [x8, x21]
	mov	x0, x22
	mov	w1, #10
	mov	w2, #16
	bl	__SHIFTR
	ldr	x8, [x23]
	add	x9, x8, x21
	str	w0, [x9, #4]
	ldr	w22, [x8, #32]
	lsl	w21, w19, #1
	mov	w0, #3
	mov	x1, x21
	mov	w2, #2
	bl	__SHIFTL
	bic	w22, w22, w0
	mov	x0, x20
	mov	x1, x21
	mov	w2, #2
	bl	__SHIFTL
	orr	w8, w22, w0
	ldr	x9, [x23]
	str	w8, [x9, #32]
Lloh5:
	adrp	x8, _SYS_PROTECTRDWR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SYS_PROTECTRDWR@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_IRQMASK
	bl	___MaskIrq
LBB0_3:
	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
	b	__CPU_ISR_Restore
LBB0_4:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_SYS_PROTECTCHANMAX,4,2         ; @SYS_PROTECTCHANMAX
	.comm	__memReg,8,3                    ; @_memReg
	.comm	_SYS_PROTECTRDWR,4,2            ; @SYS_PROTECTRDWR
.subsections_via_symbols
