	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bluefield_edac_mc_probe
_bluefield_edac_mc_probe:               ## @bluefield_edac_mc_probe
	.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	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	leaq	L_.str(%rip), %rsi
	leaq	-64(%rbp), %rdx
	callq	_device_property_read_u32
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_6
LBB0_2:
	leaq	L_.str.2(%rip), %rsi
	leaq	-60(%rbp), %rdx
	movq	%r15, %rdi
	callq	_device_property_read_u32
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_6
LBB0_4:
	movl	-60(%rbp), %eax
	movq	_MLXBF_EDAC_MAX_DIMM_PER_MC@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jbe	LBB0_11
## %bb.5:
	leaq	L_.str.4(%rip), %rsi
LBB0_6:
	movq	%r15, %rdi
	callq	_dev_warn
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_7:
	xorl	%ebx, %ebx
LBB0_8:
	subl	(%rax), %ebx
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_21
## %bb.10:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	testq	%rax, %rax
	je	LBB0_15
## %bb.12:
	movq	%rax, %r12
	movq	_EDAC_MC_LAYER_SLOT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movl	-60(%rbp), %eax
	movl	%eax, -56(%rbp)
	movl	$1, -52(%rbp)
	movl	-64(%rbp), %ebx
	leaq	-56(%rbp), %r14
	movq	%r14, %rdi
	callq	_ARRAY_SIZE
	movl	%ebx, %edi
	movl	%eax, %esi
	movq	%r14, %rdx
	movl	$8, %ecx
	callq	_edac_mc_alloc
	testq	%rax, %rax
	je	LBB0_16
## %bb.13:
	movq	%rax, %r14
	movq	40(%rax), %rbx
	movl	-60(%rbp), %eax
	movl	%eax, (%rbx)
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_devm_ioremap_resource
	movl	%eax, 4(%rbx)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_17
## %bb.14:
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movl	4(%rbx), %edi
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_19
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_16:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_17:
	movq	%r15, 32(%r14)
	movq	_MEM_FLAG_DDR4@GOTPCREL(%rip), %rax
	movq	_MEM_FLAG_RDDR4@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_MEM_FLAG_LRDDR4@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_MEM_FLAG_NVDIMM@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, (%r14)
	movq	_EDAC_FLAG_SECDED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%r14)
	movq	_DRIVER_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r14)
	leaq	L_.str.6(%rip), %rax
	movq	%rax, 8(%r14)
	movq	%r15, %rdi
	callq	_dev_name
	movl	%eax, 20(%r14)
	movq	_bluefield_edac_check@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
	movq	%r14, %rdi
	callq	_bluefield_edac_init_dimms
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_platform_set_drvdata
	movq	%r14, %rdi
	callq	_edac_mc_add_mc
	testl	%eax, %eax
	je	LBB0_20
