	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function getPageMMap
_getPageMMap:                           ## @getPageMMap
	.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
	movl	%ecx, %r15d
	movq	%rdx, %r14
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movq	$0, -56(%rbp)
	movq	$0, -72(%rbp)
	cmpl	$2, %esi
	jl	LBB0_2
## %bb.1:
	movq	(%rbx), %rax
	movq	_PAGER_READER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%al
	movq	_PAGER_GET_READONLY@GOTPCREL(%rip), %rcx
	testl	%r15d, (%rcx)
	setne	%r13b
	orb	%al, %r13b
	jmp	LBB0_3
LBB0_2:
	xorl	%r13d, %r13d
LBB0_3:
	movq	%rbx, %rdi
	callq	_USEFETCH
	movl	%eax, %edi
	callq	_assert
	testl	%r12d, %r12d
	je	LBB0_14
## %bb.4:
	movq	(%rbx), %rax
	movq	_PAGER_READER@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setge	%dil
	callq	_assert
	movq	%rbx, %rdi
	callq	_assert_pager_state
	movl	%eax, %edi
	callq	_assert
	xorl	%edi, %edi
	cmpl	$1, 16(%rbx)
	sete	%dil
	callq	_assert
	movl	20(%rbx), %eax
	movq	_SQLITE_OK@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpl	(%rcx), %eax
	sete	%dil
	callq	_assert
	testb	%r13b, %r13b
	je	LBB0_20
## %bb.5:
	movq	%rbx, %rdi
	callq	_pagerUseWal
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movl	40(%rbx), %edi
	leaq	-72(%rbp), %rdx
	movl	%r12d, %esi
	callq	_sqlite3WalFindFrame
	movl	%eax, %r13d
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jne	LBB0_15
## %bb.7:
	cmpq	$0, -72(%rbp)
	jne	LBB0_20
LBB0_8:
	movq	$0, -48(%rbp)
	movl	24(%rbx), %edx
	movl	28(%rbx), %edi
	leal	-1(%r12), %eax
	movl	%edx, %esi
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	imull	%eax, %esi
	leaq	-48(%rbp), %rcx
	callq	_sqlite3OsFetch
	movl	%eax, %r13d
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %r13d
	jne	LBB0_19
## %bb.9:
	cmpq	$0, -48(%rbp)
	je	LBB0_19
## %bb.10:
	movq	(%rbx), %rax
	movq	_PAGER_READER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jg	LBB0_12
## %bb.11:
	cmpq	$0, 32(%rbx)
	je	LBB0_16
LBB0_12:
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_sqlite3PagerLookup
	movq	%rax, -56(%rbp)
	testq	%rax, %rax
	je	LBB0_16
## %bb.13:
	movl	28(%rbx), %edi
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	imull	24(%rbx), %esi
	movq	-48(%rbp), %rdx
	callq	_sqlite3OsUnfetch
	jmp	LBB0_17
LBB0_14:
	movq	_SQLITE_CORRUPT_BKPT@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	jmp	LBB0_21
LBB0_16:
	movq	-48(%rbp), %rdx
	leaq	-56(%rbp), %rcx
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_pagerAcquireMapPage
	movl	%eax, %r13d
	cmpq	$0, -56(%rbp)
	je	LBB0_18
LBB0_17:
	xorl	%edi, %edi
	movq	_SQLITE_OK@GOTPCREL(%rip), %rbx
	cmpl	(%rbx), %r13d
	sete	%dil
	callq	_assert
	movq	-56(%rbp), %rax
	movq	%rax, (%r14)
	movl	(%rbx), %r13d
	jmp	LBB0_21
LBB0_18:
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_19:
	cmpl	%eax, %r13d
	jne	LBB0_15
LBB0_20:
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movq	%r14, %rdx
	movl	%r15d, %ecx
	callq	_getPageNormal
	movl	%eax, %r13d
	jmp	LBB0_21
LBB0_15:
	movq	$0, (%r14)
LBB0_21:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	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	_PAGER_GET_READONLY,4,2         ## @PAGER_GET_READONLY
	.comm	_SQLITE_CORRUPT_BKPT,4,2        ## @SQLITE_CORRUPT_BKPT
	.no_dead_strip	_getPageMMap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function getPageMMap
