	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mem_read
_mem_read:                              ## @mem_read
	.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
	movl	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %r14
	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), %r13
	callq	_BIO_clear_retry_flags
	testl	%r15d, %r15d
	js	LBB0_1
## %bb.2:
	movl	%r15d, %ecx
	movq	(%r13), %rax
	cmpq	%rcx, %rax
	movl	%eax, %ebx
	cmovael	%r15d, %ebx
	testq	%r12, %r12
	je	LBB0_4
## %bb.3:
	testl	%ebx, %ebx
	jle	LBB0_4
## %bb.10:
	movl	8(%r13), %esi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_memcpy
	movl	%ebx, %eax
	subq	%rax, (%r13)
	subl	%ebx, 12(%r13)
	addl	%ebx, 8(%r13)
	jmp	LBB0_9
LBB0_1:
	movq	(%r13), %rax
	jmp	LBB0_5
LBB0_4:
	movl	%ebx, %r15d
LBB0_5:
	movl	%r15d, %ebx
	testq	%rax, %rax
	jne	LBB0_9
## %bb.6:
	movl	4(%r14), %ebx
	testl	%ebx, %ebx
	je	LBB0_7
## %bb.8:
	movq	%r14, %rdi
	callq	_BIO_set_retry_read
	jmp	LBB0_9
LBB0_7:
	xorl	%ebx, %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	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_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mem_read
_mem_read:                              ; @mem_read
	.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, x2
	mov	x21, 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
	tbnz	w19, #31, LBB0_4
; %bb.1:
	ldr	x8, [x22]
	cmp	x8, w19, uxtw
	csel	w19, w8, w19, lo
	cbz	x21, LBB0_5
; %bb.2:
	cmp	w19, #1
	b.lt	LBB0_5
; %bb.3:
	ldr	w1, [x22, #8]
	mov	x0, x21
	mov	x2, x19
	bl	_memcpy
	ldr	x8, [x22]
	sub	x8, x8, w19, uxtw
	str	x8, [x22]
	ldp	w9, w8, [x22, #8]
	sub	w8, w8, w19
	add	w9, w9, w19
	stp	w9, w8, [x22, #8]
	b	LBB0_8
LBB0_4:
	ldr	x8, [x22]
LBB0_5:
	cbnz	x8, LBB0_8
; %bb.6:
	ldr	w19, [x20, #4]
	cbz	w19, LBB0_8
; %bb.7:
	mov	x0, x20
	bl	_BIO_set_retry_read
LBB0_8:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_BIO_FLAGS_MEM_RDONLY,4,2       ; @BIO_FLAGS_MEM_RDONLY
	.no_dead_strip	_mem_read
.subsections_via_symbols
