	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bluefield_edac_init_dimms
_bluefield_edac_init_dimms:             ## @bluefield_edac_init_dimms
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	16(%rdi), %r15
	cmpl	$0, (%r15)
	jle	LBB0_19
## %bb.1:
	movl	(%rdi), %eax
	shll	$16, %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	xorl	%ebx, %ebx
	jmp	LBB0_5
LBB0_2:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	_DEV_X16@GOTPCREL(%rip), %rcx
LBB0_3:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	(%rcx), %eax
	movl	%eax, 4(%r14)
	movq	_MLXBF_DIMM_INFO__RANKS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r13d, %esi
	callq	_FIELD_GET
	movq	8(%r15), %rcx
	movl	%eax, (%rcx,%rbx,4)
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_4:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, %rdi
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jge	LBB0_16
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rdi, %r12
	movq	8(%rdi), %rax
	movq	(%rax,%rbx,8), %r14
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	orl	%ebx, %esi
	movq	_MLNX_SIP_GET_DIMM_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_smc_call1
	movl	%eax, %r13d
	movq	_MLXBF_DIMM_INFO__SIZE_GB@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r13d, %esi
	callq	_FIELD_GET
	testl	%eax, %eax
	je	LBB0_14
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_EDAC_SECDED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
	movq	_MLXBF_DIMM_INFO__IS_NVDIMM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r13d, %esi
	callq	_FIELD_GET
	movq	_MEM_NVDIMM@GOTPCREL(%rip), %rcx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_MLXBF_DIMM_INFO__IS_LRDIMM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r13d, %esi
	callq	_FIELD_GET
	movq	_MEM_LRDDR4@GOTPCREL(%rip), %rcx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_MLXBF_DIMM_INFO__IS_RDIMM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r13d, %esi
	callq	_FIELD_GET
	movq	_MEM_RDDR4@GOTPCREL(%rip), %rcx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_MEM_DDR4@GOTPCREL(%rip), %rcx
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	(%rcx), %eax
	movl	%eax, 12(%r14)
	movq	_MLXBF_DIMM_INFO__SIZE_GB@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r13d, %esi
	callq	_FIELD_GET
	movl	%eax, %ecx
	movq	_SZ_1G@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cltd
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rsi
	idivl	(%rsi)
	imull	%ecx, %eax
	movl	%eax, (%r14)
	movq	_MLXBF_EDAC_ERROR_GRAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	movq	_MLXBF_DIMM_INFO__PACKAGE_X@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r13d, %esi
	callq	_FIELD_GET
	movq	_DEV_X4@GOTPCREL(%rip), %rcx
	cmpl	$4, %eax
	je	LBB0_3
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$16, %eax
	je	LBB0_2
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$8, %eax
	jne	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	_DEV_X8@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	_MEM_EMPTY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r14)
	jmp	LBB0_4
LBB0_15:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	_DEV_UNKNOWN@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_16:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_19
## %bb.17:
	movq	_EDAC_FLAG_SECDED@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_19:
	movq	_EDAC_FLAG_NONE@GOTPCREL(%rip), %rax
