	.file	"extr_cafe_nand.c_cafe_read_buf.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Copy 0x%x bytes from position 0x%x in read buffer.\n"
	.text
	.p2align 4
	.type	cafe_read_buf, @function
cafe_read_buf:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movsx	rbp, edx
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	nand_get_controller_data@PLT
	cmp	QWORD PTR 32[rax], 0
	mov	rbx, rax
	je	.L2
	mov	rsi, QWORD PTR [rax]
	mov	edx, ebp
	add	rsi, QWORD PTR 24[rax]
	mov	rdi, r12
	call	memcpy@PLT
.L3:
	mov	rdi, QWORD PTR 8[rbx]
	mov	rcx, QWORD PTR [rbx]
	mov	edx, ebp
	lea	rsi, .LC0[rip]
	call	cafe_dev_dbg@PLT
	add	QWORD PTR [rbx], rbp
	pop	rbx
	.cfi_remember_state
	.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
.L2:
	.cfi_restore_state
	mov	rsi, QWORD PTR CAFE_NAND_READ_DATA[rip]
	mov	edx, ebp
	add	rsi, QWORD PTR 16[rax]
	mov	rdi, r12
	add	rsi, QWORD PTR [rax]
	call	memcpy_fromio@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	cafe_read_buf, .-cafe_read_buf
	.comm	CAFE_NAND_READ_DATA,8,8
	.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_cafe_nand.c_cafe_read_buf.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Copy 0x%x bytes from position 0x%x in read buffer.\012"
	.ascii	"\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cafe_read_buf, %function
cafe_read_buf:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r6, r1
	mov	r5, r2
	bl	nand_get_controller_data
	ldr	r3, [r0, #16]
	mov	r4, r0
	cmp	r3, #0
	beq	.L2
	ldr	r1, [r0, #12]
	ldr	r3, [r0]
	mov	r2, r5
	mov	r0, r6
	add	r1, r1, r3
	bl	memcpy
.L3:
	mov	r2, r5
	ldr	r3, [r4]
	ldr	r1, .L6
	ldr	r0, [r4, #4]
	bl	cafe_dev_dbg
	ldr	r2, [r4]
	add	r2, r2, r5
	str	r2, [r4]
	pop	{r4, r5, r6, pc}
.L2:
	ldr	r2, .L6+4
	ldr	r3, [r0, #8]
	ldr	r2, [r2]
	ldr	r1, [r0]
	add	r3, r3, r2
	mov	r0, r6
	mov	r2, r5
	add	r1, r3, r1
	bl	memcpy_fromio
	b	.L3
.L7:
	.align	2
.L6:
	.word	.LC0
	.word	CAFE_NAND_READ_DATA
	.size	cafe_read_buf, .-cafe_read_buf
	.comm	CAFE_NAND_READ_DATA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
