	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nand_check_erased_buf
_nand_check_erased_buf:                 ## @nand_check_erased_buf
	.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
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %r12d
	movq	%rdi, %r15
	xorl	%ebx, %ebx
	testl	%esi, %esi
	je	LBB0_2
## %bb.1:
	movl	%r15d, %eax
	andl	$7, %eax
	testq	%rax, %rax
	je	LBB0_2
## %bb.12:
	leaq	1(%r15), %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %r13d
	movzbl	(%r15), %edi
	callq	_hweight8
	movq	_BITS_PER_BYTE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	subl	%eax, %ebx
	addl	%r13d, %ebx
	xorl	%edi, %edi
	cmpl	-44(%rbp), %ebx                 ## 4-byte Folded Reload
	setg	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_14
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=1
	leal	-1(%r12), %r13d
	incq	%r15
	cmpl	$1, %r12d
	je	LBB0_3
## %bb.17:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	%r14d, %eax
	andl	$7, %eax
	incq	%r14
	movl	%r13d, %r12d
	testq	%rax, %rax
	jne	LBB0_13
LBB0_3:
	cmpl	$8, %r13d
	jae	LBB0_4
	jmp	LBB0_8
LBB0_2:
	movl	%r12d, %r13d
	cmpl	$8, %r13d
	jb	LBB0_8
LBB0_4:
	movq	_BITS_PER_LONG@GOTPCREL(%rip), %r14
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	addl	$-8, %r13d
	addq	$8, %r15
	cmpl	$7, %r13d
	jbe	LBB0_8
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	cmpq	$-1, %rdi
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	callq	_hweight_long
	movl	(%r14), %ecx
	subl	%eax, %ecx
	addl	%ecx, %ebx
	xorl	%edi, %edi
	cmpl	-44(%rbp), %ebx                 ## 4-byte Folded Reload
	setg	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_7
LBB0_14:
	movq	_EBADMSG@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_8:
	testl	%r13d, %r13d
	je	LBB0_15
## %bb.9:
	incl	%r13d
	movq	_BITS_PER_BYTE@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %r12d
	movzbl	(%r15), %edi
	callq	_hweight8
	movl	(%r14), %ebx
	subl	%eax, %ebx
	addl	%r12d, %ebx
	xorl	%edi, %edi
	cmpl	-44(%rbp), %ebx                 ## 4-byte Folded Reload
	setg	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	incq	%r15
	decl	%r13d
	cmpl	$1, %r13d
	jg	LBB0_10
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BITS_PER_BYTE,4,2              ## @BITS_PER_BYTE
	.comm	_EBADMSG,4,2                    ## @EBADMSG
	.comm	_BITS_PER_LONG,4,2              ## @BITS_PER_LONG
	.no_dead_strip	_nand_check_erased_buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nand_check_erased_buf
_nand_check_erased_buf:                 ; @nand_check_erased_buf
	.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
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
	mov	w19, #0
	cbz	w1, LBB0_26
; %bb.1:
	and	x8, x21, #0x7
	cbz	x8, LBB0_26
; %bb.2:
	ldrb	w0, [x21]
	bl	_hweight8
Lloh0:
	adrp	x23, _BITS_PER_BYTE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _BITS_PER_BYTE@GOTPAGEOFF]
	ldr	w8, [x23]
	sub	w19, w8, w0
	cmp	w19, w20
	cset	w0, gt
	bl	_unlikely
	cbnz	x0, LBB0_31
; %bb.3:
	add	x8, x21, #1
	subs	w9, w22, #1
	b.eq	LBB0_25
; %bb.4:
	and	x10, x8, #0x7
	cbz	x10, LBB0_25
; %bb.5:
	ldrb	w0, [x8]
	bl	_hweight8
	ldr	w8, [x23]
	sub	w8, w8, w0
	add	w19, w8, w19
	cmp	w19, w20
	cset	w0, gt
	bl	_unlikely
	cbnz	x0, LBB0_31
; %bb.6:
	add	x8, x21, #2
	subs	w9, w22, #2
	b.eq	LBB0_25
; %bb.7:
	and	x10, x8, #0x7
	cbz	x10, LBB0_25
; %bb.8:
	ldrb	w0, [x8]
	bl	_hweight8
	ldr	w8, [x23]
	sub	w8, w8, w0
	add	w19, w8, w19
	cmp	w19, w20
	cset	w0, gt
	bl	_unlikely
	cbnz	x0, LBB0_31
; %bb.9:
	add	x8, x21, #3
	subs	w9, w22, #3
	b.eq	LBB0_25
; %bb.10:
	and	x10, x8, #0x7
	cbz	x10, LBB0_25
