	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function whereLoopInsert
_whereLoopInsert:                       ## @whereLoopInsert
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rsi, %r12
	movq	24(%rbx), %r15
	movq	8(%r15), %rcx
	movq	(%rcx), %r14
	decq	%rax
	movq	%rax, (%rbx)
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.2:
	cmpq	$0, 40(%r12)
	je	LBB0_14
## %bb.3:
	movl	32(%r12), %esi
	movl	24(%r12), %ecx
	movl	28(%r12), %edx
	callq	_whereOrInsert
	jmp	LBB0_14
LBB0_4:
	leaq	L_.str(%rip), %rsi
	movl	$-1, %edi
	callq	_WHERETRACE
	movq	16(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	$0, (%rax)
LBB0_6:
	movq	_SQLITE_DONE@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_7:
	movq	(%r15), %rdi
	movq	%r12, %rsi
	callq	_whereLoopAdjustCost
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_whereLoopFindLesser
	testq	%rax, %rax
	je	LBB0_14
## %bb.8:
	movq	%rax, %rbx
	movq	(%rax), %r15
	testq	%r15, %r15
	je	LBB0_17
## %bb.9:
	cmpq	$0, 16(%r15)
	je	LBB0_19
## %bb.10:
	leaq	16(%r15), %rbx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_whereLoopFindLesser
	testq	%rax, %rax
	je	LBB0_19
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%rax, %rbx
	movq	(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_19
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	16(%rsi), %rax
	movq	%rax, (%rbx)
	movq	%r14, %rdi
	callq	_whereLoopDelete
	cmpq	$0, (%rbx)
	jne	LBB0_11
	jmp	LBB0_19
LBB0_14:
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %eax
LBB0_16:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	%r14, %rdi
	movl	$48, %esi
	callq	_sqlite3DbMallocRawNN
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_23
## %bb.18:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_whereLoopInit
	movq	$0, 16(%r15)
LBB0_19:
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_whereLoopXfer
	movq	_WHERE_VIRTUALTABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%r15)
	jne	LBB0_16
## %bb.20:
	movq	8(%r15), %rcx
	testq	%rcx, %rcx
	je	LBB0_16
## %bb.21:
	movq	(%rcx), %rcx
	movq	_SQLITE_IDXTYPE_IPK@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_16
## %bb.22:
	movq	$0, 8(%r15)
	jmp	LBB0_16
LBB0_23:
	movq	_SQLITE_NOMEM_BKPT@GOTPCREL(%rip), %rax
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"=== query planner search limit reached ===\n"

	.comm	_SQLITE_DONE,4,2                ## @SQLITE_DONE
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.comm	_SQLITE_NOMEM_BKPT,4,2          ## @SQLITE_NOMEM_BKPT
	.comm	_WHERE_VIRTUALTABLE,4,2         ## @WHERE_VIRTUALTABLE
	.comm	_SQLITE_IDXTYPE_IPK,8,3         ## @SQLITE_IDXTYPE_IPK
	.comm	_sqlite3WhereTrace,4,2          ## @sqlite3WhereTrace
	.no_dead_strip	_whereLoopInsert
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function whereLoopInsert
_whereLoopInsert:                       ; @whereLoopInsert
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, x0
	ldr	x8, [x0]
	cbz	x8, LBB0_4
; %bb.1:
	mov	x19, x1
	ldp	x0, x22, [x21, #16]
	ldr	x9, [x22, #8]
	ldr	x20, [x9]
	sub	x8, x8, #1
	str	x8, [x21]
	cbz	x0, LBB0_7
; %bb.2:
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_13
; %bb.3:
	ldp	w2, w1, [x19, #28]
	ldr	w3, [x19, #24]
	bl	_whereOrInsert
	b	LBB0_13
LBB0_4:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #-1
	bl	_WHERETRACE
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_6
; %bb.5:
	str	xzr, [x8]
LBB0_6:
Lloh2:
	adrp	x8, _SQLITE_DONE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SQLITE_DONE@GOTPAGEOFF]
	b	LBB0_14
LBB0_7:
	ldr	x0, [x22]
	mov	x1, x19
	bl	_whereLoopAdjustCost
	mov	x0, x22
	mov	x1, x19
	bl	_whereLoopFindLesser
	cbz	x0, LBB0_13
; %bb.8:
	mov	x22, x0
	ldr	x21, [x0]
	cbz	x21, LBB0_16
; %bb.9:
	mov	x22, x21
	ldr	x8, [x22, #16]!
	cbz	x8, LBB0_18
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x19
	bl	_whereLoopFindLesser
	cbz	x0, LBB0_18
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x22, x0
	ldr	x1, [x0]
	cbz	x1, LBB0_18
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x8, [x1, #16]
	str	x8, [x22]
	mov	x0, x20
	bl	_whereLoopDelete
	ldr	x8, [x22]
	cbnz	x8, LBB0_10
	b	LBB0_18
LBB0_13:
Lloh4:
	adrp	x8, _SQLITE_OK@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SQLITE_OK@GOTPAGEOFF]
LBB0_14:
	ldr	w0, [x8]
LBB0_15:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_16:
	mov	x0, x20
	mov	w1, #48
	bl	_sqlite3DbMallocRawNN
	str	x0, [x22]
	cbz	x0, LBB0_22
; %bb.17:
	mov	x21, x0
	bl	_whereLoopInit
	str	xzr, [x21, #16]
LBB0_18:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	bl	_whereLoopXfer
	ldr	w8, [x21]
Lloh6:
	adrp	x9, _WHERE_VIRTUALTABLE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _WHERE_VIRTUALTABLE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_15
; %bb.19:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_15
; %bb.20:
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _SQLITE_IDXTYPE_IPK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SQLITE_IDXTYPE_IPK@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.21:
	str	xzr, [x21, #8]
	b	LBB0_15
LBB0_22:
Lloh12:
	adrp	x8, _SQLITE_NOMEM_BKPT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SQLITE_NOMEM_BKPT@GOTPAGEOFF]
	b	LBB0_14
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"=== query planner search limit reached ===\n"

	.comm	_SQLITE_DONE,4,2                ; @SQLITE_DONE
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.comm	_SQLITE_NOMEM_BKPT,4,2          ; @SQLITE_NOMEM_BKPT
	.comm	_WHERE_VIRTUALTABLE,4,2         ; @WHERE_VIRTUALTABLE
	.comm	_SQLITE_IDXTYPE_IPK,8,3         ; @SQLITE_IDXTYPE_IPK
	.comm	_sqlite3WhereTrace,4,2          ; @sqlite3WhereTrace
	.no_dead_strip	_whereLoopInsert
.subsections_via_symbols
