	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_replorigin_drop                ## -- Begin function replorigin_drop
	.p2align	4, 0x90
_replorigin_drop:                       ## @replorigin_drop
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_IsTransactionState
	movl	%eax, %edi
	callq	_Assert
	movq	_ReplicationOriginRelationId@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ExclusiveLock@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	callq	_table_open
	movl	%eax, %r14d
	movq	_ReplicationOriginLock@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_LW_EXCLUSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LWLockAcquire
	movq	_max_replication_slots@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_9
## %bb.1:
	movq	_replication_states@GOTPCREL(%rip), %rcx
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	movq	(%rcx), %r12
	movl	%eax, %eax
	movq	%r12, %r15
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	%rbx, (%r15)
	je	LBB0_4
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=2
	incq	%rcx
	addq	$40, %r15
	cmpq	%rcx, %rax
	jne	LBB0_3
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movl	%ecx, %eax
	leaq	(%rax,%rax,4), %r14
	cmpq	$0, 8(%r12,%r14,8)
	je	LBB0_12
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%r12,%r14,8), %r13
	addq	$8, %r13
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_ERRCODE_OBJECT_IN_USE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	movq	(%r15), %rsi
	movq	(%r13), %rdx
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movl	%eax, %esi
	callq	_ereport
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%r12,%r14,8), %r13
	addq	$32, %r13
	movq	_ReplicationOriginLock@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_LWLockRelease
	movq	_WAIT_EVENT_REPLICATION_ORIGIN_DROP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_ConditionVariableSleep
	movl	(%r14), %edi
	movq	_LW_EXCLUSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LWLockAcquire
	movq	_max_replication_slots@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	movq	_ExclusiveLock@GOTPCREL(%rip), %r13
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movq	_replication_states@GOTPCREL(%rip), %rcx
	jg	LBB0_2
	jmp	LBB0_9
LBB0_12:
	movq	%rbx, -64(%rbp)
	xorl	%eax, %eax
	callq	_XLogBeginInsert
	leaq	-64(%rbp), %rdi
	movl	$8, %esi
	callq	_XLogRegisterData
	movq	_RM_REPLORIGIN_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_XLOG_REPLORIGIN_DROP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_XLogInsert
	movq	_InvalidRepOriginId@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
	movq	_InvalidXLogRecPtr@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rcx, 24(%r12,%r14,8)
	movq	(%rax), %rax
	movq	%rax, 16(%r12,%r14,8)
	movl	-44(%rbp), %r14d                ## 4-byte Reload
LBB0_9:
	movq	_ReplicationOriginLock@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_LWLockRelease
	xorl	%eax, %eax
	callq	_ConditionVariableCancelSleep
	movq	_REPLORIGIDENT@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%rbx, %rdi
	callq	_ObjectIdGetDatum
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_SearchSysCache1
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_HeapTupleIsValid
	testl	%eax, %eax
	jne	LBB0_11
## %bb.10:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdx
	callq	_elog
LBB0_11:
	movl	%r14d, %edi
	movq	%r15, %rsi
	callq	_CatalogTupleDelete
	movq	%r15, %rdi
	callq	_ReleaseSysCache
	xorl	%eax, %eax
	callq	_CommandCounterIncrement
	movl	(%r13), %esi
	movl	%r14d, %edi
	callq	_table_close
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ReplicationOriginRelationId,4,2 ## @ReplicationOriginRelationId
	.comm	_ExclusiveLock,4,2              ## @ExclusiveLock
	.comm	_ReplicationOriginLock,4,2      ## @ReplicationOriginLock
	.comm	_LW_EXCLUSIVE,4,2               ## @LW_EXCLUSIVE
	.comm	_max_replication_slots,4,2      ## @max_replication_slots
	.comm	_replication_states,8,3         ## @replication_states
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_OBJECT_IN_USE,4,2      ## @ERRCODE_OBJECT_IN_USE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not drop replication origin with OID %d, in use by PID %d"

	.comm	_WAIT_EVENT_REPLICATION_ORIGIN_DROP,4,2 ## @WAIT_EVENT_REPLICATION_ORIGIN_DROP
	.comm	_RM_REPLORIGIN_ID,4,2           ## @RM_REPLORIGIN_ID
	.comm	_XLOG_REPLORIGIN_DROP,4,2       ## @XLOG_REPLORIGIN_DROP
	.comm	_InvalidRepOriginId,8,3         ## @InvalidRepOriginId
	.comm	_InvalidXLogRecPtr,8,3          ## @InvalidXLogRecPtr
	.comm	_REPLORIGIDENT,4,2              ## @REPLORIGIDENT
