	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sys_mlockall                   ## -- Begin function sys_mlockall
	.p2align	4, 0x90
_sys_mlockall:                          ## @sys_mlockall
	.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	%rsi, %r15
	movq	%rdi, %r12
	movq	(%rdi), %rax
	movq	(%rax), %r14
	movq	_PRIV_VM_MLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_priv_check
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_16
## %bb.1:
	movl	(%r15), %eax
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movq	_MCL_CURRENT@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	_MCL_FUTURE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	movl	%ecx, %esi
	orl	%edx, %esi
	notl	%esi
	testl	%esi, %eax
	je	LBB0_4
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %ebx
LBB0_16:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_old_mlock@GOTPCREL(%rip), %rsi
	cmpl	$0, (%rsi)
	jne	LBB0_8
## %bb.5:
	andl	%eax, %edx
	je	LBB0_8
## %bb.6:
	movq	(%r14), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_RLIMIT_MEMLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_lim_cur
	cmpq	%rax, -48(%rbp)                 ## 8-byte Folded Reload
	jg	LBB0_13
## %bb.7:
	movl	(%r15), %eax
	movl	(%rbx), %ecx
LBB0_8:
	testl	%eax, %ecx
	je	LBB0_10
## %bb.9:
	movq	%r14, %rdi
	callq	_vm_map_lock
	movq	_MAP_WIREFUTURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_vm_map_modflags
	movq	%r14, %rdi
	callq	_vm_map_unlock
	movl	(%r15), %eax
LBB0_10:
	xorl	%ebx, %ebx
	testl	%eax, (%r13)
	je	LBB0_16
## %bb.11:
	movq	%r14, %rdi
	callq	_vm_map_min
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_vm_map_max
	movq	_VM_MAP_WIRE_USER@GOTPCREL(%rip), %rdx
	movq	_VM_MAP_WIRE_HOLESOK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_vm_map_wire
	movq	_KERN_SUCCESS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_16
## %bb.12:
	movq	_KERN_RESOURCE_SHORTAGE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_14
LBB0_13:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_14:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_PRIV_VM_MLOCK,4,2              ## @PRIV_VM_MLOCK
	.comm	_MCL_CURRENT,4,2                ## @MCL_CURRENT
	.comm	_MCL_FUTURE,4,2                 ## @MCL_FUTURE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_old_mlock,4,2                  ## @old_mlock
	.comm	_RLIMIT_MEMLOCK,4,2             ## @RLIMIT_MEMLOCK
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MAP_WIREFUTURE,4,2             ## @MAP_WIREFUTURE
	.comm	_VM_MAP_WIRE_USER,4,2           ## @VM_MAP_WIRE_USER
	.comm	_VM_MAP_WIRE_HOLESOK,4,2        ## @VM_MAP_WIRE_HOLESOK
	.comm	_KERN_SUCCESS,4,2               ## @KERN_SUCCESS
	.comm	_KERN_RESOURCE_SHORTAGE,4,2     ## @KERN_RESOURCE_SHORTAGE
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.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	_sys_mlockall                   ; -- Begin function sys_mlockall
	.p2align	2
_sys_mlockall:                          ; @sys_mlockall
	.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, x1
	mov	x21, x0
	ldr	x8, [x0]
	ldr	x19, [x8]
Lloh0:
	adrp	x8, _PRIV_VM_MLOCK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PRIV_VM_MLOCK@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_priv_check
	cbnz	w0, LBB0_5
; %bb.1:
	ldr	w8, [x20]
	cbz	w8, LBB0_3
; %bb.2:
Lloh3:
	adrp	x22, _MCL_CURRENT@GOTPAGE
Lloh4:
	ldr	x22, [x22, _MCL_CURRENT@GOTPAGEOFF]
	ldr	w10, [x22]
Lloh5:
	adrp	x23, _MCL_FUTURE@GOTPAGE
Lloh6:
	ldr	x23, [x23, _MCL_FUTURE@GOTPAGEOFF]
	ldr	w9, [x23]
	orr	w11, w9, w10
	bics	wzr, w8, w11
	b.eq	LBB0_6
LBB0_3:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_4:
	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
LBB0_6:
Lloh9:
	adrp	x11, _old_mlock@GOTPAGE
Lloh10:
	ldr	x11, [x11, _old_mlock@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	and	w10, w10, w8
	cmp	w11, #0
	ccmp	w10, #0, #4, eq
	b.eq	LBB0_9
; %bb.7:
	ldr	x24, [x19]
Lloh12:
	adrp	x8, _RLIMIT_MEMLOCK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RLIMIT_MEMLOCK@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_lim_cur
	cmp	x24, x0
	b.gt	LBB0_15
; %bb.8:
	ldr	w8, [x20]
	ldr	w9, [x23]
LBB0_9:
	tst	w9, w8
	b.eq	LBB0_11
; %bb.10:
	mov	x0, x19
	bl	_vm_map_lock
Lloh15:
	adrp	x8, _MAP_WIREFUTURE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MAP_WIREFUTURE@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_vm_map_modflags
	mov	x0, x19
	bl	_vm_map_unlock
	ldr	w8, [x20]
LBB0_11:
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.12:
	mov	x0, x19
	bl	_vm_map_min
	mov	x20, x0
	mov	x0, x19
	bl	_vm_map_max
	mov	x2, x0
Lloh18:
	adrp	x8, _VM_MAP_WIRE_USER@GOTPAGE
Lloh19:
	ldr	x8, [x8, _VM_MAP_WIRE_USER@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _VM_MAP_WIRE_HOLESOK@GOTPAGE
Lloh22:
	ldr	x9, [x9, _VM_MAP_WIRE_HOLESOK@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w3, w9, w8
	mov	x0, x19
	mov	x1, x20
	bl	_vm_map_wire
Lloh24:
	adrp	x8, _KERN_SUCCESS@GOTPAGE
Lloh25:
	ldr	x8, [x8, _KERN_SUCCESS@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_14
LBB0_13:
	mov	w0, #0
	b	LBB0_5
LBB0_14:
Lloh27:
	adrp	x8, _KERN_RESOURCE_SHORTAGE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _KERN_RESOURCE_SHORTAGE@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_16
LBB0_15:
Lloh30:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_4
LBB0_16:
Lloh32:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh33:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_PRIV_VM_MLOCK,4,2              ; @PRIV_VM_MLOCK
	.comm	_MCL_CURRENT,4,2                ; @MCL_CURRENT
	.comm	_MCL_FUTURE,4,2                 ; @MCL_FUTURE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_old_mlock,4,2                  ; @old_mlock
	.comm	_RLIMIT_MEMLOCK,4,2             ; @RLIMIT_MEMLOCK
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MAP_WIREFUTURE,4,2             ; @MAP_WIREFUTURE
	.comm	_VM_MAP_WIRE_USER,4,2           ; @VM_MAP_WIRE_USER
	.comm	_VM_MAP_WIRE_HOLESOK,4,2        ; @VM_MAP_WIRE_HOLESOK
	.comm	_KERN_SUCCESS,4,2               ; @KERN_SUCCESS
	.comm	_KERN_RESOURCE_SHORTAGE,4,2     ; @KERN_RESOURCE_SHORTAGE
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_RACCT_MEMLOCK,4,2              ; @RACCT_MEMLOCK
	.comm	_racct_enable,8,3               ; @racct_enable
.subsections_via_symbols
