	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tcc_peekc_slow
_tcc_peekc_slow:                        ## @tcc_peekc_slow
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	8(%rdi), %rcx
	cmpq	%rcx, %rax
	jb	LBB0_5
## %bb.1:
	movl	16(%rbx), %edi
	cmpl	$-1, %edi
	je	LBB0_2
## %bb.3:
	movq	_IO_BUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	24(%rbx), %rsi
	callq	_read
	xorl	%ecx, %ecx
	testl	%eax, %eax
	cmovgl	%eax, %ecx
	jmp	LBB0_4
LBB0_2:
	xorl	%ecx, %ecx
LBB0_4:
	movq	_total_bytes@GOTPCREL(%rip), %rax
	addl	%ecx, (%rax)
	movq	24(%rbx), %rax
	movq	%rax, (%rbx)
	movl	%ecx, %edx
	leaq	(%rax,%rdx,4), %rcx
	movq	%rcx, 8(%rbx)
	movq	_CH_EOB@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movl	%esi, (%rax,%rdx,4)
LBB0_5:
	cmpq	%rcx, %rax
	jb	LBB0_7
## %bb.6:
	movq	%rcx, (%rbx)
	movq	_CH_EOF@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IO_BUF_SIZE,4,2                ## @IO_BUF_SIZE
	.comm	_total_bytes,4,2                ## @total_bytes
	.comm	_CH_EOB,4,2                     ## @CH_EOB
	.comm	_CH_EOF,4,2                     ## @CH_EOF
	.no_dead_strip	_tcc_peekc_slow
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tcc_peekc_slow
_tcc_peekc_slow:                        ; @tcc_peekc_slow
	.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
	ldp	x8, x9, [x0]
	cmp	x8, x9
	b.lo	LBB0_5
; %bb.1:
	ldr	w0, [x19, #16]
	cmn	w0, #1
	b.eq	LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _IO_BUF_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IO_BUF_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	ldr	x1, [x19, #24]
	bl	_read
	cmp	w0, #0
	csel	w9, w0, wzr, gt
	b	LBB0_4
LBB0_3:
	mov	w9, #0
LBB0_4:
Lloh3:
	adrp	x8, _total_bytes@GOTPAGE
Lloh4:
	ldr	x8, [x8, _total_bytes@GOTPAGEOFF]
	ldr	w10, [x8]
	add	w10, w10, w9
	str	w10, [x8]
	ldr	x8, [x19, #24]
	add	x9, x8, w9, uxtw #2
	stp	x8, x9, [x19]
Lloh5:
	adrp	x10, _CH_EOB@GOTPAGE
Lloh6:
	ldr	x10, [x10, _CH_EOB@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	str	w10, [x9]
LBB0_5:
	cmp	x8, x9
	b.lo	LBB0_7
; %bb.6:
	str	x9, [x19]
Lloh8:
	adrp	x8, _CH_EOF@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CH_EOF@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_IO_BUF_SIZE,4,2                ; @IO_BUF_SIZE
	.comm	_total_bytes,4,2                ; @total_bytes
	.comm	_CH_EOB,4,2                     ; @CH_EOB
	.comm	_CH_EOF,4,2                     ; @CH_EOF
	.no_dead_strip	_tcc_peekc_slow
.subsections_via_symbols
