	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bxt_get_dram_info
_bxt_get_dram_info:                     ## @bxt_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	%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	_BXT_P_CR_MC_BIOS_REQ_0_0_0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_I915_READ
	movl	%eax, %ebx
	movq	_BXT_REQ_DATA_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	andl	%ebx, %edi
	movq	_BXT_MEMORY_FREQ_MULTIPLIER_HZ@GOTPCREL(%rip), %rax
	imull	(%rax), %edi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_DIV_ROUND_UP
	movl	%eax, %r15d
	movq	_BXT_DRAM_CHANNEL_ACTIVE_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_hweight32
                                        ## kill: def $eax killed $eax def $rax
	imull	%r15d, %eax
	leal	(,%rax,4), %ecx
	movl	%ecx, (%r14)
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movq	_BXT_D_CR_DRP0_DUNIT_START@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_BXT_D_CR_DRP0_DUNIT_END@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jle	LBB0_4
LBB0_16:
	movl	4(%r14), %eax
	movq	_INTEL_DRAM_UNKNOWN@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_18
## %bb.17:
	cmpl	$0, 8(%r14)
	je	LBB0_18
## %bb.19:
	movl	$1, 12(%r14)
	xorl	%eax, %eax
	jmp	LBB0_20
LBB0_18:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_2
LBB0_1:
	leaq	L_.str(%rip), %rdi
LBB0_2:
	callq	_DRM_INFO
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_20:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_INTEL_DRAM_UNKNOWN@GOTPCREL(%rip), %r12
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_5 Depth=1
	leal	1(%r15), %eax
	movq	_BXT_D_CR_DRP0_DUNIT_END@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r15d
	movl	%eax, %r15d
	jge	LBB0_16
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %edi
	callq	_BXT_D_CR_DRP0_DUNIT
	movl	%eax, %edi
	callq	_I915_READ
	cmpl	$-1, %eax
	je	LBB0_15
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%eax, %ebx
	incl	16(%r14)
	leaq	-56(%rbp), %rdi
	movl	%eax, %esi
	callq	_bxt_get_dimm_info
	movl	%ebx, %edi
	callq	_bxt_get_dimm_type
	movl	%eax, %r13d
	movl	(%r12), %eax
	cmpl	%eax, %r13d
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	xorl	%eax, %eax
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	4(%r14), %ecx
	cmpl	%eax, %ecx
	setne	%dl
	cmpl	%r13d, %ecx
	setne	%al
	andb	%dl, %al
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	movzbl	%al, %edi
	callq	_WARN_ON
	movl	%r15d, %ebx
	movq	_BXT_D_CR_DRP0_DUNIT_START@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movl	-48(%rbp), %r12d
	movl	-56(%rbp), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	-52(%rbp), %r14d
	movl	%r13d, %edi
	callq	_intel_dram_type_str
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	movl	%r12d, %edx
	movl	%r14d, %ecx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	movl	%eax, %r9d
	callq	_DRM_DEBUG_KMS
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	cmpl	$0, 8(%r14)
	movl	-56(%rbp), %eax
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$1, %eax
	movl	$1, %eax
	movq	_INTEL_DRAM_UNKNOWN@GOTPCREL(%rip), %r12
	je	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpl	(%r12), %r13d
	je	LBB0_15
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	_INTEL_DRAM_UNKNOWN@GOTPCREL(%rip), %r12
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	%eax, 8(%r14)
	cmpl	(%r12), %r13d
	je	LBB0_15
LBB0_14:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	%r13d, 4(%r14)
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_BXT_P_CR_MC_BIOS_REQ_0_0_0,4,2 ## @BXT_P_CR_MC_BIOS_REQ_0_0_0
	.comm	_BXT_REQ_DATA_MASK,4,2          ## @BXT_REQ_DATA_MASK
	.comm	_BXT_MEMORY_FREQ_MULTIPLIER_HZ,4,2 ## @BXT_MEMORY_FREQ_MULTIPLIER_HZ
	.comm	_BXT_DRAM_CHANNEL_ACTIVE_MASK,4,2 ## @BXT_DRAM_CHANNEL_ACTIVE_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Couldn't get system memory bandwidth\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_BXT_D_CR_DRP0_DUNIT_START,4,2  ## @BXT_D_CR_DRP0_DUNIT_START
	.comm	_BXT_D_CR_DRP0_DUNIT_END,4,2    ## @BXT_D_CR_DRP0_DUNIT_END
	.comm	_INTEL_DRAM_UNKNOWN,4,2         ## @INTEL_DRAM_UNKNOWN
L_.str.1:                               ## @.str.1
	.asciz	"CH%u DIMM size: %u GB, width: X%u, ranks: %u, type: %s\n"

L_.str.2:                               ## @.str.2
	.asciz	"couldn't get memory information\n"

	.no_dead_strip	_bxt_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 bxt_get_dram_info
_bxt_get_dram_info:                     ; @bxt_get_dram_info
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
Lloh0:
	adrp	x8, _BXT_P_CR_MC_BIOS_REQ_0_0_0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BXT_P_CR_MC_BIOS_REQ_0_0_0@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_I915_READ
	mov	x20, x0
