	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function PLy_spi_execute_fetch_result
_PLy_spi_execute_fetch_result:          ## @PLy_spi_execute_fetch_result
	.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
	movl	%edx, %ebx
	movq	%rsi, %r15
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	_PLy_current_execution_context
	movq	%rax, %r12
	xorl	%eax, %eax
	callq	_PLy_result_new
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movq	24(%rax), %rdi
	callq	_Py_DECREF
	movl	%ebx, %edi
	callq	_PyInt_FromLong
	movq	%rax, 24(%r13)
	testq	%r14, %r14
	jne	LBB0_5
## %bb.3:
	testl	%ebx, %ebx
	jle	LBB0_5
## %bb.4:
	movq	16(%r13), %rdi
	callq	_Py_DECREF
	movq	%r15, %rdi
	callq	_PyLong_FromUnsignedLongLong
	movq	%rax, 16(%r13)
	jmp	LBB0_17
LBB0_1:
	movq	%r14, %rdi
	callq	_SPI_freetuptable
LBB0_16:
	xorl	%r13d, %r13d
LBB0_17:
	movq	%r13, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	testq	%r14, %r14
	je	LBB0_17
## %bb.6:
	testl	%ebx, %ebx
	jle	LBB0_17
## %bb.7:
	movq	16(%r13), %rdi
	callq	_Py_DECREF
	movq	%r15, %rdi
	callq	_PyLong_FromUnsignedLongLong
	movq	%rax, 16(%r13)
	movq	_CurrentMemoryContext@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_ALLOCSET_DEFAULT_SIZES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	callq	_AllocSetContextCreate
	movl	%eax, -44(%rbp)
	movl	-44(%rbp), %esi
	movq	_RECORDOID@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r12), %r8d
	leaq	-48(%rbp), %rdi
	movl	$-1, %ecx
	callq	_PLy_input_setup_func
	movl	(%rbx), %eax
	movl	%eax, -56(%rbp)
	xorl	%eax, %eax
	callq	_PG_TRY
	testq	%r15, %r15
	je	LBB0_14
## %bb.8:
	movq	_PY_SSIZE_T_MAX@GOTPCREL(%rip), %rax
	cmpq	%r15, (%rax)
	jge	LBB0_10
## %bb.9:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_ERRCODE_PROGRAM_LIMIT_EXCEEDED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str.1(%rip), %rdi
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_10:
	movq	(%r13), %rdi
	callq	_Py_DECREF
	movq	%r15, %rdi
	callq	_PyList_New
	movq	%rax, (%r13)
	testq	%rax, %rax
	je	LBB0_14
## %bb.11:
	movl	(%r14), %esi
	movl	(%r12), %edx
	leaq	-48(%rbp), %rdi
	callq	_PLy_input_setup_tuple
	testq	%r15, %r15
	jle	LBB0_14
## %bb.12:
	xorl	%ebx, %ebx
	leaq	-48(%rbp), %r12
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movl	(%rax,%rbx,4), %esi
	movl	(%r14), %edx
	movq	%r12, %rdi
	movl	$1, %ecx
	callq	_PLy_input_from_tuple
	movq	(%r13), %rdi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_PyList_SetItem
	incq	%rbx
	cmpq	%rbx, %r15
	jne	LBB0_13
LBB0_14:
	movq	_TopMemoryContext@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MemoryContextSwitchTo
	movl	%eax, -52(%rbp)
	movl	(%r14), %edi
	callq	_CreateTupleDescCopy
	movl	%eax, 8(%r13)
	movl	-52(%rbp), %edi
	callq	_MemoryContextSwitchTo
	xorl	%eax, %eax
	callq	_PG_CATCH
	movl	-56(%rbp), %edi
	callq	_MemoryContextSwitchTo
	movl	-44(%rbp), %edi
	callq	_MemoryContextDelete
	movq	%r13, %rdi
	callq	_Py_DECREF
	xorl	%eax, %eax
	callq	_PG_RE_THROW
	xorl	%eax, %eax
	callq	_PG_END_TRY
	movl	-44(%rbp), %edi
	callq	_MemoryContextDelete
	movq	%r14, %rdi
	callq	_SPI_freetuptable
	cmpq	$0, (%r13)
	jne	LBB0_17
## %bb.15:
	movq	%r13, %rdi
	callq	_Py_DECREF
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_CurrentMemoryContext,4,2       ## @CurrentMemoryContext
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PL/Python temp context"

	.comm	_ALLOCSET_DEFAULT_SIZES,4,2     ## @ALLOCSET_DEFAULT_SIZES
	.comm	_RECORDOID,4,2                  ## @RECORDOID
	.comm	_PY_SSIZE_T_MAX,8,3             ## @PY_SSIZE_T_MAX
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_PROGRAM_LIMIT_EXCEEDED,4,2 ## @ERRCODE_PROGRAM_LIMIT_EXCEEDED
L_.str.1:                               ## @.str.1
	.asciz	"query result has too many rows to fit in a Python list"

	.comm	_TopMemoryContext,4,2           ## @TopMemoryContext
	.no_dead_strip	_PLy_spi_execute_fetch_result
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function PLy_spi_execute_fetch_result
_PLy_spi_execute_fetch_result:          ; @PLy_spi_execute_fetch_result
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x23, x2
	mov	x21, x1
	mov	x20, x0
	bl	_PLy_current_execution_context
	mov	x22, x0
	bl	_PLy_result_new
	mov	x19, x0
	cbz	x0, LBB0_4
