	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function defragmentPage
_defragmentPage:                        ## @defragmentPage
	.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	%esi, -56(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r15
	movl	44(%rdi), %edi
	callq	_sqlite3PagerIswriteable
	movl	%eax, %edi
	callq	_assert
	xorl	%edi, %edi
	cmpq	$0, 48(%r15)
	setne	%dil
	callq	_assert
	movq	48(%r15), %rax
	movl	(%rax), %eax
	movq	_SQLITE_MAX_PAGE_SIZE@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpl	(%rcx), %eax
	setle	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpq	$0, (%r15)
	sete	%dil
	callq	_assert
	movq	48(%r15), %rax
	movl	8(%rax), %edi
	callq	_sqlite3_mutex_held
	movl	%eax, %edi
	callq	_assert
	movq	8(%r15), %r13
	movslq	16(%r15), %r12
	movslq	20(%r15), %r14
	movslq	24(%r15), %rbx
	movl	%ebx, %eax
	movq	%rax, -144(%rbp)                ## 8-byte Spill
	leaq	(%r12,%r13), %rdi
	addq	$3, %rdi
	callq	_get2byte
	cmpl	%eax, %ebx
	sete	%al
	movq	_CORRUPT_DB@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	setne	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	movq	%r14, %rdi
	leaq	(%r14,%rbx,2), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	48(%r15), %rax
	movl	(%rax), %edx
	movzbl	7(%r12,%r13), %eax
	cmpl	-56(%rbp), %eax                 ## 4-byte Folded Reload
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, -96(%rbp)                 ## 8-byte Spill
	jle	LBB0_4
## %bb.1:
	leal	-4(%rdx), %eax
	movl	%eax, -100(%rbp)                ## 4-byte Spill
LBB0_2:
	cmpl	$0, -144(%rbp)                  ## 4-byte Folded Reload
	jle	LBB0_3
## %bb.27:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	addq	%r14, %rcx
	addq	$5, %rcx
	movq	%rcx, -152(%rbp)                ## 8-byte Spill
	addq	%r14, %rdi
	xorl	%ecx, %ecx
	movq	%rcx, -136(%rbp)                ## 8-byte Spill
	movl	%edx, %ecx
	movq	%r15, %r12
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movq	%r15, -128(%rbp)                ## 8-byte Spill
	.p2align	4, 0x90
LBB0_28:                                ## =>This Inner Loop Header: Depth=1
	movl	%ecx, -88(%rbp)                 ## 4-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_get2byte
	movl	%eax, %r15d
	xorl	%edi, %edi
	cmpl	%r13d, %eax
	sete	%dil
	callq	_testcase
	xorl	%edi, %edi
	movl	-100(%rbp), %ebx                ## 4-byte Reload
	cmpl	%ebx, %r15d
	sete	%dil
	callq	_testcase
	cmpl	%r13d, %r15d
	jl	LBB0_30
## %bb.29:                              ##   in Loop: Header=BB0_28 Depth=1
	cmpl	%ebx, %r15d
	jg	LBB0_30
## %bb.31:                              ##   in Loop: Header=BB0_28 Depth=1
	movl	$1, %edi
	callq	_assert
	movslq	%r15d, %rax
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	leaq	(%r14,%rax), %rsi
	movq	%r12, %rdi
	callq	*32(%r12)
                                        ## kill: def $eax killed $eax def $rax
	movl	-88(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, %ebx
	subl	%eax, %ebx
	cmpl	%r13d, %ebx
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	jl	LBB0_33
## %bb.32:                              ##   in Loop: Header=BB0_28 Depth=1
	leal	(%rax,%r15), %r13d
	cmpl	%edx, %r13d
	jg	LBB0_33
## %bb.34:                              ##   in Loop: Header=BB0_28 Depth=1
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	xorl	%edi, %edi
	xorl	%r12d, %r12d
	cmpl	%edx, %ecx
	setle	%dil
	sete	%r12b
	movq	%rdx, %r14
	callq	_assert
	movl	%r12d, %edi
	callq	_testcase
	xorl	%edi, %edi
	cmpl	%r14d, %r13d
	sete	%dil
	callq	_testcase
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	callq	_put2byte
	cmpq	$0, -136(%rbp)                  ## 8-byte Folded Reload
	je	LBB0_36
## %bb.35:                              ##   in Loop: Header=BB0_28 Depth=1
	movq	-128(%rbp), %r12                ## 8-byte Reload
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_39
	.p2align	4, 0x90
LBB0_36:                                ##   in Loop: Header=BB0_28 Depth=1
	cmpl	%r15d, %ebx
	movq	-128(%rbp), %r12                ## 8-byte Reload
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	jne	LBB0_38
## %bb.37:                              ##   in Loop: Header=BB0_28 Depth=1
	xorl	%eax, %eax
	movq	%rax, -136(%rbp)                ## 8-byte Spill
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_40
LBB0_38:                                ##   in Loop: Header=BB0_28 Depth=1
	movq	48(%r12), %rax
	movl	4(%rax), %edi
	callq	_sqlite3PagerTempSpace
	movq	%rax, %r14
	movq	-152(%rbp), %rdi                ## 8-byte Reload
	callq	_get2byte
	cltq
	movq	%r14, %rdi
	addq	%rax, %rdi
	leaq	(%r15,%rax), %rsi
	movl	-88(%rbp), %edx                 ## 4-byte Reload
	subl	%eax, %edx
	callq	_memcpy
	movq	%r14, %rax
	movq	%r14, -136(%rbp)                ## 8-byte Spill
LBB0_39:                                ##   in Loop: Header=BB0_28 Depth=1
	movslq	%ebx, %rdi
	addq	%r15, %rdi
	movq	-120(%rbp), %rsi                ## 8-byte Reload
	addq	%r14, %rsi
	movq	-112(%rbp), %rdx                ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
LBB0_40:                                ##   in Loop: Header=BB0_28 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	addq	$2, %rdi
	movl	%ebx, %ecx
	decq	-144(%rbp)                      ## 8-byte Folded Spill
	jne	LBB0_28
	jmp	LBB0_41
LBB0_4:
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	leaq	(%r12,%r13), %rdi
	incq	%rdi
	callq	_get2byte
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	leal	-4(%rdx), %r14d
	cmpl	%r14d, %eax
	jg	LBB0_5
## %bb.7:
	movl	%eax, %r12d
	testl	%eax, %eax
	movl	%r14d, -100(%rbp)               ## 4-byte Spill
	je	LBB0_8
## %bb.9:
	movslq	%r12d, %rbx
	leaq	(%rbx,%r13), %rdi
	callq	_get2byte
                                        ## kill: def $eax killed $eax def $rax
	cmpl	%r14d, %eax
	jle	LBB0_10
LBB0_5:
	movq	%r15, %rdi
	jmp	LBB0_6
LBB0_3:
	movl	%edx, %ebx
	movq	%r15, %r12
	movq	-48(%rbp), %r15                 ## 8-byte Reload
LBB0_41:
	movq	-96(%rbp), %r13                 ## 8-byte Reload
	movb	$0, 7(%r15,%r13)
LBB0_42:
	movl	$1, %edi
	callq	_assert
	movzbl	7(%r15,%r13), %eax
	movl	%ebx, %r14d
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	subl	%edx, %r14d
	addl	%r14d, %eax
	movzbl	40(%r12), %ecx
	cmpl	%ecx, %eax
	jne	LBB0_30
## %bb.43:
	xorl	%edi, %edi
	cmpl	%edx, %ebx
	setge	%dil
	callq	_assert
	leaq	(%r15,%r13), %rdi
	addq	$5, %rdi
	movl	%ebx, %esi
	callq	_put2byte
	movw	$0, 1(%r13,%r15)
	movslq	-80(%rbp), %rdi                 ## 4-byte Folded Reload
	addq	%r15, %rdi
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_memset
	movl	44(%r12), %edi
	callq	_sqlite3PagerIswriteable
	movl	%eax, %edi
	callq	_assert
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_30:
	movq	%r12, %rdi
	jmp	LBB0_6
LBB0_33:
	movq	-128(%rbp), %rdi                ## 8-byte Reload
LBB0_6:
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_SQLITE_CORRUPT_PAGE            ## TAILCALL
LBB0_8:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_2
LBB0_10:
	testl	%eax, %eax
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	je	LBB0_13
## %bb.11:
	movslq	%eax, %rsi
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	cmpb	$0, (%rcx,%rsi)
	jne	LBB0_2
## %bb.12:
	cmpb	$0, 1(%rsi,%rcx)
	jne	LBB0_2
LBB0_13:
	movq	%rax, %r14
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	leaq	(%rbx,%r13), %rdi
	addq	$2, %rdi
	callq	_get2byte
	movl	%eax, %ebx
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r13), %rdi
	addq	$5, %rdi
	callq	_get2byte
                                        ## kill: def $eax killed $eax def $rax
	movl	%r12d, %ecx
	subl	%eax, %ecx
	jle	LBB0_5
## %bb.14:
	leal	(%rbx,%r12), %esi
	movq	%r14, %r13
	testl	%r13d, %r13d
	je	LBB0_18
## %bb.15:
	movq	%rbx, %r14
	movl	%r13d, %ebx
	subl	%esi, %ebx
	jl	LBB0_5
## %bb.16:
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	%ecx, -112(%rbp)                ## 4-byte Spill
	movslq	%r13d, %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rax,%rcx), %rdi
	addq	$2, %rdi
	callq	_get2byte
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%r13), %ecx
	cmpl	-72(%rbp), %ecx                 ## 4-byte Folded Reload
	jg	LBB0_5
