	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pltcl_returnnext
_pltcl_returnnext:                      ## @pltcl_returnnext
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r13
	movq	%rsi, %r12
	movq	_pltcl_current_call_state@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	16(%rbx), %r14
	movq	_CurrentMemoryContext@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_CurrentResourceOwner@GOTPCREL(%rip), %rax
	cmpq	$0, 24(%rbx)
	movl	(%rax), %r15d
	movq	_TCL_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)
	je	LBB0_1
## %bb.3:
	cmpl	$0, 16(%r14)
	je	LBB0_4
## %bb.5:
	cmpl	$2, %edx
	jne	LBB0_6
## %bb.7:
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	xorl	%edi, %edi
	callq	_BeginInternalSubTransaction
	xorl	%eax, %eax
	callq	_PG_TRY
	cmpq	$0, 8(%rbx)
	je	LBB0_8
## %bb.9:
	cmpq	$0, 8(%r14)
	je	LBB0_13
LBB0_10:
	movq	8(%r13), %rsi
	leaq	-48(%rbp), %rdx
	leaq	-56(%rbp), %rcx
	movq	%r12, %rdi
	callq	_Tcl_ListObjGetElements
	movq	_TCL_ERROR@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_12
## %bb.11:
	movl	%eax, -60(%rbp)
	jmp	LBB0_16
LBB0_1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	movl	$-1, %esi
	callq	_Tcl_NewStringObj
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_Tcl_SetObjResult
	jmp	LBB0_17
LBB0_6:
	leaq	L_.str.2(%rip), %rcx
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	callq	_Tcl_WrongNumArgs
	jmp	LBB0_17
LBB0_8:
	movq	%rbx, %rdi
	callq	_pltcl_init_tuple_store
	cmpq	$0, 8(%r14)
	jne	LBB0_10
LBB0_13:
	movl	$0, -48(%rbp)
	movq	(%rbx), %rax
	cmpl	$1, (%rax)
	je	LBB0_15
## %bb.14:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_elog
LBB0_15:
	leaq	4(%r14), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	8(%r13), %rdi
	callq	_Tcl_GetString
	movq	%rax, %rdi
	callq	_utf_u2e
	movl	(%r14), %edx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	movl	$-1, %ecx
	callq	_InputFunctionCall
	movl	%eax, -56(%rbp)
	movq	(%rbx), %rsi
	movq	8(%rbx), %rdi
	leaq	-56(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	callq	_tuplestore_putvalues
	jmp	LBB0_16
LBB0_12:
	movq	-56(%rbp), %rsi
	movl	-48(%rbp), %edx
	movq	%r12, %rdi
	movq	%rbx, %rcx
	callq	_pltcl_build_tuple_result
	movq	8(%rbx), %rdi
	movl	%eax, %esi
	callq	_tuplestore_puttuple
LBB0_16:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	movl	%r15d, %esi
	callq	_pltcl_subtrans_commit
	xorl	%eax, %eax
	callq	_PG_CATCH
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	callq	_pltcl_subtrans_abort
LBB0_17:
	movq	_TCL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pltcl_current_call_state,8,3   ## @pltcl_current_call_state
	.comm	_CurrentMemoryContext,4,2       ## @CurrentMemoryContext
	.comm	_CurrentResourceOwner,4,2       ## @CurrentResourceOwner
	.comm	_TCL_OK,4,2                     ## @TCL_OK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"return_next cannot be used in triggers"

	.comm	_TCL_ERROR,4,2                  ## @TCL_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"return_next cannot be used in non-set-returning functions"

L_.str.2:                               ## @.str.2
	.asciz	"result"

	.comm	_ERROR,4,2                      ## @ERROR
L_.str.3:                               ## @.str.3
	.asciz	"wrong result type supplied in return_next"

	.no_dead_strip	_pltcl_returnnext
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pltcl_returnnext
_pltcl_returnnext:                      ; @pltcl_returnnext
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x19, x1
Lloh0:
	adrp	x8, _pltcl_current_call_state@GOTPAGE
Lloh1:
	ldr	x8, [x8, _pltcl_current_call_state@GOTPAGEOFF]
Lloh2:
	ldr	x22, [x8]
	ldp	x23, x8, [x22, #16]
Lloh3:
	adrp	x9, _CurrentMemoryContext@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CurrentMemoryContext@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x9]
Lloh6:
	adrp	x9, _CurrentResourceOwner@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CurrentResourceOwner@GOTPAGEOFF]
