	.file	"extr_cafe_nand.c_cafe_device_ready.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	" not"
.LC1:
	.string	""
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"NAND device is%s ready, IRQ %x (%x) (%x,%x)\n"
	.text
	.p2align 4
	.type	cafe_device_ready, @function
cafe_device_ready:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	nand_get_controller_data@PLT
	mov	esi, DWORD PTR NAND_STATUS[rip]
	mov	rdi, rax
	mov	rbx, rax
	call	cafe_readl@PLT
	mov	esi, DWORD PTR NAND_IRQ[rip]
	mov	rdi, rbx
	and	eax, 1073741824
	setne	r14b
	mov	ebp, eax
	call	cafe_readl@PLT
	mov	edx, DWORD PTR NAND_IRQ[rip]
	mov	rdi, rbx
	movzx	r14d, r14b
	mov	esi, eax
	mov	r12d, eax
	call	cafe_writel@PLT
	mov	esi, DWORD PTR GLOBAL_IRQ_MASK[rip]
	mov	rdi, rbx
	call	cafe_readl@PLT
	mov	esi, DWORD PTR GLOBAL_IRQ[rip]
	mov	rdi, rbx
	mov	r15d, eax
	call	cafe_readl@PLT
	mov	esi, DWORD PTR NAND_IRQ[rip]
	mov	rdi, rbx
	mov	r13d, eax
	call	cafe_readl@PLT
	test	ebp, ebp
	mov	rdi, QWORD PTR [rbx]
	mov	r9d, r13d
	mov	r8d, eax
	lea	rdx, .LC0[rip]
	lea	rax, .LC1[rip]
	mov	ecx, r12d
	cmovne	rdx, rax
	sub	rsp, 8
	.cfi_def_cfa_offset 72
	lea	rsi, .LC2[rip]
	push	r15
	.cfi_def_cfa_offset 80
	call	cafe_dev_dbg@PLT
	add	rsp, 24
	.cfi_def_cfa_offset 56
	mov	eax, r14d
	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	cafe_device_ready, .-cafe_device_ready
	.comm	NAND_STATUS,4,4
	.comm	NAND_IRQ,4,4
	.comm	GLOBAL_IRQ_MASK,4,4
	.comm	GLOBAL_IRQ,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_cafe_nand.c_cafe_device_ready.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	" not\000"
	.align	2
.LC1:
	.ascii	"\000"
	.align	2
.LC2:
	.ascii	"NAND device is%s ready, IRQ %x (%x) (%x,%x)\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cafe_device_ready, %function
cafe_device_ready:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	sub	sp, sp, #20
	bl	nand_get_controller_data
	ldr	r3, .L6
	mov	r4, r0
	ldr	r1, [r3]
	bl	cafe_readl
	ldr	r7, .L6+4
	ands	r6, r0, #1073741824
	ldr	r1, [r7]
	mov	r0, r4
	movne	r8, #1
	moveq	r8, #0
	bl	cafe_readl
	mov	r5, r0
	ldr	r2, [r7]
	mov	r1, r5
	mov	r0, r4
	bl	cafe_writel
	ldr	r2, .L6+8
	ldr	r3, .L6+12
	cmp	r6, #0
	ldr	r1, [r7]
	mov	r0, r4
	moveq	r6, r3
	movne	r6, r2
	ldr	r9, [r4]
	bl	cafe_readl
	ldr	r3, .L6+16
	mov	r7, r0
	ldr	r1, [r3]
	mov	r0, r4
	bl	cafe_readl
	mov	r3, r0
	ldr	r2, .L6+20
	mov	r0, r4
	ldr	r1, [r2]
	mov	r4, r3
	bl	cafe_readl
	mov	r1, r0
	mov	r2, r6
	str	r1, [sp, #8]
	mov	r3, r5
	mov	r0, r9
	ldr	r1, .L6+24
	str	r7, [sp]
	str	r4, [sp, #4]
	bl	cafe_dev_dbg
	mov	r0, r8
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L7:
	.align	2
.L6:
	.word	NAND_STATUS
	.word	NAND_IRQ
	.word	.LC1
	.word	.LC0
	.word	GLOBAL_IRQ
	.word	GLOBAL_IRQ_MASK
	.word	.LC2
	.size	cafe_device_ready, .-cafe_device_ready
	.comm	NAND_STATUS,4,4
	.comm	NAND_IRQ,4,4
	.comm	GLOBAL_IRQ_MASK,4,4
	.comm	GLOBAL_IRQ,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
