	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_UnregisterSnapshotFromOwner    ## -- Begin function UnregisterSnapshotFromOwner
	.p2align	4, 0x90
_UnregisterSnapshotFromOwner:           ## @UnregisterSnapshotFromOwner
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.1:
	movl	%esi, %r14d
	movq	%rdi, %rbx
	xorl	%edi, %edi
	cmpq	$0, (%rbx)
	setg	%dil
	callq	_Assert
	movq	_RegisteredSnapshots@GOTPCREL(%rip), %rdi
	callq	_pairingheap_is_empty
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_Assert
	movl	%r14d, %edi
	movq	%rbx, %rsi
	callq	_ResourceOwnerForgetSnapshot
	movq	(%rbx), %rax
	decq	%rax
	movq	%rax, (%rbx)
	je	LBB0_2
## %bb.3:
	testq	%rax, %rax
	jne	LBB0_5
	jmp	LBB0_4
LBB0_2:
	leaq	16(%rbx), %rsi
	movq	_RegisteredSnapshots@GOTPCREL(%rip), %rdi
	callq	_pairingheap_remove
	movq	(%rbx), %rax
	testq	%rax, %rax
	jne	LBB0_5
LBB0_4:
	cmpq	$0, 8(%rbx)
	je	LBB0_6
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	movq	%rbx, %rdi
	callq	_FreeSnapshot
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_SnapshotResetXmin              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RegisteredSnapshots,4,2        ## @RegisteredSnapshots
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_UnregisterSnapshotFromOwner    ; -- Begin function UnregisterSnapshotFromOwner
	.p2align	2
_UnregisterSnapshotFromOwner:           ; @UnregisterSnapshotFromOwner
	.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
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
	cmp	x8, #0
	cset	w0, gt
	bl	_Assert
Lloh0:
	adrp	x0, _RegisteredSnapshots@GOTPAGE
Lloh1:
	ldr	x0, [x0, _RegisteredSnapshots@GOTPAGEOFF]
	bl	_pairingheap_is_empty
	cmp	w0, #0
	cset	w0, eq
	bl	_Assert
	mov	x0, x20
	mov	x1, x19
	bl	_ResourceOwnerForgetSnapshot
	ldr	x8, [x19]
	subs	x8, x8, #1
	str	x8, [x19]
	b.eq	LBB0_3
; %bb.2:
	cbnz	x8, LBB0_5
	b	LBB0_4
LBB0_3:
	add	x1, x19, #16
Lloh2:
	adrp	x0, _RegisteredSnapshots@GOTPAGE
Lloh3:
	ldr	x0, [x0, _RegisteredSnapshots@GOTPAGEOFF]
	bl	_pairingheap_remove
	ldr	x8, [x19]
	cbnz	x8, LBB0_5
LBB0_4:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_6
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	x0, x19
	bl	_FreeSnapshot
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_SnapshotResetXmin
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_RegisteredSnapshots,4,2        ; @RegisteredSnapshots
.subsections_via_symbols
