	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function skx_rir_decode
_skx_rir_decode:                        ## @skx_rir_decode
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	40(%rdi), %rdi
	movq	(%rdi), %rax
	movq	(%r14), %rsi
	movq	8(%r14), %rdx
	movq	(%rax,%rsi,8), %rax
	movq	(%rax,%rdx,8), %rax
	cmpq	$0, (%rax)
	movl	$13, %eax
	movl	$6, %ecx
	cmovel	%eax, %ecx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movq	_SKX_MAX_RIR@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_7
## %bb.1:
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %ecx
	callq	_SKX_GET_RIRWAYNESS
	callq	_SKX_RIR_LIMIT
	movl	%eax, %r12d
	callq	_SKX_RIR_VALID
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	16(%r14), %r13d
	cmpl	%r13d, %r15d
	jg	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%r12d, %r13d
	jle	LBB0_8
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	movq	_SKX_MAX_RIR@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jge	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	40(%r14), %rdi
	movq	(%r14), %rsi
	movq	8(%r14), %rdx
	movl	%r12d, %r15d
	jmp	LBB0_2
LBB0_7:
	movl	36(%r14), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	xorl	%eax, %eax
	callq	_edac_dbg
	jmp	LBB0_9
LBB0_8:
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %ecx
	sarl	%cl, %r13d
	callq	_SKX_RIR_WAYS
	movl	%eax, %ecx
	movl	%r13d, %eax
	cltd
	idivl	%ecx
	movl	%eax, %r13d
	movl	%r15d, %ecx
	shll	%cl, %r13d
	movl	16(%r14), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%r15d, %edi
	decl	%edi
	xorl	%esi, %esi
	callq	_GENMASK_ULL
	movl	%eax, %r12d
	andl	-44(%rbp), %r12d                ## 4-byte Folded Reload
	orl	%r13d, %r12d
	movl	%r12d, 20(%r14)
	movl	16(%r14), %r13d
	movl	%r15d, %ecx
	sarl	%cl, %r13d
	callq	_SKX_RIR_WAYS
	movl	%eax, %ecx
	movl	%r13d, %eax
	cltd
	idivl	%ecx
	movl	%edx, %ecx
	movq	40(%r14), %rdi
	movq	(%r14), %rsi
	movq	8(%r14), %rdx
	movl	%ebx, %r8d
	callq	_SKX_GET_RIRILV
	callq	_SKX_RIR_OFFSET
	subl	%eax, %r12d
	movl	%r12d, 20(%r14)
	callq	_SKX_RIR_CHAN_RANK
                                        ## kill: def $eax killed $eax def $rax
	leal	3(%rax), %edx
	testl	%eax, %eax
	cmovnsl	%eax, %edx
	movl	%eax, 24(%r14)
	movl	%edx, %ecx
	sarl	$2, %ecx
	movl	%ecx, 28(%r14)
	andl	$-4, %edx
	movl	%eax, %r8d
	subl	%edx, %r8d
	movl	%r8d, 32(%r14)
	movl	20(%r14), %esi
	movl	36(%r14), %edx
	movl	%esi, (%rsp)
	leaq	L_.str.1(%rip), %rsi
	movl	$2, %edi
	movl	%eax, %r9d
	xorl	%eax, %eax
	callq	_edac_dbg
	movl	$1, %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SKX_MAX_RIR,4,2                ## @SKX_MAX_RIR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No RIR entry for 0x%llx\n"

L_.str.1:                               ## @.str.1
	.asciz	"0x%llx: dimm=%d rank=%d chan_rank=%d rank_addr=0x%llx\n"

	.no_dead_strip	_skx_rir_decode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function skx_rir_decode
_skx_rir_decode:                        ; @skx_rir_decode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x0
	ldr	x0, [x0, #40]
	ldr	x8, [x0]
	ldp	x1, x2, [x19]
	ldr	x8, [x8, x1, lsl #3]
	ldr	x8, [x8, x2, lsl #3]
	ldr	x8, [x8]
	cmp	x8, #0
	mov	w8, #6
	mov	w9, #13
	csel	w22, w9, w8, eq
Lloh0:
	adrp	x23, _SKX_MAX_RIR@GOTPAGE
Lloh1:
	ldr	x23, [x23, _SKX_MAX_RIR@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.1:
	mov	w24, #0
	mov	w20, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x3, x20
	bl	_SKX_GET_RIRWAYNESS
	bl	_SKX_RIR_LIMIT
	mov	x21, x0
	bl	_SKX_RIR_VALID
	cbz	x0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x19, #16]
	cmp	w24, w8
	ccmp	w8, w21, #0, le
	b.le	LBB0_7
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	w20, w20, #1
	ldr	w8, [x23]
	cmp	w20, w8
	b.ge	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x19, #40]
	mov	x24, x21
	ldp	x1, x2, [x19]
	b	LBB0_2
LBB0_6:
	ldr	w2, [x19, #36]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #0
	bl	_edac_dbg
	mov	w0, #0
	b	LBB0_8
LBB0_7:
	asr	w21, w8, w22
	bl	_SKX_RIR_WAYS
	sdiv	w8, w21, w0
	lsl	w21, w8, w22
	ldr	w23, [x19, #16]
	sub	w0, w22, #1
	mov	w1, #0
	bl	_GENMASK_ULL
	and	w8, w0, w23
	orr	w21, w8, w21
	str	w21, [x19, #20]
	ldr	w8, [x19, #16]
	asr	w22, w8, w22
	bl	_SKX_RIR_WAYS
	sdiv	w8, w22, w0
	msub	w3, w8, w0, w22
	ldr	x0, [x19, #40]
	ldp	x1, x2, [x19]
	mov	x4, x20
	bl	_SKX_GET_RIRILV
	bl	_SKX_RIR_OFFSET
	sub	w8, w21, w0
	str	w8, [x19, #20]
	bl	_SKX_RIR_CHAN_RANK
                                        ; kill: def $w0 killed $w0 def $x0
	add	w8, w0, #3
	cmp	w0, #0
	csel	w8, w8, w0, lt
	asr	w9, w8, #2
	stp	w0, w9, [x19, #24]
	and	w8, w8, #0xfffffffc
	sub	w8, w0, w8
	str	w8, [x19, #32]
	ldr	w2, [x19, #36]
	ldr	w10, [x19, #20]
	stp	x0, x10, [sp, #16]
	stp	x9, x8, [sp]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #2
	bl	_edac_dbg
	mov	w0, #1
LBB0_8:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_SKX_MAX_RIR,4,2                ; @SKX_MAX_RIR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No RIR entry for 0x%llx\n"

l_.str.1:                               ; @.str.1
	.asciz	"0x%llx: dimm=%d rank=%d chan_rank=%d rank_addr=0x%llx\n"

	.no_dead_strip	_skx_rir_decode
.subsections_via_symbols
