	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cxl_irq_afu
_cxl_irq_afu:                           ## @cxl_irq_afu
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movl	%edi, %r14d
	callq	_irq_get_irq_data
	movl	%eax, %edi
	callq	_irqd_to_hwirq
	movl	%eax, %r12d
	movq	_CXL_IRQ_RANGES@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	testl	%r8d, %r8d
	jle	LBB0_1
## %bb.2:
	movq	24(%r15), %rdx
	movq	32(%r15), %rsi
	xorl	%ecx, %ecx
	xorl	%ebx, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	addl	%eax, %ebx
	incq	%rcx
	cmpq	%rcx, %r8
	je	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %edi
	subl	(%rdx,%rcx,4), %edi
	movl	(%rsi,%rcx,4), %eax
	js	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%eax, %edi
	jge	LBB0_6
## %bb.5:
	addl	%edi, %ebx
	jmp	LBB0_8
LBB0_1:
	xorl	%ecx, %ecx
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_7:
	movl	%r8d, %ecx
LBB0_8:
	xorl	%edi, %edi
	cmpl	%r8d, %ecx
	setge	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movl	16(%r15), %edx
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	movl	%r14d, %ecx
	movl	%r12d, %r8d
	xorl	%eax, %eax
	callq	_WARN
	jmp	LBB0_13
LBB0_10:
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%r14d, %edx
	movl	%r12d, %ecx
	callq	_trace_cxl_afu_irq
	movl	16(%r15), %edx
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	movl	%r14d, %ecx
	movl	%r12d, %r8d
	callq	_pr_devel
	xorl	%edi, %edi
	cmpl	$0, 12(%r15)
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_WARN
	jmp	LBB0_13
LBB0_12:
	leaq	8(%r15), %r14
	movq	%r14, %rdi
	callq	_spin_lock
	decl	%ebx
	movl	12(%r15), %esi
	movl	%ebx, %edi
	callq	_set_bit
	movl	$1, (%r15)
	movq	%r14, %rdi
	callq	_spin_unlock
	addq	$4, %r15
	movq	%r15, %rdi
	callq	_wake_up_all
LBB0_13:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CXL_IRQ_RANGES,4,2             ## @CXL_IRQ_RANGES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Received AFU IRQ out of range for pe %i (virq %i hwirq %lx)\n"

	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
L_.str.1:                               ## @.str.1
	.asciz	"Received AFU interrupt %i for pe: %i (virq %i hwirq %lx)\n"

L_.str.2:                               ## @.str.2
	.asciz	"Received AFU IRQ for context with no IRQ bitmap\n"

	.no_dead_strip	_cxl_irq_afu
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cxl_irq_afu
_cxl_irq_afu:                           ; @cxl_irq_afu
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x1
	mov	x20, x0
	bl	_irq_get_irq_data
	bl	_irqd_to_hwirq
	mov	x22, x0
Lloh0:
	adrp	x8, _CXL_IRQ_RANGES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CXL_IRQ_RANGES@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x9, #0
	mov	w21, #0
	ldp	x10, x11, [x19, #24]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w21, w12, w21
	add	x9, x9, #1
	cmp	x8, x9
	b.eq	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x12, x9, #2
	ldr	w13, [x10, x12]
	ldr	w12, [x11, x12]
	subs	w13, w22, w13
	b.mi	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w13, w12
	b.ge	LBB0_2
; %bb.5:
	add	w21, w13, w21
	b	LBB0_8
LBB0_6:
	mov	w9, #0
	mov	w21, #0
	b	LBB0_8
LBB0_7:
	mov	x9, x8
LBB0_8:
	cmp	w9, w8
	cset	w0, ge
	bl	_unlikely
	cbz	x0, LBB0_10
; %bb.9:
	ldr	w8, [x19, #16]
	stp	x20, x22, [sp, #8]
	str	x8, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_12
LBB0_10:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	mov	x3, x22
	bl	_trace_cxl_afu_irq
	ldr	w2, [x19, #16]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	mov	x3, x20
	mov	x4, x22
	bl	_pr_devel
	ldr	w8, [x19, #12]
	cmp	w8, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_14
; %bb.11:
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_12:
	mov	w0, #1
	bl	_WARN
LBB0_13:
Lloh9:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_14:
	add	x20, x19, #8
	mov	x0, x20
	bl	_spin_lock
	sub	w0, w21, #1
	ldr	w1, [x19, #12]
	bl	_set_bit
	mov	w8, #1
	str	w8, [x19]
	mov	x0, x20
	bl	_spin_unlock
	add	x0, x19, #4
	bl	_wake_up_all
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_CXL_IRQ_RANGES,4,2             ; @CXL_IRQ_RANGES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Received AFU IRQ out of range for pe %i (virq %i hwirq %lx)\n"

	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
l_.str.1:                               ; @.str.1
	.asciz	"Received AFU interrupt %i for pe: %i (virq %i hwirq %lx)\n"

l_.str.2:                               ; @.str.2
	.asciz	"Received AFU IRQ for context with no IRQ bitmap\n"

	.no_dead_strip	_cxl_irq_afu
.subsections_via_symbols
