	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function f17_addr_mask_to_cs_size
_f17_addr_mask_to_cs_size:              ## @f17_addr_mask_to_cs_size
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%ebx, %ebx
	testl	%edx, %edx
	je	LBB0_9
## %bb.1:
	movl	%ecx, %r14d
	movq	_CS_EVEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%edx, %eax
	andl	$1, %ecx
	orl	%ecx, %eax
	je	LBB0_9
## %bb.2:
	testl	%ecx, %ecx
	je	LBB0_4
## %bb.3:
	movq	_CS_ODD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%edx, %eax
	je	LBB0_9
LBB0_4:
	movl	%r14d, %eax
	sarl	%eax
	testl	%ecx, %ecx
	je	LBB0_7
## %bb.5:
	movq	_CS_ODD_SECONDARY@GOTPCREL(%rip), %rcx
	testl	%edx, (%rcx)
	je	LBB0_7
## %bb.6:
	shlq	$4, %rsi
	addq	(%rdi), %rsi
	jmp	LBB0_8
LBB0_7:
	movq	(%rdi), %rcx
	shlq	$4, %rsi
	addq	%rcx, %rsi
	addq	$8, %rsi
LBB0_8:
	movq	(%rsi), %rcx
	movslq	%eax, %r12
	movl	(%rcx,%r12,4), %r15d
	movl	%r15d, %edi
	callq	_fls
	movl	%r15d, %edi
	callq	_hweight_long
	movl	%eax, %edi
	movl	$1, %esi
	callq	_GENMASK_ULL
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	movl	%r14d, %edx
	movl	%r12d, %ecx
	xorl	%eax, %eax
	callq	_edac_dbg
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_edac_dbg
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_edac_dbg
	sarl	$2, %ebx
	incl	%ebx
	sarl	$10, %ebx
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CS_EVEN,4,2                    ## @CS_EVEN
	.comm	_CS_ODD,4,2                     ## @CS_ODD
	.comm	_CS_ODD_SECONDARY,4,2           ## @CS_ODD_SECONDARY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CS%d DIMM%d AddrMasks:\n"

L_.str.1:                               ## @.str.1
	.asciz	"  Original AddrMask: 0x%x\n"

L_.str.2:                               ## @.str.2
	.asciz	"  Deinterleaved AddrMask: 0x%x\n"

	.no_dead_strip	_f17_addr_mask_to_cs_size
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function f17_addr_mask_to_cs_size
_f17_addr_mask_to_cs_size:              ; @f17_addr_mask_to_cs_size
	.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
	cbz	w2, LBB0_4
; %bb.1:
	mov	x19, x3
Lloh0:
	adrp	x8, _CS_EVEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CS_EVEN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w9, w8, w2
	and	w8, w3, #0x1
	orr	w9, w9, w8
	cbz	w9, LBB0_4
; %bb.2:
	cbz	w8, LBB0_6
; %bb.3:
Lloh3:
	adrp	x9, _CS_ODD@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CS_ODD@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w9, w9, w2
	cbnz	w9, LBB0_6
LBB0_4:
	mov	w0, #0
LBB0_5:
	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_6:
	asr	w22, w19, #1
	cbz	w8, LBB0_9
; %bb.7:
Lloh6:
	adrp	x8, _CS_ODD_SECONDARY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CS_ODD_SECONDARY@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w2
	b.eq	LBB0_9
; %bb.8:
	ldr	x8, [x0]
	add	x8, x8, x1, lsl #4
	b	LBB0_10
LBB0_9:
	ldr	x8, [x0]
	add	x8, x8, x1, lsl #4
	add	x8, x8, #8
LBB0_10:
	ldr	x8, [x8]
	ldr	w20, [x8, w22, sxtw #2]
	mov	x0, x20
	bl	_fls
	mov	x0, x20
	bl	_hweight_long
	mov	w1, #1
	bl	_GENMASK_ULL
	mov	x21, x0
	str	x22, [sp]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_edac_dbg
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	mov	x2, x20
	bl	_edac_dbg
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	mov	x2, x21
	bl	_edac_dbg
	asr	w8, w21, #2
	add	w8, w8, #1
	asr	w0, w8, #10
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_CS_EVEN,4,2                    ; @CS_EVEN
	.comm	_CS_ODD,4,2                     ; @CS_ODD
	.comm	_CS_ODD_SECONDARY,4,2           ; @CS_ODD_SECONDARY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CS%d DIMM%d AddrMasks:\n"

l_.str.1:                               ; @.str.1
	.asciz	"  Original AddrMask: 0x%x\n"

l_.str.2:                               ; @.str.2
	.asciz	"  Deinterleaved AddrMask: 0x%x\n"

	.no_dead_strip	_f17_addr_mask_to_cs_size
.subsections_via_symbols
