	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	72(%rsi), %r14
	movl	4(%r14), %edi
	callq	_sqlite3_mutex_held
	movl	%eax, %edi
	callq	_assert
	movl	60(%r15), %edi
	callq	_sqlite3PagerIswriteable
	movl	%eax, %edi
	callq	_assert
	xorl	%edi, %edi
	cmpl	$1, (%rbx)
	sete	%dil
	callq	_assert
	cmpq	$0, 8(%rbx)
	je	LBB0_1
## %bb.2:
	movq	16(%rbx), %rdi
	shrq	$63, %rdi
	xorl	$1, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_assert
	movq	16(%r15), %rdi
	shrq	$63, %rdi
	xorl	$1, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_assert
	leaq	-32(%rbp), %rsi
	leaq	-36(%rbp), %rdx
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_allocateBtreePage
	movq	_SQLITE_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_4
## %bb.3:
	leaq	-32(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_balance_quick.cold.1
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_1:
	movq	_SQLITE_CORRUPT_BKPT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_4:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function balance_quick.cold.1
_balance_quick.cold.1:                  ## @balance_quick.cold.1
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	64(%rdi), %rax
	movq	(%rax), %rsi
	callq	*24(%rdi)
	movq	(%r14), %rax
	movl	60(%rax), %edi
	callq	_sqlite3PagerIswriteable
	movl	%eax, %edi
	callq	_assert
	movq	_CORRUPT_DB@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB1_2
## %bb.1:
	pushq	$1
	popq	%rdi
	jmp	LBB1_3
LBB1_2:
	movq	_PTF_INTKEY@GOTPCREL(%rip), %rax
	movq	_PTF_LEAFDATA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	32(%rbx), %rax
	movq	_PTF_LEAF@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	xorl	%edi, %edi
	cmpl	%ecx, (%rax)
	sete	%dil
LBB1_3:
	callq	_assert
	movq	_PTF_INTKEY@GOTPCREL(%rip), %rax
	movq	_PTF_LEAFDATA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	(%r14), %rdi
	movq	_PTF_LEAF@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	callq	_zeroPage
	ud2
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_CORRUPT_BKPT,4,2        ## @SQLITE_CORRUPT_BKPT
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.comm	_CORRUPT_DB,8,3                 ## @CORRUPT_DB
	.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, #64
	.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
	mov	x19, x1
	mov	x21, x0
	ldr	x20, [x1, #72]
	ldr	w0, [x20, #4]
	bl	_sqlite3_mutex_held
	bl	_assert
	ldr	w0, [x21, #60]
	bl	_sqlite3PagerIswriteable
	bl	_assert
	ldr	w8, [x19]
	cmp	w8, #1
	cset	w0, eq
	bl	_assert
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_3
; %bb.1:
	ldr	x8, [x19, #16]
	lsr	x8, x8, #63
	eor	w0, w8, #0x1
	bl	_assert
	ldr	x8, [x21, #16]
	lsr	x8, x8, #63
	eor	w0, w8, #0x1
	bl	_assert
	add	x1, sp, #8
	add	x2, sp, #4
	mov	x0, x20
	mov	w3, #0
	mov	w4, #0
	bl	_allocateBtreePage
Lloh0:
	adrp	x8, _SQLITE_OK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SQLITE_OK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_4
; %bb.2:
	add	x1, sp, #8
	mov	x0, x19
	bl	_balance_quick.cold.1
LBB0_3:
Lloh3:
	adrp	x8, _SQLITE_CORRUPT_BKPT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SQLITE_CORRUPT_BKPT@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
LBB0_4:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function balance_quick.cold.1
_balance_quick.cold.1:                  ; @balance_quick.cold.1
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0, #64]
	ldr	x1, [x8]
	ldr	x8, [x0, #24]
	blr	x8
	ldr	x8, [x19]
	ldr	w0, [x8, #60]
	bl	_sqlite3PagerIswriteable
	bl	_assert
Lloh6:
	adrp	x8, _CORRUPT_DB@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CORRUPT_DB@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
Lloh9:
	adrp	x22, _PTF_INTKEY@GOTPAGE
Lloh10:
	ldr	x22, [x22, _PTF_INTKEY@GOTPAGEOFF]
Lloh11:
	adrp	x23, _PTF_LEAFDATA@GOTPAGE
Lloh12:
	ldr	x23, [x23, _PTF_LEAFDATA@GOTPAGEOFF]
Lloh13:
	adrp	x21, _PTF_LEAF@GOTPAGE
Lloh14:
	ldr	x21, [x21, _PTF_LEAF@GOTPAGEOFF]
	cbz	x8, LBB1_2
; %bb.1:
	mov	w0, #1
	b	LBB1_3
LBB1_2:
	ldr	x8, [x20, #32]
	ldr	w8, [x8]
	ldr	w9, [x22]
	ldr	w10, [x23]
	orr	w9, w10, w9
	ldr	w10, [x21]
	orr	w9, w9, w10
	cmp	w8, w9
	cset	w0, eq
LBB1_3:
	bl	_assert
	ldr	x0, [x19]
	ldr	w8, [x22]
	ldr	w9, [x23]
	orr	w8, w9, w8
	ldr	w9, [x21]
	orr	w1, w8, w9
	bl	_zeroPage
	brk	#0x1
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_CORRUPT_BKPT,4,2        ; @SQLITE_CORRUPT_BKPT
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.comm	_CORRUPT_DB,8,3                 ; @CORRUPT_DB
	.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
