	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spi_nor_erase_sector
_spi_nor_erase_sector:                  ## @spi_nor_erase_sector
	.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, %r14
	callq	_spi_nor_convert_addr
	movl	%eax, %ebx
	movq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.10:
	movq	%r14, %rdi
	movl	%ebx, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
LBB0_1:
	cmpq	$0, 40(%r14)
	je	LBB0_2
## %bb.11:
	movl	32(%r14), %edi
	movl	$1, %esi
	callq	_SPI_MEM_OP_CMD
	movl	%eax, %r15d
	movl	8(%r14), %edi
	movl	%ebx, %esi
	movl	$1, %edx
	callq	_SPI_MEM_OP_ADDR
	movq	_SPI_MEM_OP_NO_DUMMY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_SPI_MEM_OP_NO_DATA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_SPI_MEM_OP
	movl	%eax, -32(%rbp)
	movq	40(%r14), %rdi
	leaq	-32(%rbp), %rsi
	callq	_spi_mem_exec_op
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	8(%r14), %ecx
	movq	16(%r14), %rdx
	testl	%ecx, %ecx
	jle	LBB0_9
## %bb.3:
	leaq	-1(%rcx), %r8
	movq	%rcx, %rsi
	andq	$3, %rsi
	je	LBB0_5
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	decq	%rcx
	movzbl	%bl, %edi
	movl	%ecx, %eax
	movl	%edi, (%rdx,%rax,4)
	sarl	$8, %ebx
	decq	%rsi
	jne	LBB0_4
LBB0_5:
	cmpq	$3, %r8
	jb	LBB0_8
## %bb.6:
	movl	$4294967294, %r8d               ## imm = 0xFFFFFFFE
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	leal	(%rcx,%r8), %esi
	incl	%esi
	movzbl	%bl, %edi
	movl	%edi, (%rdx,%rsi,4)
	leal	(%rcx,%r8), %esi
	movzbl	%bh, %edi
	movl	%edi, (%rdx,%rsi,4)
	movl	%ebx, %esi
	shrl	$16, %esi
	leaq	-3(%rcx), %rdi
	movzbl	%sil, %esi
	movl	%edi, %eax
	movl	%esi, (%rdx,%rax,4)
	addq	$-4, %rcx
	movl	%ebx, %eax
	shrl	$24, %eax
	movl	%ecx, %esi
	movl	%eax, (%rdx,%rsi,4)
	sarl	$31, %ebx
	cmpq	$1, %rdi
	ja	LBB0_7
LBB0_8:
	movl	8(%r14), %ecx
LBB0_9:
	movq	24(%r14), %rax
	movl	32(%r14), %esi
	movq	%r14, %rdi
                                        ## kill: def $ecx killed $ecx killed $rcx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SPI_MEM_OP_NO_DUMMY,4,2        ## @SPI_MEM_OP_NO_DUMMY
	.comm	_SPI_MEM_OP_NO_DATA,4,2         ## @SPI_MEM_OP_NO_DATA
	.no_dead_strip	_spi_nor_erase_sector
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spi_nor_erase_sector
_spi_nor_erase_sector:                  ; @spi_nor_erase_sector
	.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	x19, x0
	bl	_spi_nor_convert_addr
	mov	x20, x0
	ldr	x2, [x19]
	cbz	x2, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	x1, 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
	add	sp, sp, #64
	br	x2
LBB0_2:
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	w0, [x19, #32]
	mov	w1, #1
	bl	_SPI_MEM_OP_CMD
	mov	x21, x0
	ldr	w0, [x19, #8]
	mov	x1, x20
	mov	w2, #1
	bl	_SPI_MEM_OP_ADDR
	mov	x1, x0
Lloh0:
	adrp	x8, _SPI_MEM_OP_NO_DUMMY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SPI_MEM_OP_NO_DUMMY@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x8, _SPI_MEM_OP_NO_DATA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SPI_MEM_OP_NO_DATA@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	x0, x21
	bl	_SPI_MEM_OP
	str	w0, [sp, #8]
	ldr	x0, [x19, #40]
	add	x1, sp, #8
	bl	_spi_mem_exec_op
	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
LBB0_4:
	ldr	w3, [x19, #8]
	ldr	x2, [x19, #16]
	cmp	w3, #1
	b.lt	LBB0_8
; %bb.5:
	add	x8, x3, #1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	sub	w9, w8, #2
	and	w10, w20, #0xff
	str	w10, [x2, w9, uxtw #2]
	asr	w20, w20, #8
	sub	x8, x8, #1
	cmp	x8, #1
	b.hi	LBB0_6
; %bb.7:
	ldr	w3, [x19, #8]
LBB0_8:
	ldr	x4, [x19, #24]
	ldr	w1, [x19, #32]
	mov	x0, x19
                                        ; kill: def $w3 killed $w3 killed $x3
	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
	br	x4
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SPI_MEM_OP_NO_DUMMY,4,2        ; @SPI_MEM_OP_NO_DUMMY
	.comm	_SPI_MEM_OP_NO_DATA,4,2         ; @SPI_MEM_OP_NO_DATA
	.no_dead_strip	_spi_nor_erase_sector
.subsections_via_symbols
