	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmstb_nand_verify_erased_page
_brcmstb_nand_verify_erased_page:       ## @brcmstb_nand_verify_erased_page
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r13d
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	32(%rsi), %rbx
	movb	(%rsi), %cl
	sarl	%cl, %r13d
	testq	%rdx, %rdx
	jne	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_nand_get_data_buf
	movq	%rax, %r15
LBB0_2:
	movl	(%r12), %eax
	cltd
	idivl	8(%r14)
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	movl	%r13d, %ecx
	callq	*16(%r14)
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_3
LBB0_9:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	cmpl	$0, 8(%r14)
	jle	LBB0_4
## %bb.5:
	movslq	-44(%rbp), %rax                 ## 4-byte Folded Reload
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	24(%r14), %esi
	movl	28(%r14), %eax
	movl	%esi, %ecx
	imull	%r12d, %ecx
	movslq	%ecx, %rdi
	addq	%r15, %rdi
	movl	%eax, (%rsp)
	movq	%rbx, %rdx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_nand_check_erased_ecc_chunk
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	%r13d, %edi
	movl	%eax, %esi
	callq	_max
	movl	%eax, %r13d
	incl	%r12d
	addq	-56(%rbp), %rbx                 ## 8-byte Folded Reload
	cmpl	8(%r14), %r12d
	jl	LBB0_6
	jmp	LBB0_9
LBB0_4:
	xorl	%r13d, %r13d
	jmp	LBB0_9
LBB0_7:
	movl	%eax, %r13d
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_brcmstb_nand_verify_erased_page
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmstb_nand_verify_erased_page
_brcmstb_nand_verify_erased_page:       ; @brcmstb_nand_verify_erased_page
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x2
	mov	x19, x1
	mov	x23, x0
	ldr	x20, [x1, #32]
	ldr	w8, [x1]
	asr	w22, w3, w8
	cbnz	x2, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_nand_get_data_buf
	mov	x21, x0
LBB0_2:
	ldr	w23, [x23]
	ldr	w25, [x19, #8]
	ldr	x8, [x19, #16]
	mov	x0, x19
	mov	x1, x21
	mov	w2, #1
	mov	x3, x22
	blr	x8
	mov	x22, x0
	cbz	w0, LBB0_4
LBB0_3:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_4:
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.5:
	mov	w22, #0
	mov	w24, #0
	sdiv	w23, w23, w25
	sxtw	x25, w23
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w1, w6, [x19, #24]
	mul	w8, w1, w24
	add	x0, x21, w8, sxtw
	mov	x2, x20
	mov	x3, x23
	mov	x4, #0
	mov	w5, #0
	bl	_nand_check_erased_ecc_chunk
	mov	x1, x0
	tbnz	w0, #31, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x22
	bl	_max
	mov	x22, x0
	add	w24, w24, #1
	add	x20, x20, x25
	ldr	w8, [x19, #8]
	cmp	w24, w8
	b.lt	LBB0_6
	b	LBB0_3
LBB0_8:
	mov	w22, #0
	b	LBB0_3
LBB0_9:
	mov	x22, x1
	b	LBB0_3
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_brcmstb_nand_verify_erased_page
.subsections_via_symbols
