	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function update_frameheadpos
_update_frameheadpos:                   ## @update_frameheadpos
	.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
	cmpl	$0, 4(%rdi)
	jne	LBB0_5
## %bb.1:
	movq	%rdi, %r13
	movq	104(%rdi), %r15
	movl	(%rdi), %ebx
	movq	96(%rdi), %rax
	movl	(%rax), %edi
	callq	_MemoryContextSwitchTo
	movl	%eax, %r14d
	movq	_FRAMEOPTION_START_UNBOUNDED_PRECEDING@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_6
## %bb.2:
	movq	$0, 8(%r13)
LBB0_3:
	movl	$1, 4(%r13)
LBB0_4:
	movl	%r14d, %edi
	callq	_MemoryContextSwitchTo
LBB0_5:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_FRAMEOPTION_START_CURRENT_ROW@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_9
## %bb.7:
	movq	_FRAMEOPTION_ROWS@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_14
## %bb.8:
	movq	16(%r13), %rax
	movq	%rax, 8(%r13)
	jmp	LBB0_3
LBB0_9:
	movq	_FRAMEOPTION_START_OFFSET@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_37
## %bb.10:
	movq	_FRAMEOPTION_ROWS@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_21
## %bb.11:
	movl	64(%r13), %edi
	callq	_DatumGetInt64
	movq	_FRAMEOPTION_START_OFFSET_PRECEDING@GOTPCREL(%rip), %rcx
	andl	(%rcx), %ebx
	movq	%rax, %rcx
	negq	%rcx
	testl	%ebx, %ebx
	cmoveq	%rax, %rcx
	movq	16(%r13), %rsi
	addq	%rcx, %rsi
	movq	%rsi, 8(%r13)
	js	LBB0_25
## %bb.12:
	cmpq	$2, %rcx
	jl	LBB0_3
## %bb.13:
	decq	%rsi
	movq	%r13, %rdi
	callq	_spool_tuples
	movq	24(%r13), %rax
	cmpq	%rax, 8(%r13)
	jle	LBB0_3
	jmp	LBB0_26
LBB0_14:
	movq	_FRAMEOPTION_RANGE@GOTPCREL(%rip), %rax
	movq	_FRAMEOPTION_GROUPS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%ebx, %ecx
	je	LBB0_37
## %bb.15:
	cmpl	$0, (%r15)
	je	LBB0_28
## %bb.16:
	movl	56(%r13), %edi
	movl	60(%r13), %esi
	callq	_tuplestore_select_read_pointer
	cmpq	$0, 8(%r13)
	je	LBB0_29
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movl	52(%r13), %edi
	callq	_TupIsNull
	testq	%rax, %rax
	jne	LBB0_3
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movl	52(%r13), %esi
	movl	88(%r13), %edx
	movq	%r13, %rdi
	callq	_are_peers
	testq	%rax, %rax
	jne	LBB0_3
## %bb.19:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	8(%r13), %rsi
	incq	%rsi
	movq	%rsi, 8(%r13)
	movq	%r13, %rdi
	callq	_spool_tuples
	movl	52(%r13), %ecx
	movl	56(%r13), %edi
	movl	$1, %esi
	movl	$1, %edx
	callq	_tuplestore_gettupleslot
	testl	%eax, %eax
	jne	LBB0_17
	jmp	LBB0_3
LBB0_21:
	movq	_FRAMEOPTION_RANGE@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_32
## %bb.22:
	movq	8(%r15), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	xorl	%edi, %edi
	cmpl	$1, (%r15)
	sete	%dil
	callq	_Assert
	movq	_FRAMEOPTION_START_OFFSET_PRECEDING@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	setne	%bl
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	cmpl	$0, 112(%r13)
	sete	%r15b
	movl	56(%r13), %edi
	movl	60(%r13), %esi
	callq	_tuplestore_select_read_pointer
	cmpq	$0, 8(%r13)
	je	LBB0_44
LBB0_23:
	movl	52(%r13), %edi
	callq	_TupIsNull
	testq	%rax, %rax
	jne	LBB0_3
