	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pushDownWhereTerms
_pushDownWhereTerms:                    ## @pushDownWhereTerms
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%eax, %eax
	testq	%rdx, %rdx
	je	LBB0_17
## %bb.1:
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	_SF_Recursive@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rsi)
	jne	LBB0_17
## %bb.2:
	cmpq	$0, 48(%r15)
	jne	LBB0_17
## %bb.3:
	cmpq	$0, 8(%r15)
	je	LBB0_4
LBB0_17:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	%r8d, %r13d
	movq	(%rbx), %rax
	movq	_TK_AND@GOTPCREL(%rip), %r12
	xorl	%r14d, %r14d
	cmpq	(%r12), %rax
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	jne	LBB0_7
## %bb.5:
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%rbx), %rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	movl	%r13d, %r8d
	callq	_pushDownWhereTerms
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	addl	%eax, %r14d
	movq	16(%rbx), %rbx
	movq	(%rbx), %rax
	cmpq	(%r12), %rax
	je	LBB0_6
LBB0_7:
	testl	%r13d, %r13d
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_10
## %bb.8:
	movq	_EP_FromJoin@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ExprHasProperty
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	je	LBB0_17
## %bb.9:
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, 8(%rbx)
	jne	LBB0_17
LBB0_10:
	movq	_EP_FromJoin@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ExprHasProperty
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	xorl	%eax, %eax
	cmpl	%esi, 8(%rbx)
	jne	LBB0_17
LBB0_12:
	movq	%rbx, %rdi
	callq	_sqlite3ExprIsTableConstant
	testq	%rax, %rax
	je	LBB0_16
## %bb.13:
	incl	%r14d
	testq	%r15, %r15
	je	LBB0_16
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_sqlite3ExprDup
	movq	%rax, %r13
	movq	%rax, %rdi
	movl	$-1, %esi
	callq	_unsetJoinExpr
	movq	%r12, -64(%rbp)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, -88(%rbp)
	movl	%eax, -84(%rbp)
	movq	$0, -72(%rbp)
	movl	40(%r15), %eax
	movl	%eax, -80(%rbp)
	leaq	-88(%rbp), %rdi
	movq	%r13, %rsi
	callq	_substExpr
	movq	_SF_Aggregate@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%r13d, %r13d
	andl	(%r15), %ecx
	setne	%r13b
	movq	24(%r15,%r13,8), %rsi
	movq	%r12, %rdi
	movq	%rax, %rdx
	callq	_sqlite3ExprAnd
	movq	%rax, 24(%r15,%r13,8)
	movq	16(%r15), %r15
	testq	%r15, %r15
	jne	LBB0_14
LBB0_16:
	movl	%r14d, %eax
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_SF_Recursive,4,2               ## @SF_Recursive
	.comm	_TK_AND,8,3                     ## @TK_AND
	.comm	_EP_FromJoin,4,2                ## @EP_FromJoin
	.comm	_SF_Aggregate,4,2               ## @SF_Aggregate
	.no_dead_strip	_pushDownWhereTerms
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pushDownWhereTerms
_pushDownWhereTerms:                    ; @pushDownWhereTerms
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	cbz	x2, LBB0_4
; %bb.1:
	mov	x21, x1
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _SF_Recursive@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SF_Recursive@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_4
; %bb.2:
	ldr	x8, [x21, #48]
	cbnz	x8, LBB0_4
; %bb.3:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_6
LBB0_4:
	mov	w23, #0
LBB0_5:
	mov	x0, x23
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_6:
	mov	x24, x4
	mov	x19, x3
	mov	x20, x2
	mov	x22, x0
	ldr	x8, [x2]
Lloh3:
	adrp	x25, _TK_AND@GOTPAGE
Lloh4:
	ldr	x25, [x25, _TK_AND@GOTPAGEOFF]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.7:
	mov	w23, #0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x2, [x20, #24]
	mov	x0, x22
	mov	x1, x21
	mov	x3, x19
	mov	x4, x24
	bl	_pushDownWhereTerms
	add	w23, w0, w23
	ldr	x20, [x20, #16]
	ldr	x8, [x20]
	ldr	x9, [x25]
	cmp	x8, x9
	b.eq	LBB0_8
	b	LBB0_10
LBB0_9:
	mov	w23, #0
LBB0_10:
Lloh5:
	adrp	x25, _EP_FromJoin@GOTPAGE
Lloh6:
	ldr	x25, [x25, _EP_FromJoin@GOTPAGEOFF]
	cbz	w24, LBB0_13
; %bb.11:
	ldr	w1, [x25]
	mov	x0, x20
	bl	_ExprHasProperty
	cbz	x0, LBB0_4
; %bb.12:
	ldr	w8, [x20, #8]
	cmp	w8, w19
	b.ne	LBB0_4
LBB0_13:
	ldr	w1, [x25]
	mov	x0, x20
	bl	_ExprHasProperty
	cbz	x0, LBB0_15
; %bb.14:
	ldr	w8, [x20, #8]
	cmp	w8, w19
	b.ne	LBB0_4
LBB0_15:
	mov	x0, x20
	mov	x1, x19
	bl	_sqlite3ExprIsTableConstant
	cbz	x0, LBB0_5
; %bb.16:
	add	w23, w23, #1
	cbz	x21, LBB0_5
; %bb.17:
Lloh7:
	adrp	x25, _SF_Aggregate@GOTPAGE
Lloh8:
	ldr	x25, [x25, _SF_Aggregate@GOTPAGEOFF]
	mov	w26, #32
	mov	w27, #24
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	mov	x1, x20
	mov	w2, #0
	bl	_sqlite3ExprDup
	mov	x24, x0
	mov	w1, #-1
	bl	_unsetJoinExpr
	stp	w19, w19, [sp]
	stp	xzr, x22, [sp, #16]
	ldr	w8, [x21, #40]
	str	w8, [sp, #8]
	mov	x0, sp
	mov	x1, x24
	bl	_substExpr
	mov	x2, x0
	ldr	w8, [x21]
	ldr	w9, [x25]
	tst	w9, w8
	csel	x24, x27, x26, eq
	ldr	x1, [x21, x24]
	mov	x0, x22
	bl	_sqlite3ExprAnd
	str	x0, [x21, x24]
	ldr	x21, [x21, #16]
	cbnz	x21, LBB0_18
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SF_Recursive,4,2               ; @SF_Recursive
	.comm	_TK_AND,8,3                     ; @TK_AND
	.comm	_EP_FromJoin,4,2                ; @EP_FromJoin
	.comm	_SF_Aggregate,4,2               ; @SF_Aggregate
	.no_dead_strip	_pushDownWhereTerms
.subsections_via_symbols
