	.file	"extr_sftp-client.c_upload_dir_internal.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Maximum directory depth exceeded: %d levels"
	.align 8
.LC1:
	.string	"Couldn't stat directory \"%s\": %s"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"\"%s\" is not a directory"
.LC3:
	.string	"Entering %s\n"
	.section	.rodata.str1.8
	.align 8
.LC4:
	.string	"\"%s\" exists but is not a directory"
	.section	.rodata.str1.1
.LC5:
	.string	"Failed to open dir \"%s\": %s"
.LC6:
	.string	"%s: lstat failed: %s"
.LC7:
	.string	"."
.LC8:
	.string	".."
	.section	.rodata.str1.8
	.align 8
.LC9:
	.string	"Uploading of file %s to %s failed!"
	.section	.rodata.str1.1
.LC10:
	.string	"%s: not a regular file\n"
	.text
	.p2align 4
	.type	upload_dir_internal, @function
upload_dir_internal:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, ecx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 88
	.cfi_def_cfa_offset 144
	mov	QWORD PTR 16[rsp], rdi
	mov	DWORD PTR 36[rsp], r8d
	mov	DWORD PTR 40[rsp], r9d
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 72[rsp], rax
	xor	eax, eax
	cmp	DWORD PTR MAX_DIR_DEPTH[rip], ecx
	jle	.L38
	lea	rax, 60[rsp]
	mov	rbx, rsi
	mov	r15, rdx
	mov	rsi, rax
	mov	rdi, rbx
	mov	QWORD PTR 8[rsp], rax
	call	stat@PLT
	mov	DWORD PTR 32[rsp], eax
	cmp	eax, -1
	je	.L39
	mov	edi, DWORD PTR 60[rsp]
	call	S_ISDIR@PLT
	test	rax, rax
	je	.L40
	mov	edi, DWORD PTR 40[rsp]
	test	edi, edi
	jne	.L41
.L6:
	lea	rax, 64[rsp]
	mov	rdi, rax
	mov	rbp, rax
	mov	QWORD PTR 24[rsp], rax
	call	attrib_clear@PLT
	mov	rdi, QWORD PTR 8[rsp]
	mov	rsi, rbp
	call	stat_to_attrib@PLT
	mov	eax, DWORD PTR SSH2_FILEXFER_ATTR_SIZE[rip]
	mov	esi, DWORD PTR 36[rsp]
	or	eax, DWORD PTR SSH2_FILEXFER_ATTR_UIDGID[rip]
	and	DWORD PTR 64[rsp], 1023
	not	eax
	and	eax, DWORD PTR 68[rsp]
	mov	DWORD PTR 68[rsp], eax
	test	esi, esi
	jne	.L7
	mov	edx, DWORD PTR SSH2_FILEXFER_ATTR_ACMODTIME[rip]
	not	edx
	and	eax, edx
	mov	DWORD PTR 68[rsp], eax
.L7:
	mov	rbp, QWORD PTR 16[rsp]
	mov	rdx, QWORD PTR 24[rsp]
	xor	ecx, ecx
	mov	rsi, r15
	mov	rdi, rbp
	call	do_mkdir@PLT
	test	rax, rax
	jne	.L42
.L8:
	mov	rdi, rbx
	call	opendir@PLT
	mov	r13, rax
	test	rax, rax
	je	.L43
	lea	eax, 1[r14]
	mov	DWORD PTR 32[rsp], 0
	xor	r12d, r12d
	xor	ebp, ebp
	mov	DWORD PTR 44[rsp], eax
.L10:
	mov	rdi, r13
	call	readdir@PLT
	mov	r14, rax
	test	rax, rax
	je	.L15
