	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___gets_unsafe                  ## -- Begin function __gets_unsafe
	.p2align	4, 0x90
___gets_unsafe:                         ## @__gets_unsafe
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_stdin@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_FLOCKFILE_CANCELSAFE
	movl	(%r14), %edi
	movl	$-1, %esi
	callq	_ORIENT
	cmpb	$0, ___gets_unsafe.warned(%rip)
	jne	LBB0_2
## %bb.1:
	movq	_STDERR_FILENO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	___gets_unsafe.w(%rip), %rsi
	movl	$52, %edx
	callq	__write
	movb	$1, ___gets_unsafe.warned(%rip)
LBB0_2:
	movl	(%r14), %edi
	callq	___sgetc
	movq	%r15, %rbx
	cmpl	$10, %eax
	je	LBB0_9
## %bb.3:
	xorl	%ebx, %ebx
	movq	_EOF@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	(%r12), %eax
	je	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movb	%al, (%r15,%rbx)
	movl	(%r14), %edi
	callq	___sgetc
	incq	%rbx
	cmpl	$10, %eax
	jne	LBB0_4
	jmp	LBB0_8
LBB0_5:
	testq	%rbx, %rbx
	je	LBB0_6
LBB0_8:
	addq	%r15, %rbx
LBB0_9:
	movb	$0, (%rbx)
LBB0_10:
	xorl	%eax, %eax
	callq	_FUNLOCKFILE_CANCELSAFE
	movq	%r15, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	xorl	%r15d, %r15d
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,___gets_unsafe.warned,1,2 ## @__gets_unsafe.warned
	.section	__TEXT,__const
	.p2align	4                               ## @__gets_unsafe.w
___gets_unsafe.w:
	.asciz	"warning: this program uses gets(), which is unsafe.\n"

	.comm	_stdin,4,2                      ## @stdin
	.comm	_STDERR_FILENO,4,2              ## @STDERR_FILENO
	.comm	_EOF,4,2                        ## @EOF
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___gets_unsafe                  ; -- Begin function __gets_unsafe
	.p2align	2
___gets_unsafe:                         ; @__gets_unsafe
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
Lloh0:
	adrp	x20, _stdin@GOTPAGE
Lloh1:
	ldr	x20, [x20, _stdin@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_FLOCKFILE_CANCELSAFE
	ldr	w0, [x20]
	mov	w1, #-1
	bl	_ORIENT
	adrp	x21, ___gets_unsafe.warned@PAGE
	ldrb	w8, [x21, ___gets_unsafe.warned@PAGEOFF]
	tbnz	w8, #0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _STDERR_FILENO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _STDERR_FILENO@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x1, ___gets_unsafe.w@PAGE
Lloh6:
	add	x1, x1, ___gets_unsafe.w@PAGEOFF
	mov	w2, #52
	bl	__write
	mov	w8, #1
	strb	w8, [x21, ___gets_unsafe.warned@PAGEOFF]
LBB0_2:
	ldr	w0, [x20]
	bl	___sgetc
	mov	x8, x19
	cmp	w0, #10
	b.eq	LBB0_8
; %bb.3:
	mov	x21, #0
Lloh7:
	adrp	x22, _EOF@GOTPAGE
Lloh8:
	ldr	x22, [x22, _EOF@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x22]
	cmp	w0, w8
	b.eq	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	strb	w0, [x19, x21]
	ldr	w0, [x20]
	bl	___sgetc
	add	x21, x21, #1
	cmp	w0, #10
	b.ne	LBB0_4
	b	LBB0_7
LBB0_6:
	cbz	x21, LBB0_10
LBB0_7:
	add	x8, x19, x21
LBB0_8:
	strb	wzr, [x8]
LBB0_9:
	bl	_FUNLOCKFILE_CANCELSAFE
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_10:
	mov	x19, #0
	b	LBB0_9
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,___gets_unsafe.warned,1,2 ; @__gets_unsafe.warned
	.section	__TEXT,__const
___gets_unsafe.w:                       ; @__gets_unsafe.w
	.asciz	"warning: this program uses gets(), which is unsafe.\n"

	.comm	_stdin,4,2                      ; @stdin
	.comm	_STDERR_FILENO,4,2              ; @STDERR_FILENO
	.comm	_EOF,4,2                        ; @EOF
.subsections_via_symbols
