	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vdbePmaReadVarint
_vdbePmaReadVarint:                     ## @vdbePmaReadVarint
	.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	%r12
	pushq	%rbx
	subq	$96, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	(%rdi), %rcx
	movq	8(%rdi), %rax
	testq	%rcx, %rcx
	je	LBB0_3
## %bb.1:
	leaq	(%rcx,%rax,4), %rdi
	jmp	LBB0_2
LBB0_3:
	movslq	16(%r12), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_4
## %bb.5:
	xorl	%edx, %edx
	divq	%rcx
	testl	%edx, %edx
	jne	LBB0_7
	jmp	LBB0_9
LBB0_4:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
	testl	%edx, %edx
	je	LBB0_9
LBB0_7:
	subl	%edx, %ecx
	cmpl	$9, %ecx
	jl	LBB0_9
## %bb.8:
	movslq	%edx, %rdi
	shlq	$2, %rdi
	addq	24(%r12), %rdi
LBB0_2:
	movq	%r14, %rsi
	callq	_sqlite3GetVarint
	addq	%rax, 8(%r12)
LBB0_13:
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_16
## %bb.15:
	addq	$96, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	xorl	%ebx, %ebx
	leaq	-120(%rbp), %r15
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%r15, %rdx
	callq	_vdbePmaReadBlob
	testl	%eax, %eax
	jne	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_10 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_10
## %bb.12:
	leaq	-112(%rbp), %rdi
	movq	%r14, %rsi
	callq	_sqlite3GetVarint
	jmp	LBB0_13
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.no_dead_strip	_vdbePmaReadVarint
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vdbePmaReadVarint
_vdbePmaReadVarint:                     ; @vdbePmaReadVarint
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	ldp	x9, x8, [x0]
	cbz	x9, LBB0_2
; %bb.1:
	add	x0, x9, x8, lsl #2
	b	LBB0_8
LBB0_2:
	ldrsw	x9, [x19, #16]
	udiv	x10, x8, x9
	msub	x8, x10, x9, x8
	sub	w9, w9, w8
	cmp	w8, #0
	ccmp	w9, #9, #8, ne
	b.ge	LBB0_7
; %bb.3:
	mov	w21, #0
	add	x22, sp, #8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x2, sp
	mov	x0, x19
	mov	w1, #1
	bl	_vdbePmaReadBlob
	cbnz	w0, LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [sp]
	ldr	w9, [x8]
	and	w10, w21, #0xf
	add	w21, w21, #1
	str	w9, [x22, w10, uxtw #2]
	ldrb	w8, [x8]
	tbnz	w8, #7, LBB0_4
; %bb.6:
	add	x0, sp, #8
	mov	x1, x20
	bl	_sqlite3GetVarint
	b	LBB0_9
LBB0_7:
	ldr	x9, [x19, #24]
	lsl	x8, x8, #32
	add	x0, x9, x8, asr #30
LBB0_8:
	mov	x1, x20
	bl	_sqlite3GetVarint
	ldr	x8, [x19, #8]
	add	x8, x8, x0
	str	x8, [x19, #8]
LBB0_9:
Lloh3:
	adrp	x8, _SQLITE_OK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SQLITE_OK@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
LBB0_10:
	ldur	x8, [x29, #-40]
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_12
; %bb.11:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_12:
	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	_vdbePmaReadVarint
.subsections_via_symbols
