	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function windowAggFinal
_windowAggFinal:                        ## @windowAggFinal
	.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
	movl	%esi, %r14d
	movq	(%rdi), %r12
	movq	8(%rdi), %rdi
	callq	_sqlite3GetVdbe
	testq	%r12, %r12
	je	LBB0_12
## %bb.1:
	movq	%rax, %r15
	movq	_SQLITE_FUNC_MINMAX@GOTPCREL(%rip), %r13
	movq	%r12, %rbx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_assert
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	48(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_12
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	testq	%rax, %rax
	je	LBB0_3
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 40(%rbx)
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_windowArgCount
	testl	%r14d, %r14d
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_OP_AggFinal@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	24(%rbx), %edx
	movq	%r15, %rdi
	movl	%eax, %ecx
	callq	_sqlite3VdbeAddOp2
	movq	32(%rbx), %rsi
	movq	_P4_FUNCDEF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_sqlite3VdbeAppendP4
	movq	_OP_Copy@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	16(%rbx), %ecx
	movl	24(%rbx), %edx
	movq	%r15, %rdi
	callq	_sqlite3VdbeAddOp2
	movq	_OP_Null@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	24(%rbx), %ecx
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_sqlite3VdbeAddOp2
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	32(%rbx), %rcx
	movl	(%r13), %edx
	testl	%edx, (%rcx)
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rbx), %rcx
	movq	_TK_UNBOUNDED@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_OP_Null@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	16(%rbx), %ecx
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_sqlite3VdbeAddOp2
	movq	_OP_Last@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	20(%rbx), %edx
	movq	%r15, %rdi
	callq	_sqlite3VdbeAddOp1
	movq	%r15, %rdi
	callq	_VdbeCoverage
	movq	_OP_Column@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	16(%rbx), %r8d
	movl	20(%rbx), %edx
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_sqlite3VdbeAddOp3
	movq	%r15, %rdi
	callq	_sqlite3VdbeCurrentAddr
	leaq	-2(%rax), %rsi
	movq	%r15, %rdi
	callq	_sqlite3VdbeJumpHere
	jmp	LBB0_11
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_OP_AggValue@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	16(%rbx), %r8d
	movl	24(%rbx), %edx
	movq	%r15, %rdi
	movl	%eax, %ecx
	callq	_sqlite3VdbeAddOp3
	movq	32(%rbx), %rsi
	movq	_P4_FUNCDEF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_sqlite3VdbeAppendP4
	jmp	LBB0_11
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_FUNC_MINMAX,4,2         ## @SQLITE_FUNC_MINMAX
	.comm	_TK_UNBOUNDED,8,3               ## @TK_UNBOUNDED
	.comm	_OP_Null,4,2                    ## @OP_Null
	.comm	_OP_Last,4,2                    ## @OP_Last
	.comm	_OP_Column,4,2                  ## @OP_Column
	.comm	_OP_AggFinal,4,2                ## @OP_AggFinal
	.comm	_P4_FUNCDEF,4,2                 ## @P4_FUNCDEF
	.comm	_OP_Copy,4,2                    ## @OP_Copy
	.comm	_OP_AggValue,4,2                ## @OP_AggValue
	.no_dead_strip	_windowAggFinal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function windowAggFinal
_windowAggFinal:                        ; @windowAggFinal
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	ldp	x22, x8, [x0]
	mov	x0, x8
	bl	_sqlite3GetVdbe
	cbz	x22, LBB0_12
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x23, _SQLITE_FUNC_MINMAX@GOTPAGE
Lloh1:
	ldr	x23, [x23, _SQLITE_FUNC_MINMAX@GOTPAGEOFF]
Lloh2:
	adrp	x24, _TK_UNBOUNDED@GOTPAGE
Lloh3:
	ldr	x24, [x24, _TK_UNBOUNDED@GOTPAGEOFF]
Lloh4:
	adrp	x25, _OP_Null@GOTPAGE
Lloh5:
	ldr	x25, [x25, _OP_Null@GOTPAGEOFF]
