	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_dram_base_limit_regs
_read_dram_base_limit_regs:             ## @read_dram_base_limit_regs
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	leal	(,%r14,8), %eax
	movq	(%rdi), %rcx
	movq	8(%rdi), %rdi
	movq	_DRAM_BASE_LO@GOTPCREL(%rip), %rdx
	movslq	%eax, %rbx
	movq	(%rdx), %rsi
	addq	%rbx, %rsi
	movl	%r14d, %r12d
	shlq	$4, %r12
	leaq	(%rcx,%r12), %rdx
	addq	$8, %rdx
	callq	_amd64_read_pci_cfg
	movq	8(%r15), %rdi
	movq	_DRAM_LIMIT_LO@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%rbx, %rsi
	movq	(%r15), %rdx
	addq	%r12, %rdx
	callq	_amd64_read_pci_cfg
	movq	_boot_cpu_data@GOTPCREL(%rip), %r13
	cmpl	$15, (%r13)
	je	LBB0_5
## %bb.1:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_dram_rw
	testl	%eax, %eax
	je	LBB0_5
## %bb.2:
	movq	(%r15), %rax
	movq	8(%r15), %rdi
	movq	_DRAM_BASE_HI@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	%rbx, %rsi
	leaq	(%rax,%r12), %rdx
	addq	$12, %rdx
	callq	_amd64_read_pci_cfg
	movq	(%r15), %rax
	movq	8(%r15), %rdi
	movq	_DRAM_LIMIT_HI@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rbx
	leaq	(%rax,%r12), %rdx
	addq	$4, %rdx
	movq	%rbx, %rsi
	callq	_amd64_read_pci_cfg
	cmpl	$21, (%r13)
	jne	LBB0_5
