	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function skl_get_dram_info
_skl_get_dram_info:                     ## @skl_get_dram_info
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	callq	_skl_get_dram_type
	movl	%eax, 12(%rbx)
	movl	%eax, %edi
	callq	_intel_dram_type_str
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_DEBUG_KMS
	movq	%rbx, %rdi
	callq	_skl_dram_get_channels_info
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movq	_SKL_MC_BIOS_DATA_0_0_0_MCHBAR_PCU@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_I915_READ
	movq	_SKL_REQ_DATA_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_SKL_MEMORY_FREQ_MULTIPLIER_HZ@GOTPCREL(%rip), %rcx
	imull	(%rcx), %eax
	movl	%eax, %edi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_DIV_ROUND_UP
                                        ## kill: def $eax killed $eax def $rax
	imull	4(%rbx), %eax
	leal	(,%rax,8), %ecx
	movl	%ecx, (%rbx)
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movl	$1, 8(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_2:
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_INFO
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DRAM type: %s\n"

	.comm	_SKL_MC_BIOS_DATA_0_0_0_MCHBAR_PCU,4,2 ## @SKL_MC_BIOS_DATA_0_0_0_MCHBAR_PCU
	.comm	_SKL_REQ_DATA_MASK,4,2          ## @SKL_REQ_DATA_MASK
	.comm	_SKL_MEMORY_FREQ_MULTIPLIER_HZ,4,2 ## @SKL_MEMORY_FREQ_MULTIPLIER_HZ
L_.str.1:                               ## @.str.1
	.asciz	"Couldn't get system memory bandwidth\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_skl_get_dram_info
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function skl_get_dram_info
_skl_get_dram_info:                     ; @skl_get_dram_info
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_skl_get_dram_type
	str	w0, [x19, #12]
	bl	_intel_dram_type_str
	mov	x1, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
	mov	x0, x19
	bl	_skl_dram_get_channels_info
	cbnz	w0, LBB0_4
; %bb.1:
Lloh2:
	adrp	x8, _SKL_MC_BIOS_DATA_0_0_0_MCHBAR_PCU@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SKL_MC_BIOS_DATA_0_0_0_MCHBAR_PCU@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_I915_READ
Lloh5:
	adrp	x8, _SKL_REQ_DATA_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SKL_REQ_DATA_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh8:
	adrp	x9, _SKL_MEMORY_FREQ_MULTIPLIER_HZ@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SKL_MEMORY_FREQ_MULTIPLIER_HZ@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	mul	w0, w8, w9
	mov	w1, #1000
	bl	_DIV_ROUND_UP
	ldr	w8, [x19, #4]
	mul	w8, w8, w0
	lsl	w9, w8, #3
	str	w9, [x19]
	cbz	w8, LBB0_3
; %bb.2:
	mov	w0, #0
	mov	w8, #1
	str	w8, [x19, #8]
	b	LBB0_4
LBB0_3:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_INFO
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DRAM type: %s\n"

	.comm	_SKL_MC_BIOS_DATA_0_0_0_MCHBAR_PCU,4,2 ; @SKL_MC_BIOS_DATA_0_0_0_MCHBAR_PCU
	.comm	_SKL_REQ_DATA_MASK,4,2          ; @SKL_REQ_DATA_MASK
	.comm	_SKL_MEMORY_FREQ_MULTIPLIER_HZ,4,2 ; @SKL_MEMORY_FREQ_MULTIPLIER_HZ
l_.str.1:                               ; @.str.1
	.asciz	"Couldn't get system memory bandwidth\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_skl_get_dram_info
.subsections_via_symbols