Lloh6:
	adrp	x26, _P4_FUNCDEF@GOTPAGE
Lloh7:
	ldr	x26, [x26, _P4_FUNCDEF@GOTPAGEOFF]
Lloh8:
	adrp	x27, _OP_AggFinal@GOTPAGE
Lloh9:
	ldr	x27, [x27, _OP_AggFinal@GOTPAGEOFF]
	mov	x21, x22
Lloh10:
	adrp	x28, _OP_Copy@GOTPAGE
Lloh11:
	ldr	x28, [x28, _OP_Copy@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x21, [x21, #48]
	cbz	x21, LBB0_12
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	cbz	x8, LBB0_8
LBB0_5:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x21, #40]
	cbnz	x9, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	bl	_windowArgCount
	mov	x3, x0
	cbz	w19, LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x27]
	ldr	w2, [x21, #24]
	mov	x0, x20
	bl	_sqlite3VdbeAddOp2
	ldr	x1, [x21, #32]
	ldr	w2, [x26]
	mov	x0, x20
	bl	_sqlite3VdbeAppendP4
	ldr	w1, [x28]
	ldr	w2, [x21, #24]
	ldr	w3, [x21, #16]
	mov	x0, x20
	bl	_sqlite3VdbeAddOp2
	ldr	w1, [x25]
	ldr	w3, [x21, #24]
	mov	x0, x20
	mov	w2, #0
	bl	_sqlite3VdbeAddOp2
	b	LBB0_3
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x21, #32]
	ldr	w9, [x9]
	ldr	w10, [x23]
	tst	w10, w9
	b.eq	LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x21, #8]
	ldr	x10, [x24]
	cmp	x9, x10
	b.eq	LBB0_5
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x25]
	ldr	w3, [x21, #16]
	mov	x0, x20
	mov	w2, #0
	bl	_sqlite3VdbeAddOp2
Lloh12:
	adrp	x8, _OP_Last@GOTPAGE
Lloh13:
	ldr	x8, [x8, _OP_Last@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	ldr	w2, [x21, #20]
	mov	x0, x20
	bl	_sqlite3VdbeAddOp1
	mov	x0, x20
	bl	_VdbeCoverage
Lloh15:
	adrp	x8, _OP_Column@GOTPAGE
Lloh16:
	ldr	x8, [x8, _OP_Column@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	ldp	w4, w2, [x21, #16]
	mov	x0, x20
	mov	w3, #0
	bl	_sqlite3VdbeAddOp3
	mov	x0, x20
	bl	_sqlite3VdbeCurrentAddr
	sub	x1, x0, #2
	mov	x0, x20
	bl	_sqlite3VdbeJumpHere
	b	LBB0_3
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh18:
	adrp	x8, _OP_AggValue@GOTPAGE
Lloh19:
	ldr	x8, [x8, _OP_AggValue@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	ldr	w2, [x21, #24]
	ldr	w4, [x21, #16]
	mov	x0, x20
	bl	_sqlite3VdbeAddOp3
	ldr	x1, [x21, #32]
	ldr	w2, [x26]
	mov	x0, x20
	bl	_sqlite3VdbeAppendP4
	b	LBB0_3
LBB0_12:
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_FUNC_MINMAX,4,2         ; @SQLITE_FUNC_MINMAX
	.comm	_TK_UNBOUNDED,8,3               ; @TK_UNBOUNDED
	.comm	_OP_Null,4,2                    ; @OP_Null
	.comm	_OP_Last,4,2                    ; @OP_Last
	.comm	_OP_Column,4,2                  ; @OP_Column
	.comm	_OP_AggFinal,4,2                ; @OP_AggFinal
	.comm	_P4_FUNCDEF,4,2                 ; @P4_FUNCDEF
	.comm	_OP_Copy,4,2                    ; @OP_Copy
	.comm	_OP_AggValue,4,2                ; @OP_AggValue
	.no_dead_strip	_windowAggFinal
.subsections_via_symbols
