	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vdbeSorterSetupMerge
_vdbeSorterSetupMerge:                  ## @vdbeSorterSetupMerge
	.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	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	24(%rdi), %r15
	movq	$0, -40(%rbp)
	leaq	-40(%rbp), %rsi
	callq	_vdbeSorterMergeTreeBuild
	movl	%eax, %ebx
	movq	_SQLITE_OK@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	cmpl	%eax, %ebx
	jne	LBB0_2
## %bb.1:
	movq	-40(%rbp), %rsi
	movq	_INCRINIT_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_vdbeMergeEngineInit
	movl	%eax, %ebx
	movq	-40(%rbp), %rax
	movq	%rax, 16(%r14)
	movq	$0, -40(%rbp)
	movl	(%r12), %eax
LBB0_2:
	cmpl	%eax, %ebx
	je	LBB0_4
## %bb.3:
	movq	-40(%rbp), %rdi
	callq	_vdbeMergeEngineFree
LBB0_4:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.comm	_INCRINIT_NORMAL,4,2            ## @INCRINIT_NORMAL
	.comm	_INCRINIT_ROOT,4,2              ## @INCRINIT_ROOT
	.comm	_INCRINIT_TASK,4,2              ## @INCRINIT_TASK
	.comm	_SQLITE_NOMEM_BKPT,4,2          ## @SQLITE_NOMEM_BKPT
	.no_dead_strip	_vdbeSorterSetupMerge
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vdbeSorterSetupMerge
_vdbeSorterSetupMerge:                  ; @vdbeSorterSetupMerge
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x0
	ldr	x21, [x0, #24]
	str	xzr, [sp, #8]
	add	x1, sp, #8
	bl	_vdbeSorterMergeTreeBuild
Lloh0:
	adrp	x22, _SQLITE_OK@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SQLITE_OK@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w0, w8
	b.ne	LBB0_2
; %bb.1:
	ldr	x1, [sp, #8]
Lloh2:
	adrp	x8, _INCRINIT_NORMAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _INCRINIT_NORMAL@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_vdbeMergeEngineInit
	mov	x19, x0
	ldr	x8, [sp, #8]
	str	x8, [x20, #16]
	str	xzr, [sp, #8]
	ldr	w8, [x22]
	cmp	w19, w8
	b.ne	LBB0_3
	b	LBB0_4
LBB0_2:
	mov	x19, x0
	cmp	w19, w8
	b.eq	LBB0_4
LBB0_3:
	ldr	x0, [sp, #8]
	bl	_vdbeMergeEngineFree
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.comm	_INCRINIT_NORMAL,4,2            ; @INCRINIT_NORMAL
	.comm	_INCRINIT_ROOT,4,2              ; @INCRINIT_ROOT
	.comm	_INCRINIT_TASK,4,2              ; @INCRINIT_TASK
	.comm	_SQLITE_NOMEM_BKPT,4,2          ; @SQLITE_NOMEM_BKPT
	.no_dead_strip	_vdbeSorterSetupMerge
.subsections_via_symbols
