	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kern_munlock                   ## -- Begin function kern_munlock
	.p2align	4, 0x90
_kern_munlock:                          ## @kern_munlock
	.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
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_PRIV_VM_MUNLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_priv_check
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	leaq	(%r15,%rbx), %r13
	movq	%rbx, %rdi
	callq	_trunc_page
	movq	%rax, %r12
	movq	%r13, %rdi
	callq	_round_page
	addq	%rbx, %r15
	jb	LBB0_3
## %bb.2:
	cmpq	%rbx, %rax
	jb	LBB0_3
## %bb.4:
	movq	(%r14), %rcx
	movq	(%rcx), %rdi
	movq	_VM_MAP_WIRE_USER@GOTPCREL(%rip), %rdx
	movq	_VM_MAP_WIRE_NOHOLES@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	movq	%r12, %rsi
	movq	%rax, %rdx
	callq	_vm_map_unwire
	movl	%eax, %ecx
	movq	_KERN_SUCCESS@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpl	(%rdx), %ecx
	je	LBB0_7
## %bb.5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PRIV_VM_MUNLOCK,4,2            ## @PRIV_VM_MUNLOCK
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_VM_MAP_WIRE_USER,4,2           ## @VM_MAP_WIRE_USER
	.comm	_VM_MAP_WIRE_NOHOLES,4,2        ## @VM_MAP_WIRE_NOHOLES
	.comm	_KERN_SUCCESS,4,2               ## @KERN_SUCCESS
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_RACCT_MEMLOCK,4,2              ## @RACCT_MEMLOCK
	.comm	_racct_enable,8,3               ## @racct_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kern_munlock                   ; -- Begin function kern_munlock
	.p2align	2
_kern_munlock:                          ; @kern_munlock
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _PRIV_VM_MUNLOCK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PRIV_VM_MUNLOCK@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_priv_check
	cbnz	w0, LBB0_5
; %bb.1:
	adds	x22, x21, x20
	cset	w23, hs
	mov	x0, x20
	bl	_trunc_page
	mov	x21, x0
	mov	x0, x22
	bl	_round_page
	tbnz	w23, #0, LBB0_4
; %bb.2:
	mov	x2, x0
	cmp	x0, x20
	b.lo	LBB0_4
; %bb.3:
	ldr	x8, [x19]
Lloh3:
	adrp	x9, _VM_MAP_WIRE_USER@GOTPAGE
Lloh4:
	ldr	x9, [x9, _VM_MAP_WIRE_USER@GOTPAGEOFF]
	ldr	x0, [x8]
Lloh5:
	ldr	w8, [x9]
Lloh6:
	adrp	x9, _VM_MAP_WIRE_NOHOLES@GOTPAGE
Lloh7:
	ldr	x9, [x9, _VM_MAP_WIRE_NOHOLES@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w3, w9, w8
	mov	x1, x21
	bl	_vm_map_unwire
Lloh9:
	adrp	x8, _KERN_SUCCESS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _KERN_SUCCESS@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	cmp	w0, w8
	csel	w0, wzr, w9, eq
	b	LBB0_5
LBB0_4:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
LBB0_5:
	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	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_PRIV_VM_MUNLOCK,4,2            ; @PRIV_VM_MUNLOCK
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_VM_MAP_WIRE_USER,4,2           ; @VM_MAP_WIRE_USER
	.comm	_VM_MAP_WIRE_NOHOLES,4,2        ; @VM_MAP_WIRE_NOHOLES
	.comm	_KERN_SUCCESS,4,2               ; @KERN_SUCCESS
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_RACCT_MEMLOCK,4,2              ; @RACCT_MEMLOCK
	.comm	_racct_enable,8,3               ; @racct_enable
.subsections_via_symbols
