	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sqliteProcessJoin
_sqliteProcessJoin:                     ## @sqliteProcessJoin
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	movq	8(%rsi), %rsi
	xorl	%eax, %eax
	cmpl	$2, (%rsi)
	jl	LBB0_28
## %bb.1:
	movq	8(%rsi), %rcx
	xorl	%eax, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	addq	$32, %rcx
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	incl	%edx
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movl	(%rsi), %eax
	decl	%eax
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	cmpl	%eax, %edx
	jge	LBB0_24
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
                                        ##     Child Loop BB0_20 Depth 2
	movq	32(%rcx), %r12
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	cmpq	$0, (%rcx)
	sete	%al
	testq	%r12, %r12
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_NEVER
	testq	%rax, %rax
	jne	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	60(%rax), %r15d
	movq	_JT_OUTER@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%eax, %eax
	movl	%ecx, -80(%rbp)                 ## 4-byte Spill
	testl	%r15d, %ecx
	setne	%al
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	_JT_NATURAL@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_12
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, 48(%rax)
	jne	LBB0_25
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$0, 40(%rax)
	jne	LBB0_25
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$0, (%r12)
	jle	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leal	1(%rax), %r13d
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_10 Depth=2
	incq	%rbx
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jge	LBB0_12
LBB0_10:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%r12), %rax
	movq	(%rax,%rbx,8), %rdx
	movq	%r14, %rdi
	movl	%r13d, %esi
	leaq	-48(%rbp), %rcx
	leaq	-44(%rbp), %r8
	callq	_tableAndColumnIndex
	testq	%rax, %rax
	je	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=2
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %ecx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movl	%r13d, %r8d
	movl	%ebx, %r9d
	pushq	-96(%rbp)                       ## 8-byte Folded Reload
	pushq	-104(%rbp)                      ## 8-byte Folded Reload
	callq	_addWhereTerm
	addq	$16, %rsp
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	48(%rbx), %rdx
	testq	%rdx, %rdx
	je	LBB0_17
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$0, 40(%rbx)
	jne	LBB0_26
## %bb.14:                              ##   in Loop: Header=BB0_3 Depth=1
	testl	%r15d, -80(%rbp)                ## 4-byte Folded Reload
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	56(%rbx), %esi
	movq	%rdx, %rdi
	callq	_setJoinExpr
	movq	48(%rbx), %rdx
LBB0_16:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-96(%rbp), %r15                 ## 8-byte Reload
	movl	(%r15), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_sqlite3ExprAnd
	movl	%eax, (%r15)
	movq	$0, 48(%rbx)
LBB0_17:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	40(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_2
## %bb.18:                              ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$0, (%rcx)
	jle	LBB0_2
## %bb.19:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leal	1(%rax), %r14d
	xorl	%r13d, %r13d
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	%r12, -112(%rbp)                ## 8-byte Spill
	.p2align	4, 0x90
LBB0_20:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%rcx), %rax
	movq	(%rax,%r13,8), %rbx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_columnIndex
	testl	%eax, %eax
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	js	LBB0_23
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=2
	movl	%eax, %r15d
	movq	%r12, %rdi
	movl	%r14d, %esi
	movq	%rbx, %rdx
	leaq	-48(%rbp), %rcx
	leaq	-44(%rbp), %r8
	callq	_tableAndColumnIndex
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_20 Depth=2
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %ecx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movl	%r14d, %r8d
	movl	%r15d, %r9d
	pushq	-96(%rbp)                       ## 8-byte Folded Reload
	pushq	-104(%rbp)                      ## 8-byte Folded Reload
	callq	_addWhereTerm
	addq	$16, %rsp
	incq	%r13
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movslq	(%rcx), %rax
	cmpq	%rax, %r13
	movq	-112(%rbp), %r12                ## 8-byte Reload
	jl	LBB0_20
	jmp	LBB0_2