## %bb.47:
	xorb	%r15b, %bl
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movb	%r15b, %al
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movzbl	%bl, %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	leaq	72(%r13), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	leaq	-72(%rbp), %r15
LBB0_48:                                ## =>This Inner Loop Header: Depth=1
	movl	52(%r13), %edi
	movl	-60(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	movq	%r15, %rdx
	callq	_slot_getattr
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movl	88(%r13), %edi
	movl	%ebx, %esi
	leaq	-68(%rbp), %rdx
	callq	_slot_getattr
	movl	%eax, %r12d
	movl	-72(%rbp), %ecx
	movl	-68(%rbp), %eax
	movl	%ecx, %edx
	orl	%eax, %edx
	je	LBB0_52
## %bb.49:                              ##   in Loop: Header=BB0_48 Depth=1
	cmpq	$0, 80(%r13)
	je	LBB0_53
## %bb.50:                              ##   in Loop: Header=BB0_48 Depth=1
	testl	%ecx, %ecx
	je	LBB0_3
## %bb.51:                              ##   in Loop: Header=BB0_48 Depth=1
	testl	%eax, %eax
	je	LBB0_55
	jmp	LBB0_3
LBB0_52:                                ##   in Loop: Header=BB0_48 Depth=1
	movl	64(%r13), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	68(%r13), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	callq	_BoolGetDatum
	movq	%r15, %rbx
	movl	%eax, %r15d
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_BoolGetDatum
	movl	%eax, (%rsp)
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movl	-64(%rbp), %edx                 ## 4-byte Reload
	movl	%r12d, %ecx
	movl	-56(%rbp), %r8d                 ## 4-byte Reload
	movl	%r15d, %r9d
	movq	%rbx, %r15
	callq	_FunctionCall5Coll
	movl	%eax, %edi
	callq	_DatumGetBool
	testq	%rax, %rax
	je	LBB0_55
	jmp	LBB0_3
LBB0_53:                                ##   in Loop: Header=BB0_48 Depth=1
	testl	%ecx, %ecx
	jne	LBB0_3
## %bb.54:                              ##   in Loop: Header=BB0_48 Depth=1
	testl	%eax, %eax
	je	LBB0_3
LBB0_55:                                ##   in Loop: Header=BB0_48 Depth=1
	movq	8(%r13), %rsi
	incq	%rsi
	movq	%rsi, 8(%r13)
	movq	%r13, %rdi
	callq	_spool_tuples
	movl	52(%r13), %ecx
	movl	56(%r13), %edi
	movl	$1, %esi
	movl	$1, %edx
	callq	_tuplestore_gettupleslot
	testl	%eax, %eax
	je	LBB0_3
## %bb.56:                              ##   in Loop: Header=BB0_48 Depth=1
	movl	52(%r13), %edi
	callq	_TupIsNull
	testq	%rax, %rax
	je	LBB0_48
	jmp	LBB0_3
LBB0_25:
	xorl	%eax, %eax
LBB0_26:
	movq	%rax, 8(%r13)
	jmp	LBB0_3
LBB0_28:
	movq	$0, 8(%r13)
	movl	$1, 4(%r13)
	movl	%r14d, %edi
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_MemoryContextSwitchTo          ## TAILCALL
LBB0_29:
	movl	52(%r13), %edi
	callq	_TupIsNull
	testq	%rax, %rax
	je	LBB0_17
## %bb.30:
	movl	52(%r13), %ecx
	movl	56(%r13), %edi
	movl	$1, %esi
	movl	$1, %edx
	callq	_tuplestore_gettupleslot
	testl	%eax, %eax
	jne	LBB0_17
## %bb.31:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_elog
	jmp	LBB0_17
LBB0_32:
	movq	_FRAMEOPTION_GROUPS@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_37
## %bb.33:
	movl	64(%r13), %edi
	callq	_DatumGetInt64
	movq	_FRAMEOPTION_START_OFFSET_PRECEDING@GOTPCREL(%rip), %rcx
	andl	(%rcx), %ebx
	movq	%rax, %r15
	negq	%r15
	testl	%ebx, %ebx
	cmoveq	%rax, %r15
	addq	32(%r13), %r15
	movl	56(%r13), %edi
	movl	60(%r13), %esi
	callq	_tuplestore_select_read_pointer
	cmpq	$0, 8(%r13)
	jne	LBB0_42
## %bb.34:
	movl	52(%r13), %edi
	callq	_TupIsNull
	testq	%rax, %rax
	je	LBB0_42
## %bb.35:
	movl	52(%r13), %ecx
	movl	56(%r13), %edi
	movl	$1, %esi
	movl	$1, %edx
	callq	_tuplestore_gettupleslot
	testl	%eax, %eax
	jne	LBB0_42
## %bb.36:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_elog
	jmp	LBB0_42
LBB0_37:
	xorl	%edi, %edi
	callq	_Assert
	jmp	LBB0_4
LBB0_38:                                ##   in Loop: Header=BB0_42 Depth=1
	cmpq	%r15, 40(%r13)
	jge	LBB0_43
## %bb.39:                              ##   in Loop: Header=BB0_42 Depth=1
	movl	48(%r13), %edi
	movl	52(%r13), %esi
	callq	_ExecCopySlot
	movq	8(%r13), %rsi
	incq	%rsi
	movq	%rsi, 8(%r13)
	movq	%r13, %rdi
	callq	_spool_tuples
	movl	52(%r13), %ecx
	movl	56(%r13), %edi
	movl	$1, %esi
	movl	$1, %edx
	callq	_tuplestore_gettupleslot
	testl	%eax, %eax
	je	LBB0_43
## %bb.40:                              ##   in Loop: Header=BB0_42 Depth=1
	movl	48(%r13), %esi
	movl	52(%r13), %edx
	movq	%r13, %rdi
	callq	_are_peers
	testq	%rax, %rax
	jne	LBB0_42
## %bb.41:                              ##   in Loop: Header=BB0_42 Depth=1
	incq	40(%r13)
LBB0_42:                                ## =>This Inner Loop Header: Depth=1
	movl	52(%r13), %edi
	callq	_TupIsNull
	testq	%rax, %rax
	je	LBB0_38
LBB0_43:
	movl	48(%r13), %edi
	callq	_ExecClearTuple
	jmp	LBB0_3
LBB0_44:
	movl	52(%r13), %edi
	callq	_TupIsNull
	testq	%rax, %rax
	je	LBB0_23
## %bb.45:
	movl	52(%r13), %ecx
	movl	56(%r13), %edi
	movl	$1, %esi
	movl	$1, %edx
	callq	_tuplestore_gettupleslot
	testl	%eax, %eax
	jne	LBB0_23
## %bb.46:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_elog
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_FRAMEOPTION_START_UNBOUNDED_PRECEDING,4,2 ## @FRAMEOPTION_START_UNBOUNDED_PRECEDING
	.comm	_FRAMEOPTION_START_CURRENT_ROW,4,2 ## @FRAMEOPTION_START_CURRENT_ROW
	.comm	_FRAMEOPTION_ROWS,4,2           ## @FRAMEOPTION_ROWS
	.comm	_FRAMEOPTION_RANGE,4,2          ## @FRAMEOPTION_RANGE
	.comm	_FRAMEOPTION_GROUPS,4,2         ## @FRAMEOPTION_GROUPS
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unexpected end of tuplestore"

	.comm	_FRAMEOPTION_START_OFFSET,4,2   ## @FRAMEOPTION_START_OFFSET
	.comm	_FRAMEOPTION_START_OFFSET_PRECEDING,4,2 ## @FRAMEOPTION_START_OFFSET_PRECEDING
	.no_dead_strip	_update_frameheadpos
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function update_frameheadpos
_update_frameheadpos:                   ; @update_frameheadpos
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	w8, [x0, #4]
	cbnz	w8, LBB0_5
; %bb.1:
	mov	x20, x0
	ldr	w22, [x0]
	ldp	x8, x23, [x0, #96]
	ldr	w0, [x8]
	bl	_MemoryContextSwitchTo
	mov	x19, x0
Lloh0:
	adrp	x8, _FRAMEOPTION_START_UNBOUNDED_PRECEDING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FRAMEOPTION_START_UNBOUNDED_PRECEDING@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_6
LBB0_2:
	str	xzr, [x20, #8]
LBB0_3:
	mov	w8, #1
	str	w8, [x20, #4]
LBB0_4:
	mov	x0, x19
	bl	_MemoryContextSwitchTo
LBB0_5:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_6:
Lloh3:
	adrp	x8, _FRAMEOPTION_START_CURRENT_ROW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FRAMEOPTION_START_CURRENT_ROW@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_9
; %bb.7:
Lloh6:
	adrp	x8, _FRAMEOPTION_ROWS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FRAMEOPTION_ROWS@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_15
; %bb.8:
	ldr	x8, [x20, #16]
	str	x8, [x20, #8]
	b	LBB0_3
LBB0_9:
Lloh9:
	adrp	x8, _FRAMEOPTION_START_OFFSET@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FRAMEOPTION_START_OFFSET@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_43
; %bb.10:
Lloh12:
	adrp	x8, _FRAMEOPTION_ROWS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _FRAMEOPTION_ROWS@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_21
; %bb.11:
	ldr	w0, [x20, #64]
	bl	_DatumGetInt64
Lloh15:
	adrp	x8, _FRAMEOPTION_START_OFFSET_PRECEDING@GOTPAGE
Lloh16:
	ldr	x8, [x8, _FRAMEOPTION_START_OFFSET_PRECEDING@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	tst	w8, w22
	cneg	x9, x0, ne
	ldr	x8, [x20, #16]
	adds	x8, x9, x8
	str	x8, [x20, #8]
	b.mi	LBB0_34
; %bb.12:
	cmp	x9, #2
	b.lt	LBB0_3
; %bb.13:
	sub	x1, x8, #1
	mov	x0, x20
	bl	_spool_tuples
	ldr	x9, [x20, #8]
	ldr	x8, [x20, #24]
	cmp	x9, x8
	b.le	LBB0_3
; %bb.14:
	str	x8, [x20, #8]
	b	LBB0_3
LBB0_15:
Lloh18:
	adrp	x8, _FRAMEOPTION_RANGE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _FRAMEOPTION_RANGE@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _FRAMEOPTION_GROUPS@GOTPAGE
Lloh22:
	ldr	x9, [x9, _FRAMEOPTION_GROUPS@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w8, w9, w8
	tst	w8, w22
	b.eq	LBB0_43
; %bb.16:
	ldr	w8, [x23]
	cbz	w8, LBB0_35
; %bb.17:
	ldp	w0, w1, [x20, #56]
	bl	_tuplestore_select_read_pointer
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_36
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20, #52]
	bl	_TupIsNull
	cbnz	x0, LBB0_3
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	w1, [x20, #52]
	ldr	w2, [x20, #88]
	mov	x0, x20
	bl	_are_peers
	cbnz	x0, LBB0_3
; %bb.20:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	x8, [x20, #8]
	add	x1, x8, #1
	str	x1, [x20, #8]
	mov	x0, x20
	bl	_spool_tuples
	ldp	w3, w0, [x20, #52]
	mov	w1, #1
	mov	w2, #1
	bl	_tuplestore_gettupleslot
	cbnz	w0, LBB0_18
	b	LBB0_3
LBB0_21:
Lloh24:
	adrp	x8, _FRAMEOPTION_RANGE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _FRAMEOPTION_RANGE@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_39
; %bb.22:
	ldr	x8, [x23, #8]
	ldr	w21, [x8]
	ldr	w8, [x23]
	cmp	w8, #1
	cset	w0, eq
	bl	_Assert
Lloh27:
	adrp	x8, _FRAMEOPTION_START_OFFSET_PRECEDING@GOTPAGE
Lloh28:
	ldr	x8, [x8, _FRAMEOPTION_START_OFFSET_PRECEDING@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	tst	w8, w22
	cset	w23, ne
	ldr	w8, [x20, #112]
	cmp	w8, #0
	cset	w22, eq
	ldp	w0, w1, [x20, #56]
	bl	_tuplestore_select_read_pointer
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_44
LBB0_23:
	ldr	w0, [x20, #52]
	bl	_TupIsNull
	cbnz	x0, LBB0_3
; %bb.24:
	eor	w8, w23, w22
	str	w8, [sp, #4]                    ; 4-byte Folded Spill
	add	x24, x20, #72
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20, #52]
	add	x2, sp, #12
	mov	x1, x21
	bl	_slot_getattr
	mov	x25, x0
	ldr	w0, [x20, #88]
	add	x2, sp, #8
	mov	x1, x21
	bl	_slot_getattr
	ldp	w8, w9, [sp, #8]
	orr	w10, w9, w8
	cbz	w10, LBB0_29
; %bb.26:                               ;   in Loop: Header=BB0_25 Depth=1
	ldr	x10, [x20, #80]
	cbz	x10, LBB0_30
; %bb.27:                               ;   in Loop: Header=BB0_25 Depth=1
	cbz	w9, LBB0_3
; %bb.28:                               ;   in Loop: Header=BB0_25 Depth=1
	cbz	w8, LBB0_32
	b	LBB0_3
LBB0_29:                                ;   in Loop: Header=BB0_25 Depth=1
	mov	x26, x0
	ldp	w28, w27, [x20, #64]
	ldr	w0, [sp, #4]                    ; 4-byte Folded Reload
	bl	_BoolGetDatum
	mov	x23, x0
	mov	x0, x22
	bl	_BoolGetDatum
	mov	x6, x0
	mov	x0, x24
	mov	x1, x27
	mov	x2, x25
	mov	x3, x26
	mov	x4, x28
	mov	x5, x23
	bl	_FunctionCall5Coll
	bl	_DatumGetBool
	cbz	x0, LBB0_32
	b	LBB0_3
LBB0_30:                                ;   in Loop: Header=BB0_25 Depth=1
	cbnz	w9, LBB0_3
; %bb.31:                               ;   in Loop: Header=BB0_25 Depth=1
	cbz	w8, LBB0_3
LBB0_32:                                ;   in Loop: Header=BB0_25 Depth=1
	ldr	x8, [x20, #8]
	add	x1, x8, #1
	str	x1, [x20, #8]
	mov	x0, x20
	bl	_spool_tuples
	ldp	w3, w0, [x20, #52]
	mov	w1, #1
	mov	w2, #1
	bl	_tuplestore_gettupleslot
	cbz	w0, LBB0_3
; %bb.33:                               ;   in Loop: Header=BB0_25 Depth=1
	ldr	w0, [x20, #52]
	bl	_TupIsNull
	cbz	x0, LBB0_25
	b	LBB0_3
LBB0_34:
	mov	x8, #0
	b	LBB0_2
LBB0_35:
	str	xzr, [x20, #8]
	mov	w8, #1
	str	w8, [x20, #4]
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_MemoryContextSwitchTo
LBB0_36:
	ldr	w0, [x20, #52]
	bl	_TupIsNull
	cbz	x0, LBB0_18
; %bb.37:
	ldp	w3, w0, [x20, #52]
	mov	w1, #1
	mov	w2, #1
	bl	_tuplestore_gettupleslot
	cbnz	w0, LBB0_18
; %bb.38:
Lloh30:
	adrp	x8, _ERROR@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
Lloh33:
	adrp	x1, l_.str@PAGE
Lloh34:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
	b	LBB0_18
LBB0_39:
Lloh35:
	adrp	x8, _FRAMEOPTION_GROUPS@GOTPAGE
Lloh36:
	ldr	x8, [x8, _FRAMEOPTION_GROUPS@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_43
; %bb.40:
	ldr	w0, [x20, #64]
	bl	_DatumGetInt64
Lloh38:
	adrp	x8, _FRAMEOPTION_START_OFFSET_PRECEDING@GOTPAGE
Lloh39:
	ldr	x8, [x8, _FRAMEOPTION_START_OFFSET_PRECEDING@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	ldr	x21, [x20, #32]
	tst	w8, w22
	cneg	x22, x0, ne
	ldp	w0, w1, [x20, #56]
	bl	_tuplestore_select_read_pointer
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_47
LBB0_41:
	ldr	w0, [x20, #52]
	bl	_TupIsNull
	cbz	x0, LBB0_50
LBB0_42:
	ldr	w0, [x20, #48]
	bl	_ExecClearTuple
	b	LBB0_3
LBB0_43:
	mov	w0, #0
	bl	_Assert
	b	LBB0_4
LBB0_44:
	ldr	w0, [x20, #52]
	bl	_TupIsNull
	cbz	x0, LBB0_23
; %bb.45:
	ldp	w3, w0, [x20, #52]
	mov	w1, #1
	mov	w2, #1
	bl	_tuplestore_gettupleslot
	cbnz	w0, LBB0_23
; %bb.46:
Lloh41:
	adrp	x8, _ERROR@GOTPAGE
Lloh42:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh43:
	ldr	w0, [x8]
Lloh44:
	adrp	x1, l_.str@PAGE
Lloh45:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
	b	LBB0_23
LBB0_47:
	ldr	w0, [x20, #52]
	bl	_TupIsNull
	cbz	x0, LBB0_41
; %bb.48:
	ldp	w3, w0, [x20, #52]
	mov	w1, #1
	mov	w2, #1
	bl	_tuplestore_gettupleslot
	cbnz	w0, LBB0_41
; %bb.49:
Lloh46:
	adrp	x8, _ERROR@GOTPAGE
Lloh47:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh48:
	ldr	w0, [x8]
Lloh49:
	adrp	x1, l_.str@PAGE
Lloh50:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
	b	LBB0_41
LBB0_50:
	add	x21, x21, x22
	b	LBB0_52
LBB0_51:                                ;   in Loop: Header=BB0_52 Depth=1
	ldr	w0, [x20, #52]
	bl	_TupIsNull
	cbnz	x0, LBB0_42
LBB0_52:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #40]
	cmp	x8, x21
	b.ge	LBB0_42
; %bb.53:                               ;   in Loop: Header=BB0_52 Depth=1
	ldp	w0, w1, [x20, #48]
	bl	_ExecCopySlot
	ldr	x8, [x20, #8]
	add	x1, x8, #1
	str	x1, [x20, #8]
	mov	x0, x20
	bl	_spool_tuples
	ldp	w3, w0, [x20, #52]
	mov	w1, #1
	mov	w2, #1
	bl	_tuplestore_gettupleslot
	cbz	w0, LBB0_42
; %bb.54:                               ;   in Loop: Header=BB0_52 Depth=1
	ldp	w1, w2, [x20, #48]
	mov	x0, x20
	bl	_are_peers
	cbnz	x0, LBB0_51
; %bb.55:                               ;   in Loop: Header=BB0_52 Depth=1
	ldr	x8, [x20, #40]
	add	x8, x8, #1
	str	x8, [x20, #40]
	b	LBB0_51
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_FRAMEOPTION_START_UNBOUNDED_PRECEDING,4,2 ; @FRAMEOPTION_START_UNBOUNDED_PRECEDING
	.comm	_FRAMEOPTION_START_CURRENT_ROW,4,2 ; @FRAMEOPTION_START_CURRENT_ROW
	.comm	_FRAMEOPTION_ROWS,4,2           ; @FRAMEOPTION_ROWS
	.comm	_FRAMEOPTION_RANGE,4,2          ; @FRAMEOPTION_RANGE
	.comm	_FRAMEOPTION_GROUPS,4,2         ; @FRAMEOPTION_GROUPS
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unexpected end of tuplestore"

	.comm	_FRAMEOPTION_START_OFFSET,4,2   ; @FRAMEOPTION_START_OFFSET
	.comm	_FRAMEOPTION_START_OFFSET_PRECEDING,4,2 ; @FRAMEOPTION_START_OFFSET_PRECEDING
	.no_dead_strip	_update_frameheadpos
.subsections_via_symbols
