	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function btreeInitPage
_btreeInitPage:                         ## @btreeInitPage
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	xorl	%edi, %edi
	cmpq	$0, 96(%r14)
	setne	%dil
	callq	_assert
	movq	96(%r14), %rax
	movl	8(%rax), %edi
	callq	_sqlite3_mutex_held
	movl	%eax, %edi
	callq	_assert
	movq	(%r14), %rbx
	movl	104(%r14), %edi
	callq	_sqlite3PagerPagenumber
	xorl	%edi, %edi
	cmpq	%rax, %rbx
	sete	%dil
	callq	_assert
	movl	104(%r14), %edi
	callq	_sqlite3PagerGetExtra
	xorl	%edi, %edi
	cmpq	%r14, %rax
	sete	%dil
	callq	_assert
	movq	8(%r14), %rbx
	movl	104(%r14), %edi
	callq	_sqlite3PagerGetData
	xorl	%edi, %edi
	cmpq	%rax, %rbx
	sete	%dil
	callq	_assert
	movq	_SQLITE_OK@GOTPCREL(%rip), %rcx
	cmpl	$0, 16(%r14)
	jne	LBB0_18
## %bb.1:
	movq	96(%r14), %r15
	movq	8(%r14), %rbx
	movq	24(%r14), %r13
	movq	(%rbx,%r13,8), %rsi
	movq	%r14, %rdi
	callq	_decodeFlags
	movq	_SQLITE_CORRUPT_BKPT@GOTPCREL(%rip), %rcx
	testq	%rax, %rax
	jne	LBB0_18
## %bb.2:
	movl	$-512, %eax                     ## imm = 0xFE00
	addl	(%r15), %eax
	xorl	%edi, %edi
	cmpl	$65025, %eax                    ## imm = 0xFE01
	setb	%dil
	callq	_assert
	movslq	(%r15), %rax
	decq	%rax
	movq	%rax, 32(%r14)
	movq	$0, 88(%r14)
	movslq	4(%r15), %rdx
	movslq	48(%r14), %rax
	shlq	$2, %rax
	movq	%r13, %rcx
	subq	%rax, %rcx
	negq	%rax
	addq	%r13, %rax
	addq	$12, %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, 40(%r14)
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	leaq	(%rbx,%rdx,8), %rax
	movq	%rax, 56(%r14)
	leaq	(%rbx,%rcx,8), %rax
	addq	$96, %rax
	movq	%rax, 64(%r14)
	leaq	(%rbx,%r13,8), %rdi
	addq	$40, %rdi
	callq	_get2byteNotZero
	movq	%rbx, %rcx
	movl	%eax, %ebx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	leaq	(%rcx,%r13,8), %rdi
	addq	$24, %rdi
	callq	_get2byte
	movq	%rax, %r12
	movl	%r12d, 72(%r14)
	movq	%r15, %rdi
	callq	_MX_CELL
	cmpl	%r12d, %eax
	jge	LBB0_3
LBB0_13:
	movq	_SQLITE_CORRUPT_BKPT@GOTPCREL(%rip), %rcx
LBB0_18:
	movl	(%rcx), %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	72(%r14), %r12d
	movq	%r15, %rdi
	callq	_MX_CELL
	xorl	%edi, %edi
	cmpl	%eax, %r12d
	sete	%dil
	callq	_testcase
	movl	72(%r14), %eax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	leal	(%rcx,%rax,2), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	leaq	(%r12,%r13,8), %rdi
	addq	$8, %rdi
	callq	_get2byte
	addl	56(%r12,%r13,8), %ebx
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r15
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cltq
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	cmpq	%rax, %r15
	movq	_SQLITE_CORRUPT_BKPT@GOTPCREL(%rip), %rcx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	jb	LBB0_18
## %bb.6:
	addl	$-4, %eax
	cltq
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	cmpq	%rax, %r15
	ja	LBB0_18
## %bb.7:
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(,%r15,8), %rdi
	addq	%r13, %rdi
	callq	_get2byte
	movq	%rax, %r12
	leaq	16(,%r15,8), %rdi
	addq	%r13, %rdi
	callq	_get2byte
	addq	%rax, %r15
	testq	%r12, %r12
	je	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	leaq	3(%r15), %rcx
	cmpq	%r12, %rcx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	jae	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	cmpq	%rcx, %r15
	ja	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	cmpq	-64(%rbp), %r12                 ## 8-byte Folded Reload
	jb	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_8 Depth=1
	addl	%eax, %ebx
	movq	%r12, %r15
	cmpq	-80(%rbp), %r12                 ## 8-byte Folded Reload
	jbe	LBB0_8
	jmp	LBB0_13
LBB0_4:
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	_SQLITE_CORRUPT_BKPT@GOTPCREL(%rip), %rcx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	cmpl	%edx, %ebx
	jg	LBB0_18
LBB0_17:
	subl	%esi, %ebx
	movslq	%ebx, %rax
	movq	%rax, 80(%r14)
	movl	$1, 16(%r14)
	movq	_SQLITE_OK@GOTPCREL(%rip), %rcx
	jmp	LBB0_18
