	.file	"extr_mtdswap.c_mtdswap_erase_block.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"erase of erase block %#llx on %s failed"
	.align 8
.LC1:
	.string	"Cannot erase erase block %#llx on %s\n"
	.text
	.p2align 4
	.type	mtdswap_erase_block, @function
mtdswap_erase_block:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rsi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rbx, QWORD PTR 16[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR [rsi]
	add	rax, 1
	mov	QWORD PTR [rsi], rax
	cmp	rax, QWORD PTR [rdi]
	jle	.L2
	mov	QWORD PTR [rdi], rax
.L2:
	xor	ebp, ebp
	mov	r13, rsp
	lea	r15, .LC0[rip]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L12:
	cmp	DWORD PTR MTDSWAP_ERASE_RETRIES[rip], ebp
	mov	ecx, DWORD PTR [rbx]
	mov	edx, DWORD PTR [rsp]
	mov	edi, DWORD PTR 8[r12]
	jbe	.L4
	mov	rsi, r15
	add	ebp, 1
	call	dev_warn@PLT
	xor	eax, eax
	call	yield@PLT
.L5:
	xor	esi, esi
	mov	edx, 8
	mov	rdi, r13
	call	memset@PLT
	mov	rsi, r14
	mov	rdi, r12
	call	mtdswap_eb_offset@PLT
	mov	rsi, r13
	mov	rdi, rbx
	mov	DWORD PTR [rsp], eax
	mov	eax, DWORD PTR 4[rbx]
	mov	DWORD PTR 4[rsp], eax
	call	mtd_erase@PLT
	test	eax, eax
	jne	.L12
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L13
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	lea	rsi, .LC1[rip]
	call	dev_err@PLT
	mov	rsi, r14
	mov	rdi, r12
	call	mtdswap_handle_badblock@PLT
	mov	eax, DWORD PTR EIO[rip]
	neg	eax
	jmp	.L1
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	mtdswap_erase_block, .-mtdswap_erase_block
	.comm	MTDSWAP_ERASE_RETRIES,4,4
	.comm	EIO,4,4
	.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_mtdswap.c_mtdswap_erase_block.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"erase of erase block %#llx on %s failed\000"
	.align	2
.LC1:
	.ascii	"Cannot erase erase block %#llx on %s\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mtdswap_erase_block, %function
mtdswap_erase_block:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, #0
	ldr	r3, [r1]
	ldr	r2, [r0]
	add	r3, r3, #1
	cmp	r3, r2
	ldr	r2, .L14
	sub	sp, sp, #16
	ldr	r2, [r2]
	str	r2, [sp, #12]
	mov	r2,#0
	ldr	r4, [r0, #8]
	mov	r8, r1
	str	r3, [r1]
	mov	r6, r0
	mov	r7, r5
	ldr	r9, .L14+4
	ldr	r10, .L14+8
	strgt	r3, [r0]
	b	.L5
.L12:
	ldr	r3, [r9]
	ldr	r0, [r6, #4]
	cmp	r3, r5
	ldr	r2, [sp, #4]
	ldr	r3, [r4]
	bls	.L4
	mov	r1, r10
	add	r5, r5, #1
	bl	dev_warn
	bl	yield
.L5:
	mov	r1, r8
	mov	r0, r6
	str	r7, [sp, #4]
	str	r7, [sp, #8]
	bl	mtdswap_eb_offset
	mov	r2, r0
	ldr	r3, [r4, #4]
	mov	r0, r4
	add	r1, sp, #4
	stmib	sp, {r2, r3}
	bl	mtd_erase
	cmp	r0, #0
	bne	.L12
.L1:
	ldr	r3, .L14
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L13
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L4:
	ldr	r1, .L14+12
	bl	dev_err
	mov	r1, r8
	mov	r0, r6
	bl	mtdswap_handle_badblock
	ldr	r3, .L14+16
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L13:
	bl	__stack_chk_fail
.L15:
	.align	2
.L14:
	.word	.LC2
	.word	MTDSWAP_ERASE_RETRIES
	.word	.LC0
	.word	.LC1
	.word	EIO
	.size	mtdswap_erase_block, .-mtdswap_erase_block
	.comm	MTDSWAP_ERASE_RETRIES,4,4
	.comm	EIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
