	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mem_getunlocked
_mem_getunlocked:                       ## @mem_getunlocked
	.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	%rsi, %r14
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_quantize
	movq	%rax, %r15
	movq	(%rbx), %rax
	cmpq	%r14, %rax
	jbe	LBB0_6
## %bb.1:
	cmpq	%rax, %r15
	jae	LBB0_6
## %bb.2:
	movq	40(%rbx), %rcx
	movq	(%rcx,%r15,8), %rax
	testq	%rax, %rax
	jne	LBB0_5
## %bb.3:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_more_frags
	testl	%eax, %eax
	je	LBB0_12
## %bb.4:
	movq	40(%rbx), %rcx
	movq	(%rcx,%r15,8), %rax
LBB0_5:
	movq	(%rax), %rdx
	movq	%rdx, (%rcx,%r15,8)
	movq	32(%rbx), %rcx
	leaq	(%r14,%r14,2), %rdx
	incl	8(%rcx,%rdx,4)
	incl	4(%rcx,%rdx,4)
	leaq	(%r15,%r15,2), %rdx
	decl	(%rcx,%rdx,4)
	addq	%r15, 24(%rbx)
	jmp	LBB0_13
LBB0_6:
	movl	8(%rbx), %eax
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	movq	16(%rbx), %rcx
	addq	%r14, %rcx
	cmpq	%rax, %rcx
	ja	LBB0_12
LBB0_9:
	movl	52(%rbx), %edi
	movq	%r14, %rsi
	callq	*56(%rbx)
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movdqu	16(%rbx), %xmm0
	movq	%r14, %xmm1
	pshufd	$68, %xmm1, %xmm1               ## xmm1 = xmm1[0,1,0,1]
	paddq	%xmm0, %xmm1
	movdqu	%xmm1, 16(%rbx)
	movq	32(%rbx), %rcx
	movq	(%rbx), %rdx
	leaq	(%rdx,%rdx,2), %rdx
	incl	8(%rcx,%rdx,4)
	incl	4(%rcx,%rdx,4)
	jmp	LBB0_13
LBB0_11:
	incl	48(%rbx)
LBB0_12:
	xorl	%eax, %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_mem_getunlocked
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mem_getunlocked
_mem_getunlocked:                       ; @mem_getunlocked
	.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, x1
	mov	x19, x0
	mov	x0, x1
	bl	_quantize
	ldr	x8, [x19]
	cmp	x8, x20
	ccmp	x0, x8, #2, hi
	b.lo	LBB0_5
; %bb.1:
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_3
; %bb.2:
	ldr	x9, [x19, #16]
	add	x9, x9, x20
	cmp	x9, x8
	b.hi	LBB0_9
LBB0_3:
	ldr	x8, [x19, #56]
	ldr	w0, [x19, #52]
	mov	x1, x20
	blr	x8
	cbz	x0, LBB0_10
; %bb.4:
	ldr	q0, [x19, #16]
	dup.2d	v1, x20
	add.2d	v0, v0, v1
	str	q0, [x19, #16]
	ldr	x8, [x19, #32]
	ldr	x9, [x19]
	mov	w10, #12
	madd	x8, x9, x10, x8
	ldur	d0, [x8, #4]
	movi.2s	v1, #1
	add.2s	v0, v0, v1
	stur	d0, [x8, #4]
	b	LBB0_11
LBB0_5:
	mov	x21, x0
	ldr	x8, [x19, #40]
	ldr	x0, [x8, x0, lsl #3]
	cbnz	x0, LBB0_8
; %bb.6:
	mov	x0, x19
	mov	x1, x21
	bl	_more_frags
	cbz	w0, LBB0_9
; %bb.7:
	ldr	x8, [x19, #40]
	ldr	x0, [x8, x21, lsl #3]
LBB0_8:
	ldr	x9, [x0]
	str	x9, [x8, x21, lsl #3]
	mov	w8, #12
	mul	x9, x21, x8
	ldp	x11, x10, [x19, #24]
	ldr	w12, [x10, x9]
	sub	w12, w12, #1
	str	w12, [x10, x9]
	madd	x8, x20, x8, x10
	ldur	d0, [x8, #4]
	movi.2s	v1, #1
	add.2s	v0, v0, v1
	stur	d0, [x8, #4]
	add	x8, x11, x21
	str	x8, [x19, #24]
	b	LBB0_11
LBB0_9:
	mov	x0, #0
	b	LBB0_11
LBB0_10:
	ldr	w8, [x19, #48]
	add	w8, w8, #1
	str	w8, [x19, #48]
LBB0_11:
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_mem_getunlocked
.subsections_via_symbols
