	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spi_nor_set_4byte_opcodes
_spi_nor_set_4byte_opcodes:             ## @spi_nor_set_4byte_opcodes
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	20(%rdi), %edi
	callq	_spi_nor_convert_3to4_read
	movl	%eax, 20(%r15)
	movl	16(%r15), %edi
	callq	_spi_nor_convert_3to4_program
	movl	%eax, 16(%r15)
	movq	8(%r15), %rdi
	callq	_spi_nor_convert_3to4_erase
	movq	%rax, 8(%r15)
	movq	%r15, %rdi
	callq	_spi_nor_has_uniform_erase
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movq	_SNOR_ERASE_TYPE_MAX@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_4
## %bb.2:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %r12
	movq	(%r12,%rbx,8), %rdi
	callq	_spi_nor_convert_3to4_erase
	movq	%rax, (%r12,%rbx,8)
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_3
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SNOR_ERASE_TYPE_MAX,4,2        ## @SNOR_ERASE_TYPE_MAX
	.no_dead_strip	_spi_nor_set_4byte_opcodes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spi_nor_set_4byte_opcodes
_spi_nor_set_4byte_opcodes:             ; @spi_nor_set_4byte_opcodes
	.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
	ldr	w0, [x0, #20]
	bl	_spi_nor_convert_3to4_read
	str	w0, [x19, #20]
	ldr	w0, [x19, #16]
	bl	_spi_nor_convert_3to4_program
	str	w0, [x19, #16]
	ldr	x0, [x19, #8]
	bl	_spi_nor_convert_3to4_erase
	str	x0, [x19, #8]
	mov	x0, x19
	bl	_spi_nor_has_uniform_erase
	cbnz	w0, LBB0_4
; %bb.1:
Lloh0:
	adrp	x20, _SNOR_ERASE_TYPE_MAX@GOTPAGE
Lloh1:
	ldr	x20, [x20, _SNOR_ERASE_TYPE_MAX@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x21, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x22, [x19]
	lsl	x23, x21, #3
	ldr	x0, [x22, x23]
	bl	_spi_nor_convert_3to4_erase
	str	x0, [x22, x23]
	add	x21, x21, #1
	ldrsw	x8, [x20]
	cmp	x21, x8
	b.lt	LBB0_3
LBB0_4:
	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 AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_SNOR_ERASE_TYPE_MAX,4,2        ; @SNOR_ERASE_TYPE_MAX
	.no_dead_strip	_spi_nor_set_4byte_opcodes
.subsections_via_symbols
