	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lafe_line_reader_next          ## -- Begin function lafe_line_reader_next
	.p2align	4, 0x90
_lafe_line_reader_next:                 ## @lafe_line_reader_next
	.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, %r13
	movq	_errno@GOTPCREL(%rip), %r15
	leaq	L_.str.1(%rip), %r14
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	$0, 40(%r13)
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movq	8(%r13), %rdx
	cmpq	%rdx, %rax
	jae	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	16(%r13), %rbx
	incq	%rax
	movq	%rax, (%r13)
	movq	%rax, 16(%r13)
	movq	%r13, %rdi
	callq	_lafe_line_reader_find_eol
	cmpq	$0, 56(%r13)
	jne	LBB0_21
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpb	$0, (%rbx)
	je	LBB0_1
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	cmpq	$0, 40(%r13)
	movq	16(%r13), %rbx
	je	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	24(%r13), %rdi
	cmpq	%rdi, %rbx
	jbe	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	subl	%ebx, %edx
	movq	%rbx, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memmove
	movq	24(%r13), %r12
	movq	%r12, %rax
	subq	16(%r13), %rax
	movq	8(%r13), %rdi
	addq	%rax, %rdi
	movq	%rdi, 8(%r13)
	addq	%rax, (%r13)
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	movslq	32(%r13), %rax
	movq	%rax, %rbx
	addq	%rax, %rbx
	cmpl	%eax, %ebx
	ja	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	48(%r13), %ecx
	movl	$1, %edi
	leaq	L_.str(%rip), %rdx
	callq	_lafe_errc
	movq	24(%r13), %rdi
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	%ebx, 32(%r13)
	orq	$1, %rbx
	movq	%rbx, %rsi
	callq	_realloc
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	48(%r13), %ecx
	movl	$1, %edi
	leaq	L_.str(%rip), %rdx
	callq	_lafe_errc
LBB0_13:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r13), %rax
	movq	8(%r13), %rdi
	movq	24(%r13), %rcx
	subq	%rcx, %rdi
	addq	%r12, %rdi
	movq	%rdi, 8(%r13)
	subq	%rcx, %rax
	addq	%r12, %rax
	movq	%rax, (%r13)
	movq	%r12, 24(%r13)
LBB0_14:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, 16(%r13)
	movslq	32(%r13), %rdx
	addq	%r12, %rdx
	subq	%rdi, %rdx
	movq	40(%r13), %rcx
	movl	$1, %esi
	callq	_fread
	movq	8(%r13), %rcx
	leaq	(%rcx,%rax), %rdx
	movq	%rdx, 8(%r13)
	movb	$0, (%rcx,%rax)
	movq	%r13, %rdi
	callq	_lafe_line_reader_find_eol
	movq	40(%r13), %rbx
	movq	%rbx, %rdi
	callq	_ferror
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r15), %esi
	movl	48(%r13), %ecx
	movl	$1, %edi
	movq	%r14, %rdx
	callq	_lafe_errc
	movq	40(%r13), %rbx
LBB0_16:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	callq	_feof
	testq	%rax, %rax
	je	LBB0_1
## %bb.17:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	40(%r13), %rdi
	movq	_stdin@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_1 Depth=1
	callq	_fclose
	jmp	LBB0_19
LBB0_5:
	cmpq	%rdx, %rbx
	je	LBB0_6
## %bb.20:
	movq	%rdx, 16(%r13)
	jmp	LBB0_21
LBB0_6:
	xorl	%ebx, %ebx
LBB0_21:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Line too long in %s"

	.comm	_errno,4,2                      ## @errno
L_.str.1:                               ## @.str.1
	.asciz	"Can't read %s"

	.comm	_stdin,8,3                      ## @stdin
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lafe_line_reader_next          ; -- Begin function lafe_line_reader_next
	.p2align	2
_lafe_line_reader_next:                 ; @lafe_line_reader_next
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
Lloh0:
	adrp	x23, _stdin@GOTPAGE
Lloh1:
	ldr	x23, [x23, _stdin@GOTPAGEOFF]
