	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sys_addr_to_dram_addr
_sys_addr_to_dram_addr:                 ## @sys_addr_to_dram_addr
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	(%rdi), %rdi
	movl	(%rdi), %esi
	callq	_get_dram_base
	movq	%rax, %r14
	leaq	-48(%rbp), %rsi
	leaq	-40(%rbp), %rdx
	leaq	-32(%rbp), %rcx
	movq	%rbx, %rdi
	callq	_amd64_get_dram_hole_info
	movq	%r15, %rcx
	shrq	$32, %rcx
	je	LBB0_4
## %bb.1:
	testl	%eax, %eax
	jne	LBB0_4
## %bb.2:
	movabsq	$4294967296, %rax               ## imm = 0x100000000
	addq	-32(%rbp), %rax
	cmpq	%r15, %rax
	jbe	LBB0_4
## %bb.3:
	movq	%r15, %rbx
	subq	-40(%rbp), %rbx
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_5
LBB0_4:
	xorl	%edi, %edi
	movl	$39, %esi
	callq	_GENMASK
	movq	%rax, %rbx
	andq	%r15, %rbx
	subq	%r14, %rbx
	leaq	L_.str.1(%rip), %rdi
LBB0_5:
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_debugf2
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"using DHAR to translate SysAddr 0x%lx to DramAddr 0x%lx\n"

L_.str.1:                               ## @.str.1
	.asciz	"using DRAM Base register to translate SysAddr 0x%lx to DramAddr 0x%lx\n"

	.no_dead_strip	_sys_addr_to_dram_addr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sys_addr_to_dram_addr
_sys_addr_to_dram_addr:                 ; @sys_addr_to_dram_addr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x1
	mov	x21, x0
	ldr	x0, [x0]
	ldr	w1, [x0]
	bl	_get_dram_base
	mov	x20, x0
	add	x1, sp, #24
	add	x2, sp, #16
	add	x3, sp, #8
	mov	x0, x21
	bl	_amd64_get_dram_hole_info
	lsr	x8, x19, #32
	cbz	x8, LBB0_4
; %bb.1:
	cbnz	w0, LBB0_4
; %bb.2:
	ldr	x8, [sp, #8]
	mov	x9, #4294967296
	add	x8, x8, x9
	cmp	x8, x19
	b.ls	LBB0_4
; %bb.3:
	ldr	x8, [sp, #16]
	sub	x20, x19, x8
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_5
LBB0_4:
	mov	w0, #0
	mov	w1, #39
	bl	_GENMASK
	and	x8, x0, x19
	sub	x20, x8, x20
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_5:
	mov	x1, x19
	mov	x2, x20
	bl	_debugf2
	mov	x0, x20
	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
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"using DHAR to translate SysAddr 0x%lx to DramAddr 0x%lx\n"

l_.str.1:                               ; @.str.1
	.asciz	"using DRAM Base register to translate SysAddr 0x%lx to DramAddr 0x%lx\n"

	.no_dead_strip	_sys_addr_to_dram_addr
.subsections_via_symbols