L_.str.1:                               ## @.str.1
	.asciz	"cache lookup failed for replication origin with oid %u"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_replorigin_drop                ; -- Begin function replorigin_drop
	.p2align	2
_replorigin_drop:                       ; @replorigin_drop
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	str	w1, [sp, #4]                    ; 4-byte Folded Spill
	mov	x20, x0
	bl	_IsTransactionState
	bl	_Assert
Lloh0:
	adrp	x8, _ReplicationOriginRelationId@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ReplicationOriginRelationId@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x23, _ExclusiveLock@GOTPAGE
Lloh4:
	ldr	x23, [x23, _ExclusiveLock@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_table_open
	mov	x26, x0
Lloh5:
	adrp	x28, _ReplicationOriginLock@GOTPAGE
Lloh6:
	ldr	x28, [x28, _ReplicationOriginLock@GOTPAGEOFF]
	ldr	w0, [x28]
Lloh7:
	adrp	x21, _LW_EXCLUSIVE@GOTPAGE
Lloh8:
	ldr	x21, [x21, _LW_EXCLUSIVE@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_LWLockAcquire
Lloh9:
	adrp	x11, _max_replication_slots@GOTPAGE
Lloh10:
	ldr	x11, [x11, _max_replication_slots@GOTPAGEOFF]
	ldr	w9, [x11]
	cmp	w9, #1
	b.lt	LBB0_10
; %bb.1:
Lloh11:
	adrp	x10, _replication_states@GOTPAGE
Lloh12:
	ldr	x10, [x10, _replication_states@GOTPAGEOFF]
Lloh13:
	adrp	x19, _WAIT_EVENT_REPLICATION_ORIGIN_DROP@GOTPAGE
Lloh14:
	ldr	x19, [x19, _WAIT_EVENT_REPLICATION_ORIGIN_DROP@GOTPAGEOFF]
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
	mov	x8, #0
	ldr	x25, [x10]
	mov	w9, w9
	mov	x24, x25
LBB0_3:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x10, [x24]
	cmp	x10, x20
	b.eq	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=2
	add	x8, x8, #1
	add	x24, x24, #40
	cmp	x9, x8
	b.ne	LBB0_3
	b	LBB0_10
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	and	x22, x8, #0xffffffff
	mov	w8, #40
	madd	x27, x22, x8, x25
	ldr	x8, [x27, #8]!
	cbz	x8, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	str	w26, [sp]                       ; 4-byte Folded Spill
	mov	x26, x11
	ldr	w8, [sp, #4]                    ; 4-byte Folded Reload
	cbz	w8, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh15:
	adrp	x8, _ERROR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh17:
	ldr	w23, [x8]
Lloh18:
	adrp	x8, _ERRCODE_OBJECT_IN_USE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ERRCODE_OBJECT_IN_USE@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_errcode
	ldr	x1, [x24]
	ldr	x2, [x27]
Lloh21:
	adrp	x0, l_.str@PAGE
Lloh22:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x23
	bl	_ereport
LBB0_8:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	w8, #40
	madd	x8, x22, x8, x25
	add	x23, x8, #32
	ldr	w0, [x28]
	bl	_LWLockRelease
	ldr	w1, [x19]
	mov	x0, x23
	bl	_ConditionVariableSleep
	ldr	w0, [x28]
	ldr	w1, [x21]
	bl	_LWLockAcquire
	mov	x11, x26
	ldr	w9, [x26]
	cmp	w9, #0
Lloh23:
	adrp	x23, _ExclusiveLock@GOTPAGE
Lloh24:
	ldr	x23, [x23, _ExclusiveLock@GOTPAGEOFF]
	ldr	w26, [sp]                       ; 4-byte Folded Reload
Lloh25:
	adrp	x10, _replication_states@GOTPAGE
Lloh26:
	ldr	x10, [x10, _replication_states@GOTPAGEOFF]
	b.gt	LBB0_2
	b	LBB0_10
LBB0_9:
	str	x20, [sp, #8]
	bl	_XLogBeginInsert
	add	x0, sp, #8
	mov	w1, #8
	bl	_XLogRegisterData
Lloh27:
	adrp	x8, _RM_REPLORIGIN_ID@GOTPAGE
Lloh28:
	ldr	x8, [x8, _RM_REPLORIGIN_ID@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
Lloh30:
	adrp	x8, _XLOG_REPLORIGIN_DROP@GOTPAGE
Lloh31:
	ldr	x8, [x8, _XLOG_REPLORIGIN_DROP@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	bl	_XLogInsert
Lloh33:
	adrp	x8, _InvalidRepOriginId@GOTPAGE
Lloh34:
	ldr	x8, [x8, _InvalidRepOriginId@GOTPAGEOFF]
Lloh35:
	ldr	x8, [x8]
	str	x8, [x24]
Lloh36:
	adrp	x8, _InvalidXLogRecPtr@GOTPAGE
Lloh37:
	ldr	x8, [x8, _InvalidXLogRecPtr@GOTPAGEOFF]
	ldr	x9, [x8]
	mov	w10, #40
	madd	x10, x22, x10, x25
	str	x9, [x10, #24]
	ldr	x8, [x8]
	str	x8, [x10, #16]
LBB0_10:
	ldr	w0, [x28]
	bl	_LWLockRelease
	bl	_ConditionVariableCancelSleep
Lloh38:
	adrp	x8, _REPLORIGIDENT@GOTPAGE
Lloh39:
	ldr	x8, [x8, _REPLORIGIDENT@GOTPAGEOFF]
Lloh40:
	ldr	w21, [x8]
	mov	x0, x20
	bl	_ObjectIdGetDatum
	mov	x1, x0
	mov	x0, x21
	bl	_SearchSysCache1
	mov	x21, x0
	bl	_HeapTupleIsValid
	cbnz	w0, LBB0_12
; %bb.11:
Lloh41:
	adrp	x8, _ERROR@GOTPAGE
Lloh42:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh43:
	ldr	w0, [x8]
Lloh44:
	adrp	x1, l_.str.1@PAGE
Lloh45:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_elog
LBB0_12:
	mov	x0, x26
	mov	x1, x21
	bl	_CatalogTupleDelete
	mov	x0, x21
	bl	_ReleaseSysCache
	bl	_CommandCounterIncrement
	ldr	w1, [x23]
	mov	x0, x26
	bl	_table_close
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_ReplicationOriginRelationId,4,2 ; @ReplicationOriginRelationId
	.comm	_ExclusiveLock,4,2              ; @ExclusiveLock
	.comm	_ReplicationOriginLock,4,2      ; @ReplicationOriginLock
	.comm	_LW_EXCLUSIVE,4,2               ; @LW_EXCLUSIVE
	.comm	_max_replication_slots,4,2      ; @max_replication_slots
	.comm	_replication_states,8,3         ; @replication_states
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_OBJECT_IN_USE,4,2      ; @ERRCODE_OBJECT_IN_USE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not drop replication origin with OID %d, in use by PID %d"

	.comm	_WAIT_EVENT_REPLICATION_ORIGIN_DROP,4,2 ; @WAIT_EVENT_REPLICATION_ORIGIN_DROP
	.comm	_RM_REPLORIGIN_ID,4,2           ; @RM_REPLORIGIN_ID
	.comm	_XLOG_REPLORIGIN_DROP,4,2       ; @XLOG_REPLORIGIN_DROP
	.comm	_InvalidRepOriginId,8,3         ; @InvalidRepOriginId
	.comm	_InvalidXLogRecPtr,8,3          ; @InvalidXLogRecPtr
	.comm	_REPLORIGIDENT,4,2              ; @REPLORIGIDENT
l_.str.1:                               ; @.str.1
	.asciz	"cache lookup failed for replication origin with oid %u"

.subsections_via_symbols
