	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function window_gettupleslot
_window_gettupleslot:                   ## @window_gettupleslot
	.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
	movl	%esi, %r13d
	movq	%rdi, %r14
	movq	16(%rdi), %r15
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_CHECK_FOR_INTERRUPTS
	testl	%r13d, %r13d
	js	LBB0_20
## %bb.1:
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_spool_tuples
	cmpl	%r13d, (%r15)
	jle	LBB0_20
## %bb.2:
	cmpl	%r13d, (%r14)
	jle	LBB0_4
## %bb.3:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_elog
LBB0_4:
	movq	8(%r15), %rax
	movl	(%rax), %edi
	callq	_MemoryContextSwitchTo
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	4(%r15), %edi
	movl	8(%r14), %esi
	callq	_tuplestore_select_read_pointer
	movl	4(%r14), %eax
	leal	-1(%r13), %ebx
	movl	%ebx, %esi
	subl	%eax, %esi
	jle	LBB0_9
## %bb.5:
	movl	4(%r15), %edi
	movl	$1, %edx
	callq	_tuplestore_skiptuples
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_elog
LBB0_7:
	movl	%ebx, 4(%r14)
LBB0_8:
	movl	4(%r15), %edi
	movl	$1, %ebx
	movl	$1, %esi
	movl	$1, %edx
	movq	%r12, %rcx
	callq	_tuplestore_gettupleslot
	jmp	LBB0_17
LBB0_9:
	leal	1(%r13), %ebx
	movl	%eax, %esi
	subl	%ebx, %esi
	jle	LBB0_13
## %bb.10:
	movl	4(%r15), %edi
	xorl	%edx, %edx
	callq	_tuplestore_skiptuples
	testl	%eax, %eax
	jne	LBB0_12
## %bb.11:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_elog
LBB0_12:
	movl	%ebx, 4(%r14)
	jmp	LBB0_16
LBB0_13:
	cmpl	%r13d, %eax
	jne	LBB0_15
## %bb.14:
	movl	4(%r15), %edi
	movl	$1, %esi
	callq	_tuplestore_advance
	movl	4(%r14), %eax
	incl	%eax
	movl	%eax, 4(%r14)
LBB0_15:
	cmpl	%r13d, %eax
	jle	LBB0_8
LBB0_16:
	movl	4(%r15), %edi
	xorl	%esi, %esi
	movl	$1, %edx
	movq	%r12, %rcx
	callq	_tuplestore_gettupleslot
	movl	$-1, %ebx
LBB0_17:
	testl	%eax, %eax
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	jne	LBB0_19
## %bb.18:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_elog
LBB0_19:
	addl	4(%r14), %ebx
	movl	%ebx, 4(%r14)
	xorl	%edi, %edi
	cmpl	%r13d, %ebx
	sete	%dil
	callq	_Assert
	movl	%r15d, %edi
	callq	_MemoryContextSwitchTo
	movl	$1, %ebx
LBB0_20:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot fetch row before WindowObject's mark position"

L_.str.1:                               ## @.str.1
	.asciz	"unexpected end of tuplestore"

	.no_dead_strip	_window_gettupleslot
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function window_gettupleslot
_window_gettupleslot:                   ; @window_gettupleslot
	.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	x22, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x23, [x0, #16]
	bl	_CHECK_FOR_INTERRUPTS
	tbnz	w19, #31, LBB0_11
; %bb.1:
	mov	x0, x23
	mov	x1, x19
	bl	_spool_tuples
	ldr	w8, [x23]
	cmp	w8, w19
	b.le	LBB0_11
; %bb.2:
	ldr	w8, [x20]
	cmp	w8, w19
	b.le	LBB0_4
; %bb.3:
Lloh0:
	adrp	x8, _ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
LBB0_4:
	ldr	x8, [x23, #8]
	ldr	w0, [x8]
	bl	_MemoryContextSwitchTo
	mov	x21, x0
	ldr	w0, [x23, #4]
	ldr	w1, [x20, #8]
	bl	_tuplestore_select_read_pointer
	ldr	w8, [x20, #4]
	sub	w24, w19, #1
	subs	w1, w24, w8
	b.le	LBB0_13
; %bb.5:
	ldr	w0, [x23, #4]
	mov	w2, #1
	bl	_tuplestore_skiptuples
	cbnz	w0, LBB0_7
; %bb.6:
Lloh5:
	adrp	x8, _ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_elog
LBB0_7:
	str	w24, [x20, #4]
LBB0_8:
	ldr	w0, [x23, #4]
	mov	w23, #1
	mov	w1, #1
	mov	w2, #1
	mov	x3, x22
	bl	_tuplestore_gettupleslot
	cbnz	w0, LBB0_10
LBB0_9:
Lloh10:
	adrp	x8, _ERROR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_elog
LBB0_10:
	ldr	w8, [x20, #4]
	add	w8, w8, w23
	cmp	w8, w19
	str	w8, [x20, #4]
	cset	w0, eq
	bl	_Assert
	mov	x0, x21
	bl	_MemoryContextSwitchTo
	mov	w0, #1
	b	LBB0_12
LBB0_11:
	mov	w0, #0
LBB0_12:
	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_13:
	add	w24, w19, #1
	subs	w1, w8, w24
	b.le	LBB0_17
; %bb.14:
	ldr	w0, [x23, #4]
	mov	w2, #0
	bl	_tuplestore_skiptuples
	cbnz	w0, LBB0_16
; %bb.15:
Lloh15:
	adrp	x8, _ERROR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_elog
LBB0_16:
	str	w24, [x20, #4]
	b	LBB0_20
LBB0_17:
	cmp	w8, w19
	b.ne	LBB0_19
; %bb.18:
	ldr	w0, [x23, #4]
	mov	w1, #1
	bl	_tuplestore_advance
	ldr	w8, [x20, #4]
	add	w8, w8, #1
	str	w8, [x20, #4]
LBB0_19:
	cmp	w8, w19
	b.le	LBB0_8
LBB0_20:
	ldr	w0, [x23, #4]
	mov	w1, #0
	mov	w2, #1
	mov	x3, x22
	bl	_tuplestore_gettupleslot
	mov	w23, #-1
	cbnz	w0, LBB0_10
	b	LBB0_9
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot fetch row before WindowObject's mark position"

l_.str.1:                               ; @.str.1
	.asciz	"unexpected end of tuplestore"

	.no_dead_strip	_window_gettupleslot
.subsections_via_symbols
