	.file	"extr_nandbiterrs.c_rewrite_page.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"rewrite page\n"
.LC1:
	.string	"error: write_oob failed (%d)\n"
	.text
	.p2align 4
	.type	rewrite_page, @function
rewrite_page:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	sub	rsp, 80
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 72[rsp], rax
	xor	eax, eax
	test	edi, edi
	jne	.L12
.L2:
	mov	eax, DWORD PTR MTD_OPS_RAW[rip]
	mov	rdi, QWORD PTR mtd[rip]
	mov	rdx, rsp
	mov	esi, DWORD PTR offset[rip]
	mov	DWORD PTR 56[rsp], eax
	mov	rax, QWORD PTR [rdi]
	mov	QWORD PTR 8[rsp], 0
	mov	QWORD PTR [rsp], rax
	mov	eax, DWORD PTR wbuffer[rip]
	mov	QWORD PTR 48[rsp], 0
	mov	QWORD PTR 40[rsp], 0
	mov	QWORD PTR 32[rsp], 0
	mov	DWORD PTR 24[rsp], eax
	mov	QWORD PTR 16[rsp], 0
	call	mtd_write_oob@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L3
	mov	rax, QWORD PTR mtd[rip]
	mov	rax, QWORD PTR [rax]
	cmp	QWORD PTR 8[rsp], rax
	je	.L1
	xor	esi, esi
	lea	rdi, .LC1[rip]
	call	pr_err@PLT
	mov	r12d, DWORD PTR EIO[rip]
	neg	r12d
.L1:
	mov	rax, QWORD PTR 72[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L13
	add	rsp, 80
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	esi, eax
	lea	rdi, .LC1[rip]
	call	pr_err@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	lea	rdi, .LC0[rip]
	call	pr_info@PLT
	jmp	.L2
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	rewrite_page, .-rewrite_page
	.comm	wbuffer,4,4
	.comm	offset,4,4
	.comm	mtd,8,8
	.comm	MTD_OPS_RAW,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_nandbiterrs.c_rewrite_page.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"rewrite page\012\000"
	.align	2
.LC1:
	.ascii	"error: write_oob failed (%d)\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rewrite_page, %function
rewrite_page:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	ldr	r3, .L14
	sub	sp, sp, #44
	cmp	r0, #0
	ldr	r3, [r3]
	str	r3, [sp, #36]
	mov	r3,#0
	bne	.L12
.L2:
	mov	r3, #0
	ldr	r5, .L14+4
	ldr	r1, .L14+8
	ldr	r2, .L14+12
	ldr	r0, [r5]
	ldr	r2, [r2]
	ldr	ip, [r1]
	ldr	r1, .L14+16
	ldr	lr, [r0]
	ldr	r1, [r1]
	str	r2, [sp, #32]
	add	r2, sp, #4
	str	lr, [sp, #4]
	str	ip, [sp, #16]
	str	r3, [sp, #8]
	str	r3, [sp, #28]
	str	r3, [sp, #24]
	str	r3, [sp, #20]
	str	r3, [sp, #12]
	bl	mtd_write_oob
	subs	r4, r0, #0
	bne	.L3
	ldr	r3, [r5]
	ldr	r2, [sp, #8]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L1
	mov	r1, r4
	ldr	r0, .L14+20
	bl	pr_err
	ldr	r3, .L14+24
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L1:
	ldr	r3, .L14
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L13
	mov	r0, r4
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, pc}
.L3:
	mov	r1, r4
	ldr	r0, .L14+20
	bl	pr_err
	b	.L1
.L12:
	ldr	r0, .L14+28
	bl	pr_info
	b	.L2
.L13:
	bl	__stack_chk_fail
.L15:
	.align	2
.L14:
	.word	.LC2
	.word	mtd
	.word	wbuffer
	.word	MTD_OPS_RAW
	.word	offset
	.word	.LC1
	.word	EIO
	.word	.LC0
	.size	rewrite_page, .-rewrite_page
	.comm	wbuffer,4,4
	.comm	offset,4,4
	.comm	mtd,4,4
	.comm	MTD_OPS_RAW,4,4
	.comm	EIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
