	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xsdfec_ecc_isr_enable
_xsdfec_ecc_isr_enable:                 ## @xsdfec_ecc_isr_enable
	.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
	je	LBB0_4
## %bb.1:
	movq	_XSDFEC_ECC_IER_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_XSDFEC_ALL_ECC_ISR_MASK@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	%rbx, %rdi
	callq	_xsdfec_regwrite
	movq	_XSDFEC_ECC_IMR_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_xsdfec_regread
	testl	%eax, (%r14)
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_7
LBB0_4:
	movq	_XSDFEC_ECC_IDR_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_XSDFEC_ALL_ECC_ISR_MASK@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	%rbx, %rdi
	callq	_xsdfec_regwrite
	movq	_XSDFEC_ECC_IMR_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_xsdfec_regread
	movl	%eax, %ecx
	andl	(%r14), %ecx
	movq	_XSDFEC_ECC_ISR_MASK@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpl	(%rdx), %ecx
	je	LBB0_8
## %bb.5:
	movq	_XSDFEC_PL_INIT_ECC_ISR_MASK@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	je	LBB0_8
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
LBB0_7:
	movl	(%rbx), %edi
	callq	_dev_dbg
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_8
LBB0_3:
	xorl	%eax, %eax
LBB0_8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XSDFEC_ECC_IER_ADDR,4,2        ## @XSDFEC_ECC_IER_ADDR
	.comm	_XSDFEC_ALL_ECC_ISR_MASK,4,2    ## @XSDFEC_ALL_ECC_ISR_MASK
	.comm	_XSDFEC_ECC_IMR_ADDR,4,2        ## @XSDFEC_ECC_IMR_ADDR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SDFEC enabling ECC irq with ECC IER failed"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_XSDFEC_ECC_IDR_ADDR,4,2        ## @XSDFEC_ECC_IDR_ADDR
	.comm	_XSDFEC_ECC_ISR_MASK,4,2        ## @XSDFEC_ECC_ISR_MASK
	.comm	_XSDFEC_PL_INIT_ECC_ISR_MASK,4,2 ## @XSDFEC_PL_INIT_ECC_ISR_MASK
L_.str.1:                               ## @.str.1
	.asciz	"SDFEC disable ECC irq with ECC IDR failed"

	.no_dead_strip	_xsdfec_ecc_isr_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xsdfec_ecc_isr_enable
_xsdfec_ecc_isr_enable:                 ; @xsdfec_ecc_isr_enable
	.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
	cbz	w1, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _XSDFEC_ECC_IER_ADDR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XSDFEC_ECC_IER_ADDR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x20, _XSDFEC_ALL_ECC_ISR_MASK@GOTPAGE
Lloh4:
	ldr	x20, [x20, _XSDFEC_ALL_ECC_ISR_MASK@GOTPAGEOFF]
	ldr	w2, [x20]
	mov	x0, x19
	bl	_xsdfec_regwrite
Lloh5:
	adrp	x8, _XSDFEC_ECC_IMR_ADDR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _XSDFEC_ECC_IMR_ADDR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_xsdfec_regread
	ldr	w8, [x20]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.2:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_3:
Lloh10:
	adrp	x8, _XSDFEC_ECC_IDR_ADDR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _XSDFEC_ECC_IDR_ADDR@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x20, _XSDFEC_ALL_ECC_ISR_MASK@GOTPAGE
Lloh14:
	ldr	x20, [x20, _XSDFEC_ALL_ECC_ISR_MASK@GOTPAGEOFF]
	ldr	w2, [x20]
	mov	x0, x19
	bl	_xsdfec_regwrite
Lloh15:
	adrp	x8, _XSDFEC_ECC_IMR_ADDR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _XSDFEC_ECC_IMR_ADDR@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_xsdfec_regread
	ldr	w8, [x20]
	and	w8, w8, w0
Lloh18:
	adrp	x9, _XSDFEC_ECC_ISR_MASK@GOTPAGE
Lloh19:
	ldr	x9, [x9, _XSDFEC_ECC_ISR_MASK@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
Lloh21:
	adrp	x10, _XSDFEC_PL_INIT_ECC_ISR_MASK@GOTPAGE
Lloh22:
	ldr	x10, [x10, _XSDFEC_PL_INIT_ECC_ISR_MASK@GOTPAGEOFF]
Lloh23:
	ldr	w10, [x10]
	cmp	w8, w9
	ccmp	w8, w10, #4, ne
	b.ne	LBB0_5
LBB0_4:
	mov	w0, #0
	b	LBB0_7
LBB0_5:
Lloh24:
	adrp	x1, l_.str.1@PAGE
Lloh25:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_6:
	ldr	w0, [x19]
	bl	_dev_dbg
Lloh26:
	adrp	x8, _EIO@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_XSDFEC_ECC_IER_ADDR,4,2        ; @XSDFEC_ECC_IER_ADDR
	.comm	_XSDFEC_ALL_ECC_ISR_MASK,4,2    ; @XSDFEC_ALL_ECC_ISR_MASK
	.comm	_XSDFEC_ECC_IMR_ADDR,4,2        ; @XSDFEC_ECC_IMR_ADDR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SDFEC enabling ECC irq with ECC IER failed"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_XSDFEC_ECC_IDR_ADDR,4,2        ; @XSDFEC_ECC_IDR_ADDR
	.comm	_XSDFEC_ECC_ISR_MASK,4,2        ; @XSDFEC_ECC_ISR_MASK
	.comm	_XSDFEC_PL_INIT_ECC_ISR_MASK,4,2 ; @XSDFEC_PL_INIT_ECC_ISR_MASK
l_.str.1:                               ; @.str.1
	.asciz	"SDFEC disable ECC irq with ECC IDR failed"

	.no_dead_strip	_xsdfec_ecc_isr_enable
.subsections_via_symbols
