	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ReplicationSlotCleanup         ## -- Begin function ReplicationSlotCleanup
	.p2align	4, 0x90
_ReplicationSlotCleanup:                ## @ReplicationSlotCleanup
	.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
	movq	_MyReplicationSlot@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	$0, (%rax)
	sete	%dil
	callq	_Assert
	movq	_ReplicationSlotControlLock@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_LW_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LWLockAcquire
	movq	_max_replication_slots@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_6
## %bb.1:
	xorl	%ebx, %ebx
	movq	_ReplicationSlotCtl@GOTPCREL(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	callq	_SpinLockRelease
	movq	_max_replication_slots@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rcx
	movq	(%rcx), %r13
	movq	%rbx, %r15
	shlq	$5, %r15
	cmpl	$0, 24(%r13,%r15)
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%r15,%r13), %r14
	addq	$8, %r14
	movq	%r14, %rdi
	callq	_SpinLockAcquire
	movq	(%r13,%r15), %rax
	movq	_MyProcPid@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	addq	%r13, %r15
	movl	%ebx, %ebx
	shlq	$5, %rbx
	movq	16(%r13,%rbx), %rax
	xorl	%edi, %edi
	movq	_RS_TEMPORARY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_Assert
	movq	%r14, %rdi
	callq	_SpinLockRelease
	movq	_ReplicationSlotControlLock@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_LWLockRelease
	movq	%r15, %rdi
	callq	_ReplicationSlotDropPtr
	leaq	(%rbx,%r13), %rdi
	addq	$12, %rdi
	callq	_ConditionVariableBroadcast
	movl	(%r14), %edi
	movq	_LW_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LWLockAcquire
	movq	_max_replication_slots@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	$0, %ebx
	testl	%eax, %eax
	jg	LBB0_2
LBB0_6:
	movq	_ReplicationSlotControlLock@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_LWLockRelease                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MyReplicationSlot,8,3          ## @MyReplicationSlot
	.comm	_ReplicationSlotControlLock,4,2 ## @ReplicationSlotControlLock
	.comm	_LW_SHARED,4,2                  ## @LW_SHARED
	.comm	_max_replication_slots,4,2      ## @max_replication_slots
	.comm	_ReplicationSlotCtl,8,3         ## @ReplicationSlotCtl
	.comm	_MyProcPid,8,3                  ## @MyProcPid
	.comm	_RS_TEMPORARY,8,3               ## @RS_TEMPORARY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ReplicationSlotCleanup         ; -- Begin function ReplicationSlotCleanup
	.p2align	2
_ReplicationSlotCleanup:                ; @ReplicationSlotCleanup
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
Lloh0:
	adrp	x8, _MyReplicationSlot@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MyReplicationSlot@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, #0
	cset	w0, eq
	bl	_Assert
Lloh3:
	adrp	x21, _ReplicationSlotControlLock@GOTPAGE
Lloh4:
	ldr	x21, [x21, _ReplicationSlotControlLock@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh5:
	adrp	x22, _LW_SHARED@GOTPAGE
Lloh6:
	ldr	x22, [x22, _LW_SHARED@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_LWLockAcquire
Lloh7:
	adrp	x23, _max_replication_slots@GOTPAGE
Lloh8:
	ldr	x23, [x23, _max_replication_slots@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x27, #0
Lloh9:
	adrp	x24, _ReplicationSlotCtl@GOTPAGE
Lloh10:
	ldr	x24, [x24, _ReplicationSlotCtl@GOTPAGEOFF]
Lloh11:
	adrp	x25, _MyProcPid@GOTPAGE
Lloh12:
	ldr	x25, [x25, _MyProcPid@GOTPAGEOFF]
Lloh13:
	adrp	x26, _RS_TEMPORARY@GOTPAGE
Lloh14:
	ldr	x26, [x26, _RS_TEMPORARY@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	bl	_SpinLockRelease
	ldr	w8, [x23]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x27, x27, #1
	cmp	x27, w8, sxtw
	b.ge	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x24]
	ldr	x28, [x9]
	add	x19, x28, x27, lsl #5
	ldr	w9, [x19, #24]
	cbz	w9, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x20, x19, #8
	mov	x0, x20
	bl	_SpinLockAcquire
	ldr	x8, [x19]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	and	x8, x27, #0xffffffff
	add	x27, x28, x8, lsl #5
	ldr	x8, [x27, #16]
	ldr	x9, [x26]
	cmp	x8, x9
	cset	w0, eq
	bl	_Assert
	mov	x0, x20
	bl	_SpinLockRelease
	ldr	w0, [x21]
	bl	_LWLockRelease
	mov	x0, x19
	bl	_ReplicationSlotDropPtr
	add	x0, x27, #12
	bl	_ConditionVariableBroadcast
	ldr	w0, [x21]
	ldr	w1, [x22]
	bl	_LWLockAcquire
	mov	x27, #0
	ldr	w8, [x23]
	cmp	w8, #0
	b.gt	LBB0_4
LBB0_7:
	ldr	w0, [x21]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_LWLockRelease
	.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 AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_MyReplicationSlot,8,3          ; @MyReplicationSlot
	.comm	_ReplicationSlotControlLock,4,2 ; @ReplicationSlotControlLock
	.comm	_LW_SHARED,4,2                  ; @LW_SHARED
	.comm	_max_replication_slots,4,2      ; @max_replication_slots
	.comm	_ReplicationSlotCtl,8,3         ; @ReplicationSlotCtl
	.comm	_MyProcPid,8,3                  ; @MyProcPid
	.comm	_RS_TEMPORARY,8,3               ; @RS_TEMPORARY
.subsections_via_symbols
