	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_setup_irq_remapping
_intel_setup_irq_remapping:             ## @intel_setup_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
	xorl	%eax, %eax
	cmpq	$0, (%rdi)
	jne	LBB0_23
## %bb.1:
	movq	%rdi, %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_15
## %bb.2:
	movq	%rax, %r14
	movl	28(%r12), %edi
	movq	___GFP_ZERO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	(%rbx), %esi
	movq	_INTR_REMAP_PAGE_ORDER@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	callq	_alloc_pages_node
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r15
	movq	_INTR_REMAP_TABLE_ENTRIES@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_bitmap_zalloc
	movl	16(%r12), %esi
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%r13, %rbx
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	L_.str.2(%rip), %rdi
	callq	_irq_domain_alloc_named_id_fwnode
	testq	%rax, %rax
	je	LBB0_12
## %bb.7:
	movq	%rax, %r13
	xorl	%eax, %eax
	callq	_arch_get_ir_parent_domain
	movl	(%rbx), %edx
	movq	_intel_ir_domain_ops@GOTPCREL(%rip), %r8
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%r13, %rcx
	movq	%r12, %r9
	callq	_irq_domain_create_hierarchy
	movl	%eax, 20(%r12)
	movq	%r13, %rdi
	callq	_irq_domain_free_fwnode
	movl	16(%r12), %edx
	movl	20(%r12), %edi
	testl	%edi, %edi
	je	LBB0_8
## %bb.9:
	leaq	L_.str.4(%rip), %rsi
	callq	_arch_create_remap_msi_irq_domain
	movl	%eax, 24(%r12)
	movq	%r15, %rdi
	callq	_page_address
	movl	%eax, 8(%r14)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%r14)
	movq	%r14, (%r12)
	cmpl	$0, 12(%r12)
	je	LBB0_10
LBB0_16:
	movq	%r12, %rdi
	callq	_init_ir_status
	movq	%r12, %rdi
	callq	_ir_pre_enabled
	testq	%rax, %rax
	je	LBB0_22
## %bb.17:
	xorl	%eax, %eax
	callq	_is_kdump_kernel
	testl	%eax, %eax
	je	LBB0_18
