	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function PLy_cursor_fetch
_PLy_cursor_fetch:                      ## @PLy_cursor_fetch
	.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	%rsi, %rbx
	movq	%rdi, %r13
	xorl	%eax, %eax
	callq	_PLy_current_execution_context
	movq	%rax, %r15
	leaq	L_.str(%rip), %rsi
	leaq	-52(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_PyArg_ParseTuple
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	cmpq	$0, 8(%r13)
	je	LBB0_5
## %bb.2:
	movq	_PyExc_ValueError@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
LBB0_3:
	callq	_PLy_exception_set
LBB0_4:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	4(%r13), %edi
	callq	_GetPortalByName
	movl	%eax, %r12d
	movl	%eax, %edi
	callq	_PortalIsValid
	testl	%eax, %eax
	je	LBB0_14
## %bb.6:
	xorl	%eax, %eax
	callq	_PLy_result_new
	testq	%rax, %rax
	je	LBB0_4
## %bb.7:
	movq	%rax, %r14
	movq	_CurrentMemoryContext@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	_CurrentResourceOwner@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	movl	-48(%rbp), %edi
	movl	-44(%rbp), %esi
	callq	_PLy_spi_subtransaction_begin
	xorl	%eax, %eax
	callq	_PG_TRY
	movl	-52(%rbp), %edx
	movl	%r12d, %edi
	movl	$1, %esi
	callq	_SPI_cursor_fetch
	movq	16(%r14), %rdi
	callq	_Py_DECREF
	movq	_SPI_OK_FETCH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_PyInt_FromLong
	movq	%rax, 16(%r14)
	movq	8(%r14), %rdi
	callq	_Py_DECREF
	movq	_SPI_processed@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_PyLong_FromUnsignedLongLong
	movq	%rax, 8(%r14)
	movq	(%r12), %rax
	testq	%rax, %rax
	je	LBB0_16
## %bb.8:
	movq	_PY_SSIZE_T_MAX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	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.3(%rip), %rdi
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_10:
	movq	(%r14), %rdi
	callq	_Py_DECREF
	movq	%r12, %rbx
	movq	(%r12), %rdi
	callq	_PyList_New
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_15
## %bb.11:
	movq	_SPI_tuptable@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	movq	%r13, %rdi
	callq	_PLy_input_setup_tuple
	cmpq	$0, (%rbx)
	jle	LBB0_16
## %bb.12:
	movq	%rbx, %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movq	8(%rax), %rcx
	movl	(%rcx,%rbx,4), %esi
	movl	(%rax), %edx
	movq	%r13, %rdi
	movl	$1, %ecx
	callq	_PLy_input_from_tuple
	movq	(%r14), %rdi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_PyList_SetItem
	incq	%rbx
	cmpq	(%r15), %rbx
	jl	LBB0_13
	jmp	LBB0_16
LBB0_14:
	movq	_PyExc_ValueError@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_3
LBB0_15:
	movq	%r14, %rdi
	callq	_Py_DECREF
LBB0_16:
	movq	_SPI_tuptable@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_SPI_freetuptable
	movl	-48(%rbp), %edi
	movl	-44(%rbp), %esi
	callq	_PLy_spi_subtransaction_commit
	xorl	%eax, %eax
	callq	_PG_CATCH
	movl	-48(%rbp), %edi
	movl	-44(%rbp), %esi
	callq	_PLy_spi_subtransaction_abort
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"i:fetch"

	.comm	_PyExc_ValueError,4,2           ## @PyExc_ValueError
L_.str.1:                               ## @.str.1
	.asciz	"fetch from a closed cursor"

L_.str.2:                               ## @.str.2
	.asciz	"iterating a cursor in an aborted subtransaction"

	.comm	_CurrentMemoryContext,4,2       ## @CurrentMemoryContext
	.comm	_CurrentResourceOwner,4,2       ## @CurrentResourceOwner
	.comm	_SPI_OK_FETCH,4,2               ## @SPI_OK_FETCH
	.comm	_SPI_processed,8,3              ## @SPI_processed
	.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.3:                               ## @.str.3
	.asciz	"query result has too many rows to fit in a Python list"

	.comm	_SPI_tuptable,8,3               ## @SPI_tuptable
	.no_dead_strip	_PLy_cursor_fetch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function PLy_cursor_fetch
_PLy_cursor_fetch:                      ; @PLy_cursor_fetch
	.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	x20, x1
	mov	x19, x0
	bl	_PLy_current_execution_context
	mov	x21, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #12
	mov	x0, x20
	bl	_PyArg_ParseTuple
	cbz	w0, LBB0_4
; %bb.1:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_5
; %bb.2:
Lloh2:
	adrp	x8, _PyExc_ValueError@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PyExc_ValueError@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_3:
	bl	_PLy_exception_set
LBB0_4:
	mov	x0, #0
	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
LBB0_5:
	ldr	w0, [x19, #4]
	bl	_GetPortalByName
	mov	x22, x0
	bl	_PortalIsValid
	cbz	w0, LBB0_14
; %bb.6:
	bl	_PLy_result_new
	cbz	x0, LBB0_4
; %bb.7:
	mov	x20, x0
Lloh7:
	adrp	x8, _CurrentMemoryContext@GOTPAGE
Lloh8:
	ldr	x8, [x8, _CurrentMemoryContext@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [sp, #8]
Lloh10:
	adrp	x8, _CurrentResourceOwner@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CurrentResourceOwner@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	str	w8, [sp, #4]
	ldr	w0, [sp, #8]
	ldr	w1, [sp, #4]
	bl	_PLy_spi_subtransaction_begin
	bl	_PG_TRY
	ldr	w2, [sp, #12]
	mov	x0, x22
	mov	w1, #1
	bl	_SPI_cursor_fetch
	ldr	x0, [x20, #16]
	bl	_Py_DECREF
Lloh13:
	adrp	x8, _SPI_OK_FETCH@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SPI_OK_FETCH@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_PyInt_FromLong
	str	x0, [x20, #16]
	ldr	x0, [x20, #8]
	bl	_Py_DECREF
Lloh16:
	adrp	x23, _SPI_processed@GOTPAGE
Lloh17:
	ldr	x23, [x23, _SPI_processed@GOTPAGEOFF]
	ldr	x0, [x23]
	bl	_PyLong_FromUnsignedLongLong
	str	x0, [x20, #8]
	ldr	x8, [x23]
Lloh18:
	adrp	x24, _SPI_tuptable@GOTPAGE
Lloh19:
	ldr	x24, [x24, _SPI_tuptable@GOTPAGEOFF]
	cbz	x8, LBB0_16
; %bb.8:
Lloh20:
	adrp	x9, _PY_SSIZE_T_MAX@GOTPAGE
Lloh21:
	ldr	x9, [x9, _PY_SSIZE_T_MAX@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_10
; %bb.9:
Lloh23:
	adrp	x8, _ERROR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh25:
	ldr	w22, [x8]
Lloh26:
	adrp	x8, _ERRCODE_PROGRAM_LIMIT_EXCEEDED@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ERRCODE_PROGRAM_LIMIT_EXCEEDED@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	bl	_errcode
Lloh29:
	adrp	x0, l_.str.3@PAGE
Lloh30:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x22
	bl	_ereport
LBB0_10:
	ldr	x0, [x20]
	bl	_Py_DECREF
	ldr	x0, [x23]
	bl	_PyList_New
	str	x0, [x20]
	cbz	x0, LBB0_15
; %bb.11:
	ldr	x8, [x24]
	ldr	w1, [x8]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_PLy_input_setup_tuple
	ldr	x8, [x23]
	cmp	x8, #1
	b.lt	LBB0_16
; %bb.12:
	mov	x21, #0
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	ldr	x9, [x8, #8]
	ldr	w1, [x9, x21, lsl #2]
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #1
	bl	_PLy_input_from_tuple
	mov	x2, x0
	ldr	x0, [x20]
	mov	x1, x21
	bl	_PyList_SetItem
	add	x21, x21, #1
	ldr	x8, [x23]
	cmp	x21, x8
	b.lt	LBB0_13
	b	LBB0_16
LBB0_14:
Lloh31:
	adrp	x8, _PyExc_ValueError@GOTPAGE
Lloh32:
	ldr	x8, [x8, _PyExc_ValueError@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
Lloh34:
	adrp	x1, l_.str.2@PAGE
Lloh35:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_3
LBB0_15:
	mov	x0, x20
	bl	_Py_DECREF
LBB0_16:
	ldr	x0, [x24]
	bl	_SPI_freetuptable
	ldr	w0, [sp, #8]
	ldr	w1, [sp, #4]
	bl	_PLy_spi_subtransaction_commit
	bl	_PG_CATCH
	ldr	w0, [sp, #8]
	ldr	w1, [sp, #4]
	bl	_PLy_spi_subtransaction_abort
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i:fetch"

	.comm	_PyExc_ValueError,4,2           ; @PyExc_ValueError
l_.str.1:                               ; @.str.1
	.asciz	"fetch from a closed cursor"

l_.str.2:                               ; @.str.2
	.asciz	"iterating a cursor in an aborted subtransaction"

	.comm	_CurrentMemoryContext,4,2       ; @CurrentMemoryContext
	.comm	_CurrentResourceOwner,4,2       ; @CurrentResourceOwner
	.comm	_SPI_OK_FETCH,4,2               ; @SPI_OK_FETCH
	.comm	_SPI_processed,8,3              ; @SPI_processed
	.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.3:                               ; @.str.3
	.asciz	"query result has too many rows to fit in a Python list"

	.comm	_SPI_tuptable,8,3               ; @SPI_tuptable
	.no_dead_strip	_PLy_cursor_fetch
.subsections_via_symbols
