	.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, %r14
	movq	%rcx, %r12
	movl	%edx, %ebx
	movl	%esi, %r13d
	movq	%rdi, %r15
	movq	8(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	callq	_sqlite3BtreeHoldsMutex
	movl	%eax, %edi
	callq	_assert
	testl	%ebx, %ebx
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movl	%r13d, -60(%rbp)                ## 4-byte Spill
	je	LBB0_2
## %bb.1:
	movq	_BTREE_WRCSR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%ebx, %eax
	sete	%cl
	movq	_BTREE_FORDELETE@GOTPCREL(%rip), %rdx
	orl	(%rdx), %eax
	cmpl	%ebx, %eax
	sete	%al
	orb	%cl, %al
	movzbl	%al, %edi
	callq	_assert
	xorl	%edx, %edx
	testq	%r12, %r12
	setne	%dl
	movq	%r15, %rdi
	movl	%r13d, %esi
	movl	$2, %ecx
	callq	_hasSharedCacheTableLock
	movl	%eax, %edi
	callq	_assert
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_hasReadConflicts
	xorl	%r12d, %r12d
	testl	%eax, %eax
	sete	%r12b
	jmp	LBB0_3
LBB0_2:
	movl	$1, %r12d
	movl	$1, %edi
	callq	_assert
	xorl	%edx, %edx
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	setne	%dl
	movq	%r15, %rdi
	movl	%r13d, %esi
	movl	$1, %ecx
	callq	_hasSharedCacheTableLock
	movl	%eax, %edi
	callq	_assert
LBB0_3:
	movl	%ebx, %r13d
	movl	%r12d, %edi
	callq	_assert
	movq	(%r15), %rax
	movq	_TRANS_NONE@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setg	%dil
	callq	_assert
	testl	%ebx, %ebx
	je	LBB0_4
## %bb.5:
	movq	(%r15), %rax
	movq	_TRANS_WRITE@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	jmp	LBB0_6
LBB0_4:
	movl	$1, %edi
LBB0_6:
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	callq	_assert
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	24(%rax), %rax
	xorl	%edi, %edi
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	cmpq	$0, (%rax)
	setne	%dil
LBB0_8:
	callq	_assert
	testl	%r13d, %r13d
	je	LBB0_9
## %bb.19:
	movq	_BTS_READ_ONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edi, %edi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	andl	(%rbx), %eax
	sete	%dil
	callq	_assert
	movq	%rbx, %rdi
	callq	_allocateTempSpace
	cmpq	$0, 8(%rbx)
	jne	LBB0_10
## %bb.20:
	movq	_SQLITE_NOMEM_BKPT@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_9:
	movl	$1, %edi
	callq	_assert
LBB0_10:
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	cmpl	$1, %edx
	jne	LBB0_13
## %bb.11:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_btreePagecount
	movl	$1, %edx
	testq	%rax, %rax
	jne	LBB0_13
## %bb.12:
	xorl	%edi, %edi
	testl	%r13d, %r13d
	sete	%dil
	callq	_assert
	xorl	%edx, %edx
LBB0_13:
	xorl	%ecx, %ecx
	testl	%r13d, %r13d
	movslq	%edx, %rax
	movq	%rax, (%r14)
	movl	$-1, 8(%r14)
	movq	%r12, 48(%r14)
	movq	%r15, 40(%r14)
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%rsi, 32(%r14)
	movq	_BTCF_WriteFlag@GOTPCREL(%rip), %rdx
	cmovnel	(%rdx), %r13d
	movl	%r13d, 24(%r14)
	movq	_PAGER_GET_READONLY@GOTPCREL(%rip), %rdx
	cmovel	(%rdx), %ecx
	movl	%ecx, 28(%r14)
	movq	16(%rsi), %rcx
	testq	%rcx, %rcx
	je	LBB0_18
## %bb.14:
	movq	_BTCF_Multiple@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movq	%rcx, %rsi
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_15 Depth=1
	movq	16(%rsi), %rsi
	testq	%rsi, %rsi
	je	LBB0_18
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%rax, (%rsi)
	jne	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	orl	%edx, 24(%rsi)
	orl	%edx, 24(%r14)
	jmp	LBB0_17
LBB0_18:
	movq	%rcx, 16(%r14)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r14, 16(%rax)
	movq	_CURSOR_INVALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r14)
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
LBB0_21:
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BTREE_WRCSR,4,2                ## @BTREE_WRCSR
	.comm	_BTREE_FORDELETE,4,2            ## @BTREE_FORDELETE
	.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_NOMEM_BKPT,4,2          ## @SQLITE_NOMEM_BKPT
	.comm	_BTCF_WriteFlag,4,2             ## @BTCF_WriteFlag
	.comm	_PAGER_GET_READONLY,4,2         ## @PAGER_GET_READONLY
	.comm	_BTCF_Multiple,4,2              ## @BTCF_Multiple
	.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	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	x19, x4
	mov	x22, x3
	mov	x21, x2
	mov	x24, x1
	mov	x23, x0
	ldr	x20, [x0, #8]
	bl	_sqlite3BtreeHoldsMutex
	bl	_assert
	cbz	w21, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _BTREE_WRCSR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BTREE_WRCSR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w21
Lloh3:
	adrp	x9, _BTREE_FORDELETE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BTREE_FORDELETE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ccmp	w8, w21, #4, ne
	cset	w0, eq
	bl	_assert
	cmp	x22, #0
	cset	w2, ne
	mov	x0, x23
	mov	x1, x24
	mov	w3, #2
	bl	_hasSharedCacheTableLock
	bl	_assert
	mov	x0, x23
	mov	x1, x24
	bl	_hasReadConflicts
	cmp	w0, #0
	cset	w25, eq
	b	LBB0_3
LBB0_2:
	mov	w25, #1
	mov	w0, #1
	bl	_assert
	cmp	x22, #0
	cset	w2, ne
	mov	x0, x23
	mov	x1, x24
	mov	w3, #1
	bl	_hasSharedCacheTableLock
	bl	_assert
LBB0_3:
	mov	x0, x25
	bl	_assert
	ldr	x8, [x23]
Lloh6:
	adrp	x9, _TRANS_NONE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TRANS_NONE@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, gt
	bl	_assert
	cbz	w21, LBB0_5
; %bb.4:
	ldr	x8, [x23]
Lloh9:
	adrp	x9, _TRANS_WRITE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _TRANS_WRITE@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	b	LBB0_6
LBB0_5:
	mov	w0, #1
LBB0_6:
	bl	_assert
	ldr	x8, [x20, #24]
	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]
Lloh12:
	adrp	x9, _BTS_READ_ONLY@GOTPAGE
Lloh13:
	ldr	x9, [x9, _BTS_READ_ONLY@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w0, eq
	bl	_assert
	mov	x0, x20
	bl	_allocateTempSpace
	ldr	x8, [x20, #8]
	cbnz	x8, LBB0_12
; %bb.9:
Lloh15:
	adrp	x8, _SQLITE_NOMEM_BKPT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SQLITE_NOMEM_BKPT@GOTPAGEOFF]
	b	LBB0_22
LBB0_10:
	mov	w0, #0
	bl	_assert
	cbnz	w21, LBB0_8
LBB0_11:
	mov	w0, #1
	bl	_assert
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
	str	x8, [x19]
	mov	w9, #-1
	str	w9, [x19, #8]
	stp	x23, x22, [x19, #40]
	str	x20, [x19, #32]
Lloh17:
	adrp	x9, _BTCF_WriteFlag@GOTPAGE
Lloh18:
	ldr	x9, [x9, _BTCF_WriteFlag@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
Lloh20:
	adrp	x10, _PAGER_GET_READONLY@GOTPAGE
Lloh21:
	ldr	x10, [x10, _PAGER_GET_READONLY@GOTPAGEOFF]
	cmp	w21, #0
	csel	w9, wzr, w9, eq
Lloh22:
	ldr	w10, [x10]
	csel	w10, w10, wzr, eq
	stp	w9, w10, [x19, #24]
	ldr	x9, [x20, #16]
	cbz	x9, LBB0_21
; %bb.17:
Lloh23:
	adrp	x10, _BTCF_Multiple@GOTPAGE
Lloh24:
	ldr	x10, [x10, _BTCF_Multiple@GOTPAGEOFF]
Lloh25:
	ldr	w10, [x10]
	mov	x11, x9
	b	LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=1
	ldr	x11, [x11, #16]
	cbz	x11, LBB0_21
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x11]
	cmp	x12, x8
	b.ne	LBB0_18
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	ldr	w12, [x11, #24]
	orr	w12, w12, w10
	str	w12, [x11, #24]
	ldr	w12, [x19, #24]
	orr	w12, w12, w10
	str	w12, [x19, #24]
	b	LBB0_18
LBB0_21:
	str	x9, [x19, #16]
	str	x19, [x20, #16]
Lloh26:
	adrp	x8, _CURSOR_INVALID@GOTPAGE
Lloh27:
	ldr	x8, [x8, _CURSOR_INVALID@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	str	w8, [x19, #12]
Lloh29:
	adrp	x8, _SQLITE_OK@GOTPAGE
Lloh30:
	ldr	x8, [x8, _SQLITE_OK@GOTPAGEOFF]
LBB0_22:
	ldr	w0, [x8]
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_BTREE_WRCSR,4,2                ; @BTREE_WRCSR
	.comm	_BTREE_FORDELETE,4,2            ; @BTREE_FORDELETE
	.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_NOMEM_BKPT,4,2          ; @SQLITE_NOMEM_BKPT
	.comm	_BTCF_WriteFlag,4,2             ; @BTCF_WriteFlag
	.comm	_PAGER_GET_READONLY,4,2         ; @PAGER_GET_READONLY
	.comm	_BTCF_Multiple,4,2              ; @BTCF_Multiple
	.comm	_CURSOR_INVALID,4,2             ; @CURSOR_INVALID
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.no_dead_strip	_btreeCursor
.subsections_via_symbols