; %bb.1:
	ldr	x0, [x19, #24]
	bl	_Py_DECREF
	mov	x0, x23
	bl	_PyInt_FromLong
	str	x0, [x19, #24]
	cbnz	x20, LBB0_5
; %bb.2:
	cmp	w23, #1
	b.lt	LBB0_5
; %bb.3:
	ldr	x0, [x19, #16]
	bl	_Py_DECREF
	mov	x0, x21
	bl	_PyLong_FromUnsignedLongLong
	str	x0, [x19, #16]
	b	LBB0_16
LBB0_4:
	mov	x0, x20
	bl	_SPI_freetuptable
	b	LBB0_16
LBB0_5:
	cbz	x20, LBB0_16
; %bb.6:
	cmp	w23, #1
	b.lt	LBB0_16
; %bb.7:
	ldr	x0, [x19, #16]
	bl	_Py_DECREF
	mov	x0, x21
	bl	_PyLong_FromUnsignedLongLong
	str	x0, [x19, #16]
Lloh0:
	adrp	x23, _CurrentMemoryContext@GOTPAGE
Lloh1:
	ldr	x23, [x23, _CurrentMemoryContext@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh2:
	adrp	x8, _ALLOCSET_DEFAULT_SIZES@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ALLOCSET_DEFAULT_SIZES@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_AllocSetContextCreate
	str	w0, [sp, #4]
	ldr	w1, [sp, #4]
Lloh7:
	adrp	x8, _RECORDOID@GOTPAGE
Lloh8:
	ldr	x8, [x8, _RECORDOID@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	ldr	w4, [x22]
	add	x0, sp, #8
	mov	w3, #-1
	bl	_PLy_input_setup_func
	ldr	w8, [x23]
	str	w8, [sp, #12]
	bl	_PG_TRY
	cbz	x21, LBB0_14
; %bb.8:
Lloh10:
	adrp	x8, _PY_SSIZE_T_MAX@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PY_SSIZE_T_MAX@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	x8, x21
	b.ge	LBB0_10
; %bb.9:
Lloh13:
	adrp	x8, _ERROR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh15:
	ldr	w23, [x8]
Lloh16:
	adrp	x8, _ERRCODE_PROGRAM_LIMIT_EXCEEDED@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ERRCODE_PROGRAM_LIMIT_EXCEEDED@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	bl	_errcode
Lloh19:
	adrp	x0, l_.str.1@PAGE
Lloh20:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x23
	bl	_ereport
LBB0_10:
	ldr	x0, [x19]
	bl	_Py_DECREF
	mov	x0, x21
	bl	_PyList_New
	str	x0, [x19]
	cbz	x0, LBB0_14
; %bb.11:
	ldr	w1, [x20]
	ldr	w2, [x22]
	add	x0, sp, #8
	bl	_PLy_input_setup_tuple
	cmp	x21, #1
	b.lt	LBB0_14
; %bb.12:
	mov	x22, #0
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	w1, [x8, x22, lsl #2]
	ldr	w2, [x20]
	add	x0, sp, #8
	mov	w3, #1
	bl	_PLy_input_from_tuple
	mov	x2, x0
	ldr	x0, [x19]
	mov	x1, x22
	bl	_PyList_SetItem
	add	x22, x22, #1
	cmp	x21, x22
	b.ne	LBB0_13
LBB0_14:
Lloh21:
	adrp	x8, _TopMemoryContext@GOTPAGE
Lloh22:
	ldr	x8, [x8, _TopMemoryContext@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	bl	_MemoryContextSwitchTo
	str	w0, [sp]
	ldr	w0, [x20]
	bl	_CreateTupleDescCopy
	str	w0, [x19, #8]
	ldr	w0, [sp]
	bl	_MemoryContextSwitchTo
	bl	_PG_CATCH
	ldr	w0, [sp, #12]
	bl	_MemoryContextSwitchTo
	ldr	w0, [sp, #4]
	bl	_MemoryContextDelete
	mov	x0, x19
	bl	_Py_DECREF
	bl	_PG_RE_THROW
	bl	_PG_END_TRY
	ldr	w0, [sp, #4]
	bl	_MemoryContextDelete
	mov	x0, x20
	bl	_SPI_freetuptable
	ldr	x8, [x19]
	cbnz	x8, LBB0_16
; %bb.15:
	mov	x0, x19
	bl	_Py_DECREF
	mov	x19, #0
LBB0_16:
	mov	x0, x19
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_CurrentMemoryContext,4,2       ; @CurrentMemoryContext
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PL/Python temp context"

	.comm	_ALLOCSET_DEFAULT_SIZES,4,2     ; @ALLOCSET_DEFAULT_SIZES
	.comm	_RECORDOID,4,2                  ; @RECORDOID
	.comm	_PY_SSIZE_T_MAX,8,3             ; @PY_SSIZE_T_MAX
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_PROGRAM_LIMIT_EXCEEDED,4,2 ; @ERRCODE_PROGRAM_LIMIT_EXCEEDED
l_.str.1:                               ; @.str.1
	.asciz	"query result has too many rows to fit in a Python list"

	.comm	_TopMemoryContext,4,2           ; @TopMemoryContext
	.no_dead_strip	_PLy_spi_execute_fetch_result
.subsections_via_symbols
