	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pcache1AllocPage
_pcache1AllocPage:                      ## @pcache1AllocPage
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	32(%rdi), %rax
	movl	(%rax), %edi
	callq	_sqlite3_mutex_held
	movl	%eax, %edi
	callq	_assert
	movq	48(%r14), %rbx
	testq	%rbx, %rbx
	je	LBB0_1
LBB0_4:
	movq	32(%rbx), %rax
	movq	%rax, 48(%r14)
	movq	$0, 32(%rbx)
	jmp	LBB0_11
LBB0_1:
	cmpq	$0, (%r14)
	je	LBB0_2
LBB0_5:
	testl	%r15d, %r15d
	je	LBB0_6
## %bb.7:
	xorl	%eax, %eax
	callq	_sqlite3BeginBenignMalloc
	movq	16(%r14), %rdi
	callq	_pcache1Alloc
	movq	%rax, %r15
	movq	8(%r14), %rax
	leaq	(%r15,%rax,4), %rbx
	xorl	%eax, %eax
	callq	_sqlite3EndBenignMalloc
	testq	%r15, %r15
	je	LBB0_9
LBB0_10:
	movq	%r15, 24(%rbx)
	leaq	40(%rbx), %rax
	movq	%rax, 16(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rbx)
LBB0_11:
	movq	24(%r14), %rax
	incl	(%rax)
LBB0_12:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%r14, %rdi
	callq	_pcache1InitBulk
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	48(%r14), %rbx
	jmp	LBB0_4
LBB0_6:
	movq	16(%r14), %rdi
	callq	_pcache1Alloc
	movq	%rax, %r15
	movq	8(%r14), %rax
	leaq	(%r15,%rax,4), %rbx
	testq	%r15, %r15
	jne	LBB0_10
LBB0_9:
	xorl	%ebx, %ebx
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_pcache1,16,3                   ## @pcache1
	.no_dead_strip	_pcache1AllocPage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pcache1AllocPage
_pcache1AllocPage:                      ; @pcache1AllocPage
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x1
	mov	x19, x0
	ldr	x8, [x0, #32]
	ldr	w0, [x8]
	bl	_sqlite3_mutex_held
	bl	_assert
	ldr	x20, [x19, #48]
	cbz	x20, LBB0_2
LBB0_1:
	ldr	x8, [x20, #32]
	str	x8, [x19, #48]
	str	xzr, [x20, #32]
	b	LBB0_6
LBB0_2:
	ldr	x8, [x19]
	cbz	x8, LBB0_8
LBB0_3:
	cbz	w21, LBB0_10
; %bb.4:
	bl	_sqlite3BeginBenignMalloc
	ldr	x0, [x19, #16]
	bl	_pcache1Alloc
	mov	x21, x0
	ldr	x8, [x19, #8]
	add	x20, x0, x8, lsl #2
	bl	_sqlite3EndBenignMalloc
	cbz	x21, LBB0_11
LBB0_5:
	add	x8, x20, #40
	stp	x8, x21, [x20, #16]
	stp	xzr, xzr, [x20]
LBB0_6:
	ldr	x8, [x19, #24]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_8:
	mov	x0, x19
	bl	_pcache1InitBulk
	cbz	x0, LBB0_3
; %bb.9:
	ldr	x20, [x19, #48]
	b	LBB0_1
LBB0_10:
	ldr	x0, [x19, #16]
	bl	_pcache1Alloc
	mov	x21, x0
	ldr	x8, [x19, #8]
	add	x20, x0, x8, lsl #2
	cbnz	x21, LBB0_5
LBB0_11:
	mov	x20, #0
	b	LBB0_7
	.cfi_endproc
                                        ; -- End function
	.comm	_pcache1,16,3                   ; @pcache1
	.no_dead_strip	_pcache1AllocPage
.subsections_via_symbols
