	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function finalize_windowaggregate
_finalize_windowaggregate:              ## @finalize_windowaggregate
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movq	%rcx, %rbx
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	8(%rdi), %rax
	movl	(%rax), %edi
	callq	_MemoryContextSwitchTo
	movl	%eax, %r14d
	movl	40(%r12), %edi
	callq	_OidIsValid
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	_fcinfo@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	movq	_FUNC_MAX_ARGS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LOCAL_FCINFO
	movl	(%r12), %r14d
	movq	_fcinfodata@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	36(%r12), %rsi
	movl	(%r15), %ecx
	movq	%rbx, %r15
	movl	%r14d, %edx
	movq	%r13, %r8
	xorl	%r9d, %r9d
	callq	_InitFunctionCallInfoData
	movq	16(%r12), %rdi
	movl	4(%r12), %esi
	movl	32(%r12), %edx
	callq	_MakeExpandedObjectReadOnly
	movq	(%rbx), %r8
	movq	16(%r8), %rdx
	movq	%rax, 8(%rdx)
	movl	4(%r12), %eax
	movl	%eax, (%rdx)
	cmpl	$2, %r14d
	jl	LBB0_7
## %bb.2:
	movq	%r14, %r9
	decq	%r9
	movl	$1, %esi
	cmpl	$2, %r14d
	je	LBB0_5
## %bb.3:
	leaq	40(%rdx), %rdi
	movq	%r9, %rax
	andq	$-2, %rax
	negq	%rax
	movl	$1, %esi
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	$0, -16(%rdi)
	movl	$1, -24(%rdi)
	movq	$0, (%rdi)
	movl	$1, -8(%rdi)
	addq	$32, %rdi
	leaq	(%rax,%rsi), %rcx
	addq	$2, %rcx
	addq	$2, %rsi
	cmpq	$1, %rcx
	jne	LBB0_4
LBB0_5:
	movl	$1, %eax
	testb	$1, %r9b
	je	LBB0_7
## %bb.6:
	shlq	$4, %rsi
	movq	$0, 8(%rdx,%rsi)
	movl	$1, (%rdx,%rsi)
LBB0_7:
	movq	8(%r8), %rcx
	cmpq	$0, (%rcx)
	je	LBB0_9
## %bb.8:
	testl	%eax, %eax
	je	LBB0_9
## %bb.15:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	$0, (%rax)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	jmp	LBB0_14
LBB0_10:
	movq	16(%r12), %rdi
	movq	%rdi, (%rbx)
	leaq	4(%r12), %rax
	jmp	LBB0_11
LBB0_9:
	movq	24(%r12), %rax
	movq	%rax, (%r13)
	movq	(%r15), %rdi
	callq	_FunctionCallInvoke
	movq	%rax, %rdi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rax, (%rbx)
	movq	$0, (%r13)
	movq	(%r15), %rax
	movl	-44(%rbp), %r14d                ## 4-byte Reload
LBB0_11:
	movl	(%rax), %eax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	orl	12(%r12), %eax
	jne	LBB0_14
## %bb.12:
	movq	_CurrentMemoryContext@GOTPCREL(%rip), %rax
	movl	%r14d, %r15d
	movl	(%rax), %r14d
	callq	_DatumGetPointer
	movl	%r14d, %edi
	movl	%r15d, %r14d
	movl	%eax, %esi
	callq	_MemoryContextContains
	testl	%eax, %eax
	jne	LBB0_14
## %bb.13:
	movq	(%rbx), %rdi
	movl	8(%r12), %edx
	movl	12(%r12), %esi
	callq	_datumCopy
	movq	%rax, (%rbx)
LBB0_14:
	movl	%r14d, %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_MemoryContextSwitchTo          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_fcinfo,8,3                     ## @fcinfo
	.comm	_FUNC_MAX_ARGS,4,2              ## @FUNC_MAX_ARGS
	.comm	_fcinfodata,4,2                 ## @fcinfodata
	.comm	_CurrentMemoryContext,4,2       ## @CurrentMemoryContext
	.no_dead_strip	_finalize_windowaggregate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function finalize_windowaggregate
