	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vdbeMergeEngineNew
_vdbeMergeEngineNew:                    ## @vdbeMergeEngineNew
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edi, %r14d
	movq	_SORTER_MAX_MERGE_COUNT@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	%r14d, (%rax)
	setge	%dil
	callq	_assert
	movl	$2, %eax
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%eax, %ebx
	leal	(%rbx,%rbx), %eax
	cmpl	%r14d, %ebx
	jl	LBB0_1
## %bb.2:
	movl	$100, %edi
	callq	_sqlite3FaultSim
	testq	%rax, %rax
	je	LBB0_4
LBB0_6:
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_4:
	leal	32(,%rbx,8), %edi
	callq	_sqlite3MallocZero
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movslq	%ebx, %rcx
	movl	%ebx, (%rax)
	movq	$0, 24(%rax)
	leaq	32(%rax), %rdx
	movq	%rdx, 16(%rax)
	leaq	(%rax,%rcx,4), %rcx
	addq	$32, %rcx
	movq	%rcx, 8(%rax)
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SORTER_MAX_MERGE_COUNT,4,2     ## @SORTER_MAX_MERGE_COUNT
	.no_dead_strip	_vdbeMergeEngineNew
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vdbeMergeEngineNew
_vdbeMergeEngineNew:                    ; @vdbeMergeEngineNew
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _SORTER_MAX_MERGE_COUNT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SORTER_MAX_MERGE_COUNT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	cset	w0, ge
	bl	_assert
	mov	w8, #2
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x20, x8
	lsl	w8, w8, #1
	cmp	w20, w19
	b.lt	LBB0_1
; %bb.2:
	mov	w0, #100
	bl	_sqlite3FaultSim
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, #0
	b	LBB0_6
LBB0_4:
	lsl	w8, w20, #3
	add	w0, w8, #32
	bl	_sqlite3MallocZero
	cbz	x0, LBB0_6
; %bb.5:
	sxtw	x8, w20
	str	w20, [x0]
	add	x9, x0, #32
	add	x8, x9, x8, lsl #2
	stp	x9, xzr, [x0, #16]
	str	x8, [x0, #8]
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SORTER_MAX_MERGE_COUNT,4,2     ; @SORTER_MAX_MERGE_COUNT
	.no_dead_strip	_vdbeMergeEngineNew
.subsections_via_symbols
