	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sm_ll_mutate
_sm_ll_mutate:                          ## @sm_ll_mutate
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -88(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r12
	movq	%rdx, -96(%rbp)                 ## 8-byte Spill
	movl	%esi, %r14d
	movq	%rdi, %r13
	movl	%esi, -64(%rbp)
	movl	32(%rdi), %esi
	movl	%r14d, %edi
	callq	_do_div
	movl	%eax, %ebx
	leaq	-80(%rbp), %rdx
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	*(%r13)
	testl	%eax, %eax
	js	LBB0_24
## %bb.1:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	28(%r13), %ebx
	movl	-68(%rbp), %edi
	callq	_le64_to_cpu
	movq	_dm_sm_bitmap_validator@GOTPCREL(%rip), %rdx
	leaq	-56(%rbp), %rcx
	leaq	-108(%rbp), %r8
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_dm_tm_shadow_block
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movq	-56(%rbp), %rdi
	callq	_dm_block_location
	movl	%eax, %edi
	callq	_cpu_to_le64
	movl	%eax, -68(%rbp)
	movq	-56(%rbp), %rdi
	callq	_dm_bitmap_data
	movq	%rax, %rbx
	movq	%rax, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_sm_lookup_bitmap
	movl	%eax, -48(%rbp)
	cmpl	$3, %eax
	jl	LBB0_6
## %bb.4:
	leaq	-48(%rbp), %rdx
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_sm_ll_lookup_big_ref_count
	testl	%eax, %eax
	js	LBB0_7
## %bb.5:
	movl	-48(%rbp), %eax
LBB0_6:
	leaq	-60(%rbp), %rdx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	*-96(%rbp)                      ## 8-byte Folded Reload
	testl	%eax, %eax
	je	LBB0_8
LBB0_7:
	movl	%eax, %r15d
	movl	28(%r13), %edi
	movq	-56(%rbp), %rsi
	callq	_dm_tm_unlock
	jmp	LBB0_25
LBB0_2:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rdi
	callq	_DMERR
	jmp	LBB0_25
LBB0_8:
	movl	-60(%rbp), %edx
	cmpl	$2, %edx
	jg	LBB0_11
## %bb.9:
	movq	%rbx, %rdi
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	callq	_sm_set_bitmap
	movl	28(%r13), %edi
	movq	-56(%rbp), %rsi
	callq	_dm_tm_unlock
	cmpl	$3, -48(%rbp)
	jl	LBB0_14
## %bb.10:
	leaq	24(%r13), %rdi
	leaq	20(%r13), %rcx
	movl	20(%r13), %esi
	leaq	-64(%rbp), %rdx
	callq	_dm_btree_remove
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_25
	jmp	LBB0_14
LBB0_11:
	movl	%edx, %edi
	callq	_cpu_to_le32
	movq	%rax, -104(%rbp)
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	$3, %edx
	callq	_sm_set_bitmap
	movl	28(%r13), %edi
	movq	-56(%rbp), %rsi
	callq	_dm_tm_unlock
	leaq	-104(%rbp), %rbx
	movq	%rbx, %rdi
	callq	___dm_bless_for_disk
	leaq	24(%r13), %rdi
	leaq	20(%r13), %r8
	movl	20(%r13), %esi
	leaq	-64(%rbp), %rdx
	movq	%rbx, %rcx
	callq	_dm_btree_insert
	testl	%eax, %eax
	js	LBB0_12
## %bb.13:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
LBB0_14:
	movl	-60(%rbp), %eax
	movl	-48(%rbp), %ecx
	testl	%eax, %eax
	je	LBB0_19
## %bb.15:
	testl	%ecx, %ecx
	jne	LBB0_19
## %bb.16:
	movq	_SM_ALLOC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	incl	16(%r13)
	leaq	-72(%rbp), %rdi
	movl	$-1, %esi
	callq	_le32_add_cpu
	movq	-80(%rbp), %rdi
	callq	_le32_to_cpu
	cmpl	%ebx, %eax
	jne	LBB0_23
## %bb.17:
	incl	%ebx
	movl	%ebx, %edi
	jmp	LBB0_18
LBB0_19:
	testl	%ecx, %ecx
	je	LBB0_22
## %bb.20:
	testl	%eax, %eax
	jne	LBB0_22
## %bb.21:
	movq	_SM_FREE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	decl	16(%r13)
	leaq	-72(%rbp), %rdi
	movl	$1, %esi
	callq	_le32_add_cpu
	movq	-80(%rbp), %rdi
	callq	_le32_to_cpu
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_min
	movl	%eax, %edi
LBB0_18:
	callq	_cpu_to_le32
	movq	%rax, -80(%rbp)
	jmp	LBB0_23
LBB0_12:
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rdi
	callq	_DMERR
	jmp	LBB0_25
LBB0_22:
	movq	_SM_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
LBB0_23:
	leaq	-80(%rbp), %rdx
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	*8(%r13)
LBB0_24:
	movl	%eax, %r15d
LBB0_25:
	movl	%r15d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_dm_sm_bitmap_validator,4,2     ## @dm_sm_bitmap_validator
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dm_tm_shadow_block() failed"

L_.str.1:                               ## @.str.1
	.asciz	"ref count insert failed"

	.comm	_SM_ALLOC,4,2                   ## @SM_ALLOC
	.comm	_SM_FREE,4,2                    ## @SM_FREE
	.comm	_SM_NONE,4,2                    ## @SM_NONE
	.no_dead_strip	_sm_ll_mutate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sm_ll_mutate
_sm_ll_mutate:                          ; @sm_ll_mutate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	mov	x22, x4
	mov	x23, x3
	mov	x24, x2
	mov	x20, x1
	mov	x19, x0
	str	w1, [sp, #60]
	ldr	w1, [x0, #32]
	mov	x0, x20
	bl	_do_div
	mov	x21, x0
	ldr	x8, [x19]
	add	x2, sp, #24
	mov	x0, x19
	mov	x1, x20
	blr	x8
	tbnz	w0, #31, LBB0_23
; %bb.1:
	ldr	w25, [x19, #28]
	ldr	w0, [sp, #36]
	bl	_le64_to_cpu
	mov	x1, x0
Lloh0:
	adrp	x2, _dm_sm_bitmap_validator@GOTPAGE
Lloh1:
	ldr	x2, [x2, _dm_sm_bitmap_validator@GOTPAGEOFF]
	add	x3, sp, #40
	add	x4, sp, #20
	mov	x0, x25
	bl	_dm_tm_shadow_block
	tbnz	w0, #31, LBB0_7
; %bb.2:
	ldr	x0, [sp, #40]
	bl	_dm_block_location
	bl	_cpu_to_le64
	str	w0, [sp, #36]
	ldr	x0, [sp, #40]
	bl	_dm_bitmap_data
	mov	x26, x0
	mov	x1, x21
	bl	_sm_lookup_bitmap
	mov	x1, x0
	str	w0, [sp, #56]
	cmp	w0, #3
	b.lt	LBB0_5
; %bb.3:
	add	x2, sp, #56
	mov	x0, x19
	mov	x1, x20
	bl	_sm_ll_lookup_big_ref_count
	tbnz	w0, #31, LBB0_6
; %bb.4:
	ldr	w1, [sp, #56]
LBB0_5:
	add	x2, sp, #52
	mov	x0, x23
	blr	x24
	cbz	w0, LBB0_8
LBB0_6:
	mov	x25, x0
	ldr	w0, [x19, #28]
	ldr	x1, [sp, #40]
	bl	_dm_tm_unlock
	b	LBB0_24
LBB0_7:
	mov	x25, x0
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DMERR
	b	LBB0_24
LBB0_8:
	ldr	w2, [sp, #52]
	cmp	w2, #2
	b.gt	LBB0_11
; %bb.9:
	mov	x0, x26
	mov	x1, x21
	bl	_sm_set_bitmap
	ldr	w0, [x19, #28]
	ldr	x1, [sp, #40]
	bl	_dm_tm_unlock
	ldr	w8, [sp, #56]
	cmp	w8, #3
	b.lt	LBB0_12
; %bb.10:
	mov	x3, x19
	ldr	w1, [x3, #20]!
	add	x0, x3, #4
	add	x2, sp, #60
	bl	_dm_btree_remove
	mov	x25, x0
	cbnz	w0, LBB0_24
	b	LBB0_12
LBB0_11:
	mov	x0, x2
	bl	_cpu_to_le32
	str	x0, [sp, #8]
	mov	x0, x26
	mov	x1, x21
	mov	w2, #3
	bl	_sm_set_bitmap
	ldr	w0, [x19, #28]
	ldr	x1, [sp, #40]
	bl	_dm_tm_unlock
	add	x0, sp, #8
	bl	___dm_bless_for_disk
	mov	x4, x19
	ldr	w1, [x4, #20]!
	add	x0, x4, #4
	add	x2, sp, #60
	add	x3, sp, #8
	bl	_dm_btree_insert
	tbnz	w0, #31, LBB0_20
LBB0_12:
	ldp	w8, w9, [sp, #52]
	cbz	w8, LBB0_16
; %bb.13:
	cbnz	w9, LBB0_16
; %bb.14:
Lloh4:
	adrp	x8, _SM_ALLOC@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SM_ALLOC@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	str	w8, [x22]
	ldr	w8, [x19, #16]
	add	w8, w8, #1
	str	w8, [x19, #16]
	add	x8, sp, #24
	add	x0, x8, #8
	mov	w1, #-1
	bl	_le32_add_cpu
	ldr	x0, [sp, #24]
	bl	_le32_to_cpu
	cmp	w0, w21
	b.ne	LBB0_22
; %bb.15:
	add	w0, w21, #1
	b	LBB0_19
LBB0_16:
	cbz	w9, LBB0_21
; %bb.17:
	cbnz	w8, LBB0_21
; %bb.18:
Lloh7:
	adrp	x8, _SM_FREE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SM_FREE@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x22]
	ldr	w8, [x19, #16]
	sub	w8, w8, #1
	str	w8, [x19, #16]
	add	x8, sp, #24
	add	x0, x8, #8
	mov	w1, #1
	bl	_le32_add_cpu
	ldr	x0, [sp, #24]
	bl	_le32_to_cpu
	mov	x1, x21
	bl	_min
LBB0_19:
	bl	_cpu_to_le32
	str	x0, [sp, #24]
	b	LBB0_22
LBB0_20:
	mov	x25, x0
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DMERR
	b	LBB0_24
LBB0_21:
Lloh12:
	adrp	x8, _SM_NONE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SM_NONE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x22]
LBB0_22:
	ldr	x8, [x19, #8]
	add	x2, sp, #24
	mov	x0, x19
	mov	x1, x20
	blr	x8
LBB0_23:
	mov	x25, x0
LBB0_24:
	mov	x0, x25
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_dm_sm_bitmap_validator,4,2     ; @dm_sm_bitmap_validator
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dm_tm_shadow_block() failed"

l_.str.1:                               ; @.str.1
	.asciz	"ref count insert failed"

	.comm	_SM_ALLOC,4,2                   ; @SM_ALLOC
	.comm	_SM_FREE,4,2                    ; @SM_FREE
	.comm	_SM_NONE,4,2                    ; @SM_NONE
	.no_dead_strip	_sm_ll_mutate
.subsections_via_symbols
