	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iommu_map_ioapic_intr          ## -- Begin function iommu_map_ioapic_intr
	.p2align	4, 0x90
_iommu_map_ioapic_intr:                 ## @iommu_map_ioapic_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r15d
	movl	%ecx, %ebx
	movl	%edx, %r13d
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	16(%rbp), %r14
	leaq	-52(%rbp), %rsi
	callq	_dmar_find_ioapic
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rax, %r12
	cmpl	$0, 4(%rax)
	je	LBB0_2
## %bb.3:
	movl	(%r12), %edi
	movq	_M_FIRSTFIT@GOTPCREL(%rip), %rax
	movq	_M_NOWAIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	leaq	-56(%rbp), %rcx
	movl	$1, %esi
	callq	_vmem_alloc
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %r14d
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	(%rax), %r14d
	setne	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	jmp	LBB0_21
LBB0_2:
	movl	$-1, (%r14)
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_21:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	-56(%rbp), %eax
	cmpl	$128, %r15d
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	je	LBB0_11
## %bb.6:
	cmpl	$129, %r15d
	movq	16(%rbp), %r14
	je	LBB0_10
## %bb.7:
	cmpl	$130, %r15d
	jne	LBB0_12
## %bb.8:
	movq	_DMAR_IRTE1_DLM_ExtINT@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_14
LBB0_11:
	movq	_DMAR_IRTE1_DLM_SMI@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_13
LBB0_10:
	movq	_DMAR_IRTE1_DLM_NMI@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_14
LBB0_12:
	xorl	%edi, %edi
	testl	%r13d, %r13d
	setne	%dil
	movslq	%r15d, %rsi
	callq	_KASSERT
	movq	_DMAR_IRTE1_DLM_FM@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%r13d, %edi
	callq	_DMAR_IRTE1_V
	movl	%eax, %r15d
	orl	%r14d, %r15d
LBB0_13:
	movq	16(%rbp), %r14
LBB0_14:
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movq	%r12, %rdi
	callq	_DMAR_X2APIC
	movl	%r13d, %edi
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	callq	_DMAR_IRTE1_DST_x2APIC
	testl	%ebx, %ebx
	jne	LBB0_18
LBB0_19:
	movq	_DMAR_IRTE1_TM_LEVEL@GOTPCREL(%rip), %rcx
	jmp	LBB0_20
LBB0_16:
	callq	_DMAR_IRTE1_DST_xAPIC
	testl	%ebx, %ebx
	je	LBB0_19
LBB0_18:
	movq	_DMAR_IRTE1_TM_EDGE@GOTPCREL(%rip), %rcx
LBB0_20:
	movq	_DMAR_IRTE1_RH_DIRECT@GOTPCREL(%rip), %rdx
	movq	_DMAR_IRTE1_DM_PHYSICAL@GOTPCREL(%rip), %rsi
	orl	%r15d, %eax
	orl	(%rcx), %eax
	orl	(%rdx), %eax
	orl	(%rsi), %eax
	movq	_DMAR_IRTE1_P@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	-52(%rbp), %ecx
	movq	%r12, %rdi
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_dmar_ir_program_irte
	movl	%ebx, (%r14)
	xorl	%r14d, %r14d
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_M_FIRSTFIT,4,2                 ## @M_FIRSTFIT
	.comm	_M_NOWAIT,4,2                   ## @M_NOWAIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"impossible EOPNOTSUPP from vmem"

	.comm	_DMAR_IRTE1_DLM_ExtINT,4,2      ## @DMAR_IRTE1_DLM_ExtINT
	.comm	_DMAR_IRTE1_DLM_NMI,4,2         ## @DMAR_IRTE1_DLM_NMI
	.comm	_DMAR_IRTE1_DLM_SMI,4,2         ## @DMAR_IRTE1_DLM_SMI
	.comm	_DMAR_IRTE1_DLM_FM,4,2          ## @DMAR_IRTE1_DLM_FM
	.comm	_DMAR_IRTE1_TM_EDGE,4,2         ## @DMAR_IRTE1_TM_EDGE
	.comm	_DMAR_IRTE1_TM_LEVEL,4,2        ## @DMAR_IRTE1_TM_LEVEL
	.comm	_DMAR_IRTE1_RH_DIRECT,4,2       ## @DMAR_IRTE1_RH_DIRECT
	.comm	_DMAR_IRTE1_DM_PHYSICAL,4,2     ## @DMAR_IRTE1_DM_PHYSICAL
	.comm	_DMAR_IRTE1_P,4,2               ## @DMAR_IRTE1_P
	.comm	_IOART_TRGREDG,8,3              ## @IOART_TRGREDG
	.comm	_IOART_TRGRLVL,8,3              ## @IOART_TRGRLVL
	.comm	_IOART_INTAHI,8,3               ## @IOART_INTAHI
	.comm	_IOART_INTALO,8,3               ## @IOART_INTALO
	.comm	_IOART_DELFIXED,8,3             ## @IOART_DELFIXED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iommu_map_ioapic_intr          ; -- Begin function iommu_map_ioapic_intr
	.p2align	2
