	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function prealloc_protection_domains
_prealloc_protection_domains:           ## @prealloc_protection_domains
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_PCI_ANY_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, %esi
	xorl	%edx, %edx
	callq	_pci_get_device
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movq	%rax, %rbx
	jmp	LBB0_2
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	addq	$8, %r14
	movq	%r14, %rdi
	movq	_iommu_pd_list@GOTPCREL(%rip), %rsi
	callq	_list_add_tail
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_PCI_ANY_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, %esi
	movq	%rbx, %rdx
	callq	_pci_get_device
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_10
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	callq	_calc_devid
	movq	%rax, %r15
	movq	_amd_iommu_last_bdf@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	ja	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_amd_iommu_alias_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%r15,8), %r12
	movq	%r12, %rdi
	callq	_domain_for_device
	testq	%rax, %rax
	jne	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_amd_iommu_rlookup_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%r12,8), %r13
	testq	%r13, %r13
	je	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	callq	_dma_ops_domain_alloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r14
	movq	%rax, %rdi
	movq	%r12, %rsi
	callq	_init_unity_mappings_for_device
	movq	%r12, (%r14)
	leaq	12(%r14), %rsi
	movq	%r13, %rdi
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdx
	callq	_attach_device
	cmpq	%r12, %r15
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%r15, %rdx
	callq	_attach_device
	jmp	LBB0_8
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_ANY_ID,4,2                 ## @PCI_ANY_ID
	.comm	_amd_iommu_last_bdf,8,3         ## @amd_iommu_last_bdf
	.comm	_amd_iommu_alias_table,8,3      ## @amd_iommu_alias_table
	.comm	_amd_iommu_rlookup_table,8,3    ## @amd_iommu_rlookup_table
	.comm	_iommu_pd_list,4,2              ## @iommu_pd_list
	.no_dead_strip	_prealloc_protection_domains
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function prealloc_protection_domains
_prealloc_protection_domains:           ; @prealloc_protection_domains
	.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
Lloh0:
	adrp	x26, _PCI_ANY_ID@GOTPAGE
Lloh1:
	ldr	x26, [x26, _PCI_ANY_ID@GOTPAGEOFF]
	ldr	w0, [x26]
	mov	x1, x0
	mov	x2, #0
	bl	_pci_get_device
	cbz	x0, LBB0_10
; %bb.1:
	mov	x19, x0
Lloh2:
	adrp	x27, _amd_iommu_last_bdf@GOTPAGE
Lloh3:
	ldr	x27, [x27, _amd_iommu_last_bdf@GOTPAGEOFF]
Lloh4:
	adrp	x28, _amd_iommu_alias_table@GOTPAGE
Lloh5:
	ldr	x28, [x28, _amd_iommu_alias_table@GOTPAGEOFF]
Lloh6:
	adrp	x20, _amd_iommu_rlookup_table@GOTPAGE
Lloh7:
	ldr	x20, [x20, _amd_iommu_rlookup_table@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x0, x24, #8
Lloh8:
	adrp	x1, _iommu_pd_list@GOTPAGE
Lloh9:
	ldr	x1, [x1, _iommu_pd_list@GOTPAGEOFF]
	bl	_list_add_tail
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x26]
	mov	x1, x0
	mov	x2, x19
	bl	_pci_get_device
	mov	x19, x0
	cbz	x0, LBB0_10
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_calc_devid
	ldr	x8, [x27]
	cmp	x0, x8
	b.hi	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x21, x0
	ldr	x8, [x28]
	ldr	x22, [x8, x0, lsl #3]
	mov	x0, x22
	bl	_domain_for_device
	cbnz	x0, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x20]
	ldr	x23, [x8, x22, lsl #3]
	cbz	x23, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x23
	bl	_dma_ops_domain_alloc
	cbz	x0, LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x24, x0
	mov	x1, x22
	bl	_init_unity_mappings_for_device
	mov	x25, x24
	str	x22, [x25], #12
	mov	x0, x23
	mov	x1, x25
	mov	x2, x22
	bl	_attach_device
	cmp	x21, x22
	b.eq	LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x23
	mov	x1, x25
	mov	x2, x21
	bl	_attach_device
	b	LBB0_2
LBB0_10:
	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	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_ANY_ID,4,2                 ; @PCI_ANY_ID
	.comm	_amd_iommu_last_bdf,8,3         ; @amd_iommu_last_bdf
	.comm	_amd_iommu_alias_table,8,3      ; @amd_iommu_alias_table
	.comm	_amd_iommu_rlookup_table,8,3    ; @amd_iommu_rlookup_table
	.comm	_iommu_pd_list,4,2              ; @iommu_pd_list
	.no_dead_strip	_prealloc_protection_domains
.subsections_via_symbols
