	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pcache1Fetch
_pcache1Fetch:                          ## @pcache1Fetch
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %r14d
	movq	%rdi, %r13
	cmpq	$0, (%rdi)
	setne	%al
	cmpl	$1, %edx
	setne	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	movb	$1, %al
	cmpq	$0, (%r13)
	jne	LBB0_2
## %bb.1:
	cmpl	$0, 8(%r13)
	sete	%al
LBB0_2:
	movzbl	%al, %edi
	callq	_assert
	movl	$1, %ebx
	cmpq	$0, (%r13)
	movl	$1, %edi
	je	LBB0_4
## %bb.3:
	xorl	%edi, %edi
	cmpl	$10, 8(%r13)
	sete	%dil
LBB0_4:
	callq	_assert
	cmpl	$0, 8(%r13)
	je	LBB0_6
## %bb.5:
	xorl	%ebx, %ebx
	cmpq	$0, (%r13)
	setne	%bl
LBB0_6:
	movl	%ebx, %edi
	callq	_assert
	movq	56(%r13), %r15
	movq	%r15, %rdi
	callq	_pcache1EnterMutex
	movl	12(%r13), %ecx
	testl	%ecx, %ecx
	je	LBB0_10
## %bb.7:
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
	movq	48(%r13), %rax
	movq	(%rax,%rdx,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_10
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%r14d, (%rbx)
	je	LBB0_20
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	40(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_8
LBB0_10:
	testl	%r12d, %r12d
	je	LBB0_16
## %bb.11:
	movl	16(%r13), %eax
	xorl	%edi, %edi
	cmpl	20(%r13), %eax
	setae	%dil
	callq	_assert
	movl	16(%r13), %ebx
	subl	20(%r13), %ebx
	movl	4(%r15), %eax
	subl	8(%r15), %eax
	addl	$10, %eax
	xorl	%edi, %edi
	cmpl	%eax, (%r15)
	sete	%dil
	callq	_assert
	movl	28(%r13), %eax
	leal	(%rax,%rax,8), %eax
	cltq
	imulq	$1717986919, %rax, %rax         ## imm = 0x66666667
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$34, %rax
	addl	%ecx, %eax
	xorl	%edi, %edi
	cmpl	%eax, 24(%r13)
	sete	%dil
	callq	_assert
	cmpl	$1, %r12d
	jne	LBB0_17
## %bb.12:
	cmpl	(%r15), %ebx
	jae	LBB0_37
## %bb.13:
	cmpl	24(%r13), %ebx
	jae	LBB0_37
## %bb.14:
	movq	%r13, %rdi
	callq	_pcache1UnderMemoryPressure
	testq	%rax, %rax
	jne	LBB0_37
LBB0_17:
	movl	16(%r13), %eax
	cmpl	12(%r13), %eax
	jb	LBB0_21
## %bb.18:
	movq	%r13, %rdi
	callq	_pcache1ResizeHash
	testq	%rax, %rax
	jne	LBB0_37
LBB0_21:
	cmpq	$0, (%r13)
	je	LBB0_32
## %bb.22:
	movq	24(%r15), %rbx
	testq	%rbx, %rbx
	je	LBB0_32
## %bb.23:
	movl	16(%r13), %eax
	incl	%eax
	cmpl	28(%r13), %eax
	jae	LBB0_27
## %bb.24:
	movl	4(%r15), %eax
	cmpq	%rax, 16(%r15)
	jge	LBB0_27
## %bb.25:
	movq	%r13, %rdi
	callq	_pcache1UnderMemoryPressure
	testq	%rax, %rax
	je	LBB0_32
## %bb.26:
	movq	24(%r15), %rbx
LBB0_27:
	movq	%rbx, %rdi
	callq	_pcache1RemoveFromHash
	movq	%rbx, %rdi
	callq	_pcache1PinPage
	movq	32(%rbx), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	32(%r13), %eax
	leal	-1(%rax), %ecx
	testl	%ecx, %eax
	sete	%cl
	cmpl	$512, %eax                      ## imm = 0x200
	setge	%al
	andb	%cl, %al
	movzbl	%al, %edi
	callq	_assert
	xorl	%edi, %edi
	cmpl	$512, 36(%r13)                  ## imm = 0x200
	setl	%dil
	callq	_assert
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	32(%rax), %eax
	leal	-1(%rax), %ecx
	testl	%ecx, %eax
	sete	%cl
	cmpl	$512, %eax                      ## imm = 0x200
	setge	%al
	andb	%cl, %al
	movzbl	%al, %edi
	callq	_assert
	xorl	%edi, %edi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpl	$512, 36(%rax)                  ## imm = 0x200
	setl	%dil
	callq	_assert
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	36(%rdx), %eax
	addl	32(%rdx), %eax
	movl	36(%r13), %ecx
	addl	32(%r13), %ecx
	cmpl	%ecx, %eax
	jne	LBB0_31
## %bb.28:
	movq	(%r13), %rax
	subq	(%rdx), %rax
	addq	%rax, 16(%r15)
	jmp	LBB0_34
LBB0_16:
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_pcache1PinPage
	jmp	LBB0_38
LBB0_20:
	movq	%rbx, %rdi
	callq	_pcache1PinPage
	cmpl	%r14d, 40(%r13)
	jb	LBB0_35
	jmp	LBB0_38
LBB0_31:
	movq	%rbx, %rdi
	callq	_pcache1FreePage
LBB0_32:
	cmpl	$1, %r12d
	jne	LBB0_36
## %bb.33:
	xorl	%eax, %eax
	callq	_sqlite3BeginBenignMalloc
	movq	%r13, %rdi
	callq	_pcache1AllocPage
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_sqlite3EndBenignMalloc
	testq	%rbx, %rbx
	je	LBB0_37
LBB0_34:
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	12(%r13)
                                        ## kill: def $edx killed $edx def $rdx
	incl	16(%r13)
	movl	%r14d, (%rbx)
	movq	48(%r13), %rax
	movq	(%rax,%rdx,8), %rax
	movq	%rax, 40(%rbx)
	movq	%r13, 32(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rbx)
	movq	8(%rbx), %rax
	movq	$0, (%rax)
	movq	48(%r13), %rax
	movq	%rbx, (%rax,%rdx,8)
	cmpl	%r14d, 40(%r13)
	jae	LBB0_38
LBB0_35:
	movl	%r14d, 40(%r13)
	jmp	LBB0_38
LBB0_36:
	movq	%r13, %rdi
	callq	_pcache1AllocPage
	movq	%rax, %rbx
	testq	%rbx, %rbx
	jne	LBB0_34
LBB0_37:
	xorl	%ebx, %ebx
LBB0_38:
	movq	%r15, %rdi
	callq	_pcache1LeaveMutex
	addq	$8, %rbx
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_pcache1Fetch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pcache1Fetch
_pcache1Fetch:                          ; @pcache1Fetch
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0]
	cmp	w2, #1
	ccmp	x8, #0, #0, eq
	cset	w0, ne
	bl	_assert
	ldr	x8, [x20]
	cbz	x8, LBB0_2
; %bb.1:
	mov	w0, #1
	b	LBB0_3
LBB0_2:
	ldr	w8, [x20, #8]
	cmp	w8, #0
	cset	w0, eq
LBB0_3:
	bl	_assert
	ldr	x8, [x20]
	cbz	x8, LBB0_5
; %bb.4:
	ldr	w8, [x20, #8]
	cmp	w8, #10
	cset	w0, eq
	b	LBB0_6
LBB0_5:
	mov	w0, #1
LBB0_6:
	bl	_assert
	ldr	w8, [x20, #8]
	cbz	w8, LBB0_8
; %bb.7:
	ldr	x8, [x20]
	cmp	x8, #0
	cset	w0, ne
	b	LBB0_9
LBB0_8:
	mov	w0, #1
LBB0_9:
	bl	_assert
	ldr	x21, [x20, #56]
	mov	x0, x21
	bl	_pcache1EnterMutex
	ldr	w8, [x20, #12]
	cbz	w8, LBB0_13
; %bb.10:
	udiv	w9, w19, w8
	msub	w8, w9, w8, w19
	ldr	x9, [x20, #48]
	ldr	x23, [x9, w8, uxtw #3]
	cbz	x23, LBB0_13
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x23]
	cmp	w8, w19
	b.eq	LBB0_22
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x23, [x23, #40]
	cbnz	x23, LBB0_11
LBB0_13:
	cbz	w22, LBB0_21
; %bb.14:
	ldp	w8, w9, [x20, #16]
	cmp	w8, w9
	cset	w0, hs
	bl	_assert
	ldp	w23, w24, [x20, #16]
	ldp	w8, w9, [x21]
	ldr	w10, [x21, #8]
	sub	w9, w9, w10
	add	w9, w9, #10
	cmp	w8, w9
	cset	w0, eq
	bl	_assert
	ldp	w8, w9, [x20, #24]
	add	w9, w9, w9, lsl #3
	mov	w10, #26215
	movk	w10, #26214, lsl #16
	smull	x9, w9, w10
	lsr	x10, x9, #63
	asr	x9, x9, #34
	add	w9, w9, w10
	cmp	w8, w9
	cset	w0, eq
	bl	_assert
	cmp	w22, #1
	b.ne	LBB0_18
; %bb.15:
	ldr	w9, [x21]
	sub	w8, w23, w24
	cmp	w8, w9
	b.hs	LBB0_20
; %bb.16:
	ldr	w9, [x20, #24]
	cmp	w8, w9
	b.hs	LBB0_20
; %bb.17:
	mov	x0, x20
	bl	_pcache1UnderMemoryPressure
	cbnz	x0, LBB0_20
LBB0_18:
	ldp	w9, w8, [x20, #12]
	cmp	w8, w9
	b.lo	LBB0_23
; %bb.19:
	mov	x0, x20
	bl	_pcache1ResizeHash
	cbz	x0, LBB0_23
LBB0_20:
	mov	x23, #0
	b	LBB0_38
LBB0_21:
	mov	x0, #0
	bl	_pcache1PinPage
	mov	x23, #0
	b	LBB0_38
LBB0_22:
	mov	x0, x23
	bl	_pcache1PinPage
	b	LBB0_36
LBB0_23:
	ldr	x8, [x20]
	cbz	x8, LBB0_32
; %bb.24:
	ldr	x23, [x21, #24]
	cbz	x23, LBB0_32
; %bb.25:
	ldr	w8, [x20, #16]
	add	w8, w8, #1
	ldr	w9, [x20, #28]
	cmp	w8, w9
	b.hs	LBB0_29
; %bb.26:
	ldr	x8, [x21, #16]
	ldr	w9, [x21, #4]
	cmp	x8, x9
	b.ge	LBB0_29
; %bb.27:
	mov	x0, x20
	bl	_pcache1UnderMemoryPressure
	cbz	x0, LBB0_32
; %bb.28:
	ldr	x23, [x21, #24]
LBB0_29:
	mov	x0, x23
	bl	_pcache1RemoveFromHash
	mov	x0, x23
	bl	_pcache1PinPage
	ldr	x24, [x23, #32]
	ldr	w8, [x20, #32]
	sub	w9, w8, #1
	tst	w8, w9
	mov	w25, #511
	ccmp	w8, w25, #4, eq
	cset	w0, gt
	bl	_assert
	ldr	w8, [x20, #36]
	cmp	w8, #512
	cset	w0, lt
	bl	_assert
	ldr	w8, [x24, #32]
	sub	w9, w8, #1
	tst	w8, w9
	ccmp	w8, w25, #4, eq
	cset	w0, gt
	bl	_assert
	ldr	w8, [x24, #36]
	cmp	w8, #512
	cset	w0, lt
	bl	_assert
	ldp	w8, w9, [x24, #32]
	add	w8, w9, w8
	ldp	w9, w10, [x20, #32]
	add	w9, w10, w9
	cmp	w8, w9
	b.ne	LBB0_31
; %bb.30:
	ldr	x8, [x24]
	ldr	x9, [x20]
	ldr	x10, [x21, #16]
	sub	x8, x9, x8
	add	x8, x8, x10
	str	x8, [x21, #16]
	b	LBB0_35
LBB0_31:
	mov	x0, x23
	bl	_pcache1FreePage
LBB0_32:
	cmp	w22, #1
	b.ne	LBB0_34
; %bb.33:
	bl	_sqlite3BeginBenignMalloc
	mov	x0, x20
	bl	_pcache1AllocPage
	mov	x23, x0
	bl	_sqlite3EndBenignMalloc
	cbnz	x23, LBB0_35
	b	LBB0_38
LBB0_34:
	mov	x0, x20
	bl	_pcache1AllocPage
	mov	x23, x0
	cbz	x0, LBB0_38
LBB0_35:
	ldp	w8, w9, [x20, #12]
	udiv	w10, w19, w8
	msub	w8, w10, w8, w19
	add	w9, w9, #1
	str	w9, [x20, #16]
	str	w19, [x23]
	ldr	x9, [x20, #48]
	lsl	x8, x8, #3
	ldr	x9, [x9, x8]
	stp	x20, x9, [x23, #32]
	stp	xzr, xzr, [x23, #16]
	ldr	x9, [x23, #8]
	str	xzr, [x9]
	ldr	x9, [x20, #48]
	str	x23, [x9, x8]
LBB0_36:
	ldr	w8, [x20, #40]
	cmp	w8, w19
	b.hs	LBB0_38
; %bb.37:
	str	w19, [x20, #40]
LBB0_38:
	mov	x0, x21
	bl	_pcache1LeaveMutex
	add	x0, x23, #8
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_pcache1Fetch
.subsections_via_symbols
