	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iommu_enable_dev_iotlb
_iommu_enable_dev_iotlb:                ## @iommu_enable_dev_iotlb
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_device_domain_lock@GOTPCREL(%rip), %rdi
	callq	_assert_spin_locked
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.1:
	movl	56(%rbx), %edi
	callq	_dev_is_pci
	testl	%eax, %eax
	je	LBB0_10
## %bb.2:
	movl	56(%rbx), %edi
	callq	_to_pci_dev
	movq	%rax, %r14
	movq	48(%rbx), %rax
	movl	(%rax), %edi
	callq	_ecap_dit
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	%r14, %rdi
	callq	_pci_physfn
	movq	%rax, %rdi
	callq	_pci_dev_id
	jmp	LBB0_5
LBB0_3:
	xorl	%eax, %eax
LBB0_5:
	movq	%rax, 40(%rbx)
	cmpl	$0, (%r14)
	je	LBB0_6
LBB0_10:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	cmpq	$0, 24(%rbx)
	je	LBB0_10
## %bb.7:
	movq	%r14, %rdi
	callq	_pci_ats_page_aligned
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	movq	_VTD_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_pci_enable_ats
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:
	movl	$1, 12(%rbx)
	movl	20(%rbx), %edi
	callq	_domain_update_iotlb
	movq	%r14, %rdi
	callq	_pci_ats_queue_depth
	movl	%eax, 16(%rbx)
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_device_domain_lock,4,2         ## @device_domain_lock
	.comm	_VTD_PAGE_SHIFT,4,2             ## @VTD_PAGE_SHIFT
	.no_dead_strip	_iommu_enable_dev_iotlb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iommu_enable_dev_iotlb
_iommu_enable_dev_iotlb:                ; @iommu_enable_dev_iotlb
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x0, _device_domain_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _device_domain_lock@GOTPAGEOFF]
	bl	_assert_spin_locked
	cbz	x19, LBB0_6
; %bb.1:
	ldr	w0, [x19, #56]
	bl	_dev_is_pci
	cbz	w0, LBB0_6
; %bb.2:
	ldr	w0, [x19, #56]
	bl	_to_pci_dev
	mov	x20, x0
	ldr	x8, [x19, #48]
	ldr	w0, [x8]
	bl	_ecap_dit
	cbz	w0, LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_pci_physfn
	bl	_pci_dev_id
	b	LBB0_5
LBB0_4:
	mov	x0, #0
LBB0_5:
	str	x0, [x19, #40]
	ldr	w8, [x20]
	cbz	w8, LBB0_7
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_6
; %bb.8:
	mov	x0, x20
	bl	_pci_ats_page_aligned
	cbz	x0, LBB0_6
; %bb.9:
Lloh2:
	adrp	x8, _VTD_PAGE_SHIFT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VTD_PAGE_SHIFT@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_pci_enable_ats
	cbnz	w0, LBB0_6
; %bb.10:
	mov	w8, #1
	str	w8, [x19, #12]
	ldr	w0, [x19, #20]
	bl	_domain_update_iotlb
	mov	x0, x20
	bl	_pci_ats_queue_depth
	str	w0, [x19, #16]
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_device_domain_lock,4,2         ; @device_domain_lock
	.comm	_VTD_PAGE_SHIFT,4,2             ; @VTD_PAGE_SHIFT
	.no_dead_strip	_iommu_enable_dev_iotlb
.subsections_via_symbols
