	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SaveCachedPlan                 ## -- Begin function SaveCachedPlan
	.p2align	4, 0x90
_SaveCachedPlan:                        ## @SaveCachedPlan
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_CACHEDPLANSOURCE_MAGIC@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_Assert
	movl	8(%rbx), %edi
	callq	_Assert
	xorl	%edi, %edi
	cmpl	$0, 12(%rbx)
	sete	%dil
	callq	_Assert
	cmpq	$0, 24(%rbx)
	je	LBB0_2
## %bb.1:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_elog
LBB0_2:
	movq	%rbx, %rdi
	callq	_ReleaseGenericPlan
	movl	20(%rbx), %edi
	movq	_CacheMemoryContext@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MemoryContextSetParent
	leaq	16(%rbx), %rsi
	movq	_saved_plan_list@GOTPCREL(%rip), %rdi
	callq	_dlist_push_tail
	movl	$1, 12(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CACHEDPLANSOURCE_MAGIC,8,3     ## @CACHEDPLANSOURCE_MAGIC
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot save one-shot cached plan"

	.comm	_CacheMemoryContext,4,2         ## @CacheMemoryContext
	.comm	_saved_plan_list,4,2            ## @saved_plan_list
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SaveCachedPlan                 ; -- Begin function SaveCachedPlan
	.p2align	2
_SaveCachedPlan:                        ; @SaveCachedPlan
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _CACHEDPLANSOURCE_MAGIC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CACHEDPLANSOURCE_MAGIC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_Assert
	ldr	w0, [x19, #8]
	bl	_Assert
	ldr	w8, [x19, #12]
	cmp	w8, #0
	cset	w0, eq
	bl	_Assert
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
LBB0_2:
	mov	x0, x19
	bl	_ReleaseGenericPlan
	ldr	w0, [x19, #20]
Lloh8:
	adrp	x8, _CacheMemoryContext@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CacheMemoryContext@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_MemoryContextSetParent
	add	x1, x19, #16
Lloh11:
	adrp	x0, _saved_plan_list@GOTPAGE
Lloh12:
	ldr	x0, [x0, _saved_plan_list@GOTPAGEOFF]
	bl	_dlist_push_tail
	mov	w8, #1
	str	w8, [x19, #12]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_CACHEDPLANSOURCE_MAGIC,8,3     ; @CACHEDPLANSOURCE_MAGIC
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot save one-shot cached plan"

	.comm	_CacheMemoryContext,4,2         ; @CacheMemoryContext
	.comm	_saved_plan_list,4,2            ; @saved_plan_list
.subsections_via_symbols
