	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stfsm_mx25_config
_stfsm_mx25_config:                     ## @stfsm_mx25_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	movl	(%rax), %r15d
	callq	_stfsm_prepare_rwe_seqs_default
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.1:
	movq	_FLASH_FLAG_32BIT_ADDR@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_6
## %bb.2:
	leaq	12(%rbx), %rdi
	callq	_stfsm_mx25_en_32bit_addr_seq
	movq	%rbx, %rdi
	callq	_stfsm_can_handle_soc_reset
	testl	%eax, %eax
	je	LBB0_3
LBB0_4:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_stfsm_enter_32bit_addr
	jmp	LBB0_6
LBB0_3:
	cmpl	$0, 8(%rbx)
	je	LBB0_4
## %bb.5:
	movq	_CFG_READ_TOGGLE_32BIT_ADDR@GOTPCREL(%rip), %rax
	movq	_CFG_WRITE_TOGGLE_32BIT_ADDR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_CFG_ERASESEC_TOGGLE_32BIT_ADDR@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, (%rbx)
LBB0_6:
	movq	_SPINOR_OP_RDSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$1, %ecx
	callq	_stfsm_read_status
	movl	4(%rbx), %ecx
	notl	%ecx
	movl	-28(%rbp), %eax
	movq	_MX25_STATUS_QE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	$196608, %ecx                   ## imm = 0x30000
	jne	LBB0_9
## %bb.7:
	testl	%eax, %edx
	jne	LBB0_12
## %bb.8:
	orl	%eax, %edx
	jmp	LBB0_11
LBB0_9:
	testl	%eax, %edx
	je	LBB0_12
## %bb.10:
	notl	%edx
	andl	%eax, %edx
LBB0_11:
	movl	%edx, -28(%rbp)
	movq	_SPINOR_OP_WRSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %ecx
	movl	$1, %r8d
	callq	_stfsm_write_status
LBB0_12:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FLASH_FLAG_32BIT_ADDR,4,2      ## @FLASH_FLAG_32BIT_ADDR
	.comm	_CFG_READ_TOGGLE_32BIT_ADDR,4,2 ## @CFG_READ_TOGGLE_32BIT_ADDR
	.comm	_CFG_WRITE_TOGGLE_32BIT_ADDR,4,2 ## @CFG_WRITE_TOGGLE_32BIT_ADDR
	.comm	_CFG_ERASESEC_TOGGLE_32BIT_ADDR,4,2 ## @CFG_ERASESEC_TOGGLE_32BIT_ADDR
	.comm	_SPINOR_OP_RDSR,4,2             ## @SPINOR_OP_RDSR
	.comm	_MX25_STATUS_QE,4,2             ## @MX25_STATUS_QE
	.comm	_SPINOR_OP_WRSR,4,2             ## @SPINOR_OP_WRSR
	.no_dead_strip	_stfsm_mx25_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stfsm_mx25_config
_stfsm_mx25_config:                     ; @stfsm_mx25_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x0
	ldr	x8, [x0, #16]
	ldr	w21, [x8]
	bl	_stfsm_prepare_rwe_seqs_default
	mov	x19, x0
	cbnz	w0, LBB0_12
; %bb.1:
Lloh0:
	adrp	x8, _FLASH_FLAG_32BIT_ADDR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FLASH_FLAG_32BIT_ADDR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_6
; %bb.2:
	add	x0, x20, #12
	bl	_stfsm_mx25_en_32bit_addr_seq
	mov	x0, x20
	bl	_stfsm_can_handle_soc_reset
	cbz	w0, LBB0_4
LBB0_3:
	mov	x0, x20
	mov	w1, #1
	bl	_stfsm_enter_32bit_addr
	b	LBB0_6
LBB0_4:
	ldr	w8, [x20, #8]
	cbz	w8, LBB0_3
; %bb.5:
Lloh3:
	adrp	x8, _CFG_READ_TOGGLE_32BIT_ADDR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CFG_READ_TOGGLE_32BIT_ADDR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _CFG_WRITE_TOGGLE_32BIT_ADDR@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CFG_WRITE_TOGGLE_32BIT_ADDR@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh9:
	adrp	x9, _CFG_ERASESEC_TOGGLE_32BIT_ADDR@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CFG_ERASESEC_TOGGLE_32BIT_ADDR@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x20]
LBB0_6:
Lloh12:
	adrp	x8, _SPINOR_OP_RDSR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SPINOR_OP_RDSR@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x20
	mov	w3, #1
	bl	_stfsm_read_status
	ldr	w8, [x20, #4]
	mvn	w11, w8
	ldr	w8, [sp, #12]
Lloh15:
	adrp	x9, _MX25_STATUS_QE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _MX25_STATUS_QE@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	and	w10, w9, w8
	tst	w11, #0x30000
	b.ne	LBB0_9
; %bb.7:
	cbnz	w10, LBB0_12
; %bb.8:
	orr	w2, w9, w8
	b	LBB0_11
LBB0_9:
	cbz	w10, LBB0_12
; %bb.10:
	bic	w2, w8, w9
LBB0_11:
	str	w2, [sp, #12]
Lloh18:
	adrp	x8, _SPINOR_OP_WRSR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SPINOR_OP_WRSR@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w3, #1
	mov	w4, #1
	bl	_stfsm_write_status
LBB0_12:
	mov	x0, x19
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_FLASH_FLAG_32BIT_ADDR,4,2      ; @FLASH_FLAG_32BIT_ADDR
	.comm	_CFG_READ_TOGGLE_32BIT_ADDR,4,2 ; @CFG_READ_TOGGLE_32BIT_ADDR
	.comm	_CFG_WRITE_TOGGLE_32BIT_ADDR,4,2 ; @CFG_WRITE_TOGGLE_32BIT_ADDR
	.comm	_CFG_ERASESEC_TOGGLE_32BIT_ADDR,4,2 ; @CFG_ERASESEC_TOGGLE_32BIT_ADDR
	.comm	_SPINOR_OP_RDSR,4,2             ; @SPINOR_OP_RDSR
	.comm	_MX25_STATUS_QE,4,2             ; @MX25_STATUS_QE
	.comm	_SPINOR_OP_WRSR,4,2             ; @SPINOR_OP_WRSR
	.no_dead_strip	_stfsm_mx25_config
.subsections_via_symbols
