	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function editPage
_editPage:                              ## @editPage
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
                                        ## kill: def $ecx killed $ecx def $rcx
	movl	%edx, %ebx
	movl	%esi, %r15d
	movq	%rdi, %r13
	movq	40(%rdi), %rax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movslq	(%rdi), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	leal	(%rcx,%rcx), %eax
	cltq
	shlq	$2, %rax
	addq	32(%rdi), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	4(%rdi), %r14d
	leal	(%r14,%r15), %r12d
	addl	8(%rdi), %r12d
	movl	%r14d, %edi
	notl	%edi
	shrl	$31, %edi
	callq	_assert
	movl	%r15d, %eax
	subl	%ebx, %eax
	movl	%eax, -92(%rbp)                 ## 4-byte Spill
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	jge	LBB0_1
## %bb.2:
	movl	%ebx, %edx
	subl	%r15d, %edx
	movq	%r13, %rdi
	movl	%r15d, %esi
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	callq	_pageFreeArray
	movl	%r14d, %r15d
	subl	%eax, %r15d
	jge	LBB0_4
## %bb.3:
	movq	_SQLITE_CORRUPT_BKPT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_23
LBB0_1:
	movl	%r14d, %r15d
	jmp	LBB0_5
LBB0_4:
	movq	32(%r13), %rdi
	addl	%eax, %eax
	cltq
	leaq	(%rdi,%rax,4), %rsi
	addl	%r14d, %r14d
	movl	%r14d, %edx
	callq	_memmove
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_5:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leal	(%rax,%rbx), %esi
	subl	%esi, %r12d
	jle	LBB0_7
## %bb.6:
	movq	%r13, %rdi
	movl	%r12d, %edx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	callq	_pageFreeArray
	xorl	%edi, %edi
	subl	%eax, %r15d
	setge	%dil
	callq	_assert
LBB0_7:
	movq	-112(%rbp), %rbx                ## 8-byte Reload
	movq	-104(%rbp), %rax                ## 8-byte Reload
	leaq	(%rbx,%rax,4), %rdi
	addq	$20, %rdi
	movq	%rdi, -120(%rbp)                ## 8-byte Spill
	callq	_get2byteNotZero
	leaq	(%rbx,%rax,4), %rax
	movq	%rax, -80(%rbp)
	cmpq	-72(%rbp), %rax                 ## 8-byte Folded Reload
	jb	LBB0_22
## %bb.8:
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	cmpl	%esi, %edx
	jge	LBB0_11
## %bb.9:
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movl	%r14d, %edi
	movl	-92(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	callq	_MIN
	cmpl	%r14d, %ebx
	setl	%cl
	testl	%r15d, %r15d
	sete	%dl
	orb	%cl, %dl
	movq	_CORRUPT_DB@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	movl	%eax, %r12d
	setne	%al
	orb	%dl, %al
	movzbl	%al, %edi
	callq	_assert
	movl	%r12d, %edi
	notl	%edi
	shrl	$31, %edi
	callq	_assert
	movq	32(%r13), %rbx
	leal	(%r12,%r12), %eax
	cltq
	leaq	(%rbx,%rax,4), %rdi
	leal	(%r15,%r15), %edx
	movq	%rbx, %rsi
	callq	_memmove
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%rsp)
	leaq	-80(%rbp), %rdx
	movq	%r13, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rcx
	movq	-48(%rbp), %r8                  ## 8-byte Reload
                                        ## kill: def $r8d killed $r8d killed $r8
	movl	%r12d, %r9d
	callq	_pageInsertArray
	testq	%rax, %rax
	jne	LBB0_22
## %bb.10:
	addl	%r15d, %r12d
	movl	%r12d, %r15d
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
LBB0_11:
	movl	8(%r13), %eax
	testl	%eax, %eax
	jle	LBB0_20
## %bb.12:
	xorl	%r14d, %r14d
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%rsp)
	movq	%r13, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	leaq	-80(%rbp), %rdx
	movq	%r12, %rcx
	movl	%ebx, %r8d
	movl	$1, %r9d
	callq	_pageInsertArray
	testq	%rax, %rax
	jne	LBB0_22
