	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxl_native_register_serr_irq   ## -- Begin function cxl_native_register_serr_irq
	.p2align	4, 0x90
_cxl_native_register_serr_irq:          ## @cxl_native_register_serr_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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	addq	$24, %rdi
	callq	_dev_name
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_kasprintf
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	20(%r12), %edi
	movq	_native_slice_irq_err@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	16(%r12), %r8
	movq	%r12, %rdx
	movq	%r12, %rcx
	movq	%rax, %r9
	callq	_cxl_register_one_irq
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r14d
	movq	8(%r12), %rdi
	callq	_kfree
	movq	$0, 8(%r12)
	jmp	LBB0_9
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_9
LBB0_4:
	movq	_CXL_PSL_SERR_An@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_cxl_p1n_read
	movl	%eax, %r15d
	xorl	%eax, %eax
	callq	_cxl_is_power8
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	andl	$-65536, %r15d                  ## imm = 0xFFFF0000
	movzwl	(%r12), %eax
	orl	%eax, %r15d
LBB0_6:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_cxl_is_power9
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	andl	$-2147483648, %r15d             ## imm = 0x80000000
	movzwl	(%r12), %eax
	orl	%eax, %r15d
LBB0_8:
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_cxl_p1n_write
LBB0_9:
	movl	%r14d, %eax
	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	"cxl-%s-err"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_native_slice_irq_err,4,2       ## @native_slice_irq_err
	.comm	_CXL_PSL_SERR_An,4,2            ## @CXL_PSL_SERR_An
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxl_native_register_serr_irq   ; -- Begin function cxl_native_register_serr_irq
	.p2align	2
_cxl_native_register_serr_irq:          ; @cxl_native_register_serr_irq
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	add	x0, x0, #24
	bl	_dev_name
	mov	x2, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_kasprintf
	str	x0, [x19, #8]
	cbz	x0, LBB0_3
; %bb.1:
	mov	x5, x0
	ldr	w0, [x19, #20]
Lloh5:
	adrp	x8, _native_slice_irq_err@GOTPAGE
Lloh6:
	ldr	x8, [x8, _native_slice_irq_err@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	add	x4, x19, #16
	mov	x2, x19
	mov	x3, x19
	bl	_cxl_register_one_irq
	cbz	w0, LBB0_4
; %bb.2:
	mov	x20, x0
	ldr	x0, [x19, #8]
	bl	_kfree
	str	xzr, [x19, #8]
	b	LBB0_9
LBB0_3:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_9
LBB0_4:
Lloh11:
	adrp	x21, _CXL_PSL_SERR_An@GOTPAGE
Lloh12:
	ldr	x21, [x21, _CXL_PSL_SERR_An@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_cxl_p1n_read
	mov	x20, x0
	bl	_cxl_is_power8
	cbz	x0, LBB0_6
; %bb.5:
	and	w8, w20, #0xffff0000
	ldrh	w9, [x19]
	orr	w20, w9, w8
LBB0_6:
	bl	_cxl_is_power9
	cbz	x0, LBB0_8
; %bb.7:
	and	w8, w20, #0x80000000
	ldrh	w9, [x19]
	orr	w20, w9, w8
LBB0_8:
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x20
	bl	_cxl_p1n_write
	mov	w20, #0
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cxl-%s-err"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_native_slice_irq_err,4,2       ; @native_slice_irq_err
	.comm	_CXL_PSL_SERR_An,4,2            ; @CXL_PSL_SERR_An
.subsections_via_symbols
