	.file	"extr_ar5315_chip.c_ar5315_chip_detect_mem_size.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ar5315_chip_detect_mem_size, @function
ar5315_chip_detect_mem_size:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	rdi, QWORD PTR AR5315_SDRAMCTL_MEM_CFG[rip]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	add	rdi, QWORD PTR AR5315_SDRAMCTL_BASE[rip]
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	ATH_READ_REG@PLT
	mov	esi, DWORD PTR AR5315_MEM_CFG_COL_WIDTH[rip]
	mov	edi, eax
	mov	r12d, eax
	call	__SHIFTOUT@PLT
	mov	esi, DWORD PTR AR5315_MEM_CFG_ROW_WIDTH[rip]
	mov	edi, r12d
	mov	ebp, eax
	call	__SHIFTOUT@PLT
	mov	esi, DWORD PTR AR5315_MEM_CFG_DATA_WIDTH[rip]
	mov	edi, r12d
	mov	ebx, eax
	call	__SHIFTOUT@PLT
	lea	ecx, 1[rbp]
	mov	r8d, eax
	mov	eax, 1
	sal	eax, cl
	lea	ecx, 1[rbx]
	add	r8d, 1
	pop	rbx
	.cfi_def_cfa_offset 24
	sal	eax, cl
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	imul	eax, r8d
	sal	eax, 3
	mov	DWORD PTR realmem[rip], eax
	ret
	.cfi_endproc
.LFE0:
	.size	ar5315_chip_detect_mem_size, .-ar5315_chip_detect_mem_size
	.comm	realmem,4,4
	.comm	AR5315_SDRAMCTL_MEM_CFG,8,8
	.comm	AR5315_SDRAMCTL_BASE,8,8
	.comm	AR5315_MEM_CFG_ROW_WIDTH,4,4
	.comm	AR5315_MEM_CFG_DATA_WIDTH,4,4
	.comm	AR5315_MEM_CFG_COL_WIDTH,4,4
	.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_ar5315_chip.c_ar5315_chip_detect_mem_size.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ar5315_chip_detect_mem_size, %function
ar5315_chip_detect_mem_size:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r2, .L4
	ldr	r3, .L4+4
	ldr	r0, [r2]
	ldr	r3, [r3]
	push	{r4, r5, r6, lr}
	add	r0, r0, r3
	bl	ATH_READ_REG
	ldr	r3, .L4+8
	mov	r6, r0
	ldr	r1, [r3]
	bl	__SHIFTOUT
	ldr	r3, .L4+12
	mov	r5, r0
	ldr	r1, [r3]
	mov	r0, r6
	bl	__SHIFTOUT
	ldr	r3, .L4+16
	mov	r4, r0
	ldr	r1, [r3]
	mov	r0, r6
	bl	__SHIFTOUT
	mov	r3, #1
	add	r5, r5, r3
	add	r4, r4, r3
	lsl	r3, r3, r5
	add	r0, r0, #1
	lsl	r3, r3, r4
	mul	r3, r0, r3
	ldr	r2, .L4+20
	lsl	r3, r3, #3
	str	r3, [r2]
	pop	{r4, r5, r6, pc}
.L5:
	.align	2
.L4:
	.word	AR5315_SDRAMCTL_BASE
	.word	AR5315_SDRAMCTL_MEM_CFG
	.word	AR5315_MEM_CFG_COL_WIDTH
	.word	AR5315_MEM_CFG_ROW_WIDTH
	.word	AR5315_MEM_CFG_DATA_WIDTH
	.word	realmem
	.size	ar5315_chip_detect_mem_size, .-ar5315_chip_detect_mem_size
	.comm	realmem,4,4
	.comm	AR5315_SDRAMCTL_MEM_CFG,4,4
	.comm	AR5315_SDRAMCTL_BASE,4,4
	.comm	AR5315_MEM_CFG_ROW_WIDTH,4,4
	.comm	AR5315_MEM_CFG_DATA_WIDTH,4,4
	.comm	AR5315_MEM_CFG_COL_WIDTH,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
