	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function getAndInitPage
_getAndInitPage:                        ## @getAndInitPage
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r13d
	movq	%rcx, %r15
	movq	%rdx, %rbx
	movl	%esi, %r14d
	movq	%rdi, %r12
	movl	4(%rdi), %edi
	callq	_sqlite3_mutex_held
	movl	%eax, %edi
	callq	_assert
	testq	%r15, %r15
	sete	%al
	leaq	32(%r15), %rcx
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	cmpq	%rbx, %rcx
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	testq	%r15, %r15
	je	LBB0_2
## %bb.1:
	xorl	%edi, %edi
	cmpl	%r13d, (%r15)
	sete	%dil
	callq	_assert
	xorl	%ebx, %ebx
	cmpq	$0, 8(%r15)
	setne	%bl
	jmp	LBB0_3
LBB0_2:
	movl	$1, %ebx
	movl	$1, %edi
	callq	_assert
LBB0_3:
	movl	%ebx, %edi
	callq	_assert
	movq	%r12, %rdi
	callq	_btreePagecount
	cmpl	%r14d, %eax
	jge	LBB0_5
## %bb.4:
	movq	_SQLITE_CORRUPT_BKPT@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	testq	%r15, %r15
	jne	LBB0_15
	jmp	LBB0_16
LBB0_5:
	movl	(%r12), %edi
	leaq	-48(%rbp), %rdx
	movl	%r14d, %esi
	movl	%r13d, %ecx
	callq	_sqlite3PagerGet
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_6
## %bb.14:
	testq	%r15, %r15
	je	LBB0_16
LBB0_15:
	movq	8(%r15), %rax
	movq	24(%r15), %rcx
	leaq	-1(%rax), %rdx
	movq	%rdx, 8(%r15)
	movq	-8(%rcx,%rax,8), %rax
	movq	%rax, 32(%r15)
LBB0_16:
	xorl	%edi, %edi
	testl	%r14d, %r14d
	sete	%dil
	setne	%bl
	callq	_testcase
	movq	_SQLITE_CORRUPT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	sete	%al
	orb	%bl, %al
	movzbl	%al, %edi
	callq	_assert
LBB0_17:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	-48(%rbp), %rdi
	callq	_sqlite3PagerGetExtra
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rax, (%rbx)
	cmpq	$0, (%rax)
	jne	LBB0_9
## %bb.7:
	movq	-48(%rbp), %rdi
	movl	%r14d, %esi
	movq	%r12, %rdx
	callq	_btreePageFromDbPage
	movq	(%rbx), %rdi
	callq	_btreeInitPage
	movl	%eax, %r13d
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jne	LBB0_13
## %bb.8:
	movq	(%rbx), %rax
LBB0_9:
	xorl	%edi, %edi
	cmpl	%r14d, 32(%rax)
	sete	%dil
	callq	_assert
	movq	(%rbx), %rax
	movq	8(%rax), %r12
	movq	-48(%rbp), %rdi
	callq	_sqlite3PagerGetData
	xorl	%edi, %edi
	cmpq	%rax, %r12
	sete	%dil
	callq	_assert
	testq	%r15, %r15
	je	LBB0_18
## %bb.10:
	movq	(%rbx), %rax
	cmpl	$0, 16(%rax)
	jle	LBB0_12
## %bb.11:
	movq	24(%rax), %rax
	cmpq	16(%r15), %rax
	jne	LBB0_12
LBB0_18:
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	jmp	LBB0_17
LBB0_12:
	movl	%r14d, %edi
	callq	_SQLITE_CORRUPT_PGNO
	movl	%eax, %r13d
LBB0_13:
	movq	(%rbx), %rdi
	callq	_releasePage
	testq	%r15, %r15
	jne	LBB0_15
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_CORRUPT_BKPT,4,2        ## @SQLITE_CORRUPT_BKPT
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.comm	_SQLITE_CORRUPT,4,2             ## @SQLITE_CORRUPT
	.no_dead_strip	_getAndInitPage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function getAndInitPage
