	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mem_ctrl
_mem_ctrl:                              ## @mem_ctrl
	.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
	movq	%rcx, %r14
	movq	%rdx, %r12
                                        ## kill: def $esi killed $esi def $rsi
	movl	(%rdi), %r8d
	movq	_BIO_FLAGS_MEM_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%edx, %edx
	testl	%r8d, %ecx
	sete	%al
	xorl	%r15d, %r15d
	addl	$-128, %esi
	cmpl	$13, %esi
	ja	LBB0_21
## %bb.1:
	movq	%rdi, %rbx
	movq	16(%rdi), %r13
	movb	%al, %dl
	movq	(%r13,%rdx,8), %rdx
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rsi,4), %rsi
	addq	%rax, %rsi
	jmpq	*%rsi
LBB0_19:
	movl	%r12d, 4(%rbx)
	jmp	LBB0_20
LBB0_11:
	movq	%rbx, %rdi
	callq	_mem_buf_free
	movl	%r12d, 8(%rbx)
	movq	%r14, (%r13)
	movq	8(%r13), %rax
	movq	16(%r14), %rcx
	movq	%rcx, 16(%rax)
	movups	(%r14), %xmm0
	movups	%xmm0, (%rax)
	jmp	LBB0_20
LBB0_12:
	movl	$1, %r15d
	testq	%r14, %r14
	je	LBB0_21
## %bb.13:
	testl	%r8d, %ecx
	jne	LBB0_15
## %bb.14:
	movq	%rbx, %rdi
	callq	_mem_buf_sync
LBB0_15:
	movq	(%r13), %rax
	movq	%rax, (%r14)
	jmp	LBB0_21
LBB0_17:
	movl	%r12d, 8(%rbx)
LBB0_20:
	movl	$1, %r15d
LBB0_21:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	(%r13), %rbx
	movq	8(%rbx), %rdi
	movl	$1, %r15d
	testq	%rdi, %rdi
	je	LBB0_21
## %bb.3:
	testl	%r8d, %ecx
	je	LBB0_4
## %bb.7:
	movq	8(%r13), %rax
	movq	16(%rax), %rcx
	movq	%rcx, 16(%rbx)
	movups	(%rax), %xmm0
	movups	%xmm0, (%rbx)
	jmp	LBB0_21
LBB0_18:
	movq	(%rdx), %r15
	jmp	LBB0_21
LBB0_9:
	movq	(%rdx), %r15
	testq	%r14, %r14
	je	LBB0_21
## %bb.10:
	movq	8(%rdx), %rax
	movq	%rax, (%r14)
	jmp	LBB0_21
LBB0_16:
	movslq	8(%rbx), %r15
	jmp	LBB0_21
LBB0_8:
	xorl	%r15d, %r15d
	cmpq	$0, (%rdx)
	sete	%r15b
	jmp	LBB0_21
LBB0_4:
	movq	_BIO_FLAGS_NONCLEAR_RST@GOTPCREL(%rip), %rax
	testl	%r8d, (%rax)
	jne	LBB0_6
## %bb.5:
	movl	16(%rbx), %edx
	xorl	%esi, %esi
	callq	_memset
	movq	$0, (%rbx)
LBB0_6:
	movq	(%r13), %rax
	movq	8(%r13), %rcx
	movq	16(%rax), %rdx
	movq	%rdx, 16(%rcx)
	movups	(%rax), %xmm0
	movups	%xmm0, (%rcx)
	jmp	LBB0_21
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_19, LBB0_19-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_21, LBB0_21-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_20, LBB0_20-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
LJTI0_0:
	.long	L0_0_set_19
	.long	L0_0_set_11
	.long	L0_0_set_12
	.long	L0_0_set_21
	.long	L0_0_set_17
	.long	L0_0_set_2
	.long	L0_0_set_21
	.long	L0_0_set_21
	.long	L0_0_set_18
	.long	L0_0_set_9
	.long	L0_0_set_16
	.long	L0_0_set_20
	.long	L0_0_set_8
	.long	L0_0_set_20
	.end_data_region
                                        ## -- End function
	.comm	_BIO_FLAGS_MEM_RDONLY,4,2       ## @BIO_FLAGS_MEM_RDONLY
	.comm	_BIO_FLAGS_NONCLEAR_RST,4,2     ## @BIO_FLAGS_NONCLEAR_RST
	.no_dead_strip	_mem_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mem_ctrl
