	.file	"extr_tplink-safeloader.c_write_ff.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Can not write 0xff to output_file"
	.align 8
.LC1:
	.string	"Can not write partition to output_file"
	.text
	.p2align 4
	.type	write_ff, @function
write_ff:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	sub	rsp, 4096
	.cfi_def_cfa_offset 4144
	or	QWORD PTR [rsp], 0
	sub	rsp, 16
	.cfi_def_cfa_offset 4160
	mov	edx, 4096
	xor	ebx, ebx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 4104[rsp], rax
	xor	eax, eax
	mov	r13, rsp
	mov	r12, rdi
	mov	rbp, rsi
	mov	rdi, r13
	mov	esi, 255
	call	memset@PLT
	cmp	rbp, 4096
	jbe	.L9
	lea	r14, .LC0[rip]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	add	ebx, 4096
	movsx	rax, ebx
	lea	rdx, 4096[rax]
	cmp	rdx, rbp
	jnb	.L2
.L4:
	mov	rcx, r12
	mov	edx, 1
	mov	esi, 4096
	mov	rdi, r13
	call	fwrite@PLT
	test	rax, rax
	jns	.L3
	mov	esi, DWORD PTR errno[rip]
	mov	rdx, r14
	mov	edi, 1
	call	error@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L9:
	xor	eax, eax
	.p2align 4,,10
	.p2align 3
.L2:
	cmp	rbp, rax
	ja	.L13
.L1:
	mov	rax, QWORD PTR 4104[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L14
	add	rsp, 4112
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	esi, ebp
	mov	rcx, r12
	mov	edx, 1
	mov	rdi, r13
	sub	esi, ebx
	call	fwrite@PLT
	test	rax, rax
	jns	.L1
	mov	esi, DWORD PTR errno[rip]
	lea	rdx, .LC1[rip]
	mov	edi, 1
	call	error@PLT
	jmp	.L1
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	write_ff, .-write_ff
	.comm	errno,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_tplink-safeloader.c_write_ff.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Can not write 0xff to output_file\000"
	.align	2
.LC1:
	.ascii	"Can not write partition to output_file\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_ff, %function
write_ff:
	@ args = 0, pretend = 0, frame = 4104
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r1
	sub	sp, sp, #4096
	sub	sp, sp, #8
	ldr	ip, .L15
	add	r3, sp, #4096
	mov	r6, r0
	mov	r2, #4096
	mov	r1, #255
	add	r0, sp, #4
	add	r3, r3, #4
	ldr	ip, [ip]
	str	ip, [r3]
	mov	ip,#0
	bl	memset
	cmp	r5, #4096
	bls	.L9
	mov	r4, #4096
	ldr	r8, .L15+4
	ldr	r7, .L15+8
	b	.L4
.L3:
	add	r3, r4, #4096
	cmp	r3, r5
	bcs	.L2
.L10:
	mov	r4, r3
.L4:
	mov	r3, r6
	mov	r2, #1
	mov	r1, #4096
	add	r0, sp, #4
	bl	fwrite
	cmp	r0, #0
	bge	.L3
	mov	r2, r7
	mov	r0, #1
	ldr	r1, [r8]
	bl	error
	add	r3, r4, #4096
	cmp	r3, r5
	bcc	.L10
.L2:
	cmp	r5, r4
	bhi	.L13
.L1:
	add	r3, sp, #4096
	ldr	r2, .L15
	add	r3, r3, #4
	ldr	r1, [r2]
	ldr	r2, [r3]
	eors	r1, r2, r1
	mov	r2, #0
	bne	.L14
	add	sp, sp, #4096
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	mov	r3, r6
	mov	r2, #1
	sub	r1, r5, r4
	add	r0, sp, #4
	bl	fwrite
	cmp	r0, #0
	bge	.L1
	ldr	r3, .L15+4
	ldr	r2, .L15+12
	ldr	r1, [r3]
	mov	r0, #1
	bl	error
	b	.L1
.L9:
	mov	r4, #0
	b	.L2
.L14:
	bl	__stack_chk_fail
.L16:
	.align	2
.L15:
	.word	.LC2
	.word	errno
	.word	.LC0
	.word	.LC1
	.size	write_ff, .-write_ff
	.comm	errno,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
