	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_line
_get_line:                              ## @get_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	leaq	-24(%rbp), %rsi
	callq	_fgetln
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	-24(%rbp), %rax
	cmpb	$10, -1(%rax,%rbx)
	je	LBB0_4
## %bb.3:
	incq	%rax
	movq	%rax, -24(%rbp)
LBB0_4:
	incq	%rax
	movq	_get_line.bufsize(%rip), %rcx
	cmpq	%rcx, %rax
	jbe	LBB0_7
## %bb.5:
	leaq	1024(%rcx), %rdx
	cmpq	%rax, %rdx
	cmovaq	%rdx, %rax
	movq	%rcx, %rdx
	notq	%rdx
	addq	%rax, %rdx
	andq	$-1024, %rdx                    ## imm = 0xFC00
	leaq	(%rcx,%rdx), %rsi
	addq	$1024, %rsi                     ## imm = 0x400
	movq	%rsi, _get_line.bufsize(%rip)
	movq	_get_line.buf(%rip), %rdi
	callq	_realloc
	movq	%rax, _get_line.buf(%rip)
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_err
LBB0_7:
	movq	_get_line.buf(%rip), %rdi
	movq	-24(%rbp), %rdx
	decq	%rdx
	movq	%rbx, %rsi
	callq	_memcpy
	movq	_get_line.buf(%rip), %rax
	movq	-24(%rbp), %rcx
	movb	$10, -1(%rcx,%rax)
	movq	-24(%rbp), %rcx
	movb	$0, (%rax,%rcx)
	testq	%r14, %r14
	je	LBB0_9
## %bb.8:
	movq	-24(%rbp), %rcx
	movq	%rcx, (%r14)
	jmp	LBB0_9
LBB0_1:
	xorl	%eax, %eax
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_get_line.buf,8,3 ## @get_line.buf
.zerofill __DATA,__bss,_get_line.bufsize,8,3 ## @get_line.bufsize
	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
	.no_dead_strip	_get_line
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_line
_get_line:                              ; @get_line
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x1
	add	x1, sp, #8
	bl	_fgetln
	cbz	x0, LBB0_8
; %bb.1:
	mov	x20, x0
	ldr	x8, [sp, #8]
	add	x9, x8, x0
	ldurb	w9, [x9, #-1]
	cmp	w9, #10
	b.eq	LBB0_3
; %bb.2:
	add	x8, x8, #1
	str	x8, [sp, #8]
LBB0_3:
	add	x10, x8, #1
	adrp	x8, _get_line.bufsize@PAGE
	ldr	x9, [x8, _get_line.bufsize@PAGEOFF]
	adrp	x21, _get_line.buf@PAGE
	cmp	x10, x9
	b.ls	LBB0_6
; %bb.4:
	add	x11, x9, #1024
	cmp	x11, x10
	csel	x10, x11, x10, hi
	mvn	x11, x9
	add	x10, x10, x11
	and	x10, x10, #0xfffffffffffffc00
	add	x9, x9, x10
	add	x1, x9, #1024
	str	x1, [x8, _get_line.bufsize@PAGEOFF]
	ldr	x0, [x21, _get_line.buf@PAGEOFF]
	bl	_realloc
	str	x0, [x21, _get_line.buf@PAGEOFF]
	cbnz	x0, LBB0_6
; %bb.5:
Lloh0:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, #0
	bl	_err
LBB0_6:
	ldr	x0, [x21, _get_line.buf@PAGEOFF]
	ldr	x8, [sp, #8]
	sub	x2, x8, #1
	mov	x1, x20
	bl	_memcpy
	ldr	x0, [x21, _get_line.buf@PAGEOFF]
	ldr	x8, [sp, #8]
	add	x8, x8, x0
	mov	w9, #10
	sturb	w9, [x8, #-1]
	ldr	x8, [sp, #8]
	strb	wzr, [x0, x8]
	cbz	x19, LBB0_8
; %bb.7:
	ldr	x8, [sp, #8]
	str	x8, [x19]
LBB0_8:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_get_line.buf,8,3 ; @get_line.buf
.zerofill __DATA,__bss,_get_line.bufsize,8,3 ; @get_line.bufsize
	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
	.no_dead_strip	_get_line
.subsections_via_symbols
