	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function f15_m60h_dbam_to_chip_select
_f15_m60h_dbam_to_chip_select:          ## @f15_m60h_dbam_to_chip_select
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	(%rax,%rsi,8), %rax
	movslq	%ecx, %rcx
	movl	(%rax,%rcx,4), %r15d
	xorl	%edi, %edi
	cmpl	$13, %edx
	setae	%dil
	callq	_WARN_ON
	movq	(%rbx), %rax
	movq	_MEM_DDR4@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	cmpl	$9, %r14d
	ja	LBB0_5
## %bb.2:
	movl	%r14d, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ddr4_cs_size                   ## TAILCALL
LBB0_3:
	movq	_MEM_LRDDR3@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.6:
	andl	$15, %r15d
	cmpl	$3, %r15d
	movl	$4, %esi
	cmovnel	%r15d, %esi
	movl	%r14d, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ddr3_lrdimm_cs_size            ## TAILCALL
LBB0_4:
	cmpl	$1, %r14d
	jne	LBB0_7
LBB0_5:
	movl	$-1, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	%r14d, %edi
	xorl	%esi, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ddr3_cs_size                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MEM_DDR4,8,3                   ## @MEM_DDR4
	.comm	_MEM_LRDDR3,8,3                 ## @MEM_LRDDR3
	.no_dead_strip	_f15_m60h_dbam_to_chip_select
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function f15_m60h_dbam_to_chip_select
_f15_m60h_dbam_to_chip_select:          ; @f15_m60h_dbam_to_chip_select
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x2
	mov	x20, x0
	ldr	x8, [x0, #8]
	ldr	x8, [x8, x1, lsl #3]
	ldr	w21, [x8, w3, sxtw #2]
	cmp	w2, #12
	cset	w0, hi
	bl	_WARN_ON
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _MEM_DDR4@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MEM_DDR4@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	cmp	w19, #9
	b.hi	LBB0_6
; %bb.2:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ddr4_cs_size
LBB0_3:
Lloh3:
	adrp	x9, _MEM_LRDDR3@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MEM_LRDDR3@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.4:
	and	w8, w21, #0xf
	mov	w9, #4
	cmp	w8, #3
	csel	w1, w9, w8, eq
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ddr3_lrdimm_cs_size
LBB0_5:
	cmp	w19, #1
	b.ne	LBB0_7
LBB0_6:
	mov	w0, #-1
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	x0, x19
	mov	w1, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ddr3_cs_size
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MEM_DDR4,8,3                   ; @MEM_DDR4
	.comm	_MEM_LRDDR3,8,3                 ; @MEM_LRDDR3
	.no_dead_strip	_f15_m60h_dbam_to_chip_select
.subsections_via_symbols