LBB0_20:
	movl	(%rax), %eax
	movl	%eax, 4(%rdi)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLNX_SIP_GET_DIMM_INFO,4,2     ## @MLNX_SIP_GET_DIMM_INFO
	.comm	_MLXBF_DIMM_INFO__SIZE_GB,4,2   ## @MLXBF_DIMM_INFO__SIZE_GB
	.comm	_MEM_EMPTY,4,2                  ## @MEM_EMPTY
	.comm	_EDAC_SECDED,4,2                ## @EDAC_SECDED
	.comm	_MLXBF_DIMM_INFO__IS_NVDIMM,4,2 ## @MLXBF_DIMM_INFO__IS_NVDIMM
	.comm	_MEM_NVDIMM,4,2                 ## @MEM_NVDIMM
	.comm	_MLXBF_DIMM_INFO__IS_LRDIMM,4,2 ## @MLXBF_DIMM_INFO__IS_LRDIMM
	.comm	_MEM_LRDDR4,4,2                 ## @MEM_LRDDR4
	.comm	_MLXBF_DIMM_INFO__IS_RDIMM,4,2  ## @MLXBF_DIMM_INFO__IS_RDIMM
	.comm	_MEM_RDDR4,4,2                  ## @MEM_RDDR4
	.comm	_MEM_DDR4,4,2                   ## @MEM_DDR4
	.comm	_SZ_1G,4,2                      ## @SZ_1G
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_MLXBF_EDAC_ERROR_GRAIN,4,2     ## @MLXBF_EDAC_ERROR_GRAIN
	.comm	_MLXBF_DIMM_INFO__PACKAGE_X,4,2 ## @MLXBF_DIMM_INFO__PACKAGE_X
	.comm	_DEV_X4,4,2                     ## @DEV_X4
	.comm	_DEV_X8,4,2                     ## @DEV_X8
	.comm	_DEV_X16,4,2                    ## @DEV_X16
	.comm	_DEV_UNKNOWN,4,2                ## @DEV_UNKNOWN
	.comm	_MLXBF_DIMM_INFO__RANKS,4,2     ## @MLXBF_DIMM_INFO__RANKS
	.comm	_EDAC_FLAG_NONE,4,2             ## @EDAC_FLAG_NONE
	.comm	_EDAC_FLAG_SECDED,4,2           ## @EDAC_FLAG_SECDED
	.no_dead_strip	_bluefield_edac_init_dimms
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bluefield_edac_init_dimms
_bluefield_edac_init_dimms:             ; @bluefield_edac_init_dimms
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	x22, [x0, #16]
	ldr	w8, [x22]
Lloh0:
	adrp	x9, _EDAC_FLAG_NONE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EDAC_FLAG_NONE@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.1:
	mov	x23, #0
	ldr	w8, [x19]
	lsl	w24, w8, #16
Lloh2:
	adrp	x25, _MLNX_SIP_GET_DIMM_INFO@GOTPAGE
Lloh3:
	ldr	x25, [x25, _MLNX_SIP_GET_DIMM_INFO@GOTPAGEOFF]
	mov	w28, #1
Lloh4:
	adrp	x26, _MLXBF_DIMM_INFO__SIZE_GB@GOTPAGE
Lloh5:
	ldr	x26, [x26, _MLXBF_DIMM_INFO__SIZE_GB@GOTPAGEOFF]
Lloh6:
	adrp	x21, _MLXBF_DIMM_INFO__RANKS@GOTPAGE
Lloh7:
	ldr	x21, [x21, _MLXBF_DIMM_INFO__RANKS@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
Lloh8:
	adrp	x8, _DEV_X16@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DEV_X16@GOTPAGEOFF]
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x8]
	str	w8, [x27, #4]
	ldr	w0, [x21]
	mov	x1, x20
	bl	_FIELD_GET
	mov	w28, #0
	ldr	x8, [x22, #8]
	str	w0, [x8, x23, lsl #2]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x22]
	cmp	x23, x8
	b.ge	LBB0_16
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x27, [x8, x23, lsl #3]
	orr	w1, w24, w23
	ldr	w0, [x25]
	bl	_smc_call1
	mov	x20, x0
	ldr	w0, [x26]
	mov	x1, x20
	bl	_FIELD_GET
	cbz	w0, LBB0_13
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh10:
	adrp	x8, _EDAC_SECDED@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EDAC_SECDED@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	str	w8, [x27, #16]
Lloh13:
	adrp	x8, _MLXBF_DIMM_INFO__IS_NVDIMM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MLXBF_DIMM_INFO__IS_NVDIMM@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_FIELD_GET
Lloh16:
	adrp	x8, _MEM_NVDIMM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MEM_NVDIMM@GOTPAGEOFF]
	cbnz	w0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh18:
	adrp	x8, _MLXBF_DIMM_INFO__IS_LRDIMM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MLXBF_DIMM_INFO__IS_LRDIMM@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_FIELD_GET
Lloh21:
	adrp	x8, _MEM_LRDDR4@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MEM_LRDDR4@GOTPAGEOFF]
	cbnz	w0, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh23:
	adrp	x8, _MLXBF_DIMM_INFO__IS_RDIMM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MLXBF_DIMM_INFO__IS_RDIMM@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_FIELD_GET
	cmp	w0, #0
Lloh26:
	adrp	x8, _MEM_RDDR4@GOTPAGE
Lloh27:
	ldr	x8, [x8, _MEM_RDDR4@GOTPAGEOFF]
Lloh28:
	adrp	x9, _MEM_DDR4@GOTPAGE
Lloh29:
	ldr	x9, [x9, _MEM_DDR4@GOTPAGEOFF]
	csel	x8, x9, x8, eq
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x8]
	str	w8, [x27, #12]
	ldr	w0, [x26]
	mov	x1, x20
	bl	_FIELD_GET
Lloh30:
	adrp	x8, _SZ_1G@GOTPAGE
Lloh31:
	ldr	x8, [x8, _SZ_1G@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
Lloh33:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh34:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	sdiv	w8, w8, w9
	mul	w8, w8, w0
	str	w8, [x27]
Lloh36:
	adrp	x8, _MLXBF_EDAC_ERROR_GRAIN@GOTPAGE
Lloh37:
	ldr	x8, [x8, _MLXBF_EDAC_ERROR_GRAIN@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	str	w8, [x27, #8]
Lloh39:
	adrp	x8, _MLXBF_DIMM_INFO__PACKAGE_X@GOTPAGE
Lloh40:
	ldr	x8, [x8, _MLXBF_DIMM_INFO__PACKAGE_X@GOTPAGEOFF]
Lloh41:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_FIELD_GET
	cmp	w0, #4
	b.eq	LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	cmp	w0, #16
	b.eq	LBB0_2
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	cmp	w0, #8
	b.ne	LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
Lloh42:
	adrp	x8, _DEV_X8@GOTPAGE
Lloh43:
	ldr	x8, [x8, _DEV_X8@GOTPAGEOFF]
	b	LBB0_3
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh44:
	adrp	x8, _MEM_EMPTY@GOTPAGE
Lloh45:
	ldr	x8, [x8, _MEM_EMPTY@GOTPAGEOFF]
Lloh46:
	ldr	w8, [x8]
	str	w8, [x27, #12]
	b	LBB0_4
LBB0_14:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh47:
	adrp	x8, _DEV_X4@GOTPAGE
Lloh48:
	ldr	x8, [x8, _DEV_X4@GOTPAGEOFF]
	b	LBB0_3
LBB0_15:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh49:
	adrp	x8, _DEV_UNKNOWN@GOTPAGE
Lloh50:
	ldr	x8, [x8, _DEV_UNKNOWN@GOTPAGEOFF]
	b	LBB0_3
LBB0_16:
Lloh51:
	adrp	x8, _EDAC_FLAG_SECDED@GOTPAGE
Lloh52:
	ldr	x8, [x8, _EDAC_FLAG_SECDED@GOTPAGEOFF]
	cmp	w28, #0
Lloh53:
	adrp	x9, _EDAC_FLAG_NONE@GOTPAGE
Lloh54:
	ldr	x9, [x9, _EDAC_FLAG_NONE@GOTPAGEOFF]
	csel	x9, x8, x9, eq
LBB0_17:
	ldr	w8, [x9]
	str	w8, [x19, #4]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh47, Lloh48
	.loh AdrpLdrGot	Lloh49, Lloh50
	.loh AdrpLdrGot	Lloh53, Lloh54
	.loh AdrpLdrGot	Lloh51, Lloh52
	.cfi_endproc
                                        ; -- End function
	.comm	_MLNX_SIP_GET_DIMM_INFO,4,2     ; @MLNX_SIP_GET_DIMM_INFO
	.comm	_MLXBF_DIMM_INFO__SIZE_GB,4,2   ; @MLXBF_DIMM_INFO__SIZE_GB
	.comm	_MEM_EMPTY,4,2                  ; @MEM_EMPTY
	.comm	_EDAC_SECDED,4,2                ; @EDAC_SECDED
	.comm	_MLXBF_DIMM_INFO__IS_NVDIMM,4,2 ; @MLXBF_DIMM_INFO__IS_NVDIMM
	.comm	_MEM_NVDIMM,4,2                 ; @MEM_NVDIMM
	.comm	_MLXBF_DIMM_INFO__IS_LRDIMM,4,2 ; @MLXBF_DIMM_INFO__IS_LRDIMM
	.comm	_MEM_LRDDR4,4,2                 ; @MEM_LRDDR4
	.comm	_MLXBF_DIMM_INFO__IS_RDIMM,4,2  ; @MLXBF_DIMM_INFO__IS_RDIMM
	.comm	_MEM_RDDR4,4,2                  ; @MEM_RDDR4
	.comm	_MEM_DDR4,4,2                   ; @MEM_DDR4
	.comm	_SZ_1G,4,2                      ; @SZ_1G
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_MLXBF_EDAC_ERROR_GRAIN,4,2     ; @MLXBF_EDAC_ERROR_GRAIN
	.comm	_MLXBF_DIMM_INFO__PACKAGE_X,4,2 ; @MLXBF_DIMM_INFO__PACKAGE_X
	.comm	_DEV_X4,4,2                     ; @DEV_X4
	.comm	_DEV_X8,4,2                     ; @DEV_X8
	.comm	_DEV_X16,4,2                    ; @DEV_X16
	.comm	_DEV_UNKNOWN,4,2                ; @DEV_UNKNOWN
	.comm	_MLXBF_DIMM_INFO__RANKS,4,2     ; @MLXBF_DIMM_INFO__RANKS
	.comm	_EDAC_FLAG_NONE,4,2             ; @EDAC_FLAG_NONE
	.comm	_EDAC_FLAG_SECDED,4,2           ; @EDAC_FLAG_SECDED
	.no_dead_strip	_bluefield_edac_init_dimms
.subsections_via_symbols
