	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function toshiba_nand_benand_eccstatus
_toshiba_nand_benand_eccstatus:         ## @toshiba_nand_benand_eccstatus
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_nand_to_mtd
	movq	%rax, %r14
	leaq	-20(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_nand_status_op
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	movl	-20(%rbp), %eax
	movq	_NAND_STATUS_FAIL@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_3
## %bb.2:
	addq	$8, %r14
	xorl	%eax, %eax
	movl	$1, %ecx
	jmp	LBB0_6
LBB0_3:
	movq	_TOSHIBA_NAND_STATUS_REWRITE_RECOMMENDED@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.5:
	movl	(%r14), %ecx
	addq	$4, %r14
	movl	%ecx, %eax
LBB0_6:
	addl	%ecx, (%r14)
LBB0_7:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	xorl	%eax, %eax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_STATUS_FAIL,4,2           ## @NAND_STATUS_FAIL
	.comm	_TOSHIBA_NAND_STATUS_REWRITE_RECOMMENDED,4,2 ## @TOSHIBA_NAND_STATUS_REWRITE_RECOMMENDED
	.no_dead_strip	_toshiba_nand_benand_eccstatus
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function toshiba_nand_benand_eccstatus
_toshiba_nand_benand_eccstatus:         ; @toshiba_nand_benand_eccstatus
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	bl	_nand_to_mtd
	mov	x19, x0
	add	x1, sp, #12
	mov	x0, x20
	bl	_nand_status_op
	cbnz	w0, LBB0_6
; %bb.1:
	ldr	w8, [sp, #12]
Lloh0:
	adrp	x9, _NAND_STATUS_FAIL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NAND_STATUS_FAIL@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	mov	w0, #0
	add	x19, x19, #8
	mov	w8, #1
	b	LBB0_5
LBB0_3:
Lloh3:
	adrp	x9, _TOSHIBA_NAND_STATUS_REWRITE_RECOMMENDED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TOSHIBA_NAND_STATUS_REWRITE_RECOMMENDED@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.4:
	ldr	w8, [x19], #4
	mov	x0, x8
LBB0_5:
	ldr	w9, [x19]
	add	w8, w9, w8
	str	w8, [x19]
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_7:
	mov	w0, #0
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_STATUS_FAIL,4,2           ; @NAND_STATUS_FAIL
	.comm	_TOSHIBA_NAND_STATUS_REWRITE_RECOMMENDED,4,2 ; @TOSHIBA_NAND_STATUS_REWRITE_RECOMMENDED
	.no_dead_strip	_toshiba_nand_benand_eccstatus
.subsections_via_symbols