_iommu_map_ioapic_intr:                 ; @iommu_map_ioapic_intr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x19, x6
	mov	x25, x5
	mov	x21, x3
	mov	x24, x2
	mov	x23, x1
	add	x1, sp, #8
	bl	_dmar_find_ioapic
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	ldr	w8, [x0, #4]
	cbz	w8, LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _M_FIRSTFIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _M_FIRSTFIT@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _M_NOWAIT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _M_NOWAIT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w2, w9, w8
	add	x3, sp, #12
	mov	w1, #1
	bl	_vmem_alloc
	cbz	w0, LBB0_6
; %bb.3:
	mov	x26, x0
Lloh6:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w0, w8
	cset	w0, ne
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
	b	LBB0_5
LBB0_4:
	mov	w8, #-1
	str	w8, [x19]
Lloh11:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh13:
	ldr	w26, [x8]
LBB0_5:
	mov	x0, x26
	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
	add	sp, sp, #96
	ret
LBB0_6:
	ldr	w22, [sp, #12]
	cmp	w25, #128
	b.eq	LBB0_10
; %bb.7:
	cmp	w25, #129
	b.eq	LBB0_11
; %bb.8:
	cmp	w25, #130
	b.ne	LBB0_12
; %bb.9:
Lloh14:
	adrp	x8, _DMAR_IRTE1_DLM_ExtINT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DMAR_IRTE1_DLM_ExtINT@GOTPAGEOFF]
Lloh16:
	ldr	w24, [x8]
	b	LBB0_13
LBB0_10:
Lloh17:
	adrp	x8, _DMAR_IRTE1_DLM_SMI@GOTPAGE
Lloh18:
	ldr	x8, [x8, _DMAR_IRTE1_DLM_SMI@GOTPAGEOFF]
Lloh19:
	ldr	w24, [x8]
	b	LBB0_13
LBB0_11:
Lloh20:
	adrp	x8, _DMAR_IRTE1_DLM_NMI@GOTPAGE
Lloh21:
	ldr	x8, [x8, _DMAR_IRTE1_DLM_NMI@GOTPAGEOFF]
Lloh22:
	ldr	w24, [x8]
	b	LBB0_13
LBB0_12:
	cmp	w24, #0
	cset	w0, ne
	sxtw	x1, w25
	bl	_KASSERT
Lloh23:
	adrp	x8, _DMAR_IRTE1_DLM_FM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _DMAR_IRTE1_DLM_FM@GOTPAGEOFF]
Lloh25:
	ldr	w25, [x8]
	mov	x0, x24
	bl	_DMAR_IRTE1_V
	orr	w24, w0, w25
LBB0_13:
	mov	x0, x20
	bl	_DMAR_X2APIC
	cbz	x0, LBB0_15
; %bb.14:
	mov	x0, x23
	bl	_DMAR_IRTE1_DST_x2APIC
	b	LBB0_16
LBB0_15:
	mov	x0, x23
	bl	_DMAR_IRTE1_DST_xAPIC
LBB0_16:
Lloh26:
	adrp	x8, _DMAR_IRTE1_TM_EDGE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _DMAR_IRTE1_TM_EDGE@GOTPAGEOFF]
Lloh28:
	adrp	x9, _DMAR_IRTE1_TM_LEVEL@GOTPAGE
Lloh29:
	ldr	x9, [x9, _DMAR_IRTE1_TM_LEVEL@GOTPAGEOFF]
	cmp	w21, #0
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
Lloh30:
	adrp	x9, _DMAR_IRTE1_RH_DIRECT@GOTPAGE
Lloh31:
	ldr	x9, [x9, _DMAR_IRTE1_RH_DIRECT@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
Lloh33:
	adrp	x10, _DMAR_IRTE1_DM_PHYSICAL@GOTPAGE
Lloh34:
	ldr	x10, [x10, _DMAR_IRTE1_DM_PHYSICAL@GOTPAGEOFF]
Lloh35:
	ldr	w10, [x10]
Lloh36:
	adrp	x11, _DMAR_IRTE1_P@GOTPAGE
Lloh37:
	ldr	x11, [x11, _DMAR_IRTE1_P@GOTPAGEOFF]
Lloh38:
	ldr	w11, [x11]
	orr	w12, w0, w24
	orr	w8, w12, w8
	orr	w8, w8, w9
	orr	w8, w8, w10
	orr	w2, w8, w11
	ldr	w3, [sp, #8]
	mov	x0, x20
	mov	x1, x22
	bl	_dmar_ir_program_irte
	mov	w26, #0
	str	w22, [x19]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_M_FIRSTFIT,4,2                 ; @M_FIRSTFIT
	.comm	_M_NOWAIT,4,2                   ; @M_NOWAIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"impossible EOPNOTSUPP from vmem"

	.comm	_DMAR_IRTE1_DLM_ExtINT,4,2      ; @DMAR_IRTE1_DLM_ExtINT
	.comm	_DMAR_IRTE1_DLM_NMI,4,2         ; @DMAR_IRTE1_DLM_NMI
	.comm	_DMAR_IRTE1_DLM_SMI,4,2         ; @DMAR_IRTE1_DLM_SMI
	.comm	_DMAR_IRTE1_DLM_FM,4,2          ; @DMAR_IRTE1_DLM_FM
	.comm	_DMAR_IRTE1_TM_EDGE,4,2         ; @DMAR_IRTE1_TM_EDGE
	.comm	_DMAR_IRTE1_TM_LEVEL,4,2        ; @DMAR_IRTE1_TM_LEVEL
	.comm	_DMAR_IRTE1_RH_DIRECT,4,2       ; @DMAR_IRTE1_RH_DIRECT
	.comm	_DMAR_IRTE1_DM_PHYSICAL,4,2     ; @DMAR_IRTE1_DM_PHYSICAL
	.comm	_DMAR_IRTE1_P,4,2               ; @DMAR_IRTE1_P
	.comm	_IOART_TRGREDG,8,3              ; @IOART_TRGREDG
	.comm	_IOART_TRGRLVL,8,3              ; @IOART_TRGRLVL
	.comm	_IOART_INTAHI,8,3               ; @IOART_INTAHI
	.comm	_IOART_INTALO,8,3               ; @IOART_INTALO
	.comm	_IOART_DELFIXED,8,3             ; @IOART_DELFIXED
.subsections_via_symbols
