	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vdbeMergeEngineLevel0
_vdbeMergeEngineLevel0:                 ## @vdbeMergeEngineLevel0
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r13
	movq	%rdx, %r12
	movl	%esi, %r15d
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	movl	(%rdx), %ebx
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%esi, %edi
	callq	_vdbeMergeEngineNew
	movq	%rax, (%r13)
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	_SQLITE_NOMEM_BKPT@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_2:
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpl	%ecx, %r14d
	sete	%al
	testl	%r15d, %r15d
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	jle	LBB0_7
## %bb.3:
	cmpl	%ecx, %r14d
	jne	LBB0_7
## %bb.4:
	movl	%r15d, %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	$1, %r12d
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	$0, -44(%rbp)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %r13
	leaq	(%r15,%r13), %rcx
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movq	%rdi, %rsi
	movl	%ebx, %edx
	leaq	-44(%rbp), %r8
	callq	_vdbePmaReaderInit
	movl	%eax, %r14d
	movl	(%r13,%r15), %ebx
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpl	%ecx, %r14d
	sete	%al
	cmpq	-80(%rbp), %r12                 ## 8-byte Folded Reload
	jae	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	addq	$4, %r15
	incq	%r12
	cmpl	%ecx, %r14d
	je	LBB0_5
LBB0_7:
	testb	%al, %al
	jne	LBB0_9
## %bb.8:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_vdbeMergeEngineFree
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	$0, (%rax)
LBB0_9:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	%ebx, (%rax)
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.comm	_SQLITE_NOMEM_BKPT,4,2          ## @SQLITE_NOMEM_BKPT
	.no_dead_strip	_vdbeMergeEngineLevel0
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vdbeMergeEngineLevel0
_vdbeMergeEngineLevel0:                 ; @vdbeMergeEngineLevel0
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x27, x3
	mov	x19, x2
	mov	x25, x1
	mov	x23, x0
	ldr	w21, [x2]
Lloh0:
	adrp	x26, _SQLITE_OK@GOTPAGE
Lloh1:
	ldr	x26, [x26, _SQLITE_OK@GOTPAGEOFF]
	ldr	w20, [x26]
	mov	x0, x1
	bl	_vdbeMergeEngineNew
	mov	x22, x0
	str	x0, [x27]
Lloh2:
	adrp	x8, _SQLITE_NOMEM_BKPT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SQLITE_NOMEM_BKPT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w24, w8, w20, eq
	ldr	w9, [x26]
	cmp	w24, w9
	cset	w8, eq
	cmp	w25, #1
	str	x27, [sp]                       ; 8-byte Folded Spill
	b.lt	LBB0_5
; %bb.1:
	cmp	w24, w9
	b.ne	LBB0_5
; %bb.2:
	mov	x27, #0
	mov	w28, w25
	mov	w20, #1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	str	wzr, [sp, #12]
	ldr	x8, [x22]
	add	x25, x8, x27
	add	x4, sp, #12
	mov	x0, x23
	mov	x1, x23
	mov	x2, x21
	mov	x3, x25
	bl	_vdbePmaReaderInit
	mov	x24, x0
	ldr	w21, [x25]
	ldr	w9, [x26]
	cmp	w0, w9
	cset	w8, eq
	cmp	x20, x28
	b.hs	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x27, x27, #4
	add	x20, x20, #1
	cmp	w24, w9
	b.eq	LBB0_3
LBB0_5:
	tbnz	w8, #0, LBB0_7
; %bb.6:
	mov	x0, x22
	bl	_vdbeMergeEngineFree
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	str	xzr, [x8]
LBB0_7:
	str	w21, [x19]
	mov	x0, x24
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.comm	_SQLITE_NOMEM_BKPT,4,2          ; @SQLITE_NOMEM_BKPT
	.no_dead_strip	_vdbeMergeEngineLevel0
.subsections_via_symbols
