	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vdbeSorterIterVarint
_vdbeSorterIterVarint:                  ## @vdbeSorterIterVarint
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	(%rsi), %eax
	movl	4(%rsi), %ecx
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	LBB0_3
## %bb.1:
	subl	%edx, %ecx
	cmpl	$9, %ecx
	jl	LBB0_3
## %bb.2:
	movslq	%edx, %rdi
	shlq	$2, %rdi
	addq	8(%r13), %rdi
	movq	%r14, %rsi
	callq	_sqlite3GetVarint
	addl	%eax, (%r13)
	jmp	LBB0_7
LBB0_3:
	xorl	%ebx, %ebx
	leaq	-120(%rbp), %r12
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	$1, %edx
	movq	%r12, %rcx
	callq	_vdbeSorterIterRead
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-120(%rbp), %rax
	movl	(%rax), %ecx
	leal	1(%rbx), %edx
	andl	$15, %ebx
	movl	%ecx, -112(%rbp,%rbx,4)
	testb	$-128, (%rax)
	movl	%edx, %ebx
	jne	LBB0_4
## %bb.6:
	leaq	-112(%rbp), %rdi
	movq	%r14, %rsi
	callq	_sqlite3GetVarint
LBB0_7:
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_10
## %bb.9:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.no_dead_strip	_vdbeSorterIterVarint
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vdbeSorterIterVarint
_vdbeSorterIterVarint:                  ; @vdbeSorterIterVarint
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x20, x2
	mov	x19, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	ldp	w8, w9, [x1]
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	sub	w9, w9, w8
	cmp	w8, #0
	ccmp	w9, #9, #8, ne
	b.ge	LBB0_5
; %bb.1:
	mov	x21, x0
	mov	w22, #0
	add	x23, sp, #8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x3, sp
	mov	x0, x21
	mov	x1, x19
	mov	w2, #1
	bl	_vdbeSorterIterRead
	cbnz	w0, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [sp]
	ldr	w9, [x8]
	and	w10, w22, #0xf
	add	w22, w22, #1
	str	w9, [x23, w10, uxtw #2]
	ldrb	w8, [x8]
	tbnz	w8, #7, LBB0_2
; %bb.4:
	add	x0, sp, #8
	mov	x1, x20
	bl	_sqlite3GetVarint
	b	LBB0_6
LBB0_5:
	ldr	x9, [x19, #8]
	add	x0, x9, w8, sxtw #2
	mov	x1, x20
	bl	_sqlite3GetVarint
	ldr	w8, [x19]
	add	w8, w8, w0
	str	w8, [x19]
LBB0_6:
Lloh3:
	adrp	x8, _SQLITE_OK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SQLITE_OK@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
LBB0_7:
	ldur	x8, [x29, #-56]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.no_dead_strip	_vdbeSorterIterVarint
.subsections_via_symbols
