	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function CheckCachedPlan
_CheckCachedPlan:                       ## @CheckCachedPlan
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rdi), %rbx
	movl	(%rdi), %edi
	callq	_Assert
	xorl	%eax, %eax
	testq	%rbx, %rbx
	je	LBB0_13
## %bb.1:
	movq	(%rbx), %rax
	movq	_CACHEDPLAN_MAGIC@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_Assert
	xorl	%edi, %edi
	cmpl	$0, 48(%rbx)
	sete	%dil
	callq	_Assert
	cmpl	$0, 8(%rbx)
	je	LBB0_12
## %bb.2:
	cmpq	$0, 40(%rbx)
	je	LBB0_6
## %bb.3:
	movq	16(%rbx), %r15
	xorl	%eax, %eax
	callq	_GetUserId
	cmpq	%rax, %r15
	jne	LBB0_4
## %bb.5:
	cmpl	$0, 8(%rbx)
	je	LBB0_12
LBB0_6:
	xorl	%edi, %edi
	cmpq	$0, 24(%rbx)
	setg	%dil
	callq	_Assert
	movl	32(%rbx), %edi
	movl	$1, %esi
	callq	_AcquireExecutorLocks
	cmpl	$0, 8(%rbx)
	je	LBB0_11
## %bb.7:
	movl	36(%rbx), %edi
	callq	_TransactionIdIsValid
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	movl	36(%rbx), %edi
	movq	_TransactionXmin@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_TransactionIdEquals
	testl	%eax, %eax
	je	LBB0_9
LBB0_10:
	movl	$1, %eax
	cmpl	$0, 8(%rbx)
	jne	LBB0_13
	jmp	LBB0_11
LBB0_4:
	movl	$0, 8(%rbx)
	jmp	LBB0_12
LBB0_9:
	movl	$0, 8(%rbx)
LBB0_11:
	movl	32(%rbx), %edi
	xorl	%esi, %esi
	callq	_AcquireExecutorLocks
LBB0_12:
	movq	%r14, %rdi
	callq	_ReleaseGenericPlan
	xorl	%eax, %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CACHEDPLAN_MAGIC,8,3           ## @CACHEDPLAN_MAGIC
	.comm	_TransactionXmin,4,2            ## @TransactionXmin
	.no_dead_strip	_CheckCachedPlan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CheckCachedPlan
_CheckCachedPlan:                       ; @CheckCachedPlan
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	x20, [x0, #8]
	ldr	w0, [x0]
	bl	_Assert
	cbz	x20, LBB0_14
; %bb.1:
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _CACHEDPLAN_MAGIC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CACHEDPLAN_MAGIC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_Assert
	ldr	w8, [x20, #48]
	cmp	w8, #0
	cset	w0, eq
	bl	_Assert
	ldr	w8, [x20, #8]
	cbz	w8, LBB0_13
; %bb.2:
	ldr	x8, [x20, #40]
	cbz	x8, LBB0_5
; %bb.3:
	ldr	x21, [x20, #16]
	bl	_GetUserId
	cmp	x21, x0
	b.ne	LBB0_10
; %bb.4:
	ldr	w8, [x20, #8]
	cbz	w8, LBB0_13
LBB0_5:
	ldr	x8, [x20, #24]
	cmp	x8, #0
	cset	w0, gt
	bl	_Assert
	ldr	w0, [x20, #32]
	mov	w1, #1
	bl	_AcquireExecutorLocks
	ldr	w8, [x20, #8]
	cbz	w8, LBB0_12
; %bb.6:
	ldr	w0, [x20, #36]
	bl	_TransactionIdIsValid
	cbz	x0, LBB0_8
; %bb.7:
	ldr	w0, [x20, #36]
Lloh3:
	adrp	x8, _TransactionXmin@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TransactionXmin@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_TransactionIdEquals
	cbz	w0, LBB0_11
LBB0_8:
	ldr	w8, [x20, #8]
	cbz	w8, LBB0_12
; %bb.9:
	mov	w0, #1
	b	LBB0_15
LBB0_10:
	str	wzr, [x20, #8]
	b	LBB0_13
LBB0_11:
	str	wzr, [x20, #8]
LBB0_12:
	ldr	w0, [x20, #32]
	mov	w1, #0
	bl	_AcquireExecutorLocks
LBB0_13:
	mov	x0, x19
	bl	_ReleaseGenericPlan
LBB0_14:
	mov	w0, #0
LBB0_15:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_CACHEDPLAN_MAGIC,8,3           ; @CACHEDPLAN_MAGIC
	.comm	_TransactionXmin,4,2            ; @TransactionXmin
	.no_dead_strip	_CheckCachedPlan
.subsections_via_symbols