.L45:
	mov	eax, DWORD PTR interrupted[rip]
	test	eax, eax
	jne	.L15
	cmp	QWORD PTR [r14], 0
	je	.L10
	mov	rdi, r12
	call	free@PLT
	mov	rdi, rbp
	call	free@PLT
	mov	r14, QWORD PTR 8[r14]
	mov	rdi, r15
	mov	rsi, r14
	call	path_append@PLT
	mov	rsi, r14
	mov	rdi, rbx
	mov	r12, rax
	call	path_append@PLT
	mov	rsi, QWORD PTR 8[rsp]
	mov	rdi, rax
	mov	rbp, rax
	call	lstat@PLT
	cmp	eax, -1
	je	.L44
	mov	edi, DWORD PTR 60[rsp]
	call	S_ISDIR@PLT
	test	rax, rax
	je	.L13
	lea	rsi, .LC7[rip]
	mov	rdi, r14
	call	strcmp@PLT
	test	rax, rax
	je	.L10
	lea	rsi, .LC8[rip]
	mov	rdi, r14
	call	strcmp@PLT
	test	rax, rax
	je	.L10
	mov	eax, DWORD PTR 152[rsp]
	mov	rdx, r12
	mov	rsi, rbp
	push	rax
	.cfi_def_cfa_offset 152
	mov	eax, DWORD PTR 152[rsp]
	push	rax
	.cfi_def_cfa_offset 160
	mov	r9d, DWORD PTR 56[rsp]
	mov	r8d, DWORD PTR 52[rsp]
	mov	rdi, QWORD PTR 32[rsp]
	mov	ecx, DWORD PTR 60[rsp]
	call	upload_dir_internal
	pop	rdx
	.cfi_def_cfa_offset 152
	pop	rcx
	.cfi_def_cfa_offset 144
	mov	rdi, r13
	cmp	eax, -1
	mov	eax, -1
	cmovne	eax, DWORD PTR 32[rsp]
	mov	DWORD PTR 32[rsp], eax
	call	readdir@PLT
	mov	r14, rax
	test	rax, rax
	jne	.L45
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rdi, r12
	call	free@PLT
	mov	rdi, rbp
	call	free@PLT
	mov	rdi, QWORD PTR 16[rsp]
	mov	rdx, QWORD PTR 24[rsp]
	mov	rsi, r15
	call	do_setstat@PLT
	mov	rdi, r13
	call	closedir@PLT