## %bb.3:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_dram_dst_node
	leaq	24(%rax), %rdi
	movl	$1, %esi
	callq	_PCI_DEVFN
	xorl	%edi, %edi
	xorl	%esi, %esi
	movl	%eax, %edx
	callq	_pci_get_domain_bus_and_slot
	movq	%rax, %rbx
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movq	_DRAM_LOCAL_NODE_LIM@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	-44(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_amd64_read_pci_cfg
	xorl	%edi, %edi
	movl	$15, %esi
	callq	_GENMASK
	movq	(%r15), %rcx
	andl	(%rcx,%r12), %eax
	movl	%eax, (%rcx,%r12)
	movl	-44(%rbp), %edx
	shll	$19, %edx
	orl	%eax, %edx
	orl	$458752, %edx                   ## imm = 0x70000
	movl	%edx, (%rcx,%r12)
	xorl	%edi, %edi
	movl	$7, %esi
	callq	_GENMASK
	movq	(%r15), %rcx
	andl	4(%rcx,%r12), %eax
	movl	%eax, 4(%rcx,%r12)
	movl	-44(%rbp), %edx
	sarl	$13, %edx
	orl	%eax, %edx
	movl	%edx, 4(%rcx,%r12)
	movq	%rbx, %rdi
	callq	_pci_dev_put
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_boot_cpu_data,4,2              ## @boot_cpu_data
	.comm	_DRAM_BASE_LO,8,3               ## @DRAM_BASE_LO
	.comm	_DRAM_LIMIT_LO,8,3              ## @DRAM_LIMIT_LO
	.comm	_DRAM_BASE_HI,8,3               ## @DRAM_BASE_HI
	.comm	_DRAM_LIMIT_HI,8,3              ## @DRAM_LIMIT_HI
	.comm	_DRAM_LOCAL_NODE_LIM,8,3        ## @DRAM_LOCAL_NODE_LIM
	.no_dead_strip	_read_dram_base_limit_regs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_dram_base_limit_regs
_read_dram_base_limit_regs:             ; @read_dram_base_limit_regs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x1
	mov	x19, x0
	lsl	w8, w1, #3
Lloh0:
	adrp	x9, _DRAM_BASE_LO@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DRAM_BASE_LO@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	sxtw	x22, w8
	add	x1, x9, x22
	ldr	x0, [x0, #8]
	ldr	x8, [x19]
	mov	w9, w20
	lsl	x21, x9, #4
	add	x8, x8, x21
	add	x2, x8, #8
	bl	_amd64_read_pci_cfg
Lloh3:
	adrp	x8, _DRAM_LIMIT_LO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DRAM_LIMIT_LO@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	add	x1, x8, x22
	ldp	x8, x0, [x19]
	add	x2, x8, x21
	bl	_amd64_read_pci_cfg
Lloh6:
	adrp	x23, _boot_cpu_data@GOTPAGE
Lloh7:
	ldr	x23, [x23, _boot_cpu_data@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #15
	b.eq	LBB0_5
; %bb.1:
	mov	x0, x19
	mov	x1, x20
	bl	_dram_rw
	cbz	w0, LBB0_5
; %bb.2:
Lloh8:
	adrp	x8, _DRAM_BASE_HI@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DRAM_BASE_HI@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	add	x1, x8, x22
	ldp	x8, x0, [x19]
	add	x8, x8, x21
	add	x2, x8, #12
	bl	_amd64_read_pci_cfg
Lloh11:
	adrp	x8, _DRAM_LIMIT_HI@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DRAM_LIMIT_HI@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	add	x1, x8, x22
	ldp	x8, x0, [x19]
	add	x8, x8, x21
	add	x2, x8, #4
	bl	_amd64_read_pci_cfg
	ldr	w8, [x23]
	cmp	w8, #21
	b.ne	LBB0_5
; %bb.3:
	mov	x0, x19
	mov	x1, x20
	bl	_dram_dst_node
	add	x0, x0, #24
	mov	w1, #1
	bl	_PCI_DEVFN
	mov	x2, x0
	mov	w0, #0
	mov	w1, #0
	bl	_pci_get_domain_bus_and_slot
	mov	x20, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_WARN_ON
	cbnz	x0, LBB0_5
; %bb.4:
Lloh14:
	adrp	x8, _DRAM_LOCAL_NODE_LIM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DRAM_LOCAL_NODE_LIM@GOTPAGEOFF]
Lloh16:
	ldr	x1, [x8]
	add	x2, sp, #12
	mov	x0, x20
	bl	_amd64_read_pci_cfg
	mov	w0, #0
	mov	w1, #15
	bl	_GENMASK
	ldr	x8, [x19]
	ldr	w9, [x8, x21]
	and	w9, w9, w0
	str	w9, [x8, x21]
	ldr	w10, [sp, #12]
	orr	w9, w9, w10, lsl #19
	orr	w9, w9, #0x70000
	str	w9, [x8, x21]
	mov	w0, #0
	mov	w1, #7
	bl	_GENMASK
	ldr	x8, [x19]
	add	x8, x8, x21
	ldr	w9, [x8, #4]
	and	w9, w9, w0
	str	w9, [x8, #4]
	ldr	w10, [sp, #12]
	orr	w9, w9, w10, asr #13
	str	w9, [x8, #4]
	mov	x0, x20
	bl	_pci_dev_put
LBB0_5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_boot_cpu_data,4,2              ; @boot_cpu_data
	.comm	_DRAM_BASE_LO,8,3               ; @DRAM_BASE_LO
	.comm	_DRAM_LIMIT_LO,8,3              ; @DRAM_LIMIT_LO
	.comm	_DRAM_BASE_HI,8,3               ; @DRAM_BASE_HI
	.comm	_DRAM_LIMIT_HI,8,3              ; @DRAM_LIMIT_HI
	.comm	_DRAM_LOCAL_NODE_LIM,8,3        ; @DRAM_LOCAL_NODE_LIM
	.no_dead_strip	_read_dram_base_limit_regs
.subsections_via_symbols
