	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pltcl_SPI_prepare
_pltcl_SPI_prepare:                     ## @pltcl_SPI_prepare
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rsi, %rbx
	movq	$0, -64(%rbp)
	movq	_CurrentMemoryContext@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)
	cmpl	$3, %edx
	jne	LBB0_1
## %bb.2:
	movq	_CurrentResourceOwner@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	16(%r15), %rsi
	leaq	-44(%rbp), %rdx
	leaq	-120(%rbp), %rcx
	movq	%rbx, %rdi
	callq	_Tcl_ListObjGetElements
	movq	_TCL_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.3:
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movq	_TopMemoryContext@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ALLOCSET_SMALL_SIZES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	callq	_AllocSetContextCreate
	movq	%rax, -64(%rbp)
	movq	-64(%rbp), %rdi
	callq	_MemoryContextSwitchTo
	movl	$48, %edi
	callq	_palloc0
	movq	%rax, %rbx
	movl	24(%rax), %edi
	leaq	L_.str.2(%rip), %rdx
	movl	$4, %esi
	movq	%rax, %rcx
	callq	_snprintf
	movl	-44(%rbp), %eax
	movl	%eax, (%rbx)
	movl	-44(%rbp), %edi
	shll	$3, %edi
	callq	_palloc
	movq	%rax, 8(%rbx)
	movl	-44(%rbp), %edi
	shll	$2, %edi
	callq	_palloc
	movq	%rax, 40(%rbx)
	movl	-44(%rbp), %edi
	shll	$3, %edi
	callq	_palloc
	movq	%rax, 16(%rbx)
	movq	-56(%rbp), %rdi
	callq	_MemoryContextSwitchTo
	movq	-56(%rbp), %rdi
	movl	%r14d, -68(%rbp)                ## 4-byte Spill
	movl	%r14d, %esi
	callq	_pltcl_subtrans_begin
	xorl	%eax, %eax
	callq	_PG_TRY
	cmpl	$0, -44(%rbp)
	jle	LBB0_6
## %bb.4:
	xorl	%r13d, %r13d
	leaq	-112(%rbp), %r15
	leaq	-104(%rbp), %r12
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	-120(%rbp), %rax
	movq	(%rax,%r13,2), %rdi
	callq	_Tcl_GetString
	movl	%eax, %edi
	leaq	-80(%rbp), %rsi
	leaq	-124(%rbp), %rdx
	xorl	%ecx, %ecx
	callq	_parseTypeString
	movq	-80(%rbp), %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_getTypeInputInfo
	movq	-80(%rbp), %rax
	movq	8(%rbx), %rcx
	movq	%rax, (%rcx,%r13,2)
	movq	-112(%rbp), %rdi
	movq	40(%rbx), %rsi
	addq	%r13, %rsi
	movq	-64(%rbp), %rdx
	callq	_fmgr_info_cxt
	movq	-104(%rbp), %rax
	movq	16(%rbx), %rcx
	movq	%rax, (%rcx,%r13,2)
	incq	%r14
	movslq	-44(%rbp), %rax
	addq	$4, %r13
	cmpq	%rax, %r14
	jl	LBB0_5
LBB0_6:
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rdi
	callq	_Tcl_GetString
	movl	%eax, %edi
	callq	_UTF_U2E
	movl	-44(%rbp), %esi
	movq	8(%rbx), %rdx
	movl	%eax, %edi
	callq	_SPI_prepare
	movq	%rax, 32(%rbx)
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_elog
	movq	32(%rbx), %rax
LBB0_8:
	movq	%rax, %rdi
	callq	_SPI_keepplan
	testq	%rax, %rax
	movl	-68(%rbp), %ebx                 ## 4-byte Reload
	je	LBB0_10
