	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xread_tfile
_xread_tfile:                           ## @xread_tfile
	.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	%rbx
	subq	$136, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	_MAXPATHLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_strcpy
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcat
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_strcat
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rump_sys_open
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, %ebx
	leaq	-160(%rbp), %rsi
	movl	%eax, %edi
	movl	$128, %edx
	callq	_rump_sys_read
	cmpl	$-1, %eax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	callq	_atf_tc_fail_errno
LBB0_4:
	movl	%ebx, %edi
	callq	_rump_sys_close
	movl	%eax, %edi
	callq	_RL
	movq	_MSTR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-160(%rbp), %rdi
	callq	_strcmp
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.5:
	movq	_EPROGMISMATCH@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_1:
	movq	_errno@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-32(%rbp), %rcx
	jne	LBB0_9
## %bb.8:
	leaq	-24(%rbp), %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXPATHLEN,4,2                 ## @MAXPATHLEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/"

	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_errno,4,2                      ## @errno
L_.str.1:                               ## @.str.1
	.asciz	"read tfile"

	.comm	_MSTR,4,2                       ## @MSTR
	.comm	_EPROGMISMATCH,4,2              ## @EPROGMISMATCH
	.no_dead_strip	_xread_tfile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xread_tfile
_xread_tfile:                           ; @xread_tfile
	.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
	sub	sp, sp, #144
	mov	x19, x1
	mov	x1, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
Lloh3:
	adrp	x8, _MAXPATHLEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAXPATHLEN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	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
	mov	x0, x20
	bl	_strcpy
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_strcat
	mov	x0, x20
	mov	x1, x19
	bl	_strcat
Lloh10:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_rump_sys_open
	cmn	w0, #1
	b.eq	LBB0_4
; %bb.1:
	mov	x19, x0
	sub	x1, x29, #152
	mov	w2, #128
	bl	_rump_sys_read
	cmn	w0, #1
	b.ne	LBB0_3
; %bb.2:
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_atf_tc_fail_errno
LBB0_3:
	mov	x0, x19
	bl	_rump_sys_close
	bl	_RL
Lloh15:
	adrp	x8, _MSTR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MSTR@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	sub	x0, x29, #152
	bl	_strcmp
Lloh18:
	adrp	x8, _EPROGMISMATCH@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EPROGMISMATCH@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w0, wzr, w8, eq
	b	LBB0_5
LBB0_4:
Lloh21:
	adrp	x8, _errno@GOTPAGE
Lloh22:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
LBB0_5:
	ldur	x8, [x29, #-24]
Lloh24:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh25:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	sub	sp, x29, #16
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXPATHLEN,4,2                 ; @MAXPATHLEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/"

	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_errno,4,2                      ; @errno
l_.str.1:                               ; @.str.1
	.asciz	"read tfile"

	.comm	_MSTR,4,2                       ; @MSTR
	.comm	_EPROGMISMATCH,4,2              ; @EPROGMISMATCH
	.no_dead_strip	_xread_tfile
.subsections_via_symbols
