	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vtd_device_scope
_vtd_device_scope:                      ## @vtd_device_scope
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	movq	_drhd_num@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_15
## %bb.1:
	xorl	%ecx, %ecx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	incq	%rcx
	movq	_drhd_num@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %rcx
	jge	LBB0_15
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
                                        ##       Child Loop BB0_12 Depth 3
	movq	_drhds@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	(%rax,%rcx,8), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	4(%rax), %edi
	callq	_VTD_DRHD_INCLUDE_PCI_ALL
	testq	%rax, %rax
	jne	LBB0_14
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movslq	(%rax), %rax
	leal	-8(%rax), %r15d
	cmpl	$17, %r15d
	jb	LBB0_2
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	addq	%rax, -56(%rbp)                 ## 8-byte Folded Spill
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_7 Depth=2
	cmpl	$16, %r15d
	jbe	LBB0_2
LBB0_7:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_12 Depth 3
	movslq	%r15d, %r15
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	subq	%r15, %rbx
	subl	(%rbx), %r15d
	movl	4(%rbx), %eax
	decl	%eax
	cmpl	$1, %eax
	ja	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_PCI_RID2BUS
	cmpq	8(%rbx), %rax
	jne	LBB0_6
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=2
	movslq	(%rbx), %rax
	leal	-16(%rax), %r12d
	cmpl	$16, %r12d
	jb	LBB0_6
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=2
	addq	%rax, %rbx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_12 Depth=3
	addl	$-16, %r12d
	cmpl	$15, %r12d
	jbe	LBB0_6
LBB0_12:                                ##   Parent Loop BB0_3 Depth=1
                                        ##     Parent Loop BB0_7 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movslq	%r12d, %r14
	movq	%rbx, %r13
	subq	%r14, %r13
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_PCI_RID2SLOT
	cmpq	(%r13), %rax
	jne	LBB0_11
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=3
	negq	%r14
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_PCI_RID2FUNC
	cmpq	8(%rbx,%r14), %rax
	jne	LBB0_11
LBB0_14:
	movl	-64(%rbp), %eax                 ## 4-byte Reload
	movq	_vtdmaps@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx,%rax,8), %rax
	jmp	LBB0_16
LBB0_15:
	xorl	%eax, %eax
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_drhd_num,4,2                   ## @drhd_num
	.comm	_drhds,8,3                      ## @drhds
	.comm	_vtdmaps,8,3                    ## @vtdmaps
	.no_dead_strip	_vtd_device_scope
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vtd_device_scope
_vtd_device_scope:                      ; @vtd_device_scope
	.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	x20, _drhd_num@GOTPAGE
Lloh1:
	ldr	x20, [x20, _drhd_num@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.1:
	mov	x19, x0
	mov	x21, #0
Lloh2:
	adrp	x22, _drhds@GOTPAGE
Lloh3:
	ldr	x22, [x22, _drhds@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x20]
	cmp	x21, x8
	b.ge	LBB0_15
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
                                        ;       Child Loop BB0_12 Depth 3
	ldr	x8, [x22]
	ldr	x24, [x8, x21, lsl #3]
	ldr	w0, [x24, #4]
	bl	_VTD_DRHD_INCLUDE_PCI_ALL
	cbnz	x0, LBB0_14
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldrsw	x8, [x24]
	sub	w23, w8, #8
	cmp	w23, #17
	b.lo	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x24, x24, x8
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	sub	w23, w23, w25
	cmp	w23, #16
	b.ls	LBB0_2
LBB0_7:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_12 Depth 3
	sub	x27, x24, w23, sxtw
	ldp	w25, w8, [x27]
	sub	w8, w8, #1
	cmp	w8, #1
	b.hi	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	mov	x0, x19
	bl	_PCI_RID2BUS
	ldr	x8, [x27, #8]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=2
	ldrsw	x8, [x27]
	sub	w26, w8, #16
	cmp	w26, #16
	b.lo	LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=2
	add	x27, x27, x8
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=3
	sub	w26, w26, #16
	cmp	w26, #15
	b.ls	LBB0_6
LBB0_12:                                ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_7 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	sub	x28, x27, w26, sxtw
	mov	x0, x19
	bl	_PCI_RID2SLOT
	ldr	x8, [x28]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=3
	mov	x0, x19
	bl	_PCI_RID2FUNC
	ldr	x8, [x28, #8]
	cmp	x0, x8
	b.ne	LBB0_11
LBB0_14:
Lloh4:
	adrp	x8, _vtdmaps@GOTPAGE
Lloh5:
	ldr	x8, [x8, _vtdmaps@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	ldr	x0, [x8, w21, uxtw #3]
	b	LBB0_16
LBB0_15:
	mov	x0, #0
LBB0_16:
	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	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_drhd_num,4,2                   ; @drhd_num
	.comm	_drhds,8,3                      ; @drhds
	.comm	_vtdmaps,8,3                    ; @vtdmaps
	.no_dead_strip	_vtd_device_scope
.subsections_via_symbols
