	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function moveToRightmost
_moveToRightmost:                       ## @moveToRightmost
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_cursorOwnsBtShared
	movl	%eax, %edi
	callq	_assert
	movq	(%r14), %rax
	movq	_CURSOR_VALID@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_assert
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%r14), %rbx
	cmpl	$0, 24(%rbx)
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	16(%rbx), %rax
	movslq	(%rbx), %rcx
	leaq	(%rax,%rcx,4), %rdi
	addq	$32, %rdi
	callq	_get4byte
	movq	8(%rbx), %rcx
	movq	%rcx, 24(%r14)
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_moveToChild
	testl	%eax, %eax
	je	LBB0_1
	jmp	LBB0_4
LBB0_3:
	movq	8(%rbx), %rax
	decq	%rax
	movq	%rax, 24(%r14)
	xorl	%edi, %edi
	cmpq	$0, 16(%r14)
	sete	%dil
	callq	_assert
	movq	_BTCF_ValidNKey@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edi, %edi
	andl	8(%r14), %eax
	sete	%dil
	callq	_assert
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.comm	_CURSOR_VALID,8,3               ## @CURSOR_VALID
	.comm	_BTCF_ValidNKey,4,2             ## @BTCF_ValidNKey
	.no_dead_strip	_moveToRightmost
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function moveToRightmost
_moveToRightmost:                       ; @moveToRightmost
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_cursorOwnsBtShared
	bl	_assert
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _CURSOR_VALID@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CURSOR_VALID@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_assert
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x20, [x19, #32]
	ldr	w8, [x20, #24]
	cbnz	w8, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x20, #16]
	ldrsw	x9, [x20]
	add	x8, x8, x9, lsl #2
	add	x0, x8, #32
	bl	_get4byte
	mov	x1, x0
	ldr	x8, [x20, #8]
	str	x8, [x19, #24]
	mov	x0, x19
	bl	_moveToChild
	cbz	w0, LBB0_1
	b	LBB0_4
LBB0_3:
	ldr	x8, [x20, #8]
	sub	x8, x8, #1
	str	x8, [x19, #24]
	ldr	x8, [x19, #16]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	ldr	w8, [x19, #8]
Lloh3:
	adrp	x9, _BTCF_ValidNKey@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BTCF_ValidNKey@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w0, eq
	bl	_assert
Lloh6:
	adrp	x8, _SQLITE_OK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SQLITE_OK@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.comm	_CURSOR_VALID,8,3               ; @CURSOR_VALID
	.comm	_BTCF_ValidNKey,4,2             ; @BTCF_ValidNKey
	.no_dead_strip	_moveToRightmost
.subsections_via_symbols
