	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function edram_detect
_edram_detect:                          ## @edram_detect
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_IS_HASWELL
	testq	%rax, %rax
	jne	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	callq	_IS_BROADWELL
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_INTEL_GEN
	cmpl	$9, %eax
	jl	LBB0_7
LBB0_3:
	leaq	8(%rbx), %rdi
	movq	_HSW_EDRAM_CAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	___raw_uncore_read32
	movl	%eax, %r14d
	movq	_EDRAM_ENABLED@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_7
## %bb.4:
	movq	%rbx, %rdi
	callq	_INTEL_GEN
	movl	$128, %edx
	cmpl	$9, %eax
	jl	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_gen9_edram_size_mb
	movl	%eax, %edx
LBB0_6:
	movl	%edx, (%rbx)
	movl	4(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_dev_info                       ## TAILCALL
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HSW_EDRAM_CAP,4,2              ## @HSW_EDRAM_CAP
	.comm	_EDRAM_ENABLED,4,2              ## @EDRAM_ENABLED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Found %uMB of eDRAM\n"

	.no_dead_strip	_edram_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function edram_detect
_edram_detect:                          ; @edram_detect
	.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	_IS_HASWELL
	cbnz	x0, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_IS_BROADWELL
	cbnz	x0, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_INTEL_GEN
	cmp	w0, #9
	b.lt	LBB0_6
LBB0_3:
	add	x0, x19, #8
Lloh0:
	adrp	x8, _HSW_EDRAM_CAP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HSW_EDRAM_CAP@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	___raw_uncore_read32
Lloh3:
	adrp	x8, _EDRAM_ENABLED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EDRAM_ENABLED@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.4:
	mov	x20, x0
	mov	x0, x19
	bl	_INTEL_GEN
	cmp	w0, #9
	b.ge	LBB0_7
; %bb.5:
	mov	w2, #128
	b	LBB0_8
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	x0, x19
	mov	x1, x20
	bl	_gen9_edram_size_mb
	mov	x2, x0
LBB0_8:
	str	w2, [x19]
	ldr	w0, [x19, #4]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_dev_info
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_HSW_EDRAM_CAP,4,2              ; @HSW_EDRAM_CAP
	.comm	_EDRAM_ENABLED,4,2              ; @EDRAM_ENABLED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Found %uMB of eDRAM\n"

	.no_dead_strip	_edram_detect
.subsections_via_symbols
