	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vdbeMergeEngineInit
_vdbeMergeEngineInit:                   ## @vdbeMergeEngineInit
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r15
	movq	%rdi, %r12
	xorl	%edi, %edi
	testq	%rsi, %rsi
	setne	%dil
	callq	_assert
	movq	_SQLITE_MAX_WORKER_THREADS@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	setg	%al
	movq	_INCRINIT_NORMAL@GOTPCREL(%rip), %rcx
	cmpl	%ebx, (%rcx)
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	xorl	%edi, %edi
	cmpq	$0, 16(%r15)
	sete	%dil
	callq	_assert
	movq	%r12, 16(%r15)
	movl	(%r15), %r14d
	testl	%r14d, %r14d
	jle	LBB0_11
## %bb.1:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	leal	-1(%r14), %r13d
	shlq	$2, %r14
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_SQLITE_MAX_WORKER_THREADS@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movq	8(%r15), %rdi
	jle	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_INCRINIT_ROOT@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movslq	%r13d, %rax
	leaq	(%rdi,%rax,4), %rdi
	callq	_vdbePmaReaderNext
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	addq	%r12, %rdi
	movq	_INCRINIT_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_vdbePmaReaderIncrInit
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_SQLITE_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_12
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	decl	%r13d
	addq	$4, %r12
	cmpq	%r12, %r14
	jne	LBB0_3
## %bb.8:
	movl	(%r15), %ebx
	cmpl	$2, %ebx
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	jl	LBB0_11
## %bb.9:
	incl	%ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	leal	-2(%rbx), %esi
	movq	%r15, %rdi
	callq	_vdbeMergeEngineCompare
	decl	%ebx
	cmpl	$2, %ebx
	ja	LBB0_10
LBB0_11:
	movq	(%r12), %rax
	movl	(%rax), %eax
LBB0_12:
	addq	$8, %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_MAX_WORKER_THREADS,8,3  ## @SQLITE_MAX_WORKER_THREADS
	.comm	_INCRINIT_NORMAL,4,2            ## @INCRINIT_NORMAL
	.comm	_INCRINIT_ROOT,4,2              ## @INCRINIT_ROOT
	.no_dead_strip	_vdbeMergeEngineInit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vdbeMergeEngineInit
_vdbeMergeEngineInit:                   ; @vdbeMergeEngineInit
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	cmp	x1, #0
	cset	w0, ne
	bl	_assert
Lloh0:
	adrp	x22, _SQLITE_MAX_WORKER_THREADS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SQLITE_MAX_WORKER_THREADS@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x8, #0
Lloh2:
	adrp	x23, _INCRINIT_NORMAL@GOTPAGE
Lloh3:
	ldr	x23, [x23, _INCRINIT_NORMAL@GOTPAGEOFF]
	ldr	w8, [x23]
	ccmp	w8, w21, #4, le
	cset	w0, eq
	bl	_assert
	ldr	x8, [x20, #16]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	str	x19, [x20, #16]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.1:
	mov	x24, #0
	sub	w25, w8, #1
	lsl	x26, x8, #2
Lloh4:
	adrp	x27, _INCRINIT_ROOT@GOTPAGE
Lloh5:
	ldr	x27, [x27, _INCRINIT_ROOT@GOTPAGEOFF]
Lloh6:
	adrp	x28, _SQLITE_OK@GOTPAGE
Lloh7:
	ldr	x28, [x28, _SQLITE_OK@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x22]
	ldr	w10, [x27]
	ldr	x8, [x20, #8]
	cmp	x9, #1
	ccmp	w10, w21, #0, ge
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x0, x8, x24
	ldr	w1, [x23]
	bl	_vdbePmaReaderIncrInit
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	x0, x8, w25, sxtw #2
	bl	_vdbePmaReaderNext
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x28]
	cmp	w0, w8
	b.ne	LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	w25, w25, #1
	add	x24, x24, #4
	cmp	x26, x24
	b.ne	LBB0_2
; %bb.7:
	ldr	w8, [x20]
	cmp	w8, #2
	b.lt	LBB0_10
; %bb.8:
	add	w21, w8, #1
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	sub	w1, w21, #2
	mov	x0, x20
	bl	_vdbeMergeEngineCompare
	sub	w21, w21, #1
	cmp	w21, #2
	b.hi	LBB0_9
LBB0_10:
	ldr	x8, [x19]
	ldr	w0, [x8]
LBB0_11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.comm	_SQLITE_MAX_WORKER_THREADS,8,3  ; @SQLITE_MAX_WORKER_THREADS
	.comm	_INCRINIT_NORMAL,4,2            ; @INCRINIT_NORMAL
	.comm	_INCRINIT_ROOT,4,2              ; @INCRINIT_ROOT
	.no_dead_strip	_vdbeMergeEngineInit
.subsections_via_symbols
