	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spi_nor_fsr_ready
_spi_nor_fsr_ready:                     ## @spi_nor_fsr_ready
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_read_fsr
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_6
## %bb.1:
	movq	_FSR_E_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_FSR_P_ERR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%eax, %ecx
	testl	%ebx, %ecx
	je	LBB0_5
## %bb.2:
	testl	%ebx, %eax
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str(%rip), %rsi
	cmoveq	%rax, %rsi
	callq	_dev_err
	movq	_FSR_PT_ERR@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_4
## %bb.3:
	movl	(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
LBB0_4:
	movq	%r14, %rdi
	callq	_spi_nor_clear_fsr
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_5:
	movq	_FSR_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%eax, %ebx
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FSR_E_ERR,4,2                  ## @FSR_E_ERR
	.comm	_FSR_P_ERR,4,2                  ## @FSR_P_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Erase operation failed.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Program operation failed.\n"

	.comm	_FSR_PT_ERR,4,2                 ## @FSR_PT_ERR
L_.str.2:                               ## @.str.2
	.asciz	"Attempted to modify a protected sector.\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_FSR_READY,4,2                  ## @FSR_READY
	.no_dead_strip	_spi_nor_fsr_ready
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spi_nor_fsr_ready
_spi_nor_fsr_ready:                     ; @spi_nor_fsr_ready
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_read_fsr
	mov	x20, x0
	tbnz	w0, #31, LBB0_6
; %bb.1:
Lloh0:
	adrp	x8, _FSR_E_ERR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FSR_E_ERR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _FSR_P_ERR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _FSR_P_ERR@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w9, w9, w8
	tst	w9, w20
	b.eq	LBB0_5
; %bb.2:
	ldr	w0, [x19]
Lloh6:
	adrp	x9, l_.str@PAGE
Lloh7:
	add	x9, x9, l_.str@PAGEOFF
Lloh8:
	adrp	x10, l_.str.1@PAGE
Lloh9:
	add	x10, x10, l_.str.1@PAGEOFF
	tst	w8, w20
	csel	x1, x10, x9, eq
	bl	_dev_err
Lloh10:
	adrp	x8, _FSR_PT_ERR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _FSR_PT_ERR@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_4
; %bb.3:
	ldr	w0, [x19]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
LBB0_4:
	mov	x0, x19
	bl	_spi_nor_clear_fsr
Lloh15:
	adrp	x8, _EIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_6
LBB0_5:
Lloh18:
	adrp	x8, _FSR_READY@GOTPAGE
Lloh19:
	ldr	x8, [x8, _FSR_READY@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	and	w20, w8, w20
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_FSR_E_ERR,4,2                  ; @FSR_E_ERR
	.comm	_FSR_P_ERR,4,2                  ; @FSR_P_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Erase operation failed.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Program operation failed.\n"

	.comm	_FSR_PT_ERR,4,2                 ; @FSR_PT_ERR
l_.str.2:                               ; @.str.2
	.asciz	"Attempted to modify a protected sector.\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_FSR_READY,4,2                  ; @FSR_READY
	.no_dead_strip	_spi_nor_fsr_ready
.subsections_via_symbols