## %bb.18:
	movl	%eax, %ebx
	leaq	L_.str.7(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
LBB0_19:
	movq	%r14, %rdi
	callq	_edac_mc_free
	jmp	LBB0_9
LBB0_20:
	movq	_EDAC_OPSTATE_POLL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_edac_op_state@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mss_number"

L_.str.1:                               ## @.str.1
	.asciz	"bf_edac: MSS number unknown\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"dimm_per_mc"

L_.str.3:                               ## @.str.3
	.asciz	"bf_edac: DIMMs per MC unknown\n"

	.comm	_MLXBF_EDAC_MAX_DIMM_PER_MC,4,2 ## @MLXBF_EDAC_MAX_DIMM_PER_MC
L_.str.4:                               ## @.str.4
	.asciz	"bf_edac: DIMMs per MC not valid\n"

	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.comm	_EDAC_MC_LAYER_SLOT,4,2         ## @EDAC_MC_LAYER_SLOT
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.5:                               ## @.str.5
	.asciz	"failed to map EMI IO resource\n"

	.comm	_MEM_FLAG_DDR4,4,2              ## @MEM_FLAG_DDR4
	.comm	_MEM_FLAG_RDDR4,4,2             ## @MEM_FLAG_RDDR4
	.comm	_MEM_FLAG_LRDDR4,4,2            ## @MEM_FLAG_LRDDR4
	.comm	_MEM_FLAG_NVDIMM,4,2            ## @MEM_FLAG_NVDIMM
	.comm	_EDAC_FLAG_SECDED,4,2           ## @EDAC_FLAG_SECDED
	.comm	_DRIVER_NAME,4,2                ## @DRIVER_NAME
L_.str.6:                               ## @.str.6
	.asciz	"BlueField_Memory_Controller"

	.comm	_bluefield_edac_check,4,2       ## @bluefield_edac_check
L_.str.7:                               ## @.str.7
	.asciz	"failed to register with EDAC core\n"

	.comm	_EDAC_OPSTATE_POLL,4,2          ## @EDAC_OPSTATE_POLL
	.comm	_edac_op_state,4,2              ## @edac_op_state
	.no_dead_strip	_bluefield_edac_mc_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bluefield_edac_mc_probe
_bluefield_edac_mc_probe:               ; @bluefield_edac_mc_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #4
	bl	_device_property_read_u32
	cbz	x0, LBB0_2
; %bb.1:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_2:
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, sp
	mov	x0, x19
	bl	_device_property_read_u32
	cbz	x0, LBB0_4
; %bb.3:
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_6
LBB0_4:
	ldr	w8, [sp]
Lloh11:
	adrp	x9, _MLXBF_EDAC_MAX_DIMM_PER_MC@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MLXBF_EDAC_MAX_DIMM_PER_MC@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ls	LBB0_11
; %bb.5:
Lloh14:
	adrp	x1, l_.str.4@PAGE
Lloh15:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_6:
	mov	x0, x19
	bl	_dev_warn
LBB0_7:
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_9:
	ldr	x8, [sp, #24]
Lloh18:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh19:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_20
; %bb.10:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_11:
Lloh21:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_platform_get_resource
	cbz	x0, LBB0_7
; %bb.12:
	mov	x21, x0
Lloh24:
	adrp	x8, _EDAC_MC_LAYER_SLOT@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EDAC_MC_LAYER_SLOT@GOTPAGEOFF]
Lloh26:
	ldr	w10, [x8]
	ldp	w8, w20, [sp]
	mov	w9, #1
	str	w8, [sp, #8]
	stp	w9, w10, [sp, #12]
	add	x0, sp, #8
	bl	_ARRAY_SIZE
	mov	x1, x0
	add	x2, sp, #8
	mov	x0, x20
	mov	w3, #8
	bl	_edac_mc_alloc
	cbz	x0, LBB0_15
; %bb.13:
	mov	x20, x0
	ldr	x22, [x0, #40]
	ldr	w8, [sp]
	str	w8, [x22]
	mov	x0, x19
	mov	x1, x21
	bl	_devm_ioremap_resource
	str	w0, [x22, #4]
	bl	_IS_ERR
	cbz	x0, LBB0_16
; %bb.14:
Lloh27:
	adrp	x1, l_.str.5@PAGE
Lloh28:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	w0, [x22, #4]
	bl	_PTR_ERR
	mov	x21, x0
	b	LBB0_18
LBB0_15:
Lloh29:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_8
LBB0_16:
	str	x19, [x20, #32]
Lloh31:
	adrp	x8, _MEM_FLAG_DDR4@GOTPAGE
Lloh32:
	ldr	x8, [x8, _MEM_FLAG_DDR4@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
Lloh34:
	adrp	x9, _MEM_FLAG_RDDR4@GOTPAGE
Lloh35:
	ldr	x9, [x9, _MEM_FLAG_RDDR4@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh37:
	adrp	x9, _MEM_FLAG_LRDDR4@GOTPAGE
Lloh38:
	ldr	x9, [x9, _MEM_FLAG_LRDDR4@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh40:
	adrp	x9, _MEM_FLAG_NVDIMM@GOTPAGE
Lloh41:
	ldr	x9, [x9, _MEM_FLAG_NVDIMM@GOTPAGEOFF]
Lloh42:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x20]
Lloh43:
	adrp	x8, _EDAC_FLAG_SECDED@GOTPAGE
Lloh44:
	ldr	x8, [x8, _EDAC_FLAG_SECDED@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
Lloh46:
	adrp	x9, _DRIVER_NAME@GOTPAGE
Lloh47:
	ldr	x9, [x9, _DRIVER_NAME@GOTPAGEOFF]
Lloh48:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #24]
Lloh49:
	adrp	x8, l_.str.6@PAGE
Lloh50:
	add	x8, x8, l_.str.6@PAGEOFF
	str	x8, [x20, #8]
	mov	x0, x19
	bl	_dev_name
Lloh51:
	adrp	x8, _bluefield_edac_check@GOTPAGE
Lloh52:
	ldr	x8, [x8, _bluefield_edac_check@GOTPAGEOFF]
Lloh53:
	ldr	w8, [x8]
	stp	w8, w0, [x20, #16]
	mov	x0, x20
	bl	_bluefield_edac_init_dimms
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	mov	x0, x20
	bl	_edac_mc_add_mc
	mov	x21, x0
	cbz	w0, LBB0_19
; %bb.17:
Lloh54:
	adrp	x1, l_.str.7@PAGE
Lloh55:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x19
	bl	_dev_err
LBB0_18:
	mov	x0, x20
	bl	_edac_mc_free
	b	LBB0_9
LBB0_19:
Lloh56:
	adrp	x8, _EDAC_OPSTATE_POLL@GOTPAGE
Lloh57:
	ldr	x8, [x8, _EDAC_OPSTATE_POLL@GOTPAGEOFF]
Lloh58:
	ldr	w8, [x8]
Lloh59:
	adrp	x9, _edac_op_state@GOTPAGE
Lloh60:
	ldr	x9, [x9, _edac_op_state@GOTPAGEOFF]
Lloh61:
	str	w8, [x9]
	b	LBB0_9
LBB0_20:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh54, Lloh55
	.loh AdrpLdrGotStr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mss_number"

l_.str.1:                               ; @.str.1
	.asciz	"bf_edac: MSS number unknown\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"dimm_per_mc"

l_.str.3:                               ; @.str.3
	.asciz	"bf_edac: DIMMs per MC unknown\n"

	.comm	_MLXBF_EDAC_MAX_DIMM_PER_MC,4,2 ; @MLXBF_EDAC_MAX_DIMM_PER_MC
l_.str.4:                               ; @.str.4
	.asciz	"bf_edac: DIMMs per MC not valid\n"

	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.comm	_EDAC_MC_LAYER_SLOT,4,2         ; @EDAC_MC_LAYER_SLOT
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.5:                               ; @.str.5
	.asciz	"failed to map EMI IO resource\n"

	.comm	_MEM_FLAG_DDR4,4,2              ; @MEM_FLAG_DDR4
	.comm	_MEM_FLAG_RDDR4,4,2             ; @MEM_FLAG_RDDR4
	.comm	_MEM_FLAG_LRDDR4,4,2            ; @MEM_FLAG_LRDDR4
	.comm	_MEM_FLAG_NVDIMM,4,2            ; @MEM_FLAG_NVDIMM
	.comm	_EDAC_FLAG_SECDED,4,2           ; @EDAC_FLAG_SECDED
	.comm	_DRIVER_NAME,4,2                ; @DRIVER_NAME
l_.str.6:                               ; @.str.6
	.asciz	"BlueField_Memory_Controller"

	.comm	_bluefield_edac_check,4,2       ; @bluefield_edac_check
l_.str.7:                               ; @.str.7
	.asciz	"failed to register with EDAC core\n"

	.comm	_EDAC_OPSTATE_POLL,4,2          ; @EDAC_OPSTATE_POLL
	.comm	_edac_op_state,4,2              ; @edac_op_state
	.no_dead_strip	_bluefield_edac_mc_probe
.subsections_via_symbols
