	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dmar_remap_intr
_dmar_remap_intr:                       ## @dmar_remap_intr
	.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	%rdx, %r13
	movl	%edi, %r15d
	callq	_device_get_softc
	movq	%rax, %r14
	movq	_DMAR_INTR_TOTAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_6
## %bb.1:
	movq	(%r14), %r12
	shlq	$3, %rax
	leaq	(%rax,%rax,4), %rax
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%r13, (%r12,%rbx)
	je	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	addq	$40, %rbx
	cmpq	%rbx, %rax
	jne	LBB0_2
LBB0_6:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_7
LBB0_3:
	movl	%r15d, %edi
	callq	_device_get_parent
	movl	%eax, %edi
	callq	_device_get_parent
	leaq	-48(%rbp), %rcx
	leaq	-44(%rbp), %r8
	movl	%eax, %edi
	movl	%r15d, %esi
	movq	%r13, %rdx
	callq	_PCIB_MAP_MSI
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	movq	%r14, %rdi
	callq	_DMAR_LOCK
	movq	%r14, %rdi
	callq	*32(%r12,%rbx)
	movl	24(%r12,%rbx), %esi
	movl	-44(%rbp), %edx
	movq	%r14, %rdi
	callq	_dmar_write4
	movl	20(%r12,%rbx), %esi
	movl	-48(%rbp), %edx
	movq	%r14, %rdi
	callq	_dmar_write4
	movl	16(%r12,%rbx), %esi
	movq	%r14, %rdi
	callq	_dmar_write4
	movq	%r14, %rdi
	callq	*8(%r12,%rbx)
	movq	%r14, %rdi
	callq	_DMAR_UNLOCK
	xorl	%eax, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMAR_INTR_TOTAL,4,2            ## @DMAR_INTR_TOTAL
	.comm	_ENOENT,4,2                     ## @ENOENT
	.no_dead_strip	_dmar_remap_intr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dmar_remap_intr
_dmar_remap_intr:                       ; @dmar_remap_intr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x2
	mov	x21, x0
	bl	_device_get_softc
Lloh0:
	adrp	x8, _DMAR_INTR_TOTAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMAR_INTR_TOTAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	x9, [x0]
	add	x22, x9, #16
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldur	x9, [x22, #-16]
	cmp	x9, x20
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x22, x22, #40
	subs	x8, x8, #1
	b.ne	LBB0_2
LBB0_4:
Lloh3:
	adrp	x8, _ENOENT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	b	LBB0_7
LBB0_5:
	mov	x0, x21
	bl	_device_get_parent
	bl	_device_get_parent
	add	x3, sp, #12
	add	x4, sp, #8
	mov	x1, x21
	mov	x2, x20
	bl	_PCIB_MAP_MSI
	cbnz	w0, LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_DMAR_LOCK
	ldr	x8, [x22, #16]
	mov	x0, x19
	blr	x8
	ldr	w1, [x22, #8]
	ldr	w2, [sp, #8]
	mov	x0, x19
	bl	_dmar_write4
	ldr	w1, [x22, #4]
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_dmar_write4
	ldr	w1, [x22]
	mov	x0, x19
	bl	_dmar_write4
	ldur	x8, [x22, #-8]
	mov	x0, x19
	blr	x8
	mov	x0, x19
	bl	_DMAR_UNLOCK
	mov	w0, #0
LBB0_7:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_DMAR_INTR_TOTAL,4,2            ; @DMAR_INTR_TOTAL
	.comm	_ENOENT,4,2                     ; @ENOENT
	.no_dead_strip	_dmar_remap_intr
.subsections_via_symbols