LBB0_23:
	leaq	L_.str.2(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_sqlite3ErrorMsg
LBB0_27:
	movl	$1, %eax
LBB0_28:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	xorl	%eax, %eax
	jmp	LBB0_28
LBB0_25:
	leaq	L_.str(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%edx, %edx
	xorl	%eax, %eax
	callq	_sqlite3ErrorMsg
	jmp	LBB0_27
LBB0_26:
	leaq	L_.str.1(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_sqlite3ErrorMsg
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.comm	_JT_OUTER,4,2                   ## @JT_OUTER
	.comm	_JT_NATURAL,4,2                 ## @JT_NATURAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"a NATURAL join may not have an ON or USING clause"

L_.str.1:                               ## @.str.1
	.asciz	"cannot have both ON and USING clauses in the same join"

L_.str.2:                               ## @.str.2
	.asciz	"cannot join using column %s - column not present in both tables"

	.no_dead_strip	_sqliteProcessJoin
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sqliteProcessJoin
_sqliteProcessJoin:                     ; @sqliteProcessJoin
	.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
	ldr	x21, [x1, #8]
	ldr	w8, [x21]
	cmp	w8, #2
	b.lt	LBB0_23
; %bb.1:
	mov	x20, x1
	str	x0, [sp, #16]                   ; 8-byte Folded Spill
	mov	w27, #0
	ldr	x26, [x21, #8]
	mov	x9, x26
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w27, w27, #1
	ldr	w8, [x21]
	sub	w8, w8, #1
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	mov	x26, x9
	cmp	w27, w8
	b.ge	LBB0_23
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
                                        ;     Child Loop BB0_20 Depth 2
	ldr	x22, [x9, #32]!
	str	x9, [sp, #8]                    ; 8-byte Folded Spill
	ldr	x8, [x26]
	cmp	x8, #0
	ccmp	x22, #0, #4, ne
	cset	w0, eq
	bl	_NEVER
	cbnz	x0, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x26, #60]
Lloh0:
	adrp	x9, _JT_OUTER@GOTPAGE
Lloh1:
	ldr	x9, [x9, _JT_OUTER@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	ands	w28, w9, w8
	cset	w23, ne
Lloh3:
	adrp	x9, _JT_NATURAL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _JT_NATURAL@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	ldr	x19, [sp, #16]                  ; 8-byte Folded Reload
	b.eq	LBB0_12
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x26, #48]
	cbnz	x8, LBB0_27
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x26, #40]
	cbnz	x8, LBB0_27
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x24, #0
	add	w25, w27, #1
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=2
	add	x24, x24, #1
	ldrsw	x8, [x22]
	cmp	x24, x8
	b.ge	LBB0_12
LBB0_10:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x22, #8]
	ldr	x2, [x8, x24, lsl #3]
	add	x3, sp, #28
	add	x4, sp, #24
	mov	x0, x21
	mov	x1, x25
	bl	_tableAndColumnIndex
	cbz	x0, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	ldp	w3, w2, [sp, #24]
	mov	x0, x19
	mov	x1, x21
	mov	x4, x25
	mov	x5, x24
	mov	x6, x23
	mov	x7, x20
	bl	_addWhereTerm
	b	LBB0_9
LBB0_12:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x2, [x26, #48]
	cbz	x2, LBB0_17
; %bb.13:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x26, #40]
	cbnz	x8, LBB0_28
; %bb.14:                               ;   in Loop: Header=BB0_3 Depth=1
	cbz	w28, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x26, #56]
	mov	x0, x2
	bl	_setJoinExpr
	ldr	x2, [x26, #48]
LBB0_16:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x20]
	mov	x0, x19
	bl	_sqlite3ExprAnd
	str	w0, [x20]
	str	xzr, [x26, #48]
LBB0_17:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x28, [x26, #40]
	cbz	x28, LBB0_2
; %bb.18:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x28]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.19:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x19, #0
	add	w24, w27, #1
LBB0_20:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x28, #8]
	ldr	x25, [x8, x19, lsl #3]
	mov	x0, x22
	mov	x1, x25
	bl	_columnIndex
	tbnz	w0, #31, LBB0_24
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=2
	mov	x26, x0
	add	x3, sp, #28
	add	x4, sp, #24
	mov	x0, x21
	mov	x1, x24
	mov	x2, x25
	bl	_tableAndColumnIndex
	cbz	x0, LBB0_24
; %bb.22:                               ;   in Loop: Header=BB0_20 Depth=2
	ldp	w3, w2, [sp, #24]
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	mov	x1, x21
	mov	x4, x24
	mov	x5, x26
	mov	x6, x23
	mov	x7, x20
	bl	_addWhereTerm
	add	x19, x19, #1
	ldrsw	x8, [x28]
	cmp	x19, x8
	b.lt	LBB0_20
	b	LBB0_2
LBB0_23:
	mov	w0, #0
	b	LBB0_26
LBB0_24:
	str	x25, [sp]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
LBB0_25:
	bl	_sqlite3ErrorMsg
	mov	w0, #1
LBB0_26:
	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_27:
	str	xzr, [sp]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_29
LBB0_28:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_29:
	mov	x0, x19
	b	LBB0_25
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_JT_OUTER,4,2                   ; @JT_OUTER
	.comm	_JT_NATURAL,4,2                 ; @JT_NATURAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"a NATURAL join may not have an ON or USING clause"

l_.str.1:                               ; @.str.1
	.asciz	"cannot have both ON and USING clauses in the same join"

l_.str.2:                               ; @.str.2
	.asciz	"cannot join using column %s - column not present in both tables"

	.no_dead_strip	_sqliteProcessJoin
.subsections_via_symbols
