	.file	"extr_ftp.c_FTP_SendData.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"\n"
.LC1:
	.string	"Failed reading from file\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"%d bytes of %d bytes (%d%%) in %d min %d sec estimated remaining time %d sec\n"
	.align 8
.LC3:
	.string	"%d bytes of %d bytes (%d%%) in %d sec estimated remaining time %d sec\n"
	.section	.rodata.str1.1
.LC4:
	.string	"file transfer complete!\n"
	.text
	.p2align 4
	.type	FTP_SendData, @function
FTP_SendData:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	lea	rdi, .LC0[rip]
	mov	r15d, edx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, esi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xor	r12d, r12d
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	xor	ebp, ebp
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	QWORD PTR 32[rsp], 0
	call	TRACE@PLT
	mov	eax, DWORD PTR DATA_PACKET_SIZE[rip]
	lea	edi, 0[0+rax*4]
	call	heap_alloc_zero@PLT
	lea	rsi, 24[rsp]
	mov	edi, r15d
	mov	r13, rax
	call	GetFileInformationByHandle@PLT
	lea	rdi, 16[rsp]
	call	time@PLT
	lea	rax, 32[rsp]
	mov	QWORD PTR 8[rsp], rax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L17:
	imul	r8, r9, -2004318071
	mov	eax, esi
	sub	rsp, 8
	.cfi_def_cfa_offset 120
	sar	eax, 31
	shr	r8, 32
	add	r8d, esi
	sar	r8d, 5
	sub	r8d, eax
	mov	rax, rcx
	cqo
	imul	edi, r8d, 60
	idiv	r10
	sub	esi, edi
	lea	rdi, .LC2[rip]
	mov	rcx, rax
	mov	rax, r10
	sub	rax, r12
	imul	rax, r9
	mov	r9d, esi
	mov	rsi, r12
	cqo
	idiv	r12
	mov	rdx, r10
	push	rax
	.cfi_def_cfa_offset 128
	xor	eax, eax
	call	TRACE@PLT
	pop	rax
	.cfi_def_cfa_offset 120
	pop	rdx
	.cfi_def_cfa_offset 112
	cmp	ebx, -1
	je	.L4
.L8:
	mov	rax, QWORD PTR 32[rsp]
	movsx	rdx, DWORD PTR DATA_PACKET_SIZE[rip]
	sub	rax, rbp
	test	rax, rax
	jle	.L16
.L2:
	cmp	rdx, rax
	mov	rsi, r13
	mov	edi, r14d
	cmovg	rdx, rax
	xor	ecx, ecx
	call	sock_send@PLT
	mov	ebx, eax
	cmp	eax, -1
	je	.L5
	cdqe
	add	rbp, rax
	add	r12, rax
.L5:
	lea	rdi, 20[rsp]
	call	time@PLT
	lea	rax, [r12+r12*4]
	mov	esi, DWORD PTR 20[rsp]
	sub	esi, DWORD PTR 16[rsp]
	lea	rcx, [rax+rax*4]
	mov	r10, QWORD PTR 24[rsp]
	movsx	r9, esi
	sal	rcx, 2
	cmp	esi, 59
	jg	.L17
	mov	rax, r10
	mov	r8d, esi
	lea	rdi, .LC3[rip]
	mov	rsi, r12
	sub	rax, r12
	imul	rax, r9
	cqo
	idiv	r12
	mov	r9, rax
	mov	rax, rcx
	cqo
	idiv	r10
	mov	rdx, r10
	mov	rcx, rax
	xor	eax, eax
	call	TRACE@PLT
	cmp	ebx, -1
	jne	.L8
.L4:
	lea	rdi, .LC4[rip]
	xor	eax, eax
	call	TRACE@PLT
	mov	rdi, r13
	call	heap_free@PLT
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L18
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r12
	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
.L16:
	.cfi_restore_state
	mov	rcx, QWORD PTR 8[rsp]
	xor	r8d, r8d
	mov	rsi, r13
	mov	edi, r15d
	call	ReadFile@PLT
	test	eax, eax
	je	.L19
.L3:
	mov	rax, QWORD PTR 32[rsp]
	test	rax, rax
	jle	.L4
	movsx	rdx, DWORD PTR DATA_PACKET_SIZE[rip]
	xor	ebp, ebp
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L19:
	lea	rdi, .LC1[rip]
	call	ERR@PLT
	jmp	.L3
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	FTP_SendData, .-FTP_SendData
	.comm	DATA_PACKET_SIZE,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_ftp.c_FTP_SendData.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"\012\000"
	.align	2
