	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SPI_connect_ext                ## -- Begin function SPI_connect_ext
	.p2align	4, 0x90
_SPI_connect_ext:                       ## @SPI_connect_ext
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r15d
	movq	__SPI_stack@GOTPCREL(%rip), %r14
	cmpq	$0, (%r14)
	je	LBB0_1
## %bb.5:
	movq	__SPI_stack_depth@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	movq	__SPI_connected@GOTPCREL(%rip), %r12
	testl	%ecx, %ecx
	jle	LBB0_7
## %bb.6:
	movl	(%r12), %eax
	cmpl	%eax, %ecx
	jg	LBB0_8
LBB0_7:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_elog
	movl	(%rbx), %ecx
	movl	(%r12), %eax
LBB0_8:
	incl	%eax
	cmpl	%eax, %ecx
	jne	LBB0_11
## %bb.9:
	leal	(%rcx,%rcx), %ebx
	movq	(%r14), %rdi
	shll	$6, %ecx
	leal	(%rcx,%rcx,2), %esi
	callq	_repalloc
	movl	%ebx, %ecx
	jmp	LBB0_10
LBB0_1:
	movq	__SPI_connected@GOTPCREL(%rip), %rax
	cmpl	$-1, (%rax)
	jne	LBB0_3
## %bb.2:
	movq	__SPI_stack_depth@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_4
LBB0_3:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_elog
LBB0_4:
	movq	_TopMemoryContext@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1536, %esi                     ## imm = 0x600
	callq	_MemoryContextAlloc
	movl	$16, %ecx
LBB0_10:
	movq	%rax, (%r14)
	movq	__SPI_stack_depth@GOTPCREL(%rip), %rax
	movl	%ecx, (%rax)
LBB0_11:
	movq	__SPI_connected@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	leal	1(%rax), %edx
	movl	%edx, (%rbx)
	cmpl	$-1, %eax
	setge	%al
	cmpl	%ecx, %edx
	setl	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_Assert
	movq	(%r14), %rax
	movslq	(%rbx), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	shlq	$5, %rcx
	leaq	(%rax,%rcx), %rdx
	movq	__SPI_current@GOTPCREL(%rip), %rbx
	movq	%rdx, (%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 80(%rax,%rcx)
	movq	_InvalidSubTransactionId@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%rbx), %rdi
	movl	%eax, 72(%rdi)
	addq	$68, %rdi
	callq	_slist_init
	movq	(%rbx), %rax
	movq	$0, 8(%rax)
	movq	$0, 24(%rax)
	xorl	%eax, %eax
	callq	_GetCurrentSubTransactionId
	movq	(%rbx), %rcx
	movl	%eax, 64(%rcx)
	movq	$0, 56(%rcx)
	movq	_SPI_OPT_NONATOMIC@GOTPCREL(%rip), %rdx
	xorl	%esi, %esi
	movq	_TopTransactionContext@GOTPCREL(%rip), %r13
	movq	%r13, %rax
	andl	(%rdx), %r15d
	sete	%sil
	movl	%esi, (%rcx)
	movl	$0, 4(%rcx)
	movq	_SPI_processed@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	%rdx, 48(%rcx)
	movq	_SPI_tuptable@GOTPCREL(%rip), %r15
	movq	(%r15), %rdx
	movq	%rdx, 40(%rcx)
	movq	_SPI_result@GOTPCREL(%rip), %r12
	movq	(%r12), %rdx
	movq	%rdx, 32(%rcx)
	je	LBB0_13
## %bb.12:
	movq	_PortalContext@GOTPCREL(%rip), %rax
LBB0_13:
	movq	(%rax), %rdi
	movq	_ALLOCSET_DEFAULT_SIZES@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	leaq	L_.str.1(%rip), %rsi
	callq	_AllocSetContextCreate
	movq	(%rbx), %rcx
	movq	%rax, 8(%rcx)
	cmpl	$0, (%rcx)
	je	LBB0_15
## %bb.14:
	movq	(%r13), %rax
