	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sys_mprotect                   ## -- Begin function sys_mprotect
	.p2align	4, 0x90
_sys_mprotect:                          ## @sys_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	%edx, %r14d
	movl	%esi, %r15d
	movl	%edi, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	callq	_STRACE
	movl	%ebx, %edi
	callq	_PGOFFSET
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	movq	_P_RWX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	testl	%r14d, %eax
	je	LBB0_3
LBB0_1:
	movq	__EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	%r15d, %edi
	callq	_PAGE_ROUND_UP
	movl	%eax, %r15d
	movq	_current@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	(%rax), %rdi
	callq	_write_wrlock
	movq	(%r13), %rax
	movq	(%rax), %r12
	movl	%ebx, %edi
	callq	_PAGE
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	callq	_pt_set_flags
	movl	%eax, %ebx
	movq	(%r13), %rax
	movq	(%rax), %rdi
	callq	_write_wrunlock
	movl	%ebx, %eax
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mprotect(0x%x, 0x%x, 0x%x)"

	.comm	__EINVAL,4,2                    ## @_EINVAL
	.comm	_P_RWX,4,2                      ## @P_RWX
	.comm	_current,8,3                    ## @current
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sys_mprotect                   ; -- Begin function sys_mprotect
	.p2align	2
_sys_mprotect:                          ; @sys_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	x19, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x2, x21
	mov	x3, x19
	bl	_STRACE
	mov	x0, x20
	bl	_PGOFFSET
	cbnz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _P_RWX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _P_RWX@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	bics	wzr, w19, w8
	b.eq	LBB0_4
LBB0_2:
Lloh5:
	adrp	x8, __EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, __EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
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
	ret
LBB0_4:
	mov	x0, x21
	bl	_PAGE_ROUND_UP
	mov	x21, x0
Lloh8:
	adrp	x23, _current@GOTPAGE
Lloh9:
	ldr	x23, [x23, _current@GOTPAGEOFF]
	ldr	x8, [x23]
	ldr	x0, [x8]
	bl	_write_wrlock
	ldr	x8, [x23]
	ldr	x22, [x8]
	mov	x0, x20
	bl	_PAGE
	mov	x1, x0
	mov	x0, x22
	mov	x2, x21
	mov	x3, x19
	bl	_pt_set_flags
	mov	x19, x0
	ldr	x8, [x23]
	ldr	x0, [x8]
	bl	_write_wrunlock
	mov	x0, x19
	b	LBB0_3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mprotect(0x%x, 0x%x, 0x%x)"

	.comm	__EINVAL,4,2                    ; @_EINVAL
	.comm	_P_RWX,4,2                      ; @P_RWX
	.comm	_current,8,3                    ; @current
.subsections_via_symbols