## %bb.19:
	movq	%r12, %rdi
	callq	_iommu_load_old_irte
	movl	8(%r12), %esi
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	leaq	L_.str.7(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_22
LBB0_3:
	movl	16(%r12), %esi
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_14
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_13
LBB0_8:
	leaq	L_.str.3(%rip), %rdi
	movl	%edx, %esi
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_12
LBB0_10:
	movl	$-1, %edi
	movq	%r12, %rsi
	callq	_dmar_fault
	movq	%r12, %rdi
	callq	_dmar_disable_qi
	movq	%r12, %rdi
	callq	_dmar_enable_qi
	testq	%rax, %rax
	je	LBB0_16
## %bb.11:
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_err
LBB0_12:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_bitmap_free
	movq	_INTR_REMAP_PAGE_ORDER@GOTPCREL(%rip), %rbx
LBB0_13:
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	___free_pages
LBB0_14:
	movq	%r14, %rdi
	callq	_kfree
	movq	$0, (%r12)
LBB0_15:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_23:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movl	8(%r12), %esi
	leaq	L_.str.6(%rip), %rdi
	callq	_pr_warn
	movq	%r12, %rdi
	callq	_clear_ir_pre_enabled
	movq	%r12, %rdi
	callq	_iommu_disable_irq_remapping
	jmp	LBB0_22
LBB0_21:
	leaq	L_.str.8(%rip), %rdi
	callq	_pr_info
LBB0_22:
	movq	_eim_mode@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_iommu_set_irq_remapping
	xorl	%eax, %eax
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	___GFP_ZERO,4,2                 ## @__GFP_ZERO
	.comm	_INTR_REMAP_PAGE_ORDER,4,2      ## @INTR_REMAP_PAGE_ORDER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IR%d: failed to allocate pages of order %d\n"

	.comm	_INTR_REMAP_TABLE_ENTRIES,4,2   ## @INTR_REMAP_TABLE_ENTRIES
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
L_.str.1:                               ## @.str.1
	.asciz	"IR%d: failed to allocate bitmap\n"

L_.str.2:                               ## @.str.2
	.asciz	"INTEL-IR"

	.comm	_intel_ir_domain_ops,4,2        ## @intel_ir_domain_ops
L_.str.3:                               ## @.str.3
	.asciz	"IR%d: failed to allocate irqdomain\n"

L_.str.4:                               ## @.str.4
	.asciz	"INTEL-IR-MSI"

L_.str.5:                               ## @.str.5
	.asciz	"Failed to enable queued invalidation\n"

L_.str.6:                               ## @.str.6
	.asciz	"IRQ remapping was enabled on %s but we are not in kdump mode\n"

L_.str.7:                               ## @.str.7
	.asciz	"Failed to copy IR table for %s from previous kernel\n"

L_.str.8:                               ## @.str.8
	.asciz	"Copied IR table for %s from previous kernel\n"

	.comm	_eim_mode,4,2                   ## @eim_mode
	.no_dead_strip	_intel_setup_irq_remapping
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_setup_irq_remapping
_intel_setup_irq_remapping:             ; @intel_setup_irq_remapping
	.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
	ldr	x8, [x0]
	cbz	x8, LBB0_2
LBB0_1:
	mov	w0, #0
	b	LBB0_22
LBB0_2:
	mov	x19, x0
Lloh0:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_21
; %bb.3:
	mov	x20, x0
	ldr	w0, [x19, #28]
Lloh2:
	adrp	x8, ___GFP_ZERO@GOTPAGE
Lloh3:
	ldr	x8, [x8, ___GFP_ZERO@GOTPAGEOFF]
	ldr	w9, [x21]
Lloh4:
	ldr	w8, [x8]
	orr	w1, w8, w9
Lloh5:
	adrp	x24, _INTR_REMAP_PAGE_ORDER@GOTPAGE
Lloh6:
	ldr	x24, [x24, _INTR_REMAP_PAGE_ORDER@GOTPAGEOFF]
	ldr	w2, [x24]
	bl	_alloc_pages_node
	cbz	x0, LBB0_12
; %bb.4:
	mov	x21, x0
Lloh7:
	adrp	x25, _INTR_REMAP_TABLE_ENTRIES@GOTPAGE
Lloh8:
	ldr	x25, [x25, _INTR_REMAP_TABLE_ENTRIES@GOTPAGEOFF]
	ldr	w0, [x25]
Lloh9:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_bitmap_zalloc
	ldr	w1, [x19, #16]
	cbz	x0, LBB0_13
; %bb.5:
	mov	x22, x0
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_irq_domain_alloc_named_id_fwnode
	cbz	x0, LBB0_18
; %bb.6:
	mov	x23, x0
	bl	_arch_get_ir_parent_domain
	ldr	w2, [x25]
Lloh14:
	adrp	x4, _intel_ir_domain_ops@GOTPAGE
Lloh15:
	ldr	x4, [x4, _intel_ir_domain_ops@GOTPAGEOFF]
	mov	w1, #0
	mov	x3, x23
	mov	x5, x19
	bl	_irq_domain_create_hierarchy
	str	w0, [x19, #20]
	mov	x0, x23
	bl	_irq_domain_free_fwnode
	ldp	w2, w0, [x19, #16]
	cbz	w0, LBB0_14
; %bb.7:
Lloh16:
	adrp	x1, l_.str.4@PAGE
Lloh17:
	add	x1, x1, l_.str.4@PAGEOFF
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_arch_create_remap_msi_irq_domain
	str	w0, [x19, #24]
	mov	x0, x21
	bl	_page_address
	str	w0, [x20, #8]
	str	x22, [x20]
	str	x20, [x19]
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_15
LBB0_8:
	mov	x0, x19
	bl	_init_ir_status
	mov	x0, x19
	bl	_ir_pre_enabled
	cbz	x0, LBB0_25
; %bb.9:
	bl	_is_kdump_kernel
	cbz	w0, LBB0_23
; %bb.10:
	mov	x0, x19
	bl	_iommu_load_old_irte
	ldr	w1, [x19, #8]
	cbz	x0, LBB0_24
; %bb.11:
	str	x1, [sp]
Lloh18:
	adrp	x0, l_.str.7@PAGE
Lloh19:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_pr_err
	b	LBB0_25
LBB0_12:
	ldr	w8, [x19, #16]
	ldr	w9, [x24]
	stp	x8, x9, [sp]
Lloh20:
	adrp	x0, l_.str@PAGE
Lloh21:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	b	LBB0_20
LBB0_13:
	str	x1, [sp]
Lloh22:
	adrp	x0, l_.str.1@PAGE
Lloh23:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
	b	LBB0_19
LBB0_14:
	str	x2, [sp]
Lloh24:
	adrp	x0, l_.str.3@PAGE
Lloh25:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_17
LBB0_15:
	mov	w0, #-1
	mov	x1, x19
	bl	_dmar_fault
	mov	x0, x19
	bl	_dmar_disable_qi
	mov	x0, x19
	bl	_dmar_enable_qi
	cbz	x0, LBB0_8
; %bb.16:
Lloh26:
	adrp	x0, l_.str.5@PAGE
Lloh27:
	add	x0, x0, l_.str.5@PAGEOFF
LBB0_17:
	bl	_pr_err
LBB0_18:
	mov	x0, x22
	bl	_bitmap_free
LBB0_19:
	ldr	w1, [x24]
	mov	x0, x21
	bl	___free_pages
LBB0_20:
	mov	x0, x20
	bl	_kfree
	str	xzr, [x19]
LBB0_21:
Lloh28:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_22:
	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_23:
	ldr	w1, [x19, #8]
Lloh31:
	adrp	x0, l_.str.6@PAGE
Lloh32:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_pr_warn
	mov	x0, x19
	bl	_clear_ir_pre_enabled
	mov	x0, x19
	bl	_iommu_disable_irq_remapping
	b	LBB0_25
LBB0_24:
Lloh33:
	adrp	x0, l_.str.8@PAGE
Lloh34:
	add	x0, x0, l_.str.8@PAGEOFF
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_pr_info
LBB0_25:
Lloh35:
	adrp	x8, _eim_mode@GOTPAGE
Lloh36:
	ldr	x8, [x8, _eim_mode@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_iommu_set_irq_remapping
	b	LBB0_1
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	___GFP_ZERO,4,2                 ; @__GFP_ZERO
	.comm	_INTR_REMAP_PAGE_ORDER,4,2      ; @INTR_REMAP_PAGE_ORDER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IR%d: failed to allocate pages of order %d\n"

	.comm	_INTR_REMAP_TABLE_ENTRIES,4,2   ; @INTR_REMAP_TABLE_ENTRIES
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
l_.str.1:                               ; @.str.1
	.asciz	"IR%d: failed to allocate bitmap\n"

l_.str.2:                               ; @.str.2
	.asciz	"INTEL-IR"

	.comm	_intel_ir_domain_ops,4,2        ; @intel_ir_domain_ops
l_.str.3:                               ; @.str.3
	.asciz	"IR%d: failed to allocate irqdomain\n"

l_.str.4:                               ; @.str.4
	.asciz	"INTEL-IR-MSI"

l_.str.5:                               ; @.str.5
	.asciz	"Failed to enable queued invalidation\n"

l_.str.6:                               ; @.str.6
	.asciz	"IRQ remapping was enabled on %s but we are not in kdump mode\n"

l_.str.7:                               ; @.str.7
	.asciz	"Failed to copy IR table for %s from previous kernel\n"

l_.str.8:                               ; @.str.8
	.asciz	"Copied IR table for %s from previous kernel\n"

	.comm	_eim_mode,4,2                   ; @eim_mode
	.no_dead_strip	_intel_setup_irq_remapping
.subsections_via_symbols
