	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm47xxsflash_erase
_bcm47xxsflash_erase:                   ## @bcm47xxsflash_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	(%rdi), %rbx
	movl	(%rbx), %eax
	cmpl	$129, %eax
	je	LBB0_5
## %bb.1:
	cmpl	$128, %eax
	jne	LBB0_7
## %bb.2:
	movq	_OPCODE_ST_WREN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_bcm47xxsflash_cmd
	movq	_BCMA_CC_FLASHADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	movq	%rbx, %rdi
	callq	*8(%rbx)
	cmpl	$65536, 4(%rbx)                 ## imm = 0x10000
	jge	LBB0_3
## %bb.4:
	movq	_OPCODE_ST_SSE@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movq	_BCMA_CC_FLASHADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	addl	%edx, %edx
	movq	%rbx, %rdi
	callq	*8(%rbx)
	movq	_OPCODE_AT_PAGE_ERASE@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_3:
	movq	_OPCODE_ST_SE@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_bcm47xxsflash_cmd
LBB0_7:
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_bcm47xxsflash_poll             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_OPCODE_ST_WREN,4,2             ## @OPCODE_ST_WREN
	.comm	_BCMA_CC_FLASHADDR,4,2          ## @BCMA_CC_FLASHADDR
	.comm	_OPCODE_ST_SSE,4,2              ## @OPCODE_ST_SSE
	.comm	_OPCODE_ST_SE,4,2               ## @OPCODE_ST_SE
	.comm	_OPCODE_AT_PAGE_ERASE,4,2       ## @OPCODE_AT_PAGE_ERASE
	.comm	_HZ,4,2                         ## @HZ
	.no_dead_strip	_bcm47xxsflash_erase
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm47xxsflash_erase
_bcm47xxsflash_erase:                   ; @bcm47xxsflash_erase
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	ldr	x19, [x0]
	ldr	w8, [x19]
	cmp	w8, #129
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, #128
	b.ne	LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, _OPCODE_ST_WREN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OPCODE_ST_WREN@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_bcm47xxsflash_cmd
	ldr	x8, [x19, #8]
Lloh3:
	adrp	x9, _BCMA_CC_FLASHADDR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BCMA_CC_FLASHADDR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x9]
	ldr	w2, [x20]
	mov	x0, x19
	blr	x8
	ldr	w8, [x19, #4]
Lloh6:
	adrp	x9, _OPCODE_ST_SE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _OPCODE_ST_SE@GOTPAGEOFF]
Lloh8:
	adrp	x10, _OPCODE_ST_SSE@GOTPAGE
Lloh9:
	ldr	x10, [x10, _OPCODE_ST_SSE@GOTPAGEOFF]
	cmp	w8, #16, lsl #12                ; =65536
	csel	x8, x10, x9, lt
	b	LBB0_4
LBB0_3:
	ldr	x8, [x19, #8]
Lloh10:
	adrp	x9, _BCMA_CC_FLASHADDR@GOTPAGE
Lloh11:
	ldr	x9, [x9, _BCMA_CC_FLASHADDR@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x9]
	ldr	w9, [x20]
	lsl	w2, w9, #1
	mov	x0, x19
	blr	x8
Lloh13:
	adrp	x8, _OPCODE_AT_PAGE_ERASE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _OPCODE_AT_PAGE_ERASE@GOTPAGEOFF]
LBB0_4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_bcm47xxsflash_cmd
LBB0_5:
Lloh15:
	adrp	x8, _HZ@GOTPAGE
Lloh16:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_bcm47xxsflash_poll
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_OPCODE_ST_WREN,4,2             ; @OPCODE_ST_WREN
	.comm	_BCMA_CC_FLASHADDR,4,2          ; @BCMA_CC_FLASHADDR
	.comm	_OPCODE_ST_SSE,4,2              ; @OPCODE_ST_SSE
	.comm	_OPCODE_ST_SE,4,2               ; @OPCODE_ST_SE
	.comm	_OPCODE_AT_PAGE_ERASE,4,2       ; @OPCODE_AT_PAGE_ERASE
	.comm	_HZ,4,2                         ; @HZ
	.no_dead_strip	_bcm47xxsflash_erase
.subsections_via_symbols