_mem_ctrl:                              ; @mem_ctrl
	.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	x20, x0
	mov	x0, #0
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _BIO_FLAGS_MEM_RDONLY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BIO_FLAGS_MEM_RDONLY@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	ands	w9, w9, w8
	cset	w10, eq
	sub	w11, w1, #128
	cmp	w11, #13
	b.hi	LBB0_21
; %bb.1:
	mov	x19, x3
	mov	x21, x2
	ldr	x22, [x20, #16]
	ldr	x10, [x22, w10, uxtw #3]
Lloh3:
	adrp	x12, lJTI0_0@PAGE
Lloh4:
	add	x12, x12, lJTI0_0@PAGEOFF
	adr	x13, LBB0_2
	ldrb	w14, [x12, x11]
	add	x13, x13, x14, lsl #2
	br	x13
LBB0_2:
	str	w21, [x20, #4]
	b	LBB0_20
LBB0_3:
	mov	x0, x20
	bl	_mem_buf_free
	str	w21, [x20, #8]
	str	x19, [x22]
	ldr	x8, [x22, #8]
	ldr	x9, [x19, #16]
	ldr	q0, [x19]
	str	q0, [x8]
	str	x9, [x8, #16]
	b	LBB0_20
LBB0_4:
	cbz	x19, LBB0_20
; %bb.5:
	cbnz	w9, LBB0_7
; %bb.6:
	mov	x0, x20
	bl	_mem_buf_sync
LBB0_7:
	ldr	x8, [x22]
	str	x8, [x19]
	b	LBB0_20
LBB0_8:
	str	w21, [x20, #8]
	b	LBB0_20
LBB0_9:
	ldr	x19, [x22]
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_20
; %bb.10:
	cbz	w9, LBB0_17
; %bb.11:
	ldr	x8, [x22, #8]
	ldr	q0, [x8]
	ldr	x8, [x8, #16]
	str	x8, [x19, #16]
	str	q0, [x19]
	b	LBB0_20
LBB0_12:
	ldr	x0, [x10]
	b	LBB0_21
LBB0_13:
	ldr	x0, [x10]
	cbz	x19, LBB0_21
; %bb.14:
	ldr	x8, [x10, #8]
	str	x8, [x19]
	b	LBB0_21
LBB0_15:
	ldrsw	x0, [x20, #8]
	b	LBB0_21
LBB0_16:
	ldr	x8, [x10]
	cmp	x8, #0
	cset	w0, eq
	b	LBB0_21
LBB0_17:
Lloh5:
	adrp	x9, _BIO_FLAGS_NONCLEAR_RST@GOTPAGE
Lloh6:
	ldr	x9, [x9, _BIO_FLAGS_NONCLEAR_RST@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_19
; %bb.18:
	ldr	w2, [x19, #16]
	mov	w1, #0
	bl	_memset
	str	xzr, [x19]
LBB0_19:
	ldp	x9, x8, [x22]
	ldr	q0, [x9]
	ldr	x9, [x9, #16]
	str	x9, [x8, #16]
	str	q0, [x8]
LBB0_20:
	mov	w0, #1
LBB0_21:
	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
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_21-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_9-LBB0_2)>>2
	.byte	(LBB0_21-LBB0_2)>>2
	.byte	(LBB0_21-LBB0_2)>>2
	.byte	(LBB0_12-LBB0_2)>>2
	.byte	(LBB0_13-LBB0_2)>>2
	.byte	(LBB0_15-LBB0_2)>>2
	.byte	(LBB0_20-LBB0_2)>>2
	.byte	(LBB0_16-LBB0_2)>>2
	.byte	(LBB0_20-LBB0_2)>>2
                                        ; -- End function
	.comm	_BIO_FLAGS_MEM_RDONLY,4,2       ; @BIO_FLAGS_MEM_RDONLY
	.comm	_BIO_FLAGS_NONCLEAR_RST,4,2     ; @BIO_FLAGS_NONCLEAR_RST
	.no_dead_strip	_mem_ctrl
.subsections_via_symbols