LBB0_15:
	movl	(%r14), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%rax, %rdi
	callq	_AllocSetContextCreate
	movq	(%rbx), %rcx
	movq	%rax, 24(%rcx)
	movq	8(%rcx), %rdi
	callq	_MemoryContextSwitchTo
	movq	(%rbx), %rcx
	movl	%eax, 16(%rcx)
	movq	_SPI_processed@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	$0, (%r15)
	movq	$0, (%r12)
	movq	_SPI_OK_CONNECT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	__SPI_stack,8,3                 ## @_SPI_stack
	.comm	__SPI_connected,4,2             ## @_SPI_connected
	.comm	__SPI_stack_depth,4,2           ## @_SPI_stack_depth
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SPI stack corrupted"

	.comm	_TopMemoryContext,4,2           ## @TopMemoryContext
	.comm	__SPI_current,8,3               ## @_SPI_current
	.comm	_InvalidSubTransactionId,4,2    ## @InvalidSubTransactionId
	.comm	_SPI_OPT_NONATOMIC,4,2          ## @SPI_OPT_NONATOMIC
	.comm	_SPI_processed,8,3              ## @SPI_processed
	.comm	_SPI_tuptable,8,3               ## @SPI_tuptable
	.comm	_SPI_result,8,3                 ## @SPI_result
	.comm	_TopTransactionContext,8,3      ## @TopTransactionContext
	.comm	_PortalContext,8,3              ## @PortalContext
L_.str.1:                               ## @.str.1
	.asciz	"SPI Proc"

	.comm	_ALLOCSET_DEFAULT_SIZES,4,2     ## @ALLOCSET_DEFAULT_SIZES
L_.str.2:                               ## @.str.2
	.asciz	"SPI Exec"

	.comm	_SPI_OK_CONNECT,4,2             ## @SPI_OK_CONNECT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SPI_connect_ext                ; -- Begin function SPI_connect_ext
	.p2align	2
_SPI_connect_ext:                       ; @SPI_connect_ext
	.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	x19, x0
Lloh0:
	adrp	x20, __SPI_stack@GOTPAGE
Lloh1:
	ldr	x20, [x20, __SPI_stack@GOTPAGEOFF]
	ldr	x8, [x20]
Lloh2:
	adrp	x21, __SPI_connected@GOTPAGE
Lloh3:
	ldr	x21, [x21, __SPI_connected@GOTPAGEOFF]
Lloh4:
	adrp	x22, __SPI_stack_depth@GOTPAGE
Lloh5:
	ldr	x22, [x22, __SPI_stack_depth@GOTPAGEOFF]
	cbz	x8, LBB0_5
; %bb.1:
	ldr	w8, [x22]
	ldr	w9, [x21]
	cmp	w8, #1
	ccmp	w8, w9, #4, ge
	b.gt	LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
	ldr	w8, [x22]
	ldr	w9, [x21]
LBB0_3:
	add	w9, w9, #1
	cmp	w8, w9
	b.ne	LBB0_9
; %bb.4:
	lsl	w23, w8, #1
	ldr	x0, [x20]
	add	w8, w23, w8
	lsl	w1, w8, #6
	bl	_repalloc
	mov	x8, x23
	b	LBB0_8
LBB0_5:
	ldr	w8, [x21]
	ldr	w9, [x22]
	cmn	w8, #1
	ccmp	w9, #0, #0, eq
	b.eq	LBB0_7
; %bb.6:
Lloh11:
	adrp	x8, _ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
LBB0_7:
Lloh16:
	adrp	x8, _TopMemoryContext@GOTPAGE
