	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dmar_ir_program_irte
_dmar_ir_program_irte:                  ## @dmar_ir_program_irte
	.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
	movl	%ecx, %ebx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	(%rdi), %rsi
	xorl	%edi, %edi
	cmpq	%r12, %rsi
	seta	%dil
	callq	_KASSERT
	movq	16(%r14), %r15
	movq	_DMAR_IRTE2_SVT_RID@GOTPCREL(%rip), %rax
	movq	_DMAR_IRTE2_SQ_RID@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r13d
	orl	(%rax), %r13d
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	callq	_DMAR_IRTE2_SID_RID
	movl	%eax, %ebx
	orl	%r13d, %ebx
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	movq	_bootverbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movl	8(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdx
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	%ebx, %r8d
	callq	_device_printf
LBB0_2:
	movq	%r14, %rdi
	callq	_DMAR_LOCK
	leaq	(%r15,%r12,8), %r13
	movq	_DMAR_IRTE1_P@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	(%r15,%r12,8), %rdi
	addq	$4, %rdi
	testl	%eax, (%r15,%r12,8)
	je	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	cmpl	%ebx, (%rdi)
	sete	%al
	movslq	%ebx, %rsi
	movl	%eax, %edi
	callq	_KASSERT
	movq	%r13, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_dmar_pte_update
	jmp	LBB0_5
LBB0_4:
	movl	%ebx, %esi
	callq	_dmar_pte_store
	movq	%r13, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_dmar_pte_store
LBB0_5:
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	$1, %edx
	callq	_dmar_qi_invalidate_iec
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DMAR_UNLOCK                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DMAR_IRTE2_SVT_RID,4,2         ## @DMAR_IRTE2_SVT_RID
	.comm	_DMAR_IRTE2_SQ_RID,4,2          ## @DMAR_IRTE2_SQ_RID
	.comm	_bootverbose,8,3                ## @bootverbose
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"programming irte[%d] rid %#x high %#jx low %#jx\n"

	.comm	_DMAR_IRTE1_P,4,2               ## @DMAR_IRTE1_P
	.no_dead_strip	_dmar_ir_program_irte
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dmar_ir_program_irte
_dmar_ir_program_irte:                  ; @dmar_ir_program_irte
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x23, x3
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x1, [x0]
	cmp	x1, x20
	cset	w0, hi
	bl	_KASSERT
Lloh0:
	adrp	x8, _DMAR_IRTE2_SVT_RID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMAR_IRTE2_SVT_RID@GOTPAGEOFF]
	ldr	x24, [x19, #16]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _DMAR_IRTE2_SQ_RID@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DMAR_IRTE2_SQ_RID@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w22, w9, w8
	mov	x0, x23
	bl	_DMAR_IRTE2_SID_RID
	orr	w22, w22, w0
Lloh6:
	adrp	x8, _bootverbose@GOTPAGE
Lloh7:
	ldr	x8, [x8, _bootverbose@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w0, [x19, #8]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	mov	x3, x23
	mov	x4, x22
	mov	x5, x21
	bl	_device_printf
LBB0_2:
	mov	x0, x19
	bl	_DMAR_LOCK
	add	x23, x24, x20, lsl #3
	mov	x0, x23
	ldr	w8, [x0], #4
Lloh11:
	adrp	x9, _DMAR_IRTE1_P@GOTPAGE
Lloh12:
	ldr	x9, [x9, _DMAR_IRTE1_P@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	ldr	w8, [x0]
	cmp	w8, w22
	cset	w0, eq
	sxtw	x1, w22
	bl	_KASSERT
	mov	x0, x23
	mov	x1, x21
	bl	_dmar_pte_update
	b	LBB0_5
LBB0_4:
	mov	x1, x22
	bl	_dmar_pte_store
	mov	x0, x23
	mov	x1, x21
	bl	_dmar_pte_store
LBB0_5:
	mov	x0, x19
	mov	x1, x20
	mov	w2, #1
	bl	_dmar_qi_invalidate_iec
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_DMAR_UNLOCK
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_DMAR_IRTE2_SVT_RID,4,2         ; @DMAR_IRTE2_SVT_RID
	.comm	_DMAR_IRTE2_SQ_RID,4,2          ; @DMAR_IRTE2_SQ_RID
	.comm	_bootverbose,8,3                ; @bootverbose
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"programming irte[%d] rid %#x high %#jx low %#jx\n"

	.comm	_DMAR_IRTE1_P,4,2               ; @DMAR_IRTE1_P
	.no_dead_strip	_dmar_ir_program_irte
.subsections_via_symbols
