	.file	"extr_amd64_edac.c_sys_addr_to_dram_addr.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"using DHAR to translate SysAddr 0x%lx to DramAddr 0x%lx\n"
	.align 8
.LC1:
	.string	"using DRAM Base register to translate SysAddr 0x%lx to DramAddr 0x%lx\n"
	.text
	.p2align 4
	.type	sys_addr_to_dram_addr, @function
sys_addr_to_dram_addr:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 32
	.cfi_def_cfa_offset 64
	mov	rdi, QWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	esi, DWORD PTR [rdi]
	call	get_dram_base@PLT
	lea	rcx, 16[rsp]
	mov	rsi, rsp
	mov	rdi, r12
	lea	rdx, 8[rsp]
	mov	rbx, rax
	call	amd64_get_dram_hole_info@PLT
	test	eax, eax
	jne	.L2
	mov	eax, 4294967295
	cmp	rbp, rax
	jbe	.L2
	add	rax, 1
	add	rax, QWORD PTR 16[rsp]
	cmp	rax, rbp
	ja	.L13
.L2:
	mov	esi, 39
	xor	edi, edi
	call	GENMASK@PLT
	mov	rsi, rbp
	lea	rdi, .LC1[rip]
	and	rax, rbp
	mov	r12, rax
	sub	r12, rbx
	mov	rdx, r12
	call	debugf2@PLT
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L14
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	mov	rax, r12
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	r12, rbp
	sub	r12, QWORD PTR 8[rsp]
	mov	rsi, rbp
	mov	rdx, r12
	lea	rdi, .LC0[rip]
	call	debugf2@PLT
	jmp	.L1
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	sys_addr_to_dram_addr, .-sys_addr_to_dram_addr
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_amd64_edac.c_sys_addr_to_dram_addr.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"using DHAR to translate SysAddr 0x%lx to DramAddr 0"
	.ascii	"x%lx\012\000"
	.align	2
.LC1:
	.ascii	"using DRAM Base register to translate SysAddr 0x%lx"
	.ascii	" to DramAddr 0x%lx\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sys_addr_to_dram_addr, %function
sys_addr_to_dram_addr:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r8, r0
	ldr	r0, [r0]
	mov	r7, r3
	ldr	r3, .L12
	sub	sp, sp, #36
	ldr	r1, [r0]
	mov	r6, r2
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	bl	get_dram_base
	add	r3, sp, #16
	mov	r5, r1
	add	r2, sp, #8
	mov	r9, r0
	mov	r1, sp
	mov	r0, r8
	bl	amd64_get_dram_hole_info
	mov	r3, #0
	mvn	r2, #0
	cmp	r7, r3
	cmpeq	r6, r2
	movhi	r3, #1
	movls	r3, #0
	cmp	r0, #0
	movne	r3, #0
	cmp	r3, #0
	mov	r8, r5
	bne	.L10
.L2:
	mov	r1, #39
	mov	r0, #0
	bl	GENMASK
	and	r4, r0, r6
	subs	r4, r4, r9
	and	r5, r1, r7
	mov	r2, r4
	mov	r1, r6
	ldr	r0, .L12+4
	sbc	r5, r5, r8
	bl	debugf2
.L1:
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L11
	mov	r0, r4
	mov	r1, r5
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L10:
	ldr	r3, [sp, #16]
	ldr	r2, [sp, #20]
	adds	r10, r3, #0
	adc	fp, r2, #1
	cmp	fp, r7
	cmpeq	r10, r6
	bls	.L2
	ldr	r4, [sp, #8]
	ldr	r5, [sp, #12]
	subs	r4, r6, r4
	mov	r2, r4
	mov	r1, r6
	ldr	r0, .L12+8
	sbc	r5, r7, r5
	bl	debugf2
	b	.L1
.L11:
	bl	__stack_chk_fail
.L13:
	.align	2
.L12:
	.word	.LC2
	.word	.LC1
	.word	.LC0
	.size	sys_addr_to_dram_addr, .-sys_addr_to_dram_addr
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
