	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function readDbPage
_readDbPage:                            ## @readDbPage
	.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	%rdi, %r14
	movq	16(%rdi), %r15
	movq	$0, -32(%rbp)
	movq	(%r15), %rax
	movq	_PAGER_READER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	setge	%al
	movq	_MEMDB@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	sete	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	movl	24(%r15), %edi
	callq	_isOpen
	movl	%eax, %edi
	callq	_assert
	movq	%r15, %rdi
	callq	_pagerUseWal
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movl	28(%r15), %edi
	movl	(%r14), %esi
	leaq	-32(%rbp), %rdx
	callq	_sqlite3WalFindFrame
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.2:
	movq	-32(%rbp), %rsi
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.3:
	movl	28(%r15), %edi
	movq	16(%r15), %rdx
	movq	8(%r14), %rcx
	callq	_sqlite3WalReadFrame
	jmp	LBB0_6
LBB0_4:
	movl	(%r14), %eax
	decl	%eax
	movq	16(%r15), %rdx
	movl	%edx, %ecx
	imull	%eax, %ecx
	movl	24(%r15), %edi
	movq	8(%r14), %rsi
	callq	_sqlite3OsRead
	movq	_SQLITE_IOERR_SHORT_READ@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_6
## %bb.5:
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_6:
	cmpl	$1, (%r14)
	jne	LBB0_10
## %bb.7:
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	12(%r15), %edi
	movl	$255, %esi
	movl	$4, %edx
	callq	_memset
	jmp	LBB0_10
LBB0_9:
	movq	8(%r14), %rsi
	addq	$96, %rsi
	leaq	12(%r15), %rdi
	movl	$4, %edx
	callq	_memcpy
LBB0_10:
	movq	8(%r14), %rsi
	movl	(%r14), %edx
	movq	_SQLITE_NOMEM_BKPT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r15, %rdi
	movl	$3, %ecx
	movl	%ebx, %r8d
	callq	_CODEC1
	movq	_sqlite3_pager_readdb_count@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_PAGER_INCR
	movl	8(%r15), %edi
	callq	_PAGER_INCR
	movslq	(%r14), %rdi
	callq	_IOTRACE
	movq	%r15, %rdi
	callq	_PAGERID
	movq	%r14, %rdi
	callq	_pager_pagehash
	movslq	%eax, %rdi
	callq	_PAGERTRACE
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.comm	_PAGER_READER,8,3               ## @PAGER_READER
	.comm	_MEMDB,4,2                      ## @MEMDB
	.comm	_SQLITE_IOERR_SHORT_READ,4,2    ## @SQLITE_IOERR_SHORT_READ
	.comm	_SQLITE_NOMEM_BKPT,4,2          ## @SQLITE_NOMEM_BKPT
	.comm	_sqlite3_pager_readdb_count,4,2 ## @sqlite3_pager_readdb_count
	.no_dead_strip	_readDbPage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function readDbPage
_readDbPage:                            ; @readDbPage
	.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, x0
	ldr	x20, [x0, #16]
	str	xzr, [sp, #8]
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _PAGER_READER@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PAGER_READER@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
Lloh3:
	adrp	x8, _MEMDB@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MEMDB@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ccmp	w8, #0, #0, ge
	cset	w0, eq
	bl	_assert
	ldr	w0, [x20, #24]
	bl	_isOpen
	bl	_assert
	mov	x0, x20
	bl	_pagerUseWal
	cbz	x0, LBB0_4
; %bb.1:
	ldr	w0, [x20, #28]
	ldr	w1, [x19]
	add	x2, sp, #8
	bl	_sqlite3WalFindFrame
	mov	x21, x0
	cbnz	w0, LBB0_10
; %bb.2:
	ldr	x1, [sp, #8]
	cbz	x1, LBB0_4
; %bb.3:
	ldr	w0, [x20, #28]
	ldr	x2, [x20, #16]
	ldr	x3, [x19, #8]
	bl	_sqlite3WalReadFrame
	b	LBB0_5
LBB0_4:
	ldr	w8, [x19]
	sub	w8, w8, #1
	ldr	x2, [x20, #16]
	mul	w3, w8, w2
	ldr	w0, [x20, #24]
	ldr	x1, [x19, #8]
	bl	_sqlite3OsRead
Lloh6:
	adrp	x8, _SQLITE_IOERR_SHORT_READ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SQLITE_IOERR_SHORT_READ@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _SQLITE_OK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SQLITE_OK@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w0, w8
	csel	w0, w9, w0, eq
LBB0_5:
	ldr	w8, [x19]
	cmp	w8, #1
	b.ne	LBB0_9
; %bb.6:
	cbz	w0, LBB0_8
; %bb.7:
	ldr	w0, [x20, #12]
	mov	w1, #255
	mov	w2, #4
	bl	_memset
	b	LBB0_9
LBB0_8:
	ldr	x8, [x19, #8]
	add	x1, x8, #96
	add	x0, x20, #12
	mov	w2, #4
	bl	_memcpy
LBB0_9:
	ldr	x1, [x19, #8]
	ldr	w2, [x19]
Lloh12:
	adrp	x8, _SQLITE_NOMEM_BKPT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SQLITE_NOMEM_BKPT@GOTPAGEOFF]
Lloh14:
	ldr	w21, [x8]
	mov	x0, x20
	mov	w3, #3
	mov	x4, x21
	bl	_CODEC1
Lloh15:
	adrp	x8, _sqlite3_pager_readdb_count@GOTPAGE
Lloh16:
	ldr	x8, [x8, _sqlite3_pager_readdb_count@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_PAGER_INCR
	ldr	w0, [x20, #8]
	bl	_PAGER_INCR
	ldrsw	x0, [x19]
	bl	_IOTRACE
	mov	x0, x20
	bl	_PAGERID
	mov	x0, x19
	bl	_pager_pagehash
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x0, w0
	bl	_PAGERTRACE
LBB0_10:
	mov	x0, x21
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.comm	_PAGER_READER,8,3               ; @PAGER_READER
	.comm	_MEMDB,4,2                      ; @MEMDB
	.comm	_SQLITE_IOERR_SHORT_READ,4,2    ; @SQLITE_IOERR_SHORT_READ
	.comm	_SQLITE_NOMEM_BKPT,4,2          ; @SQLITE_NOMEM_BKPT
	.comm	_sqlite3_pager_readdb_count,4,2 ; @sqlite3_pager_readdb_count
	.no_dead_strip	_readDbPage
.subsections_via_symbols