_finalize_windowaggregate:              ; @finalize_windowaggregate
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x22, x4
	mov	x19, x3
	mov	x21, x2
	mov	x25, x1
	mov	x23, x0
	ldr	x8, [x0, #8]
	ldr	w0, [x8]
	bl	_MemoryContextSwitchTo
	mov	x20, x0
	ldr	w0, [x21, #40]
	bl	_OidIsValid
	cbz	x0, LBB0_4
; %bb.1:
Lloh0:
	adrp	x26, _fcinfo@GOTPAGE
Lloh1:
	ldr	x26, [x26, _fcinfo@GOTPAGEOFF]
	ldr	x0, [x26]
Lloh2:
	adrp	x8, _FUNC_MAX_ARGS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FUNC_MAX_ARGS@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_LOCAL_FCINFO
	ldr	w24, [x21]
Lloh5:
	adrp	x8, _fcinfodata@GOTPAGE
Lloh6:
	ldr	x8, [x8, _fcinfodata@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	add	x1, x21, #36
	ldr	w3, [x25]
	mov	x2, x24
	mov	x4, x23
	mov	x5, #0
	bl	_InitFunctionCallInfoData
	ldr	x0, [x21, #16]
	ldr	w1, [x21, #4]
	ldr	w2, [x21, #32]
	bl	_MakeExpandedObjectReadOnly
	ldr	x8, [x26]
	ldr	x9, [x8, #16]
	str	x0, [x9, #8]
	ldr	w10, [x21, #4]
	str	w10, [x9]
	cmp	w24, #2
	b.lt	LBB0_11
; %bb.2:
	sub	x11, x24, #1
	mov	w12, #1
	cmp	x11, #4
	b.hs	LBB0_5
; %bb.3:
	mov	w10, #1
	b	LBB0_9
LBB0_4:
	ldr	x0, [x21, #16]
	str	x0, [x19]
	add	x8, x21, #4
	b	LBB0_13
LBB0_5:
	and	x13, x11, #0xfffffffffffffffc
	orr	x10, x13, #0x1
	add	x14, x9, #40
	mov	x15, x13
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	stur	xzr, [x14, #-16]
	str	xzr, [x14]
	str	xzr, [x14, #16]
	str	xzr, [x14, #32]
	stur	w12, [x14, #-24]
	stur	w12, [x14, #-8]
	str	w12, [x14, #8]
	str	w12, [x14, #24]
	add	x14, x14, #64
	subs	x15, x15, #4
	b.ne	LBB0_6
; %bb.7:
	cmp	x11, x13
	b.ne	LBB0_9
; %bb.8:
	mov	w10, #1
	b	LBB0_11
LBB0_9:
	add	x9, x9, x10, lsl #4
	add	x9, x9, #8
	sub	x11, x24, x10
	mov	w10, #1
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	str	xzr, [x9]
	stur	w10, [x9, #-8]
	add	x9, x9, #16
	subs	x11, x11, #1
	b.ne	LBB0_10
LBB0_11:
	ldr	x8, [x8, #8]
	ldr	x8, [x8]
	cmp	x8, #0
	ccmp	w10, #0, #4, ne
	b.ne	LBB0_16
; %bb.12:
	ldr	x8, [x21, #24]
	str	x8, [x23]
	ldr	x0, [x26]
	bl	_FunctionCallInvoke
	str	x0, [x19]
	str	xzr, [x23]
	ldr	x8, [x26]
LBB0_13:
	ldr	w8, [x8]
	str	w8, [x22]
	ldr	w9, [x21, #12]
	orr	w8, w9, w8
	cbnz	w8, LBB0_17
; %bb.14:
Lloh8:
	adrp	x8, _CurrentMemoryContext@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CurrentMemoryContext@GOTPAGEOFF]
Lloh10:
	ldr	w22, [x8]
	bl	_DatumGetPointer
	mov	x1, x0
	mov	x0, x22
	bl	_MemoryContextContains
	cbnz	w0, LBB0_17
; %bb.15:
	ldr	x0, [x19]
	ldp	w2, w1, [x21, #8]
	bl	_datumCopy
	str	x0, [x19]
	b	LBB0_17
LBB0_16:
	str	xzr, [x19]
	mov	w8, #1
	str	w8, [x22]
LBB0_17:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_MemoryContextSwitchTo
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_fcinfo,8,3                     ; @fcinfo
	.comm	_FUNC_MAX_ARGS,4,2              ; @FUNC_MAX_ARGS
	.comm	_fcinfodata,4,2                 ; @fcinfodata
	.comm	_CurrentMemoryContext,4,2       ; @CurrentMemoryContext
	.no_dead_strip	_finalize_windowaggregate
.subsections_via_symbols
