	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function haswell_get_memory_type
_haswell_get_memory_type:               ## @haswell_get_memory_type
	.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
	movq	%rdi, %rbx
	movl	4(%rdi), %edi
	testl	%edi, %edi
	je	LBB0_1
## %bb.2:
	movq	_HASWELL_DDRCRCLKCONTROLS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %r15
	movq	%r15, %rdx
	callq	_pci_read_config_dword
	movl	-28(%rbp), %edi
	movl	$16, %esi
	movl	$16, %edx
	callq	_GET_BITFIELD
	movq	%rax, %r14
	movl	(%rbx), %edi
	movq	_MCMTR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdx
	callq	_pci_read_config_dword
	movl	-28(%rbp), %edi
	movl	$14, %esi
	movl	$14, %edx
	callq	_GET_BITFIELD
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	testq	%r14, %r14
	jne	LBB0_4
## %bb.5:
	movq	_MEM_DDR4@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_1:
	movq	_MEM_UNKNOWN@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_6:
	testq	%r14, %r14
	jne	LBB0_7
## %bb.8:
	movq	_MEM_DDR3@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_4:
	movq	_MEM_RDDR4@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_MEM_RDDR3@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MEM_UNKNOWN,4,2                ## @MEM_UNKNOWN
	.comm	_HASWELL_DDRCRCLKCONTROLS,4,2   ## @HASWELL_DDRCRCLKCONTROLS
	.comm	_MCMTR,4,2                      ## @MCMTR
	.comm	_MEM_RDDR4,4,2                  ## @MEM_RDDR4
	.comm	_MEM_DDR4,4,2                   ## @MEM_DDR4
	.comm	_MEM_RDDR3,4,2                  ## @MEM_RDDR3
	.comm	_MEM_DDR3,4,2                   ## @MEM_DDR3
	.no_dead_strip	_haswell_get_memory_type
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function haswell_get_memory_type
_haswell_get_memory_type:               ; @haswell_get_memory_type
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	w0, [x0, #4]
	cbz	w0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _HASWELL_DDRCRCLKCONTROLS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HASWELL_DDRCRCLKCONTROLS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_pci_read_config_dword
	ldr	w0, [sp, #12]
	mov	w1, #16
	mov	w2, #16
	bl	_GET_BITFIELD
	mov	x20, x0
	ldr	w0, [x19]
Lloh3:
	adrp	x8, _MCMTR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MCMTR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_pci_read_config_dword
	ldr	w0, [sp, #12]
	mov	w1, #14
	mov	w2, #14
	bl	_GET_BITFIELD
Lloh6:
	adrp	x8, _MEM_RDDR3@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MEM_RDDR3@GOTPAGEOFF]
Lloh8:
	adrp	x9, _MEM_DDR3@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MEM_DDR3@GOTPAGEOFF]
Lloh10:
	adrp	x10, _MEM_RDDR4@GOTPAGE
Lloh11:
	ldr	x10, [x10, _MEM_RDDR4@GOTPAGEOFF]
	cmp	x20, #0
	csel	x8, x9, x8, eq
Lloh12:
	adrp	x9, _MEM_DDR4@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MEM_DDR4@GOTPAGEOFF]
	csel	x9, x9, x10, eq
	cmp	x0, #0
	csel	x8, x8, x9, eq
	b	LBB0_3
LBB0_2:
Lloh14:
	adrp	x8, _MEM_UNKNOWN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MEM_UNKNOWN@GOTPAGEOFF]
LBB0_3:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_MEM_UNKNOWN,4,2                ; @MEM_UNKNOWN
	.comm	_HASWELL_DDRCRCLKCONTROLS,4,2   ; @HASWELL_DDRCRCLKCONTROLS
	.comm	_MCMTR,4,2                      ; @MCMTR
	.comm	_MEM_RDDR4,4,2                  ; @MEM_RDDR4
	.comm	_MEM_DDR4,4,2                   ; @MEM_DDR4
	.comm	_MEM_RDDR3,4,2                  ; @MEM_RDDR3
	.comm	_MEM_DDR3,4,2                   ; @MEM_DDR3
	.no_dead_strip	_haswell_get_memory_type
.subsections_via_symbols
