	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mem_write
_mem_write:                             ## @mem_write
	.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
	testq	%rsi, %rsi
	je	LBB0_3
## %bb.1:
	movq	%rdi, %rbx
	movq	_BIO_FLAGS_MEM_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_7
## %bb.2:
	movq	_BIO_F_MEM_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_BIO_R_WRITE_TO_READ_ONLY_BIO@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_3:
	movq	_BIO_F_MEM_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_BIO_R_NULL_PARAMETER@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %esi
	callq	_BIOerr
LBB0_5:
	movl	$-1, %r15d
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	8(%rbx), %r13
	movq	%rbx, %rdi
	callq	_BIO_clear_retry_flags
	testl	%r15d, %r15d
	je	LBB0_10
## %bb.8:
	movq	8(%r13), %rax
	movslq	(%rax), %r12
	movq	%rbx, %rdi
	callq	_mem_buf_sync
	movq	(%r13), %rdi
	leal	(%r12,%r15), %esi
	callq	_BUF_MEM_grow_clean
	testq	%rax, %rax
	je	LBB0_5
## %bb.9:
	movq	(%r13), %rax
	addq	8(%rax), %r12
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	callq	_memcpy
	movq	(%r13), %rax
	movq	8(%r13), %rcx
	movups	(%rax), %xmm0
	movups	%xmm0, (%rcx)
	jmp	LBB0_6
LBB0_10:
	xorl	%r15d, %r15d
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_BIO_F_MEM_WRITE,4,2            ## @BIO_F_MEM_WRITE
	.comm	_BIO_R_NULL_PARAMETER,4,2       ## @BIO_R_NULL_PARAMETER
	.comm	_BIO_FLAGS_MEM_RDONLY,4,2       ## @BIO_FLAGS_MEM_RDONLY
	.comm	_BIO_R_WRITE_TO_READ_ONLY_BIO,4,2 ## @BIO_R_WRITE_TO_READ_ONLY_BIO
	.no_dead_strip	_mem_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mem_write
_mem_write:                             ; @mem_write
	.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
	cbz	x1, LBB0_3
; %bb.1:
	mov	x21, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _BIO_FLAGS_MEM_RDONLY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BIO_FLAGS_MEM_RDONLY@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.2:
Lloh3:
	adrp	x8, _BIO_F_MEM_WRITE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BIO_F_MEM_WRITE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _BIO_R_WRITE_TO_READ_ONLY_BIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BIO_R_WRITE_TO_READ_ONLY_BIO@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh8:
	adrp	x8, _BIO_F_MEM_WRITE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BIO_F_MEM_WRITE@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x8, _BIO_R_NULL_PARAMETER@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BIO_R_NULL_PARAMETER@GOTPAGEOFF]
LBB0_4:
	ldr	w1, [x8]
	bl	_BIOerr
LBB0_5:
	mov	w19, #-1
LBB0_6:
	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
LBB0_7:
	mov	x19, x2
	mov	x20, x1
	ldr	x22, [x21, #8]
	mov	x0, x21
	bl	_BIO_clear_retry_flags
	cbz	w19, LBB0_6
; %bb.8:
	ldr	x8, [x22, #8]
	ldrsw	x23, [x8]
	mov	x0, x21
	bl	_mem_buf_sync
	ldr	x0, [x22]
	add	w1, w23, w19
	bl	_BUF_MEM_grow_clean
	cbz	x0, LBB0_5
; %bb.9:
	ldr	x8, [x22]
	ldr	x8, [x8, #8]
	add	x0, x8, x23
	mov	x1, x20
	mov	x2, x19
	bl	_memcpy
	ldp	x9, x8, [x22]
	ldr	q0, [x9]
	str	q0, [x8]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_BIO_F_MEM_WRITE,4,2            ; @BIO_F_MEM_WRITE
	.comm	_BIO_R_NULL_PARAMETER,4,2       ; @BIO_R_NULL_PARAMETER
	.comm	_BIO_FLAGS_MEM_RDONLY,4,2       ; @BIO_FLAGS_MEM_RDONLY
	.comm	_BIO_R_WRITE_TO_READ_ONLY_BIO,4,2 ; @BIO_R_WRITE_TO_READ_ONLY_BIO
	.no_dead_strip	_mem_write
.subsections_via_symbols
