	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mg_complete
_mg_complete:                           ## @mg_complete
	.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
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	24(%rdi), %rbx
	movq	32(%rdi), %r13
	movl	8(%rbx), %r12d
	testl	%esi, %esi
	je	LBB0_2
## %bb.1:
	leaq	8(%r13), %rdi
	movl	(%rbx), %esi
	callq	_update_stats
LBB0_2:
	movl	(%rbx), %eax
	cmpl	$128, %eax
	je	LBB0_14
## %bb.3:
	cmpl	$130, %eax
	je	LBB0_14
## %bb.4:
	cmpl	$129, %eax
	jne	LBB0_18
## %bb.5:
	movl	4(%rbx), %esi
	movq	%r13, %rdi
	callq	_oblock_to_dblock
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_clear_discard
	movl	4(%r13), %edi
	movq	%rbx, %rsi
	movl	%r15d, %edx
	callq	_policy_complete_background_work
	movq	8(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.6:
	testl	%r15d, %r15d
	je	LBB0_8
## %bb.7:
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_force_set_dirty
	movq	8(%r14), %rdi
	callq	_bio_endio
	jmp	LBB0_18
LBB0_14:
	testl	%r15d, %r15d
	je	LBB0_16
## %bb.15:
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_force_clear_dirty
LBB0_16:
	movl	4(%r13), %edi
	movq	%rbx, %rsi
	movl	%r15d, %edx
	callq	_policy_complete_background_work
LBB0_17:
	movq	%r13, %rdi
	callq	_dec_io_migrations
LBB0_18:
	leaq	-48(%rbp), %rdi
	callq	_bio_list_init
	movq	(%r14), %rsi
	testq	%rsi, %rsi
	je	LBB0_21
## %bb.19:
	movl	(%r13), %edi
	leaq	-48(%rbp), %rdx
	callq	_dm_cell_unlock_v2
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	movq	(%r14), %rsi
	movq	%r13, %rdi
	callq	_free_prison_cell
LBB0_21:
	movq	%r14, %rdi
	callq	_free_migration
	leaq	-48(%rbp), %rsi
	movq	%r13, %rdi
	callq	_defer_bios
	movq	%r13, %rdi
	callq	_wake_migration_worker
	movq	%r13, %rdi
	callq	_background_work_end
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	testl	%r15d, %r15d
	je	LBB0_17
## %bb.13:
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_force_clear_dirty
	jmp	LBB0_17
LBB0_8:
	movl	16(%r14), %eax
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:
	movq	_BLK_STS_IOERR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_10:
	movl	%eax, (%rdi)
	callq	_bio_endio
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_BLK_STS_IOERR,4,2              ## @BLK_STS_IOERR
	.no_dead_strip	_mg_complete
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mg_complete
_mg_complete:                           ; @mg_complete
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x1
	mov	x20, x0
	ldp	x23, x19, [x0, #24]
	ldr	w22, [x23, #8]
	cbz	w1, LBB0_2
; %bb.1:
	add	x0, x19, #8
	ldr	w1, [x23]
	bl	_update_stats
LBB0_2:
	ldr	w8, [x23]
	cmp	w8, #128
	b.eq	LBB0_8
; %bb.3:
	cmp	w8, #130
	b.eq	LBB0_8
; %bb.4:
	cmp	w8, #129
	b.ne	LBB0_12
; %bb.5:
	ldr	w1, [x23, #4]
	mov	x0, x19
	bl	_oblock_to_dblock
	mov	x1, x0
	mov	x0, x19
	bl	_clear_discard
	ldr	w0, [x19, #4]
	mov	x1, x23
	mov	x2, x21
	bl	_policy_complete_background_work
	ldr	x0, [x20, #8]
	cbz	x0, LBB0_16
; %bb.6:
	cbz	w21, LBB0_18
; %bb.7:
	mov	x0, x19
	mov	x1, x22
	bl	_force_set_dirty
	ldr	x0, [x20, #8]
	bl	_bio_endio
	b	LBB0_12
LBB0_8:
	cbz	w21, LBB0_10
; %bb.9:
	mov	x0, x19
	mov	x1, x22
	bl	_force_clear_dirty
LBB0_10:
	ldr	w0, [x19, #4]
	mov	x1, x23
	mov	x2, x21
	bl	_policy_complete_background_work
LBB0_11:
	mov	x0, x19
	bl	_dec_io_migrations
LBB0_12:
	add	x0, sp, #8
	bl	_bio_list_init
	ldr	x1, [x20]
	cbz	x1, LBB0_15
; %bb.13:
	ldr	w0, [x19]
	add	x2, sp, #8
	bl	_dm_cell_unlock_v2
	cbz	x0, LBB0_15
; %bb.14:
	ldr	x1, [x20]
	mov	x0, x19
	bl	_free_prison_cell
LBB0_15:
	mov	x0, x20
	bl	_free_migration
	add	x1, sp, #8
	mov	x0, x19
	bl	_defer_bios
	mov	x0, x19
	bl	_wake_migration_worker
	mov	x0, x19
	bl	_background_work_end
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_16:
	cbz	w21, LBB0_11
; %bb.17:
	mov	x0, x19
	mov	x1, x22
	bl	_force_clear_dirty
	b	LBB0_11
LBB0_18:
	ldr	w8, [x20, #16]
	cbnz	w8, LBB0_20
; %bb.19:
Lloh0:
	adrp	x8, _BLK_STS_IOERR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BLK_STS_IOERR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
LBB0_20:
	str	w8, [x0]
	bl	_bio_endio
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_BLK_STS_IOERR,4,2              ; @BLK_STS_IOERR
	.no_dead_strip	_mg_complete
.subsections_via_symbols
