	.file	"extr_tftpd.c_write_behind.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"log/upload.%ld"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"Couldn't create and/or open file %s for upload!"
	.text
	.p2align 4
	.type	write_behind, @function
write_behind:
.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, 288
	.cfi_def_cfa_offset 336
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 280[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR nextone[rip]
	mov	rbp, rax
	sal	rbp, 4
	add	rbp, QWORD PTR bfs[rip]
	mov	r13d, DWORD PTR 0[rbp]
	cmp	r13d, -1
	jl	.L11
	mov	edx, DWORD PTR [rdi]
	mov	rbx, rdi
	mov	r12d, esi
	test	edx, edx
	je	.L17
.L3:
	test	rax, rax
	mov	edx, DWORD PTR BF_FREE[rip]
	sete	al
	movzx	eax, al
	mov	DWORD PTR 0[rbp], edx
	mov	rbp, QWORD PTR 8[rbp]
	mov	QWORD PTR nextone[rip], rax
	test	r13d, r13d
	jle	.L12
	test	r12d, r12d
	je	.L5
	lea	edx, -1[r13]
	movzx	eax, BYTE PTR prevchar[rip]
	lea	r14, 12[rsp]
	lea	r12, 1[rbp+rdx]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L7:
	mov	edi, DWORD PTR [rbx]
	xor	eax, eax
	mov	edx, 1
	mov	rsi, r14
	call	write@PLT
	cmp	eax, 1
	jne	.L1
.L9:
	endbr64
	movzx	eax, BYTE PTR 12[rsp]
	mov	BYTE PTR prevchar[rip], al
	cmp	r12, rbp
	je	.L1
.L6:
	movsx	edx, BYTE PTR 0[rbp]
	add	rbp, 1
	mov	DWORD PTR 12[rsp], edx
	cmp	al, 13
	jne	.L7
	cmp	edx, 10
	je	.L18
	test	edx, edx
	jne	.L7
	xor	eax, eax
	mov	BYTE PTR prevchar[rip], al
	cmp	r12, rbp
	jne	.L6
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rax, QWORD PTR 280[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L19
	add	rsp, 288
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	eax, r13d
	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
.L18:
	.cfi_restore_state
	mov	edx, DWORD PTR SEEK_CUR[rip]
	mov	edi, DWORD PTR [rbx]
	mov	esi, -1
	call	lseek@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L17:
	mov	ecx, DWORD PTR 4[rdi]
	lea	r14, 16[rsp]
	mov	esi, 256
	lea	rdx, .LC0[rip]
	mov	rdi, r14
	call	msnprintf@PLT
	mov	esi, DWORD PTR O_CREAT[rip]
	mov	edx, 511
	mov	rdi, r14
	or	esi, DWORD PTR O_RDWR[rip]
	call	open@PLT
	mov	DWORD PTR [rbx], eax
	mov	r13d, eax
	cmp	eax, -1
	je	.L20
	mov	rax, QWORD PTR nextone[rip]
	mov	r13d, DWORD PTR 0[rbp]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L11:
	xor	r13d, r13d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L5:
	mov	edi, DWORD PTR [rbx]
	mov	edx, r13d
	mov	rsi, rbp
	xor	eax, eax
	call	write@PLT
	mov	r13d, eax
	jmp	.L1
.L12:
	mov	r13d, -1
	jmp	.L1
.L19:
	call	__stack_chk_fail@PLT
.L20:
	mov	rsi, r14
	lea	rdi, .LC1[rip]
	call	logmsg@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	write_behind, .-write_behind
	.comm	prevchar,1,1
	.comm	nextone,8,8
	.comm	bfs,8,8
	.comm	SEEK_CUR,4,4
	.comm	O_RDWR,4,4
	.comm	O_CREAT,4,4
	.comm	O_BINARY,4,4
	.comm	BF_FREE,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_tftpd.c_write_behind.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"log/upload.%ld\000"
	.align	2
.LC1:
	.ascii	"Couldn't create and/or open file %s for upload!\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_behind, %function
write_behind:
	@ args = 0, pretend = 0, frame = 264
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r2, .L21
	ldr	r9, .L21+4
	ldr	r7, [r2]
	ldr	r3, [r9]
	ldr	r2, .L21+8
	ldr	r6, [r7, r3, lsl #3]
	sub	sp, sp, #264
	cmn	r6, #1
	ldr	r2, [r2]
	str	r2, [sp, #260]
	mov	r2,#0
	movlt	r6, #0
	add	r4, r7, r3, lsl #3
	blt	.L1
	ldr	r2, [r0]
	mov	r5, r0
	cmp	r2, #0
	mov	r8, r1
	lsl	r10, r3, #3
	beq	.L17
.L3:
	clz	r3, r3
	ldr	r2, .L21+12
	lsr	r3, r3, #5
	ldr	r2, [r2]
	cmp	r6, #0
	ldr	r4, [r4, #4]
	str	r2, [r7, r10]
	str	r3, [r9]
	ble	.L12
	cmp	r8, #0
	beq	.L5
	ldr	r7, .L21+16
	ldr	r9, .L21+20
	ldrb	r2, [r7]	@ zero_extendqisi2
	add	r8, r4, r6
	b	.L6
.L7:
	mov	r2, #1
	mov	r1, sp
	ldr	r0, [r5]
	bl	write
	cmp	r0, #1
	bne	.L1
.L9:
	ldrb	r2, [sp]	@ zero_extendqisi2
	cmp	r4, r8
	strb	r2, [r7]
	beq	.L1
.L6:
	ldrb	r3, [r4], #1	@ zero_extendqisi2
	cmp	r2, #13
	str	r3, [sp]
	bne	.L7
	cmp	r3, #10
	beq	.L18
	cmp	r3, #0
	bne	.L7
	mov	r2, r3
	cmp	r4, r8
	strb	r2, [r7]
	bne	.L6
.L1:
	ldr	r3, .L21+8
	ldr	r2, [r3]
	ldr	r3, [sp, #260]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L19
	mov	r0, r6
	add	sp, sp, #264
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L18:
	mvn	r1, #0
	ldr	r2, [r9]
	ldr	r0, [r5]
	bl	lseek
	b	.L7
.L17:
	mov	r1, #256
	ldr	r3, [r5, #4]
	ldr	r2, .L21+24
	add	r0, sp, #4
	bl	msnprintf
	ldr	r2, .L21+28
	ldr	r3, .L21+32
	ldr	r1, [r2]
	ldr	r3, [r3]
	ldr	r2, .L21+36
	add	r0, sp, #4
	orr	r1, r1, r3
	bl	open
	cmn	r0, #1
	mov	r6, r0
	str	r0, [r5]
	beq	.L20
	ldr	r3, [r9]
	ldr	r6, [r7, r10]
	b	.L3
.L5:
	mov	r2, r6
	mov	r1, r4
	ldr	r0, [r5]
	bl	write
	mov	r6, r0
	b	.L1
.L12:
	mvn	r6, #0
	b	.L1
.L19:
	bl	__stack_chk_fail
.L20:
	add	r1, sp, #4
	ldr	r0, .L21+40
	bl	logmsg
	b	.L1
.L22:
	.align	2
.L21:
	.word	bfs
	.word	nextone
	.word	.LC2
	.word	BF_FREE
	.word	prevchar
	.word	SEEK_CUR
	.word	.LC0
	.word	O_CREAT
	.word	O_RDWR
	.word	511
	.word	.LC1
	.size	write_behind, .-write_behind
	.comm	prevchar,1,1
	.comm	nextone,4,4
	.comm	bfs,4,4
	.comm	SEEK_CUR,4,4
	.comm	O_RDWR,4,4
	.comm	O_CREAT,4,4
	.comm	O_BINARY,4,4
	.comm	BF_FREE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
