	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function readin
_readin:                                ## @readin
	.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
	movl	$1, %edi
	callq	_assert
	movq	_rptr@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	leaq	(%rax,%rbx), %rcx
	movq	_wptr@GOTPCREL(%rip), %r15
	movq	(%r15), %rdx
	cmpq	%rdx, %rcx
	jbe	LBB0_7
## %bb.1:
	movq	_Buff@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	movq	_BUFFSIZE@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	addq	%rdi, %rcx
	cmpq	%rcx, %rdx
	jge	LBB0_3
## %bb.2:
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_3:
	subq	%rax, %rdx
	movq	%rax, %rsi
	callq	_memcpy
	movq	(%r13), %rdx
	movq	%rdx, %rsi
	subq	(%r14), %rsi
	addq	(%r15), %rsi
	movq	%rsi, (%r15)
	movq	%rdx, (%r14)
	movq	_idx_fd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	subq	%rsi, %rdx
	addq	(%r12), %rdx
	callq	_read
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movl	%eax, %ecx
	addq	(%r15), %rcx
	movq	%rcx, (%r15)
	jmp	LBB0_6
LBB0_4:
	leaq	L_.str(%rip), %rdi
	callq	_kprintf
	movq	(%r15), %rcx
LBB0_6:
	movq	(%r14), %rdx
	addq	%rdx, %rbx
	xorl	%eax, %eax
	cmpq	%rcx, %rbx
	cmovbeq	%rdx, %rax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_rptr,8,3                       ## @rptr
	.comm	_wptr,8,3                       ## @wptr
	.comm	_Buff,8,3                       ## @Buff
	.comm	_BUFFSIZE,8,3                   ## @BUFFSIZE
	.comm	_idx_fd,4,2                     ## @idx_fd
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error reading file: %m\n"

	.no_dead_strip	_readin
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function readin
_readin:                                ; @readin
	.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
	mov	x19, x0
	mov	w0, #1
	bl	_assert
Lloh0:
	adrp	x20, _rptr@GOTPAGE
Lloh1:
	ldr	x20, [x20, _rptr@GOTPAGEOFF]
	ldr	x1, [x20]
Lloh2:
	adrp	x21, _wptr@GOTPAGE
Lloh3:
	ldr	x21, [x21, _wptr@GOTPAGEOFF]
	ldr	x8, [x21]
	add	x9, x1, x19
	cmp	x9, x8
	b.ls	LBB0_7
; %bb.1:
Lloh4:
	adrp	x23, _Buff@GOTPAGE
Lloh5:
	ldr	x23, [x23, _Buff@GOTPAGEOFF]
	ldr	x0, [x23]
Lloh6:
	adrp	x22, _BUFFSIZE@GOTPAGE
Lloh7:
	ldr	x22, [x22, _BUFFSIZE@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x9, x9, x0
	cmp	x8, x9
	b.ge	LBB0_3
; %bb.2:
	mov	x1, #0
	b	LBB0_7
LBB0_3:
	sub	x2, x8, x1
	bl	_memcpy
	ldr	x8, [x20]
	ldr	x9, [x23]
	ldr	x10, [x21]
	sub	x8, x9, x8
	add	x1, x8, x10
	str	x1, [x21]
	str	x9, [x20]
Lloh8:
	adrp	x8, _idx_fd@GOTPAGE
Lloh9:
	ldr	x8, [x8, _idx_fd@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	ldr	x8, [x22]
	sub	x9, x9, x1
	add	x2, x9, x8
	bl	_read
	tbnz	w0, #31, LBB0_5
; %bb.4:
	ldr	x8, [x21]
	add	x8, x8, w0, uxtw
	str	x8, [x21]
	b	LBB0_6
LBB0_5:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_kprintf
	ldr	x8, [x21]
LBB0_6:
	ldr	x9, [x20]
	add	x10, x9, x19
	cmp	x10, x8
	csel	x1, xzr, x9, hi
LBB0_7:
	mov	x0, x1
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_rptr,8,3                       ; @rptr
	.comm	_wptr,8,3                       ; @wptr
	.comm	_Buff,8,3                       ; @Buff
	.comm	_BUFFSIZE,8,3                   ; @BUFFSIZE
	.comm	_idx_fd,4,2                     ; @idx_fd
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error reading file: %m\n"

	.no_dead_strip	_readin
.subsections_via_symbols
