	.file	"extr_nand_base.c_nand_block_bad.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	nand_block_bad, @function
nand_block_bad:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	ecx, DWORD PTR [rdi]
	sar	esi, cl
	and	esi, DWORD PTR 4[rdi]
	mov	r12d, esi
	xor	esi, esi
	call	nand_bbm_get_next_page@PLT
	test	eax, eax
	js	.L2
	mov	ebx, eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L10:
	xor	eax, eax
	cmp	r13d, 255
	setne	al
	test	eax, eax
	jne	.L1
.L11:
	lea	esi, 1[rbx]
	mov	rdi, rbp
	call	nand_bbm_get_next_page@PLT
	mov	ebx, eax
	test	eax, eax
	js	.L2
.L6:
	lea	esi, [r12+rbx]
	mov	rdi, rbp
	call	[QWORD PTR 32[rbp]]
	test	eax, eax
	js	.L1
	xor	edi, edi
	mov	rdx, QWORD PTR 16[rbp]
	cmp	DWORD PTR 24[rbp], 8
	mov	rax, QWORD PTR 8[rbp]
	sete	dil
	mov	r13d, DWORD PTR [rax+rdx*4]
	call	likely@PLT
	test	rax, rax
	jne	.L10
	mov	edi, r13d
	call	hweight8@PLT
	cmp	eax, DWORD PTR 24[rbp]
	setl	al
	movzx	eax, al
	test	eax, eax
	je	.L11
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	add	rsp, 8
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	nand_block_bad, .-nand_block_bad
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_nand_base.c_nand_block_bad.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	nand_block_bad, %function
nand_block_bad:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r2, r1
	push	{r4, r5, r6, r7, r8, lr}
	ldm	r0, {r3, r7}
	mov	r1, #0
	mov	r5, r0
	and	r7, r7, r2, asr r3
	bl	nand_bbm_get_next_page
	subs	r6, r0, #0
	bge	.L6
	b	.L2
.L10:
	subs	r0, r4, #255
	movne	r0, #1
.L5:
	cmp	r0, #0
	add	r1, r6, #1
	popne	{r4, r5, r6, r7, r8, pc}
	mov	r0, r5
	bl	nand_bbm_get_next_page
	subs	r6, r0, #0
	blt	.L2
.L6:
	mov	r0, r5
	ldr	r3, [r5, #20]
	add	r1, r7, r6
	blx	r3
	cmp	r0, #0
	poplt	{r4, r5, r6, r7, r8, pc}
	ldr	r0, [r5, #16]
	ldr	r2, [r5, #12]
	sub	r0, r0, #8
	clz	r0, r0
	ldr	r3, [r5, #8]
	lsr	r0, r0, #5
	ldr	r4, [r3, r2, lsl #2]
	bl	likely
	cmp	r0, #0
	bne	.L10
	mov	r0, r4
	bl	hweight8
	ldr	r3, [r5, #16]
	cmp	r0, r3
	movge	r0, #0
	movlt	r0, #1
	b	.L5
.L2:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
	.size	nand_block_bad, .-nand_block_bad
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
