	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tuplestore_gettuple
_tuplestore_gettuple:                   ## @tuplestore_gettuple
	.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	%rdx, %rbx
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	(%rdi), %r12
	movq	48(%rdi), %r13
	movb	$1, %al
	testl	%esi, %esi
	jne	LBB0_2
## %bb.1:
	leaq	(%r12,%r12,2), %rax
	movq	_EXEC_FLAG_BACKWARD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%r13,%rax,8)
	setne	%al
LBB0_2:
	movzbl	%al, %edi
	callq	_Assert
	movl	8(%r14), %eax
	cmpl	$128, %eax
	je	LBB0_17
## %bb.3:
	cmpl	$129, %eax
	je	LBB0_23
## %bb.4:
	cmpl	$130, %eax
	jne	LBB0_39
## %bb.5:
	movl	$0, (%rbx)
	leaq	(%r12,%r12,2), %rax
	leaq	4(,%rax,8), %rdx
	addq	%r13, %rdx
	movl	4(%r13,%rax,8), %ecx
	testl	%r15d, %r15d
	je	LBB0_10
## %bb.6:
	testl	%ecx, %ecx
	jne	LBB0_40
## %bb.7:
	movslq	20(%r13,%rax,8), %rcx
	cmpl	44(%r14), %ecx
	jge	LBB0_9
## %bb.8:
	leaq	20(,%rax,8), %rax
	addq	%r13, %rax
	movq	16(%r14), %rdx
	leal	1(%rcx), %esi
	movl	%esi, (%rax)
	movq	(%rdx,%rcx,8), %rax
	jmp	LBB0_41
LBB0_17:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	leaq	(%r12,%r12,2), %r12
	testl	%r15d, %r15d
	je	LBB0_19
## %bb.18:
	cmpl	$0, 4(%r13,%r12,8)
	jne	LBB0_40
LBB0_19:
	leaq	4(,%r12,8), %rbx
	addq	%r13, %rbx
	movl	24(%r14), %edi
	leaq	36(%r14), %rsi
	leaq	32(%r14), %rdx
	callq	_BufFileTell
	cmpl	$0, (%rbx)
	jne	LBB0_22
## %bb.20:
	movl	24(%r14), %edi
	movl	16(%r13,%r12,8), %esi
	movq	8(%r13,%r12,8), %rdx
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_BufFileSeek
	testl	%eax, %eax
	je	LBB0_22
## %bb.21:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_22:
	movl	$129, 8(%r14)
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_23:
	movl	$1, (%rbx)
	testl	%r15d, %r15d
	je	LBB0_28
## %bb.24:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_getlen
	testl	%eax, %eax
	je	LBB0_27
## %bb.25:
	movq	%r14, %rdi
	movl	%eax, %esi
	jmp	LBB0_26
LBB0_39:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_elog
	jmp	LBB0_40
LBB0_28:
	movl	24(%r14), %edi
	movq	_SEEK_CUR@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	xorl	%esi, %esi
	movq	$-4, %rdx
	callq	_BufFileSeek
	testl	%eax, %eax
	je	LBB0_30
## %bb.29:
	leaq	(%r12,%r12,2), %rax
	movl	$0, 4(%r13,%rax,8)
	jmp	LBB0_13
LBB0_10:
	testl	%ecx, %ecx
	je	LBB0_12
## %bb.11:
	movl	44(%r14), %ecx
	movl	%ecx, 20(%r13,%rax,8)
	movl	$0, (%rdx)
	movl	40(%r14), %edx
	cmpl	%edx, %ecx
	jg	LBB0_16
	jmp	LBB0_13
LBB0_27:
	leaq	(%r12,%r12,2), %rax
	movl	$1, 4(%r13,%rax,8)
	jmp	LBB0_40
LBB0_30:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_getlen
	movl	%eax, %ebx
	leaq	(%r12,%r12,2), %rax
	cmpl	$0, 4(%r13,%rax,8)
	je	LBB0_32
## %bb.31:
	leaq	4(,%rax,8), %rax
	addq	%r13, %rax
	movl	$0, (%rax)
LBB0_36:
	movl	24(%r14), %edi
	movl	%ebx, %edx
	negq	%rdx
	movl	(%r15), %ecx
	xorl	%esi, %esi
	callq	_BufFileSeek
	testl	%eax, %eax
	je	LBB0_38
## %bb.37:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_38:
	movq	%r14, %rdi
	movl	%ebx, %esi
LBB0_26:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_READTUP                        ## TAILCALL
LBB0_12:
	movl	20(%r13,%rax,8), %ecx
	movl	40(%r14), %edx
	cmpl	%edx, %ecx
	jle	LBB0_13
