	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pagerPagecount
_pagerPagecount:                        ## @pagerPagecount
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_PAGER_OPEN@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_assert
	movq	8(%rbx), %rax
	movq	_SHARED_LOCK@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setge	%dil
	callq	_assert
	movl	40(%rbx), %edi
	callq	_isOpen
	movl	%eax, %edi
	callq	_assert
	xorl	%edi, %edi
	cmpq	$0, 16(%rbx)
	sete	%dil
	callq	_assert
	movl	44(%rbx), %edi
	callq	_sqlite3WalDbsize
	testq	%rax, %rax
	je	LBB0_1
LBB0_5:
	cmpq	32(%rbx), %rax
	jle	LBB0_7
## %bb.6:
	movq	%rax, 32(%rbx)
LBB0_7:
	movq	%rax, (%r14)
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_8:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	movl	40(%rbx), %edi
	callq	_isOpen
	movl	%eax, %edi
	callq	_ALWAYS
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movl	$0, -20(%rbp)
	movl	40(%rbx), %edi
	leaq	-20(%rbp), %rsi
	callq	_sqlite3OsFileSize
	movq	_SQLITE_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_8
## %bb.4:
	movl	-20(%rbp), %eax
	movl	24(%rbx), %ecx
	addl	%ecx, %eax
	decl	%eax
	cltd
	idivl	%ecx
	cltq
	jmp	LBB0_5
LBB0_2:
	xorl	%eax, %eax
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGER_OPEN,8,3                 ## @PAGER_OPEN
	.comm	_SHARED_LOCK,8,3                ## @SHARED_LOCK
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.no_dead_strip	_pagerPagecount
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pagerPagecount
_pagerPagecount:                        ; @pagerPagecount
	.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	x20, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _PAGER_OPEN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PAGER_OPEN@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_assert
	ldr	x8, [x20, #8]
Lloh3:
	adrp	x9, _SHARED_LOCK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SHARED_LOCK@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, ge
	bl	_assert
	ldr	w0, [x20, #40]
	bl	_isOpen
	bl	_assert
	ldr	x8, [x20, #16]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	ldr	w0, [x20, #44]
	bl	_sqlite3WalDbsize
Lloh6:
	adrp	x21, _SQLITE_OK@GOTPAGE
Lloh7:
	ldr	x21, [x21, _SQLITE_OK@GOTPAGEOFF]
	cbz	x0, LBB0_5
LBB0_1:
	ldr	x8, [x20, #32]
	cmp	x0, x8
	b.le	LBB0_3
; %bb.2:
	str	x0, [x20, #32]
LBB0_3:
	str	x0, [x19]
	ldr	w0, [x21]
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
LBB0_5:
	ldr	w0, [x20, #40]
	bl	_isOpen
	bl	_ALWAYS
	cbz	x0, LBB0_1
; %bb.6:
	str	wzr, [sp, #12]
	ldr	w0, [x20, #40]
	add	x1, sp, #12
	bl	_sqlite3OsFileSize
	ldr	w8, [x21]
	cmp	w0, w8
	b.ne	LBB0_4
; %bb.7:
	ldr	w8, [sp, #12]
	ldr	w9, [x20, #24]
	add	w8, w8, w9
	sub	w8, w8, #1
	sdiv	w8, w8, w9
	sxtw	x0, w8
	b	LBB0_1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGER_OPEN,8,3                 ; @PAGER_OPEN
	.comm	_SHARED_LOCK,8,3                ; @SHARED_LOCK
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.no_dead_strip	_pagerPagecount
.subsections_via_symbols
