	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snapshot_dtr
_snapshot_dtr:                          ## @snapshot_dtr
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %r15
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	__origins_lock@GOTPCREL(%rip), %rdi
	callq	_down_read
	leaq	-40(%rbp), %rsi
	leaq	-32(%rbp), %rdx
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	___find_snapshots_sharing_cow
	movq	-40(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	-32(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.2:
	cmpq	%rax, %r15
	jne	LBB0_4
## %bb.3:
	addq	$36, %rdi
	callq	_down_write
	movq	-32(%rbp), %rdi
	movq	$0, 40(%rdi)
	addq	$36, %rdi
	callq	_up_write
	leaq	L_.str(%rip), %rdi
	callq	_DMERR
LBB0_4:
	movq	__origins_lock@GOTPCREL(%rip), %rdi
	callq	_up_read
	movq	%r14, %rdi
	callq	_dm_target_is_snapshot_merge
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%r15, %rdi
	callq	_stop_merge
LBB0_6:
	movq	%r15, %rdi
	callq	_unregister_snapshot
	leaq	32(%r15), %rbx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_atomic_read
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	$1, %edi
	callq	_msleep
	jmp	LBB0_8
LBB0_9:
	xorl	%eax, %eax
	callq	_smp_mb
	movq	%r15, %rdi
	callq	___free_exceptions
	leaq	16(%r15), %rdi
	callq	_mempool_exit
	movl	12(%r15), %edi
	callq	_dm_exception_store_destroy
	movl	8(%r15), %esi
	movq	%r14, %rdi
	callq	_dm_put_device
	movl	4(%r15), %esi
	movq	%r14, %rdi
	callq	_dm_put_device
	movl	(%r15), %edi
	callq	_WARN_ON
	movq	%r15, %rdi
	callq	_kfree
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	__origins_lock,4,2              ## @_origins_lock
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cancelling snapshot handover."

	.comm	_DM_TRACKED_CHUNK_HASH_SIZE,4,2 ## @DM_TRACKED_CHUNK_HASH_SIZE
	.no_dead_strip	_snapshot_dtr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snapshot_dtr
_snapshot_dtr:                          ; @snapshot_dtr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x0
	ldr	x19, [x0]
	stp	xzr, xzr, [sp]
Lloh0:
	adrp	x0, __origins_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, __origins_lock@GOTPAGEOFF]
	bl	_down_read
	add	x1, sp, #8
	mov	x2, sp
	mov	x0, x19
	mov	x3, #0
	bl	___find_snapshots_sharing_cow
	ldp	x8, x9, [sp]
	cmp	x9, #0
	ccmp	x8, #0, #4, ne
	ccmp	x19, x9, #0, ne
	b.ne	LBB0_2
; %bb.1:
	add	x0, x8, #36
	bl	_down_write
	ldr	x8, [sp]
	str	xzr, [x8, #40]
	add	x0, x8, #36
	bl	_up_write
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DMERR
LBB0_2:
Lloh4:
	adrp	x0, __origins_lock@GOTPAGE
Lloh5:
	ldr	x0, [x0, __origins_lock@GOTPAGEOFF]
	bl	_up_read
	mov	x0, x20
	bl	_dm_target_is_snapshot_merge
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_stop_merge
LBB0_4:
	mov	x0, x19
	bl	_unregister_snapshot
	add	x21, x19, #32
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_atomic_read
	cbz	x0, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #1
	bl	_msleep
	b	LBB0_5
LBB0_7:
	bl	_smp_mb
	mov	x0, x19
	bl	___free_exceptions
	add	x0, x19, #16
	bl	_mempool_exit
	ldr	w0, [x19, #12]
	bl	_dm_exception_store_destroy
	ldr	w1, [x19, #8]
	mov	x0, x20
	bl	_dm_put_device
	ldr	w1, [x19, #4]
	mov	x0, x20
	bl	_dm_put_device
	ldr	w0, [x19]
	bl	_WARN_ON
	mov	x0, x19
	bl	_kfree
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	__origins_lock,4,2              ; @_origins_lock
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cancelling snapshot handover."

	.comm	_DM_TRACKED_CHUNK_HASH_SIZE,4,2 ; @DM_TRACKED_CHUNK_HASH_SIZE
	.no_dead_strip	_snapshot_dtr
.subsections_via_symbols
