	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mem_gets
_mem_gets:                              ## @mem_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	8(%rdi), %rax
	movq	_BIO_FLAGS_MEM_RDONLY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%edx, %edx
	andl	(%rdi), %ecx
	sete	%dl
	movq	(%rax,%rdx,8), %r12
	callq	_BIO_clear_retry_flags
	movl	(%r12), %ecx
	leal	-1(%rbx), %eax
	cmpl	%ebx, %ecx
	cmovll	%ecx, %eax
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	movq	8(%r12), %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpb	$10, (%rcx,%rdx)
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_3
## %bb.6:
	movl	%eax, %edx
	jmp	LBB0_7
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_4:
	incl	%edx
LBB0_7:
	movq	%r15, %rdi
	movq	%r14, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_mem_read
	testl	%eax, %eax
	jle	LBB0_10
## %bb.8:
	movl	%eax, %ecx
	addq	%rcx, %r14
LBB0_9:
	movb	$0, (%r14)
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BIO_FLAGS_MEM_RDONLY,4,2       ## @BIO_FLAGS_MEM_RDONLY
	.no_dead_strip	_mem_gets
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mem_gets
_mem_gets:                              ; @mem_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	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x9, _BIO_FLAGS_MEM_RDONLY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BIO_FLAGS_MEM_RDONLY@GOTPAGEOFF]
	ldr	w10, [x0]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w10
	cset	w9, eq
	ldr	x22, [x8, w9, uxtw #3]
	bl	_BIO_clear_retry_flags
	ldr	w8, [x22]
	sub	w9, w21, #1
	cmp	w8, w21
	csel	w2, w8, w9, lt
	cmp	w2, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x8, #0
	ldr	x9, [x22, #8]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w10, [x9, x8]
	cmp	w10, #10
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x8, x8, #1
	cmp	x2, x8
	b.ne	LBB0_2
	b	LBB0_6
LBB0_4:
	mov	w0, #0
	b	LBB0_8
LBB0_5:
	add	w2, w8, #1
LBB0_6:
	mov	x0, x20
	mov	x1, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_mem_read
	cmp	w0, #1
	b.lt	LBB0_9
; %bb.7:
	add	x19, x19, w0, uxtw
LBB0_8:
	strb	wzr, [x19]
LBB0_9:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_BIO_FLAGS_MEM_RDONLY,4,2       ; @BIO_FLAGS_MEM_RDONLY
	.no_dead_strip	_mem_gets
.subsections_via_symbols
