	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_stream_line                ## -- Begin function get_stream_line
	.p2align	4, 0x90
_get_stream_line:                       ## @get_stream_line
	.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, %r14
	xorl	%r15d, %r15d
	movq	_EOF@GOTPCREL(%rip), %r13
	movq	_sbuf@GOTPCREL(%rip), %r12
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	incq	%r15
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_getc
	movl	%eax, %ebx
	cmpl	(%r13), %eax
	jne	LBB0_7
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	callq	_feof
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	callq	_ferror
	cmpl	$10, %ebx
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	testq	%rax, %rax
	je	LBB0_8
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$10, %ebx
	je	LBB0_5
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r12), %rdi
	movq	_sbufsz@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leal	1(%r15), %edx
	callq	_REALLOC
	movq	(%r12), %rax
	movb	%bl, (%rax,%r15)
	testb	%bl, %bl
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_isbinary@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	jmp	LBB0_10
LBB0_5:
	movq	(%r12), %rdi
	movq	_sbufsz@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leal	2(%r15), %edx
	movq	_ERR@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	callq	_REALLOC
	cmpl	$10, %ebx
	jne	LBB0_11
## %bb.6:
	movq	(%r12), %rax
	movl	%r15d, %ecx
	incl	%r15d
	movb	$10, (%rax,%rcx)
LBB0_16:
	movq	(%r12), %rcx
	movslq	%r15d, %rax
	movb	$0, (%rcx,%rax)
	movq	_isbinary@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	setne	%cl
	movq	_newline_added@GOTPCREL(%rip), %rdx
	cmpl	$0, (%rdx)
	setne	%dl
	andb	%cl, %dl
	testl	%eax, %eax
	setne	%cl
	andb	%dl, %cl
	movzbl	%cl, %ecx
	subl	%ecx, %eax
	jmp	LBB0_17
LBB0_11:
	movq	%r14, %rdi
	callq	_ferror
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movq	%rax, %rdx
	callq	_fprintf
	leaq	L_.str.1(%rip), %rax
	movq	_errmsg@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movl	(%r13), %eax
LBB0_17:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	testl	%r15d, %r15d
	je	LBB0_14
## %bb.15:
	movq	(%r12), %rax
	movl	%r15d, %ecx
	incl	%r15d
	movb	$10, (%rax,%rcx)
	movq	_newline_added@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	jmp	LBB0_16
LBB0_14:
	xorl	%r15d, %r15d
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_EOF,4,2                        ## @EOF
	.comm	_sbuf,8,3                       ## @sbuf
	.comm	_sbufsz,4,2                     ## @sbufsz
	.comm	_ERR,4,2                        ## @ERR
	.comm	_isbinary,4,2                   ## @isbinary
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s\n"

	.comm	_errno,4,2                      ## @errno
L_.str.1:                               ## @.str.1
	.asciz	"cannot read input file"

	.comm	_errmsg,8,3                     ## @errmsg
	.comm	_newline_added,4,2              ## @newline_added
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_stream_line                ; -- Begin function get_stream_line
	.p2align	2
_get_stream_line:                       ; @get_stream_line
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	mov	x24, #0
Lloh0:
	adrp	x26, _EOF@GOTPAGE
Lloh1:
	ldr	x26, [x26, _EOF@GOTPAGEOFF]
Lloh2:
	adrp	x21, _sbuf@GOTPAGE
Lloh3:
	ldr	x21, [x21, _sbuf@GOTPAGEOFF]
Lloh4:
	adrp	x25, _sbufsz@GOTPAGE
Lloh5:
	ldr	x25, [x25, _sbufsz@GOTPAGEOFF]
Lloh6:
	adrp	x23, _ERR@GOTPAGE
Lloh7:
	ldr	x23, [x23, _ERR@GOTPAGEOFF]
	mov	w27, #1
Lloh8:
	adrp	x22, _isbinary@GOTPAGE
Lloh9:
	ldr	x22, [x22, _isbinary@GOTPAGEOFF]
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	x24, x24, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_getc
	mov	x20, x0
	ldr	w8, [x26]
	cmp	w0, w8
	b.ne	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
	bl	_feof
	cbnz	w0, LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
	bl	_ferror
	cmp	w20, #10
	b.eq	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	cbz	x0, LBB0_7
	b	LBB0_9
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	cmp	w20, #10
	b.eq	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x21]
	ldr	w1, [x25]
	add	w2, w24, #1
	ldr	w3, [x23]
	bl	_REALLOC
	ldr	x8, [x21]
	strb	w20, [x8, x24]
	tst	w20, #0xff
	b.ne	LBB0_1
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	str	w27, [x22]
	b	LBB0_1
LBB0_9:
	ldr	x0, [x21]
	ldr	w1, [x25]
	add	w2, w24, #2
	ldr	w3, [x23]
	bl	_REALLOC
	cmp	w20, #10
	b.ne	LBB0_12
; %bb.10:
	ldr	x9, [x21]
	add	w8, w24, #1
	mov	w10, #10
	strb	w10, [x9, w24, uxtw]
LBB0_11:
	ldr	x9, [x21]
	strb	wzr, [x9, w8, sxtw]
	ldr	w9, [x22]
Lloh10:
	adrp	x10, _newline_added@GOTPAGE
Lloh11:
	ldr	x10, [x10, _newline_added@GOTPAGEOFF]
	cmp	w9, #0
Lloh12:
	ldr	w9, [x10]
	ccmp	w9, #0, #4, ne
	ccmp	w8, #0, #4, ne
	cset	w9, ne
	sub	w0, w8, w9
	b	LBB0_14
LBB0_12:
	mov	x0, x19
	bl	_ferror
	cbz	x0, LBB0_15
; %bb.13:
Lloh13:
	adrp	x8, _stderr@GOTPAGE
Lloh14:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh15:
	ldr	w19, [x8]
Lloh16:
	adrp	x8, _errno@GOTPAGE
Lloh17:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	bl	_strerror
	mov	x2, x0
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_fprintf
Lloh21:
	adrp	x8, _errmsg@GOTPAGE
Lloh22:
	ldr	x8, [x8, _errmsg@GOTPAGEOFF]
Lloh23:
	adrp	x9, l_.str.1@PAGE
Lloh24:
	add	x9, x9, l_.str.1@PAGEOFF
Lloh25:
	str	x9, [x8]
	ldr	w0, [x23]
LBB0_14:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_15:
	cbz	w24, LBB0_17
; %bb.16:
	ldr	x9, [x21]
	add	w8, w24, #1
	mov	w10, #10
	strb	w10, [x9, w24, uxtw]
Lloh26:
	adrp	x9, _newline_added@GOTPAGE
Lloh27:
	ldr	x9, [x9, _newline_added@GOTPAGEOFF]
	mov	w10, #1
Lloh28:
	str	w10, [x9]
	b	LBB0_11
LBB0_17:
	mov	w8, #0
	b	LBB0_11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotStr	Lloh21, Lloh22, Lloh25
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotStr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_EOF,4,2                        ; @EOF
	.comm	_sbuf,8,3                       ; @sbuf
	.comm	_sbufsz,4,2                     ; @sbufsz
	.comm	_ERR,4,2                        ; @ERR
	.comm	_isbinary,4,2                   ; @isbinary
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s\n"

	.comm	_errno,4,2                      ; @errno
l_.str.1:                               ; @.str.1
	.asciz	"cannot read input file"

	.comm	_errmsg,8,3                     ; @errmsg
	.comm	_newline_added,4,2              ; @newline_added
.subsections_via_symbols
