	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spi_nor_clear_sr_bp
_spi_nor_clear_sr_bp:                   ## @spi_nor_clear_sr_bp
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_SR_BP2@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_SR_BP1@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_SR_BP0@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	callq	_read_sr
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	orl	%r12d, %ebx
	orl	%r13d, %ebx
	movq	%r14, %rdi
	callq	_write_enable
	notl	%ebx
	andl	%ebx, %r15d
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_write_sr
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_6
LBB0_4:
	movq	%r14, %rdi
	callq	_spi_nor_wait_till_ready
	testl	%eax, %eax
	je	LBB0_8
## %bb.5:
	movl	%eax, %r15d
	leaq	L_.str.2(%rip), %rsi
LBB0_6:
	movl	(%r14), %edi
	callq	_dev_err
LBB0_7:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	xorl	%r15d, %r15d
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_SR_BP2,4,2                     ## @SR_BP2
	.comm	_SR_BP1,4,2                     ## @SR_BP1
	.comm	_SR_BP0,4,2                     ## @SR_BP0
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error while reading status register\n"

L_.str.1:                               ## @.str.1
	.asciz	"write to status register failed\n"

L_.str.2:                               ## @.str.2
	.asciz	"timeout while writing status register\n"

	.no_dead_strip	_spi_nor_clear_sr_bp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spi_nor_clear_sr_bp
_spi_nor_clear_sr_bp:                   ; @spi_nor_clear_sr_bp
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
Lloh0:
	adrp	x8, _SR_BP2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SR_BP2@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
Lloh3:
	adrp	x8, _SR_BP1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SR_BP1@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
Lloh6:
	adrp	x8, _SR_BP0@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SR_BP0@GOTPAGEOFF]
Lloh8:
	ldr	w23, [x8]
	bl	_read_sr
	mov	x20, x0
	tbnz	w0, #31, LBB0_3
; %bb.1:
	orr	w8, w22, w21
	orr	w21, w8, w23
	mov	x0, x19
	bl	_write_enable
	bic	w1, w20, w21
	mov	x0, x19
	bl	_write_sr
	cbz	w0, LBB0_4
; %bb.2:
	mov	x20, x0
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_3:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_4:
	mov	x0, x19
	bl	_spi_nor_wait_till_ready
	mov	x20, x0
	cbz	w0, LBB0_7
; %bb.5:
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_6:
	ldr	w0, [x19]
	bl	_dev_err
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_SR_BP2,4,2                     ; @SR_BP2
	.comm	_SR_BP1,4,2                     ; @SR_BP1
	.comm	_SR_BP0,4,2                     ; @SR_BP0
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error while reading status register\n"

l_.str.1:                               ; @.str.1
	.asciz	"write to status register failed\n"

l_.str.2:                               ; @.str.2
	.asciz	"timeout while writing status register\n"

	.no_dead_strip	_spi_nor_clear_sr_bp
.subsections_via_symbols
