	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PortalDrop                     ## -- Begin function PortalDrop
	.p2align	4, 0x90
_PortalDrop:                            ## @PortalDrop
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_PortalIsValid
	movl	%eax, %edi
	callq	_AssertArg
	cmpq	$0, 64(%rbx)
	je	LBB0_2
## %bb.1:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_ERRCODE_INVALID_CURSOR_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	movl	56(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_2:
	movq	(%rbx), %rax
	movq	_PORTAL_ACTIVE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_ERRCODE_INVALID_CURSOR_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	movl	56(%rbx), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_errmsg
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_4:
	movq	48(%rbx), %rdi
	callq	_PointerIsValid
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	*48(%rbx)
	movq	$0, 48(%rbx)
LBB0_6:
	movq	%rbx, %rdi
	callq	_PortalHashTableDelete
	movq	%rbx, %rdi
	callq	_PortalReleaseCachedPlan
	movq	40(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.7:
	movq	32(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.8:
	callq	_UnregisterSnapshotFromOwner
LBB0_9:
	movq	$0, 40(%rbx)
LBB0_10:
	movq	32(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.11:
	movq	(%rbx), %rax
	movq	_PORTAL_FAILED@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	testl	%r14d, %r14d
	je	LBB0_13
## %bb.12:
	cmpq	%rcx, %rax
	movq	%rax, %rcx
	jne	LBB0_14
LBB0_13:
	xorl	%r14d, %r14d
	cmpq	%rcx, %rax
	setne	%r14b
	movq	_RESOURCE_RELEASE_BEFORE_LOCKS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edx
	xorl	%ecx, %ecx
	callq	_ResourceOwnerRelease
	movq	32(%rbx), %rdi
	movq	_RESOURCE_RELEASE_LOCKS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edx
	xorl	%ecx, %ecx
	callq	_ResourceOwnerRelease
	movq	32(%rbx), %rdi
	movq	_RESOURCE_RELEASE_AFTER_LOCKS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edx
	xorl	%ecx, %ecx
	callq	_ResourceOwnerRelease
	movq	32(%rbx), %rdi
	callq	_ResourceOwnerDelete
LBB0_14:
	movq	$0, 32(%rbx)
	cmpq	$0, 24(%rbx)
	je	LBB0_16
## %bb.15:
	movq	16(%rbx), %rdi
	callq	_MemoryContextSwitchTo
	movq	%rax, %r14
	movq	24(%rbx), %rdi
	callq	_tuplestore_end
	movq	%r14, %rdi
	callq	_MemoryContextSwitchTo
	movq	$0, 24(%rbx)
LBB0_16:
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_18
## %bb.17:
	callq	_MemoryContextDelete
LBB0_18:
	movq	8(%rbx), %rdi
	callq	_MemoryContextDelete
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pfree                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_INVALID_CURSOR_STATE,4,2 ## @ERRCODE_INVALID_CURSOR_STATE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot drop pinned portal \"%s\""

	.comm	_PORTAL_ACTIVE,8,3              ## @PORTAL_ACTIVE
L_.str.1:                               ## @.str.1
	.asciz	"cannot drop active portal \"%s\""

	.comm	_PORTAL_FAILED,8,3              ## @PORTAL_FAILED
	.comm	_RESOURCE_RELEASE_BEFORE_LOCKS,4,2 ## @RESOURCE_RELEASE_BEFORE_LOCKS
	.comm	_RESOURCE_RELEASE_LOCKS,4,2     ## @RESOURCE_RELEASE_LOCKS
	.comm	_RESOURCE_RELEASE_AFTER_LOCKS,4,2 ## @RESOURCE_RELEASE_AFTER_LOCKS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PortalDrop                     ; -- Begin function PortalDrop
	.p2align	2
_PortalDrop:                            ; @PortalDrop
	.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	x20, x1
	mov	x19, x0
	bl	_PortalIsValid
	bl	_AssertArg
	ldr	x8, [x19, #64]
Lloh0:
	adrp	x22, _ERROR@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ERROR@GOTPAGEOFF]
Lloh2:
	adrp	x23, _ERRCODE_INVALID_CURSOR_STATE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _ERRCODE_INVALID_CURSOR_STATE@GOTPAGEOFF]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w21, [x22]
	ldr	w0, [x23]
	bl	_errcode
	ldr	w1, [x19, #56]
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x21
	bl	_ereport
LBB0_2:
	ldr	x8, [x19]
Lloh6:
	adrp	x9, _PORTAL_ACTIVE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PORTAL_ACTIVE@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	ldr	w21, [x22]
	ldr	w0, [x23]
	bl	_errcode
	ldr	w1, [x19, #56]
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x21
	bl	_ereport
LBB0_4:
	ldr	x0, [x19, #48]
	bl	_PointerIsValid
	cbz	x0, LBB0_6
; %bb.5:
	ldr	x8, [x19, #48]
	mov	x0, x19
	blr	x8
	str	xzr, [x19, #48]
LBB0_6:
	mov	x0, x19
	bl	_PortalHashTableDelete
	mov	x0, x19
	bl	_PortalReleaseCachedPlan
	ldr	x0, [x19, #40]
	cbz	x0, LBB0_10
; %bb.7:
	ldr	x1, [x19, #32]
	cbz	x1, LBB0_9
; %bb.8:
	bl	_UnregisterSnapshotFromOwner
LBB0_9:
	str	xzr, [x19, #40]
LBB0_10:
	ldr	x0, [x19, #32]
	cbz	x0, LBB0_14
; %bb.11:
	ldr	x8, [x19]
Lloh11:
	adrp	x9, _PORTAL_FAILED@GOTPAGE
Lloh12:
	ldr	x9, [x9, _PORTAL_FAILED@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cbz	w20, LBB0_13
; %bb.12:
	cmp	x8, x9
	mov	x9, x8
	b.ne	LBB0_14
LBB0_13:
	cmp	x8, x9
	cset	w20, ne
Lloh14:
	adrp	x8, _RESOURCE_RELEASE_BEFORE_LOCKS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _RESOURCE_RELEASE_BEFORE_LOCKS@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x2, x20
	mov	w3, #0
	bl	_ResourceOwnerRelease
	ldr	x0, [x19, #32]
Lloh17:
	adrp	x8, _RESOURCE_RELEASE_LOCKS@GOTPAGE
Lloh18:
	ldr	x8, [x8, _RESOURCE_RELEASE_LOCKS@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x2, x20
	mov	w3, #0
	bl	_ResourceOwnerRelease
	ldr	x0, [x19, #32]
Lloh20:
	adrp	x8, _RESOURCE_RELEASE_AFTER_LOCKS@GOTPAGE
Lloh21:
	ldr	x8, [x8, _RESOURCE_RELEASE_AFTER_LOCKS@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x2, x20
	mov	w3, #0
	bl	_ResourceOwnerRelease
	ldr	x0, [x19, #32]
	bl	_ResourceOwnerDelete
LBB0_14:
	str	xzr, [x19, #32]
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_16
; %bb.15:
	ldr	x0, [x19, #16]
	bl	_MemoryContextSwitchTo
	mov	x20, x0
	ldr	x0, [x19, #24]
	bl	_tuplestore_end
	mov	x0, x20
	bl	_MemoryContextSwitchTo
	str	xzr, [x19, #24]
LBB0_16:
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_18
; %bb.17:
	bl	_MemoryContextDelete
LBB0_18:
	ldr	x0, [x19, #8]
	bl	_MemoryContextDelete
	mov	x0, x19
	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
	b	_pfree
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_INVALID_CURSOR_STATE,4,2 ; @ERRCODE_INVALID_CURSOR_STATE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot drop pinned portal \"%s\""

	.comm	_PORTAL_ACTIVE,8,3              ; @PORTAL_ACTIVE
l_.str.1:                               ; @.str.1
	.asciz	"cannot drop active portal \"%s\""

	.comm	_PORTAL_FAILED,8,3              ; @PORTAL_FAILED
	.comm	_RESOURCE_RELEASE_BEFORE_LOCKS,4,2 ; @RESOURCE_RELEASE_BEFORE_LOCKS
	.comm	_RESOURCE_RELEASE_LOCKS,4,2     ; @RESOURCE_RELEASE_LOCKS
	.comm	_RESOURCE_RELEASE_AFTER_LOCKS,4,2 ; @RESOURCE_RELEASE_AFTER_LOCKS
.subsections_via_symbols