_getPageMMap:                           ; @getPageMMap
	.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, x3
	mov	x19, x2
	mov	x22, x1
	mov	x21, x0
	stp	xzr, xzr, [sp, #16]
Lloh0:
	adrp	x25, _PAGER_READER@GOTPAGE
Lloh1:
	ldr	x25, [x25, _PAGER_READER@GOTPAGEOFF]
	cmp	w1, #2
	b.lt	LBB0_2
; %bb.1:
	ldr	x8, [x21]
	ldr	x9, [x25]
Lloh2:
	adrp	x10, _PAGER_GET_READONLY@GOTPAGE
Lloh3:
	ldr	x10, [x10, _PAGER_GET_READONLY@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x10]
	tst	w10, w20
	ccmp	x8, x9, #4, eq
	cset	w23, eq
	b	LBB0_3
LBB0_2:
	mov	w23, #0
LBB0_3:
	mov	x0, x21
	bl	_USEFETCH
	bl	_assert
	cbz	w22, LBB0_14
; %bb.4:
	ldr	x8, [x21]
	ldr	x9, [x25]
	cmp	x8, x9
	cset	w0, ge
	bl	_assert
	mov	x0, x21
	bl	_assert_pager_state
	bl	_assert
	ldr	w8, [x21, #16]
	cmp	w8, #1
	cset	w0, eq
	bl	_assert
	ldr	w8, [x21, #20]
Lloh5:
	adrp	x24, _SQLITE_OK@GOTPAGE
Lloh6:
	ldr	x24, [x24, _SQLITE_OK@GOTPAGEOFF]
	ldr	w9, [x24]
	cmp	w8, w9
	cset	w0, eq
	bl	_assert
	cbz	w23, LBB0_20
; %bb.5:
	mov	x0, x21
	bl	_pagerUseWal
	cbz	x0, LBB0_8
; %bb.6:
	ldr	w0, [x21, #40]
	add	x2, sp, #16
	mov	x1, x22
	bl	_sqlite3WalFindFrame
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_15
; %bb.7:
	ldr	x8, [sp, #16]
	cbnz	x8, LBB0_20
LBB0_8:
	str	xzr, [sp, #8]
	sub	w26, w22, #1
	ldp	w2, w0, [x21, #24]
	mul	w1, w2, w26
	add	x3, sp, #8
	bl	_sqlite3OsFetch
	mov	x23, x0
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_19
; %bb.9:
	ldr	x9, [sp, #8]
	cbz	x9, LBB0_19
; %bb.10:
	ldr	x8, [x21]
	ldr	x9, [x25]
	cmp	x8, x9
	b.gt	LBB0_12
; %bb.11:
	ldr	x8, [x21, #32]
	cbz	x8, LBB0_16
LBB0_12:
	mov	x0, x21
	mov	x1, x22
	bl	_sqlite3PagerLookup
	str	x0, [sp, #24]
	cbz	x0, LBB0_16
; %bb.13:
	ldp	w8, w0, [x21, #24]
	mul	w1, w8, w26
	ldr	x2, [sp, #8]
	bl	_sqlite3OsUnfetch
	b	LBB0_17
LBB0_14:
Lloh7:
	adrp	x8, _SQLITE_CORRUPT_BKPT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SQLITE_CORRUPT_BKPT@GOTPAGEOFF]
Lloh9:
	ldr	w23, [x8]
	b	LBB0_21
LBB0_15:
	mov	x23, x0
	str	xzr, [x19]
	b	LBB0_21
LBB0_16:
	ldr	x2, [sp, #8]
	add	x3, sp, #24
	mov	x0, x21
	mov	x1, x22
	bl	_pagerAcquireMapPage
	mov	x23, x0
	ldr	x8, [sp, #24]
	cbz	x8, LBB0_18
LBB0_17:
	ldr	w8, [x24]
	cmp	w23, w8
	cset	w0, eq
	bl	_assert
	ldr	x8, [sp, #24]
	str	x8, [x19]
	ldr	w23, [x24]
	b	LBB0_21
LBB0_18:
	ldr	w8, [x24]
LBB0_19:
	cmp	w23, w8
	b.ne	LBB0_22
LBB0_20:
	mov	x0, x21
	mov	x1, x22
	mov	x2, x19
	mov	x3, x20
	bl	_getPageNormal
	mov	x23, x0
LBB0_21:
	mov	x0, x23
	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
LBB0_22:
	str	xzr, [x19]
	b	LBB0_21
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.comm	_PAGER_READER,8,3               ; @PAGER_READER
	.comm	_PAGER_GET_READONLY,4,2         ; @PAGER_GET_READONLY
	.comm	_SQLITE_CORRUPT_BKPT,4,2        ; @SQLITE_CORRUPT_BKPT
	.no_dead_strip	_getPageMMap
.subsections_via_symbols
