	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function resolveOrderByTermToExprList
_resolveOrderByTermToExprList:          ## @resolveOrderByTermToExprList
	.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
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r15
	leaq	-44(%rbp), %rsi
	movq	%rdx, %rdi
	callq	_sqlite3ExprIsInteger
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_assert
	movq	8(%r12), %r13
	leaq	-88(%rbp), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movq	%r15, -56(%rbp)
	movl	(%r12), %eax
	movl	%eax, -64(%rbp)
	movq	%r13, -72(%rbp)
	movq	_NC_AllowAgg@GOTPCREL(%rip), %rax
	movq	_NC_UEList@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, -88(%rbp)
	movq	$0, -80(%rbp)
	movq	(%r15), %r15
	movl	(%r15), %r12d
	movl	$1, (%r15)
	leaq	-88(%rbp), %rdi
	movq	%r14, %rsi
	callq	_sqlite3ResolveExprNames
	movl	%r12d, (%r15)
	testl	%eax, %eax
	je	LBB0_1
LBB0_6:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	$0, -44(%rbp)
	cmpl	$0, (%r13)
	jle	LBB0_6
## %bb.2:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movslq	%ebx, %rcx
	movl	(%rax,%rcx,4), %esi
	xorl	%edi, %edi
	movq	%r14, %rdx
	movl	$-1, %ecx
	callq	_sqlite3ExprCompare
	movl	-44(%rbp), %ebx
	incl	%ebx
	cmpl	$2, %eax
	jl	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, -44(%rbp)
	cmpl	(%r13), %ebx
	jl	LBB0_3
## %bb.5:
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_NC_AllowAgg,4,2                ## @NC_AllowAgg
	.comm	_NC_UEList,4,2                  ## @NC_UEList
	.no_dead_strip	_resolveOrderByTermToExprList
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function resolveOrderByTermToExprList
_resolveOrderByTermToExprList:          ; @resolveOrderByTermToExprList
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
	sub	x1, x29, #36
	mov	x0, x2
	bl	_sqlite3ExprIsInteger
	cmp	x0, #0
	cset	w0, eq
	bl	_assert
	ldr	x22, [x20, #8]
	mov	x0, sp
	mov	w1, #0
	mov	w2, #40
	bl	_memset
	str	x21, [sp, #32]
	ldr	w8, [x20]
	str	w8, [sp, #24]
Lloh0:
	adrp	x8, _NC_AllowAgg@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NC_AllowAgg@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _NC_UEList@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NC_UEList@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [sp]
	stp	xzr, x22, [sp, #8]
	ldr	x20, [x21]
	ldr	w21, [x20]
	mov	w8, #1
	str	w8, [x20]
	mov	x0, sp
	mov	x1, x19
	bl	_sqlite3ResolveExprNames
	mov	x8, x0
	mov	w0, #0
	str	w21, [x20]
	cbnz	w8, LBB0_6
; %bb.1:
	stur	wzr, [x29, #-36]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.2:
	mov	w0, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #8]
	ldr	w1, [x8, w0, sxtw #2]
	mov	w0, #0
	mov	x2, x19
	mov	w3, #-1
	bl	_sqlite3ExprCompare
	mov	x8, x0
	ldur	w9, [x29, #-36]
	add	w0, w9, #1
	cmp	w8, #2
	b.lt	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	stur	w0, [x29, #-36]
	ldr	w8, [x22]
	cmp	w0, w8
	b.lt	LBB0_3
LBB0_5:
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_NC_AllowAgg,4,2                ; @NC_AllowAgg
	.comm	_NC_UEList,4,2                  ; @NC_UEList
	.no_dead_strip	_resolveOrderByTermToExprList
.subsections_via_symbols