_getAndInitPage:                        ; @getAndInitPage
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x23, x4
	mov	x20, x3
	mov	x21, x2
	mov	x19, x1
	mov	x22, x0
	ldr	w0, [x0, #4]
	bl	_sqlite3_mutex_held
	bl	_assert
	cmp	x20, #0
	add	x8, x20, #32
	ccmp	x8, x21, #4, ne
	cset	w0, eq
	bl	_assert
	cbz	x20, LBB0_2
; %bb.1:
	ldr	w8, [x20]
	cmp	w8, w23
	cset	w0, eq
	bl	_assert
	ldr	x8, [x20, #8]
	cmp	x8, #0
	cset	w24, ne
	b	LBB0_3
LBB0_2:
	mov	w24, #1
	mov	w0, #1
	bl	_assert
LBB0_3:
	mov	x0, x24
	bl	_assert
	mov	x0, x22
	bl	_btreePagecount
	cmp	w0, w19
	b.ge	LBB0_5
; %bb.4:
Lloh0:
	adrp	x8, _SQLITE_CORRUPT_BKPT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SQLITE_CORRUPT_BKPT@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	cbnz	x20, LBB0_7
	b	LBB0_8
LBB0_5:
	ldr	w0, [x22]
	add	x2, sp, #8
	mov	x1, x19
	mov	x3, x23
	bl	_sqlite3PagerGet
	mov	x23, x0
	cbz	w0, LBB0_10
; %bb.6:
	cbz	x20, LBB0_8
LBB0_7:
	ldr	x8, [x20, #8]
	sub	x8, x8, #1
	str	x8, [x20, #8]
	ldr	x9, [x20, #24]
	ldr	x8, [x9, x8, lsl #3]
	str	x8, [x20, #32]
LBB0_8:
	cmp	w19, #0
	cset	w0, eq
	cset	w19, ne
	bl	_testcase
Lloh3:
	adrp	x8, _SQLITE_CORRUPT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SQLITE_CORRUPT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w23, w8
	cset	w8, eq
	orr	w0, w19, w8
	bl	_assert
LBB0_9:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_10:
	ldr	x0, [sp, #8]
	bl	_sqlite3PagerGetExtra
	str	x0, [x21]
	ldr	x8, [x0]
	cbnz	x8, LBB0_13
; %bb.11:
	ldr	x0, [sp, #8]
	mov	x1, x19
	mov	x2, x22
	bl	_btreePageFromDbPage
	ldr	x0, [x21]
	bl	_btreeInitPage
	mov	x23, x0
Lloh6:
	adrp	x8, _SQLITE_OK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SQLITE_OK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_18
; %bb.12:
	ldr	x0, [x21]
LBB0_13:
	ldr	w8, [x0, #32]
	cmp	w8, w19
	cset	w0, eq
	bl	_assert
	ldr	x8, [x21]
	ldr	x22, [x8, #8]
	ldr	x0, [sp, #8]
	bl	_sqlite3PagerGetData
	cmp	x22, x0
	cset	w0, eq
	bl	_assert
	cbz	x20, LBB0_16
; %bb.14:
	ldr	x8, [x21]
	ldr	w9, [x8, #16]
	cmp	w9, #1
	b.lt	LBB0_17
; %bb.15:
	ldr	x8, [x8, #24]
	ldr	x9, [x20, #16]
	cmp	x8, x9
	b.ne	LBB0_17
LBB0_16:
Lloh9:
	adrp	x8, _SQLITE_OK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SQLITE_OK@GOTPAGEOFF]
Lloh11:
	ldr	w23, [x8]
	b	LBB0_9
LBB0_17:
	mov	x0, x19
	bl	_SQLITE_CORRUPT_PGNO
	mov	x23, x0
LBB0_18:
	ldr	x0, [x21]
	bl	_releasePage
	cbnz	x20, LBB0_7
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_CORRUPT_BKPT,4,2        ; @SQLITE_CORRUPT_BKPT
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.comm	_SQLITE_CORRUPT,4,2             ; @SQLITE_CORRUPT
	.no_dead_strip	_getAndInitPage
.subsections_via_symbols