Lloh2:
	adrp	x24, _errno@GOTPAGE
Lloh3:
	ldr	x24, [x24, _errno@GOTPAGEOFF]
Lloh4:
	adrp	x20, l_.str.1@PAGE
Lloh5:
	add	x20, x20, l_.str.1@PAGEOFF
Lloh6:
	adrp	x25, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x25, [x25, _ENOMEM@GOTPAGEOFF]
Lloh8:
	adrp	x21, l_.str@PAGE
Lloh9:
	add	x21, x21, l_.str@PAGEOFF
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	str	xzr, [x19, #40]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x9, x8, [x19]
	cmp	x9, x8
	b.hs	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x22, [x19, #16]
	add	x8, x9, #1
	str	x8, [x19]
	str	x8, [x19, #16]
	mov	x0, x19
	bl	_lafe_line_reader_find_eol
	ldr	x8, [x19, #56]
	cbnz	x8, LBB0_21
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldrb	w8, [x22]
	cbz	w8, LBB0_2
	b	LBB0_21
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x9, [x19, #40]
	ldr	x22, [x19, #16]
	cbz	x9, LBB0_18
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x19, #24]
	cmp	x22, x0
	b.ls	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	w2, w8, w22
	mov	x1, x22
	bl	_memmove
	ldp	x8, x22, [x19, #16]
	ldp	x10, x9, [x19]
	sub	x8, x22, x8
	add	x0, x9, x8
	add	x8, x10, x8
	stp	x8, x0, [x19]
	b	LBB0_13
LBB0_8:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldrsw	x8, [x19, #32]
	lsl	x22, x8, #1
	cmp	w22, w8
	b.hi	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x25]
	ldr	w3, [x19, #48]
	mov	w0, #1
	mov	x2, x21
	bl	_lafe_errc
	ldr	x0, [x19, #24]
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=1
	str	w22, [x19, #32]
	orr	x1, x22, #0x1
	bl	_realloc
	mov	x22, x0
	cbnz	x0, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x25]
	ldr	w3, [x19, #48]
	mov	w0, #1
	mov	x2, x21
	bl	_lafe_errc
LBB0_12:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19, #24]
	ldp	x10, x9, [x19]
	sub	x9, x9, x8
	add	x0, x22, x9
	sub	x8, x10, x8
	add	x8, x22, x8
	stp	x8, x0, [x19]
	str	x22, [x19, #24]
LBB0_13:                                ;   in Loop: Header=BB0_2 Depth=1
	str	x22, [x19, #16]
	ldrsw	x8, [x19, #32]
	add	x8, x22, x8
	sub	x2, x8, x0
	ldr	x3, [x19, #40]
	mov	w1, #1
	bl	_fread
	ldr	x8, [x19, #8]
	add	x9, x8, x0
	str	x9, [x19, #8]
	strb	wzr, [x8, x0]
	mov	x0, x19
	bl	_lafe_line_reader_find_eol
	ldr	x22, [x19, #40]
	mov	x0, x22
	bl	_ferror
	cbz	x0, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x24]
	ldr	w3, [x19, #48]
	mov	w0, #1
	mov	x2, x20
	bl	_lafe_errc
	ldr	x22, [x19, #40]
LBB0_15:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x22
	bl	_feof
	cbz	x0, LBB0_2
; %bb.16:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x19, #40]
	ldr	x8, [x23]
	cmp	x0, x8
	b.eq	LBB0_1
; %bb.17:                               ;   in Loop: Header=BB0_2 Depth=1
	bl	_fclose
	b	LBB0_1
LBB0_18:
	cmp	x22, x8
	b.eq	LBB0_20
; %bb.19:
	str	x8, [x19, #16]
	b	LBB0_21
LBB0_20:
	mov	x22, #0
LBB0_21:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Line too long in %s"

	.comm	_errno,4,2                      ; @errno
l_.str.1:                               ; @.str.1
	.asciz	"Can't read %s"

	.comm	_stdin,8,3                      ; @stdin
.subsections_via_symbols
