	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fgetln                         ## -- Begin function fgetln
	.p2align	4, 0x90
_fgetln:                                ## @fgetln
	.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	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	_fgetln.buf(%rip), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	_fgetln.bufsiz(%rip), %rbx
	jmp	LBB0_3
LBB0_2:
	movq	_BUFSIZ@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	%rbx, _fgetln.bufsiz(%rip)
	movq	%rbx, %rdi
	callq	_malloc
	movq	%rax, %rdi
	movq	%rax, _fgetln.buf(%rip)
	testq	%rax, %rax
	je	LBB0_14
LBB0_3:
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_fgets
	testq	%rax, %rax
	je	LBB0_14
## %bb.4:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	$0, (%rax)
	movq	_fgetln.buf(%rip), %r12
	movq	%r12, %rdi
	movl	$10, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_8
LBB0_5:
	subq	%r12, %rax
	incq	%rax
LBB0_6:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	jmp	LBB0_15
LBB0_8:
	movq	_fgetln.bufsiz(%rip), %r13
	movq	_BUFSIZ@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rbx
	addq	%r13, %rbx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_realloc
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%rax, _fgetln.buf(%rip)
	addq	%rax, %r13
	movq	(%r14), %rsi
	movq	%r13, %rdi
	movq	%r15, %rdx
	callq	_fgets
	testq	%rax, %rax
	je	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	_fgetln.bufsiz(%rip), %rdi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rdi, (%rax)
	movq	%rbx, _fgetln.bufsiz(%rip)
	movq	_fgetln.buf(%rip), %r12
	addq	%r12, %rdi
	movl	$10, %esi
	callq	_strchr
	movq	%rbx, %r13
	testq	%rax, %rax
	je	LBB0_9
	jmp	LBB0_5
LBB0_13:
	movq	_errno@GOTPCREL(%rip), %r14
	movl	(%r14), %ebx
	movq	%r12, %rdi
	callq	_free
	movl	%ebx, (%r14)
	movq	$0, _fgetln.buf(%rip)
LBB0_14:
	xorl	%r12d, %r12d
LBB0_15:
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	_fgetln.buf(%rip), %r12
	movq	_fgetln.bufsiz(%rip), %rax
	movb	$0, (%r12,%rax)
	movq	%r12, %rdi
	callq	_strlen
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_fgetln.buf,8,3  ## @fgetln.buf
.zerofill __DATA,__bss,_fgetln.bufsiz,8,3 ## @fgetln.bufsiz
	.comm	_BUFSIZ,8,3                     ## @BUFSIZ
	.comm	_errno,4,2                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fgetln                         ; -- Begin function fgetln
	.p2align	2
_fgetln:                                ; @fgetln
	.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, x1
	mov	x20, x0
	adrp	x23, _fgetln.buf@PAGE
	ldr	x0, [x23, _fgetln.buf@PAGEOFF]
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _fgetln.bufsiz@PAGE
Lloh1:
	ldr	x21, [x8, _fgetln.bufsiz@PAGEOFF]
	b	LBB0_3
LBB0_2:
Lloh2:
	adrp	x8, _BUFSIZ@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BUFSIZ@GOTPAGEOFF]
Lloh4:
	ldr	x21, [x8]
	adrp	x8, _fgetln.bufsiz@PAGE
	str	x21, [x8, _fgetln.bufsiz@PAGEOFF]
	mov	x0, x21
	bl	_malloc
	str	x0, [x23, _fgetln.buf@PAGEOFF]
	cbz	x0, LBB0_6
LBB0_3:
	mov	x1, x21
	mov	x2, x20
	bl	_fgets
	cbz	x0, LBB0_6
; %bb.4:
	str	xzr, [x19]
	ldr	x21, [x23, _fgetln.buf@PAGEOFF]
	mov	x0, x21
	mov	w1, #10
	bl	_strchr
	cbz	x0, LBB0_8
LBB0_5:
	sub	x8, x0, x21
	add	x8, x8, #1
	str	x8, [x19]
	b	LBB0_7
LBB0_6:
	mov	x21, #0
LBB0_7:
	mov	x0, x21
	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
LBB0_8:
	adrp	x24, _fgetln.bufsiz@PAGE
	ldr	x26, [x24, _fgetln.bufsiz@PAGEOFF]
Lloh5:
	adrp	x25, _BUFSIZ@GOTPAGE
Lloh6:
	ldr	x25, [x25, _BUFSIZ@GOTPAGEOFF]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25]
	add	x22, x8, x26
	mov	x0, x21
	mov	x1, x22
	bl	_realloc
	cbz	x0, LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	str	x0, [x23, _fgetln.buf@PAGEOFF]
	add	x0, x0, x26
	ldr	x1, [x25]
	mov	x2, x20
	bl	_fgets
	cbz	x0, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [x24, _fgetln.bufsiz@PAGEOFF]
	str	x8, [x19]
	str	x22, [x24, _fgetln.bufsiz@PAGEOFF]
	ldr	x21, [x23, _fgetln.buf@PAGEOFF]
	add	x0, x21, x8
	mov	w1, #10
	bl	_strchr
	mov	x26, x22
	cbz	x0, LBB0_9
	b	LBB0_5
LBB0_12:
Lloh7:
	adrp	x19, _errno@GOTPAGE
Lloh8:
	ldr	x19, [x19, _errno@GOTPAGEOFF]
	ldr	w20, [x19]
	mov	x0, x21
	bl	_free
	mov	x21, #0
	str	w20, [x19]
	str	xzr, [x23, _fgetln.buf@PAGEOFF]
	b	LBB0_7
LBB0_13:
	ldr	x21, [x23, _fgetln.buf@PAGEOFF]
	ldr	x8, [x24, _fgetln.bufsiz@PAGEOFF]
	strb	wzr, [x21, x8]
	mov	x0, x21
	bl	_strlen
	str	x0, [x19]
	b	LBB0_7
	.loh AdrpLdr	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_fgetln.buf,8,3  ; @fgetln.buf
.zerofill __DATA,__bss,_fgetln.bufsiz,8,3 ; @fgetln.bufsiz
	.comm	_BUFSIZ,8,3                     ; @BUFSIZ
	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
