	.file	"extr_spi-nor.c_spi_nor_fsr_ready.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Erase operation failed.\n"
.LC1:
	.string	"Program operation failed.\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"Attempted to modify a protected sector.\n"
	.text
	.p2align 4
	.type	spi_nor_fsr_ready, @function
spi_nor_fsr_ready:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	read_fsr@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L1
	mov	eax, DWORD PTR FSR_E_ERR[rip]
	mov	edx, DWORD PTR FSR_P_ERR[rip]
	or	edx, eax
	test	edx, r12d
	jne	.L12
	and	r12d, DWORD PTR FSR_READY[rip]
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	edi, DWORD PTR 0[rbp]
	test	eax, r12d
	jne	.L13
	lea	rsi, .LC1[rip]
	call	dev_err@PLT
.L5:
	test	DWORD PTR FSR_PT_ERR[rip], r12d
	jne	.L14
.L6:
	mov	rdi, rbp
	call	spi_nor_clear_fsr@PLT
	mov	r12d, DWORD PTR EIO[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	lea	rsi, .LC0[rip]
	call	dev_err@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L14:
	mov	edi, DWORD PTR 0[rbp]
	lea	rsi, .LC2[rip]
	call	dev_err@PLT
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	spi_nor_fsr_ready, .-spi_nor_fsr_ready
	.comm	FSR_READY,4,4
	.comm	FSR_P_ERR,4,4
	.comm	FSR_PT_ERR,4,4
	.comm	FSR_E_ERR,4,4
	.comm	EIO,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_spi-nor.c_spi_nor_fsr_ready.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Erase operation failed.\012\000"
	.align	2
.LC1:
	.ascii	"Program operation failed.\012\000"
	.align	2
.LC2:
	.ascii	"Attempted to modify a protected sector.\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	spi_nor_fsr_ready, %function
spi_nor_fsr_ready:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r5, r0
	bl	read_fsr
	subs	r4, r0, #0
	blt	.L1
	ldr	r2, .L14
	ldr	r3, .L14+4
	ldr	r2, [r2]
	ldr	r3, [r3]
	orr	r3, r2, r3
	tst	r3, r4
	bne	.L12
	ldr	r3, .L14+8
	ldr	r3, [r3]
	and	r4, r4, r3
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L12:
	tst	r2, r4
	ldrne	r1, .L14+12
	ldreq	r1, .L14+16
	ldr	r0, [r5]
	bl	dev_err
	ldr	r3, .L14+20
	ldr	r3, [r3]
	tst	r4, r3
	bne	.L13
.L6:
	mov	r0, r5
	bl	spi_nor_clear_fsr
	ldr	r3, .L14+24
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L13:
	ldr	r1, .L14+28
	ldr	r0, [r5]
	bl	dev_err
	b	.L6
.L15:
	.align	2
.L14:
	.word	FSR_E_ERR
	.word	FSR_P_ERR
	.word	FSR_READY
	.word	.LC0
	.word	.LC1
	.word	FSR_PT_ERR
	.word	EIO
	.word	.LC2
	.size	spi_nor_fsr_ready, .-spi_nor_fsr_ready
	.comm	FSR_READY,4,4
	.comm	FSR_P_ERR,4,4
	.comm	FSR_PT_ERR,4,4
	.comm	FSR_E_ERR,4,4
	.comm	EIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
