	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%eax, %eax
	callq	_geteuid
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$-1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_2:
	movq	_errno@GOTPCREL(%rip), %r12
	movq	$0, (%r12)
	movq	_NOBODY@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_getpwnam
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_5
## %bb.3:
	cmpq	$0, (%r12)
	jne	LBB0_5
## %bb.4:
	movl	(%rbx), %edx
	leaq	L_.str.1(%rip), %rsi
	movl	$-1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_5:
	testq	%r14, %r14
	je	LBB0_6
## %bb.7:
	cmpq	$0, (%r14)
	je	LBB0_8
LBB0_9:
	xorl	%eax, %eax
	callq	_getpagesize
	movl	%eax, %r15d
	movq	_PROT_READ@GOTPCREL(%rip), %rax
	movq	_PROT_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_MAP_ANON@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%edi, %edi
	movl	%r15d, %esi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	_mmap
	movq	%rax, %rbx
	movq	_MAP_FAILED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_11
## %bb.10:
	movq	(%r12), %rdi
	callq	_strerror
	leaq	L_.str.4(%rip), %rsi
	movl	$-1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_errx
LBB0_11:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_mlock
	testq	%rax, %rax
	jns	LBB0_13
## %bb.12:
	movq	(%r12), %rdi
	callq	_strerror
	leaq	L_.str.5(%rip), %rsi
	movl	$-1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_errx
LBB0_13:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_munlock
	testq	%rax, %rax
	jns	LBB0_15
## %bb.14:
	movq	(%r12), %rdi
	callq	_strerror
	leaq	L_.str.6(%rip), %rsi
	movl	$-1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_errx
LBB0_15:
	movq	(%r14), %rdi
	callq	_seteuid
	testq	%rax, %rax
	jns	LBB0_17
## %bb.16:
	movq	(%r12), %rdi
	callq	_strerror
	leaq	L_.str.7(%rip), %rsi
	movl	$-1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_errx
LBB0_17:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_mlock
	testq	%rax, %rax
	jne	LBB0_19
## %bb.18:
	leaq	L_.str.8(%rip), %rsi
	movl	$-1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_19:
	movq	(%r12), %rdi
	movq	_EPERM@GOTPCREL(%rip), %r14
	cmpq	(%r14), %rdi
	je	LBB0_21
## %bb.20:
	callq	_strerror
	leaq	L_.str.9(%rip), %rsi
	movl	$-1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_errx
LBB0_21:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_munlock
	testq	%rax, %rax
	jne	LBB0_23
## %bb.22:
	leaq	L_.str.10(%rip), %rsi
	movl	$-1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_23:
	movq	(%r12), %rdi
	cmpq	(%r14), %rdi
	je	LBB0_25
## %bb.24:
	callq	_strerror
	leaq	L_.str.11(%rip), %rsi
	movl	$-1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_errx
LBB0_25:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	(%r12), %rdi
	callq	_strerror
	leaq	L_.str.2(%rip), %rsi
	movl	$-1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_errx
	cmpq	$0, (%r14)
	jne	LBB0_9
LBB0_8:
	movl	(%rbx), %edx
	leaq	L_.str.3(%rip), %rsi
	movl	$-1, %edi
	xorl	%eax, %eax
	callq	_errx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mlock must run as root"

	.comm	_errno,8,3                      ## @errno
	.comm	_NOBODY,4,2                     ## @NOBODY
L_.str.1:                               ## @.str.1
	.asciz	"getpwnam: user \"%s\" not found"

L_.str.2:                               ## @.str.2
	.asciz	"getpwnam: %s"

L_.str.3:                               ## @.str.3
	.asciz	"getpwnam: user \"%s\" has uid 0"

	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_PROT_WRITE,4,2                 ## @PROT_WRITE
	.comm	_MAP_ANON,4,2                   ## @MAP_ANON
	.comm	_MAP_FAILED,8,3                 ## @MAP_FAILED
L_.str.4:                               ## @.str.4
	.asciz	"mmap: %s"

L_.str.5:                               ## @.str.5
	.asciz	"mlock privileged: %s"

L_.str.6:                               ## @.str.6
	.asciz	"munlock privileged: %s"

L_.str.7:                               ## @.str.7
	.asciz	"seteuid: %s"

L_.str.8:                               ## @.str.8
	.asciz	"mlock unprivileged: succeeded but shouldn't have"

	.comm	_EPERM,8,3                      ## @EPERM
L_.str.9:                               ## @.str.9
	.asciz	"mlock unprivileged: %s"

L_.str.10:                              ## @.str.10
	.asciz	"munlock unprivileged: succeeded but shouldn't have"

L_.str.11:                              ## @.str.11
	.asciz	"munlock unprivileged: %s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	bl	_geteuid
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #-1
	bl	_errx
LBB0_2:
Lloh2:
	adrp	x22, _errno@GOTPAGE
Lloh3:
	ldr	x22, [x22, _errno@GOTPAGEOFF]
	str	xzr, [x22]
Lloh4:
	adrp	x19, _NOBODY@GOTPAGE
Lloh5:
	ldr	x19, [x19, _NOBODY@GOTPAGEOFF]
	ldr	w0, [x19]
	bl	_getpwnam
	mov	x20, x0
	ldr	x8, [x22]
	cmp	x0, #0
	ccmp	x8, #0, #0, eq
	b.eq	LBB0_22
; %bb.3:
	cbz	x20, LBB0_23
LBB0_4:
	ldr	x8, [x20]
	cbz	x8, LBB0_24
