	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function btreeRestoreCursorPosition
_btreeRestoreCursorPosition:            ## @btreeRestoreCursorPosition
	.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
	movq	%rdi, %rbx
	callq	_cursorHoldsMutex
	movl	%eax, %edi
	callq	_assert
	movq	(%rbx), %rax
	movq	_CURSOR_REQUIRESEEK@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setge	%dil
	callq	_assert
	movq	(%rbx), %rax
	movq	_CURSOR_FAULT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movl	8(%rbx), %r14d
	jmp	LBB0_4
LBB0_2:
	movq	_CURSOR_INVALID@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	%rax, (%rbx)
	movq	16(%rbx), %rsi
	movl	24(%rbx), %edx
	leaq	8(%rbx), %r8
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_btreeMoveto
	movl	%eax, %r14d
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jne	LBB0_4
## %bb.3:
	movq	16(%rbx), %rdi
	callq	_sqlite3_free
	movq	$0, 16(%rbx)
	movq	(%rbx), %rax
	movq	_CURSOR_VALID@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%cl
	cmpq	(%r15), %rax
	sete	%al
	orb	%cl, %al
	movzbl	%al, %edi
	callq	_assert
LBB0_4:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CURSOR_REQUIRESEEK,8,3         ## @CURSOR_REQUIRESEEK
	.comm	_CURSOR_FAULT,8,3               ## @CURSOR_FAULT
	.comm	_CURSOR_INVALID,8,3             ## @CURSOR_INVALID
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.comm	_CURSOR_VALID,8,3               ## @CURSOR_VALID
	.no_dead_strip	_btreeRestoreCursorPosition
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function btreeRestoreCursorPosition
_btreeRestoreCursorPosition:            ; @btreeRestoreCursorPosition
	.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	x19, x0
	bl	_cursorHoldsMutex
	bl	_assert
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _CURSOR_REQUIRESEEK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CURSOR_REQUIRESEEK@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, ge
	bl	_assert
	ldr	x8, [x19]
Lloh3:
	adrp	x9, _CURSOR_FAULT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CURSOR_FAULT@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	w20, [x19, #8]
	b	LBB0_4
LBB0_2:
Lloh6:
	adrp	x21, _CURSOR_INVALID@GOTPAGE
Lloh7:
	ldr	x21, [x21, _CURSOR_INVALID@GOTPAGEOFF]
	ldr	x8, [x21]
	str	x8, [x19]
	ldr	x1, [x19, #16]
	ldr	w2, [x19, #24]
	add	x4, x19, #8
	mov	x0, x19
	mov	w3, #0
	bl	_btreeMoveto
	mov	x20, x0
Lloh8:
	adrp	x8, _SQLITE_OK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SQLITE_OK@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_4
; %bb.3:
	ldr	x0, [x19, #16]
	bl	_sqlite3_free
	str	xzr, [x19, #16]
Lloh11:
	adrp	x8, _CURSOR_VALID@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CURSOR_VALID@GOTPAGEOFF]
	ldr	x9, [x19]
Lloh13:
	ldr	x8, [x8]
	cmp	x9, x8
	ldr	x8, [x21]
	ccmp	x9, x8, #4, ne
	cset	w0, eq
	bl	_assert
LBB0_4:
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_CURSOR_REQUIRESEEK,8,3         ; @CURSOR_REQUIRESEEK
	.comm	_CURSOR_FAULT,8,3               ; @CURSOR_FAULT
	.comm	_CURSOR_INVALID,8,3             ; @CURSOR_INVALID
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.comm	_CURSOR_VALID,8,3               ; @CURSOR_VALID
	.no_dead_strip	_btreeRestoreCursorPosition
.subsections_via_symbols