Lloh8:
	ldr	w21, [x9]
Lloh9:
	adrp	x9, _TCL_OK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _TCL_OK@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	str	w9, [sp, #28]
Lloh12:
	adrp	x25, _TCL_ERROR@GOTPAGE
Lloh13:
	ldr	x25, [x25, _TCL_ERROR@GOTPAGEOFF]
	cbz	x8, LBB0_7
; %bb.1:
	ldr	w8, [x23, #16]
	cbz	w8, LBB0_8
; %bb.2:
	mov	x24, x3
	cmp	w2, #2
	b.ne	LBB0_10
; %bb.3:
	mov	x0, #0
	bl	_BeginInternalSubTransaction
	bl	_PG_TRY
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_11
; %bb.4:
	ldr	x8, [x23, #8]
	cbz	x8, LBB0_12
LBB0_5:
	ldr	x1, [x24, #8]
	add	x2, sp, #12
	add	x3, sp, #16
	mov	x0, x19
	bl	_Tcl_ListObjGetElements
	ldr	w8, [x25]
	cmp	w0, w8
	b.ne	LBB0_15
; %bb.6:
	str	w0, [sp, #28]
	b	LBB0_16
LBB0_7:
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_9:
	mov	w1, #-1
	bl	_Tcl_NewStringObj
	mov	x1, x0
	mov	x0, x19
	bl	_Tcl_SetObjResult
	b	LBB0_17
LBB0_10:
Lloh18:
	adrp	x3, l_.str.2@PAGE
Lloh19:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	w1, #1
	mov	x2, x24
	bl	_Tcl_WrongNumArgs
	b	LBB0_17
LBB0_11:
	mov	x0, x22
	bl	_pltcl_init_tuple_store
	ldr	x8, [x23, #8]
	cbnz	x8, LBB0_5
LBB0_12:
	str	wzr, [sp, #12]
	ldr	x8, [x22]
	ldr	w8, [x8]
	cmp	w8, #1
	b.eq	LBB0_14
; %bb.13:
Lloh20:
	adrp	x8, _ERROR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
Lloh23:
	adrp	x1, l_.str.3@PAGE
Lloh24:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_elog
LBB0_14:
	ldr	x0, [x24, #8]
	bl	_Tcl_GetString
	bl	_utf_u2e
	mov	x1, x0
	ldr	w2, [x23], #4
	mov	x0, x23
	mov	w3, #-1
	bl	_InputFunctionCall
	str	w0, [sp, #16]
	ldp	x1, x0, [x22]
	add	x2, sp, #16
	add	x3, sp, #12
	bl	_tuplestore_putvalues
	b	LBB0_16
LBB0_15:
	ldr	x1, [sp, #16]
	ldr	w2, [sp, #12]
	mov	x0, x19
	mov	x3, x22
	bl	_pltcl_build_tuple_result
	mov	x1, x0
	ldr	x0, [x22, #8]
	bl	_tuplestore_puttuple
LBB0_16:
	mov	x0, x20
	mov	x1, x21
	bl	_pltcl_subtrans_commit
	bl	_PG_CATCH
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_pltcl_subtrans_abort
LBB0_17:
	ldr	w0, [x25]
	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
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_pltcl_current_call_state,8,3   ; @pltcl_current_call_state
	.comm	_CurrentMemoryContext,4,2       ; @CurrentMemoryContext
	.comm	_CurrentResourceOwner,4,2       ; @CurrentResourceOwner
	.comm	_TCL_OK,4,2                     ; @TCL_OK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"return_next cannot be used in triggers"

	.comm	_TCL_ERROR,4,2                  ; @TCL_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"return_next cannot be used in non-set-returning functions"

l_.str.2:                               ; @.str.2
	.asciz	"result"

	.comm	_ERROR,4,2                      ; @ERROR
l_.str.3:                               ; @.str.3
	.asciz	"wrong result type supplied in return_next"

	.no_dead_strip	_pltcl_returnnext
.subsections_via_symbols
