	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sst25l_write_enable
_sst25l_write_enable:                   ## @sst25l_write_enable
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	testl	%esi, %esi
	jne	LBB0_1
## %bb.2:
	movq	_SST25L_CMD_WRDI@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_SST25L_CMD_WREN@GOTPCREL(%rip), %rax
LBB0_3:
	movb	(%rax), %al
	movb	%al, -18(%rbp)
	movl	(%rbx), %edi
	leaq	-18(%rbp), %rsi
	movl	$1, %edx
	callq	_spi_write
	testl	%eax, %eax
	jne	LBB0_10
## %bb.4:
	movq	_SST25L_CMD_EWSR@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movb	%al, -18(%rbp)
	movl	(%rbx), %edi
	leaq	-18(%rbp), %rsi
	movl	$1, %edx
	callq	_spi_write
	testl	%eax, %eax
	je	LBB0_5
LBB0_10:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	movq	_SST25L_STATUS_BP0@GOTPCREL(%rip), %rax
	movq	_SST25L_STATUS_BP1@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	orb	(%rax), %cl
	xorl	%eax, %eax
	testl	%r14d, %r14d
	movq	_SST25L_CMD_WRSR@GOTPCREL(%rip), %rdx
	movb	(%rdx), %dl
	movb	%dl, -18(%rbp)
	movzbl	%cl, %ecx
	cmovnel	%eax, %ecx
	movb	%cl, -17(%rbp)
	movl	(%rbx), %edi
	leaq	-18(%rbp), %rsi
	movl	$2, %edx
	callq	_spi_write
	testl	%r14d, %r14d
	je	LBB0_10
## %bb.6:
	testl	%eax, %eax
	jne	LBB0_10
## %bb.7:
	leaq	-24(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_sst25l_status
	testl	%eax, %eax
	jne	LBB0_10
## %bb.8:
	movq	_SST25L_STATUS_WREN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%eax, %eax
	testl	%ecx, -24(%rbp)
	jne	LBB0_10
## %bb.9:
	movq	_EROFS@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_SST25L_CMD_WREN,1,0            ## @SST25L_CMD_WREN
	.comm	_SST25L_CMD_WRDI,1,0            ## @SST25L_CMD_WRDI
	.comm	_SST25L_CMD_EWSR,1,0            ## @SST25L_CMD_EWSR
	.comm	_SST25L_CMD_WRSR,1,0            ## @SST25L_CMD_WRSR
	.comm	_SST25L_STATUS_BP0,1,0          ## @SST25L_STATUS_BP0
	.comm	_SST25L_STATUS_BP1,1,0          ## @SST25L_STATUS_BP1
	.comm	_SST25L_STATUS_WREN,4,2         ## @SST25L_STATUS_WREN
	.comm	_EROFS,4,2                      ## @EROFS
	.no_dead_strip	_sst25l_write_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sst25l_write_enable
_sst25l_write_enable:                   ; @sst25l_write_enable
	.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, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _SST25L_CMD_WREN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SST25L_CMD_WREN@GOTPAGEOFF]
Lloh2:
	adrp	x9, _SST25L_CMD_WRDI@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SST25L_CMD_WRDI@GOTPAGEOFF]
	cmp	w1, #0
	csel	x8, x9, x8, eq
	ldrb	w8, [x8]
	strb	w8, [sp, #14]
	ldr	w0, [x0]
	add	x1, sp, #14
	mov	w2, #1
	bl	_spi_write
	cbnz	w0, LBB0_2
; %bb.1:
Lloh4:
	adrp	x8, _SST25L_CMD_EWSR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SST25L_CMD_EWSR@GOTPAGEOFF]
	ldrb	w8, [x8]
	strb	w8, [sp, #14]
	ldr	w0, [x19]
	add	x1, sp, #14
	mov	w2, #1
	bl	_spi_write
	cbz	w0, LBB0_3
LBB0_2:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_3:
Lloh6:
	adrp	x8, _SST25L_CMD_WRSR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SST25L_CMD_WRSR@GOTPAGEOFF]
	ldrb	w8, [x8]
	strb	w8, [sp, #14]
Lloh8:
	adrp	x8, _SST25L_STATUS_BP0@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SST25L_STATUS_BP0@GOTPAGEOFF]
	ldrb	w8, [x8]
Lloh10:
	adrp	x9, _SST25L_STATUS_BP1@GOTPAGE
Lloh11:
	ldr	x9, [x9, _SST25L_STATUS_BP1@GOTPAGEOFF]
	ldrb	w9, [x9]
	orr	w8, w9, w8
	cmp	w20, #0
	csel	w8, w8, wzr, eq
	strb	w8, [sp, #15]
	ldr	w0, [x19]
	add	x1, sp, #14
	mov	w2, #2
	bl	_spi_write
	cbz	w20, LBB0_2
; %bb.4:
	cbnz	w0, LBB0_2
; %bb.5:
	add	x1, sp, #8
	mov	x0, x19
	bl	_sst25l_status
	cbnz	w0, LBB0_2
; %bb.6:
	ldr	w8, [sp, #8]
Lloh12:
	adrp	x9, _SST25L_STATUS_WREN@GOTPAGE
Lloh13:
	ldr	x9, [x9, _SST25L_STATUS_WREN@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:
	mov	w0, #0
	b	LBB0_2
LBB0_8:
Lloh15:
	adrp	x8, _EROFS@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EROFS@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_2
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_SST25L_CMD_WREN,1,0            ; @SST25L_CMD_WREN
	.comm	_SST25L_CMD_WRDI,1,0            ; @SST25L_CMD_WRDI
	.comm	_SST25L_CMD_EWSR,1,0            ; @SST25L_CMD_EWSR
	.comm	_SST25L_CMD_WRSR,1,0            ; @SST25L_CMD_WRSR
	.comm	_SST25L_STATUS_BP0,1,0          ; @SST25L_STATUS_BP0
	.comm	_SST25L_STATUS_BP1,1,0          ; @SST25L_STATUS_BP1
	.comm	_SST25L_STATUS_WREN,4,2         ; @SST25L_STATUS_WREN
	.comm	_EROFS,4,2                      ; @EROFS
	.no_dead_strip	_sst25l_write_enable
.subsections_via_symbols
