	.file	"extr_knetfile.c_kftp_connect_file.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%*d %lld"
.LC1:
	.string	"[kftp_connect_file] %s\n"
.LC2:
	.string	"REST %lld\r\n"
	.text
	.p2align 4
	.globl	kftp_connect_file
	.type	kftp_connect_file, @function
kftp_connect_file:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 72
	.cfi_def_cfa_offset 96
	mov	edi, DWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	cmp	edi, -1
	jne	.L12
.L3:
	mov	rdi, rbx
	call	kftp_pasv_prep@PLT
	mov	rsi, QWORD PTR 8[rbx]
	mov	edx, 1
	mov	rdi, rbx
	call	kftp_send_cmd@PLT
	mov	rdi, QWORD PTR 16[rbx]
	lea	rdx, 8[rsp]
	lea	rsi, .LC0[rip]
	call	sscanf@PLT
	cmp	eax, 1
	jne	.L13
	mov	rax, QWORD PTR 8[rsp]
	mov	rdx, QWORD PTR 32[rbx]
	mov	QWORD PTR 24[rbx], rax
	test	rdx, rdx
	js	.L7
	lea	rbp, 16[rsp]
	lea	rsi, .LC2[rip]
	mov	rdi, rbp
	call	sprintf@PLT
	mov	edx, 1
	mov	rsi, rbp
	mov	rdi, rbx
	call	kftp_send_cmd@PLT
.L7:
	mov	rsi, QWORD PTR 40[rbx]
	xor	edx, edx
	mov	rdi, rbx
	call	kftp_send_cmd@PLT
	mov	rdi, rbx
	call	kftp_pasv_connect@PLT
	mov	rdi, rbx
	call	kftp_get_response@PLT
	cmp	eax, 150
	jne	.L14
	mov	DWORD PTR 48[rbx], 1
	xor	eax, eax
.L1:
	mov	rcx, QWORD PTR 56[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L15
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	call	netclose@PLT
	cmp	QWORD PTR 56[rbx], 0
	je	.L3
	mov	rdi, rbx
	call	kftp_get_response@PLT
	jmp	.L3
.L13:
	mov	rdx, QWORD PTR 16[rbx]
	mov	edi, DWORD PTR stderr[rip]
	lea	rsi, .LC1[rip]
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L1
.L14:
	mov	rdx, QWORD PTR 16[rbx]
	mov	edi, DWORD PTR stderr[rip]
	lea	rsi, .LC1[rip]
	call	fprintf@PLT
	mov	edi, DWORD PTR [rbx]
	call	netclose@PLT
	mov	DWORD PTR [rbx], -1
	mov	eax, -1
	jmp	.L1
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	kftp_connect_file, .-kftp_connect_file
	.comm	stderr,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_knetfile.c_kftp_connect_file.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%*d %lld\000"
	.align	2
.LC1:
	.ascii	"[kftp_connect_file] %s\012\000"
	.align	2
.LC2:
	.ascii	"REST %lld\015\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	kftp_connect_file
	.syntax unified
	.arm
	.fpu softvfp
	.type	kftp_connect_file, %function
kftp_connect_file:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	mov	r4, r0
	ldr	r0, [r0]
	ldr	r3, .L19
	sub	sp, sp, #52
	cmn	r0, #1
	ldr	r3, [r3]
	str	r3, [sp, #44]
	mov	r3,#0
	bne	.L15
.L3:
	mov	r0, r4
	bl	kftp_pasv_prep
	mov	r2, #1
	ldr	r1, [r4, #4]
	mov	r0, r4
	bl	kftp_send_cmd
	mov	r2, sp
	ldr	r1, .L19+4
	ldr	r0, [r4, #8]
	bl	sscanf
	cmp	r0, #1
	mov	r5, r0
	bne	.L16
	ldmia	sp, {r0-r1}
	ldr	r2, [r4, #24]
	str	r0, [r4, #16]
	str	r1, [r4, #20]
	cmp	r2, #0
	blt	.L7
	ldr	r1, .L19+8
	asr	r3, r2, #31
	add	r0, sp, #12
	bl	sprintf
	mov	r2, r5
	mov	r0, r4
	add	r1, sp, #12
	bl	kftp_send_cmd
.L7:
	mov	r2, #0
	ldr	r1, [r4, #28]
	mov	r0, r4
	bl	kftp_send_cmd
	mov	r0, r4
	bl	kftp_pasv_connect
	mov	r0, r4
	bl	kftp_get_response
	cmp	r0, #150
	moveq	r3, #1
	moveq	r0, #0
	streq	r3, [r4, #32]
	bne	.L17
.L1:
	ldr	r3, .L19
	ldr	r2, [r3]
	ldr	r3, [sp, #44]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L18
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, pc}
.L15:
	bl	netclose
	ldr	r3, [r4, #36]
	cmp	r3, #0
	beq	.L3
	mov	r0, r4
	bl	kftp_get_response
	b	.L3
.L16:
	ldr	r3, .L19+12
	ldr	r2, [r4, #8]
	ldr	r0, [r3]
	ldr	r1, .L19+16
	bl	fprintf
	mvn	r0, #0
	b	.L1
.L17:
	ldr	r3, .L19+12
	ldr	r2, [r4, #8]
	ldr	r0, [r3]
	ldr	r1, .L19+16
	bl	fprintf
	ldr	r0, [r4]
	bl	netclose
	mvn	r0, #0
	str	r0, [r4]
	b	.L1
.L18:
	bl	__stack_chk_fail
.L20:
	.align	2
.L19:
	.word	.LC3
	.word	.LC0
	.word	.LC2
	.word	stderr
	.word	.LC1
	.size	kftp_connect_file, .-kftp_connect_file
	.comm	stderr,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
