	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stdin_gets
_stdin_gets:                            ## @stdin_gets
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_stdin_buf@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	testq	%rdi, %rdi
	jne	LBB0_2
## %bb.1:
	movl	$96096, %edi                    ## imm = 0x17760
	callq	_malloc
	movq	%rax, %rdi
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_4
LBB0_2:
	movl	$96096, %edx                    ## imm = 0x17760
	xorl	%esi, %esi
	callq	_memset
	movq	(%r15), %rdi
	movq	_stdin@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movl	$96095, %esi                    ## imm = 0x1775F
	callq	_fgets
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	(%rbx), %edi
	callq	_feof
	testq	%rax, %rax
	je	LBB0_5
LBB0_4:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	(%r15), %r14
	movq	%r14, %rdi
	callq	_strlen
	cltq
	movq	$0, -8(%r14,%rax,8)
	movq	(%r15), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_strdup                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_stdin_buf,8,3                  ## @stdin_buf
	.comm	_stdin,4,2                      ## @stdin
	.comm	_STDIN_BUF_SIZE,8,3             ## @STDIN_BUF_SIZE
	.no_dead_strip	_stdin_gets
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stdin_gets
_stdin_gets:                            ; @stdin_gets
	.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	w19, #30560
	movk	w19, #1, lsl #16
Lloh0:
	adrp	x20, _stdin_buf@GOTPAGE
Lloh1:
	ldr	x20, [x20, _stdin_buf@GOTPAGEOFF]
	ldr	x0, [x20]
	cbnz	x0, LBB0_2
; %bb.1:
	mov	w0, #30560
	movk	w0, #1, lsl #16
	bl	_malloc
	str	x0, [x20]
	cbz	x0, LBB0_4
LBB0_2:
	mov	w1, #0
	mov	w2, #30560
	movk	w2, #1, lsl #16
	bl	_memset
	ldr	x0, [x20]
Lloh2:
	adrp	x21, _stdin@GOTPAGE
Lloh3:
	ldr	x21, [x21, _stdin@GOTPAGEOFF]
	ldr	w2, [x21]
	sub	x1, x19, #1
	bl	_fgets
	cbz	w0, LBB0_4
; %bb.3:
	ldr	w0, [x21]
	bl	_feof
	cbz	x0, LBB0_5
LBB0_4:
	mov	x0, #0
	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_5:
	ldr	x19, [x20]
	mov	x0, x19
	bl	_strlen
	sub	w8, w0, #1
	str	xzr, [x19, w8, sxtw #3]
	ldr	x0, [x20]
	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
	b	_strdup
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_stdin_buf,8,3                  ; @stdin_buf
	.comm	_stdin,4,2                      ; @stdin
	.comm	_STDIN_BUF_SIZE,8,3             ; @STDIN_BUF_SIZE
	.no_dead_strip	_stdin_gets
.subsections_via_symbols
