	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function balance_quick
_balance_quick:                         ## @balance_quick
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	56(%rsi), %r12
	movl	(%r12), %edi
	callq	_sqlite3_mutex_held
	movl	%eax, %edi
	callq	_assert
	movl	40(%r14), %edi
	callq	_sqlite3PagerIswriteable
	movl	%eax, %edi
	callq	_assert
	xorl	%edi, %edi
	cmpl	$1, (%r15)
	sete	%dil
	callq	_assert
	cmpq	$0, 8(%r15)
	je	LBB0_1
## %bb.2:
	leaq	-56(%rbp), %rsi
	leaq	-60(%rbp), %rdx
	movq	%r12, %rdi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_allocateBtreePage
	movl	%eax, -44(%rbp)
	movq	_SQLITE_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_3
## %bb.4:
	movq	48(%r15), %rax
	movq	(%rax), %rsi
	movq	%rsi, -72(%rbp)
	movq	%r15, %rdi
	callq	_cellSizePtr
	movq	%rax, -80(%rbp)
	movq	-56(%rbp), %rax
	movl	40(%rax), %edi
	callq	_sqlite3PagerIswriteable
	movl	%eax, %edi
	callq	_assert
	movq	_PTF_INTKEY@GOTPCREL(%rip), %rcx
	movq	_PTF_LEAFDATA@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	orl	(%rcx), %eax
	movq	16(%r15), %rcx
	movq	_PTF_LEAF@GOTPCREL(%rip), %rdx
	orl	(%rdx), %eax
	xorl	%edi, %edi
	cmpl	%eax, (%rcx)
	sete	%dil
	callq	_assert
	movq	-56(%rbp), %rdi
	movl	(%r13), %esi
	movq	_PTF_INTKEY@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_PTF_LEAF@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	callq	_zeroPage
	movq	-56(%rbp), %rdi
	leaq	-72(%rbp), %rdx
	leaq	-80(%rbp), %rcx
	movl	$1, %esi
	callq	_assemblePage
	movq	_ISAUTOVACUUM@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_7
## %bb.5:
	movl	-60(%rbp), %esi
	movq	_PTRMAP_BTREE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	36(%r14), %ecx
	leaq	-44(%rbp), %r8
	movq	%r12, %rdi
	callq	_ptrmapPut
	movq	-80(%rbp), %rax
	movq	-56(%rbp), %rdi
	cmpq	24(%rdi), %rax
	jle	LBB0_7
## %bb.6:
	movq	-72(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	callq	_ptrmapPutOvflPtr
LBB0_7:
	movq	8(%r15), %rsi
	decq	%rsi
	movq	%r15, %rdi
	callq	_findCell
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	testb	$-128, (%rax)
	leaq	4(%rax), %rax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	leaq	1(%rcx), %rdx
	cmpq	$8, %rcx
	movq	%rdx, %rcx
	jb	LBB0_8
LBB0_10:
	leaq	36(%rax), %rdx
	movl	$16, %ecx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rax), %esi
	addq	$4, %rax
	movl	%esi, (%rbx,%rcx)
	addq	$4, %rcx
	testb	$-128, %sil
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpq	%rdx, %rax
	jb	LBB0_11
LBB0_13:
	movq	%rax, -72(%rbp)
	movq	8(%r14), %rsi
	shrq	$2, %rcx
	movl	36(%r15), %r9d
	leaq	-44(%rbp), %r15
	movq	%r15, (%rsp)
	movq	%r14, %rdi
	movq	%rbx, %rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
	xorl	%r8d, %r8d
	callq	_insertCell
	movq	16(%r14), %rax
	movslq	32(%r14), %rcx
	leaq	(%rax,%rcx,4), %rdi
	addq	$32, %rdi
	movl	-60(%rbp), %esi
	callq	_put4byte
	movq	-56(%rbp), %rdi
	callq	_releasePage
	jmp	LBB0_14
LBB0_1:
	movq	_SQLITE_CORRUPT_BKPT@GOTPCREL(%rip), %r15
	jmp	LBB0_14
LBB0_3:
	leaq	-44(%rbp), %r15
