	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stfsm_w25q_config
_stfsm_w25q_config:                     ## @stfsm_w25q_config
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_stfsm_prepare_rwe_seqs_default
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	movq	_SPINOR_OP_RDCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$1, %ecx
	callq	_stfsm_read_status
	movl	(%rbx), %edx
	notl	%edx
	movl	-20(%rbp), %ecx
	movq	_W25Q_STATUS_QE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	$196608, %edx                   ## imm = 0x30000
	jne	LBB0_4
## %bb.2:
	testl	%ecx, %eax
	jne	LBB0_7
## %bb.3:
	orl	%ecx, %eax
	jmp	LBB0_6
LBB0_4:
	testl	%ecx, %eax
	je	LBB0_7
## %bb.5:
	notl	%eax
	andl	%ecx, %eax
LBB0_6:
	movl	%eax, -20(%rbp)
	movq	_SPINOR_OP_RDSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-24(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$1, %ecx
	callq	_stfsm_read_status
	movl	-20(%rbp), %edx
	shll	$8, %edx
	orl	-24(%rbp), %edx
	movq	_SPINOR_OP_WRSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$2, %ecx
	movl	$1, %r8d
	callq	_stfsm_write_status
LBB0_7:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SPINOR_OP_RDCR,4,2             ## @SPINOR_OP_RDCR
	.comm	_W25Q_STATUS_QE,4,2             ## @W25Q_STATUS_QE
	.comm	_SPINOR_OP_RDSR,4,2             ## @SPINOR_OP_RDSR
	.comm	_SPINOR_OP_WRSR,4,2             ## @SPINOR_OP_WRSR
	.no_dead_strip	_stfsm_w25q_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stfsm_w25q_config
_stfsm_w25q_config:                     ; @stfsm_w25q_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	bl	_stfsm_prepare_rwe_seqs_default
	mov	x19, x0
	cbnz	w0, LBB0_7
; %bb.1:
Lloh0:
	adrp	x8, _SPINOR_OP_RDCR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SPINOR_OP_RDCR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x20
	mov	w3, #1
	bl	_stfsm_read_status
	ldr	w8, [x20]
	mvn	w11, w8
	ldr	w8, [sp, #8]
Lloh3:
	adrp	x9, _W25Q_STATUS_QE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _W25Q_STATUS_QE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w10, w9, w8
	tst	w11, #0x30000
	b.ne	LBB0_4
; %bb.2:
	cbnz	w10, LBB0_7
; %bb.3:
	orr	w8, w9, w8
	b	LBB0_6
LBB0_4:
	cbz	w10, LBB0_7
; %bb.5:
	bic	w8, w8, w9
LBB0_6:
	str	w8, [sp, #8]
Lloh6:
	adrp	x8, _SPINOR_OP_RDSR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SPINOR_OP_RDSR@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x20
	mov	w3, #1
	bl	_stfsm_read_status
	ldp	w8, w9, [sp, #8]
	orr	w2, w9, w8, lsl #8
Lloh9:
	adrp	x8, _SPINOR_OP_WRSR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SPINOR_OP_WRSR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w3, #2
	mov	w4, #1
	bl	_stfsm_write_status
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SPINOR_OP_RDCR,4,2             ; @SPINOR_OP_RDCR
	.comm	_W25Q_STATUS_QE,4,2             ; @W25Q_STATUS_QE
	.comm	_SPINOR_OP_RDSR,4,2             ; @SPINOR_OP_RDSR
	.comm	_SPINOR_OP_WRSR,4,2             ; @SPINOR_OP_WRSR
	.no_dead_strip	_stfsm_w25q_config
.subsections_via_symbols