.L1:
	mov	rax, QWORD PTR 72[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L46
	mov	eax, DWORD PTR 32[rsp]
	add	rsp, 88
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L44:
	.cfi_restore_state
	mov	edi, DWORD PTR errno[rip]
	call	strerror@PLT
	mov	rsi, r14
	lea	rdi, .LC6[rip]
	mov	rdx, rax
	xor	eax, eax
	call	logit@PLT
	mov	DWORD PTR 32[rsp], -1
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L13:
	mov	edi, DWORD PTR 60[rsp]
	call	S_ISREG@PLT
	test	rax, rax
	je	.L14
	mov	ecx, DWORD PTR 36[rsp]
	mov	rdi, QWORD PTR 16[rsp]
	mov	rdx, r12
	mov	rsi, rbp
	mov	r9d, DWORD PTR 152[rsp]
	mov	r8d, DWORD PTR 144[rsp]
	call	do_upload@PLT
	cmp	eax, -1
	jne	.L10
	mov	rdx, r12
	mov	rsi, rbp
	lea	rdi, .LC9[rip]
	xor	eax, eax
	call	error@PLT
	mov	DWORD PTR 32[rsp], -1
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L42:
	xor	edx, edx
	mov	rsi, r15
	mov	rdi, rbp
	call	do_stat@PLT
	test	rax, rax
	je	.L18
	mov	edi, DWORD PTR [rax]
	call	S_ISDIR@PLT
	test	rax, rax
	jne	.L8
	mov	rsi, r15
	lea	rdi, .LC4[rip]
	call	error@PLT
	mov	DWORD PTR 32[rsp], -1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rsi, r14
	lea	rdi, .LC10[rip]
	xor	eax, eax
	call	logit@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L41:
	mov	rsi, rbx
	lea	rdi, .LC3[rip]
	call	mprintf@PLT
	jmp	.L6
.L38:
	mov	esi, ecx
	lea	rdi, .LC0[rip]
	call	error@PLT
	mov	DWORD PTR 32[rsp], -1
	jmp	.L1
.L40:
	mov	rsi, rbx
	lea	rdi, .LC2[rip]
	call	error@PLT
	mov	DWORD PTR 32[rsp], -1
	jmp	.L1
.L39:
	mov	edi, DWORD PTR errno[rip]
	call	strerror@PLT
	mov	rsi, rbx
	lea	rdi, .LC1[rip]
	mov	rdx, rax
	xor	eax, eax
	call	error@PLT
	jmp	.L1
.L18:
	mov	DWORD PTR 32[rsp], -1
	jmp	.L1
.L43:
	mov	edi, DWORD PTR errno[rip]
	call	strerror@PLT
	mov	rsi, rbx
	lea	rdi, .LC5[rip]
	mov	rdx, rax
	xor	eax, eax
	call	error@PLT
	mov	DWORD PTR 32[rsp], -1
	jmp	.L1
.L46:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	upload_dir_internal, .-upload_dir_internal
	.comm	interrupted,4,4
	.comm	errno,4,4
	.comm	SSH2_FILEXFER_ATTR_UIDGID,4,4
	.comm	SSH2_FILEXFER_ATTR_SIZE,4,4
	.comm	SSH2_FILEXFER_ATTR_ACMODTIME,4,4
	.comm	MAX_DIR_DEPTH,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_sftp-client.c_upload_dir_internal.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Maximum directory depth exceeded: %d levels\000"
	.align	2
.LC1:
	.ascii	"Couldn't stat directory \"%s\": %s\000"
	.align	2
.LC2:
	.ascii	"\"%s\" is not a directory\000"
	.align	2
.LC3:
	.ascii	"Entering %s\012\000"
	.align	2
.LC4:
	.ascii	"\"%s\" exists but is not a directory\000"
	.align	2
.LC5:
	.ascii	"Failed to open dir \"%s\": %s\000"
	.align	2
.LC6:
	.ascii	"%s: lstat failed: %s\000"
	.align	2
.LC7:
	.ascii	"Uploading of file %s to %s failed!\000"
	.align	2
.LC8:
	.ascii	"%s: not a regular file\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	upload_dir_internal, %function
upload_dir_internal:
	@ args = 16, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	ip, r3
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #44
	str	r3, [sp, #20]
	ldr	r3, .L54
	ldr	r3, [r3]
	cmp	r3, ip
	ldr	r3, .L54+4
	ldr	r3, [r3]
	str	r3, [sp, #36]
	mov	r3,#0
	ble	.L43
	mov	r10, r1
	mov	r9, r0
	add	r1, sp, #24
	mov	r0, r10
	mov	r8, r2
	bl	stat
	cmn	r0, #1
	str	r0, [sp, #16]
	beq	.L44
	ldr	r0, [sp, #24]
	bl	S_ISDIR
	cmp	r0, #0
	beq	.L45
	ldr	r3, [sp, #84]
	cmp	r3, #0
	bne	.L46
.L6:
	add	r0, sp, #28
	bl	attrib_clear
	add	r1, sp, #28
	add	r0, sp, #24
	bl	stat_to_attrib
	ldr	r3, .L54+8
	ldr	r0, [sp, #80]
	ldr	r1, [r3]
	ldr	r3, [sp, #28]
	ldr	r2, .L54+12
	lsl	r3, r3, #22
	cmp	r0, #0
	lsr	r3, r3, #22
	ldr	r2, [r2]
	str	r3, [sp, #28]
	ldreq	r3, .L54+16
	orr	r1, r2, r1
	ldr	r2, [sp, #32]
	ldreq	r3, [r3]
	bic	r2, r2, r1
	str	r2, [sp, #32]
	biceq	r2, r2, r3
	streq	r2, [sp, #32]
	mov	r3, #0
	mov	r1, r8
	mov	r0, r9
	add	r2, sp, #28
	bl	do_mkdir
	cmp	r0, #0
	bne	.L47
.L8:
	mov	r0, r10
	bl	opendir
	subs	r6, r0, #0
	beq	.L48
	mov	r4, #0
	mov	r5, r4
	ldr	fp, .L54+20
	str	r4, [sp, #16]
.L10:
	mov	r0, r6
	bl	readdir
	subs	r7, r0, #0
	beq	.L17
.L52:
	ldr	r3, [fp]
	cmp	r3, #0
	bne	.L17
	ldr	r3, [r7]
	cmp	r3, #0
	beq	.L10
	mov	r0, r4
	bl	free
	mov	r0, r5
	bl	free
	ldr	r7, [r7, #4]
	mov	r0, r8
	mov	r1, r7
	bl	path_append
	mov	r1, r7
	mov	r4, r0
	mov	r0, r10
	bl	path_append
	add	r1, sp, #24
	mov	r5, r0
	bl	lstat
	cmn	r0, #1
	beq	.L49
	ldr	r0, [sp, #24]
	bl	S_ISDIR
	cmp	r0, #0
	beq	.L13
	ldrb	r3, [r7]	@ zero_extendqisi2
	cmp	r3, #46
	beq	.L50
	ldrb	r3, [r7]	@ zero_extendqisi2
	cmp	r3, #46
	beq	.L51
.L23:
	ldr	r3, [sp, #92]
	mov	r2, r4
	str	r3, [sp, #12]
	ldr	r3, [sp, #88]
	mov	r1, r5
	str	r3, [sp, #8]
	ldr	r3, [sp, #84]
	mov	r0, r9
	str	r3, [sp, #4]
	ldr	r3, [sp, #80]
	str	r3, [sp]
	ldr	r3, [sp, #20]
	add	r3, r3, #1
	bl	upload_dir_internal
	cmn	r0, #1
	ldr	r3, [sp, #16]
	mvneq	r3, #0
	mov	r0, r6
	str	r3, [sp, #16]
	bl	readdir
	subs	r7, r0, #0
	bne	.L52
.L17:
	mov	r0, r4
	bl	free
	mov	r0, r5
	bl	free
	mov	r1, r8
	mov	r0, r9
	add	r2, sp, #28
	bl	do_setstat
	mov	r0, r6
	bl	closedir
.L1:
	ldr	r3, .L54+4
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L53
	ldr	r0, [sp, #16]
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L49:
	ldr	r3, .L54+24
	str	r0, [sp, #16]
	ldr	r0, [r3]
	bl	strerror
	mov	r1, r7
	mov	r2, r0
	ldr	r0, .L54+28
	bl	logit
	b	.L10
.L47:
	mov	r2, #0
	mov	r1, r8
	mov	r0, r9
	bl	do_stat
	cmp	r0, #0
	beq	.L20
	ldr	r0, [r0]
	bl	S_ISDIR
	cmp	r0, #0
	bne	.L8
	mov	r1, r8
	ldr	r0, .L54+32
	bl	error
	mvn	r3, #0
	str	r3, [sp, #16]
	b	.L1
.L50:
	ldrb	r3, [r7, #1]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L10
	ldrb	r3, [r7]	@ zero_extendqisi2
	cmp	r3, #46
	bne	.L23
.L51:
	ldrb	r3, [r7, #1]	@ zero_extendqisi2
	cmp	r3, #46
	bne	.L23
	ldrb	r3, [r7, #2]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L10
	b	.L23
.L13:
	ldr	r0, [sp, #24]
	bl	S_ISREG
	cmp	r0, #0
	beq	.L16
	ldr	r3, [sp, #92]
	mov	r2, r4
	str	r3, [sp, #4]
	ldr	r3, [sp, #88]
	mov	r1, r5
	str	r3, [sp]
	mov	r0, r9
	ldr	r3, [sp, #80]
	bl	do_upload
	cmn	r0, #1
	mov	r3, r0
	bne	.L10
	mov	r2, r4
	mov	r1, r5
	ldr	r0, .L54+36
	str	r3, [sp, #16]
	bl	error
	b	.L10
.L46:
	mov	r1, r10
	ldr	r0, .L54+40
	bl	mprintf
	b	.L6
.L16:
	mov	r1, r7
	ldr	r0, .L54+44
	bl	logit
	b	.L10
.L43:
	mov	r1, ip
	ldr	r0, .L54+48
	bl	error
	mvn	r3, #0
	str	r3, [sp, #16]
	b	.L1
.L45:
	mov	r1, r10
	ldr	r0, .L54+52
	bl	error
	mvn	r3, #0
	str	r3, [sp, #16]
	b	.L1
.L44:
	ldr	r3, .L54+24
	ldr	r0, [r3]
	bl	strerror
	mov	r1, r10
	mov	r2, r0
	ldr	r0, .L54+56
	bl	error
	b	.L1
.L20:
	mvn	r3, #0
	str	r3, [sp, #16]
	b	.L1
.L48:
	mvn	r2, #0
	ldr	r3, .L54+24
	str	r2, [sp, #16]
	ldr	r0, [r3]
	bl	strerror
	mov	r1, r10
	mov	r2, r0
	ldr	r0, .L54+60
	bl	error
	b	.L1
.L53:
	bl	__stack_chk_fail
.L55:
	.align	2
.L54:
	.word	MAX_DIR_DEPTH
	.word	.LC9
	.word	SSH2_FILEXFER_ATTR_UIDGID
	.word	SSH2_FILEXFER_ATTR_SIZE
	.word	SSH2_FILEXFER_ATTR_ACMODTIME
	.word	interrupted
	.word	errno
	.word	.LC6
	.word	.LC4
	.word	.LC7
	.word	.LC3
	.word	.LC8
	.word	.LC0
	.word	.LC2
	.word	.LC1
	.word	.LC5
	.size	upload_dir_internal, .-upload_dir_internal
	.comm	interrupted,4,4
	.comm	errno,4,4
	.comm	SSH2_FILEXFER_ATTR_UIDGID,4,4
	.comm	SSH2_FILEXFER_ATTR_SIZE,4,4
	.comm	SSH2_FILEXFER_ATTR_ACMODTIME,4,4
	.comm	MAX_DIR_DEPTH,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