Lloh17:
	ldr	x8, [x8, _TopMemoryContext@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	mov	w1, #1536
	bl	_MemoryContextAlloc
	mov	w8, #16
LBB0_8:
	str	x0, [x20]
	str	w8, [x22]
LBB0_9:
	ldr	w9, [x21]
	add	w10, w9, #1
	str	w10, [x21]
	cmn	w9, #2
	ccmp	w10, w8, #0, gt
	cset	w0, lt
	bl	_Assert
	ldr	x8, [x20]
	ldrsw	x9, [x21]
	mov	w10, #96
	madd	x8, x9, x10, x8
Lloh19:
	adrp	x20, __SPI_current@GOTPAGE
Lloh20:
	ldr	x20, [x20, __SPI_current@GOTPAGEOFF]
	str	x8, [x20]
	stp	xzr, xzr, [x8, #80]
Lloh21:
	adrp	x8, _InvalidSubTransactionId@GOTPAGE
Lloh22:
	ldr	x8, [x8, _InvalidSubTransactionId@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	ldr	x9, [x20]
	str	w8, [x9, #72]
	add	x0, x9, #68
	bl	_slist_init
	ldr	x8, [x20]
	str	xzr, [x8, #8]
	str	xzr, [x8, #24]
	bl	_GetCurrentSubTransactionId
	ldr	x8, [x20]
	str	w0, [x8, #64]
Lloh24:
	adrp	x9, _SPI_OPT_NONATOMIC@GOTPAGE
Lloh25:
	ldr	x9, [x9, _SPI_OPT_NONATOMIC@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	tst	w9, w19
	cset	w9, eq
	stp	w9, wzr, [x8]
Lloh27:
	adrp	x19, _SPI_processed@GOTPAGE
Lloh28:
	ldr	x19, [x19, _SPI_processed@GOTPAGEOFF]
	ldr	x9, [x19]
	stp	x9, xzr, [x8, #48]
Lloh29:
	adrp	x21, _SPI_tuptable@GOTPAGE
Lloh30:
	ldr	x21, [x21, _SPI_tuptable@GOTPAGEOFF]
	ldr	x9, [x21]
Lloh31:
	adrp	x22, _SPI_result@GOTPAGE
Lloh32:
	ldr	x22, [x22, _SPI_result@GOTPAGEOFF]
	ldr	x10, [x22]
Lloh33:
	adrp	x23, _TopTransactionContext@GOTPAGE
Lloh34:
	ldr	x23, [x23, _TopTransactionContext@GOTPAGEOFF]
Lloh35:
	adrp	x11, _PortalContext@GOTPAGE
Lloh36:
	ldr	x11, [x11, _PortalContext@GOTPAGEOFF]
	stp	x10, x9, [x8, #32]
	csel	x8, x23, x11, eq
	ldr	x0, [x8]
Lloh37:
	adrp	x24, _ALLOCSET_DEFAULT_SIZES@GOTPAGE
Lloh38:
	ldr	x24, [x24, _ALLOCSET_DEFAULT_SIZES@GOTPAGEOFF]
	ldr	w2, [x24]
Lloh39:
	adrp	x1, l_.str.1@PAGE
Lloh40:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_AllocSetContextCreate
	ldr	x8, [x20]
	str	x0, [x8, #8]
	ldr	w8, [x8]
	ldr	x9, [x23]
	cmp	w8, #0
	csel	x0, x0, x9, eq
	ldr	w2, [x24]
Lloh41:
	adrp	x1, l_.str.2@PAGE
Lloh42:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_AllocSetContextCreate
	ldr	x8, [x20]
	str	x0, [x8, #24]
	ldr	x0, [x8, #8]
	bl	_MemoryContextSwitchTo
	ldr	x8, [x20]
	str	w0, [x8, #16]
	str	xzr, [x19]
	str	xzr, [x21]
	str	xzr, [x22]
Lloh43:
	adrp	x8, _SPI_OK_CONNECT@GOTPAGE
Lloh44:
	ldr	x8, [x8, _SPI_OK_CONNECT@GOTPAGEOFF]
Lloh45:
	ldr	w0, [x8]
	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
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	__SPI_stack,8,3                 ; @_SPI_stack
	.comm	__SPI_connected,4,2             ; @_SPI_connected
	.comm	__SPI_stack_depth,4,2           ; @_SPI_stack_depth
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SPI stack corrupted"

	.comm	_TopMemoryContext,4,2           ; @TopMemoryContext
	.comm	__SPI_current,8,3               ; @_SPI_current
	.comm	_InvalidSubTransactionId,4,2    ; @InvalidSubTransactionId
	.comm	_SPI_OPT_NONATOMIC,4,2          ; @SPI_OPT_NONATOMIC
	.comm	_SPI_processed,8,3              ; @SPI_processed
	.comm	_SPI_tuptable,8,3               ; @SPI_tuptable
	.comm	_SPI_result,8,3                 ; @SPI_result
	.comm	_TopTransactionContext,8,3      ; @TopTransactionContext
	.comm	_PortalContext,8,3              ; @PortalContext
l_.str.1:                               ; @.str.1
	.asciz	"SPI Proc"

	.comm	_ALLOCSET_DEFAULT_SIZES,4,2     ; @ALLOCSET_DEFAULT_SIZES
l_.str.2:                               ; @.str.2
	.asciz	"SPI Exec"

	.comm	_SPI_OK_CONNECT,4,2             ; @SPI_OK_CONNECT
.subsections_via_symbols
