	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nand_check_erased_ecc_chunk    ## -- Begin function nand_check_erased_ecc_chunk
	.p2align	4, 0x90
_nand_check_erased_ecc_chunk:           ## @nand_check_erased_ecc_chunk
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movl	%ecx, %ebx
	movq	%rdx, %r15
	movq	%rdi, %r13
	movl	16(%rbp), %r14d
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movl	%r14d, %edx
	callq	_nand_check_erased_buf
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	subl	%r12d, %r14d
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movl	%ebx, %esi
	movl	%r14d, %edx
	callq	_nand_check_erased_buf
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_12
## %bb.3:
	subl	%ebx, %r14d
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r14d, %edx
	callq	_nand_check_erased_buf
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	testl	%r12d, %r12d
	je	LBB0_7
## %bb.6:
	movq	%r13, %rdi
	movl	$255, %esi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_memset
LBB0_7:
	testl	%ebx, %ebx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	je	LBB0_9
## %bb.8:
	movl	$255, %esi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_memset
LBB0_9:
	testl	%r14d, %r14d
	je	LBB0_11
## %bb.10:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	$255, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_memset
LBB0_11:
	addl	%r12d, %ebx
	addl	%r14d, %ebx
	jmp	LBB0_12
LBB0_1:
	movl	%r12d, %ebx
	jmp	LBB0_12
LBB0_4:
	movl	%r14d, %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nand_check_erased_ecc_chunk    ; -- Begin function nand_check_erased_ecc_chunk
	.p2align	2
_nand_check_erased_ecc_chunk:           ; @nand_check_erased_ecc_chunk
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x24, x6
	mov	x20, x5
	mov	x21, x4
	mov	x22, x3
	mov	x23, x2
	mov	x25, x1
	mov	x27, x0
	mov	x2, x6
	bl	_nand_check_erased_buf
	mov	x19, x0
	tbnz	w0, #31, LBB0_12
; %bb.1:
	sub	w26, w24, w19
	mov	x0, x23
	mov	x1, x22
	mov	x2, x26
	bl	_nand_check_erased_buf
	mov	x24, x0
	tbnz	w0, #31, LBB0_10
; %bb.2:
	sub	w2, w26, w24
	mov	x0, x21
	mov	x1, x20
	bl	_nand_check_erased_buf
	mov	x26, x0
	tbnz	w0, #31, LBB0_11
; %bb.3:
	cbz	w19, LBB0_5
; %bb.4:
	mov	x0, x27
	mov	w1, #255
	mov	x2, x25
	bl	_memset
LBB0_5:
	cbz	w24, LBB0_7
; %bb.6:
	mov	x0, x23
	mov	w1, #255
	mov	x2, x22
	bl	_memset
LBB0_7:
	cbz	w26, LBB0_9
; %bb.8:
	mov	x0, x21
	mov	w1, #255
	mov	x2, x20
	bl	_memset
LBB0_9:
	add	w8, w24, w19
	add	w19, w8, w26
	b	LBB0_12
LBB0_10:
	mov	x19, x24
	b	LBB0_12
LBB0_11:
	mov	x19, x26
LBB0_12:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