## %bb.17:
	movq	%r13, -120(%rbp)                ## 8-byte Spill
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	leal	(%rax,%rdx), %ecx
	movslq	%ecx, %rdi
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	addq	%rcx, %rdi
	movslq	%edx, %rsi
	addq	%rcx, %rsi
	movl	%ebx, %edx
	movq	%rax, %r13
	callq	_memmove
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	%r14, %rbx
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	addl	%r13d, %ebx
	leal	(%rbx,%r12), %esi
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	jmp	LBB0_20
LBB0_18:
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	cmpl	%edx, %esi
	jg	LBB0_5
## %bb.19:
	movl	%ecx, -112(%rbp)                ## 4-byte Spill
	movq	%r13, -120(%rbp)                ## 8-byte Spill
	xorl	%ecx, %ecx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
LBB0_20:
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	addl	%eax, %ebx
	xorl	%edi, %edi
	cmpl	%edx, %esi
	setle	%dil
	movq	%rax, %r14
	callq	_assert
	movslq	%ebx, %rdi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addq	%rax, %rdi
	movslq	%r14d, %rsi
	addq	%rax, %rsi
	movl	-112(%rbp), %edx                ## 4-byte Reload
	callq	_memmove
	cmpl	$0, -144(%rbp)                  ## 4-byte Folded Reload
	jle	LBB0_21
