	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function minMaxQuery
_minMaxQuery:                           ## @minMaxQuery
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_WHERE_ORDERBY_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	16(%rsi), %r13
	xorl	%edi, %edi
	cmpq	$0, (%rdx)
	sete	%dil
	callq	_assert
	movq	(%rbx), %rax
	movq	_TK_AGG_FUNCTION@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_assert
	movq	%rbx, %rdi
	callq	_IsWindowFunc
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_assert
	testq	%r13, %r13
	je	LBB0_10
## %bb.1:
	cmpl	$1, (%r13)
	jne	LBB0_10
## %bb.2:
	movq	_EP_WinFunc@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ExprHasProperty
	testq	%rax, %rax
	je	LBB0_3
LBB0_10:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	8(%rbx), %rbx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_sqlite3StrICmp
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_sqlite3StrICmp
	testq	%rax, %rax
	jne	LBB0_10
## %bb.6:
	movq	_KEYINFO_ORDER_DESC@GOTPCREL(%rip), %rax
	movq	_WHERE_ORDERBY_MAX@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_4:
	movq	_KEYINFO_ORDER_BIGNULL@GOTPCREL(%rip), %rax
	movq	_WHERE_ORDERBY_MIN@GOTPCREL(%rip), %rcx
LBB0_7:
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	(%rcx), %r15d
	movq	%r14, %rdi
	movq	%r13, %rsi
	xorl	%edx, %edx
	callq	_sqlite3ExprListDup
	movq	%rax, (%r12)
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%rax, %rbx
	movl	$1, %edi
	callq	_assert
	movq	8(%rbx), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, (%rax)
	jmp	LBB0_10
LBB0_8:
	xorl	%edi, %edi
	cmpq	$0, (%r14)
	setne	%dil
	callq	_assert
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_WHERE_ORDERBY_NORMAL,4,2       ## @WHERE_ORDERBY_NORMAL
	.comm	_TK_AGG_FUNCTION,8,3            ## @TK_AGG_FUNCTION
	.comm	_EP_WinFunc,4,2                 ## @EP_WinFunc
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"min"

	.comm	_WHERE_ORDERBY_MIN,4,2          ## @WHERE_ORDERBY_MIN
	.comm	_KEYINFO_ORDER_BIGNULL,4,2      ## @KEYINFO_ORDER_BIGNULL
L_.str.1:                               ## @.str.1
	.asciz	"max"

	.comm	_WHERE_ORDERBY_MAX,4,2          ## @WHERE_ORDERBY_MAX
	.comm	_KEYINFO_ORDER_DESC,4,2         ## @KEYINFO_ORDER_DESC
	.no_dead_strip	_minMaxQuery
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function minMaxQuery
_minMaxQuery:                           ; @minMaxQuery
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x2
	mov	x23, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _WHERE_ORDERBY_NORMAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WHERE_ORDERBY_NORMAL@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
	ldr	x22, [x1, #16]
	ldr	x8, [x2]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	ldr	x8, [x23]
Lloh3:
	adrp	x9, _TK_AGG_FUNCTION@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TK_AGG_FUNCTION@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_assert
	mov	x0, x23
	bl	_IsWindowFunc
	cmp	w0, #0
	cset	w0, eq
	bl	_assert
	cbz	x22, LBB0_3
; %bb.1:
	ldr	w8, [x22]
	cmp	w8, #1
	b.ne	LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _EP_WinFunc@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EP_WinFunc@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_ExprHasProperty
	cbz	x0, LBB0_4
LBB0_3:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_4:
	ldr	x23, [x23, #8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	bl	_sqlite3StrICmp
	cbz	x0, LBB0_7
; %bb.5:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x23
	bl	_sqlite3StrICmp
	cbnz	x0, LBB0_3
; %bb.6:
Lloh13:
	adrp	x8, _KEYINFO_ORDER_DESC@GOTPAGE
Lloh14:
	ldr	x8, [x8, _KEYINFO_ORDER_DESC@GOTPAGEOFF]
Lloh15:
	adrp	x9, _WHERE_ORDERBY_MAX@GOTPAGE
Lloh16:
	ldr	x9, [x9, _WHERE_ORDERBY_MAX@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh17:
	adrp	x8, _KEYINFO_ORDER_BIGNULL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _KEYINFO_ORDER_BIGNULL@GOTPAGEOFF]
Lloh19:
	adrp	x9, _WHERE_ORDERBY_MIN@GOTPAGE
Lloh20:
	ldr	x9, [x9, _WHERE_ORDERBY_MIN@GOTPAGEOFF]
LBB0_8:
	ldr	w23, [x8]
	ldr	w19, [x9]
	mov	x0, x20
	mov	x1, x22
	mov	w2, #0
	bl	_sqlite3ExprListDup
	str	x0, [x21]
	cbz	x0, LBB0_10
; %bb.9:
	mov	x22, x0
	mov	w0, #1
	bl	_assert
	ldr	x8, [x22, #8]
	str	w23, [x8]
	b	LBB0_3
LBB0_10:
	ldr	x8, [x20]
	cmp	x8, #0
	cset	w0, ne
	bl	_assert
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_WHERE_ORDERBY_NORMAL,4,2       ; @WHERE_ORDERBY_NORMAL
	.comm	_TK_AGG_FUNCTION,8,3            ; @TK_AGG_FUNCTION
	.comm	_EP_WinFunc,4,2                 ; @EP_WinFunc
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"min"

	.comm	_WHERE_ORDERBY_MIN,4,2          ; @WHERE_ORDERBY_MIN
	.comm	_KEYINFO_ORDER_BIGNULL,4,2      ; @KEYINFO_ORDER_BIGNULL
l_.str.1:                               ; @.str.1
	.asciz	"max"

	.comm	_WHERE_ORDERBY_MAX,4,2          ; @WHERE_ORDERBY_MAX
	.comm	_KEYINFO_ORDER_DESC,4,2         ; @KEYINFO_ORDER_DESC
	.no_dead_strip	_minMaxQuery
.subsections_via_symbols