LBB0_14:
	movl	(%r15), %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_CORRUPT_BKPT,4,2        ## @SQLITE_CORRUPT_BKPT
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.comm	_PTF_INTKEY,4,2                 ## @PTF_INTKEY
	.comm	_PTF_LEAFDATA,4,2               ## @PTF_LEAFDATA
	.comm	_PTF_LEAF,4,2                   ## @PTF_LEAF
	.comm	_ISAUTOVACUUM,8,3               ## @ISAUTOVACUUM
	.comm	_PTRMAP_BTREE,4,2               ## @PTRMAP_BTREE
	.no_dead_strip	_balance_quick
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function balance_quick
_balance_quick:                         ; @balance_quick
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x22, [x1, #56]
	ldr	w0, [x22]
	bl	_sqlite3_mutex_held
	bl	_assert
	ldr	w0, [x19, #40]
	bl	_sqlite3PagerIswriteable
	bl	_assert
	ldr	w8, [x21]
	cmp	w8, #1
	cset	w0, eq
	bl	_assert
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_12
; %bb.1:
	add	x1, sp, #24
	add	x2, sp, #16
	mov	x0, x22
	mov	w3, #0
	mov	w4, #0
	bl	_allocateBtreePage
	str	w0, [sp, #20]
Lloh0:
	adrp	x8, _SQLITE_OK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SQLITE_OK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_13
; %bb.2:
	ldr	x8, [x21, #48]
	ldr	x1, [x8]
	str	x1, [sp, #8]
	mov	x0, x21
	bl	_cellSizePtr
	str	x0, [sp]
	ldr	x8, [sp, #24]
	ldr	w0, [x8, #40]
	bl	_sqlite3PagerIswriteable
	bl	_assert
	ldr	x8, [x21, #16]
Lloh3:
	adrp	x23, _PTF_INTKEY@GOTPAGE
Lloh4:
	ldr	x23, [x23, _PTF_INTKEY@GOTPAGEOFF]
	ldr	w8, [x8]
	ldr	w9, [x23]
Lloh5:
	adrp	x24, _PTF_LEAFDATA@GOTPAGE
Lloh6:
	ldr	x24, [x24, _PTF_LEAFDATA@GOTPAGEOFF]
	ldr	w10, [x24]
	orr	w9, w10, w9
Lloh7:
	adrp	x25, _PTF_LEAF@GOTPAGE
Lloh8:
	ldr	x25, [x25, _PTF_LEAF@GOTPAGEOFF]
	ldr	w10, [x25]
	orr	w9, w9, w10
	cmp	w8, w9
	cset	w0, eq
	bl	_assert
	ldr	x0, [sp, #24]
	ldr	w8, [x23]
	ldr	w9, [x24]
	orr	w8, w9, w8
	ldr	w9, [x25]
	orr	w1, w8, w9
	bl	_zeroPage
	ldr	x0, [sp, #24]
	add	x2, sp, #8
	mov	x3, sp
	mov	w1, #1
	bl	_assemblePage
Lloh9:
	adrp	x8, _ISAUTOVACUUM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ISAUTOVACUUM@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.3:
	ldr	w1, [sp, #16]
Lloh12:
	adrp	x8, _PTRMAP_BTREE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PTRMAP_BTREE@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	ldr	w3, [x19, #36]
	add	x4, sp, #20
	mov	x0, x22
	bl	_ptrmapPut
	ldr	x8, [sp]
	ldr	x0, [sp, #24]
	ldr	x9, [x0, #24]
	cmp	x8, x9
	b.le	LBB0_5
; %bb.4:
	ldr	x1, [sp, #8]
	add	x2, sp, #20
	bl	_ptrmapPutOvflPtr
LBB0_5:
	ldr	x8, [x21, #8]
	sub	x1, x8, #1
	mov	x0, x21
	bl	_findCell
	mov	x8, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w9, [x0], #4
	tbz	w9, #7, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x9, x8, #1
	cmp	x8, #8
	mov	x8, x9
	b.lo	LBB0_6
LBB0_8:
	add	x9, x0, #36
	mov	w8, #16
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x0], #4
	str	w10, [x20, x8]
	add	x8, x8, #4
	tbz	w10, #7, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	cmp	x0, x9
	b.lo	LBB0_9
LBB0_11:
	str	x0, [sp, #8]
	ldr	x1, [x19, #8]
	lsr	x3, x8, #2
	ldr	w5, [x21, #36]
	add	x21, sp, #20
	add	x6, sp, #20
	mov	x0, x19
	mov	x2, x20
                                        ; kill: def $w3 killed $w3 killed $x3
	mov	w4, #0
	bl	_insertCell
	ldr	x8, [x19, #16]
	ldrsw	x9, [x19, #32]
	add	x8, x8, x9, lsl #2
	add	x0, x8, #32
	ldr	w1, [sp, #16]
	bl	_put4byte
	ldr	x0, [sp, #24]
	bl	_releasePage
	b	LBB0_14
LBB0_12:
Lloh15:
	adrp	x21, _SQLITE_CORRUPT_BKPT@GOTPAGE
Lloh16:
	ldr	x21, [x21, _SQLITE_CORRUPT_BKPT@GOTPAGEOFF]
	b	LBB0_14
LBB0_13:
	add	x21, sp, #20
LBB0_14:
	ldr	w0, [x21]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_CORRUPT_BKPT,4,2        ; @SQLITE_CORRUPT_BKPT
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.comm	_PTF_INTKEY,4,2                 ; @PTF_INTKEY
	.comm	_PTF_LEAFDATA,4,2               ; @PTF_LEAFDATA
	.comm	_PTF_LEAF,4,2                   ; @PTF_LEAF
	.comm	_ISAUTOVACUUM,8,3               ; @ISAUTOVACUUM
	.comm	_PTRMAP_BTREE,4,2               ; @PTRMAP_BTREE
	.no_dead_strip	_balance_quick
.subsections_via_symbols
