	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dmar_inst_rmrr_iter
_dmar_inst_rmrr_iter:                   ## @dmar_inst_rmrr_iter
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	movq	_ACPI_DMAR_TYPE_RESERVED_MEMORY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.1:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.2:
	leaq	32(%rdi), %r13
	movslq	24(%rdi), %rax
	addq	%rdi, %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	cmpq	%r13, %rax
	jbe	LBB0_13
## %bb.3:
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	cmpq	-72(%rbp), %r13                 ## 8-byte Folded Reload
	jae	LBB0_13
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %r14
	movslq	(%r13), %rbx
	addq	%rbx, %r13
	movq	8(%r14), %rax
	movq	_ACPI_DMAR_SCOPE_TYPE_ENDPOINT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	$0, -64(%rbp)
	movabsq	$8589934568, %rax               ## imm = 0x1FFFFFFE8
	addq	%rax, %rbx
	shrq	%rbx
	movq	(%rdi), %rdi
	movl	16(%r14), %edx
	leaq	24(%r14), %r12
	movl	%ebx, %esi
	movq	%r12, %rcx
	leaq	-64(%rbp), %r8
	callq	_dmar_path_dev
	testq	%rax, %rax
	je	LBB0_6
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %r15
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_dmar_find
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rax, (%rcx)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_dmar_instantiate_ctx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_12
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	_bootverbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	8(%rax), %esi
	movl	8(%r15), %ecx
	movl	16(%r15), %edx
	movq	-64(%rbp), %r8
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	movl	16(%r14), %edi
	movl	%ebx, %esi
	movq	%r12, %rdx
	callq	_dmar_print_path
	movl	$10, %edi
	callq	_putchar
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	(%r15), %rdi
	movl	16(%r14), %esi
	movq	%r12, %rdx
	movl	%ebx, %ecx
	callq	_dmar_find_by_scope
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rax, (%rcx)
	movq	%r15, %rdi
	jne	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-64(%rbp), %rsi
	movq	(%rdi), %rdx
	movl	16(%r14), %ecx
	movq	%rax, %rdi
	movq	%r12, %r8
	movl	%ebx, %r9d
	pushq	$1
	pushq	$0
	callq	_dmar_get_ctx_for_devpath
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	addq	$16, %rsp
	jmp	LBB0_12
LBB0_13:
	movl	$1, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ACPI_DMAR_TYPE_RESERVED_MEMORY,8,3 ## @ACPI_DMAR_TYPE_RESERVED_MEMORY
	.comm	_ACPI_DMAR_SCOPE_TYPE_ENDPOINT,8,3 ## @ACPI_DMAR_SCOPE_TYPE_ENDPOINT
	.comm	_bootverbose,8,3                ## @bootverbose
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dmar%d no dev found for RMRR [%#jx, %#jx] rid %#x scope path "

	.no_dead_strip	_dmar_inst_rmrr_iter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dmar_inst_rmrr_iter
_dmar_inst_rmrr_iter:                   ; @dmar_inst_rmrr_iter
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _ACPI_DMAR_TYPE_RESERVED_MEMORY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ACPI_DMAR_TYPE_RESERVED_MEMORY@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.1:
	mov	x19, x1
	ldr	x9, [x1]
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.2:
	mov	x20, x0
	add	x25, x0, #32
	ldrsw	x8, [x0, #24]
	add	x26, x0, x8
	cmp	x26, x25
	b.ls	LBB0_13
; %bb.3:
Lloh3:
	adrp	x27, _ACPI_DMAR_SCOPE_TYPE_ENDPOINT@GOTPAGE
Lloh4:
	ldr	x27, [x27, _ACPI_DMAR_SCOPE_TYPE_ENDPOINT@GOTPAGEOFF]
	mov	x28, #8589869056
	movk	x28, #65512
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x25, x25, x21
	cmp	x25, x26
	b.hs	LBB0_13
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x21, [x25]
	ldr	x8, [x25, #8]
	ldr	x9, [x27]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	str	xzr, [sp, #40]
	add	x8, x21, x28
	lsr	x22, x8, #1
	ldr	x0, [x20]
	ldr	w2, [x25, #16]
	add	x23, x25, #24
	add	x4, sp, #40
	mov	x1, x22
	mov	x3, x23
	bl	_dmar_path_dev
	cbz	x0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x24, x0
	mov	w1, #0
	bl	_dmar_find
	ldr	x8, [x19]
	cmp	x8, x0
	b.ne	LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x1, x24
	mov	w2, #1
	bl	_dmar_instantiate_ctx
	b	LBB0_4
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
Lloh5:
	adrp	x8, _bootverbose@GOTPAGE
Lloh6:
	ldr	x8, [x8, _bootverbose@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cbz	x8, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19]
	ldp	x10, x9, [x20, #8]
	ldr	x11, [sp, #40]
	ldr	w8, [x8, #8]
	stp	x10, x11, [sp, #16]
	stp	x8, x9, [sp]
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	ldr	w0, [x25, #16]
	mov	x1, x22
	mov	x2, x23
	bl	_dmar_print_path
	mov	w0, #10
	bl	_putchar
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [x20]
	ldr	w1, [x25, #16]
	mov	x2, x23
	mov	x3, x22
	bl	_dmar_find_by_scope
	ldr	x8, [x19]
	cmp	x8, x0
	b.ne	LBB0_4
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x1, [sp, #40]
	ldr	x2, [x20]
	ldr	w3, [x25, #16]
	mov	x4, x23
	mov	x5, x22
	mov	w6, #0
	mov	w7, #1
	bl	_dmar_get_ctx_for_devpath
	b	LBB0_4
LBB0_13:
	mov	w0, #1
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ACPI_DMAR_TYPE_RESERVED_MEMORY,8,3 ; @ACPI_DMAR_TYPE_RESERVED_MEMORY
	.comm	_ACPI_DMAR_SCOPE_TYPE_ENDPOINT,8,3 ; @ACPI_DMAR_SCOPE_TYPE_ENDPOINT
	.comm	_bootverbose,8,3                ; @bootverbose
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dmar%d no dev found for RMRR [%#jx, %#jx] rid %#x scope path "

	.no_dead_strip	_dmar_inst_rmrr_iter
.subsections_via_symbols