LBB0_5:
	bl	_getpagesize
	mov	x19, x0
Lloh6:
	adrp	x8, _PROT_READ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PROT_READ@GOTPAGEOFF]
Lloh8:
	adrp	x9, _PROT_WRITE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PROT_WRITE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	ldr	w9, [x9]
	orr	w2, w9, w8
Lloh12:
	adrp	x8, _MAP_ANON@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MAP_ANON@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
	mov	x0, #0
	mov	x1, x19
	mov	w4, #-1
	mov	w5, #0
	bl	_mmap
	mov	x21, x0
Lloh15:
	adrp	x8, _MAP_FAILED@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MAP_FAILED@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.6:
	ldr	x0, [x22]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh18:
	adrp	x1, l_.str.4@PAGE
Lloh19:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #-1
	bl	_errx
LBB0_7:
	mov	x0, x21
	mov	x1, x19
	bl	_mlock
	tbz	x0, #63, LBB0_9
; %bb.8:
	ldr	x0, [x22]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh20:
	adrp	x1, l_.str.5@PAGE
Lloh21:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w0, #-1
	bl	_errx
LBB0_9:
	mov	x0, x21
	mov	x1, x19
	bl	_munlock
	tbz	x0, #63, LBB0_11
; %bb.10:
	ldr	x0, [x22]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh22:
	adrp	x1, l_.str.6@PAGE
Lloh23:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	w0, #-1
	bl	_errx
LBB0_11:
	ldr	x0, [x20]
	bl	_seteuid
	tbz	x0, #63, LBB0_13
; %bb.12:
	ldr	x0, [x22]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh24:
	adrp	x1, l_.str.7@PAGE
Lloh25:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	w0, #-1
	bl	_errx
LBB0_13:
	mov	x0, x21
	mov	x1, x19
	bl	_mlock
	cbnz	x0, LBB0_15
; %bb.14:
Lloh26:
	adrp	x1, l_.str.8@PAGE
Lloh27:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	w0, #-1
	bl	_errx
LBB0_15:
	ldr	x0, [x22]
Lloh28:
	adrp	x20, _EPERM@GOTPAGE
Lloh29:
	ldr	x20, [x20, _EPERM@GOTPAGEOFF]
	ldr	x8, [x20]
	cmp	x0, x8
	b.eq	LBB0_17
; %bb.16:
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh30:
	adrp	x1, l_.str.9@PAGE
Lloh31:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	w0, #-1
	bl	_errx
LBB0_17:
	mov	x0, x21
	mov	x1, x19
	bl	_munlock
	cbnz	x0, LBB0_19
; %bb.18:
Lloh32:
	adrp	x1, l_.str.10@PAGE
Lloh33:
	add	x1, x1, l_.str.10@PAGEOFF
	mov	w0, #-1
	bl	_errx
LBB0_19:
	ldr	x0, [x22]
	ldr	x8, [x20]
	cmp	x0, x8
	b.eq	LBB0_21
; %bb.20:
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh34:
	adrp	x1, l_.str.11@PAGE
Lloh35:
	add	x1, x1, l_.str.11@PAGEOFF
	mov	w0, #-1
	bl	_errx
LBB0_21:
	mov	w0, #0
	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
	add	sp, sp, #64
	ret
LBB0_22:
	ldr	w8, [x19]
	str	x8, [sp]
Lloh36:
	adrp	x1, l_.str.1@PAGE
Lloh37:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #-1
	bl	_errx
	cbnz	x20, LBB0_4
LBB0_23:
	ldr	x0, [x22]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh38:
	adrp	x1, l_.str.2@PAGE
Lloh39:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #-1
	bl	_errx
	ldr	x8, [x20]
	cbnz	x8, LBB0_5
LBB0_24:
	ldr	w8, [x19]
	str	x8, [sp]
Lloh40:
	adrp	x1, l_.str.3@PAGE
Lloh41:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #-1
	bl	_errx
	b	LBB0_5
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mlock must run as root"

	.comm	_errno,8,3                      ; @errno
	.comm	_NOBODY,4,2                     ; @NOBODY
l_.str.1:                               ; @.str.1
	.asciz	"getpwnam: user \"%s\" not found"

l_.str.2:                               ; @.str.2
	.asciz	"getpwnam: %s"

l_.str.3:                               ; @.str.3
	.asciz	"getpwnam: user \"%s\" has uid 0"

	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_PROT_WRITE,4,2                 ; @PROT_WRITE
	.comm	_MAP_ANON,4,2                   ; @MAP_ANON
	.comm	_MAP_FAILED,8,3                 ; @MAP_FAILED
l_.str.4:                               ; @.str.4
	.asciz	"mmap: %s"

l_.str.5:                               ; @.str.5
	.asciz	"mlock privileged: %s"

l_.str.6:                               ; @.str.6
	.asciz	"munlock privileged: %s"

l_.str.7:                               ; @.str.7
	.asciz	"seteuid: %s"

l_.str.8:                               ; @.str.8
	.asciz	"mlock unprivileged: succeeded but shouldn't have"

	.comm	_EPERM,8,3                      ; @EPERM
l_.str.9:                               ; @.str.9
	.asciz	"mlock unprivileged: %s"

l_.str.10:                              ; @.str.10
	.asciz	"munlock unprivileged: succeeded but shouldn't have"

l_.str.11:                              ; @.str.11
	.asciz	"munlock unprivileged: %s"

.subsections_via_symbols