.LC1:
	.ascii	"Failed reading from file\012\000"
	.global	__aeabi_idiv
	.align	2
.LC2:
	.ascii	"%d bytes of %d bytes (%d%%) in %d min %d sec estima"
	.ascii	"ted remaining time %d sec\012\000"
	.align	2
.LC3:
	.ascii	"%d bytes of %d bytes (%d%%) in %d sec estimated rem"
	.ascii	"aining time %d sec\012\000"
	.align	2
.LC4:
	.ascii	"file transfer complete!\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	FTP_SendData, %function
FTP_SendData:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, #0
	sub	sp, sp, #52
	ldr	r3, .L20
	ldr	r9, .L20+4
	str	r2, [sp, #20]
	ldr	r0, .L20+8
	mov	r4, r2
	ldr	r3, [r3]
	str	r3, [sp, #44]
	mov	r3,#0
	mov	r10, r1
	str	r5, [sp, #32]
	bl	TRACE
	ldr	r0, [r9]
	mov	r7, r5
	lsl	r0, r0, #2
	bl	heap_alloc_zero
	add	r1, sp, #28
	mov	r8, r0
	mov	r0, r4
	bl	GetFileInformationByHandle
	add	r0, sp, #36
	bl	time
	b	.L8
.L17:
	bl	__aeabi_idiv
	mov	r3, r0
	sub	r0, fp, r5
	mov	r1, r5
	mul	r0, r4, r0
	str	r3, [sp, #16]
	bl	__aeabi_idiv
	ldr	r1, .L20+12
	asr	ip, r4, #31
	smull	r3, r1, r4, r1
	add	r1, r1, r4
	rsb	r1, ip, r1, asr #5
	rsb	ip, r1, r1, lsl #4
	sub	r4, r4, ip, lsl #2
	stm	sp, {r1, r4}
	str	r0, [sp, #8]
	mov	r2, fp
	mov	r1, r5
	ldr	r3, [sp, #16]
	ldr	r0, .L20+16
	bl	TRACE
	cmn	r6, #1
	beq	.L4
.L8:
	ldr	r3, [sp, #32]
	ldr	r2, [r9]
	sub	r3, r3, r7
	cmp	r3, #0
	ble	.L16
.L2:
	cmp	r3, r2
	movlt	r2, r3
	mov	r1, r8
	mov	r3, #0
	mov	r0, r10
	bl	sock_send
	cmn	r0, #1
	addne	r5, r5, r0
	addne	r7, r7, r0
	mov	r6, r0
	add	r0, sp, #40
	bl	time
	ldr	r4, [sp, #40]
	ldr	r3, [sp, #36]
	ldr	fp, [sp, #28]
	add	r0, r5, r5, lsl #2
	sub	r4, r4, r3
	add	r0, r0, r0, lsl #2
	cmp	r4, #59
	mov	r1, fp
	lsl	r0, r0, #2
	bgt	.L17
	bl	__aeabi_idiv
	mov	r3, r0
	sub	r0, fp, r5
	mov	r1, r5
	mul	r0, r4, r0
	str	r3, [sp, #16]
	bl	__aeabi_idiv
	mov	r2, fp
	str	r0, [sp, #4]
	mov	r1, r5
	ldr	r3, [sp, #16]
	ldr	r0, .L20+20
	str	r4, [sp]
	bl	TRACE
	cmn	r6, #1
	bne	.L8
.L4:
	ldr	r0, .L20+24
	bl	TRACE
	mov	r0, r8
	bl	heap_free
	ldr	r3, .L20
	ldr	r2, [r3]
	ldr	r3, [sp, #44]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L18
	mov	r0, r5
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L16:
	mov	r3, #0
	mov	r1, r8
	str	r3, [sp]
	ldr	r0, [sp, #20]
	add	r3, sp, #32
	bl	ReadFile
	cmp	r0, #0
	beq	.L19
.L3:
	ldr	r3, [sp, #32]
	cmp	r3, #0
	ble	.L4
	mov	r7, #0
	ldr	r2, [r9]
	b	.L2
.L19:
	ldr	r0, .L20+28
	bl	ERR
	b	.L3
.L18:
	bl	__stack_chk_fail
.L21:
	.align	2
.L20:
	.word	.LC5
	.word	DATA_PACKET_SIZE
	.word	.LC0
	.word	-2004318071
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC1
	.size	FTP_SendData, .-FTP_SendData
	.comm	DATA_PACKET_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
