	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xfgets
_xfgets:                                ## @xfgets
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	callq	_clearerr
	movq	$0, -24(%rbp)
	movq	$0, -16(%rbp)
	leaq	-16(%rbp), %rdi
	leaq	-24(%rbp), %rsi
	movq	%rbx, %rdx
	callq	_getline
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.1:
	movl	%eax, %ecx
	movq	-16(%rbp), %rax
	movslq	%ecx, %rcx
	cmpb	$10, -1(%rcx,%rax)
	jne	LBB0_6
## %bb.2:
	movb	$0, -1(%rax,%rcx)
	movq	-16(%rbp), %rax
	jmp	LBB0_6
LBB0_3:
	movq	%rbx, %rdi
	callq	_ferror
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movl	$2, %edi
	callq	_err
LBB0_5:
	xorl	%eax, %eax
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error reading file"

	.no_dead_strip	_xfgets
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xfgets
_xfgets:                                ; @xfgets
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_clearerr
	stp	xzr, xzr, [sp]
	mov	x0, sp
	add	x1, sp, #8
	mov	x2, x19
	bl	_getline
	cmn	w0, #1
	b.eq	LBB0_3
; %bb.1:
	mov	x8, x0
	ldr	x0, [sp]
	sxtw	x8, w8
	sub	x8, x8, #1
	ldrb	w9, [x0, x8]
	cmp	w9, #10
	b.ne	LBB0_5
; %bb.2:
	strb	wzr, [x0, x8]
	ldr	x0, [sp]
	b	LBB0_5
LBB0_3:
	mov	x0, x19
	bl	_ferror
	cbz	x0, LBB0_5
; %bb.4:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #2
	bl	_err
	mov	x0, #0
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error reading file"

	.no_dead_strip	_xfgets
.subsections_via_symbols
