	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgets
_xgets:                                 ## @xgets
	.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	%rdx, %r14
	movl	%esi, %r12d
	movq	%rdi, %r13
	xorl	%r15d, %r15d
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movslq	%r12d, %rbx
	decq	%rbx
	movq	%r13, %rdi
	movl	%ebx, %esi
	movq	%r14, %rdx
	callq	_fgets
	testq	%rax, %rax
	je	LBB0_9
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	incl	%r15d
	movb	$0, (%r13,%rbx)
	movq	%r13, %rdi
	callq	_strlen
	testl	%eax, %eax
	je	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movslq	%eax, %rcx
	movl	%eax, %esi
	negl	%esi
	leaq	(%rcx,%r13), %rdi
	decq	%rdi
	xorl	%edx, %edx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=2
	movb	$0, (%rdi,%rdx)
	decq	%rdx
	cmpl	%edx, %esi
	je	LBB0_9
LBB0_4:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	(%rdi,%rdx), %ebx
	cmpb	$13, %bl
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	cmpb	$10, %bl
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpb	$92, %bl
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	subl	%eax, %r12d
	incl	%r12d
	movl	%r12d, %eax
	subl	%edx, %eax
	addq	%rcx, %r13
	addq	%rdx, %r13
	decq	%r13
	cmpl	%edx, %r12d
	movl	%eax, %r12d
	jne	LBB0_1
LBB0_9:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_xgets
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgets
_xgets:                                 ; @xgets
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
	mov	w19, #0
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
	sxtw	x8, w22
	sub	x23, x8, #1
	mov	x0, x21
	mov	x1, x23
	mov	x2, x20
	bl	_fgets
	cbz	x0, LBB0_7
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	add	w19, w19, #1
	strb	wzr, [x21, x23]
	mov	x0, x21
	bl	_strlen
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x8, #0
	sxtw	x9, w0
	neg	w10, w0
	add	x11, x21, x9
	sub	x11, x11, #1
LBB0_4:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrb	w12, [x11, x8]
	cmp	w12, #13
	ccmp	w12, #10, #4, ne
	b.ne	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=2
	strb	wzr, [x11, x8]
	sub	x8, x8, #1
	cmp	w10, w8
	b.ne	LBB0_4
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_1 Depth=1
	sub	w10, w22, w0
	add	w10, w10, #1
	sub	w22, w10, w8
	add	x9, x21, x9
	add	x9, x9, x8
	sub	x21, x9, #1
	cmp	w12, #92
	ccmp	w10, w8, #4, eq
	b.ne	LBB0_1
LBB0_7:
	mov	x0, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_xgets
.subsections_via_symbols