## %bb.9:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_elog
LBB0_10:
	movq	-56(%rbp), %rdi
	movl	%ebx, %esi
	callq	_pltcl_subtrans_commit
	xorl	%eax, %eax
	callq	_PG_CATCH
	movq	-56(%rbp), %rsi
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %edx
	callq	_pltcl_subtrans_abort
	movq	-64(%rbp), %rdi
	callq	_MemoryContextDelete
	jmp	LBB0_11
LBB0_1:
	leaq	L_.str(%rip), %rcx
	movq	%rbx, %rdi
	movl	$1, %esi
	movq	%r15, %rdx
	callq	_Tcl_WrongNumArgs
LBB0_11:
	movq	_TCL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CurrentMemoryContext,8,3       ## @CurrentMemoryContext
	.comm	_CurrentResourceOwner,4,2       ## @CurrentResourceOwner
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"query argtypes"

	.comm	_TCL_ERROR,4,2                  ## @TCL_ERROR
	.comm	_TCL_OK,8,3                     ## @TCL_OK
	.comm	_TopMemoryContext,4,2           ## @TopMemoryContext
L_.str.1:                               ## @.str.1
	.asciz	"PL/Tcl spi_prepare query"

	.comm	_ALLOCSET_SMALL_SIZES,4,2       ## @ALLOCSET_SMALL_SIZES
L_.str.2:                               ## @.str.2
	.asciz	"%p"

	.comm	_UTF_BEGIN,4,2                  ## @UTF_BEGIN
	.comm	_UTF_END,4,2                    ## @UTF_END
	.comm	_ERROR,4,2                      ## @ERROR
L_.str.3:                               ## @.str.3
	.asciz	"SPI_prepare() failed"

L_.str.4:                               ## @.str.4
	.asciz	"SPI_keepplan() failed"

	.comm	_pltcl_current_call_state,8,3   ## @pltcl_current_call_state
	.no_dead_strip	_pltcl_SPI_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pltcl_SPI_prepare
