	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spi_nor_select_uniform_erase
_spi_nor_select_uniform_erase:          ## @spi_nor_select_uniform_erase
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_SNOR_ERASE_TYPE_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	jle	LBB0_12
## %bb.1:
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	(%rdi), %r13d
	xorl	%r12d, %r12d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rax
	incq	%rax
	cmpq	$1, %rax
	jbe	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	decq	%rbx
	movl	%ebx, %edi
	callq	_BIT
	testl	%r13d, %eax
	je	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r14), %rax
	movl	%ebx, %edx
	leaq	(%rax,%rdx,8), %rcx
	movq	(%rax,%rdx,8), %rdx
	cmpq	%r15, %rdx
	je	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	testq	%r12, %r12
	jne	LBB0_2
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	testq	%rdx, %rdx
	cmoveq	%rdx, %rcx
	movq	%rcx, %r12
	jmp	LBB0_2
LBB0_7:
	testq	%r12, %r12
	je	LBB0_12
## %bb.8:
	movq	8(%r14), %rax
	jmp	LBB0_11
LBB0_12:
	xorl	%r12d, %r12d
	jmp	LBB0_13
LBB0_10:
	movq	%rcx, %r12
LBB0_11:
	movq	_SNOR_ERASE_TYPE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, (%r14)
	movq	%r12, %rdi
	subq	%rax, %rdi
	shrq	$3, %rdi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_BIT
	orl	%eax, (%r14)
LBB0_13:
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SNOR_ERASE_TYPE_MAX,4,2        ## @SNOR_ERASE_TYPE_MAX
	.comm	_SNOR_ERASE_TYPE_MASK,4,2       ## @SNOR_ERASE_TYPE_MASK
	.no_dead_strip	_spi_nor_select_uniform_erase
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spi_nor_select_uniform_erase
_spi_nor_select_uniform_erase:          ; @spi_nor_select_uniform_erase
	.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
Lloh0:
	adrp	x8, _SNOR_ERASE_TYPE_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SNOR_ERASE_TYPE_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	cmp	w22, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x21, x1
	mov	x19, x0
	mov	x20, #0
	ldr	w23, [x0]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x22, #1
	cmp	x8, #1
	b.ls	LBB0_8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	sub	x22, x22, #1
	mov	x0, x22
	bl	_BIT
	tst	w0, w23
	b.eq	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #8]
	add	x9, x8, w22, uxtw #3
	ldr	x10, [x9]
	cmp	x10, x21
	b.eq	LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	cbnz	x20, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	x10, #0
	csel	x20, xzr, x9, eq
	b	LBB0_2
LBB0_7:
	mov	x20, #0
	b	LBB0_12
LBB0_8:
	cbz	x20, LBB0_12
; %bb.9:
	ldr	x8, [x19, #8]
	b	LBB0_11
LBB0_10:
	mov	x20, x9
LBB0_11:
Lloh3:
	adrp	x9, _SNOR_ERASE_TYPE_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SNOR_ERASE_TYPE_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	ldr	w10, [x19]
	bic	w9, w10, w9
	str	w9, [x19]
	sub	x8, x20, x8
	lsr	x0, x8, #3
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_BIT
	ldr	w8, [x19]
	orr	w8, w8, w0
	str	w8, [x19]
LBB0_12:
	mov	x0, 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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_SNOR_ERASE_TYPE_MAX,4,2        ; @SNOR_ERASE_TYPE_MAX
	.comm	_SNOR_ERASE_TYPE_MASK,4,2       ; @SNOR_ERASE_TYPE_MASK
	.no_dead_strip	_spi_nor_select_uniform_erase
.subsections_via_symbols