## %bb.22:
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addq	%rax, %r13
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	addq	%rax, %r14
	jmp	LBB0_23
LBB0_25:                                ##   in Loop: Header=BB0_23 Depth=1
	addl	%ecx, %eax
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_put2byte
LBB0_26:                                ##   in Loop: Header=BB0_23 Depth=1
	addq	$2, %r14
	cmpq	%r13, %r14
	jae	LBB0_21
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_get2byte
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	cmpl	%r12d, %eax
	jl	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_23 Depth=1
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	cmpl	-120(%rbp), %eax                ## 4-byte Folded Reload
	jl	LBB0_25
	jmp	LBB0_26
LBB0_21:
	movq	%r15, %r12
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	-96(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_42
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_MAX_PAGE_SIZE,4,2       ## @SQLITE_MAX_PAGE_SIZE
	.comm	_CORRUPT_DB,8,3                 ## @CORRUPT_DB
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.no_dead_strip	_defragmentPage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function defragmentPage
_defragmentPage:                        ; @defragmentPage
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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	x20, x1
	mov	x23, x0
	ldr	w0, [x0, #44]
	bl	_sqlite3PagerIswriteable
	bl	_assert
	ldr	x8, [x23, #48]
	cmp	x8, #0
	cset	w0, ne
	bl	_assert
	ldr	x8, [x23, #48]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _SQLITE_MAX_PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SQLITE_MAX_PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	cset	w0, le
	bl	_assert
	ldr	x8, [x23]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	ldr	x8, [x23, #48]
	ldr	w0, [x8, #8]
	bl	_sqlite3_mutex_held
	bl	_assert
	ldr	x24, [x23, #8]
	ldpsw	x27, x25, [x23, #16]
	ldrsw	x19, [x23, #24]
	and	x21, x19, #0xffffffff
	add	x22, x27, x24
	add	x0, x22, #3
	bl	_get2byte
	cmp	w19, w0
Lloh3:
	adrp	x8, _CORRUPT_DB@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CORRUPT_DB@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ccmp	x8, #0, #0, ne
	cset	w0, ne
	bl	_assert
	add	x8, x25, x19, lsl #1
	str	x8, [sp, #48]                   ; 8-byte Folded Spill
	mov	x19, x23
	mov	x23, x24
	ldr	x8, [x19, #48]
	ldr	w10, [x8]
	add	x8, x27, #7
	str	x8, [sp, #16]                   ; 8-byte Folded Spill
	ldrb	w8, [x24, x8]
	cmp	w8, w20
	str	x24, [sp, #32]                  ; 8-byte Folded Spill
	str	w10, [sp, #60]                  ; 4-byte Folded Spill
	b.le	LBB0_14
; %bb.1:
	sub	w24, w10, #4
LBB0_2:
	cmp	w21, #1
	str	x27, [sp, #8]                   ; 8-byte Folded Spill
	b.lt	LBB0_25
; %bb.3:
	str	xzr, [sp, #40]                  ; 8-byte Folded Spill
	add	x8, x27, x23
	add	x8, x8, #5
	str	x8, [sp]                        ; 8-byte Folded Spill
	add	x22, x23, x25
	mov	x27, x10
	str	x23, [sp, #72]                  ; 8-byte Folded Spill
	ldr	x26, [sp, #48]                  ; 8-byte Folded Reload
	str	w24, [sp, #28]                  ; 4-byte Folded Spill
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_get2byte
	mov	x25, x0
	cmp	w0, w26
	cset	w0, eq
	bl	_testcase
	cmp	w25, w24
	cset	w0, eq
	bl	_testcase
	cmp	w25, w26
	b.lt	LBB0_31
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w25, w24
	b.gt	LBB0_31
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w0, #1
	bl	_assert
	ldr	x8, [x19, #32]
	sxtw	x28, w25
	ldr	x9, [sp, #72]                   ; 8-byte Folded Reload
	add	x1, x9, x28
	mov	x23, x19
	mov	x0, x19
	blr	x8
	sub	w20, w27, w0
	cmp	w20, w26
	add	w19, w0, w25
	ldr	w8, [sp, #60]                   ; 4-byte Folded Reload
	ccmp	w19, w8, #0, ge
	b.gt	LBB0_29
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x24, x0
	str	x21, [sp, #64]                  ; 8-byte Folded Spill
	cmp	w27, w8
	cset	w0, le
	cset	w26, eq
	mov	x21, x8
	bl	_assert
	mov	x0, x26
	bl	_testcase
	cmp	w19, w21
	cset	w0, eq
	bl	_testcase
	mov	x0, x22
	mov	x1, x20
	bl	_put2byte
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	cbz	x8, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x19, x23
	ldr	x23, [sp, #32]                  ; 8-byte Folded Reload
	ldr	x26, [sp, #48]                  ; 8-byte Folded Reload
	ldr	x21, [sp, #64]                  ; 8-byte Folded Reload
	b	LBB0_12
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	cmp	w20, w25
	mov	x19, x23
	ldr	x26, [sp, #48]                  ; 8-byte Folded Reload
	ldr	x21, [sp, #64]                  ; 8-byte Folded Reload
	b.ne	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	str	xzr, [sp, #40]                  ; 8-byte Folded Spill
	ldr	x23, [sp, #32]                  ; 8-byte Folded Reload
	b	LBB0_13
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #48]
	ldr	w0, [x8, #4]
	bl	_sqlite3PagerTempSpace
	mov	x25, x0
	ldr	x0, [sp]                        ; 8-byte Folded Reload
	bl	_get2byte
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x9, w0
	add	x8, x25, x9
	ldr	x23, [sp, #32]                  ; 8-byte Folded Reload
	add	x1, x23, x9
	sub	w2, w27, w0
	mov	x0, x8
	bl	_memcpy
	str	x25, [sp, #72]                  ; 8-byte Folded Spill
	str	x25, [sp, #40]                  ; 8-byte Folded Spill
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x0, x23, w20, sxtw
	ldr	x8, [sp, #72]                   ; 8-byte Folded Reload
	add	x1, x8, x28
	mov	x2, x24
	bl	_memcpy
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x22, #2
	mov	x27, x20
	subs	x21, x21, #1
	ldr	w24, [sp, #28]                  ; 4-byte Folded Reload
	b.ne	LBB0_4
	b	LBB0_26
LBB0_14:
	add	x0, x22, #1
	bl	_get2byte
	ldr	w10, [sp, #60]                  ; 4-byte Folded Reload
	sub	w24, w10, #4
	cmp	w0, w24
	b.gt	LBB0_31
; %bb.15:
	mov	x26, x0
	cbz	w0, LBB0_2
; %bb.16:
	sxtw	x20, w26
	add	x0, x23, x20
	bl	_get2byte
	cmp	w0, w24
	b.gt	LBB0_31
; %bb.17:
	mov	x22, x0
	ldr	w10, [sp, #60]                  ; 4-byte Folded Reload
	cbz	w0, LBB0_20
; %bb.18:
	sxtw	x8, w22
	ldrb	w9, [x23, x8]
	cbnz	w9, LBB0_2
; %bb.19:
	add	x8, x8, x23
	ldrb	w8, [x8, #1]
	cbnz	w8, LBB0_2
LBB0_20:
	add	x8, x20, x23
	add	x0, x8, #2
	bl	_get2byte
	mov	x9, x23
	mov	x23, x0
	add	w8, w27, #5
	add	x0, x9, w8, sxtw
	bl	_get2byte
	subs	w9, w26, w0
	b.le	LBB0_31
; %bb.21:
	mov	x20, x0
	add	w28, w23, w26
	cbz	w22, LBB0_30
; %bb.22:
	subs	w8, w22, w28
	b.lt	LBB0_31
; %bb.23:
	str	w8, [sp, #40]                   ; 4-byte Folded Spill
	str	w9, [sp, #72]                   ; 4-byte Folded Spill
	str	x27, [sp, #8]                   ; 8-byte Folded Spill
	ldr	x27, [sp, #32]                  ; 8-byte Folded Reload
	add	x8, x27, w22, sxtw
	add	x0, x8, #2
	bl	_get2byte
	add	w8, w0, w22
	ldr	w9, [sp, #60]                   ; 4-byte Folded Reload
	cmp	w8, w9
	b.gt	LBB0_31
; %bb.24:
	mov	x24, x0
	str	x19, [sp, #64]                  ; 8-byte Folded Spill
	sxtw	x8, w28
	add	x9, x8, w0, sxtw
	add	x0, x27, x9
	add	x1, x27, x8
	ldr	w2, [sp, #40]                   ; 4-byte Folded Reload
	bl	_memmove
	ldr	w8, [sp, #60]                   ; 4-byte Folded Reload
	add	w23, w24, w23
	add	w28, w23, w26
	b	LBB0_34
LBB0_25:
	mov	x20, x10
	ldr	x26, [sp, #48]                  ; 8-byte Folded Reload
LBB0_26:
	ldp	x27, x21, [sp, #8]              ; 16-byte Folded Reload
	strb	wzr, [x23, x21]
LBB0_27:
	mov	w0, #1
	bl	_assert
	ldrb	w8, [x23, x21]
	sub	w21, w20, w26
	add	w8, w21, w8
	ldrb	w9, [x19, #40]
	cmp	w8, w9
	b.ne	LBB0_31
; %bb.28:
	cmp	w20, w26
	cset	w0, ge
	bl	_assert
	add	w8, w27, #5
	add	x0, x23, w8, sxtw
	mov	x1, x20
	bl	_put2byte
	add	x8, x27, x23
	sturh	wzr, [x8, #1]
	add	x0, x23, w26, sxtw
	mov	w1, #0
	mov	x2, x21
	bl	_memset
	ldr	w0, [x19, #44]
	bl	_sqlite3PagerIswriteable
	bl	_assert
Lloh6:
	adrp	x8, _SQLITE_OK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SQLITE_OK@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_29:
	mov	x0, x23
	b	LBB0_32
LBB0_30:
	ldr	w8, [sp, #60]                   ; 4-byte Folded Reload
	cmp	w28, w8
	b.le	LBB0_33
LBB0_31:
	mov	x0, x19
LBB0_32:
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	b	_SQLITE_CORRUPT_PAGE
LBB0_33:
	str	w9, [sp, #72]                   ; 4-byte Folded Spill
	str	x27, [sp, #8]                   ; 8-byte Folded Spill
	str	x19, [sp, #64]                  ; 8-byte Folded Spill
	mov	w24, #0
	ldr	x27, [sp, #32]                  ; 8-byte Folded Reload
LBB0_34:
	sxtw	x19, w20
	add	x20, x19, w23, sxtw
	cmp	w28, w8
	cset	w0, le
	bl	_assert
	mov	x28, x20
	add	x0, x27, x20
	add	x1, x27, x19
	ldr	w2, [sp, #72]                   ; 4-byte Folded Reload
	bl	_memmove
	cmp	w21, #1
	b.lt	LBB0_41
; %bb.35:
	ldr	x8, [sp, #48]                   ; 8-byte Folded Reload
	add	x21, x27, x8
	add	x25, x27, x25
	ldr	x19, [sp, #64]                  ; 8-byte Folded Reload
	ldr	x27, [sp, #8]                   ; 8-byte Folded Reload
	b	LBB0_38
LBB0_36:                                ;   in Loop: Header=BB0_38 Depth=1
	add	w1, w0, w8
	mov	x0, x25
	bl	_put2byte
LBB0_37:                                ;   in Loop: Header=BB0_38 Depth=1
	add	x25, x25, #2
	cmp	x25, x21
	b.hs	LBB0_40
LBB0_38:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x25
	bl	_get2byte
	mov	x8, x23
	cmp	w0, w26
	b.lt	LBB0_36
; %bb.39:                               ;   in Loop: Header=BB0_38 Depth=1
	mov	x8, x24
	cmp	w0, w22
	b.lt	LBB0_36
	b	LBB0_37
LBB0_40:
	ldr	x23, [sp, #32]                  ; 8-byte Folded Reload
	b	LBB0_42
LBB0_41:
	ldr	x19, [sp, #64]                  ; 8-byte Folded Reload
	mov	x23, x27
	ldr	x27, [sp, #8]                   ; 8-byte Folded Reload
LBB0_42:
	ldr	x26, [sp, #48]                  ; 8-byte Folded Reload
	ldr	x21, [sp, #16]                  ; 8-byte Folded Reload
	mov	x20, x28
	b	LBB0_27
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_MAX_PAGE_SIZE,4,2       ; @SQLITE_MAX_PAGE_SIZE
	.comm	_CORRUPT_DB,8,3                 ; @CORRUPT_DB
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.no_dead_strip	_defragmentPage
.subsections_via_symbols
