	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function walCheckpoint
_walCheckpoint:                         ## @walCheckpoint
	.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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -76(%rbp)                 ## 4-byte Spill
	movq	%r8, -96(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r12
	movl	%edx, %r15d
	movq	%rsi, -152(%rbp)                ## 8-byte Spill
	movq	%rdi, %r13
	movq	_SQLITE_OK@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movq	$0, -72(%rbp)
	movq	$0, -88(%rbp)
	movq	$0, -120(%rbp)
	callq	_walPagesize
	movl	%eax, %ebx
	xorl	%edi, %edi
	cmpl	$32769, %eax                    ## imm = 0x8001
	setl	%dil
	callq	_testcase
	xorl	%edi, %edi
	cmpl	$65536, %ebx                    ## imm = 0x10000
	setge	%dil
	callq	_testcase
	movq	%r13, %rdi
	callq	_walCkptInfo
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	(%rax), %rax
	cmpq	8(%r13), %rax
	jge	LBB0_11
## %bb.1:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	_SQLITE_CHECKPOINT_PASSIVE@GOTPCREL(%rip), %rax
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	cmpl	%r15d, (%rax)
	setne	%al
	movq	%r12, %r14
	testq	%r12, %r12
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	movq	8(%r13), %rbx
	movq	%r13, -104(%rbp)                ## 8-byte Spill
	movq	16(%r13), %rax
	movq	%rax, -144(%rbp)                ## 8-byte Spill
	movq	_WAL_NREADER@GOTPCREL(%rip), %rdx
	cmpl	$2, (%rdx)
	jl	LBB0_12
## %bb.2:
	movl	$1, %r15d
	movl	-64(%rbp), %ecx                 ## 4-byte Reload
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %rcx
	movq	%rax, (%rcx,%r15,8)
	movl	%r15d, %edi
	callq	_WAL_READ_LOCK
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movl	%eax, %esi
	movl	$1, %edx
	callq	_walUnlockExclusive
	movl	%ebx, %ecx
	movq	%r13, %rbx
	movq	_WAL_NREADER@GOTPCREL(%rip), %rdx
LBB0_4:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%r15
	movslq	(%rdx), %rax
	cmpq	%rax, %r15
	jge	LBB0_13
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movq	(%rax,%r15,8), %r12
	cmpq	%r12, %rbx
	jle	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %r13
	xorl	%edi, %edi
	movq	-104(%rbp), %rbx                ## 8-byte Reload
	cmpq	8(%rbx), %r12
	setle	%dil
	callq	_assert
	movl	%r15d, %edi
	callq	_WAL_READ_LOCK
	movq	%rbx, %rdi
	movq	_SQLITE_OK@GOTPCREL(%rip), %rbx
	movq	%r14, %rsi
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, %ecx
	movl	$1, %r8d
	callq	_walBusyLock
	movl	%eax, %ecx
	cmpl	(%rbx), %eax
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%ecx, %ebx
	movq	%r13, %rax
	cmpq	$1, %r15
	je	LBB0_3
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_READMARK_NOT_USED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	_SQLITE_BUSY@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	movq	_WAL_NREADER@GOTPCREL(%rip), %rdx
	jne	LBB0_56
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, %rbx
	xorl	%r14d, %r14d
	jmp	LBB0_4
LBB0_11:
	movl	(%r14), %ebx
	movq	%r12, %r14
	movl	-64(%rbp), %ecx                 ## 4-byte Reload
	movl	%r15d, %edx
	movq	%r13, %r15
	cmpl	%ebx, %ecx
	je	LBB0_48
	jmp	LBB0_56
LBB0_12:
	movl	-64(%rbp), %ecx                 ## 4-byte Reload
LBB0_13:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	cmpq	%rbx, %rax
	movq	-104(%rbp), %r15                ## 8-byte Reload
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	jge	LBB0_47
## %bb.14:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rsi
	leaq	-72(%rbp), %rdx
	movq	%r15, %rdi
	callq	_walIteratorInit
	movl	%eax, %r12d
	movq	_SQLITE_OK@GOTPCREL(%rip), %r13
	cmpl	(%r13), %eax
	sete	%al
	cmpq	$0, -72(%rbp)
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	cmpq	$0, -72(%rbp)
	je	LBB0_46
## %bb.15:
	xorl	%edi, %edi
	callq	_WAL_READ_LOCK
	movq	%r15, %rdi
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rsi
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, %ecx
	movl	$1, %r8d
	callq	_walBusyLock
	movl	%eax, %ecx
	cmpl	(%r13), %eax
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	jne	LBB0_47
## %bb.16:
	movq	%rbx, %rcx
	movq	_SQLITE_OK@GOTPCREL(%rip), %rbx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %r13
	movq	%rcx, -136(%rbp)                ## 8-byte Spill
	movq	%rcx, 16(%rax)
	movl	4(%r15), %r14d
	movl	-76(%rbp), %edi                 ## 4-byte Reload
	callq	_CKPT_SYNC_FLAGS
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_sqlite3OsSync
	movl	%eax, %ecx
	cmpl	(%rbx), %eax
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	jne	LBB0_21
## %bb.17:
	movl	%r14d, %r12d
	imull	-144(%rbp), %r12d               ## 4-byte Folded Reload
	movl	%r12d, -112(%rbp)
	movl	24(%r15), %edi
	leaq	-124(%rbp), %rsi
	callq	_sqlite3OsFileSize
	movl	%eax, %ecx
	cmpl	(%rbx), %eax
	jne	LBB0_20
## %bb.18:
	cmpl	%r12d, -124(%rbp)
	jge	LBB0_20
## %bb.19:
	movl	24(%r15), %edi
	movq	_SQLITE_FCNTL_SIZE_HINT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-112(%rbp), %rdx
	movl	%ecx, %ebx
	callq	_sqlite3OsFileControlHint
	movl	%ebx, %ecx
LBB0_20:
	movq	_SQLITE_OK@GOTPCREL(%rip), %rbx
LBB0_21:
	cmpl	(%rbx), %ecx
	jne	LBB0_38
## %bb.22:
	movq	16(%rbp), %r12
	jmp	LBB0_25
LBB0_23:                                ##   in Loop: Header=BB0_25 Depth=1
	movl	%ebx, %ecx
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_25 Depth=1
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_38
LBB0_25:                                ## =>This Inner Loop Header: Depth=1
	movl	%ecx, %ebx
	movq	-72(%rbp), %rdi
	leaq	-88(%rbp), %rsi
	leaq	-120(%rbp), %rdx
	callq	_walIteratorNext
	testq	%rax, %rax
	jne	LBB0_32
## %bb.26:                              ##   in Loop: Header=BB0_25 Depth=1
	movq	-120(%rbp), %rsi
	movq	%r15, %rdi
	callq	_walFramePgno
	xorl	%edi, %edi
	cmpq	-88(%rbp), %rax
	sete	%dil
	callq	_assert
	movq	-152(%rbp), %rax                ## 8-byte Reload
	cmpq	$0, 8(%rax)
	jne	LBB0_33
## %bb.27:                              ##   in Loop: Header=BB0_25 Depth=1
	movq	-120(%rbp), %rdi
	cmpq	%r13, %rdi
	jle	LBB0_23
## %bb.28:                              ##   in Loop: Header=BB0_25 Depth=1
	cmpq	-136(%rbp), %rdi                ## 8-byte Folded Reload
	movl	%ebx, %ecx
	jg	LBB0_24
## %bb.29:                              ##   in Loop: Header=BB0_25 Depth=1
	movq	-144(%rbp), %rax                ## 8-byte Reload
	cmpq	%rax, -88(%rbp)
	jg	LBB0_24
## %bb.30:                              ##   in Loop: Header=BB0_25 Depth=1
	movl	%r14d, %esi
	callq	_walFrameOffset
	movq	_WAL_FRAME_HDRSIZE@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	movl	4(%r15), %edi
	movq	%r12, %rsi
	movl	%r14d, %edx
	movl	%eax, %ecx
	callq	_sqlite3OsRead
	movq	_SQLITE_OK@GOTPCREL(%rip), %rbx
	cmpl	(%rbx), %eax
	jne	LBB0_35
## %bb.31:                              ##   in Loop: Header=BB0_25 Depth=1
	movl	-88(%rbp), %r14d
	decl	%r14d
	imull	-44(%rbp), %r14d                ## 4-byte Folded Reload
	movl	%r14d, %edi
	callq	_IS_BIG_INT
	movl	%eax, %edi
	callq	_testcase
	movl	24(%r15), %edi
	movq	%r12, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%r14d, %ecx
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	callq	_sqlite3OsWrite
	movl	%eax, %ecx
	cmpl	(%rbx), %eax
	je	LBB0_24
	jmp	LBB0_38
LBB0_32:
	movl	%ebx, %ecx
	jmp	LBB0_38
LBB0_33:
	cmpq	$0, (%rax)
	jne	LBB0_36
## %bb.34:
	movq	_SQLITE_INTERRUPT@GOTPCREL(%rip), %rax
	jmp	LBB0_37
LBB0_35:
	movl	%eax, %ecx
	jmp	LBB0_38
LBB0_36:
	movq	_SQLITE_NOMEM_BKPT@GOTPCREL(%rip), %rax
LBB0_37:
	movl	(%rax), %ecx
LBB0_38:
	movq	_SQLITE_OK@GOTPCREL(%rip), %rbx
	cmpl	(%rbx), %ecx
	jne	LBB0_44
## %bb.39:
	movq	%r15, %rdi
	movl	%ecx, %ebx
	callq	_walIndexHdr
	movl	%ebx, %ecx
	movq	-136(%rbp), %rbx                ## 8-byte Reload
	cmpq	(%rax), %rbx
	jne	LBB0_42
## %bb.40:
	movl	%r14d, %eax
	movl	16(%r15), %r14d
	imull	%eax, %r14d
	movl	%r14d, %edi
	callq	_IS_BIG_INT
	movl	%eax, %edi
	callq	_testcase
	movl	24(%r15), %edi
	movl	%r14d, %esi
	callq	_sqlite3OsTruncate
	movl	%eax, %ecx
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_42
## %bb.41:
	movl	24(%r15), %r14d
	movl	-76(%rbp), %edi                 ## 4-byte Reload
	callq	_CKPT_SYNC_FLAGS
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_sqlite3OsSync
	movl	%eax, %ecx
LBB0_42:
	movl	%ecx, %r12d
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_45
## %bb.43:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, (%rax)
	jmp	LBB0_45
LBB0_44:
	movl	%ecx, %r12d
LBB0_45:
	xorl	%edi, %edi
	callq	_WAL_READ_LOCK
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	$1, %edx
	callq	_walUnlockExclusive
LBB0_46:
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movl	%r12d, %ecx
	movl	-48(%rbp), %edx                 ## 4-byte Reload
LBB0_47:
	movq	_SQLITE_BUSY@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	cmovel	%ebx, %ecx
	cmpl	%ebx, %ecx
	jne	LBB0_56
LBB0_48:
	movq	_SQLITE_CHECKPOINT_PASSIVE@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	je	LBB0_56
## %bb.49:
	movq	%r14, %r12
	movl	%edx, %r13d
	movl	(%r15), %edi
	callq	_assert
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	cmpq	8(%r15), %rax
	jge	LBB0_51
## %bb.50:
	movq	_SQLITE_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	jmp	LBB0_56
LBB0_51:
	movq	_SQLITE_CHECKPOINT_RESTART@GOTPCREL(%rip), %rax
	movl	%ebx, %ecx
	movl	%r13d, %edx
	cmpl	%r13d, (%rax)
	jg	LBB0_56
## %bb.52:
	leaq	-112(%rbp), %rsi
	movl	$4, %edi
	callq	_sqlite3_randomness
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	xorl	%edi, %edi
	cmpq	8(%r15), %rax
	sete	%dil
	callq	_assert
	movl	$1, %edi
	callq	_WAL_READ_LOCK
	movq	_WAL_NREADER@GOTPCREL(%rip), %r14
	movl	(%r14), %r8d
	decl	%r8d
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, %ecx
	callq	_walBusyLock
	movl	%eax, %ecx
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_56
## %bb.53:
	movq	_SQLITE_CHECKPOINT_TRUNCATE@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	jne	LBB0_55
## %bb.54:
	movq	-112(%rbp), %rsi
	movq	%r15, %rdi
	callq	_walRestartHdr
	movl	4(%r15), %edi
	xorl	%esi, %esi
	callq	_sqlite3OsTruncate
	movl	%eax, %ecx
LBB0_55:
	movl	$1, %edi
	movl	%ecx, %ebx
	callq	_WAL_READ_LOCK
	movl	(%r14), %edx
	decl	%edx
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_walUnlockExclusive
	movl	%ebx, %ecx
LBB0_56:
	movq	-72(%rbp), %rdi
	movl	%ecx, %ebx
	callq	_walIteratorFree
	movl	%ebx, %eax
	addq	$120, %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	_SQLITE_CHECKPOINT_PASSIVE,4,2  ## @SQLITE_CHECKPOINT_PASSIVE
	.comm	_WAL_NREADER,4,2                ## @WAL_NREADER
	.comm	_READMARK_NOT_USED,8,3          ## @READMARK_NOT_USED
	.comm	_SQLITE_BUSY,4,2                ## @SQLITE_BUSY
	.comm	_SQLITE_FCNTL_SIZE_HINT,4,2     ## @SQLITE_FCNTL_SIZE_HINT
	.comm	_SQLITE_NOMEM_BKPT,4,2          ## @SQLITE_NOMEM_BKPT
	.comm	_SQLITE_INTERRUPT,4,2           ## @SQLITE_INTERRUPT
	.comm	_WAL_FRAME_HDRSIZE,4,2          ## @WAL_FRAME_HDRSIZE
	.comm	_SQLITE_CHECKPOINT_RESTART,4,2  ## @SQLITE_CHECKPOINT_RESTART
	.comm	_SQLITE_CHECKPOINT_TRUNCATE,4,2 ## @SQLITE_CHECKPOINT_TRUNCATE
	.no_dead_strip	_walCheckpoint
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function walCheckpoint
_walCheckpoint:                         ; @walCheckpoint
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x28, x27, [sp, #96]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #112]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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	x27, x6
	mov	x20, x5
	str	x4, [sp, #48]                   ; 8-byte Folded Spill
	mov	x22, x3
	mov	x21, x2
	mov	x28, x1
	mov	x19, x0
Lloh0:
	adrp	x24, _SQLITE_OK@GOTPAGE
Lloh1:
	ldr	x24, [x24, _SQLITE_OK@GOTPAGEOFF]
	ldr	w25, [x24]
	stp	xzr, xzr, [sp, #80]
	str	xzr, [sp, #72]
	bl	_walPagesize
	mov	x26, x0
	cmp	w0, #8, lsl #12                 ; =32768
	cset	w0, le
	bl	_testcase
	cmp	w26, #16, lsl #12               ; =65536
	cset	w0, ge
	bl	_testcase
	mov	x0, x19
	bl	_walCkptInfo
	mov	x23, x0
	ldr	x8, [x0]
	ldr	x9, [x19, #8]
Lloh2:
	adrp	x10, _SQLITE_CHECKPOINT_PASSIVE@GOTPAGE
Lloh3:
	ldr	x10, [x10, _SQLITE_CHECKPOINT_PASSIVE@GOTPAGEOFF]
	cmp	x8, x9
	b.ge	LBB0_9
; %bb.1:
	str	x28, [sp, #32]                  ; 8-byte Folded Spill
	str	x27, [sp, #16]                  ; 8-byte Folded Spill
	str	w20, [sp, #12]                  ; 4-byte Folded Spill
	ldr	w8, [x10]
	cmp	x22, #0
	str	w21, [sp, #44]                  ; 4-byte Folded Spill
	ccmp	w8, w21, #0, ne
	cset	w0, ne
	bl	_assert
	ldp	x27, x8, [x19, #8]
	str	x8, [sp, #24]                   ; 8-byte Folded Spill
Lloh4:
	adrp	x20, _WAL_NREADER@GOTPAGE
Lloh5:
	ldr	x20, [x20, _WAL_NREADER@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #2
	b.lt	LBB0_10
; %bb.2:
	mov	w24, #1
Lloh6:
	adrp	x21, _SQLITE_BUSY@GOTPAGE
Lloh7:
	ldr	x21, [x21, _SQLITE_BUSY@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
Lloh8:
	adrp	x8, _READMARK_NOT_USED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _READMARK_NOT_USED@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x24, #1
	csel	x8, x27, x8, eq
	ldr	x9, [x23, #8]
	str	x8, [x9, x24, lsl #3]
	mov	x0, x24
	bl	_WAL_READ_LOCK
	mov	x1, x0
	mov	x0, x19
	mov	w2, #1
	bl	_walUnlockExclusive
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x20]
	cmp	x24, x8
	b.ge	LBB0_10
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23, #8]
	ldr	x28, [x8, x24, lsl #3]
	cmp	x27, x28
	b.le	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19, #8]
	cmp	x28, x8
	cset	w0, le
	bl	_assert
	mov	x0, x24
	bl	_WAL_READ_LOCK
	mov	x3, x0
	mov	x0, x19
	mov	x1, x22
	ldr	x2, [sp, #48]                   ; 8-byte Folded Reload
	mov	w4, #1
	bl	_walBusyLock
	mov	x25, x0
Lloh11:
	adrp	x8, _SQLITE_OK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SQLITE_OK@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x21]
	cmp	w25, w8
	b.ne	LBB0_43
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x22, #0
	mov	x27, x28
	b	LBB0_4
LBB0_9:
	ldr	w20, [x24]
	b	LBB0_35
LBB0_10:
	ldr	x8, [x23]
	cmp	x8, x27
	ldr	w21, [sp, #44]                  ; 4-byte Folded Reload
Lloh14:
	adrp	x24, _SQLITE_OK@GOTPAGE
Lloh15:
	ldr	x24, [x24, _SQLITE_OK@GOTPAGEOFF]
	b.ge	LBB0_34
; %bb.11:
	ldr	x1, [x23]
	add	x2, sp, #88
	mov	x0, x19
	bl	_walIteratorInit
	mov	x25, x0
	ldr	w8, [x24]
	cmp	w0, w8
	ldr	x8, [sp, #88]
	ccmp	x8, #0, #4, ne
	cset	w0, eq
	bl	_assert
	ldr	x8, [sp, #88]
	cbz	x8, LBB0_34
; %bb.12:
	mov	w0, #0
	bl	_WAL_READ_LOCK
	mov	x3, x0
	mov	x0, x19
	mov	x1, x22
	ldr	x2, [sp, #48]                   ; 8-byte Folded Reload
	mov	w4, #1
	bl	_walBusyLock
	mov	x25, x0
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_34
; %bb.13:
	ldr	x28, [x23]
	str	x27, [x23, #16]
	ldr	w24, [x19, #4]
	ldr	w0, [sp, #12]                   ; 4-byte Folded Reload
	bl	_CKPT_SYNC_FLAGS
	mov	x1, x0
	mov	x0, x24
Lloh16:
	adrp	x24, _SQLITE_OK@GOTPAGE
Lloh17:
	ldr	x24, [x24, _SQLITE_OK@GOTPAGEOFF]
	bl	_sqlite3OsSync
	mov	x25, x0
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_17
; %bb.14:
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	mul	w20, w26, w8
	str	w20, [sp, #56]
	ldr	w0, [x19, #24]
	add	x1, sp, #68
	bl	_sqlite3OsFileSize
	mov	x25, x0
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_17
; %bb.15:
	ldr	w8, [sp, #68]
	cmp	w8, w20
	b.ge	LBB0_17
; %bb.16:
	ldr	w0, [x19, #24]
Lloh18:
	adrp	x8, _SQLITE_FCNTL_SIZE_HINT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SQLITE_FCNTL_SIZE_HINT@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	add	x2, sp, #56
	bl	_sqlite3OsFileControlHint
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x24]
	cmp	w25, w8
	b.ne	LBB0_27
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	ldr	x0, [sp, #88]
	add	x1, sp, #80
	add	x2, sp, #72
	bl	_walIteratorNext
	cbnz	x0, LBB0_27
; %bb.19:                               ;   in Loop: Header=BB0_17 Depth=1
	ldr	x1, [sp, #72]
	mov	x0, x19
	bl	_walFramePgno
	ldr	x8, [sp, #80]
	cmp	x0, x8
	cset	w0, eq
	bl	_assert
	ldr	x9, [sp, #32]                   ; 8-byte Folded Reload
	ldr	x8, [x9, #8]
	cbnz	x8, LBB0_25
; %bb.20:                               ;   in Loop: Header=BB0_17 Depth=1
	ldr	x0, [sp, #72]
	cmp	x0, x28
	b.le	LBB0_17
; %bb.21:                               ;   in Loop: Header=BB0_17 Depth=1
	cmp	x0, x27
	b.gt	LBB0_17
; %bb.22:                               ;   in Loop: Header=BB0_17 Depth=1
	ldr	x8, [sp, #80]
	ldr	x9, [sp, #24]                   ; 8-byte Folded Reload
	cmp	x8, x9
	b.gt	LBB0_17
; %bb.23:                               ;   in Loop: Header=BB0_17 Depth=1
	mov	x20, x28
	mov	x1, x26
	bl	_walFrameOffset
Lloh21:
	adrp	x8, _WAL_FRAME_HDRSIZE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _WAL_FRAME_HDRSIZE@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	add	w3, w8, w0
	ldr	w0, [x19, #4]
	ldr	x28, [sp, #16]                  ; 8-byte Folded Reload
	mov	x1, x28
	mov	x2, x26
	bl	_sqlite3OsRead
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_26
; %bb.24:                               ;   in Loop: Header=BB0_17 Depth=1
	ldr	w8, [sp, #80]
	sub	w8, w8, #1
	mul	w24, w8, w26
	mov	x0, x24
	bl	_IS_BIG_INT
	bl	_testcase
	ldr	w0, [x19, #24]
	mov	x1, x28
	mov	x2, x26
	mov	x3, x24
Lloh24:
	adrp	x24, _SQLITE_OK@GOTPAGE
Lloh25:
	ldr	x24, [x24, _SQLITE_OK@GOTPAGEOFF]
	bl	_sqlite3OsWrite
	mov	x25, x0
	ldr	w8, [x24]
	cmp	w0, w8
	mov	x28, x20
	b.eq	LBB0_17
	b	LBB0_27
LBB0_25:
Lloh26:
	adrp	x8, _SQLITE_NOMEM_BKPT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _SQLITE_NOMEM_BKPT@GOTPAGEOFF]
	ldr	x9, [x9]
Lloh28:
	adrp	x10, _SQLITE_INTERRUPT@GOTPAGE
Lloh29:
	ldr	x10, [x10, _SQLITE_INTERRUPT@GOTPAGEOFF]
	cmp	x9, #0
	csel	x8, x10, x8, eq
	ldr	w25, [x8]
	b	LBB0_27
LBB0_26:
	mov	x25, x0
LBB0_27:
	ldr	w8, [x24]
	cmp	w25, w8
	b.ne	LBB0_33
; %bb.28:
	mov	x0, x19
	bl	_walIndexHdr
	ldr	x8, [x0]
	cmp	x27, x8
	b.ne	LBB0_31
; %bb.29:
	ldr	w8, [x19, #16]
	mul	w24, w26, w8
	mov	x0, x24
	bl	_IS_BIG_INT
	bl	_testcase
	ldr	w0, [x19, #24]
	mov	x1, x24
Lloh30:
	adrp	x24, _SQLITE_OK@GOTPAGE
Lloh31:
	ldr	x24, [x24, _SQLITE_OK@GOTPAGEOFF]
	bl	_sqlite3OsTruncate
	mov	x25, x0
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_31
; %bb.30:
	ldr	w24, [x19, #24]
	ldr	w0, [sp, #12]                   ; 4-byte Folded Reload
	bl	_CKPT_SYNC_FLAGS
	mov	x1, x0
	mov	x0, x24
Lloh32:
	adrp	x24, _SQLITE_OK@GOTPAGE
Lloh33:
	ldr	x24, [x24, _SQLITE_OK@GOTPAGEOFF]
	bl	_sqlite3OsSync
	mov	x25, x0
LBB0_31:
	ldr	w8, [x24]
	cmp	w25, w8
	b.ne	LBB0_33
; %bb.32:
	str	x27, [x23]
LBB0_33:
	mov	w0, #0
	bl	_WAL_READ_LOCK
	mov	x1, x0
	mov	x0, x19
	mov	w2, #1
	bl	_walUnlockExclusive
LBB0_34:
Lloh34:
	adrp	x8, _SQLITE_BUSY@GOTPAGE
Lloh35:
	ldr	x8, [x8, _SQLITE_BUSY@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	ldr	w20, [x24]
	cmp	w25, w8
	csel	w25, w20, w25, eq
Lloh37:
	adrp	x10, _SQLITE_CHECKPOINT_PASSIVE@GOTPAGE
Lloh38:
	ldr	x10, [x10, _SQLITE_CHECKPOINT_PASSIVE@GOTPAGEOFF]
LBB0_35:
	ldr	w8, [x10]
	cmp	w25, w20
	ccmp	w8, w21, #4, eq
	b.eq	LBB0_43
; %bb.36:
	ldr	w0, [x19]
	bl	_assert
	ldr	x8, [x23]
	ldr	x9, [x19, #8]
	cmp	x8, x9
	b.ge	LBB0_38
; %bb.37:
Lloh39:
	adrp	x8, _SQLITE_BUSY@GOTPAGE
Lloh40:
	ldr	x8, [x8, _SQLITE_BUSY@GOTPAGEOFF]
Lloh41:
	ldr	w25, [x8]
	b	LBB0_43
LBB0_38:
Lloh42:
	adrp	x8, _SQLITE_CHECKPOINT_RESTART@GOTPAGE
Lloh43:
	ldr	x8, [x8, _SQLITE_CHECKPOINT_RESTART@GOTPAGEOFF]
Lloh44:
	ldr	w8, [x8]
	mov	x25, x20
	cmp	w8, w21
	b.gt	LBB0_43
; %bb.39:
	add	x1, sp, #56
	mov	w0, #4
	bl	_sqlite3_randomness
	ldr	x8, [x23]
	ldr	x9, [x19, #8]
	cmp	x8, x9
	cset	w0, eq
	bl	_assert
	mov	w0, #1
	bl	_WAL_READ_LOCK
	mov	x3, x0
Lloh45:
	adrp	x20, _WAL_NREADER@GOTPAGE
Lloh46:
	ldr	x20, [x20, _WAL_NREADER@GOTPAGEOFF]
	ldr	w8, [x20]
	sub	w4, w8, #1
	mov	x0, x19
	mov	x1, x22
	ldr	x2, [sp, #48]                   ; 8-byte Folded Reload
	bl	_walBusyLock
	mov	x25, x0
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_43
; %bb.40:
Lloh47:
	adrp	x8, _SQLITE_CHECKPOINT_TRUNCATE@GOTPAGE
Lloh48:
	ldr	x8, [x8, _SQLITE_CHECKPOINT_TRUNCATE@GOTPAGEOFF]
Lloh49:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_42
; %bb.41:
	ldr	x1, [sp, #56]
	mov	x0, x19
	bl	_walRestartHdr
	ldr	w0, [x19, #4]
	mov	w1, #0
	bl	_sqlite3OsTruncate
	mov	x25, x0
LBB0_42:
	mov	w0, #1
	bl	_WAL_READ_LOCK
	mov	x1, x0
	ldr	w8, [x20]
	sub	w2, w8, #1
	mov	x0, x19
	bl	_walUnlockExclusive
LBB0_43:
	ldr	x0, [sp, #88]
	bl	_walIteratorFree
	mov	x0, x25
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.comm	_SQLITE_CHECKPOINT_PASSIVE,4,2  ; @SQLITE_CHECKPOINT_PASSIVE
	.comm	_WAL_NREADER,4,2                ; @WAL_NREADER
	.comm	_READMARK_NOT_USED,8,3          ; @READMARK_NOT_USED
	.comm	_SQLITE_BUSY,4,2                ; @SQLITE_BUSY
	.comm	_SQLITE_FCNTL_SIZE_HINT,4,2     ; @SQLITE_FCNTL_SIZE_HINT
	.comm	_SQLITE_NOMEM_BKPT,4,2          ; @SQLITE_NOMEM_BKPT
	.comm	_SQLITE_INTERRUPT,4,2           ; @SQLITE_INTERRUPT
	.comm	_WAL_FRAME_HDRSIZE,4,2          ; @WAL_FRAME_HDRSIZE
	.comm	_SQLITE_CHECKPOINT_RESTART,4,2  ; @SQLITE_CHECKPOINT_RESTART
	.comm	_SQLITE_CHECKPOINT_TRUNCATE,4,2 ; @SQLITE_CHECKPOINT_TRUNCATE
	.no_dead_strip	_walCheckpoint
.subsections_via_symbols
