	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_memlock                        ## -- Begin function memlock
	.p2align	4, 0x90
_memlock:                               ## @memlock
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_errno@GOTPCREL(%rip), %r14
	movl	$0, (%r14)
	movq	__SC_MEMLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_sysconf
	xorl	%ebx, %ebx
	cmpl	$-1, %eax
	jne	LBB0_4
## %bb.1:
	cmpl	$0, (%r14)
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_quit
	jmp	LBB0_4
LBB0_3:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_fprintf
	movl	$-1, %ebx
LBB0_4:
	movq	_MCL_CURRENT@GOTPCREL(%rip), %rax
	movq	_MCL_FUTURE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	callq	_mlockall
	cmpl	$-1, %eax
	je	LBB0_5
## %bb.6:
	xorl	%eax, %eax
	callq	_munlockall
	cmpl	$-1, %eax
	je	LBB0_7
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_8
LBB0_7:
	leaq	L_.str.3(%rip), %rdi
LBB0_8:
	callq	_perror
	movl	(%r14), %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,4,2                      ## @errno
	.comm	__SC_MEMLOCK,4,2                ## @_SC_MEMLOCK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"(should not happen) sysconf(_SC_MEMLOCK)"

	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"Memory locking is not supported in this environment.\n"

	.comm	_MCL_CURRENT,4,2                ## @MCL_CURRENT
	.comm	_MCL_FUTURE,4,2                 ## @MCL_FUTURE
L_.str.2:                               ## @.str.2
	.asciz	"mlockall(MCL_CURRENT | MCL_FUTURE)"

L_.str.3:                               ## @.str.3
	.asciz	"munlockall"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_memlock                        ; -- Begin function memlock
	.p2align	2
_memlock:                               ; @memlock
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x20, _errno@GOTPAGE
Lloh1:
	ldr	x20, [x20, _errno@GOTPAGEOFF]
	str	wzr, [x20]
Lloh2:
	adrp	x8, __SC_MEMLOCK@GOTPAGE
Lloh3:
	ldr	x8, [x8, __SC_MEMLOCK@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_sysconf
	mov	w19, #0
	cmn	w0, #1
	b.ne	LBB0_4
; %bb.1:
	ldr	w8, [x20]
	cbz	w8, LBB0_3
; %bb.2:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_quit
	mov	w19, #0
	b	LBB0_4
LBB0_3:
Lloh7:
	adrp	x8, _stderr@GOTPAGE
Lloh8:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
	mov	w19, #-1
LBB0_4:
Lloh12:
	adrp	x8, _MCL_CURRENT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MCL_CURRENT@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _MCL_FUTURE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _MCL_FUTURE@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w0, w9, w8
	bl	_mlockall
	cmn	w0, #1
	b.eq	LBB0_7
; %bb.5:
	bl	_munlockall
	cmn	w0, #1
	b.eq	LBB0_8
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
Lloh18:
	adrp	x0, l_.str.2@PAGE
Lloh19:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh20:
	adrp	x0, l_.str.3@PAGE
Lloh21:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_9:
	bl	_perror
	ldr	w19, [x20]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,4,2                      ; @errno
	.comm	__SC_MEMLOCK,4,2                ; @_SC_MEMLOCK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(should not happen) sysconf(_SC_MEMLOCK)"

	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"Memory locking is not supported in this environment.\n"

	.comm	_MCL_CURRENT,4,2                ; @MCL_CURRENT
	.comm	_MCL_FUTURE,4,2                 ; @MCL_FUTURE
l_.str.2:                               ; @.str.2
	.asciz	"mlockall(MCL_CURRENT | MCL_FUTURE)"

l_.str.3:                               ; @.str.3
	.asciz	"munlockall"

.subsections_via_symbols
