	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spi_nor_sr_ready
_spi_nor_sr_ready:                      ## @spi_nor_sr_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	callq	_read_sr
	testl	%eax, %eax
	js	LBB0_5
## %bb.1:
	movq	_SNOR_F_USE_CLSR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rbx)
	je	LBB0_4
## %bb.2:
	movq	_SR_E_ERR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_SR_P_ERR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	%ecx, %edx
	testl	%eax, %edx
	je	LBB0_4
## %bb.3:
	testl	%eax, %ecx
	movl	4(%rbx), %edi
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str(%rip), %rsi
	cmoveq	%rax, %rsi
	callq	_dev_err
	movq	%rbx, %rdi
	callq	_spi_nor_clear_sr
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_5
LBB0_4:
	movq	_SR_WIP@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	testl	%eax, (%rcx)
	sete	%dl
	movl	%edx, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SNOR_F_USE_CLSR,4,2            ## @SNOR_F_USE_CLSR
	.comm	_SR_E_ERR,4,2                   ## @SR_E_ERR
	.comm	_SR_P_ERR,4,2                   ## @SR_P_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Erase Error occurred\n"

L_.str.1:                               ## @.str.1
	.asciz	"Programming Error occurred\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_SR_WIP,4,2                     ## @SR_WIP
	.no_dead_strip	_spi_nor_sr_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_sr_ready
_spi_nor_sr_ready:                      ; @spi_nor_sr_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_sr
	tbnz	w0, #31, LBB0_5
; %bb.1:
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _SNOR_F_USE_CLSR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SNOR_F_USE_CLSR@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
Lloh3:
	adrp	x8, _SR_E_ERR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SR_E_ERR@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x8]
Lloh6:
	adrp	x8, _SR_P_ERR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SR_P_ERR@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	orr	w8, w8, w9
	tst	w8, w0
	b.eq	LBB0_4
; %bb.3:
	ldr	w8, [x19, #4]
Lloh9:
	adrp	x10, l_.str@PAGE
Lloh10:
	add	x10, x10, l_.str@PAGEOFF
Lloh11:
	adrp	x11, l_.str.1@PAGE
Lloh12:
	add	x11, x11, l_.str.1@PAGEOFF
	tst	w9, w0
	csel	x1, x11, x10, eq
	mov	x0, x8
	bl	_dev_err
	mov	x0, x19
	bl	_spi_nor_clear_sr
Lloh13:
	adrp	x8, _EIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_4:
Lloh16:
	adrp	x8, _SR_WIP@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SR_WIP@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	tst	w8, w0
	cset	w0, eq
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_SNOR_F_USE_CLSR,4,2            ; @SNOR_F_USE_CLSR
	.comm	_SR_E_ERR,4,2                   ; @SR_E_ERR
	.comm	_SR_P_ERR,4,2                   ; @SR_P_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Erase Error occurred\n"

l_.str.1:                               ; @.str.1
	.asciz	"Programming Error occurred\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_SR_WIP,4,2                     ; @SR_WIP
	.no_dead_strip	_spi_nor_sr_ready
.subsections_via_symbols
