	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_byte
_read_byte:                             ## @read_byte
	.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	%rdi, %rbx
	movl	16(%rdi), %edi
	callq	_getc
	cmpl	$255, %eax
	ja	LBB0_2
## %bb.1:
	incl	20(%rbx)
	jmp	LBB0_11
LBB0_2:
	movq	_EOF@GOTPCREL(%rip), %r14
	cmpl	(%r14), %eax
	jne	LBB0_3
## %bb.4:
	movl	16(%rbx), %edi
	callq	_ferror
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_errno@GOTPCREL(%rip), %rax
LBB0_9:
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	jmp	LBB0_10
LBB0_3:
	movq	_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
	movq	_ERANGE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	movq	_UNEXPECTED_ERROR_CODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	callq	_emit_error
LBB0_10:
	movq	_TRUNCATED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
	movl	(%r14), %eax
LBB0_11:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	movl	16(%rbx), %edi
	callq	_feof
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	$0, 8(%rbx)
	jmp	LBB0_10
LBB0_8:
	movq	_EDOM@GOTPCREL(%rip), %rax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_EOF,4,2                        ## @EOF
	.comm	_INTERNAL_ERROR,4,2             ## @INTERNAL_ERROR
	.comm	_ERANGE,8,3                     ## @ERANGE
	.comm	_UNEXPECTED_ERROR_CODE,4,2      ## @UNEXPECTED_ERROR_CODE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"file read"

	.comm	_errno,8,3                      ## @errno
	.comm	_EDOM,8,3                       ## @EDOM
	.comm	_TRUNCATED,4,2                  ## @TRUNCATED
	.comm	_EINTR,8,3                      ## @EINTR
	.no_dead_strip	_read_byte
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_byte
_read_byte:                             ; @read_byte
	.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
	mov	x19, x0
	ldr	w0, [x0, #16]
	bl	_getc
	cmp	w0, #255
	b.hi	LBB0_2
; %bb.1:
	ldr	w8, [x19, #20]
	add	w8, w8, #1
	str	w8, [x19, #20]
	b	LBB0_8
LBB0_2:
Lloh0:
	adrp	x20, _EOF@GOTPAGE
Lloh1:
	ldr	x20, [x20, _EOF@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w0, w8
	b.ne	LBB0_6
; %bb.3:
	ldr	w0, [x19, #16]
	bl	_ferror
	cbz	x0, LBB0_9
; %bb.4:
Lloh2:
	adrp	x8, _errno@GOTPAGE
Lloh3:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
LBB0_5:
	ldr	x8, [x8]
	str	x8, [x19, #8]
	b	LBB0_7
LBB0_6:
Lloh4:
	adrp	x8, _INTERNAL_ERROR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _INTERNAL_ERROR@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
Lloh7:
	adrp	x9, _ERANGE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _ERANGE@GOTPAGEOFF]
	str	w8, [x19]
Lloh9:
	ldr	x8, [x9]
	str	x8, [x19, #8]
Lloh10:
	adrp	x8, _UNEXPECTED_ERROR_CODE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _UNEXPECTED_ERROR_CODE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x2, l_.str@PAGE
Lloh14:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_emit_error
LBB0_7:
Lloh15:
	adrp	x8, _TRUNCATED@GOTPAGE
Lloh16:
	ldr	x8, [x8, _TRUNCATED@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	ldr	w0, [x20]
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_9:
	ldr	w0, [x19, #16]
	bl	_feof
	cbz	x0, LBB0_11
; %bb.10:
	str	xzr, [x19, #8]
	b	LBB0_7
LBB0_11:
Lloh18:
	adrp	x8, _EDOM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EDOM@GOTPAGEOFF]
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_EOF,4,2                        ; @EOF
	.comm	_INTERNAL_ERROR,4,2             ; @INTERNAL_ERROR
	.comm	_ERANGE,8,3                     ; @ERANGE
	.comm	_UNEXPECTED_ERROR_CODE,4,2      ; @UNEXPECTED_ERROR_CODE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"file read"

	.comm	_errno,8,3                      ; @errno
	.comm	_EDOM,8,3                       ; @EDOM
	.comm	_TRUNCATED,4,2                  ; @TRUNCATED
	.comm	_EINTR,8,3                      ; @EINTR
	.no_dead_strip	_read_byte
.subsections_via_symbols
