	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxl_allocate_afu_irqs          ## -- Begin function cxl_allocate_afu_irqs
	.p2align	4, 0x90
_cxl_allocate_afu_irqs:                 ## @cxl_allocate_afu_irqs
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	testl	%esi, %esi
	jne	LBB0_2
## %bb.1:
	movq	8(%rbx), %rax
	movl	(%rax), %esi
LBB0_2:
	movq	%rbx, %rdi
	callq	_afu_allocate_irqs
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_10
## %bb.3:
	movq	_CPU_FTR_HVMODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_has_feature
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_cxl_find_afu_irq
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	8(%rbx), %rcx
	movl	4(%rcx), %edi
	movq	_cxl_ops@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	8(%rcx), %edx
	leaq	L_.str(%rip), %r8
	movq	%rax, %rsi
	movq	%rbx, %rcx
	callq	_cxl_map_irq
LBB0_6:
	movq	(%rbx), %rax
	movq	_STARTED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.7:
	movq	_cxl_ops@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	%rbx, %rdi
	callq	*%rax
	jmp	LBB0_10
LBB0_9:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_WARN
LBB0_10:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CPU_FTR_HVMODE,4,2             ## @CPU_FTR_HVMODE
	.comm	_cxl_ops,8,3                    ## @cxl_ops
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"psl"

	.comm	_STARTED,8,3                    ## @STARTED
L_.str.1:                               ## @.str.1
	.asciz	"BUG: cxl_allocate_afu_irqs must be called prior to starting the context on this platform\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxl_allocate_afu_irqs          ; -- Begin function cxl_allocate_afu_irqs
	.p2align	2
_cxl_allocate_afu_irqs:                 ; @cxl_allocate_afu_irqs
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	cbnz	w1, LBB0_2
; %bb.1:
	ldr	x8, [x19, #8]
	ldr	w1, [x8]
LBB0_2:
	mov	x0, x19
	bl	_afu_allocate_irqs
	mov	x20, x0
	cbnz	w0, LBB0_10
; %bb.3:
Lloh0:
	adrp	x8, _CPU_FTR_HVMODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CPU_FTR_HVMODE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_cpu_has_feature
	cbnz	w0, LBB0_6
; %bb.4:
	mov	x0, x19
	mov	w1, #0
	bl	_cxl_find_afu_irq
	cbz	x0, LBB0_6
; %bb.5:
	mov	x1, x0
	ldr	x8, [x19, #8]
	ldr	w0, [x8, #4]
Lloh3:
	adrp	x8, _cxl_ops@GOTPAGE
Lloh4:
	ldr	x8, [x8, _cxl_ops@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	w2, [x8, #8]
Lloh6:
	adrp	x4, l_.str@PAGE
Lloh7:
	add	x4, x4, l_.str@PAGEOFF
	mov	x3, x19
	bl	_cxl_map_irq
LBB0_6:
	ldr	x8, [x19]
Lloh8:
	adrp	x9, _STARTED@GOTPAGE
Lloh9:
	ldr	x9, [x9, _STARTED@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.7:
Lloh11:
	adrp	x8, _cxl_ops@GOTPAGE
Lloh12:
	ldr	x8, [x8, _cxl_ops@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	ldr	x8, [x8]
	cbz	x8, LBB0_9
; %bb.8:
	mov	x0, x19
	blr	x8
	b	LBB0_10
LBB0_9:
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_WARN
LBB0_10:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_CPU_FTR_HVMODE,4,2             ; @CPU_FTR_HVMODE
	.comm	_cxl_ops,8,3                    ; @cxl_ops
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"psl"

	.comm	_STARTED,8,3                    ; @STARTED
l_.str.1:                               ; @.str.1
	.asciz	"BUG: cxl_allocate_afu_irqs must be called prior to starting the context on this platform\n"

.subsections_via_symbols