_pltcl_SPI_prepare:                     ; @pltcl_SPI_prepare
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x21, x3
	mov	x19, x1
	str	xzr, [sp, #56]
Lloh0:
	adrp	x8, _CurrentMemoryContext@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CurrentMemoryContext@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #32]
	cmp	w2, #3
	b.ne	LBB0_10
; %bb.1:
Lloh3:
	adrp	x8, _CurrentResourceOwner@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CurrentResourceOwner@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
	ldr	x1, [x21, #16]
	add	x2, sp, #52
	add	x3, sp, #40
	mov	x0, x19
	bl	_Tcl_ListObjGetElements
Lloh6:
	adrp	x8, _TCL_OK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TCL_OK@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.2:
Lloh9:
	adrp	x8, _TopMemoryContext@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TopMemoryContext@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x8, _ALLOCSET_SMALL_SIZES@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ALLOCSET_SMALL_SIZES@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_AllocSetContextCreate
	str	x0, [sp, #56]
	ldr	x0, [sp, #56]
	bl	_MemoryContextSwitchTo
	mov	w0, #48
	bl	_palloc0
	mov	x22, x0
	ldr	w0, [x0, #24]
Lloh17:
	adrp	x2, l_.str.2@PAGE
Lloh18:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	w1, #4
	mov	x3, x22
	bl	_snprintf
	ldr	w8, [sp, #52]
	str	w8, [x22]
	ldr	w8, [sp, #52]
	lsl	w0, w8, #3
	bl	_palloc
	str	x0, [x22, #8]
	ldr	w8, [sp, #52]
	lsl	w0, w8, #2
	bl	_palloc
	str	x0, [x22, #40]
	ldr	w8, [sp, #52]
	lsl	w0, w8, #3
	bl	_palloc
	str	x0, [x22, #16]
	ldr	x0, [sp, #32]
	bl	_MemoryContextSwitchTo
	ldr	x0, [sp, #32]
	mov	x1, x20
	bl	_pltcl_subtrans_begin
	bl	_PG_TRY
	ldr	w8, [sp, #52]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.3:
	mov	x23, #0
	mov	x24, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp, #40]
	lsl	x25, x24, #3
	ldr	x0, [x8, x25]
	bl	_Tcl_GetString
	add	x1, sp, #24
	add	x2, sp, #4
	mov	w3, #0
	bl	_parseTypeString
	ldr	x0, [sp, #24]
	add	x1, sp, #16
	add	x2, sp, #8
	bl	_getTypeInputInfo
	ldr	x8, [sp, #24]
	ldr	x9, [x22, #8]
	str	x8, [x9, x25]
	ldr	x0, [sp, #16]
	ldr	x8, [x22, #40]
	add	x1, x8, x23
	ldr	x2, [sp, #56]
	bl	_fmgr_info_cxt
	ldr	x8, [sp, #8]
	ldr	x9, [x22, #16]
	str	x8, [x9, x25]
	add	x24, x24, #1
	ldrsw	x8, [sp, #52]
	add	x23, x23, #4
	cmp	x24, x8
	b.lt	LBB0_4
LBB0_5:
	ldr	x0, [x21, #8]
	bl	_Tcl_GetString
	bl	_UTF_U2E
	ldr	w1, [sp, #52]
	ldr	x2, [x22, #8]
	bl	_SPI_prepare
	str	x0, [x22, #32]
Lloh19:
	adrp	x21, _ERROR@GOTPAGE
Lloh20:
	ldr	x21, [x21, _ERROR@GOTPAGEOFF]
	cbnz	x0, LBB0_7
; %bb.6:
	ldr	w0, [x21]
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_elog
	ldr	x0, [x22, #32]
LBB0_7:
	bl	_SPI_keepplan
	cbz	x0, LBB0_9
; %bb.8:
	ldr	w0, [x21]
Lloh23:
	adrp	x1, l_.str.4@PAGE
Lloh24:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_elog
LBB0_9:
	ldr	x0, [sp, #32]
	mov	x1, x20
	bl	_pltcl_subtrans_commit
	bl	_PG_CATCH
	ldr	x1, [sp, #32]
	mov	x0, x19
	mov	x2, x20
	bl	_pltcl_subtrans_abort
	ldr	x0, [sp, #56]
	bl	_MemoryContextDelete
	b	LBB0_11
LBB0_10:
Lloh25:
	adrp	x3, l_.str@PAGE
Lloh26:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	mov	w1, #1
	mov	x2, x21
	bl	_Tcl_WrongNumArgs
LBB0_11:
Lloh27:
	adrp	x8, _TCL_ERROR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _TCL_ERROR@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_CurrentMemoryContext,8,3       ; @CurrentMemoryContext
	.comm	_CurrentResourceOwner,4,2       ; @CurrentResourceOwner
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"query argtypes"

	.comm	_TCL_ERROR,4,2                  ; @TCL_ERROR
	.comm	_TCL_OK,8,3                     ; @TCL_OK
	.comm	_TopMemoryContext,4,2           ; @TopMemoryContext
l_.str.1:                               ; @.str.1
	.asciz	"PL/Tcl spi_prepare query"

	.comm	_ALLOCSET_SMALL_SIZES,4,2       ; @ALLOCSET_SMALL_SIZES
l_.str.2:                               ; @.str.2
	.asciz	"%p"

	.comm	_UTF_BEGIN,4,2                  ; @UTF_BEGIN
	.comm	_UTF_END,4,2                    ; @UTF_END
	.comm	_ERROR,4,2                      ; @ERROR
l_.str.3:                               ; @.str.3
	.asciz	"SPI_prepare() failed"

l_.str.4:                               ; @.str.4
	.asciz	"SPI_keepplan() failed"

	.comm	_pltcl_current_call_state,8,3   ; @pltcl_current_call_state
	.no_dead_strip	_pltcl_SPI_prepare
.subsections_via_symbols