## %bb.14:
	leaq	20(,%rax,8), %rax
	addq	%r13, %rax
	decl	%ecx
	movl	%ecx, (%rax)
	cmpl	%edx, %ecx
	jle	LBB0_13
LBB0_16:
	movq	16(%r14), %rax
	movslq	%ecx, %rcx
	movq	-8(%rax,%rcx,8), %rax
	jmp	LBB0_41
LBB0_9:
	movl	$1, (%rdx)
	jmp	LBB0_40
LBB0_32:
	movl	24(%r14), %edi
	movl	%ebx, %ebx
	movq	$-8, %rdx
	subq	%rbx, %rdx
	movl	(%r15), %ecx
	xorl	%esi, %esi
	callq	_BufFileSeek
	testl	%eax, %eax
	je	LBB0_35
## %bb.33:
	movl	24(%r14), %edi
	movq	$-4, %rdx
	subq	%rbx, %rdx
	movl	(%r15), %ecx
	xorl	%esi, %esi
	callq	_BufFileSeek
	testl	%eax, %eax
	je	LBB0_13
## %bb.34:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_13:
	xorl	%edi, %edi
	cmpl	$0, 28(%r14)
	sete	%dil
	callq	_Assert
LBB0_40:
	xorl	%eax, %eax
LBB0_41:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_35:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_getlen
	movl	%eax, %ebx
	jmp	LBB0_36
	.cfi_endproc
                                        ## -- End function
	.comm	_EXEC_FLAG_BACKWARD,4,2         ## @EXEC_FLAG_BACKWARD
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not seek in tuplestore temporary file: %m"

	.comm	_SEEK_CUR,4,2                   ## @SEEK_CUR
