	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fileio
_fileio:                                ## @fileio
	.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	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_FUNSIZE@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	incl	%eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	%rbx, %rdi
	callq	_FSTYPE_NFSRO
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	movq	_EROFS@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_EACCES@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r14d
	xorl	%eax, %eax
	callq	_FSTEST_ENTER
	movq	_AFILE@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_rump_sys_open
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_RL
	movl	(%r13), %edx
	movl	%ebx, %edi
	movq	%r15, %rsi
	callq	_rump_sys_read
	movl	(%r13), %esi
	movl	%eax, %edi
	callq	_ATF_REQUIRE_EQ
	movslq	(%r13), %rax
	movb	$0, (%r15,%rax)
	movq	_FUNTEXT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ATF_REQUIRE_STREQ
	movl	%ebx, %edi
	callq	_rump_sys_close
	movl	%eax, %edi
	callq	_RL
	movl	(%r12), %edi
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_rump_sys_open
	xorl	%esi, %esi
	cmpl	$-1, %eax
	sete	%sil
	movl	%r14d, %edi
	callq	_ATF_REQUIRE_ERRNO
	movl	(%r12), %edi
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_rump_sys_open
	xorl	%esi, %esi
	cmpl	$-1, %eax
	sete	%sil
	movl	%r14d, %edi
	callq	_ATF_REQUIRE_ERRNO
	xorl	%eax, %eax
	callq	_FSTEST_EXIT
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_FUNSIZE,4,2                    ## @FUNSIZE
	.comm	_EACCES,4,2                     ## @EACCES
	.comm	_EROFS,4,2                      ## @EROFS
	.comm	_AFILE,4,2                      ## @AFILE
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_FUNTEXT,4,2                    ## @FUNTEXT
	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.no_dead_strip	_fileio
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fileio
_fileio:                                ; @fileio
	.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
	sub	sp, sp, #16
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x23, _FUNSIZE@GOTPAGE
Lloh4:
	ldr	x23, [x23, _FUNSIZE@GOTPAGEOFF]
	ldr	w8, [x23]
	add	w8, w8, #1
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	bl	_FSTYPE_NFSRO
Lloh7:
	adrp	x8, _EROFS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EROFS@GOTPAGEOFF]
Lloh9:
	adrp	x9, _EACCES@GOTPAGE
Lloh10:
	ldr	x9, [x9, _EACCES@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x8, x9, eq
	ldr	w19, [x8]
	bl	_FSTEST_ENTER
Lloh11:
	adrp	x22, _AFILE@GOTPAGE
Lloh12:
	ldr	x22, [x22, _AFILE@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh13:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	bl	_rump_sys_open
	mov	x21, x0
	bl	_RL
	ldr	w2, [x23]
	mov	x0, x21
	mov	x1, x20
	bl	_rump_sys_read
	ldr	w1, [x23]
	bl	_ATF_REQUIRE_EQ
	ldrsw	x8, [x23]
	strb	wzr, [x20, x8]
Lloh16:
	adrp	x8, _FUNTEXT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _FUNTEXT@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ATF_REQUIRE_STREQ
	mov	x0, x21
	bl	_rump_sys_close
	bl	_RL
	ldr	w0, [x22]
Lloh19:
	adrp	x8, _O_WRONLY@GOTPAGE
Lloh20:
	ldr	x8, [x8, _O_WRONLY@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	bl	_rump_sys_open
	cmn	w0, #1
	cset	w1, eq
	mov	x0, x19
	bl	_ATF_REQUIRE_ERRNO
	ldr	w0, [x22]
Lloh22:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	bl	_rump_sys_open
	cmn	w0, #1
	cset	w1, eq
	mov	x0, x19
	bl	_ATF_REQUIRE_ERRNO
	bl	_FSTEST_EXIT
	ldur	x8, [x29, #-56]
Lloh25:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh26:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_2
; %bb.1:
	sub	sp, x29, #48
	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_2:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_FUNSIZE,4,2                    ; @FUNSIZE
	.comm	_EACCES,4,2                     ; @EACCES
	.comm	_EROFS,4,2                      ; @EROFS
	.comm	_AFILE,4,2                      ; @AFILE
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_FUNTEXT,4,2                    ; @FUNTEXT
	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.no_dead_strip	_fileio
.subsections_via_symbols
