	.file	"146086.c"
	.intel_syntax noprefix
	.text
	.globl	fromlen
	.bss
	.align 8
	.type	fromlen, @object
	.size	fromlen, 8
fromlen:
	.zero	8
	.globl	destlen
	.align 8
	.type	destlen, @object
	.size	destlen, 8
destlen:
	.zero	8
	.globl	sufflen
	.align 8
	.type	sufflen, @object
	.size	sufflen, 8
sufflen:
	.zero	8
	.globl	from
	.section	.rodata
.LC0:
	.string	"/home/morgan/work/../work/dir"
	.section	.data.rel.local,"aw"
	.align 8
	.type	from, @object
	.size	from, 8
from:
	.quad	.LC0
	.globl	dest
	.section	.rodata
.LC1:
	.string	"/home/morgan/work/here"
	.section	.data.rel.local
	.align 8
	.type	dest, @object
	.size	dest, 8
dest:
	.quad	.LC1
	.globl	suff
	.section	.rodata
.LC2:
	.string	".c"
	.section	.data.rel.local
	.align 8
	.type	suff, @object
	.size	suff, 8
suff:
	.quad	.LC2
	.text
	.globl	nendswith
	.type	nendswith, @function
nendswith:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	QWORD PTR -24[rbp], rdx
	mov	QWORD PTR -32[rbp], rcx
	cmp	QWORD PTR -8[rbp], 0
	jne	.L2
	mov	eax, -1
	jmp	.L3
.L2:
	cmp	QWORD PTR -16[rbp], 0
	jne	.L4
	mov	eax, -2
	jmp	.L3
.L4:
	mov	rax, QWORD PTR -32[rbp]
	cmp	rax, QWORD PTR -24[rbp]
	jbe	.L5
	mov	eax, 2
	jmp	.L3
.L5:
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, QWORD PTR -32[rbp]
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	lea	rcx, [rdx+rax]
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	mov	rdi, rcx
	call	strncmp@PLT
	test	eax, eax
	setg	al
	movzx	eax, al
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	nendswith, .-nendswith
	.globl	work
	.type	work, @function
work:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 96
	mov	QWORD PTR -72[rbp], rdi
	mov	QWORD PTR -80[rbp], rsi
	mov	DWORD PTR -84[rbp], edx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rdx, QWORD PTR fromlen[rip]
	mov	rax, QWORD PTR -72[rbp]
	add	rax, rdx
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, QWORD PTR destlen[rip]
	add	rax, rdx
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	rdx, QWORD PTR dest[rip]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rdx, QWORD PTR fromlen[rip]
	mov	rax, QWORD PTR -72[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
	cmp	DWORD PTR -84[rbp], 1
	jne	.L7
	mov	rax, QWORD PTR -80[rbp]
	mov	edx, DWORD PTR 24[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	mkdir@PLT
.L7:
	cmp	DWORD PTR -84[rbp], 0
	jne	.L8
	mov	rcx, QWORD PTR sufflen[rip]
	mov	rsi, QWORD PTR suff[rip]
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	nendswith
	test	eax, eax
	jne	.L8
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR 48[rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -72[rbp]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -48[rbp], eax
	mov	rax, QWORD PTR -80[rbp]
	mov	edx, DWORD PTR 24[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	creat@PLT
	mov	DWORD PTR -44[rbp], eax
	mov	QWORD PTR -40[rbp], 0
	jmp	.L9
.L10:
	lea	rcx, -49[rbp]
	mov	eax, DWORD PTR -48[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	lea	rcx, -49[rbp]
	mov	eax, DWORD PTR -44[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	add	QWORD PTR -40[rbp], 1
.L9:
	mov	rax, QWORD PTR -40[rbp]
	cmp	rax, QWORD PTR -16[rbp]
	jl	.L10
	mov	eax, DWORD PTR -48[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -44[rbp]
	mov	edi, eax
	call	close@PLT
.L8:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	work, .-work
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR from[rip]
	mov	rdi, rax
	call	strlen@PLT
	mov	QWORD PTR fromlen[rip], rax
	mov	rax, QWORD PTR dest[rip]
	mov	rdi, rax
	call	strlen@PLT
	mov	QWORD PTR destlen[rip], rax
	mov	rax, QWORD PTR suff[rip]
	mov	rdi, rax
	call	strlen@PLT
	mov	QWORD PTR sufflen[rip], rax
	mov	rax, QWORD PTR from[rip]
	mov	edx, 100
	lea	rsi, work[rip]
	mov	rdi, rax
	call	ftw@PLT
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"146086.c"
	.text
	.comm	fromlen,4,4
	.comm	destlen,4,4
	.comm	sufflen,4,4
	.global	from
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/home/morgan/work/../work/dir\000"
	.data
	.align	2
	.type	from, %object
	.size	from, 4
from:
	.word	.LC0
	.global	dest
	.section	.rodata
	.align	2
.LC1:
	.ascii	"/home/morgan/work/here\000"
	.data
	.align	2
	.type	dest, %object
	.size	dest, 4
dest:
	.word	.LC1
	.global	suff
	.section	.rodata
	.align	2
.LC2:
	.ascii	".c\000"
	.data
	.align	2
	.type	suff, %object
	.size	suff, 4
suff:
	.word	.LC2
	.text
	.align	2
	.global	nendswith
	.syntax unified
	.arm
	.fpu softvfp
	.type	nendswith, %function
nendswith:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L2
	mvn	r3, #0
	b	.L3
.L2:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L4
	mvn	r3, #1
	b	.L3
.L4:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	bls	.L5
	mov	r3, #2
	b	.L3
.L5:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-20]
	sub	r3, r2, r3
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	movgt	r3, #1
	movle	r3, #0
	and	r3, r3, #255
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	nendswith, .-nendswith
	.section	.rodata
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	work
	.syntax unified
	.arm
	.fpu softvfp
	.type	work, %function
work:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #64
	str	r0, [fp, #-64]
	str	r1, [fp, #-68]
	str	r2, [fp, #-72]
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, .L13+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-64]
	add	r3, r2, r3
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	ldr	r3, .L13+8
	ldr	r3, [r3]
	add	r3, r2, r3
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-52]
	add	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-48]
	ldr	r3, .L13+12
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-48]
	bl	strcpy
	ldr	r3, .L13+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-64]
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, [fp, #-48]
	bl	strcat
	ldr	r3, [fp, #-72]
	cmp	r3, #1
	bne	.L7
	ldr	r3, [fp, #-68]
	ldr	r3, [r3, #16]
	mov	r1, r3
	ldr	r0, [fp, #-48]
	bl	mkdir
.L7:
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	bne	.L8
	ldr	r3, .L13+16
	ldr	r1, [r3]
	ldr	r3, .L13+20
	ldr	r3, [r3]
	ldr	r2, [fp, #-52]
	ldr	r0, [fp, #-48]
	bl	nendswith
	mov	r3, r0
	cmp	r3, #0
	bne	.L8
	ldr	r3, [fp, #-68]
	ldr	r3, [r3, #44]
	mov	r2, r3
	asr	r3, r2, #31
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	mov	r1, #0
	ldr	r0, [fp, #-64]
	bl	open
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-68]
	ldr	r3, [r3, #16]
	mov	r1, r3
	ldr	r0, [fp, #-48]
	bl	creat
	str	r0, [fp, #-40]
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	b	.L9
.L10:
	sub	r3, fp, #53
	mov	r2, #1
	mov	r1, r3
	ldr	r0, [fp, #-44]
	bl	read
	sub	r3, fp, #53
	mov	r2, #1
	mov	r1, r3
	ldr	r0, [fp, #-40]
	bl	write
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	adds	r4, r2, #1
	adc	r5, r3, #0
	str	r4, [fp, #-36]
	str	r5, [fp, #-32]
.L9:
	sub	r1, fp, #36
	ldmia	r1, {r0-r1}
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	cmp	r0, r2
	sbcs	r3, r1, r3
	blt	.L10
	ldr	r0, [fp, #-44]
	bl	close
	ldr	r0, [fp, #-40]
	bl	close
.L8:
	ldr	r0, [fp, #-48]
	bl	free
	mov	r3, #0
	ldr	r2, .L13
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC3
	.word	fromlen
	.word	destlen
	.word	dest
	.word	suff
	.word	sufflen
	.size	work, .-work
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L17
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	ldr	r2, .L17+4
	str	r3, [r2]
	ldr	r3, .L17+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	ldr	r2, .L17+12
	str	r3, [r2]
	ldr	r3, .L17+16
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	ldr	r2, .L17+20
	str	r3, [r2]
	ldr	r3, .L17
	ldr	r3, [r3]
	mov	r2, #100
	ldr	r1, .L17+24
	mov	r0, r3
	bl	ftw
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	from
	.word	fromlen
	.word	dest
	.word	destlen
	.word	suff
	.word	sufflen
	.word	work
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