LBB0_14:
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	cmpq	%rdx, %r15
	movq	_SQLITE_CORRUPT_BKPT@GOTPCREL(%rip), %rcx
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	ja	LBB0_18
## %bb.15:
	addl	%eax, %ebx
	cmpl	%edx, %ebx
	jg	LBB0_18
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_CORRUPT_BKPT,4,2        ## @SQLITE_CORRUPT_BKPT
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.no_dead_strip	_btreeInitPage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function btreeInitPage
_btreeInitPage:                         ; @btreeInitPage
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	x8, [x0, #96]
	cmp	x8, #0
	cset	w0, ne
	bl	_assert
	ldr	x8, [x19, #96]
	ldr	w0, [x8, #8]
	bl	_sqlite3_mutex_held
	bl	_assert
	ldr	x20, [x19]
	ldr	w0, [x19, #104]
	bl	_sqlite3PagerPagenumber
	cmp	x20, x0
	cset	w0, eq
	bl	_assert
	ldr	w0, [x19, #104]
	bl	_sqlite3PagerGetExtra
	cmp	x0, x19
	cset	w0, eq
	bl	_assert
	ldr	x20, [x19, #8]
	ldr	w0, [x19, #104]
	bl	_sqlite3PagerGetData
	cmp	x20, x0
	cset	w0, eq
	bl	_assert
	ldr	w8, [x19, #16]
	cbz	w8, LBB0_2
LBB0_1:
Lloh0:
	adrp	x25, _SQLITE_OK@GOTPAGE
Lloh1:
	ldr	x25, [x25, _SQLITE_OK@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:
	ldr	x20, [x19, #96]
	ldr	x21, [x19, #24]
	ldr	x23, [x19, #8]
	ldr	x1, [x23, x21, lsl #3]
	mov	x0, x19
	bl	_decodeFlags
	cbnz	x0, LBB0_4
; %bb.3:
	ldr	w8, [x20]
	sub	w8, w8, #512
	mov	w9, #65025
	cmp	w8, w9
	cset	w0, lo
	bl	_assert
	ldpsw	x8, x24, [x20]
	sub	x8, x8, #1
	str	xzr, [x19, #88]
	ldrsw	x9, [x19, #48]
	sub	x9, x21, x9, lsl #2
	add	x26, x9, #12
	stp	x8, x26, [x19, #32]
	add	x8, x23, x24, lsl #3
	add	x9, x23, x26, lsl #3
	stp	x8, x9, [x19, #56]
	add	x25, x23, x21, lsl #3
	add	x0, x25, #40
	bl	_get2byteNotZero
	mov	x21, x0
	add	x0, x25, #24
	bl	_get2byte
	mov	x22, x0
	str	w22, [x19, #72]
	mov	x0, x20
	bl	_MX_CELL
	cmp	w0, w22
	b.ge	LBB0_6
LBB0_4:
Lloh2:
	adrp	x25, _SQLITE_CORRUPT_BKPT@GOTPAGE
Lloh3:
	ldr	x25, [x25, _SQLITE_CORRUPT_BKPT@GOTPAGEOFF]
LBB0_5:
	ldr	w0, [x25]
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_6:
	ldr	w22, [x19, #72]
	mov	x0, x20
	bl	_MX_CELL
	cmp	w22, w0
	cset	w0, eq
	bl	_testcase
	ldr	w8, [x19, #72]
	add	w22, w26, w8, lsl #1
	add	x0, x25, #8
	bl	_get2byte
	ldr	w8, [x25, #56]
	add	w27, w21, w8
	cbz	x0, LBB0_16
; %bb.7:
	mov	x20, x0
	sxtw	x28, w22
Lloh4:
	adrp	x25, _SQLITE_CORRUPT_BKPT@GOTPAGE
Lloh5:
	ldr	x25, [x25, _SQLITE_CORRUPT_BKPT@GOTPAGEOFF]
	cmp	x0, x28
	b.lo	LBB0_5
; %bb.8:
	str	x22, [sp, #8]                   ; 8-byte Folded Spill
	sub	w8, w24, #4
	sxtw	x26, w8
	cmp	x20, x26
	b.hi	LBB0_5
; %bb.9:
Lloh6:
	adrp	x25, _SQLITE_CORRUPT_BKPT@GOTPAGE
Lloh7:
	ldr	x25, [x25, _SQLITE_CORRUPT_BKPT@GOTPAGEOFF]
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	add	x22, x23, x20, lsl #3
	mov	x0, x22
	bl	_get2byte
	mov	x21, x0
	add	x0, x22, #16
	bl	_get2byte
	add	x8, x20, x0
	cbz	x21, LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	add	x9, x8, #3
	cmp	x9, x21
	ccmp	x8, x24, #2, lo
	b.hi	LBB0_5
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	cmp	x21, x28
	b.lo	LBB0_5
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
	add	w27, w27, w0
	mov	x20, x21
	cmp	x21, x26
	b.ls	LBB0_10
	b	LBB0_5
LBB0_14:
	cmp	x8, x24
	b.hi	LBB0_4
; %bb.15:
	add	w27, w27, w0
	ldr	x22, [sp, #8]                   ; 8-byte Folded Reload
LBB0_16:
	cmp	w27, w24
	b.gt	LBB0_4
; %bb.17:
	sub	w8, w27, w22
	sxtw	x8, w8
	str	x8, [x19, #80]
	mov	w8, #1
	str	w8, [x19, #16]
	b	LBB0_1
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_CORRUPT_BKPT,4,2        ; @SQLITE_CORRUPT_BKPT
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.no_dead_strip	_btreeInitPage
.subsections_via_symbols
