	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function checked_mmap
_checked_mmap:                          ## @checked_mmap
	.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	%r8, -48(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r15d
	movl	%edx, %r13d
	movl	%esi, %ebx
	movl	%edi, %r14d
	xorl	%eax, %eax
	callq	_getpagesize
	movl	%eax, %r12d
	xorl	%edi, %edi
	testl	%eax, %eax
	setg	%dil
	callq	_ATF_REQUIRE
	xorl	%edi, %edi
	movl	%r12d, %esi
	movl	%r14d, %edx
	movl	%ebx, %ecx
	movl	%r13d, %r8d
	xorl	%r9d, %r9d
	callq	_mmap
	movq	%rax, %rbx
	movq	_MAP_FAILED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_1
## %bb.3:
	xorl	%edi, %edi
	testl	%r15d, %r15d
	sete	%dil
	leaq	L_.str.2(%rip), %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_ATF_CHECK_MSG
	movq	%rbx, %rdi
	movl	%r12d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_munmap                         ## TAILCALL
LBB0_1:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	testl	%r15d, %r15d
	je	LBB0_4
## %bb.2:
	leaq	L_.str.1(%rip), %rdx
	movl	%r15d, %edi
	movl	%r8d, %esi
	movl	%r15d, %r9d
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ATF_CHECK_EQ_MSG               ## TAILCALL
LBB0_4:
	leaq	L_.str(%rip), %rsi
	xorl	%edi, %edi
	movq	%rcx, %rdx
	movl	%r8d, %ecx
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ATF_CHECK_MSG                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MAP_FAILED,8,3                 ## @MAP_FAILED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s failed with errno %d"

	.comm	_errno,4,2                      ## @errno
L_.str.1:                               ## @.str.1
	.asciz	"%s failed with wrong errno %d (expected %d)"

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

	.no_dead_strip	_checked_mmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function checked_mmap
_checked_mmap:                          ; @checked_mmap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x4
	mov	x20, x3
	mov	x22, x2
	mov	x23, x1
	mov	x24, x0
	bl	_getpagesize
	mov	x21, x0
	cmp	w0, #0
	cset	w0, gt
	bl	_ATF_REQUIRE
	mov	x0, #0
	mov	x1, x21
	mov	x2, x24
	mov	x3, x23
	mov	x4, x22
	mov	w5, #0
	bl	_mmap
Lloh0:
	adrp	x8, _MAP_FAILED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAP_FAILED@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_2
; %bb.1:
	mov	x22, x0
	cmp	w20, #0
	cset	w0, eq
Lloh3:
	adrp	x1, l_.str.2@PAGE
Lloh4:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x19
	bl	_ATF_CHECK_MSG
	mov	x0, x22
	mov	x1, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_munmap
LBB0_2:
Lloh5:
	adrp	x8, _errno@GOTPAGE
Lloh6:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	cbz	w20, LBB0_4
; %bb.3:
Lloh8:
	adrp	x2, l_.str.1@PAGE
Lloh9:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x3, x19
	mov	x4, x1
	mov	x5, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_ATF_CHECK_EQ_MSG
LBB0_4:
	str	x1, [sp]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #0
	mov	x2, x19
	bl	_ATF_CHECK_MSG
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_MAP_FAILED,8,3                 ; @MAP_FAILED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s failed with errno %d"

	.comm	_errno,4,2                      ; @errno
l_.str.1:                               ; @.str.1
	.asciz	"%s failed with wrong errno %d (expected %d)"

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

	.no_dead_strip	_checked_mmap
.subsections_via_symbols
