	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ecc_register
_ecc_register:                          ## @ecc_register
	.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, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$16, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rbx
	movq	_ecc_err_event@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_platform_set_drvdata
	xorl	%eax, %eax
	callq	_edac_device_alloc_index
                                        ## kill: def $eax killed $eax def $rax
	subq	$8, %rsp
	leaq	L_.str(%rip), %rcx
	xorl	%edi, %edi
	movq	%rcx, %rsi
	movl	$1, %edx
	movl	$1, %r8d
	movl	$1, %r9d
	pushq	%rax
	pushq	$0
	pushq	$0
	callq	_edac_device_alloc_ctl_info
	addq	$32, %rsp
	movq	%rax, (%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	movq	(%rbx), %rdi
	testq	%rax, %rax
	je	LBB0_4
## %bb.8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_4:
	movq	%r14, 8(%rdi)
	leaq	L_.str.1(%rip), %rax
	movq	%rax, (%rdi)
	movq	%r14, %rdi
	callq	_dev_name
	movq	(%rbx), %rcx
	movq	%rax, 24(%rcx)
	movq	%r14, %rdi
	callq	_dev_name
	movq	(%rbx), %rdi
	movq	%rax, 16(%rdi)
	callq	_edac_device_add_device
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	(%rbx), %rax
	movq	8(%rax), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	movq	(%rbx), %rdi
	callq	_edac_device_free_ctl_info
	movq	_ENXIO@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_register_sifive_l2_error_notifier
	xorl	%eax, %eax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ecc_err_event,4,2              ## @ecc_err_event
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sifive_ecc"

L_.str.1:                               ## @.str.1
	.asciz	"Sifive ECC Manager"

L_.str.2:                               ## @.str.2
	.asciz	"failed to register with EDAC core\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.no_dead_strip	_ecc_register
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ecc_register
_ecc_register:                          ; @ecc_register
	.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	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #16
	bl	_devm_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x8, _ecc_err_event@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ecc_err_event@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x21, x0
	str	w8, [x21, #8]!
	mov	x0, x20
	mov	x1, x19
	bl	_platform_set_drvdata
	bl	_edac_device_alloc_index
	str	w0, [sp]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #0
	mov	w2, #1
	mov	x3, x1
	mov	w4, #1
	mov	w5, #1
	mov	x6, #0
	mov	w7, #0
	bl	_edac_device_alloc_ctl_info
	str	x0, [x19]
	bl	_IS_ERR
	mov	x8, x0
	ldr	x0, [x19]
	cbz	x8, LBB0_4
; %bb.2:
	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
	b	_PTR_ERR
LBB0_3:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
Lloh10:
	adrp	x8, l_.str.1@PAGE
Lloh11:
	add	x8, x8, l_.str.1@PAGEOFF
	stp	x8, x20, [x0]
	mov	x0, x20
	bl	_dev_name
	ldr	x8, [x19]
	str	x0, [x8, #24]
	mov	x0, x20
	bl	_dev_name
	ldr	x8, [x19]
	str	x0, [x8, #16]
	mov	x0, x8
	bl	_edac_device_add_device
	cbz	x0, LBB0_8
; %bb.5:
	ldr	x8, [x19]
	ldr	x0, [x8, #8]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	ldr	x0, [x19]
	bl	_edac_device_free_ctl_info
Lloh14:
	adrp	x8, _ENXIO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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_8:
	mov	x0, x21
	bl	_register_sifive_l2_error_notifier
	mov	w0, #0
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ecc_err_event,4,2              ; @ecc_err_event
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sifive_ecc"

l_.str.1:                               ; @.str.1
	.asciz	"Sifive ECC Manager"

l_.str.2:                               ; @.str.2
	.asciz	"failed to register with EDAC core\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.no_dead_strip	_ecc_register
.subsections_via_symbols
