	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function btreeCursor
_btreeCursor:                           ## @btreeCursor
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r15
	movq	%rcx, %rbx
	movl	%edx, %r13d
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	8(%rdi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	callq	_sqlite3BtreeHoldsMutex
	movl	%eax, %edi
	callq	_assert
	xorl	%edi, %edi
	cmpl	$2, %r13d
	setb	%dil
	callq	_assert
	xorl	%edx, %edx
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	testq	%rbx, %rbx
	movl	%r14d, %ebx
	setne	%dl
	leal	1(%r13), %ecx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_hasSharedCacheTableLock
	movl	%eax, %edi
	callq	_assert
	movl	$1, %r14d
	movl	$1, %edi
	testl	%r13d, %r13d
	je	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_hasReadConflicts
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
LBB0_2:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	callq	_assert
	movq	(%r12), %rax
	movq	_TRANS_NONE@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setg	%dil
	callq	_assert
	testl	%r13d, %r13d
	je	LBB0_4
## %bb.3:
	movq	(%r12), %rax
	movq	_TRANS_WRITE@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	cmpq	(%rcx), %rax
	sete	%r14b
LBB0_4:
	movl	%r14d, %edi
	callq	_assert
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	16(%r14), %rax
	xorl	%ebx, %ebx
	movl	$0, %edi
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	xorl	%edi, %edi
	cmpq	$0, (%rax)
	setne	%dil
LBB0_6:
	callq	_assert
	testl	%r13d, %r13d
	je	LBB0_8
## %bb.7:
	movq	_BTS_READ_ONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ebx, %ebx
	testl	%eax, (%r14)
	setne	%bl
LBB0_8:
	movl	%ebx, %edi
	callq	_NEVER
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	_SQLITE_READONLY@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_10:
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	cmpl	$1, %ecx
	jne	LBB0_13
## %bb.11:
	movq	%r14, %rdi
	callq	_btreePagecount
	movl	$1, %ecx
	testq	%rax, %rax
	jne	LBB0_13
## %bb.12:
	xorl	%edi, %edi
	testl	%r13d, %r13d
	sete	%dil
	callq	_assert
	xorl	%ecx, %ecx
LBB0_13:
	movslq	%ecx, %rax
	movq	%rax, 72(%r15)
	movl	$-1, (%r15)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 64(%r15)
	movq	%r12, 56(%r15)
	movq	%r14, 48(%r15)
	movslq	%r13d, %rax
	movq	%rax, 40(%r15)
	movq	8(%r14), %rax
	movq	%rax, 32(%r15)
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movq	%r15, 24(%rax)
LBB0_15:
	movq	%r15, 8(%r14)
	movq	_CURSOR_INVALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
	movq	$0, 8(%r15)
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
LBB0_16:
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TRANS_NONE,8,3                 ## @TRANS_NONE
	.comm	_TRANS_WRITE,8,3                ## @TRANS_WRITE
	.comm	_BTS_READ_ONLY,4,2              ## @BTS_READ_ONLY
	.comm	_SQLITE_READONLY,4,2            ## @SQLITE_READONLY
	.comm	_CURSOR_INVALID,4,2             ## @CURSOR_INVALID
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.no_dead_strip	_btreeCursor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function btreeCursor
_btreeCursor:                           ; @btreeCursor
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x4
	mov	x22, x3
	mov	x21, x2
	mov	x24, x1
	mov	x23, x0
	ldr	x20, [x0, #8]
	bl	_sqlite3BtreeHoldsMutex
	bl	_assert
	cmp	w21, #2
	cset	w0, lo
	bl	_assert
	cmp	x22, #0
	cset	w2, ne
	add	w3, w21, #1
	mov	x0, x23
	mov	x1, x24
	bl	_hasSharedCacheTableLock
	bl	_assert
	cbz	w21, LBB0_2
; %bb.1:
	mov	x0, x23
	mov	x1, x24
	bl	_hasReadConflicts
	cmp	w0, #0
	cset	w0, eq
	b	LBB0_3
LBB0_2:
	mov	w0, #1
LBB0_3:
	bl	_assert
	ldr	x8, [x23]
Lloh0:
	adrp	x9, _TRANS_NONE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TRANS_NONE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, gt
	bl	_assert
	cbz	w21, LBB0_5
; %bb.4:
	ldr	x8, [x23]
Lloh3:
	adrp	x9, _TRANS_WRITE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TRANS_WRITE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	b	LBB0_6
LBB0_5:
	mov	w0, #1
LBB0_6:
	bl	_assert
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_10
; %bb.7:
	ldr	x8, [x8]
	cmp	x8, #0
	cset	w0, ne
	bl	_assert
	cbz	w21, LBB0_11
LBB0_8:
	ldr	w8, [x20]
Lloh6:
	adrp	x9, _BTS_READ_ONLY@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BTS_READ_ONLY@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w0, ne
	bl	_NEVER
	cbz	x0, LBB0_12
LBB0_9:
Lloh9:
	adrp	x8, _SQLITE_READONLY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SQLITE_READONLY@GOTPAGEOFF]
	b	LBB0_19
LBB0_10:
	mov	w0, #0
	bl	_assert
	cbnz	w21, LBB0_8
LBB0_11:
	mov	w0, #0
	bl	_NEVER
	cbnz	x0, LBB0_9
LBB0_12:
	cmp	w24, #1
	b.ne	LBB0_16
; %bb.13:
	mov	x0, x20
	bl	_btreePagecount
	cbz	x0, LBB0_15
; %bb.14:
	mov	w24, #1
	b	LBB0_16
LBB0_15:
	cmp	w21, #0
	cset	w0, eq
	bl	_assert
	mov	w24, #0
LBB0_16:
	sxtw	x8, w24
	mov	w9, #-1
	str	w9, [x19]
	stp	x22, x8, [x19, #64]
	stp	x20, x23, [x19, #48]
	sxtw	x9, w21
	ldr	x8, [x20, #8]
	stp	x8, x9, [x19, #32]
	cbz	x8, LBB0_18
; %bb.17:
	str	x19, [x8, #24]
LBB0_18:
Lloh11:
	adrp	x8, _CURSOR_INVALID@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CURSOR_INVALID@GOTPAGEOFF]
	str	x19, [x20, #8]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	str	xzr, [x19, #8]
Lloh14:
	adrp	x8, _SQLITE_OK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SQLITE_OK@GOTPAGEOFF]
LBB0_19:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_TRANS_NONE,8,3                 ; @TRANS_NONE
	.comm	_TRANS_WRITE,8,3                ; @TRANS_WRITE
	.comm	_BTS_READ_ONLY,4,2              ; @BTS_READ_ONLY
	.comm	_SQLITE_READONLY,4,2            ; @SQLITE_READONLY
	.comm	_CURSOR_INVALID,4,2             ; @CURSOR_INVALID
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.no_dead_strip	_btreeCursor
.subsections_via_symbols
