	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _omap_iommu_detach_dev
__omap_iommu_detach_dev:                ## @_omap_iommu_detach_dev
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	cmpq	%rsi, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	leaq	L_.str(%rip), %rax
LBB0_2:
	movq	%rsi, %rdi
	movq	%rax, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
LBB0_5:
	movq	%rdi, %r14
	movl	(%rdi), %eax
	testl	%eax, %eax
	jle	LBB0_8
## %bb.6:
	movq	16(%r14), %rcx
	decl	%eax
	leaq	(%rcx,%rax,8), %rbx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %r15
	movq	%r15, %rdi
	callq	_iopgtable_clear_entry_all
	movq	%r15, %rdi
	callq	_omap_iommu_detach
	movq	$0, (%rbx)
	movq	$0, (%r15)
	incl	%r12d
	addq	$-8, %rbx
	cmpl	(%r14), %r12d
	jl	LBB0_7
LBB0_8:
	movq	%r14, %rdi
	callq	_omap_iommu_detach_fini
	movq	$0, 8(%r14)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"domain has no attached device\n"

L_.str.1:                               ## @.str.1
	.asciz	"invalid attached device\n"

	.no_dead_strip	__omap_iommu_detach_dev
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _omap_iommu_detach_dev
__omap_iommu_detach_dev:                ; @_omap_iommu_detach_dev
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_3
; %bb.1:
	cmp	x8, x1
	b.eq	LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, l_.str.1@PAGE
Lloh1:
	add	x8, x8, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_3:
Lloh2:
	adrp	x8, l_.str@PAGE
Lloh3:
	add	x8, x8, l_.str@PAGEOFF
LBB0_4:
	mov	x0, x1
	mov	x1, x8
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_dev_err
LBB0_5:
	mov	x19, x0
	ldr	w8, [x0]
	subs	w8, w8, #1
	b.lt	LBB0_8
; %bb.6:
	mov	w21, #0
	ldr	x9, [x19, #16]
	add	x22, x9, w8, uxtw #3
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x20, [x22]
	mov	x0, x20
	bl	_iopgtable_clear_entry_all
	mov	x0, x20
	bl	_omap_iommu_detach
	str	xzr, [x22], #-8
	str	xzr, [x20]
	add	w21, w21, #1
	ldr	w8, [x19]
	cmp	w21, w8
	b.lt	LBB0_7
LBB0_8:
	mov	x0, x19
	bl	_omap_iommu_detach_fini
	str	xzr, [x19, #8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"domain has no attached device\n"

l_.str.1:                               ; @.str.1
	.asciz	"invalid attached device\n"

	.no_dead_strip	__omap_iommu_detach_dev
.subsections_via_symbols
