	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pageFindSlot
_pageFindSlot:                          ## @pageFindSlot
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movl	%esi, %r13d
	movq	%rdi, %r14
	movslq	(%rdi), %rax
	movq	8(%rdi), %rbx
	leaq	1(%rax), %r12
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	leaq	(%rbx,%rax,4), %rdi
	addq	$4, %rdi
	callq	_get2byte
	movl	%eax, %r15d
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	16(%r14), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	subl	%r13d, %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	xorl	%edi, %edi
	testl	%r15d, %r15d
	setg	%dil
	callq	_assert
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, -96(%rbp)                 ## 8-byte Spill
	cmpl	-48(%rbp), %r15d                ## 4-byte Folded Reload
	jg	LBB0_11
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%r15d, %r14d
	movslq	%r15d, %r12
	movq	%rbx, %r13
	leaq	(%rbx,%r12,4), %rdi
	addq	$8, %rdi
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	callq	_get2byte
	movl	%eax, %r15d
	subl	-44(%rbp), %r15d                ## 4-byte Folded Reload
	jns	LBB0_3
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%eax, %ebx
	leaq	(,%r12,4), %rdi
	addq	%r13, %rdi
	callq	_get2byte
	movl	%eax, %r15d
	addl	%r14d, %ebx
	movl	%r14d, %r12d
	cmpl	%ebx, %eax
	movq	%r13, %rbx
	jg	LBB0_1
## %bb.10:
	testl	%r15d, %r15d
	jne	LBB0_12
	jmp	LBB0_13
LBB0_11:
	movl	-56(%rbp), %eax                 ## 4-byte Reload
	addl	$-4, %eax
	cmpl	%eax, %r15d
	jg	LBB0_12
	jmp	LBB0_13
LBB0_3:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	xorl	%edi, %edi
	cmpl	$4, %r15d
	sete	%dil
	callq	_testcase
	xorl	%edi, %edi
	cmpl	$3, %r15d
	sete	%dil
	callq	_testcase
	cmpl	$3, %r15d
	ja	LBB0_6
## %bb.4:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	cmpl	$57, 28(%r13,%rax,4)
	jg	LBB0_13
## %bb.5:
	movq	%r13, %rbx
	movq	%rax, %r13
	movslq	-96(%rbp), %rax                 ## 4-byte Folded Reload
	leaq	(%rbx,%rax,4), %rdi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rbx,%rax,4), %rsi
	movl	$2, %edx
	callq	_memcpy
	addl	%r15d, 28(%rbx,%r13,4)
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	addl	%r15d, %r14d
	jmp	LBB0_8
LBB0_6:
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	addl	%r15d, %r14d
	cmpl	-48(%rbp), %r14d                ## 4-byte Folded Reload
	jle	LBB0_7
LBB0_12:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_SQLITE_CORRUPT_PAGE
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
LBB0_13:
	xorl	%eax, %eax
LBB0_14:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	callq	_put2byte
	movq	%r13, %rbx
LBB0_8:
	movslq	%r14d, %rax
	leaq	(%rbx,%rax,4), %rax
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_pageFindSlot
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pageFindSlot
_pageFindSlot:                          ; @pageFindSlot
	.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
	str	x2, [sp, #24]                   ; 8-byte Folded Spill
	mov	x21, x1
	mov	x20, x0
	ldrsw	x8, [x0]
	ldr	x25, [x0, #8]
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	add	x28, x8, #1
	add	x0, x25, x28, lsl #2
	bl	_get2byte
	mov	x22, x0
	ldr	x8, [x20, #16]
	ldr	w8, [x8]
	str	w8, [sp, #20]                   ; 4-byte Folded Spill
	sub	w19, w8, w21
	cmp	w0, #0
	cset	w0, gt
	bl	_assert
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x27, x22
	cmp	w22, w19
	b.gt	LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	sxtw	x26, w27
	add	x8, x25, w27, sxtw #2
	add	x23, x8, #8
	mov	x0, x23
	bl	_get2byte
	subs	w22, w0, w21
	b.pl	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x24, x0
	add	x0, x25, x26, lsl #2
	bl	_get2byte
	mov	x22, x0
	add	w8, w24, w27
	cmp	w0, w8
	mov	x28, x27
	b.gt	LBB0_1
; %bb.4:
	cbnz	w22, LBB0_10
	b	LBB0_8
LBB0_5:
	ldr	w8, [sp, #20]                   ; 4-byte Folded Reload
	sub	w8, w8, #4
	cmp	w27, w8
	b.le	LBB0_8
	b	LBB0_10
LBB0_6:
	cmp	w22, #4
	cset	w0, eq
	bl	_testcase
	cmp	w22, #3
	cset	w0, eq
	bl	_testcase
	cmp	w22, #3
	b.hi	LBB0_9
; %bb.7:
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	add	x19, x8, #7
	ldr	w8, [x25, x19, lsl #2]
	cmp	w8, #57
	b.le	LBB0_12
LBB0_8:
	mov	x0, #0
	b	LBB0_11
LBB0_9:
	add	w21, w22, w27
	cmp	w21, w19
	b.le	LBB0_13
LBB0_10:
	mov	x0, x20
	bl	_SQLITE_CORRUPT_PAGE
	mov	x8, x0
	mov	x0, #0
	ldr	x9, [sp, #24]                   ; 8-byte Folded Reload
	str	w8, [x9]
LBB0_11:
	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_12:
	add	x0, x25, w28, sxtw #2
	add	x1, x25, x26, lsl #2
	mov	w2, #2
	bl	_memcpy
	lsl	x8, x19, #2
	ldr	w9, [x25, x8]
	add	w9, w9, w22
	str	w9, [x25, x8]
	add	w21, w22, w27
	add	x0, x25, w21, sxtw #2
	b	LBB0_11
LBB0_13:
	mov	x0, x23
	mov	x1, x22
	bl	_put2byte
	add	x0, x25, w21, sxtw #2
	b	LBB0_11
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_pageFindSlot
.subsections_via_symbols