Lloh3:
	adrp	x8, _BXT_REQ_DATA_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BXT_REQ_DATA_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh6:
	adrp	x9, _BXT_MEMORY_FREQ_MULTIPLIER_HZ@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BXT_MEMORY_FREQ_MULTIPLIER_HZ@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	mul	w0, w8, w9
	mov	w1, #1000
	bl	_DIV_ROUND_UP
	mov	x21, x0
Lloh9:
	adrp	x8, _BXT_DRAM_CHANNEL_ACTIVE_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BXT_DRAM_CHANNEL_ACTIVE_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	and	w0, w8, w20
	bl	_hweight32
	mul	w8, w0, w21
	lsl	w9, w8, #2
	str	w9, [x19]
	cbz	w8, LBB0_16
; %bb.1:
Lloh12:
	adrp	x27, _BXT_D_CR_DRP0_DUNIT_START@GOTPAGE
Lloh13:
	ldr	x27, [x27, _BXT_D_CR_DRP0_DUNIT_START@GOTPAGEOFF]
	ldr	w20, [x27]
Lloh14:
	adrp	x28, _BXT_D_CR_DRP0_DUNIT_END@GOTPAGE
Lloh15:
	ldr	x28, [x28, _BXT_D_CR_DRP0_DUNIT_END@GOTPAGEOFF]
	ldr	w8, [x28]
Lloh16:
	adrp	x21, _INTEL_DRAM_UNKNOWN@GOTPAGE
Lloh17:
	ldr	x21, [x21, _INTEL_DRAM_UNKNOWN@GOTPAGEOFF]
	cmp	w20, w8
	b.le	LBB0_6
LBB0_2:
	ldr	w8, [x19, #4]
	ldr	w9, [x21]
	cmp	w8, w9
	b.eq	LBB0_15
; %bb.3:
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_15
; %bb.4:
	mov	w0, #0
	mov	w8, #1
	str	w8, [x19, #12]
	b	LBB0_18
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	w8, w20, #1
	ldr	w9, [x28]
	cmp	w20, w9
	mov	x20, x8
	b.ge	LBB0_2
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_BXT_D_CR_DRP0_DUNIT
	bl	_I915_READ
	cmn	w0, #1
	b.eq	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x22, x0
	ldr	w8, [x19, #16]
	add	w8, w8, #1
	str	w8, [x19, #16]
	mov	x0, sp
	mov	x1, x22
	bl	_bxt_get_dimm_info
	mov	x0, x22
	bl	_bxt_get_dimm_type
	mov	x22, x0
	ldr	w8, [x21]
	cmp	w0, w8
	b.ne	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w0, #0
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w9, [x19, #4]
	cmp	w9, w8
	ccmp	w9, w22, #4, ne
	cset	w0, ne
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
	bl	_WARN_ON
	ldr	w8, [x27]
	sub	w23, w20, w8
	ldp	w25, w24, [sp, #4]
	ldr	w26, [sp]
	mov	x0, x22
	bl	_intel_dram_type_str
	mov	x5, x0
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x23
	mov	x2, x24
	mov	x3, x25
	mov	x4, x26
	bl	_DRM_DEBUG_KMS
	ldr	w9, [x19, #8]
	ldr	w8, [sp]
	cbz	w9, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	cmp	w8, #1
	b.ne	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	str	w8, [x19, #8]
LBB0_13:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x21]
	cmp	w22, w8
	b.eq	LBB0_5
; %bb.14:                               ;   in Loop: Header=BB0_6 Depth=1
	str	w22, [x19, #4]
	b	LBB0_5
LBB0_15:
Lloh20:
	adrp	x0, l_.str.2@PAGE
Lloh21:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_17
LBB0_16:
Lloh22:
	adrp	x0, l_.str@PAGE
Lloh23:
	add	x0, x0, l_.str@PAGEOFF
LBB0_17:
	bl	_DRM_INFO
Lloh24:
	adrp	x8, _EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_18:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_BXT_P_CR_MC_BIOS_REQ_0_0_0,4,2 ; @BXT_P_CR_MC_BIOS_REQ_0_0_0
	.comm	_BXT_REQ_DATA_MASK,4,2          ; @BXT_REQ_DATA_MASK
	.comm	_BXT_MEMORY_FREQ_MULTIPLIER_HZ,4,2 ; @BXT_MEMORY_FREQ_MULTIPLIER_HZ
	.comm	_BXT_DRAM_CHANNEL_ACTIVE_MASK,4,2 ; @BXT_DRAM_CHANNEL_ACTIVE_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Couldn't get system memory bandwidth\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_BXT_D_CR_DRP0_DUNIT_START,4,2  ; @BXT_D_CR_DRP0_DUNIT_START
	.comm	_BXT_D_CR_DRP0_DUNIT_END,4,2    ; @BXT_D_CR_DRP0_DUNIT_END
	.comm	_INTEL_DRAM_UNKNOWN,4,2         ; @INTEL_DRAM_UNKNOWN
l_.str.1:                               ; @.str.1
	.asciz	"CH%u DIMM size: %u GB, width: X%u, ranks: %u, type: %s\n"

l_.str.2:                               ; @.str.2
	.asciz	"couldn't get memory information\n"

	.no_dead_strip	_bxt_get_dram_info
.subsections_via_symbols
