	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function domain_detach_iommu
_domain_detach_iommu:                   ## @domain_detach_iommu
	.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	%rsi, %r14
	movq	%rdi, %r15
	movq	_device_domain_lock@GOTPCREL(%rip), %rdi
	callq	_assert_spin_locked
	leaq	12(%r14), %rdi
	callq	_assert_spin_locked
	movq	(%r15), %rcx
	movq	(%r14), %rax
	decq	(%rcx,%rax,8)
	movl	8(%r15), %ebx
	decl	%ebx
	movl	%ebx, 8(%r15)
	movq	(%r14), %rax
	cmpq	$0, (%rcx,%rax,8)
	jne	LBB0_2
## %bb.1:
	movq	16(%r15), %rcx
	movl	(%rcx,%rax,4), %r12d
	movl	8(%r14), %esi
	movl	%r12d, %edi
	callq	_clear_bit
	movq	%r14, %rdi
	movl	%r12d, %esi
	xorl	%edx, %edx
	callq	_set_iommu_domain
	movq	%r15, %rdi
	callq	_domain_update_iommu_cap
	movq	16(%r15), %rax
	movq	(%r14), %rcx
	movl	$0, (%rax,%rcx,4)
LBB0_2:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_device_domain_lock,4,2         ## @device_domain_lock
	.no_dead_strip	_domain_detach_iommu
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function domain_detach_iommu
_domain_detach_iommu:                   ; @domain_detach_iommu
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x0, _device_domain_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _device_domain_lock@GOTPAGEOFF]
	bl	_assert_spin_locked
	add	x0, x19, #12
	bl	_assert_spin_locked
	ldr	x9, [x20]
	ldr	x8, [x19]
	lsl	x8, x8, #3
	ldr	x10, [x9, x8]
	sub	x10, x10, #1
	str	x10, [x9, x8]
	ldr	w8, [x20, #8]
	sub	w21, w8, #1
	str	w21, [x20, #8]
	ldr	x8, [x19]
	ldr	x9, [x9, x8, lsl #3]
	cbnz	x9, LBB0_2
; %bb.1:
	ldr	x9, [x20, #16]
	ldr	w22, [x9, x8, lsl #2]
	ldr	w1, [x19, #8]
	mov	x0, x22
	bl	_clear_bit
	mov	x0, x19
	mov	x1, x22
	mov	x2, #0
	bl	_set_iommu_domain
	mov	x0, x20
	bl	_domain_update_iommu_cap
	ldr	x8, [x20, #16]
	ldr	x9, [x19]
	str	wzr, [x8, x9, lsl #2]
LBB0_2:
	mov	x0, x21
	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 AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_device_domain_lock,4,2         ; @device_domain_lock
	.no_dead_strip	_domain_detach_iommu
.subsections_via_symbols
