	.file	"extr_lpddr_cmds.c_lpddr_read.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	lpddr_read, @function
lpddr_read:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	eax, esi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, r8
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, esi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	r15, QWORD PTR [rdi]
	mov	QWORD PTR 8[rsp], rcx
	mov	rdx, QWORD PTR [r15]
	mov	ecx, DWORD PTR [rdx]
	mov	rdx, QWORD PTR 8[rdx]
	sar	eax, cl
	cdqe
	lea	rbx, [rdx+rax*4]
	mov	edi, DWORD PTR [rbx]
	call	spin_lock@PLT
	mov	edx, DWORD PTR FL_READY[rip]
	mov	rsi, rbx
	mov	rdi, r15
	call	get_chip@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L5
	mov	rsi, r14
	mov	rdi, r15
	mov	rcx, rbp
	mov	edx, r13d
	call	map_copy_from@PLT
	mov	rax, QWORD PTR 8[rsp]
	mov	rsi, rbx
	mov	rdi, r15
	mov	QWORD PTR [rax], rbp
	call	put_chip@PLT
.L5:
	mov	edi, DWORD PTR [rbx]
	call	spin_unlock@PLT
	add	rsp, 24
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	lpddr_read, .-lpddr_read
	.comm	FL_READY,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_lpddr_cmds.c_lpddr_read.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	lpddr_read, %function
lpddr_read:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r6, [r0]
	mov	r7, r2
	ldr	r2, [r6]
	mov	r5, r1
	ldm	r2, {r4, r8}
	asr	r4, r1, r4
	ldr	r0, [r8, r4, lsl #2]
	mov	r9, r3
	bl	spin_lock
	ldr	r3, .L7
	add	r10, r8, r4, lsl #2
	mov	r1, r10
	mov	r0, r6
	ldr	r2, [r3]
	bl	get_chip
	subs	fp, r0, #0
	bne	.L5
	ldr	r1, [sp, #40]
	mov	r2, r5
	mov	r3, r7
	mov	r0, r6
	bl	map_copy_from
	mov	r1, r10
	mov	r0, r6
	str	r7, [r9]
	bl	put_chip
.L5:
	ldr	r0, [r8, r4, lsl #2]
	bl	spin_unlock
	mov	r0, fp
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L8:
	.align	2
.L7:
	.word	FL_READY
	.size	lpddr_read, .-lpddr_read
	.comm	FL_READY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
