	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setup_xsl_irq
_setup_xsl_irq:                         ## @setup_xsl_irq
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	16(%rsi), %r14
	leaq	-36(%rbp), %rsi
	callq	_pnv_ocxl_get_xsl_irq
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.1:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_map_irq_registers
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.2:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%r12), %edx
	movl	(%r12), %r8d
	movl	4(%r12), %ecx
	leaq	L_.str(%rip), %rsi
	callq	_kasprintf
	movl	%eax, (%r14)
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	-36(%rbp), %esi
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_irq_create_mapping
	movl	%eax, 4(%r14)
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	-36(%rbp), %edx
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %ecx
	callq	_dev_dbg
	movl	(%r14), %ecx
	movl	4(%r14), %edi
	movq	_xsl_fault_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	movq	%r12, %r8
	callq	_request_irq
	testl	%eax, %eax
	je	LBB0_10
## %bb.7:
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	4(%r14), %edi
	callq	_irq_dispose_mapping
	jmp	LBB0_8
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_9
LBB0_5:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_8:
	movl	(%r14), %edi
	callq	_kfree
LBB0_9:
	negl	%ebx
	movq	%r14, %rdi
	callq	_unmap_irq_registers
LBB0_10:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ocxl-xsl-%x-%x-%x"

L_.str.1:                               ## @.str.1
	.asciz	"Can't allocate name for xsl interrupt\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.2:                               ## @.str.2
	.asciz	"irq_create_mapping failed for translation interrupt\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.3:                               ## @.str.3
	.asciz	"hwirq %d mapped to virq %d\n"

	.comm	_xsl_fault_handler,4,2          ## @xsl_fault_handler
L_.str.4:                               ## @.str.4
	.asciz	"request_irq failed for translation interrupt: %d\n"

	.no_dead_strip	_setup_xsl_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setup_xsl_irq
_setup_xsl_irq:                         ; @setup_xsl_irq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x1
	mov	x20, x0
	ldr	x19, [x1, #16]
	add	x1, sp, #12
	bl	_pnv_ocxl_get_xsl_irq
	mov	x22, x0
	cbnz	w0, LBB0_10
; %bb.1:
	mov	x0, x20
	mov	x1, x19
	bl	_map_irq_registers
	mov	x22, x0
	cbnz	w0, LBB0_10
; %bb.2:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldp	w3, w2, [x21, #4]
	ldr	w4, [x21]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_kasprintf
	str	w0, [x19]
	cbz	w0, LBB0_6
; %bb.3:
	ldr	w1, [sp, #12]
	mov	x0, #0
	bl	_irq_create_mapping
	str	w0, [x19, #4]
	cbz	w0, LBB0_7
; %bb.4:
	mov	x3, x0
	ldr	w2, [sp, #12]
Lloh5:
	adrp	x1, l_.str.3@PAGE
Lloh6:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
Lloh7:
	adrp	x8, _xsl_fault_handler@GOTPAGE
Lloh8:
	ldr	x8, [x8, _xsl_fault_handler@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	ldp	w3, w0, [x19]
	mov	w2, #0
	mov	x4, x21
	bl	_request_irq
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_11
; %bb.5:
	str	x0, [sp]
Lloh10:
	adrp	x1, l_.str.4@PAGE
Lloh11:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w20, [x8]
	ldr	w0, [x19, #4]
	bl	_irq_dispose_mapping
	b	LBB0_8
LBB0_6:
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh19:
	ldr	w20, [x8]
	b	LBB0_9
LBB0_7:
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh24:
	ldr	w20, [x8]
LBB0_8:
	ldr	w0, [x19]
	bl	_kfree
LBB0_9:
	neg	w22, w20
	mov	x0, x19
	bl	_unmap_irq_registers
LBB0_10:
	mov	x0, x22
	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
	add	sp, sp, #64
	ret
LBB0_11:
	mov	w22, #0
	b	LBB0_10
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ocxl-xsl-%x-%x-%x"

l_.str.1:                               ; @.str.1
	.asciz	"Can't allocate name for xsl interrupt\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.2:                               ; @.str.2
	.asciz	"irq_create_mapping failed for translation interrupt\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.3:                               ; @.str.3
	.asciz	"hwirq %d mapped to virq %d\n"

	.comm	_xsl_fault_handler,4,2          ; @xsl_fault_handler
l_.str.4:                               ; @.str.4
	.asciz	"request_irq failed for translation interrupt: %d\n"

	.no_dead_strip	_setup_xsl_irq
.subsections_via_symbols