L_.str.1:                               ## @.str.1
	.asciz	"invalid tuplestore state"

	.no_dead_strip	_tuplestore_gettuple
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tuplestore_gettuple
_tuplestore_gettuple:                   ; @tuplestore_gettuple
	.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	x20, x1
	mov	x19, x0
	ldr	x23, [x0, #48]
	ldr	x24, [x0]
	cbz	w1, LBB0_2
; %bb.1:
	mov	w0, #1
	b	LBB0_3
LBB0_2:
	mov	w8, #24
	mul	x8, x24, x8
	ldr	w8, [x23, x8]
Lloh0:
	adrp	x9, _EXEC_FLAG_BACKWARD@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EXEC_FLAG_BACKWARD@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w0, ne
LBB0_3:
	bl	_Assert
	ldr	w8, [x19, #8]
	cmp	w8, #128
	b.eq	LBB0_10
; %bb.4:
	cmp	w8, #129
	b.eq	LBB0_16
; %bb.5:
	cmp	w8, #130
	b.ne	LBB0_19
; %bb.6:
	str	wzr, [x21]
	mov	w8, #24
	madd	x8, x24, x8, x23
	ldr	w9, [x8, #4]!
	cbz	w20, LBB0_22
; %bb.7:
	cbnz	w9, LBB0_39
; %bb.8:
	mov	w9, #24
	madd	x9, x24, x9, x23
	ldrsw	x10, [x9, #20]!
	ldr	w11, [x19, #44]
	cmp	w10, w11
	b.ge	LBB0_34
; %bb.9:
	ldr	x8, [x19, #16]
	add	w11, w10, #1
	str	w11, [x9]
	ldr	x0, [x8, x10, lsl #3]
	b	LBB0_40
LBB0_10:
	mov	w8, #24
	madd	x22, x24, x8, x23
	ldr	w8, [x22, #4]!
	cbz	w20, LBB0_12
; %bb.11:
	cbnz	w8, LBB0_39
LBB0_12:
	ldr	w0, [x19, #24]
	add	x1, x19, #36
	add	x2, x19, #32
	bl	_BufFileTell
	ldr	w8, [x22]
	cbnz	w8, LBB0_15
; %bb.13:
	ldr	w0, [x19, #24]
	mov	w8, #24
	madd	x8, x24, x8, x23
	ldr	w1, [x8, #16]
	ldr	x2, [x8, #8]
Lloh3:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	bl	_BufFileSeek
	cbz	w0, LBB0_15
; %bb.14:
Lloh6:
	adrp	x8, _ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh8:
	ldr	w22, [x8]
	bl	_errcode_for_file_access
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x22
	bl	_ereport
LBB0_15:
	mov	w8, #129
	str	w8, [x19, #8]
LBB0_16:
	mov	w8, #1
	str	w8, [x21]
	cbz	w20, LBB0_20
; %bb.17:
	mov	w20, #1
	mov	x0, x19
	mov	w1, #1
	bl	_getlen
	cbz	w0, LBB0_24
; %bb.18:
	mov	x1, x0
	mov	x0, x19
	b	LBB0_30
LBB0_19:
Lloh11:
	adrp	x8, _ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_elog
	b	LBB0_39
LBB0_20:
	ldr	w0, [x19, #24]
Lloh16:
	adrp	x21, _SEEK_CUR@GOTPAGE
Lloh17:
	ldr	x21, [x21, _SEEK_CUR@GOTPAGEOFF]
	ldr	w3, [x21]
	mov	w1, #0
	mov	x2, #-4
	bl	_BufFileSeek
	cbz	w0, LBB0_25
; %bb.21:
	mov	w8, #24
	madd	x8, x24, x8, x23
	str	wzr, [x8, #4]
	b	LBB0_38
LBB0_22:
	cbz	w9, LBB0_31
; %bb.23:
	mov	w11, #24
	ldp	w10, w9, [x19, #40]
	madd	x11, x24, x11, x23
	str	w9, [x11, #20]
	str	wzr, [x8]
	cmp	w9, w10
	b.gt	LBB0_33
	b	LBB0_38
LBB0_24:
	mov	x0, #0
	mov	w8, #24
	madd	x8, x24, x8, x23
	str	w20, [x8, #4]
	b	LBB0_40
LBB0_25:
	mov	x0, x19
	mov	w1, #0
	bl	_getlen
	mov	x20, x0
	mov	w8, #24
	madd	x8, x24, x8, x23
	ldr	w9, [x8, #4]!
	cbz	w9, LBB0_35
; %bb.26:
	str	wzr, [x8]
LBB0_27:
	mov	x8, #0
	ldr	w0, [x19, #24]
	sub	x2, x8, w20, uxtw
	ldr	w3, [x21]
	mov	w1, #0
	bl	_BufFileSeek
	cbz	w0, LBB0_29
; %bb.28:
Lloh18:
	adrp	x8, _ERROR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w21, [x8]
	bl	_errcode_for_file_access
Lloh21:
	adrp	x0, l_.str@PAGE
Lloh22:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x21
	bl	_ereport
LBB0_29:
	mov	x0, x19
	mov	x1, x20
LBB0_30:
	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
	b	_READTUP
LBB0_31:
	mov	w8, #24
	madd	x8, x24, x8, x23
	ldr	w9, [x8, #20]!
	ldr	w10, [x19, #40]
	cmp	w9, w10
	b.le	LBB0_38
; %bb.32:
	sub	w9, w9, #1
	str	w9, [x8]
	cmp	w9, w10
	b.le	LBB0_38
LBB0_33:
	ldr	x8, [x19, #16]
	sub	w9, w9, #1
	ldr	x0, [x8, w9, sxtw #3]
	b	LBB0_40
LBB0_34:
	mov	x0, #0
	mov	w9, #1
	str	w9, [x8]
	b	LBB0_40
LBB0_35:
	ldr	w0, [x19, #24]
	mov	w20, w20
	mov	x8, #-8
	sub	x2, x8, x20
	ldr	w3, [x21]
	mov	w1, #0
	bl	_BufFileSeek
	cbz	w0, LBB0_41
; %bb.36:
	ldr	w0, [x19, #24]
	mov	x8, #-4
	sub	x2, x8, x20
	ldr	w3, [x21]
	mov	w1, #0
	bl	_BufFileSeek
	cbz	w0, LBB0_38
; %bb.37:
Lloh23:
	adrp	x8, _ERROR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh25:
	ldr	w20, [x8]
	bl	_errcode_for_file_access
Lloh26:
	adrp	x0, l_.str@PAGE
Lloh27:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x20
	bl	_ereport
LBB0_38:
	ldr	w8, [x19, #28]
	cmp	w8, #0
	cset	w0, eq
	bl	_Assert
LBB0_39:
	mov	x0, #0
LBB0_40:
	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_41:
	mov	x0, x19
	mov	w1, #0
	bl	_getlen
	mov	x20, x0
	b	LBB0_27
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_EXEC_FLAG_BACKWARD,4,2         ; @EXEC_FLAG_BACKWARD
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not seek in tuplestore temporary file: %m"

	.comm	_SEEK_CUR,4,2                   ; @SEEK_CUR
l_.str.1:                               ; @.str.1
	.asciz	"invalid tuplestore state"

	.no_dead_strip	_tuplestore_gettuple
.subsections_via_symbols
