	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vop_virtio_del_device
_vop_virtio_del_device:                 ## @vop_virtio_del_device
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	32(%rdi), %r13
	movq	40(%rdi), %r14
	movq	8(%r13), %rax
	movq	%r13, %rdi
	callq	*8(%rax)
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	24(%r12), %esi
	movq	%r14, %rdi
	movq	%r13, %rdx
	callq	_vop_dev_remove
LBB0_2:
	movq	8(%r13), %rax
	movl	20(%r12), %esi
	movq	%r13, %rdi
	movq	%r12, %rdx
	callq	*(%rax)
	leaq	16(%r12), %rdi
	callq	_flush_work
	movq	(%r12), %rdi
	callq	_mic_vq_config
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	(%r12), %rax
	cmpl	$0, (%rax)
	jle	LBB0_5
## %bb.3:
	movl	$16, %r15d
	xorl	%r14d, %r14d
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %r12
	leaq	(%r12,%r15), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	16(%r12,%r15), %esi
	movq	_VOP_INT_DMA_BUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rdi
	callq	_dma_unmap_single
	movq	8(%r12,%r15), %rbx
	movq	_VOP_INT_DMA_BUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_get_order
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_free_pages
	leaq	(%r12,%r15), %rdi
	addq	$4, %rdi
	callq	_vringh_kiov_cleanup
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_vringh_kiov_cleanup
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%r14,4), %edi
	callq	_le64_to_cpu
	movl	-16(%r12,%r15), %edx
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_dma_unmap_single
	movq	-8(%r12,%r15), %rbx
	movl	-16(%r12,%r15), %edi
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	callq	_get_order
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_free_pages
	incq	%r14
	movq	(%r12), %rax
	movslq	(%rax), %rax
	addq	$40, %r15
	cmpq	%rax, %r14
	jl	LBB0_4
LBB0_5:
	xorl	%eax, %eax
	callq	_smp_wmb
	movq	(%r12), %rax
	movl	$-1, 4(%rax)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VOP_INT_DMA_BUF_SIZE,4,2       ## @VOP_INT_DMA_BUF_SIZE
	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
	.no_dead_strip	_vop_virtio_del_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vop_virtio_del_device
_vop_virtio_del_device:                 ; @vop_virtio_del_device
	.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
	mov	x19, x0
	ldp	x20, x21, [x0, #32]
	ldr	x8, [x20, #8]
	ldr	x8, [x8, #8]
	mov	x0, x20
	blr	x8
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w1, [x19, #24]
	mov	x0, x21
	mov	x2, x20
	bl	_vop_dev_remove
LBB0_2:
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	ldr	w1, [x19, #20]
	mov	x0, x20
	mov	x2, x19
	blr	x8
	add	x0, x19, #16
	bl	_flush_work
	ldr	x0, [x19]
	bl	_mic_vq_config
	ldr	x8, [x19]
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.3:
	mov	x21, x0
	mov	x23, #0
	mov	x24, #0
Lloh0:
	adrp	x25, _VOP_INT_DMA_BUF_SIZE@GOTPAGE
Lloh1:
	ldr	x25, [x25, _VOP_INT_DMA_BUF_SIZE@GOTPAGEOFF]
Lloh2:
	adrp	x26, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh3:
	ldr	x26, [x26, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	add	x27, x8, x23
	ldr	w1, [x27, #32]
	ldr	w2, [x25]
	ldr	w3, [x26]
	mov	x0, x20
	bl	_dma_unmap_single
	ldr	x22, [x27, #24]
	ldr	w0, [x25]
	bl	_get_order
	mov	x1, x0
	mov	x0, x22
	bl	_free_pages
	add	x0, x27, #20
	bl	_vringh_kiov_cleanup
	add	x0, x27, #16
	bl	_vringh_kiov_cleanup
	ldr	w0, [x21, x24, lsl #2]
	bl	_le64_to_cpu
	mov	x1, x0
	ldr	w2, [x27]
	ldr	w3, [x26]
	mov	x0, x20
	bl	_dma_unmap_single
	ldr	x22, [x27, #8]
	ldr	w0, [x27]
	bl	_get_order
	mov	x1, x0
	mov	x0, x22
	bl	_free_pages
	add	x24, x24, #1
	ldr	x8, [x19]
	ldrsw	x8, [x8]
	add	x23, x23, #40
	cmp	x24, x8
	b.lt	LBB0_4
LBB0_5:
	bl	_smp_wmb
	ldr	x8, [x19]
	mov	w9, #-1
	str	w9, [x8, #4]
	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
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_VOP_INT_DMA_BUF_SIZE,4,2       ; @VOP_INT_DMA_BUF_SIZE
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
	.no_dead_strip	_vop_virtio_del_device
.subsections_via_symbols