## %bb.18:                              ##   in Loop: Header=BB0_13 Depth=1
	incl	%r15d
	movl	8(%r13), %eax
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
LBB0_19:                                ##   in Loop: Header=BB0_13 Depth=1
	incq	%r14
	movslq	%eax, %rcx
	cmpq	%rcx, %r14
	jge	LBB0_20
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r13), %rcx
	movl	(%rcx,%r14,4), %ebx
	addl	%esi, %ebx
	movl	%ebx, %ecx
	subl	%edx, %ecx
	js	LBB0_19
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	cmpl	-64(%rbp), %ecx                 ## 4-byte Folded Reload
	jge	LBB0_19
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	leal	(%rcx,%rcx), %eax
	movslq	%eax, %r12
	shlq	$2, %r12
	addq	32(%r13), %r12
	movl	%r15d, %edx
	subl	%ecx, %edx
	jle	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=1
	leaq	8(%r12), %rdi
	addl	%edx, %edx
	movq	%r12, %rsi
	callq	_memmove
	jmp	LBB0_17
LBB0_20:
	movq	%rdx, %rbx
	movl	%r15d, %edi
	notl	%edi
	shrl	$31, %edi
	callq	_assert
	leal	(%r15,%r15), %eax
	movslq	%eax, %rcx
	shlq	$2, %rcx
	addq	32(%r13), %rcx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, %r9d
	subl	%r15d, %r9d
	addl	%ebx, %r15d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%rsp)
	leaq	-80(%rbp), %rdx
	movq	%r13, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	%r15d, %r8d
	callq	_pageInsertArray
	testq	%rax, %rax
	je	LBB0_21
LBB0_22:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movl	%r15d, %esi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	%ebx, %edx
	callq	_populateCellCache
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	movq	%r13, %rcx
	callq	_rebuildPage
