	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function TB_getline
_TB_getline:                            ## @TB_getline
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	movq	%rsi, %r15
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.2:
	movq	%rdx, %r13
	movq	%rdi, %rbx
	movq	%rdx, %rdi
	callq	_ferror
	testq	%rax, %rax
	jne	LBB0_5
## %bb.7:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %r14
	testq	%r14, %r14
	je	LBB0_9
## %bb.8:
	movq	(%r15), %r12
	cmpq	$1, %r12
	jg	LBB0_11
LBB0_9:
	movq	$-1, -48(%rbp)                  ## 8-byte Folded Spill
	movl	$256, %r12d                     ## imm = 0x100
	movl	$256, %esi                      ## imm = 0x100
	movq	%r14, %rdi
	callq	_xrealloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.10:
	movq	%rax, %r14
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%r14, (%rax)
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	$256, (%r15)                    ## imm = 0x100
	jmp	LBB0_12
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_5:
	movq	$-1, -48(%rbp)                  ## 8-byte Folded Spill
LBB0_6:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	$-1, -48(%rbp)                  ## 8-byte Folded Spill
LBB0_12:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, %r15
LBB0_13:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_14 Depth 2
	movq	%r14, %rbx
	subq	%r15, %rbx
	.p2align	4, 0x90
LBB0_14:                                ##   Parent Loop BB0_13 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	$2, %r12
	jl	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=2
	movq	%r13, %rdi
	callq	_getc
	movq	_EOF@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_19
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=2
	movb	%al, (%r14)
	incq	%r14
	incq	%rbx
	decq	%r12
	cmpb	$10, %al
	jne	LBB0_14
	jmp	LBB0_20
LBB0_17:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	addq	%rsi, %rsi
	movq	%r15, %rdi
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	callq	_xrealloc
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	%rax, %r15
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%r15, (%rax)
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, (%rax)
	movq	%r15, %r14
	addq	%rbx, %r14
	subq	%rbx, %r12
	jmp	LBB0_13
LBB0_19:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpq	(%rax), %r14
	je	LBB0_6
LBB0_20:
	movb	$0, (%r14)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	subq	(%rax), %r14
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.comm	_EOF,4,2                        ## @EOF
	.comm	_MAX_CANON,8,3                  ## @MAX_CANON
	.no_dead_strip	_TB_getline
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function TB_getline
_TB_getline:                            ; @TB_getline
	.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
	cbz	x0, LBB0_14
; %bb.1:
	mov	x21, x1
	cbz	x1, LBB0_14
; %bb.2:
	mov	x20, x2
	mov	x19, x0
	mov	x0, x2
	bl	_ferror
	cbnz	x0, LBB0_15
; %bb.3:
	ldr	x22, [x19]
	cbz	x22, LBB0_5
; %bb.4:
	ldr	x23, [x21]
	cmp	x23, #1
	b.gt	LBB0_7
LBB0_5:
	mov	x0, x22
	mov	w1, #256
	bl	_xrealloc
	cbz	x0, LBB0_15
; %bb.6:
	mov	x22, x0
	str	x0, [x19]
	mov	w23, #256
	str	x23, [x21]
LBB0_7:
Lloh0:
	adrp	x25, _EOF@GOTPAGE
Lloh1:
	ldr	x25, [x25, _EOF@GOTPAGEOFF]
	mov	x27, x23
	mov	x24, x22
LBB0_8:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	sub	x26, x22, x24
LBB0_9:                                 ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	x27, #2
	b.lt	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	mov	x0, x20
	bl	_getc
	ldr	w8, [x25]
	cmp	w0, w8
	b.eq	LBB0_17
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=2
	strb	w0, [x22], #1
	and	w8, w0, #0xff
	add	x26, x26, #1
	sub	x27, x27, #1
	cmp	w8, #10
	b.ne	LBB0_9
	b	LBB0_18
LBB0_12:                                ;   in Loop: Header=BB0_8 Depth=1
	lsl	x23, x23, #1
	mov	x0, x24
	mov	x1, x23
	bl	_xrealloc
	cbz	x0, LBB0_17
; %bb.13:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x24, x0
	str	x0, [x19]
	str	x23, [x21]
	add	x22, x0, x26
	sub	x27, x23, x26
	b	LBB0_8
LBB0_14:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _errno@GOTPAGE
Lloh6:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh7:
	str	w8, [x9]
LBB0_15:
	mov	x0, #-1
LBB0_16:
	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_17:
	ldr	x8, [x19]
	cmp	x22, x8
	b.eq	LBB0_15
LBB0_18:
	strb	wzr, [x22]
	ldr	x8, [x19]
	sub	x0, x22, x8
	b	LBB0_16
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotStr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.comm	_EOF,4,2                        ; @EOF
	.comm	_MAX_CANON,8,3                  ; @MAX_CANON
	.no_dead_strip	_TB_getline
.subsections_via_symbols
