	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iommu_set_irq_remapping
_iommu_set_irq_remapping:               ## @iommu_set_irq_remapping
	.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	%esi, %r15d
	movq	%rdi, %r12
	movq	16(%rdi), %rax
	movq	(%rax), %rdi
	callq	_virt_to_phys
	movl	%eax, %ebx
	leaq	4(%r12), %r14
	movq	%r14, %rdi
	callq	_raw_spin_lock_irqsave
	movq	_DMAR_IRTA_REG@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	addq	8(%r12), %r13
	movl	%r15d, %edi
	callq	_IR_X2APIC_MODE
	orl	%eax, %ebx
	movq	_INTR_REMAP_TABLE_REG_SIZE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_dmar_writeq
	movq	_DMA_GCMD_SIRTP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	orl	(%r12), %edi
	movq	_DMAR_GCMD_REG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r12), %rsi
	callq	_writel
	movq	_DMAR_GSTS_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_readl@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	xorl	%ecx, %ecx
	callq	_IOMMU_WAIT_OP
	movq	%r14, %rdi
	callq	_raw_spin_unlock_irqrestore
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_qi_global_iec                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DMAR_IRTA_REG,8,3              ## @DMAR_IRTA_REG
	.comm	_INTR_REMAP_TABLE_REG_SIZE,4,2  ## @INTR_REMAP_TABLE_REG_SIZE
	.comm	_DMA_GCMD_SIRTP,4,2             ## @DMA_GCMD_SIRTP
	.comm	_DMAR_GCMD_REG,8,3              ## @DMAR_GCMD_REG
	.comm	_DMAR_GSTS_REG,4,2              ## @DMAR_GSTS_REG
	.comm	_readl,4,2                      ## @readl
	.comm	_DMA_GSTS_IRTPS,4,2             ## @DMA_GSTS_IRTPS
	.no_dead_strip	_iommu_set_irq_remapping
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iommu_set_irq_remapping
_iommu_set_irq_remapping:               ; @iommu_set_irq_remapping
	.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	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #16]
	ldr	x0, [x8]
	bl	_virt_to_phys
	mov	x21, x0
	add	x22, x19, #4
	mov	x0, x22
	bl	_raw_spin_lock_irqsave
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x9, _DMAR_IRTA_REG@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DMAR_IRTA_REG@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x23, x9, x8
	mov	x0, x20
	bl	_IR_X2APIC_MODE
	orr	w8, w0, w21
Lloh3:
	adrp	x9, _INTR_REMAP_TABLE_REG_SIZE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _INTR_REMAP_TABLE_REG_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w1, w8, w9
	mov	x0, x23
	bl	_dmar_writeq
	ldr	w8, [x19]
Lloh6:
	adrp	x9, _DMA_GCMD_SIRTP@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DMA_GCMD_SIRTP@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w0, w9, w8
	ldr	x8, [x19, #8]
Lloh9:
	adrp	x9, _DMAR_GCMD_REG@GOTPAGE
Lloh10:
	ldr	x9, [x9, _DMAR_GCMD_REG@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
Lloh12:
	adrp	x8, _DMAR_GSTS_REG@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DMAR_GSTS_REG@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _readl@GOTPAGE
Lloh16:
	ldr	x8, [x8, _readl@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #0
	bl	_IOMMU_WAIT_OP
	mov	x0, x22
	bl	_raw_spin_unlock_irqrestore
	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	_qi_global_iec
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DMAR_IRTA_REG,8,3              ; @DMAR_IRTA_REG
	.comm	_INTR_REMAP_TABLE_REG_SIZE,4,2  ; @INTR_REMAP_TABLE_REG_SIZE
	.comm	_DMA_GCMD_SIRTP,4,2             ; @DMA_GCMD_SIRTP
	.comm	_DMAR_GCMD_REG,8,3              ; @DMAR_GCMD_REG
	.comm	_DMAR_GSTS_REG,4,2              ; @DMAR_GSTS_REG
	.comm	_readl,4,2                      ; @readl
	.comm	_DMA_GSTS_IRTPS,4,2             ; @DMA_GSTS_IRTPS
	.no_dead_strip	_iommu_set_irq_remapping
.subsections_via_symbols