LBB0_23:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%esi, 4(%r13)
	movl	$0, 8(%r13)
	movq	-112(%rbp), %rbx                ## 8-byte Reload
	movq	-104(%rbp), %rax                ## 8-byte Reload
	leaq	(%rbx,%rax,4), %rdi
	addq	$12, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_put2byte
	movq	-80(%rbp), %rsi
	subq	%rbx, %rsi
	shrq	$2, %rsi
	movq	-120(%rbp), %rdi                ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_put2byte
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_CORRUPT_BKPT,4,2        ## @SQLITE_CORRUPT_BKPT
	.comm	_CORRUPT_DB,8,3                 ## @CORRUPT_DB
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.no_dead_strip	_editPage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function editPage
_editPage:                              ; @editPage
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x21, x4
	mov	x19, x3
	mov	x22, x2
	mov	x23, x1
	mov	x20, x0
	ldp	x24, x8, [x0, #32]
	str	x8, [sp, #16]                   ; 8-byte Folded Spill
	ldp	w8, w27, [x0]
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	ldr	w28, [x0, #8]
	mvn	w8, w27
	lsr	w0, w8, #31
	bl	_assert
	mov	x25, x27
	subs	w26, w23, w22
	b.ge	LBB0_4
; %bb.1:
	sub	w2, w22, w23
	mov	x0, x20
	mov	x1, x23
	mov	x3, x21
	bl	_pageFreeArray
	subs	w25, w27, w0
	b.ge	LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _SQLITE_CORRUPT_BKPT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SQLITE_CORRUPT_BKPT@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_21
LBB0_3:
	ldr	x8, [x20, #32]
	lsl	w9, w0, #1
	add	x1, x8, w9, sxtw #2
	lsl	w2, w27, #1
	mov	x0, x8
	bl	_memmove
LBB0_4:
	lsl	w8, w19, #1
	add	x24, x24, w8, sxtw #2
	add	w8, w27, w23
	add	w8, w8, w28
	add	w1, w19, w22
	subs	w2, w8, w1
	b.le	LBB0_6
; %bb.5:
	mov	x0, x20
	mov	x3, x21
	bl	_pageFreeArray
	subs	w25, w25, w0
	cset	w0, ge
	bl	_assert
LBB0_6:
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	add	w8, w8, #5
	ldr	x27, [sp, #16]                  ; 8-byte Folded Reload
	add	x0, x27, w8, sxtw #2
	str	x0, [sp]                        ; 8-byte Folded Spill
	bl	_get2byteNotZero
	add	x8, x27, x0, lsl #2
	str	x8, [sp, #24]
	cmp	x8, x24
	b.lo	LBB0_20
; %bb.7:
	cmp	w22, w23
	b.ge	LBB0_10
; %bb.8:
	mov	x0, x19
	mov	x1, x26
	bl	_MIN
	mov	x27, x0
	cmp	w26, w19
	ccmp	w25, #0, #4, ge
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
	mvn	w8, w27
	lsr	w0, w8, #31
	bl	_assert
	ldr	x26, [x20, #32]
	lsl	w8, w27, #1
	add	x0, x26, w8, sxtw #2
	lsl	w2, w25, #1
	mov	x1, x26
	bl	_memmove
	add	x2, sp, #24
	mov	x0, x20
	mov	x1, x24
	mov	x3, x26
	mov	x4, x22
	mov	x5, x27
	mov	x6, x21
	bl	_pageInsertArray
	cbnz	x0, LBB0_20
; %bb.9:
	add	w25, w27, w25
LBB0_10:
	ldr	w8, [x20, #8]
	cmp	w8, #1
	b.lt	LBB0_19
; %bb.11:
	mov	x28, #0
	b	LBB0_15
LBB0_12:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x2, sp, #24
	mov	x0, x20
	mov	x1, x24
	mov	x3, x27
	mov	x4, x26
	mov	w5, #1
	mov	x6, x21
	bl	_pageInsertArray
	cbnz	x0, LBB0_20
; %bb.13:                               ;   in Loop: Header=BB0_15 Depth=1
	add	w25, w25, #1
	ldr	w8, [x20, #8]
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x28, x28, #1
	cmp	x28, w8, sxtw
	b.ge	LBB0_19
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20, #16]
	ldr	w9, [x9, x28, lsl #2]
	add	w26, w9, w23
	subs	w9, w26, w22
	b.mi	LBB0_14
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	cmp	w9, w19
	b.ge	LBB0_14
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x8, [x20, #32]
	lsl	w10, w9, #1
	add	x27, x8, w10, sxtw #2
	subs	w8, w25, w9
	b.le	LBB0_12
; %bb.18:                               ;   in Loop: Header=BB0_15 Depth=1
	add	x0, x27, #8
	lsl	w2, w8, #1
	mov	x1, x27
	bl	_memmove
	b	LBB0_12
LBB0_19:
	mvn	w8, w25
	lsr	w0, w8, #31
	bl	_assert
	ldr	x8, [x20, #32]
	lsl	w9, w25, #1
	add	x3, x8, w9, sxtw #2
	add	w4, w25, w22
	sub	w5, w19, w25
	add	x2, sp, #24
	mov	x0, x20
	mov	x1, x24
	mov	x6, x21
	bl	_pageInsertArray
	cbz	x0, LBB0_22
LBB0_20:
	mov	x0, x21
	mov	x1, x22
	mov	x2, x19
	bl	_populateCellCache
	mov	x0, x21
	mov	x1, x22
	mov	x2, x19
	mov	x3, x20
	bl	_rebuildPage
LBB0_21:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_22:
	stp	w19, wzr, [x20, #4]
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	add	w8, w8, #3
	ldr	x20, [sp, #16]                  ; 8-byte Folded Reload
	add	x0, x20, w8, sxtw #2
	mov	x1, x19
	bl	_put2byte
	ldr	x8, [sp, #24]
	sub	x8, x8, x20
	lsr	x1, x8, #2
	ldr	x0, [sp]                        ; 8-byte Folded Reload
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_put2byte
Lloh6:
	adrp	x8, _SQLITE_OK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SQLITE_OK@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	b	LBB0_21
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_CORRUPT_BKPT,4,2        ; @SQLITE_CORRUPT_BKPT
	.comm	_CORRUPT_DB,8,3                 ; @CORRUPT_DB
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.no_dead_strip	_editPage
.subsections_via_symbols
