	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_detach
_do_detach:                             ## @do_detach
	.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	%rdi, %rbx
	movq	24(%rdi), %r14
	movq	_amd_iommu_rlookup_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rdi), %rcx
	movq	8(%rdi), %r15
	movq	(%rax,%rcx,8), %r12
	movq	$0, 24(%rdi)
	addq	$16, %rdi
	callq	_list_del
	movq	(%rbx), %rdi
	callq	_clear_dte_entry
	cmpq	(%rbx), %r15
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	callq	_clear_dte_entry
LBB0_2:
	movq	%rbx, %rdi
	callq	_device_flush_dte
	movq	%r14, %rdi
	callq	_domain_flush_tlb_pde
	movq	%r14, %rdi
	callq	_domain_flush_complete
	movq	(%r14), %rax
	movq	(%r12), %rcx
	decl	(%rax,%rcx,4)
	decl	8(%r14)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_amd_iommu_rlookup_table,8,3    ## @amd_iommu_rlookup_table
	.no_dead_strip	_do_detach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_detach
_do_detach:                             ; @do_detach
	.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	x20, x0
	ldr	x19, [x0, #24]
Lloh0:
	adrp	x8, _amd_iommu_rlookup_table@GOTPAGE
Lloh1:
	ldr	x8, [x8, _amd_iommu_rlookup_table@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldp	x9, x21, [x0]
	ldr	x22, [x8, x9, lsl #3]
	str	xzr, [x0, #24]
	add	x0, x0, #16
	bl	_list_del
	ldr	x0, [x20]
	bl	_clear_dte_entry
	ldr	x8, [x20]
	cmp	x21, x8
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_clear_dte_entry
LBB0_2:
	mov	x0, x20
	bl	_device_flush_dte
	mov	x0, x19
	bl	_domain_flush_tlb_pde
	mov	x0, x19
	bl	_domain_flush_complete
	ldr	x8, [x19]
	ldr	x9, [x22]
	lsl	x9, x9, #2
	ldr	w10, [x8, x9]
	sub	w10, w10, #1
	str	w10, [x8, x9]
	ldr	w8, [x19, #8]
	sub	w8, w8, #1
	str	w8, [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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_amd_iommu_rlookup_table,8,3    ; @amd_iommu_rlookup_table
	.no_dead_strip	_do_detach
.subsections_via_symbols
