	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vdbePmaReaderIncrMergeInit
_vdbePmaReaderIncrMergeInit:            ## @vdbePmaReaderIncrMergeInit
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r13
	movq	32(%r13), %rbx
	movq	16(%rbx), %rax
	movq	_SQLITE_MAX_WORKER_THREADS@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	setg	%cl
	movq	_INCRINIT_NORMAL@GOTPCREL(%rip), %rdx
	cmpl	%esi, (%rdx)
	movq	(%rax), %r12
	sete	%al
	orb	%cl, %al
	movzbl	%al, %edi
	callq	_assert
	movl	24(%r13), %esi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_vdbeMergeEngineInit
	movq	_SQLITE_OK@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	cmpl	%edx, %eax
	jne	LBB0_1
## %bb.3:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movl	(%r13), %r12d
	cmpq	$0, (%rbx)
	jne	LBB0_5
## %bb.4:
	xorl	%edi, %edi
	cmpl	$0, 8(%rbx)
	setg	%dil
	callq	_assert
	movl	8(%rbx), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_vdbeSorterOpenTempFile
	movl	%eax, %ecx
	movl	$0, 8(%rbx)
	movl	(%r14), %eax
	movl	%eax, %edx
	cmpl	%eax, %ecx
	jne	LBB0_2
LBB0_5:
	movq	(%rbx), %rcx
	movq	16(%r13), %rdx
	movq	%rcx, 8(%rdx)
	movl	8(%rbx), %ecx
	movl	%ecx, 4(%r13)
	addl	%ecx, %r12d
	movl	%r12d, 8(%rbx)
	movl	%eax, %edx
	jmp	LBB0_6
LBB0_1:
	movl	%eax, %ecx
LBB0_2:
	cmpl	%edx, %ecx
	jne	LBB0_8
LBB0_6:
	movq	_SQLITE_MAX_WORKER_THREADS@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.7:
	movq	_INCRINIT_TASK@GOTPCREL(%rip), %rax
	movl	%edx, %ecx
	cmpl	%r15d, (%rax)
	jne	LBB0_9
LBB0_8:
	movl	%ecx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vdbePmaReaderNext              ## TAILCALL
	.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_TASK,4,2              ## @INCRINIT_TASK
	.comm	_INCRINIT_ROOT,4,2              ## @INCRINIT_ROOT
	.no_dead_strip	_vdbePmaReaderIncrMergeInit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vdbePmaReaderIncrMergeInit
_vdbePmaReaderIncrMergeInit:            ; @vdbePmaReaderIncrMergeInit
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x24, [x0]
	ldr	x21, [x24, #32]
	ldr	x8, [x21, #16]
	ldr	x22, [x8]
Lloh0:
	adrp	x23, _SQLITE_MAX_WORKER_THREADS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _SQLITE_MAX_WORKER_THREADS@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x8, #0
Lloh2:
	adrp	x8, _INCRINIT_NORMAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _INCRINIT_NORMAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ccmp	w8, w1, #4, le
	cset	w0, eq
	bl	_assert
	ldr	w1, [x24, #24]
	mov	x0, x21
	mov	x2, x20
	bl	_vdbeMergeEngineInit
Lloh5:
	adrp	x26, _SQLITE_OK@GOTPAGE
Lloh6:
	ldr	x26, [x26, _SQLITE_OK@GOTPAGEOFF]
	ldr	w9, [x26]
	cmp	w0, w9
	b.ne	LBB0_4
; %bb.1:
	ldr	w25, [x24]
	ldr	x8, [x21]
	cbnz	x8, LBB0_3
; %bb.2:
	ldr	w8, [x21, #8]
	cmp	w8, #0
	cset	w0, gt
	bl	_assert
	ldr	w1, [x21, #8]
	mov	x0, x22
	mov	x2, x21
	bl	_vdbeSorterOpenTempFile
	mov	x8, x0
	str	wzr, [x21, #8]
	ldr	w0, [x26]
	mov	x9, x0
	cmp	w8, w0
	b.ne	LBB0_5
LBB0_3:
	ldr	x8, [x21]
	ldr	x9, [x24, #16]
	str	x8, [x9, #8]
	ldr	w8, [x21, #8]
	str	w8, [x24, #4]
	add	w8, w8, w25
	str	w8, [x21, #8]
	mov	x9, x0
	b	LBB0_6
LBB0_4:
	mov	x8, x0
LBB0_5:
	cmp	w8, w9
	b.ne	LBB0_8
LBB0_6:
	ldr	x8, [x23]
Lloh7:
	adrp	x10, _INCRINIT_TASK@GOTPAGE
Lloh8:
	ldr	x10, [x10, _INCRINIT_TASK@GOTPAGEOFF]
Lloh9:
	ldr	w10, [x10]
	cmp	x8, #0
	ccmp	w10, w20, #0, ne
	mov	x8, x9
	b.eq	LBB0_8
; %bb.7:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_vdbePmaReaderNext
LBB0_8:
	mov	x0, x8
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.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_TASK,4,2              ; @INCRINIT_TASK
	.comm	_INCRINIT_ROOT,4,2              ; @INCRINIT_ROOT
	.no_dead_strip	_vdbePmaReaderIncrMergeInit
.subsections_via_symbols
