	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pgets                          ## -- Begin function pgets
	.p2align	4, 0x90
_pgets:                                 ## @pgets
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	movq	_pfp@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-40(%rbp), %rsi
	callq	_fgetln
	testq	%rax, %rax
	je	LBB0_16
## %bb.1:
	movq	%rax, %r12
	movq	-40(%rbp), %rax
	incq	%rax
	movq	_buf_size@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	cmpq	%rcx, %rax
	jbe	LBB0_5
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	addq	%rcx, %rcx
	cmpq	%rcx, %rax
	ja	LBB0_2
## %bb.3:
	movq	%rcx, (%r15)
	movq	_buf@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_free
	movq	(%r15), %rdi
	callq	_malloc
	movq	%rax, (%rbx)
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rdi
	callq	_fatal
LBB0_5:
	xorl	%eax, %eax
	cmpl	$1, %r14d
	jne	LBB0_15
## %bb.6:
	movq	_p_indent@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, %ecx
	je	LBB0_15
## %bb.7:
	jle	LBB0_15
## %bb.8:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	movslq	%edx, %rdi
	imulq	$-1840700269, %rdi, %rbx        ## imm = 0x92492493
	shrq	$32, %rbx
	addl	%edi, %ebx
	movl	%ebx, %esi
	shrl	$31, %esi
	sarl	$2, %ebx
	addl	%esi, %ebx
	leal	(,%rbx,8), %esi
	subl	%ebx, %esi
	subl	%edi, %esi
	addl	$8, %esi
LBB0_13:                                ##   in Loop: Header=BB0_9 Depth=1
	addl	%esi, %edx
	incq	%rax
	cmpl	%ecx, %edx
	jge	LBB0_14
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%r12,%rax), %ebx
	movl	$1, %esi
	cmpb	$88, %bl
	je	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpb	$32, %bl
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpb	$9, %bl
	je	LBB0_12
LBB0_14:
	addq	%rax, %r12
LBB0_15:
	movq	_buf@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	movq	-40(%rbp), %rdx
	movl	%eax, %ebx
	subq	%rbx, %rdx
	movq	%r12, %rsi
	callq	_memcpy
	movq	(%r14), %rax
	movq	-40(%rbp), %rcx
	subq	%rbx, %rcx
	movb	$0, (%rax,%rcx)
LBB0_16:
	movq	-40(%rbp), %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pfp,4,2                        ## @pfp
	.comm	_buf_size,8,3                   ## @buf_size
	.comm	_buf,8,3                        ## @buf
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"out of memory\n"

	.comm	_p_indent,4,2                   ## @p_indent
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pgets                          ; -- Begin function pgets
	.p2align	2
_pgets:                                 ; @pgets
	.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	x20, x0
Lloh0:
	adrp	x8, _pfp@GOTPAGE
Lloh1:
	ldr	x8, [x8, _pfp@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, sp, #8
	bl	_fgetln
	cbz	x0, LBB0_15
; %bb.1:
	mov	x19, x0
	ldr	x8, [sp, #8]
	add	x8, x8, #1
Lloh3:
	adrp	x22, _buf_size@GOTPAGE
Lloh4:
	ldr	x22, [x22, _buf_size@GOTPAGEOFF]
	ldr	x9, [x22]
Lloh5:
	adrp	x21, _buf@GOTPAGE
Lloh6:
	ldr	x21, [x21, _buf@GOTPAGEOFF]
	cmp	x8, x9
	b.ls	LBB0_5
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x9, x9, #1
	cmp	x8, x9
	b.hi	LBB0_2
; %bb.3:
	str	x9, [x22]
	ldr	x0, [x21]
	bl	_free
	ldr	x0, [x22]
	bl	_malloc
	str	x0, [x21]
	cbnz	x0, LBB0_5
; %bb.4:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_fatal
LBB0_5:
	mov	w8, #0
	cmp	w20, #1
	b.ne	LBB0_14
; %bb.6:
Lloh9:
	adrp	x9, _p_indent@GOTPAGE
Lloh10:
	ldr	x9, [x9, _p_indent@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w9, #0
	ccmp	w9, #1, #8, ne
	b.lt	LBB0_14
; %bb.7:
	mov	x8, #0
	mov	w10, #0
	mov	w11, #9363
	movk	w11, #37449, lsl #16
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
	smull	x12, w10, w11
	lsr	x12, x12, #32
	add	w12, w12, w10
	asr	w13, w12, #2
	add	w12, w13, w12, lsr #31
	lsl	w13, w12, #3
	sub	w12, w13, w12
	sub	w12, w12, w10
	add	w12, w12, #8
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x8, x8, #1
	add	w10, w12, w10
	cmp	w10, w9
	b.ge	LBB0_13
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w13, [x19, x8]
	mov	w12, #1
	cmp	w13, #88
	b.eq	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	cmp	w13, #32
	b.eq	LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	cmp	w13, #9
	b.eq	LBB0_8
LBB0_13:
	add	x19, x19, x8
LBB0_14:
	ldr	x0, [x21]
	ldr	x9, [sp, #8]
	mov	w20, w8
	sub	x2, x9, x20
	mov	x1, x19
	bl	_memcpy
	ldr	x8, [x21]
	ldr	x9, [sp, #8]
	sub	x9, x9, x20
	strb	wzr, [x8, x9]
LBB0_15:
	ldr	x0, [sp, #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
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_pfp,4,2                        ; @pfp
	.comm	_buf_size,8,3                   ; @buf_size
	.comm	_buf,8,3                        ; @buf
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"out of memory\n"

	.comm	_p_indent,4,2                   ; @p_indent
.subsections_via_symbols