; %bb.11:
	ldrb	w0, [x8]
	bl	_hweight8
	ldr	w8, [x23]
	sub	w8, w8, w0
	add	w19, w8, w19
	cmp	w19, w20
	cset	w0, gt
	bl	_unlikely
	cbnz	x0, LBB0_31
; %bb.12:
	add	x8, x21, #4
	subs	w9, w22, #4
	b.eq	LBB0_25
; %bb.13:
	and	x10, x8, #0x7
	cbz	x10, LBB0_25
; %bb.14:
	ldrb	w0, [x8]
	bl	_hweight8
	ldr	w8, [x23]
	sub	w8, w8, w0
	add	w19, w8, w19
	cmp	w19, w20
	cset	w0, gt
	bl	_unlikely
	cbnz	x0, LBB0_31
; %bb.15:
	add	x8, x21, #5
	subs	w9, w22, #5
	b.eq	LBB0_25
; %bb.16:
	and	x10, x8, #0x7
	cbz	x10, LBB0_25
; %bb.17:
	ldrb	w0, [x8]
	bl	_hweight8
	ldr	w8, [x23]
	sub	w8, w8, w0
	add	w19, w8, w19
	cmp	w19, w20
	cset	w0, gt
	bl	_unlikely
	cbnz	x0, LBB0_31
; %bb.18:
	add	x8, x21, #6
	subs	w9, w22, #6
	b.eq	LBB0_25
; %bb.19:
	and	x10, x8, #0x7
	cbz	x10, LBB0_25
; %bb.20:
	ldrb	w0, [x8]
	bl	_hweight8
	ldr	w8, [x23]
	sub	w8, w8, w0
	add	w19, w8, w19
	cmp	w19, w20
	cset	w0, gt
	bl	_unlikely
	cbnz	x0, LBB0_31
; %bb.21:
	add	x8, x21, #7
	subs	w9, w22, #7
	b.eq	LBB0_25
; %bb.22:
	and	x10, x8, #0x7
	cbz	x10, LBB0_25
; %bb.23:
	ldrb	w0, [x8]
	bl	_hweight8
	ldr	w8, [x23]
	sub	w8, w8, w0
	add	w19, w8, w19
	cmp	w19, w20
	cset	w0, gt
	bl	_unlikely
	cbnz	x0, LBB0_31
; %bb.24:
	sub	w22, w22, #8
	add	x21, x21, #8
	b	LBB0_26
LBB0_25:
	mov	x22, x9
	mov	x21, x8
LBB0_26:
	cmp	w22, #8
	b.lo	LBB0_32
; %bb.27:
Lloh2:
	adrp	x23, _BITS_PER_LONG@GOTPAGE
Lloh3:
	ldr	x23, [x23, _BITS_PER_LONG@GOTPAGEOFF]
	b	LBB0_29
LBB0_28:                                ;   in Loop: Header=BB0_29 Depth=1
	sub	w22, w22, #8
	add	x21, x21, #8
	cmp	w22, #7
	b.ls	LBB0_32
LBB0_29:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x21]
	cmn	x0, #1
	b.eq	LBB0_28
; %bb.30:                               ;   in Loop: Header=BB0_29 Depth=1
	bl	_hweight_long
	ldr	w8, [x23]
	sub	w8, w8, w0
	add	w19, w8, w19
	cmp	w19, w20
	cset	w0, gt
	bl	_unlikely
	cbz	x0, LBB0_28
LBB0_31:
Lloh4:
	adrp	x8, _EBADMSG@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EBADMSG@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_36
LBB0_32:
	cbz	w22, LBB0_36
; %bb.33:
	add	w22, w22, #1
Lloh7:
	adrp	x23, _BITS_PER_BYTE@GOTPAGE
Lloh8:
	ldr	x23, [x23, _BITS_PER_BYTE@GOTPAGEOFF]
LBB0_34:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w0, [x21]
	bl	_hweight8
	ldr	w8, [x23]
	sub	w8, w8, w0
	add	w19, w8, w19
	cmp	w19, w20
	cset	w0, gt
	bl	_unlikely
	cbnz	x0, LBB0_31
; %bb.35:                               ;   in Loop: Header=BB0_34 Depth=1
	add	x21, x21, #1
	sub	w22, w22, #1
	cmp	w22, #1
	b.gt	LBB0_34
LBB0_36:
	mov	x0, x19
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_BITS_PER_BYTE,4,2              ; @BITS_PER_BYTE
	.comm	_EBADMSG,4,2                    ; @EBADMSG
	.comm	_BITS_PER_LONG,4,2              ; @BITS_PER_LONG
	.no_dead_strip	_nand_check_erased_buf
.subsections_via_symbols
