	.file	"308473.c"
	.intel_syntax noprefix
	.text
	.globl	tLock
	.bss
	.align 32
	.type	tLock, @object
	.size	tLock, 32
tLock:
	.zero	32
	.globl	fileCount
	.align 4
	.type	fileCount, @object
	.size	fileCount, 4
fileCount:
	.zero	4
	.globl	locks
	.align 32
	.type	locks, @object
	.size	locks, 168000
locks:
	.zero	168000
	.section	.rodata
.LC0:
	.string	"Started file-server"
	.align 8
.LC1:
	.string	"Usage: file_name port_number(8000-9000)\n"
.LC2:
	.string	"socket() failed"
.LC3:
	.string	"bind() failed"
.LC4:
	.string	"Listening on Port %d\n"
.LC5:
	.string	".storage"
.LC6:
	.string	"mkdir() failed "
.LC7:
	.string	"Directory '.storage' created."
	.align 8
.LC8:
	.string	"Directory '.storage' already exists."
	.align 8
.LC9:
	.string	"Received incoming connection from %s\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 336
	mov	DWORD PTR -324[rbp], edi
	mov	QWORD PTR -336[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	rdx, QWORD PTR -336[rbp]
	mov	eax, DWORD PTR -324[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	read_cli
	mov	DWORD PTR -308[rbp], eax
	cmp	DWORD PTR -308[rbp], 0
	jns	.L2
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 40
	mov	esi, 1
	lea	rdi, .LC1[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	eax, DWORD PTR -308[rbp]
	mov	WORD PTR -318[rbp], ax
	mov	edx, 1
	mov	esi, 0
	lea	rdi, tLock[rip]
	call	sem_init@PLT
	mov	DWORD PTR fileCount[rip], 0
	lea	rdi, tLock[rip]
	call	sem_wait@PLT
	call	lock_init
	lea	rdi, tLock[rip]
	call	sem_post@PLT
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -304[rbp], eax
	cmp	DWORD PTR -304[rbp], 0
	jns	.L3
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	WORD PTR -288[rbp], 2
	mov	DWORD PTR -284[rbp], 0
	movzx	eax, WORD PTR -318[rbp]
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -286[rbp], ax
	mov	DWORD PTR -300[rbp], 16
	mov	edx, DWORD PTR -300[rbp]
	lea	rcx, -288[rbp]
	mov	eax, DWORD PTR -304[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jns	.L4
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	mov	eax, DWORD PTR -304[rbp]
	mov	esi, 20
	mov	edi, eax
	call	listen@PLT
	movzx	eax, WORD PTR -318[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -316[rbp], 16
	lea	rdi, .LC5[rip]
	call	check_dir
	cmp	eax, 1
	jne	.L5
	mov	esi, 508
	lea	rdi, .LC5[rip]
	call	mkdir@PLT
	mov	DWORD PTR -296[rbp], eax
	cmp	DWORD PTR -296[rbp], 0
	je	.L6
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	lea	rdi, .LC7[rip]
	call	puts@PLT
	jmp	.L7
.L5:
	lea	rdi, .LC8[rip]
	call	puts@PLT
	call	fill_locks
.L7:
	mov	DWORD PTR -312[rbp], 0
	jmp	.L8
.L9:
	mov	eax, DWORD PTR -312[rbp]
	cdqe
	mov	DWORD PTR -256[rbp+rax*4], -1
	lea	rdx, -256[rbp]
	mov	eax, DWORD PTR -312[rbp]
	cdqe
	sal	rax, 2
	add	rdx, rax
	lea	rcx, -176[rbp]
	mov	eax, DWORD PTR -312[rbp]
	cdqe
	sal	rax, 3
	add	rax, rcx
	mov	rcx, rdx
	lea	rdx, start_routine[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	add	DWORD PTR -312[rbp], 1
.L8:
	cmp	DWORD PTR -312[rbp], 19
	jle	.L9
	mov	DWORD PTR -312[rbp], 0
.L16:
	lea	rdx, -316[rbp]
	lea	rcx, -272[rbp]
	mov	eax, DWORD PTR -304[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -292[rbp], eax
	mov	eax, DWORD PTR -268[rbp]
	mov	edi, eax
	call	inet_ntoa@PLT
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	cmp	DWORD PTR -312[rbp], 19
	jne	.L11
	mov	DWORD PTR -312[rbp], 0
	jmp	.L11
.L15:
	cmp	DWORD PTR -312[rbp], 19
	jne	.L12
	mov	DWORD PTR -312[rbp], 0
.L12:
	mov	eax, DWORD PTR -312[rbp]
	cdqe
	mov	eax, DWORD PTR -256[rbp+rax*4]
	cmp	eax, -1
	jne	.L13
	mov	eax, DWORD PTR -312[rbp]
	cdqe
	mov	edx, DWORD PTR -292[rbp]
	mov	DWORD PTR -256[rbp+rax*4], edx
	jmp	.L14
.L13:
	add	DWORD PTR -312[rbp], 1
.L11:
	cmp	DWORD PTR -312[rbp], 19
	jle	.L15
.L14:
	jmp	.L16
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	read_cli
	.type	read_cli, @function
read_cli:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	cmp	DWORD PTR -20[rbp], 2
	je	.L19
	mov	eax, -1
	jmp	.L20
.L19:
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	movzx	eax, ax
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 7999
	jle	.L21
	cmp	DWORD PTR -4[rbp], 9000
	jle	.L22
.L21:
	mov	eax, -1
	jmp	.L20
.L22:
	mov	eax, DWORD PTR -4[rbp]
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	read_cli, .-read_cli
	.globl	lock_init
	.type	lock_init, @function
lock_init:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], 0
	jmp	.L24
.L25:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	lea	rdx, locks[rip]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	lea	rax, locks[rip+100]
	mov	BYTE PTR [rdx+rax], 48
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	lea	rdx, 96[rax]
	lea	rax, locks[rip]
	add	rax, rdx
	add	rax, 8
	mov	edx, 20
	mov	esi, 0
	mov	rdi, rax
	call	sem_init@PLT
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	lea	rdx, 128[rax]
	lea	rax, locks[rip]
	add	rax, rdx
	add	rax, 8
	mov	edx, 1
	mov	esi, 0
	mov	rdi, rax
	call	sem_init@PLT
	add	DWORD PTR -4[rbp], 1
.L24:
	cmp	DWORD PTR -4[rbp], 999
	jle	.L25
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	lock_init, .-lock_init
	.section	.rodata
.LC10:
	.string	"readdir_r() error"
	.text
	.globl	fill_locks
	.type	fill_locks, @function
fill_locks:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 320
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -304[rbp], 0
	lea	rdi, .LC5[rip]
	call	opendir@PLT
	mov	QWORD PTR -296[rbp], rax
	cmp	QWORD PTR -296[rbp], 0
	je	.L26
.L31:
	lea	rdx, -304[rbp]
	lea	rcx, -288[rbp]
	mov	rax, QWORD PTR -296[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	readdir_r@PLT
	mov	DWORD PTR -308[rbp], eax
	cmp	DWORD PTR -308[rbp], 0
	je	.L28
	lea	rdi, .LC10[rip]
	call	perror@PLT
	jmp	.L26
.L28:
	movzx	eax, BYTE PTR -270[rbp]
	movzx	eax, al
	and	eax, 8
	test	eax, eax
	je	.L30
	lea	rdi, tLock[rip]
	call	sem_wait@PLT
	mov	eax, DWORD PTR fileCount[rip]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	lea	rdx, locks[rip]
	add	rax, rdx
	lea	rdx, -288[rbp]
	add	rdx, 19
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	eax, DWORD PTR fileCount[rip]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	lea	rax, locks[rip+100]
	mov	BYTE PTR [rdx+rax], 49
	lea	rdi, tLock[rip]
	call	sem_post@PLT
	mov	eax, DWORD PTR fileCount[rip]
	add	eax, 1
	mov	DWORD PTR fileCount[rip], eax
.L30:
	mov	rax, QWORD PTR -304[rbp]
	test	rax, rax
	jne	.L31
.L26:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	fill_locks, .-fill_locks
	.globl	check_lstat
	.type	check_lstat, @function
check_lstat:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 192
	mov	QWORD PTR -184[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdx, -160[rbp]
	mov	rax, QWORD PTR -184[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	lstat@PLT
	mov	DWORD PTR -164[rbp], eax
	cmp	DWORD PTR -164[rbp], 0
	jne	.L34
	mov	eax, DWORD PTR -136[rbp]
	and	eax, 61440
	cmp	eax, 32768
	jne	.L34
	mov	eax, 0
	jmp	.L36
.L34:
	mov	eax, 1
.L36:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L37
	call	__stack_chk_fail@PLT
.L37:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	check_lstat, .-check_lstat
	.globl	check_dir
	.type	check_dir, @function
check_dir:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 192
	mov	QWORD PTR -184[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdx, -160[rbp]
	mov	rax, QWORD PTR -184[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	lstat@PLT
	mov	DWORD PTR -164[rbp], eax
	cmp	DWORD PTR -164[rbp], 0
	jne	.L39
	mov	eax, DWORD PTR -136[rbp]
	and	eax, 61440
	cmp	eax, 16384
	jne	.L39
	mov	eax, 0
	jmp	.L41
.L39:
	mov	eax, 1
.L41:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L42
	call	__stack_chk_fail@PLT
.L42:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	check_dir, .-check_dir
	.section	.rodata
.LC11:
	.string	"recv() failed"
	.align 8
.LC12:
	.string	"[thread %u] Client closed its socket....terminating\n"
.LC13:
	.string	" \n"
.LC14:
	.string	"LIST"
	.string	""
.LC15:
	.string	"[thread %u] Rcvd: %s\n"
.LC16:
	.string	"DELETE"
	.string	""
.LC17:
	.string	"\n"
.LC18:
	.string	"[thread %u] Rcvd: %s %s\n"
.LC19:
	.string	"READ"
	.string	""
.LC20:
	.string	"ADD"
	.string	""
.LC21:
	.string	"APPEND"
	.string	""
.LC22:
	.string	" "
.LC23:
	.string	"[thread %u] Rcvd: %s %s %d\n"
	.align 8
.LC24:
	.string	"[thread %u] SENT: ERROR: INVALID COMMAND\n"
.LC25:
	.string	"ERROR: INVALID COMMAND\n"
.LC26:
	.string	"send() failed"
	.text
	.globl	start_routine
	.type	start_routine, @function
start_routine:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 104
	.cfi_offset 3, -24
	mov	QWORD PTR -104[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	edi, 5000000
	call	malloc@PLT
	mov	QWORD PTR -80[rbp], rax
	mov	edi, 5000000
	call	malloc@PLT
	mov	QWORD PTR -72[rbp], rax
	mov	edi, 5000000
	call	malloc@PLT
	mov	QWORD PTR -64[rbp], rax
	mov	edi, 5000000
	call	malloc@PLT
	mov	QWORD PTR -56[rbp], rax
	mov	edi, 5000000
	call	malloc@PLT
	mov	QWORD PTR -48[rbp], rax
	mov	edi, 5000000
	call	malloc@PLT
	mov	QWORD PTR -40[rbp], rax
.L57:
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -96[rbp], eax
	mov	eax, DWORD PTR -96[rbp]
	cmp	eax, -1
	je	.L60
.L44:
	mov	rax, QWORD PTR -80[rbp]
	mov	edx, 5000000
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rax, QWORD PTR -72[rbp]
	mov	edx, 5000000
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, 5000000
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, 5000000
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rax, QWORD PTR -48[rbp]
	mov	edx, 5000000
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, 5000000
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	eax, DWORD PTR -96[rbp]
	mov	rsi, QWORD PTR -48[rbp]
	mov	ecx, 0
	mov	edx, 5000000
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -88[rbp], eax
	cmp	DWORD PTR -88[rbp], 0
	jns	.L46
	lea	rdi, .LC11[rip]
	call	perror@PLT
	mov	eax, 0
	jmp	.L58
.L46:
	cmp	DWORD PTR -88[rbp], 0
	jne	.L48
	call	pthread_self@PLT
	mov	esi, eax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L49
.L48:
	mov	rdx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -40[rbp]
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	call	strtok@PLT
	mov	QWORD PTR -80[rbp], rax
	mov	rax, QWORD PTR -80[rbp]
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L50
	call	pthread_self@PLT
	mov	ecx, eax
	mov	rax, QWORD PTR -80[rbp]
	mov	rdx, rax
	mov	esi, ecx
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -96[rbp]
	mov	rdi, rax
	call	exec_LIST
	jmp	.L49
.L50:
	mov	rax, QWORD PTR -80[rbp]
	lea	rsi, .LC16[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L51
	lea	rsi, .LC17[rip]
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR -72[rbp], rax
	call	pthread_self@PLT
	mov	esi, eax
	mov	rdx, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR -80[rbp]
	mov	rcx, rdx
	mov	rdx, rax
	lea	rdi, .LC18[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR -72[rbp]
	lea	rax, -96[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	exec_DELETE
	jmp	.L49
.L51:
	mov	rax, QWORD PTR -80[rbp]
	lea	rsi, .LC19[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L52
	lea	rsi, .LC17[rip]
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR -72[rbp], rax
	call	pthread_self@PLT
	mov	esi, eax
	mov	rdx, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR -80[rbp]
	mov	rcx, rdx
	mov	rdx, rax
	lea	rdi, .LC18[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR -72[rbp]
	lea	rax, -96[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	exec_READ
	jmp	.L49
.L52:
	mov	rax, QWORD PTR -80[rbp]
	lea	rsi, .LC20[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L53
	mov	rax, QWORD PTR -80[rbp]
	lea	rsi, .LC21[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L54
.L53:
	lea	rsi, .LC22[rip]
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR -72[rbp], rax
	lea	rsi, .LC17[rip]
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR -64[rbp], rax
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -92[rbp], eax
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	mov	QWORD PTR -56[rbp], rax
	mov	rax, QWORD PTR -80[rbp]
	lea	rsi, .LC20[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L55
	mov	ebx, DWORD PTR -92[rbp]
	call	pthread_self@PLT
	mov	esi, eax
	mov	rdx, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR -80[rbp]
	mov	r8d, ebx
	mov	rcx, rdx
	mov	rdx, rax
	lea	rdi, .LC23[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rcx, QWORD PTR -56[rbp]
	lea	rdx, -92[rbp]
	mov	rsi, QWORD PTR -72[rbp]
	lea	rax, -96[rbp]
	mov	rdi, rax
	call	exec_ADD
	jmp	.L49
.L55:
	mov	ebx, DWORD PTR -92[rbp]
	call	pthread_self@PLT
	mov	esi, eax
	mov	rdx, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR -80[rbp]
	mov	r8d, ebx
	mov	rcx, rdx
	mov	rdx, rax
	lea	rdi, .LC23[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rcx, QWORD PTR -56[rbp]
	lea	rdx, -92[rbp]
	mov	rsi, QWORD PTR -72[rbp]
	lea	rax, -96[rbp]
	mov	rdi, rax
	call	exec_APPEND
	jmp	.L49
.L54:
	call	pthread_self@PLT
	mov	ecx, eax
	mov	rax, QWORD PTR -80[rbp]
	mov	rdx, rax
	mov	esi, ecx
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	call	pthread_self@PLT
	mov	esi, eax
	lea	rdi, .LC24[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, .LC25[rip]
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	eax, DWORD PTR -96[rbp]
	mov	rsi, QWORD PTR -32[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -84[rbp], eax
	mov	edi, 0
	call	fflush@PLT
	mov	eax, DWORD PTR -84[rbp]
	movsx	rbx, eax
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rbx, rax
	je	.L49
	lea	rdi, .LC26[rip]
	call	perror@PLT
	mov	eax, 0
	jmp	.L58
.L49:
	cmp	DWORD PTR -88[rbp], 0
	jg	.L44
	mov	eax, DWORD PTR -96[rbp]
	mov	edi, eax
	call	close@PLT
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR [rax], -1
	jmp	.L57
.L60:
	nop
	jmp	.L57
.L58:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L59
	call	__stack_chk_fail@PLT
.L59:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	start_routine, .-start_routine
	.section	.rodata
.LC27:
	.string	"0\n"
.LC28:
	.string	"%d"
.LC29:
	.string	"[thread %u] SENT: %d\n"
.LC30:
	.string	"opendir()  error"
.LC31:
	.string	"[thread %u] SENT: %s\n"
	.text
	.globl	exec_LIST
	.type	exec_LIST, @function
exec_LIST:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 360
	.cfi_offset 3, -24
	mov	QWORD PTR -360[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -336[rbp], 0
	mov	DWORD PTR -348[rbp], 0
	lea	rdi, .LC5[rip]
	call	opendir@PLT
	mov	QWORD PTR -328[rbp], rax
	cmp	QWORD PTR -328[rbp], 0
	je	.L62
	lea	rdx, -336[rbp]
	lea	rcx, -320[rbp]
	mov	rax, QWORD PTR -328[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	readdir_r@PLT
	mov	DWORD PTR -344[rbp], eax
	cmp	DWORD PTR -344[rbp], 0
	jne	.L63
.L73:
	movzx	eax, BYTE PTR -302[rbp]
	movzx	eax, al
	and	eax, 8
	test	eax, eax
	je	.L64
	add	DWORD PTR -348[rbp], 1
.L64:
	lea	rdx, -336[rbp]
	lea	rcx, -320[rbp]
	mov	rax, QWORD PTR -328[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	readdir_r@PLT
	mov	DWORD PTR -344[rbp], eax
	cmp	DWORD PTR -344[rbp], 0
	je	.L65
	lea	rdi, .LC10[rip]
	call	perror@PLT
	jmp	.L61
.L65:
	cmp	DWORD PTR -348[rbp], 0
	jne	.L67
	mov	rax, QWORD PTR -336[rbp]
	test	rax, rax
	jne	.L67
	mov	rax, QWORD PTR -360[rbp]
	mov	eax, DWORD PTR [rax]
	mov	ecx, 0
	mov	edx, 2
	lea	rsi, .LC27[rip]
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -340[rbp], eax
	mov	edi, 0
	call	fflush@PLT
	cmp	DWORD PTR -340[rbp], 2
	je	.L83
	lea	rdi, .LC26[rip]
	call	perror@PLT
	jmp	.L61
.L67:
	mov	rax, QWORD PTR -336[rbp]
	test	rax, rax
	jne	.L69
	mov	edx, DWORD PTR -348[rbp]
	lea	rax, -39[rbp]
	lea	rsi, .LC28[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -39[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -360[rbp]
	mov	eax, DWORD PTR [rax]
	lea	rsi, -39[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -340[rbp], eax
	mov	edi, 0
	call	fflush@PLT
	mov	eax, DWORD PTR -340[rbp]
	movsx	rbx, eax
	lea	rax, -39[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rbx, rax
	je	.L70
	lea	rdi, .LC26[rip]
	call	perror@PLT
	jmp	.L61
.L70:
	mov	rax, QWORD PTR -360[rbp]
	mov	eax, DWORD PTR [rax]
	mov	ecx, 0
	mov	edx, 1
	lea	rsi, .LC17[rip]
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -340[rbp], eax
	mov	edi, 0
	call	fflush@PLT
	cmp	DWORD PTR -340[rbp], 1
	je	.L72
	lea	rdi, .LC26[rip]
	call	perror@PLT
	jmp	.L61
.L72:
	call	pthread_self@PLT
	mov	ecx, eax
	mov	eax, DWORD PTR -348[rbp]
	mov	edx, eax
	mov	esi, ecx
	lea	rdi, .LC29[rip]
	mov	eax, 0
	call	printf@PLT
.L69:
	mov	rax, QWORD PTR -336[rbp]
	test	rax, rax
	jne	.L73
	mov	rax, QWORD PTR -328[rbp]
	mov	rdi, rax
	call	closedir@PLT
	jmp	.L63
.L62:
	lea	rdi, .LC30[rip]
	call	perror@PLT
	jmp	.L61
.L63:
	lea	rdi, .LC5[rip]
	call	opendir@PLT
	mov	QWORD PTR -328[rbp], rax
	cmp	QWORD PTR -328[rbp], 0
	je	.L74
	lea	rdx, -336[rbp]
	lea	rcx, -320[rbp]
	mov	rax, QWORD PTR -328[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	readdir_r@PLT
	mov	DWORD PTR -344[rbp], eax
	cmp	DWORD PTR -344[rbp], 0
	jne	.L61
.L80:
	movzx	eax, BYTE PTR -302[rbp]
	movzx	eax, al
	and	eax, 8
	test	eax, eax
	je	.L76
	lea	rax, -320[rbp]
	add	rax, 19
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -360[rbp]
	mov	eax, DWORD PTR [rax]
	lea	rcx, -320[rbp]
	lea	rsi, 19[rcx]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -340[rbp], eax
	mov	edi, 0
	call	fflush@PLT
	mov	eax, DWORD PTR -340[rbp]
	movsx	rbx, eax
	lea	rax, -320[rbp]
	add	rax, 19
	mov	rdi, rax
	call	strlen@PLT
	cmp	rbx, rax
	je	.L77
	lea	rdi, .LC26[rip]
	call	perror@PLT
	jmp	.L61
.L77:
	mov	rax, QWORD PTR -360[rbp]
	mov	eax, DWORD PTR [rax]
	mov	ecx, 0
	mov	edx, 1
	lea	rsi, .LC17[rip]
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -340[rbp], eax
	mov	edi, 0
	call	fflush@PLT
	cmp	DWORD PTR -340[rbp], 1
	je	.L78
	lea	rdi, .LC26[rip]
	call	perror@PLT
	jmp	.L61
.L78:
	call	pthread_self@PLT
	mov	ecx, eax
	lea	rax, -320[rbp]
	add	rax, 19
	mov	rdx, rax
	mov	esi, ecx
	lea	rdi, .LC31[rip]
	mov	eax, 0
	call	printf@PLT
.L76:
	lea	rdx, -336[rbp]
	lea	rcx, -320[rbp]
	mov	rax, QWORD PTR -328[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	readdir_r@PLT
	mov	DWORD PTR -344[rbp], eax
	cmp	DWORD PTR -344[rbp], 0
	je	.L79
	lea	rdi, .LC10[rip]
	call	perror@PLT
	jmp	.L61
.L79:
	mov	rax, QWORD PTR -336[rbp]
	test	rax, rax
	jne	.L80
	mov	rax, QWORD PTR -328[rbp]
	mov	rdi, rax
	call	closedir@PLT
	jmp	.L61
.L74:
	lea	rdi, .LC30[rip]
	call	perror@PLT
	jmp	.L61
.L83:
	nop
.L61:
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L82
	call	__stack_chk_fail@PLT
.L82:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	exec_LIST, .-exec_LIST
	.section	.rodata
.LC32:
	.string	".storage/"
.LC33:
	.string	"ACK "
.LC34:
	.string	"[thread %u] SENT: ACK %s\n"
.LC35:
	.string	"r"
	.align 8
.LC36:
	.string	"[thread %u] SENT: Transferred file (%d bytes)\n"
.LC37:
	.string	"ERROR: NO SUCH FILE\n"
.LC38:
	.string	"[thread %u] SENT: %s"
	.text
	.globl	exec_READ
	.type	exec_READ, @function
exec_READ:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 280
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	QWORD PTR -312[rbp], rdi
	mov	QWORD PTR -320[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	lea	rax, .LC32[rip]
	mov	QWORD PTR -272[rbp], rax
	mov	rax, QWORD PTR -272[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rbx, rax
	mov	rax, QWORD PTR -320[rbp]
	mov	rdi, rax
	call	strlen@PLT
	add	rax, rbx
	add	rax, 1
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -264[rbp], rax
	mov	rax, QWORD PTR -272[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rbx, rax
	mov	rax, QWORD PTR -320[rbp]
	mov	rdi, rax
	call	strlen@PLT
	add	rax, rbx
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -264[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rdx, QWORD PTR -272[rbp]
	mov	rax, QWORD PTR -264[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rdx, QWORD PTR -320[rbp]
	mov	rax, QWORD PTR -264[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
	lea	rdx, -224[rbp]
	mov	rax, QWORD PTR -264[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	lstat@PLT
	mov	DWORD PTR -288[rbp], eax
	cmp	DWORD PTR -288[rbp], 0
	jne	.L85
	mov	eax, DWORD PTR -200[rbp]
	and	eax, 61440
	cmp	eax, 32768
	jne	.L85
	mov	rax, QWORD PTR -312[rbp]
	mov	eax, DWORD PTR [rax]
	mov	ecx, 0
	mov	edx, 4
	lea	rsi, .LC33[rip]
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -284[rbp], eax
	mov	edi, 0
	call	fflush@PLT
	cmp	DWORD PTR -284[rbp], 4
	je	.L86
	lea	rdi, .LC26[rip]
	call	perror@PLT
	jmp	.L84
.L86:
	mov	rax, QWORD PTR -176[rbp]
	mov	DWORD PTR -280[rbp], eax
	mov	edx, DWORD PTR -280[rbp]
	lea	rax, -71[rbp]
	lea	rsi, .LC28[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -71[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -312[rbp]
	mov	eax, DWORD PTR [rax]
	lea	rsi, -71[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -284[rbp], eax
	mov	edi, 0
	call	fflush@PLT
	mov	eax, DWORD PTR -284[rbp]
	movsx	rbx, eax
	lea	rax, -71[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rbx, rax
	je	.L88
	lea	rdi, .LC26[rip]
	call	perror@PLT
	jmp	.L84
.L88:
	mov	rax, QWORD PTR -312[rbp]
	mov	eax, DWORD PTR [rax]
	mov	ecx, 0
	mov	edx, 1
	lea	rsi, .LC17[rip]
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -284[rbp], eax
	mov	edi, 0
	call	fflush@PLT
	cmp	DWORD PTR -284[rbp], 1
	je	.L89
	lea	rdi, .LC26[rip]
	call	perror@PLT
	jmp	.L84
.L89:
	call	pthread_self@PLT
	mov	ecx, eax
	lea	rax, -71[rbp]
	mov	rdx, rax
	mov	esi, ecx
	lea	rdi, .LC34[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -292[rbp], 0
	jmp	.L90
.L93:
	mov	eax, DWORD PTR -292[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	lea	rax, locks[rip+100]
	movzx	eax, BYTE PTR [rdx+rax]
	cmp	al, 49
	jne	.L91
	mov	eax, DWORD PTR -292[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	lea	rdx, locks[rip]
	add	rdx, rax
	mov	rax, QWORD PTR -320[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	strcmp@PLT
	test	eax, eax
	jne	.L91
	mov	eax, DWORD PTR -292[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	lea	rdx, 96[rax]
	lea	rax, locks[rip]
	add	rax, rdx
	add	rax, 8
	mov	rdi, rax
	call	sem_wait@PLT
	jmp	.L92
.L91:
	add	DWORD PTR -292[rbp], 1
.L90:
	mov	eax, DWORD PTR fileCount[rip]
	cmp	DWORD PTR -292[rbp], eax
	jl	.L93
.L92:
	mov	rax, QWORD PTR -264[rbp]
	lea	rsi, .LC35[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -256[rbp], rax
	mov	eax, DWORD PTR -280[rbp]
	add	eax, 1
	mov	rdx, rsp
	mov	rbx, rdx
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -248[rbp], rdx
	movsx	rdx, eax
	mov	r14, rdx
	mov	r15d, 0
	movsx	rdx, eax
	mov	r12, rdx
	mov	r13d, 0
	cdqe
	mov	edx, 16
	sub	rdx, 1
	add	rax, rdx
	mov	ecx, 16
	mov	edx, 0
	div	rcx
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L94:
	cmp	rsp, rdx
	je	.L95
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L94
.L95:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L96
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L96:
	mov	rax, rsp
	add	rax, 0
	mov	QWORD PTR -240[rbp], rax
	mov	DWORD PTR -296[rbp], 0
	jmp	.L97
.L100:
	mov	eax, DWORD PTR -280[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -256[rbp]
	mov	rax, QWORD PTR -240[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	DWORD PTR -276[rbp], eax
	mov	eax, DWORD PTR -276[rbp]
	add	DWORD PTR -296[rbp], eax
	mov	eax, DWORD PTR -276[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -312[rbp]
	mov	eax, DWORD PTR [rax]
	mov	rsi, QWORD PTR -240[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -284[rbp], eax
	mov	edi, 0
	call	fflush@PLT
	mov	eax, DWORD PTR -284[rbp]
	cmp	eax, DWORD PTR -276[rbp]
	je	.L98
	lea	rdi, .LC26[rip]
	call	perror@PLT
	jmp	.L99
.L98:
	mov	rax, QWORD PTR -312[rbp]
	mov	eax, DWORD PTR [rax]
	mov	ecx, 0
	mov	edx, 1
	lea	rsi, .LC17[rip]
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -284[rbp], eax
	mov	edi, 0
	call	fflush@PLT
	cmp	DWORD PTR -284[rbp], 1
	je	.L97
	lea	rdi, .LC26[rip]
	call	perror@PLT
	jmp	.L99
.L97:
	mov	eax, DWORD PTR -296[rbp]
	cmp	eax, DWORD PTR -280[rbp]
	jl	.L100
	mov	rax, QWORD PTR -256[rbp]
	mov	rdi, rax
	call	fclose@PLT
	call	pthread_self@PLT
	mov	ecx, eax
	mov	eax, DWORD PTR -280[rbp]
	mov	edx, eax
	mov	esi, ecx
	lea	rdi, .LC36[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -292[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	lea	rdx, 96[rax]
	lea	rax, locks[rip]
	add	rax, rdx
	add	rax, 8
	mov	rdi, rax
	call	sem_post@PLT
	mov	rsp, rbx
	jmp	.L84
.L99:
	mov	rsp, rbx
	jmp	.L84
.L85:
	lea	rax, .LC37[rip]
	mov	QWORD PTR -232[rbp], rax
	mov	rax, QWORD PTR -232[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -312[rbp]
	mov	eax, DWORD PTR [rax]
	mov	rsi, QWORD PTR -232[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -284[rbp], eax
	mov	edi, 0
	call	fflush@PLT
	mov	eax, DWORD PTR -284[rbp]
	movsx	rbx, eax
	mov	rax, QWORD PTR -232[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rbx, rax
	je	.L103
	lea	rdi, .LC26[rip]
	call	perror@PLT
	jmp	.L84
.L103:
	call	pthread_self@PLT
	mov	ecx, eax
	mov	rax, QWORD PTR -232[rbp]
	mov	rdx, rax
	mov	esi, ecx
	lea	rdi, .LC38[rip]
	mov	eax, 0
	call	printf@PLT
.L84:
	mov	rax, QWORD PTR -56[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L105
	call	__stack_chk_fail@PLT
.L105:
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	exec_READ, .-exec_READ
	.section	.rodata
.LC39:
	.string	"[thread %u] Delete \"%s\" file\n"
.LC40:
	.string	"ACK\n"
.LC41:
	.string	"[thread %u] SENT: ACK\n"
	.text
	.globl	exec_DELETE
	.type	exec_DELETE, @function
exec_DELETE:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 232
	.cfi_offset 3, -24
	mov	QWORD PTR -232[rbp], rdi
	mov	QWORD PTR -240[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	lea	rax, .LC32[rip]
	mov	QWORD PTR -200[rbp], rax
	mov	rax, QWORD PTR -200[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rbx, rax
	mov	rax, QWORD PTR -240[rbp]
	mov	rdi, rax
	call	strlen@PLT
	add	rax, rbx
	add	rax, 1
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -192[rbp], rax
	mov	rax, QWORD PTR -200[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rbx, rax
	mov	rax, QWORD PTR -240[rbp]
	mov	rdi, rax
	call	strlen@PLT
	add	rax, rbx
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -192[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rdx, QWORD PTR -200[rbp]
	mov	rax, QWORD PTR -192[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rdx, QWORD PTR -240[rbp]
	mov	rax, QWORD PTR -192[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
	lea	rdx, -176[rbp]
	mov	rax, QWORD PTR -192[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	lstat@PLT
	mov	DWORD PTR -208[rbp], eax
	cmp	DWORD PTR -208[rbp], 0
	jne	.L107
	mov	eax, DWORD PTR -152[rbp]
	and	eax, 61440
	cmp	eax, 32768
	jne	.L107
	mov	DWORD PTR -212[rbp], 0
	jmp	.L108
.L111:
	mov	eax, DWORD PTR -212[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	lea	rax, locks[rip+100]
	movzx	eax, BYTE PTR [rdx+rax]
	cmp	al, 49
	jne	.L109
	mov	eax, DWORD PTR -212[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	lea	rdx, locks[rip]
	add	rdx, rax
	mov	rax, QWORD PTR -240[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	strcmp@PLT
	test	eax, eax
	jne	.L109
	mov	eax, DWORD PTR -212[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	lea	rdx, 128[rax]
	lea	rax, locks[rip]
	add	rax, rdx
	add	rax, 8
	mov	rdi, rax
	call	sem_wait@PLT
	jmp	.L112
.L109:
	add	DWORD PTR -212[rbp], 1
.L108:
	mov	eax, DWORD PTR fileCount[rip]
	cmp	DWORD PTR -212[rbp], eax
	jl	.L111
.L112:
	mov	eax, DWORD PTR -212[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	lea	rdx, 96[rax]
	lea	rax, locks[rip]
	add	rax, rdx
	lea	rdx, 8[rax]
	lea	rax, -216[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	sem_getvalue@PLT
	mov	eax, DWORD PTR -216[rbp]
	cmp	eax, 20
	jne	.L112
	lea	rdi, tLock[rip]
	call	sem_wait@PLT
	mov	rax, QWORD PTR -192[rbp]
	mov	rdi, rax
	call	remove@PLT
	test	eax, eax
	jne	.L113
	call	pthread_self@PLT
	mov	ecx, eax
	mov	rax, QWORD PTR -240[rbp]
	mov	rdx, rax
	mov	esi, ecx
	lea	rdi, .LC39[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -212[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	lea	rax, locks[rip+100]
	mov	BYTE PTR [rdx+rax], 48
	mov	eax, DWORD PTR -212[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	lea	rdx, locks[rip]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	eax, DWORD PTR fileCount[rip]
	sub	eax, 1
	mov	DWORD PTR fileCount[rip], eax
	mov	rax, QWORD PTR -232[rbp]
	mov	eax, DWORD PTR [rax]
	mov	ecx, 0
	mov	edx, 4
	lea	rsi, .LC40[rip]
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -204[rbp], eax
	mov	edi, 0
	call	fflush@PLT
	cmp	DWORD PTR -204[rbp], 4
	je	.L114
	lea	rdi, .LC26[rip]
	call	perror@PLT
	jmp	.L106
.L114:
	call	pthread_self@PLT
	mov	esi, eax
	lea	rdi, .LC41[rip]
	mov	eax, 0
	call	printf@PLT
.L113:
	mov	eax, DWORD PTR -212[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	lea	rdx, 128[rax]
	lea	rax, locks[rip]
	add	rax, rdx
	add	rax, 8
	mov	rdi, rax
	call	sem_post@PLT
	lea	rdi, tLock[rip]
	call	sem_post@PLT
	jmp	.L106
.L107:
	lea	rax, .LC37[rip]
	mov	QWORD PTR -184[rbp], rax
	mov	rax, QWORD PTR -184[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -232[rbp]
	mov	eax, DWORD PTR [rax]
	mov	rsi, QWORD PTR -184[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -204[rbp], eax
	mov	edi, 0
	call	fflush@PLT
	mov	eax, DWORD PTR -204[rbp]
	movsx	rbx, eax
	mov	rax, QWORD PTR -184[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rbx, rax
	je	.L117
	lea	rdi, .LC26[rip]
	call	perror@PLT
	jmp	.L106
.L117:
	call	pthread_self@PLT
	mov	ecx, eax
	mov	rax, QWORD PTR -184[rbp]
	mov	rdx, rax
	mov	esi, ecx
	lea	rdi, .LC38[rip]
	mov	eax, 0
	call	printf@PLT
.L106:
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L119
	call	__stack_chk_fail@PLT
.L119:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	exec_DELETE, .-exec_DELETE
	.section	.rodata
.LC42:
	.string	"ERROR: FILE EXISTS\n"
	.align 8
.LC43:
	.string	"ERROR: file storage capacity reached\n"
.LC44:
	.string	"w"
	.align 8
.LC45:
	.string	"ERROR: couldn't write to file (on server)\n"
.LC46:
	.string	"fwrite() failed"
	.align 8
.LC47:
	.string	"[thread %u] Transferred file (%d bytes)\n"
.LC48:
	.string	"ERROR: file creation failed\n"
.LC49:
	.string	"fopen() failed"
	.text
	.globl	exec_ADD
	.type	exec_ADD, @function
exec_ADD:
.LFB16:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 280
	.cfi_offset 3, -24
	mov	QWORD PTR -264[rbp], rdi
	mov	QWORD PTR -272[rbp], rsi
	mov	QWORD PTR -280[rbp], rdx
	mov	QWORD PTR -288[rbp], rcx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	lea	rax, .LC32[rip]
	mov	QWORD PTR -232[rbp], rax
	mov	rax, QWORD PTR -232[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rbx, rax
	mov	rax, QWORD PTR -272[rbp]
	mov	rdi, rax
	call	strlen@PLT
	add	rax, rbx
	add	rax, 1
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -224[rbp], rax
	mov	rax, QWORD PTR -232[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rbx, rax
	mov	rax, QWORD PTR -272[rbp]
	mov	rdi, rax
	call	strlen@PLT
	add	rax, rbx
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -224[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rdx, QWORD PTR -232[rbp]
	mov	rax, QWORD PTR -224[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rdx, QWORD PTR -272[rbp]
	mov	rax, QWORD PTR -224[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
	lea	rdx, -176[rbp]
	mov	rax, QWORD PTR -224[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	lstat@PLT
	mov	DWORD PTR -244[rbp], eax
	cmp	DWORD PTR -244[rbp], 0
	jne	.L121
	lea	rax, .LC42[rip]
	mov	QWORD PTR -184[rbp], rax
	mov	rax, QWORD PTR -184[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -264[rbp]
	mov	eax, DWORD PTR [rax]
	mov	rsi, QWORD PTR -184[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -240[rbp], eax
	mov	edi, 0
	call	fflush@PLT
	mov	eax, DWORD PTR -240[rbp]
	movsx	rbx, eax
	mov	rax, QWORD PTR -184[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rbx, rax
	je	.L122
	lea	rdi, .LC26[rip]
	call	perror@PLT
	jmp	.L120
.L122:
	call	pthread_self@PLT
	mov	ecx, eax
	mov	rax, QWORD PTR -184[rbp]
	mov	rdx, rax
	mov	esi, ecx
	lea	rdi, .LC38[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L120
.L121:
	mov	eax, DWORD PTR fileCount[rip]
	cmp	eax, 999
	jg	.L125
	mov	eax, DWORD PTR fileCount[rip]
	add	eax, 1
	mov	DWORD PTR fileCount[rip], eax
	mov	DWORD PTR -248[rbp], 0
	jmp	.L126
.L129:
	mov	eax, DWORD PTR -248[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	lea	rax, locks[rip+100]
	movzx	eax, BYTE PTR [rdx+rax]
	cmp	al, 48
	jne	.L127
	lea	rdi, tLock[rip]
	call	sem_wait@PLT
	mov	eax, DWORD PTR -248[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	lea	rax, locks[rip+100]
	mov	BYTE PTR [rdx+rax], 49
	mov	eax, DWORD PTR -248[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	lea	rdx, locks[rip]
	add	rdx, rax
	mov	rax, QWORD PTR -272[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	strcpy@PLT
	lea	rdi, tLock[rip]
	call	sem_post@PLT
	jmp	.L130
.L127:
	add	DWORD PTR -248[rbp], 1
.L126:
	mov	eax, DWORD PTR fileCount[rip]
	cmp	DWORD PTR -248[rbp], eax
	jl	.L129
	jmp	.L130
.L125:
	lea	rax, .LC43[rip]
	mov	QWORD PTR -216[rbp], rax
	mov	rax, QWORD PTR -216[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -264[rbp]
	mov	eax, DWORD PTR [rax]
	mov	rsi, QWORD PTR -216[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -240[rbp], eax
	mov	edi, 0
	call	fflush@PLT
	mov	eax, DWORD PTR -240[rbp]
	movsx	rbx, eax
	mov	rax, QWORD PTR -216[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rbx, rax
	je	.L131
	lea	rdi, .LC26[rip]
	call	perror@PLT
	jmp	.L120
.L131:
	call	pthread_self@PLT
	mov	ecx, eax
	mov	rax, QWORD PTR -216[rbp]
	mov	rdx, rax
	mov	esi, ecx
	lea	rdi, .LC38[rip]
	mov	eax, 0
	call	printf@PLT
.L130:
	mov	eax, DWORD PTR -248[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	lea	rdx, 128[rax]
	lea	rax, locks[rip]
	add	rax, rdx
	add	rax, 8
	mov	rdi, rax
	call	sem_wait@PLT
	mov	rax, QWORD PTR -224[rbp]
	lea	rsi, .LC44[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -208[rbp], rax
	cmp	QWORD PTR -208[rbp], 0
	je	.L132
	mov	rax, QWORD PTR -288[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rsi, rax
	mov	rdx, QWORD PTR -208[rbp]
	mov	rax, QWORD PTR -288[rbp]
	mov	rcx, rdx
	mov	rdx, rsi
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	DWORD PTR -236[rbp], eax
	cmp	DWORD PTR -236[rbp], 0
	jne	.L133
	lea	rax, .LC45[rip]
	mov	QWORD PTR -192[rbp], rax
	mov	rax, QWORD PTR -192[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -264[rbp]
	mov	eax, DWORD PTR [rax]
	mov	rsi, QWORD PTR -192[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -240[rbp], eax
	mov	edi, 0
	call	fflush@PLT
	mov	eax, DWORD PTR -240[rbp]
	movsx	rbx, eax
	mov	rax, QWORD PTR -192[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rbx, rax
	je	.L134
	lea	rdi, .LC26[rip]
	call	perror@PLT
	jmp	.L120
.L134:
	call	pthread_self@PLT
	mov	ecx, eax
	mov	rax, QWORD PTR -192[rbp]
	mov	rdx, rax
	mov	esi, ecx
	lea	rdi, .LC38[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC46[rip]
	call	perror@PLT
	jmp	.L120
.L133:
	mov	rax, QWORD PTR -288[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rbx, rax
	call	pthread_self@PLT
	mov	rdx, rbx
	mov	esi, eax
	lea	rdi, .LC47[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -264[rbp]
	mov	eax, DWORD PTR [rax]
	mov	ecx, 0
	mov	edx, 4
	lea	rsi, .LC40[rip]
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -240[rbp], eax
	mov	edi, 0
	call	fflush@PLT
	cmp	DWORD PTR -240[rbp], 4
	je	.L135
	lea	rdi, .LC26[rip]
	call	perror@PLT
	jmp	.L120
.L135:
	call	pthread_self@PLT
	mov	esi, eax
	lea	rdi, .LC41[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -208[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, DWORD PTR -248[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	lea	rdx, 128[rax]
	lea	rax, locks[rip]
	add	rax, rdx
	add	rax, 8
	mov	rdi, rax
	call	sem_post@PLT
	jmp	.L120
.L132:
	lea	rax, .LC48[rip]
	mov	QWORD PTR -200[rbp], rax
	mov	rax, QWORD PTR -200[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -264[rbp]
	mov	eax, DWORD PTR [rax]
	mov	rsi, QWORD PTR -200[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -240[rbp], eax
	mov	edi, 0
	call	fflush@PLT
	mov	eax, DWORD PTR -240[rbp]
	movsx	rbx, eax
	mov	rax, QWORD PTR -200[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rbx, rax
	je	.L137
	lea	rdi, .LC26[rip]
	call	perror@PLT
	jmp	.L120
.L137:
	lea	rdi, .LC49[rip]
	call	perror@PLT
	call	pthread_self@PLT
	mov	ecx, eax
	mov	rax, QWORD PTR -200[rbp]
	mov	rdx, rax
	mov	esi, ecx
	lea	rdi, .LC38[rip]
	mov	eax, 0
	call	printf@PLT
	nop
.L120:
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L139
	call	__stack_chk_fail@PLT
.L139:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	exec_ADD, .-exec_ADD
	.section	.rodata
.LC50:
	.string	"a"
	.align 8
.LC51:
	.string	"[thread %u] Appended to file \"%s\" (%d bytes)\n"
	.text
	.globl	exec_APPEND
	.type	exec_APPEND, @function
exec_APPEND:
.LFB17:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 280
	.cfi_offset 3, -24
	mov	QWORD PTR -264[rbp], rdi
	mov	QWORD PTR -272[rbp], rsi
	mov	QWORD PTR -280[rbp], rdx
	mov	QWORD PTR -288[rbp], rcx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	lea	rax, .LC32[rip]
	mov	QWORD PTR -224[rbp], rax
	mov	rax, QWORD PTR -224[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rbx, rax
	mov	rax, QWORD PTR -272[rbp]
	mov	rdi, rax
	call	strlen@PLT
	add	rax, rbx
	add	rax, 1
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -216[rbp], rax
	mov	rax, QWORD PTR -224[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rbx, rax
	mov	rax, QWORD PTR -272[rbp]
	mov	rdi, rax
	call	strlen@PLT
	add	rax, rbx
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -216[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rdx, QWORD PTR -224[rbp]
	mov	rax, QWORD PTR -216[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rdx, QWORD PTR -272[rbp]
	mov	rax, QWORD PTR -216[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
	lea	rdx, -176[rbp]
	mov	rax, QWORD PTR -216[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	lstat@PLT
	mov	DWORD PTR -236[rbp], eax
	cmp	DWORD PTR -236[rbp], 0
	jne	.L141
	mov	DWORD PTR -240[rbp], 0
	jmp	.L142
.L145:
	mov	eax, DWORD PTR -240[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	lea	rax, locks[rip+100]
	movzx	eax, BYTE PTR [rdx+rax]
	cmp	al, 49
	jne	.L143
	mov	eax, DWORD PTR -240[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	lea	rdx, locks[rip]
	add	rdx, rax
	mov	rax, QWORD PTR -272[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	strcmp@PLT
	test	eax, eax
	jne	.L143
	lea	rdi, tLock[rip]
	call	sem_wait@PLT
	jmp	.L146
.L143:
	add	DWORD PTR -240[rbp], 1
.L142:
	mov	eax, DWORD PTR fileCount[rip]
	cmp	DWORD PTR -240[rbp], eax
	jl	.L145
.L146:
	mov	eax, DWORD PTR -240[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	lea	rdx, 96[rax]
	lea	rax, locks[rip]
	add	rax, rdx
	lea	rdx, 8[rax]
	lea	rax, -244[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	sem_getvalue@PLT
	mov	eax, DWORD PTR -244[rbp]
	cmp	eax, 20
	jne	.L146
	mov	eax, DWORD PTR -240[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	lea	rdx, 128[rax]
	lea	rax, locks[rip]
	add	rax, rdx
	add	rax, 8
	mov	rdi, rax
	call	sem_wait@PLT
	mov	rax, QWORD PTR -216[rbp]
	lea	rsi, .LC50[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -200[rbp], rax
	cmp	QWORD PTR -200[rbp], 0
	je	.L147
	mov	rax, QWORD PTR -288[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rsi, rax
	mov	rdx, QWORD PTR -200[rbp]
	mov	rax, QWORD PTR -288[rbp]
	mov	rcx, rdx
	mov	rdx, rsi
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	DWORD PTR -228[rbp], eax
	cmp	DWORD PTR -228[rbp], 0
	jne	.L148
	lea	rax, .LC45[rip]
	mov	QWORD PTR -184[rbp], rax
	mov	rax, QWORD PTR -184[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -264[rbp]
	mov	eax, DWORD PTR [rax]
	mov	rsi, QWORD PTR -184[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -232[rbp], eax
	mov	edi, 0
	call	fflush@PLT
	mov	eax, DWORD PTR -232[rbp]
	movsx	rbx, eax
	mov	rax, QWORD PTR -184[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rbx, rax
	je	.L149
	lea	rdi, .LC26[rip]
	call	perror@PLT
	jmp	.L140
.L149:
	call	pthread_self@PLT
	mov	ecx, eax
	mov	rax, QWORD PTR -184[rbp]
	mov	rdx, rax
	mov	esi, ecx
	lea	rdi, .LC38[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC46[rip]
	call	perror@PLT
	jmp	.L140
.L148:
	mov	rax, QWORD PTR -280[rbp]
	mov	ebx, DWORD PTR [rax]
	call	pthread_self@PLT
	mov	esi, eax
	mov	rax, QWORD PTR -272[rbp]
	mov	ecx, ebx
	mov	rdx, rax
	lea	rdi, .LC51[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -264[rbp]
	mov	eax, DWORD PTR [rax]
	mov	ecx, 0
	mov	edx, 4
	lea	rsi, .LC40[rip]
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -232[rbp], eax
	mov	edi, 0
	call	fflush@PLT
	cmp	DWORD PTR -232[rbp], 4
	je	.L151
	lea	rdi, .LC26[rip]
	call	perror@PLT
	jmp	.L140
.L151:
	call	pthread_self@PLT
	mov	esi, eax
	lea	rdi, .LC41[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -200[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rdi, tLock[rip]
	call	sem_post@PLT
	mov	eax, DWORD PTR -240[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	lea	rdx, 128[rax]
	lea	rax, locks[rip]
	add	rax, rdx
	add	rax, 8
	mov	rdi, rax
	call	sem_post@PLT
	jmp	.L140
.L147:
	lea	rax, .LC48[rip]
	mov	QWORD PTR -192[rbp], rax
	mov	rax, QWORD PTR -192[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -264[rbp]
	mov	eax, DWORD PTR [rax]
	mov	rsi, QWORD PTR -192[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -232[rbp], eax
	mov	edi, 0
	call	fflush@PLT
	mov	eax, DWORD PTR -232[rbp]
	movsx	rbx, eax
	mov	rax, QWORD PTR -192[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rbx, rax
	je	.L153
	lea	rdi, .LC26[rip]
	call	perror@PLT
	jmp	.L140
.L153:
	call	pthread_self@PLT
	mov	ecx, eax
	mov	rax, QWORD PTR -192[rbp]
	mov	rdx, rax
	mov	esi, ecx
	lea	rdi, .LC38[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC49[rip]
	call	perror@PLT
	jmp	.L140
.L141:
	lea	rax, .LC37[rip]
	mov	QWORD PTR -208[rbp], rax
	mov	rax, QWORD PTR -208[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -264[rbp]
	mov	eax, DWORD PTR [rax]
	mov	rsi, QWORD PTR -208[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -232[rbp], eax
	mov	edi, 0
	call	fflush@PLT
	mov	eax, DWORD PTR -232[rbp]
	movsx	rbx, eax
	mov	rax, QWORD PTR -208[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rbx, rax
	je	.L156
	lea	rdi, .LC26[rip]
	call	perror@PLT
	jmp	.L140
.L156:
	call	pthread_self@PLT
	mov	ecx, eax
	mov	rax, QWORD PTR -208[rbp]
	mov	rdx, rax
	mov	esi, ecx
	lea	rdi, .LC38[rip]
	mov	eax, 0
	call	printf@PLT
.L140:
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L158
	call	__stack_chk_fail@PLT
.L158:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	exec_APPEND, .-exec_APPEND
	.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	"308473.c"
	.text
	.comm	tLock,16,4
	.comm	fileCount,4,4
	.comm	locks,136000,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Started file-server\000"
	.align	2
.LC1:
	.ascii	"Usage: file_name port_number(8000-9000)\012\000"
	.align	2
.LC2:
	.ascii	"socket() failed\000"
	.align	2
.LC3:
	.ascii	"bind() failed\000"
	.align	2
.LC4:
	.ascii	"Listening on Port %d\012\000"
	.align	2
.LC5:
	.ascii	".storage\000"
	.align	2
.LC6:
	.ascii	"mkdir() failed \000"
	.align	2
.LC7:
	.ascii	"Directory '.storage' created.\000"
	.align	2
.LC8:
	.ascii	"Directory '.storage' already exists.\000"
	.align	2
.LC9:
	.ascii	"Received incoming connection from %s\012\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 240
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #240
	str	r0, [fp, #-240]
	str	r1, [fp, #-244]
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L18+4
	bl	puts
	ldr	r1, [fp, #-244]
	ldr	r0, [fp, #-240]
	bl	read_cli
	str	r0, [fp, #-220]
	ldr	r3, [fp, #-220]
	cmp	r3, #0
	bge	.L2
	ldr	r3, .L18+8
	ldr	r3, [r3]
	mov	r2, #40
	mov	r1, #1
	ldr	r0, .L18+12
	bl	fwrite
	mov	r0, #1
	bl	exit
.L2:
	ldr	r3, [fp, #-220]
	strh	r3, [fp, #-230]	@ movhi
	mov	r2, #1
	mov	r1, #0
	ldr	r0, .L18+16
	bl	sem_init
	ldr	r3, .L18+20
	mov	r2, #0
	str	r2, [r3]
	ldr	r0, .L18+16
	bl	sem_wait
	bl	lock_init
	ldr	r0, .L18+16
	bl	sem_post
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-216]
	ldr	r3, [fp, #-216]
	cmp	r3, #0
	bge	.L3
	ldr	r0, .L18+24
	bl	perror
	mov	r0, #1
	bl	exit
.L3:
	mov	r3, #2
	strh	r3, [fp, #-200]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-196]
	ldrh	r3, [fp, #-230]
	mov	r0, r3
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-198]	@ movhi
	mov	r3, #16
	str	r3, [fp, #-212]
	ldr	r2, [fp, #-212]
	sub	r3, fp, #200
	mov	r1, r3
	ldr	r0, [fp, #-216]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L4
	ldr	r0, .L18+28
	bl	perror
	mov	r0, #1
	bl	exit
.L4:
	mov	r1, #20
	ldr	r0, [fp, #-216]
	bl	listen
	ldrh	r3, [fp, #-230]
	mov	r1, r3
	ldr	r0, .L18+32
	bl	printf
	mov	r3, #16
	str	r3, [fp, #-228]
	ldr	r0, .L18+36
	bl	check_dir
	mov	r3, r0
	cmp	r3, #1
	bne	.L5
	mov	r1, #508
	ldr	r0, .L18+36
	bl	mkdir
	str	r0, [fp, #-208]
	ldr	r3, [fp, #-208]
	cmp	r3, #0
	beq	.L6
	ldr	r0, .L18+40
	bl	perror
	mov	r0, #1
	bl	exit
.L6:
	ldr	r0, .L18+44
	bl	puts
	b	.L7
.L5:
	ldr	r0, .L18+48
	bl	puts
	bl	fill_locks
.L7:
	mov	r3, #0
	str	r3, [fp, #-224]
	b	.L8
.L9:
	ldr	r3, [fp, #-224]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	mvn	r2, #0
	str	r2, [r3, #-84]
	sub	r2, fp, #168
	ldr	r3, [fp, #-224]
	lsl	r3, r3, #2
	add	r0, r2, r3
	sub	r2, fp, #88
	ldr	r3, [fp, #-224]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, .L18+52
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-224]
	add	r3, r3, #1
	str	r3, [fp, #-224]
.L8:
	ldr	r3, [fp, #-224]
	cmp	r3, #19
	ble	.L9
	mov	r3, #0
	str	r3, [fp, #-224]
.L16:
	sub	r2, fp, #228
	sub	r3, fp, #184
	mov	r1, r3
	ldr	r0, [fp, #-216]
	bl	accept
	str	r0, [fp, #-204]
	ldr	r0, [fp, #-180]
	bl	inet_ntoa
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L18+56
	bl	printf
	ldr	r3, [fp, #-224]
	cmp	r3, #19
	bne	.L11
	mov	r3, #0
	str	r3, [fp, #-224]
	b	.L11
.L15:
	ldr	r3, [fp, #-224]
	cmp	r3, #19
	bne	.L12
	mov	r3, #0
	str	r3, [fp, #-224]
.L12:
	ldr	r3, [fp, #-224]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-84]
	cmn	r3, #1
	bne	.L13
	ldr	r3, [fp, #-224]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [fp, #-204]
	str	r2, [r3, #-84]
	b	.L14
.L13:
	ldr	r3, [fp, #-224]
	add	r3, r3, #1
	str	r3, [fp, #-224]
.L11:
	ldr	r3, [fp, #-224]
	cmp	r3, #19
	ble	.L15
.L14:
	b	.L16
.L19:
	.align	2
.L18:
	.word	.LC10
	.word	.LC0
	.word	stderr
	.word	.LC1
	.word	tLock
	.word	fileCount
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	start_routine
	.word	.LC9
	.size	main, .-main
	.align	2
	.global	read_cli
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_cli, %function
read_cli:
	@ 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, #-16]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-16]
	cmp	r3, #2
	beq	.L21
	mvn	r3, #0
	b	.L22
.L21:
	ldr	r3, [fp, #-20]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #8000
	blt	.L23
	ldr	r3, [fp, #-8]
	ldr	r2, .L25
	cmp	r3, r2
	ble	.L24
.L23:
	mvn	r3, #0
	b	.L22
.L24:
	ldr	r3, [fp, #-8]
.L22:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L26:
	.align	2
.L25:
	.word	9000
	.size	read_cli, .-read_cli
	.align	2
	.global	lock_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	lock_init, %function
lock_init:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L28
.L29:
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #4
	add	r3, r3, r2
	lsl	r3, r3, #3
	ldr	r2, .L30
	add	r3, r3, r2
	mov	r2, #0
	strb	r2, [r3]
	ldr	r1, .L30
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #4
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #100
	mov	r2, #48
	strb	r2, [r3]
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #4
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r3, #104
	ldr	r2, .L30
	add	r3, r3, r2
	mov	r2, #20
	mov	r1, #0
	mov	r0, r3
	bl	sem_init
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #4
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r3, #120
	ldr	r2, .L30
	add	r3, r3, r2
	mov	r2, #1
	mov	r1, #0
	mov	r0, r3
	bl	sem_init
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L28:
	ldr	r3, [fp, #-8]
	cmp	r3, #1000
	blt	.L29
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L31:
	.align	2
.L30:
	.word	locks
	.size	lock_init, .-lock_init
	.section	.rodata
	.align	2
.LC11:
	.ascii	"readdir_r() error\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	fill_locks
	.syntax unified
	.arm
	.fpu softvfp
	.type	fill_locks, %function
fill_locks:
	@ args = 0, pretend = 0, frame = 288
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #288
	ldr	r3, .L39
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-288]
	ldr	r0, .L39+4
	bl	opendir
	str	r0, [fp, #-284]
	ldr	r3, [fp, #-284]
	cmp	r3, #0
	beq	.L32
.L37:
	sub	r2, fp, #288
	sub	r3, fp, #276
	mov	r1, r3
	ldr	r0, [fp, #-284]
	bl	readdir_r
	str	r0, [fp, #-280]
	ldr	r3, [fp, #-280]
	cmp	r3, #0
	beq	.L34
	ldr	r0, .L39+8
	bl	perror
	b	.L32
.L34:
	ldrb	r3, [fp, #-266]	@ zero_extendqisi2
	and	r3, r3, #8
	cmp	r3, #0
	beq	.L36
	ldr	r0, .L39+12
	bl	sem_wait
	ldr	r3, .L39+16
	ldr	r2, [r3]
	mov	r3, r2
	lsl	r3, r3, #4
	add	r3, r3, r2
	lsl	r3, r3, #3
	ldr	r2, .L39+20
	add	r2, r3, r2
	sub	r3, fp, #276
	add	r3, r3, #11
	mov	r1, r3
	mov	r0, r2
	bl	strcpy
	ldr	r3, .L39+16
	ldr	r2, [r3]
	ldr	r1, .L39+20
	mov	r3, r2
	lsl	r3, r3, #4
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #100
	mov	r2, #49
	strb	r2, [r3]
	ldr	r0, .L39+12
	bl	sem_post
	ldr	r3, .L39+16
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L39+16
	str	r3, [r2]
.L36:
	ldr	r3, [fp, #-288]
	cmp	r3, #0
	bne	.L37
.L32:
	ldr	r3, .L39
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L38
	bl	__stack_chk_fail
.L38:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L40:
	.align	2
.L39:
	.word	.LC12
	.word	.LC5
	.word	.LC11
	.word	tLock
	.word	fileCount
	.word	locks
	.size	fill_locks, .-fill_locks
	.section	.rodata
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	check_lstat
	.syntax unified
	.arm
	.fpu softvfp
	.type	check_lstat, %function
check_lstat:
	@ args = 0, pretend = 0, frame = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #112
	str	r0, [fp, #-112]
	ldr	r3, .L46
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #100
	mov	r1, r3
	ldr	r0, [fp, #-112]
	bl	lstat
	str	r0, [fp, #-104]
	ldr	r3, [fp, #-104]
	cmp	r3, #0
	bne	.L42
	ldr	r3, [fp, #-84]
	and	r3, r3, #61440
	cmp	r3, #32768
	bne	.L42
	mov	r3, #0
	b	.L44
.L42:
	mov	r3, #1
.L44:
	ldr	r2, .L46
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L45
	bl	__stack_chk_fail
.L45:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L47:
	.align	2
.L46:
	.word	.LC13
	.size	check_lstat, .-check_lstat
	.section	.rodata
	.align	2
.LC14:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	check_dir
	.syntax unified
	.arm
	.fpu softvfp
	.type	check_dir, %function
check_dir:
	@ args = 0, pretend = 0, frame = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #112
	str	r0, [fp, #-112]
	ldr	r3, .L53
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #100
	mov	r1, r3
	ldr	r0, [fp, #-112]
	bl	lstat
	str	r0, [fp, #-104]
	ldr	r3, [fp, #-104]
	cmp	r3, #0
	bne	.L49
	ldr	r3, [fp, #-84]
	and	r3, r3, #61440
	cmp	r3, #16384
	bne	.L49
	mov	r3, #0
	b	.L51
.L49:
	mov	r3, #1
.L51:
	ldr	r2, .L53
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L52
	bl	__stack_chk_fail
.L52:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L54:
	.align	2
.L53:
	.word	.LC14
	.size	check_dir, .-check_dir
	.section	.rodata
	.align	2
.LC15:
	.ascii	"recv() failed\000"
	.align	2
.LC16:
	.ascii	"[thread %u] Client closed its socket....terminating"
	.ascii	"\012\000"
	.align	2
.LC17:
	.ascii	" \012\000"
	.align	2
.LC18:
	.ascii	"LIST\000\000"
	.align	2
.LC19:
	.ascii	"[thread %u] Rcvd: %s\012\000"
	.align	2
.LC20:
	.ascii	"DELETE\000\000"
	.align	2
.LC21:
	.ascii	"\012\000"
	.align	2
.LC22:
	.ascii	"[thread %u] Rcvd: %s %s\012\000"
	.align	2
.LC23:
	.ascii	"READ\000\000"
	.align	2
.LC24:
	.ascii	"ADD\000\000"
	.align	2
.LC25:
	.ascii	"APPEND\000\000"
	.align	2
.LC26:
	.ascii	" \000"
	.align	2
.LC27:
	.ascii	"[thread %u] Rcvd: %s %s %d\012\000"
	.align	2
.LC28:
	.ascii	"[thread %u] SENT: ERROR: INVALID COMMAND\012\000"
	.align	2
.LC29:
	.ascii	"ERROR: INVALID COMMAND\012\000"
	.align	2
.LC30:
	.ascii	"send() failed\000"
	.align	2
.LC31:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	start_routine
	.syntax unified
	.arm
	.fpu softvfp
	.type	start_routine, %function
start_routine:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #68
	str	r0, [fp, #-64]
	ldr	r3, .L73
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r0, .L73+4
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-52]
	ldr	r0, .L73+4
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-48]
	ldr	r0, .L73+4
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-44]
	ldr	r0, .L73+4
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-40]
	ldr	r0, .L73+4
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-36]
	ldr	r0, .L73+4
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-32]
.L69:
	ldr	r3, [fp, #-64]
	ldr	r3, [r3]
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-60]
	cmn	r3, #1
	beq	.L72
.L56:
	ldr	r3, [fp, #-52]
	mov	r0, r3
	ldr	r3, .L73+4
	mov	r2, r3
	mov	r1, #0
	bl	memset
	ldr	r3, [fp, #-48]
	mov	r0, r3
	ldr	r3, .L73+4
	mov	r2, r3
	mov	r1, #0
	bl	memset
	ldr	r3, [fp, #-44]
	mov	r0, r3
	ldr	r3, .L73+4
	mov	r2, r3
	mov	r1, #0
	bl	memset
	ldr	r3, [fp, #-40]
	mov	r0, r3
	ldr	r3, .L73+4
	mov	r2, r3
	mov	r1, #0
	bl	memset
	ldr	r3, [fp, #-36]
	mov	r0, r3
	ldr	r3, .L73+4
	mov	r2, r3
	mov	r1, #0
	bl	memset
	ldr	r3, [fp, #-32]
	mov	r0, r3
	ldr	r3, .L73+4
	mov	r2, r3
	mov	r1, #0
	bl	memset
	ldr	r0, [fp, #-60]
	mov	r3, #0
	ldr	r2, .L73+4
	ldr	r1, [fp, #-36]
	bl	recv
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bge	.L58
	ldr	r0, .L73+8
	bl	perror
	mov	r3, #0
	b	.L70
.L58:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L60
	bl	pthread_self
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L73+12
	bl	printf
	b	.L61
.L60:
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-32]
	bl	strcpy
	ldr	r1, .L73+16
	ldr	r0, [fp, #-32]
	bl	strtok
	str	r0, [fp, #-52]
	ldr	r1, .L73+20
	ldr	r0, [fp, #-52]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L62
	bl	pthread_self
	mov	r3, r0
	ldr	r2, [fp, #-52]
	mov	r1, r3
	ldr	r0, .L73+24
	bl	printf
	sub	r3, fp, #60
	mov	r0, r3
	bl	exec_LIST
	b	.L61
.L62:
	ldr	r1, .L73+28
	ldr	r0, [fp, #-52]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L63
	ldr	r1, .L73+32
	mov	r0, #0
	bl	strtok
	str	r0, [fp, #-48]
	bl	pthread_self
	mov	r1, r0
	ldr	r3, [fp, #-48]
	ldr	r2, [fp, #-52]
	ldr	r0, .L73+36
	bl	printf
	sub	r3, fp, #60
	ldr	r1, [fp, #-48]
	mov	r0, r3
	bl	exec_DELETE
	b	.L61
.L63:
	ldr	r1, .L73+40
	ldr	r0, [fp, #-52]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L64
	ldr	r1, .L73+32
	mov	r0, #0
	bl	strtok
	str	r0, [fp, #-48]
	bl	pthread_self
	mov	r1, r0
	ldr	r3, [fp, #-48]
	ldr	r2, [fp, #-52]
	ldr	r0, .L73+36
	bl	printf
	sub	r3, fp, #60
	ldr	r1, [fp, #-48]
	mov	r0, r3
	bl	exec_READ
	b	.L61
.L64:
	ldr	r1, .L73+44
	ldr	r0, [fp, #-52]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L65
	ldr	r1, .L73+48
	ldr	r0, [fp, #-52]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L66
.L65:
	ldr	r1, .L73+52
	mov	r0, #0
	bl	strtok
	str	r0, [fp, #-48]
	ldr	r1, .L73+32
	mov	r0, #0
	bl	strtok
	str	r0, [fp, #-44]
	ldr	r0, [fp, #-44]
	bl	atoi
	mov	r3, r0
	str	r3, [fp, #-56]
	ldr	r0, [fp, #-44]
	bl	strlen
	mov	r3, r0
	add	r3, r3, #1
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	str	r3, [fp, #-40]
	ldr	r1, .L73+44
	ldr	r0, [fp, #-52]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L67
	bl	pthread_self
	mov	r1, r0
	ldr	r3, [fp, #-56]
	str	r3, [sp]
	ldr	r3, [fp, #-48]
	ldr	r2, [fp, #-52]
	ldr	r0, .L73+56
	bl	printf
	sub	r2, fp, #56
	sub	r0, fp, #60
	ldr	r3, [fp, #-40]
	ldr	r1, [fp, #-48]
	bl	exec_ADD
	b	.L61
.L67:
	bl	pthread_self
	mov	r1, r0
	ldr	r3, [fp, #-56]
	str	r3, [sp]
	ldr	r3, [fp, #-48]
	ldr	r2, [fp, #-52]
	ldr	r0, .L73+56
	bl	printf
	sub	r2, fp, #56
	sub	r0, fp, #60
	ldr	r3, [fp, #-40]
	ldr	r1, [fp, #-48]
	bl	exec_APPEND
	b	.L61
.L66:
	bl	pthread_self
	mov	r3, r0
	ldr	r2, [fp, #-52]
	mov	r1, r3
	ldr	r0, .L73+24
	bl	printf
	bl	pthread_self
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L73+60
	bl	printf
	ldr	r3, .L73+64
	str	r3, [fp, #-24]
	ldr	r4, [fp, #-60]
	ldr	r0, [fp, #-24]
	bl	strlen
	mov	r2, r0
	mov	r3, #0
	ldr	r1, [fp, #-24]
	mov	r0, r4
	bl	send
	str	r0, [fp, #-20]
	mov	r0, #0
	bl	fflush
	ldr	r0, [fp, #-24]
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	beq	.L61
	ldr	r0, .L73+68
	bl	perror
	mov	r3, #0
	b	.L70
.L61:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bgt	.L56
	ldr	r3, [fp, #-60]
	mov	r0, r3
	bl	close
	ldr	r3, [fp, #-64]
	mvn	r2, #0
	str	r2, [r3]
	b	.L69
.L72:
	nop
	b	.L69
.L70:
	ldr	r2, .L73
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L71
	bl	__stack_chk_fail
.L71:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L74:
	.align	2
.L73:
	.word	.LC31
	.word	5000000
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.word	.LC26
	.word	.LC27
	.word	.LC28
	.word	.LC29
	.word	.LC30
	.size	start_routine, .-start_routine
	.section	.rodata
	.align	2
.LC32:
	.ascii	"0\012\000"
	.align	2
.LC33:
	.ascii	"%d\000"
	.align	2
.LC34:
	.ascii	"[thread %u] SENT: %d\012\000"
	.align	2
.LC35:
	.ascii	"opendir()  error\000"
	.align	2
.LC36:
	.ascii	"[thread %u] SENT: %s\012\000"
	.align	2
.LC37:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	exec_LIST
	.syntax unified
	.arm
	.fpu softvfp
	.type	exec_LIST, %function
exec_LIST:
	@ args = 0, pretend = 0, frame = 320
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #324
	str	r0, [fp, #-328]
	ldr	r3, .L98
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-320]
	mov	r3, #0
	str	r3, [fp, #-316]
	ldr	r0, .L98+4
	bl	opendir
	str	r0, [fp, #-312]
	ldr	r3, [fp, #-312]
	cmp	r3, #0
	beq	.L76
	sub	r2, fp, #320
	sub	r3, fp, #300
	mov	r1, r3
	ldr	r0, [fp, #-312]
	bl	readdir_r
	str	r0, [fp, #-308]
	ldr	r3, [fp, #-308]
	cmp	r3, #0
	bne	.L77
.L87:
	ldrb	r3, [fp, #-290]	@ zero_extendqisi2
	and	r3, r3, #8
	cmp	r3, #0
	beq	.L78
	ldr	r3, [fp, #-316]
	add	r3, r3, #1
	str	r3, [fp, #-316]
.L78:
	sub	r2, fp, #320
	sub	r3, fp, #300
	mov	r1, r3
	ldr	r0, [fp, #-312]
	bl	readdir_r
	str	r0, [fp, #-308]
	ldr	r3, [fp, #-308]
	cmp	r3, #0
	beq	.L79
	ldr	r0, .L98+8
	bl	perror
	b	.L75
.L79:
	ldr	r3, [fp, #-316]
	cmp	r3, #0
	bne	.L81
	ldr	r3, [fp, #-320]
	cmp	r3, #0
	bne	.L81
	ldr	r3, [fp, #-328]
	ldr	r0, [r3]
	mov	r3, #0
	mov	r2, #2
	ldr	r1, .L98+12
	bl	send
	str	r0, [fp, #-304]
	mov	r0, #0
	bl	fflush
	ldr	r3, [fp, #-304]
	cmp	r3, #2
	beq	.L97
	ldr	r0, .L98+16
	bl	perror
	b	.L75
.L81:
	ldr	r3, [fp, #-320]
	cmp	r3, #0
	bne	.L83
	sub	r3, fp, #32
	ldr	r2, [fp, #-316]
	ldr	r1, .L98+20
	mov	r0, r3
	bl	sprintf
	ldr	r3, [fp, #-328]
	ldr	r4, [r3]
	sub	r3, fp, #32
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #32
	mov	r3, #0
	mov	r0, r4
	bl	send
	str	r0, [fp, #-304]
	mov	r0, #0
	bl	fflush
	sub	r3, fp, #32
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-304]
	cmp	r2, r3
	beq	.L84
	ldr	r0, .L98+16
	bl	perror
	b	.L75
.L84:
	ldr	r3, [fp, #-328]
	ldr	r0, [r3]
	mov	r3, #0
	mov	r2, #1
	ldr	r1, .L98+24
	bl	send
	str	r0, [fp, #-304]
	mov	r0, #0
	bl	fflush
	ldr	r3, [fp, #-304]
	cmp	r3, #1
	beq	.L86
	ldr	r0, .L98+16
	bl	perror
	b	.L75
.L86:
	bl	pthread_self
	mov	r3, r0
	ldr	r2, [fp, #-316]
	mov	r1, r3
	ldr	r0, .L98+28
	bl	printf
.L83:
	ldr	r3, [fp, #-320]
	cmp	r3, #0
	bne	.L87
	ldr	r0, [fp, #-312]
	bl	closedir
	b	.L77
.L76:
	ldr	r0, .L98+32
	bl	perror
	b	.L75
.L77:
	ldr	r0, .L98+4
	bl	opendir
	str	r0, [fp, #-312]
	ldr	r3, [fp, #-312]
	cmp	r3, #0
	beq	.L88
	sub	r2, fp, #320
	sub	r3, fp, #300
	mov	r1, r3
	ldr	r0, [fp, #-312]
	bl	readdir_r
	str	r0, [fp, #-308]
	ldr	r3, [fp, #-308]
	cmp	r3, #0
	bne	.L75
.L94:
	ldrb	r3, [fp, #-290]	@ zero_extendqisi2
	and	r3, r3, #8
	cmp	r3, #0
	beq	.L90
	ldr	r3, [fp, #-328]
	ldr	r4, [r3]
	sub	r3, fp, #300
	add	r3, r3, #11
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #300
	add	r1, r3, #11
	mov	r3, #0
	mov	r0, r4
	bl	send
	str	r0, [fp, #-304]
	mov	r0, #0
	bl	fflush
	sub	r3, fp, #300
	add	r3, r3, #11
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-304]
	cmp	r2, r3
	beq	.L91
	ldr	r0, .L98+16
	bl	perror
	b	.L75
.L91:
	ldr	r3, [fp, #-328]
	ldr	r0, [r3]
	mov	r3, #0
	mov	r2, #1
	ldr	r1, .L98+24
	bl	send
	str	r0, [fp, #-304]
	mov	r0, #0
	bl	fflush
	ldr	r3, [fp, #-304]
	cmp	r3, #1
	beq	.L92
	ldr	r0, .L98+16
	bl	perror
	b	.L75
.L92:
	bl	pthread_self
	mov	r1, r0
	sub	r3, fp, #300
	add	r3, r3, #11
	mov	r2, r3
	ldr	r0, .L98+36
	bl	printf
.L90:
	sub	r2, fp, #320
	sub	r3, fp, #300
	mov	r1, r3
	ldr	r0, [fp, #-312]
	bl	readdir_r
	str	r0, [fp, #-308]
	ldr	r3, [fp, #-308]
	cmp	r3, #0
	beq	.L93
	ldr	r0, .L98+8
	bl	perror
	b	.L75
.L93:
	ldr	r3, [fp, #-320]
	cmp	r3, #0
	bne	.L94
	ldr	r0, [fp, #-312]
	bl	closedir
	b	.L75
.L88:
	ldr	r0, .L98+32
	bl	perror
	b	.L75
.L97:
	nop
.L75:
	ldr	r3, .L98
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L96
	bl	__stack_chk_fail
.L96:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L99:
	.align	2
.L98:
	.word	.LC37
	.word	.LC5
	.word	.LC11
	.word	.LC32
	.word	.LC30
	.word	.LC33
	.word	.LC21
	.word	.LC34
	.word	.LC35
	.word	.LC36
	.size	exec_LIST, .-exec_LIST
	.section	.rodata
	.align	2
.LC38:
	.ascii	".storage/\000"
	.align	2
.LC39:
	.ascii	"ACK \000"
	.align	2
.LC40:
	.ascii	"[thread %u] SENT: ACK %s\012\000"
	.align	2
.LC41:
	.ascii	"r\000"
	.align	2
.LC42:
	.ascii	"[thread %u] SENT: Transferred file (%d bytes)\012\000"
	.align	2
.LC43:
	.ascii	"ERROR: NO SUCH FILE\012\000"
	.align	2
.LC44:
	.ascii	"[thread %u] SENT: %s\000"
	.align	2
.LC45:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	exec_READ
	.syntax unified
	.arm
	.fpu softvfp
	.type	exec_READ, %function
exec_READ:
	@ args = 0, pretend = 0, frame = 168
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #172
	str	r0, [fp, #-176]
	str	r1, [fp, #-180]
	ldr	r3, .L119
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, .L119+4
	str	r3, [fp, #-164]
	ldr	r0, [fp, #-164]
	bl	strlen
	mov	r4, r0
	ldr	r0, [fp, #-180]
	bl	strlen
	mov	r3, r0
	add	r3, r4, r3
	add	r3, r3, #1
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-160]
	ldr	r0, [fp, #-164]
	bl	strlen
	mov	r4, r0
	ldr	r0, [fp, #-180]
	bl	strlen
	mov	r3, r0
	add	r3, r4, r3
	add	r3, r3, #1
	ldr	r2, [fp, #-160]
	mov	r0, r2
	mov	r2, r3
	mov	r1, #0
	bl	memset
	ldr	r1, [fp, #-164]
	ldr	r0, [fp, #-160]
	bl	strcpy
	ldr	r1, [fp, #-180]
	ldr	r0, [fp, #-160]
	bl	strcat
	sub	r3, fp, #124
	mov	r1, r3
	ldr	r0, [fp, #-160]
	bl	lstat
	str	r0, [fp, #-156]
	ldr	r3, [fp, #-156]
	cmp	r3, #0
	bne	.L101
	ldr	r3, [fp, #-108]
	and	r3, r3, #61440
	cmp	r3, #32768
	bne	.L101
	ldr	r3, [fp, #-176]
	ldr	r0, [r3]
	mov	r3, #0
	mov	r2, #4
	ldr	r1, .L119+8
	bl	send
	str	r0, [fp, #-152]
	mov	r0, #0
	bl	fflush
	ldr	r3, [fp, #-152]
	cmp	r3, #4
	beq	.L102
	ldr	r0, .L119+12
	bl	perror
	b	.L100
.L102:
	ldr	r3, [fp, #-80]
	str	r3, [fp, #-148]
	sub	r3, fp, #32
	ldr	r2, [fp, #-148]
	ldr	r1, .L119+16
	mov	r0, r3
	bl	sprintf
	ldr	r3, [fp, #-176]
	ldr	r4, [r3]
	sub	r3, fp, #32
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #32
	mov	r3, #0
	mov	r0, r4
	bl	send
	str	r0, [fp, #-152]
	mov	r0, #0
	bl	fflush
	sub	r3, fp, #32
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-152]
	cmp	r2, r3
	beq	.L104
	ldr	r0, .L119+12
	bl	perror
	b	.L100
.L104:
	ldr	r3, [fp, #-176]
	ldr	r0, [r3]
	mov	r3, #0
	mov	r2, #1
	ldr	r1, .L119+20
	bl	send
	str	r0, [fp, #-152]
	mov	r0, #0
	bl	fflush
	ldr	r3, [fp, #-152]
	cmp	r3, #1
	beq	.L105
	ldr	r0, .L119+12
	bl	perror
	b	.L100
.L105:
	bl	pthread_self
	mov	r1, r0
	sub	r3, fp, #32
	mov	r2, r3
	ldr	r0, .L119+24
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-168]
	b	.L106
.L109:
	ldr	r1, .L119+28
	ldr	r2, [fp, #-168]
	mov	r3, r2
	lsl	r3, r3, #4
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #100
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #49
	bne	.L107
	ldr	r2, [fp, #-168]
	mov	r3, r2
	lsl	r3, r3, #4
	add	r3, r3, r2
	lsl	r3, r3, #3
	ldr	r2, .L119+28
	add	r3, r3, r2
	ldr	r1, [fp, #-180]
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L107
	ldr	r2, [fp, #-168]
	mov	r3, r2
	lsl	r3, r3, #4
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r3, #104
	ldr	r2, .L119+28
	add	r3, r3, r2
	mov	r0, r3
	bl	sem_wait
	b	.L108
.L107:
	ldr	r3, [fp, #-168]
	add	r3, r3, #1
	str	r3, [fp, #-168]
.L106:
	ldr	r3, .L119+32
	ldr	r3, [r3]
	ldr	r2, [fp, #-168]
	cmp	r2, r3
	blt	.L109
.L108:
	ldr	r1, .L119+36
	ldr	r0, [fp, #-160]
	bl	fopen
	str	r0, [fp, #-144]
	ldr	r3, [fp, #-148]
	add	ip, r3, #1
	mov	r3, sp
	mov	r4, r3
	sub	r3, ip, #1
	str	r3, [fp, #-140]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	mov	r3, ip
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #0
	str	r3, [fp, #-136]
	mov	r3, #0
	str	r3, [fp, #-172]
	b	.L110
.L113:
	ldr	r2, [fp, #-148]
	ldr	r3, [fp, #-144]
	mov	r1, #1
	ldr	r0, [fp, #-136]
	bl	fread
	mov	r3, r0
	str	r3, [fp, #-132]
	ldr	r2, [fp, #-172]
	ldr	r3, [fp, #-132]
	add	r3, r2, r3
	str	r3, [fp, #-172]
	ldr	r3, [fp, #-176]
	ldr	r0, [r3]
	ldr	r2, [fp, #-132]
	mov	r3, #0
	ldr	r1, [fp, #-136]
	bl	send
	str	r0, [fp, #-152]
	mov	r0, #0
	bl	fflush
	ldr	r2, [fp, #-152]
	ldr	r3, [fp, #-132]
	cmp	r2, r3
	beq	.L111
	ldr	r0, .L119+12
	bl	perror
	b	.L112
.L111:
	ldr	r3, [fp, #-176]
	ldr	r0, [r3]
	mov	r3, #0
	mov	r2, #1
	ldr	r1, .L119+20
	bl	send
	str	r0, [fp, #-152]
	mov	r0, #0
	bl	fflush
	ldr	r3, [fp, #-152]
	cmp	r3, #1
	beq	.L110
	ldr	r0, .L119+12
	bl	perror
	b	.L112
.L110:
	ldr	r2, [fp, #-172]
	ldr	r3, [fp, #-148]
	cmp	r2, r3
	blt	.L113
	ldr	r0, [fp, #-144]
	bl	fclose
	bl	pthread_self
	mov	r3, r0
	ldr	r2, [fp, #-148]
	mov	r1, r3
	ldr	r0, .L119+40
	bl	printf
	ldr	r2, [fp, #-168]
	mov	r3, r2
	lsl	r3, r3, #4
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r3, #104
	ldr	r2, .L119+28
	add	r3, r3, r2
	mov	r0, r3
	bl	sem_post
	mov	sp, r4
	b	.L100
.L112:
	mov	sp, r4
	b	.L100
.L101:
	ldr	r3, .L119+44
	str	r3, [fp, #-128]
	ldr	r3, [fp, #-176]
	ldr	r4, [r3]
	ldr	r0, [fp, #-128]
	bl	strlen
	mov	r2, r0
	mov	r3, #0
	ldr	r1, [fp, #-128]
	mov	r0, r4
	bl	send
	str	r0, [fp, #-152]
	mov	r0, #0
	bl	fflush
	ldr	r0, [fp, #-128]
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-152]
	cmp	r2, r3
	beq	.L116
	ldr	r0, .L119+12
	bl	perror
	b	.L100
.L116:
	bl	pthread_self
	mov	r3, r0
	ldr	r2, [fp, #-128]
	mov	r1, r3
	ldr	r0, .L119+48
	bl	printf
.L100:
	ldr	r3, .L119
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L118
	bl	__stack_chk_fail
.L118:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L120:
	.align	2
.L119:
	.word	.LC45
	.word	.LC38
	.word	.LC39
	.word	.LC30
	.word	.LC33
	.word	.LC21
	.word	.LC40
	.word	locks
	.word	fileCount
	.word	.LC41
	.word	.LC42
	.word	.LC43
	.word	.LC44
	.size	exec_READ, .-exec_READ
	.section	.rodata
	.align	2
.LC46:
	.ascii	"[thread %u] Delete \"%s\" file\012\000"
	.align	2
.LC47:
	.ascii	"ACK\012\000"
	.align	2
.LC48:
	.ascii	"[thread %u] SENT: ACK\012\000"
	.align	2
.LC49:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	exec_DELETE
	.syntax unified
	.arm
	.fpu softvfp
	.type	exec_DELETE, %function
exec_DELETE:
	@ args = 0, pretend = 0, frame = 136
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #140
	str	r0, [fp, #-144]
	str	r1, [fp, #-148]
	ldr	r3, .L135
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, .L135+4
	str	r3, [fp, #-128]
	ldr	r0, [fp, #-128]
	bl	strlen
	mov	r4, r0
	ldr	r0, [fp, #-148]
	bl	strlen
	mov	r3, r0
	add	r3, r4, r3
	add	r3, r3, #1
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-124]
	ldr	r0, [fp, #-128]
	bl	strlen
	mov	r4, r0
	ldr	r0, [fp, #-148]
	bl	strlen
	mov	r3, r0
	add	r3, r4, r3
	add	r3, r3, #1
	ldr	r2, [fp, #-124]
	mov	r0, r2
	mov	r2, r3
	mov	r1, #0
	bl	memset
	ldr	r1, [fp, #-128]
	ldr	r0, [fp, #-124]
	bl	strcpy
	ldr	r1, [fp, #-148]
	ldr	r0, [fp, #-124]
	bl	strcat
	sub	r3, fp, #108
	mov	r1, r3
	ldr	r0, [fp, #-124]
	bl	lstat
	str	r0, [fp, #-120]
	ldr	r3, [fp, #-120]
	cmp	r3, #0
	bne	.L122
	ldr	r3, [fp, #-92]
	and	r3, r3, #61440
	cmp	r3, #32768
	bne	.L122
	mov	r3, #0
	str	r3, [fp, #-132]
	b	.L123
.L126:
	ldr	r1, .L135+8
	ldr	r2, [fp, #-132]
	mov	r3, r2
	lsl	r3, r3, #4
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #100
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #49
	bne	.L124
	ldr	r2, [fp, #-132]
	mov	r3, r2
	lsl	r3, r3, #4
	add	r3, r3, r2
	lsl	r3, r3, #3
	ldr	r2, .L135+8
	add	r3, r3, r2
	ldr	r1, [fp, #-148]
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L124
	ldr	r2, [fp, #-132]
	mov	r3, r2
	lsl	r3, r3, #4
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r3, #120
	ldr	r2, .L135+8
	add	r3, r3, r2
	mov	r0, r3
	bl	sem_wait
	b	.L127
.L124:
	ldr	r3, [fp, #-132]
	add	r3, r3, #1
	str	r3, [fp, #-132]
.L123:
	ldr	r3, .L135+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-132]
	cmp	r2, r3
	blt	.L126
.L127:
	ldr	r2, [fp, #-132]
	mov	r3, r2
	lsl	r3, r3, #4
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r3, #104
	ldr	r2, .L135+8
	add	r3, r3, r2
	sub	r2, fp, #136
	mov	r1, r2
	mov	r0, r3
	bl	sem_getvalue
	ldr	r3, [fp, #-136]
	cmp	r3, #20
	bne	.L127
	ldr	r0, .L135+16
	bl	sem_wait
	ldr	r0, [fp, #-124]
	bl	remove
	mov	r3, r0
	cmp	r3, #0
	bne	.L128
	bl	pthread_self
	mov	r3, r0
	ldr	r2, [fp, #-148]
	mov	r1, r3
	ldr	r0, .L135+20
	bl	printf
	ldr	r1, .L135+8
	ldr	r2, [fp, #-132]
	mov	r3, r2
	lsl	r3, r3, #4
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #100
	mov	r2, #48
	strb	r2, [r3]
	ldr	r2, [fp, #-132]
	mov	r3, r2
	lsl	r3, r3, #4
	add	r3, r3, r2
	lsl	r3, r3, #3
	ldr	r2, .L135+8
	add	r3, r3, r2
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, .L135+12
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L135+12
	str	r3, [r2]
	ldr	r3, [fp, #-144]
	ldr	r0, [r3]
	mov	r3, #0
	mov	r2, #4
	ldr	r1, .L135+24
	bl	send
	str	r0, [fp, #-116]
	mov	r0, #0
	bl	fflush
	ldr	r3, [fp, #-116]
	cmp	r3, #4
	beq	.L129
	ldr	r0, .L135+28
	bl	perror
	b	.L121
.L129:
	bl	pthread_self
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L135+32
	bl	printf
.L128:
	ldr	r2, [fp, #-132]
	mov	r3, r2
	lsl	r3, r3, #4
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r3, #120
	ldr	r2, .L135+8
	add	r3, r3, r2
	mov	r0, r3
	bl	sem_post
	ldr	r0, .L135+16
	bl	sem_post
	b	.L121
.L122:
	ldr	r3, .L135+36
	str	r3, [fp, #-112]
	ldr	r3, [fp, #-144]
	ldr	r4, [r3]
	ldr	r0, [fp, #-112]
	bl	strlen
	mov	r2, r0
	mov	r3, #0
	ldr	r1, [fp, #-112]
	mov	r0, r4
	bl	send
	str	r0, [fp, #-116]
	mov	r0, #0
	bl	fflush
	ldr	r0, [fp, #-112]
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-116]
	cmp	r2, r3
	beq	.L132
	ldr	r0, .L135+28
	bl	perror
	b	.L121
.L132:
	bl	pthread_self
	mov	r3, r0
	ldr	r2, [fp, #-112]
	mov	r1, r3
	ldr	r0, .L135+40
	bl	printf
.L121:
	ldr	r3, .L135
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L134
	bl	__stack_chk_fail
.L134:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L136:
	.align	2
.L135:
	.word	.LC49
	.word	.LC38
	.word	locks
	.word	fileCount
	.word	tLock
	.word	.LC46
	.word	.LC47
	.word	.LC30
	.word	.LC48
	.word	.LC43
	.word	.LC44
	.size	exec_DELETE, .-exec_DELETE
	.section	.rodata
	.align	2
.LC50:
	.ascii	"ERROR: FILE EXISTS\012\000"
	.align	2
.LC51:
	.ascii	"ERROR: file storage capacity reached\012\000"
	.align	2
.LC52:
	.ascii	"w\000"
	.align	2
.LC53:
	.ascii	"ERROR: couldn't write to file (on server)\012\000"
	.align	2
.LC54:
	.ascii	"fwrite() failed\000"
	.align	2
.LC55:
	.ascii	"[thread %u] Transferred file (%d bytes)\012\000"
	.align	2
.LC56:
	.ascii	"ERROR: file creation failed\012\000"
	.align	2
.LC57:
	.ascii	"fopen() failed\000"
	.align	2
.LC58:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	exec_ADD
	.syntax unified
	.arm
	.fpu softvfp
	.type	exec_ADD, %function
exec_ADD:
	@ args = 0, pretend = 0, frame = 160
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #164
	str	r0, [fp, #-160]
	str	r1, [fp, #-164]
	str	r2, [fp, #-168]
	str	r3, [fp, #-172]
	ldr	r3, .L157
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, .L157+4
	str	r3, [fp, #-148]
	ldr	r0, [fp, #-148]
	bl	strlen
	mov	r4, r0
	ldr	r0, [fp, #-164]
	bl	strlen
	mov	r3, r0
	add	r3, r4, r3
	add	r3, r3, #1
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-144]
	ldr	r0, [fp, #-148]
	bl	strlen
	mov	r4, r0
	ldr	r0, [fp, #-164]
	bl	strlen
	mov	r3, r0
	add	r3, r4, r3
	add	r3, r3, #1
	ldr	r2, [fp, #-144]
	mov	r0, r2
	mov	r2, r3
	mov	r1, #0
	bl	memset
	ldr	r1, [fp, #-148]
	ldr	r0, [fp, #-144]
	bl	strcpy
	ldr	r1, [fp, #-164]
	ldr	r0, [fp, #-144]
	bl	strcat
	sub	r3, fp, #108
	mov	r1, r3
	ldr	r0, [fp, #-144]
	bl	lstat
	str	r0, [fp, #-140]
	ldr	r3, [fp, #-140]
	cmp	r3, #0
	bne	.L138
	ldr	r3, .L157+8
	str	r3, [fp, #-112]
	ldr	r3, [fp, #-160]
	ldr	r4, [r3]
	ldr	r0, [fp, #-112]
	bl	strlen
	mov	r2, r0
	mov	r3, #0
	ldr	r1, [fp, #-112]
	mov	r0, r4
	bl	send
	str	r0, [fp, #-132]
	mov	r0, #0
	bl	fflush
	ldr	r0, [fp, #-112]
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-132]
	cmp	r2, r3
	beq	.L139
	ldr	r0, .L157+12
	bl	perror
	b	.L137
.L139:
	bl	pthread_self
	mov	r3, r0
	ldr	r2, [fp, #-112]
	mov	r1, r3
	ldr	r0, .L157+16
	bl	printf
	b	.L137
.L138:
	ldr	r3, .L157+20
	ldr	r3, [r3]
	cmp	r3, #1000
	bge	.L142
	ldr	r3, .L157+20
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L157+20
	str	r3, [r2]
	mov	r3, #0
	str	r3, [fp, #-152]
	b	.L143
.L146:
	ldr	r1, .L157+24
	ldr	r2, [fp, #-152]
	mov	r3, r2
	lsl	r3, r3, #4
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #100
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #48
	bne	.L144
	ldr	r0, .L157+28
	bl	sem_wait
	ldr	r1, .L157+24
	ldr	r2, [fp, #-152]
	mov	r3, r2
	lsl	r3, r3, #4
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #100
	mov	r2, #49
	strb	r2, [r3]
	ldr	r2, [fp, #-152]
	mov	r3, r2
	lsl	r3, r3, #4
	add	r3, r3, r2
	lsl	r3, r3, #3
	ldr	r2, .L157+24
	add	r3, r3, r2
	ldr	r1, [fp, #-164]
	mov	r0, r3
	bl	strcpy
	ldr	r0, .L157+28
	bl	sem_post
	b	.L147
.L144:
	ldr	r3, [fp, #-152]
	add	r3, r3, #1
	str	r3, [fp, #-152]
.L143:
	ldr	r3, .L157+20
	ldr	r3, [r3]
	ldr	r2, [fp, #-152]
	cmp	r2, r3
	blt	.L146
	b	.L147
.L142:
	ldr	r3, .L157+32
	str	r3, [fp, #-136]
	ldr	r3, [fp, #-160]
	ldr	r4, [r3]
	ldr	r0, [fp, #-136]
	bl	strlen
	mov	r2, r0
	mov	r3, #0
	ldr	r1, [fp, #-136]
	mov	r0, r4
	bl	send
	str	r0, [fp, #-132]
	mov	r0, #0
	bl	fflush
	ldr	r0, [fp, #-136]
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-132]
	cmp	r2, r3
	beq	.L148
	ldr	r0, .L157+12
	bl	perror
	b	.L137
.L148:
	bl	pthread_self
	mov	r3, r0
	ldr	r2, [fp, #-136]
	mov	r1, r3
	ldr	r0, .L157+16
	bl	printf
.L147:
	ldr	r2, [fp, #-152]
	mov	r3, r2
	lsl	r3, r3, #4
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r3, #120
	ldr	r2, .L157+24
	add	r3, r3, r2
	mov	r0, r3
	bl	sem_wait
	ldr	r1, .L157+36
	ldr	r0, [fp, #-144]
	bl	fopen
	str	r0, [fp, #-128]
	ldr	r3, [fp, #-128]
	cmp	r3, #0
	beq	.L149
	ldr	r0, [fp, #-172]
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-128]
	mov	r1, #1
	ldr	r0, [fp, #-172]
	bl	fwrite
	mov	r3, r0
	str	r3, [fp, #-120]
	ldr	r3, [fp, #-120]
	cmp	r3, #0
	bne	.L150
	ldr	r3, .L157+40
	str	r3, [fp, #-116]
	ldr	r3, [fp, #-160]
	ldr	r4, [r3]
	ldr	r0, [fp, #-116]
	bl	strlen
	mov	r2, r0
	mov	r3, #0
	ldr	r1, [fp, #-116]
	mov	r0, r4
	bl	send
	str	r0, [fp, #-132]
	mov	r0, #0
	bl	fflush
	ldr	r0, [fp, #-116]
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-132]
	cmp	r2, r3
	beq	.L151
	ldr	r0, .L157+12
	bl	perror
	b	.L137
.L151:
	bl	pthread_self
	mov	r3, r0
	ldr	r2, [fp, #-116]
	mov	r1, r3
	ldr	r0, .L157+16
	bl	printf
	ldr	r0, .L157+44
	bl	perror
	b	.L137
.L150:
	bl	pthread_self
	mov	r4, r0
	ldr	r0, [fp, #-172]
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L157+48
	bl	printf
	ldr	r3, [fp, #-160]
	ldr	r0, [r3]
	mov	r3, #0
	mov	r2, #4
	ldr	r1, .L157+52
	bl	send
	str	r0, [fp, #-132]
	mov	r0, #0
	bl	fflush
	ldr	r3, [fp, #-132]
	cmp	r3, #4
	beq	.L152
	ldr	r0, .L157+12
	bl	perror
	b	.L137
.L152:
	bl	pthread_self
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L157+56
	bl	printf
	ldr	r0, [fp, #-128]
	bl	fclose
	ldr	r2, [fp, #-152]
	mov	r3, r2
	lsl	r3, r3, #4
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r3, #120
	ldr	r2, .L157+24
	add	r3, r3, r2
	mov	r0, r3
	bl	sem_post
	b	.L137
.L149:
	ldr	r3, .L157+60
	str	r3, [fp, #-124]
	ldr	r3, [fp, #-160]
	ldr	r4, [r3]
	ldr	r0, [fp, #-124]
	bl	strlen
	mov	r2, r0
	mov	r3, #0
	ldr	r1, [fp, #-124]
	mov	r0, r4
	bl	send
	str	r0, [fp, #-132]
	mov	r0, #0
	bl	fflush
	ldr	r0, [fp, #-124]
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-132]
	cmp	r2, r3
	beq	.L154
	ldr	r0, .L157+12
	bl	perror
	b	.L137
.L154:
	ldr	r0, .L157+64
	bl	perror
	bl	pthread_self
	mov	r3, r0
	ldr	r2, [fp, #-124]
	mov	r1, r3
	ldr	r0, .L157+16
	bl	printf
	nop
.L137:
	ldr	r3, .L157
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L156
	bl	__stack_chk_fail
.L156:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L158:
	.align	2
.L157:
	.word	.LC58
	.word	.LC38
	.word	.LC50
	.word	.LC30
	.word	.LC44
	.word	fileCount
	.word	locks
	.word	tLock
	.word	.LC51
	.word	.LC52
	.word	.LC53
	.word	.LC54
	.word	.LC55
	.word	.LC47
	.word	.LC48
	.word	.LC56
	.word	.LC57
	.size	exec_ADD, .-exec_ADD
	.section	.rodata
	.align	2
.LC59:
	.ascii	"a\000"
	.align	2
.LC60:
	.ascii	"[thread %u] Appended to file \"%s\" (%d bytes)\012\000"
	.align	2
.LC61:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	exec_APPEND
	.syntax unified
	.arm
	.fpu softvfp
	.type	exec_APPEND, %function
exec_APPEND:
	@ args = 0, pretend = 0, frame = 160
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #164
	str	r0, [fp, #-160]
	str	r1, [fp, #-164]
	str	r2, [fp, #-168]
	str	r3, [fp, #-172]
	ldr	r3, .L178
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, .L178+4
	str	r3, [fp, #-144]
	ldr	r0, [fp, #-144]
	bl	strlen
	mov	r4, r0
	ldr	r0, [fp, #-164]
	bl	strlen
	mov	r3, r0
	add	r3, r4, r3
	add	r3, r3, #1
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-140]
	ldr	r0, [fp, #-144]
	bl	strlen
	mov	r4, r0
	ldr	r0, [fp, #-164]
	bl	strlen
	mov	r3, r0
	add	r3, r4, r3
	add	r3, r3, #1
	ldr	r2, [fp, #-140]
	mov	r0, r2
	mov	r2, r3
	mov	r1, #0
	bl	memset
	ldr	r1, [fp, #-144]
	ldr	r0, [fp, #-140]
	bl	strcpy
	ldr	r1, [fp, #-164]
	ldr	r0, [fp, #-140]
	bl	strcat
	sub	r3, fp, #108
	mov	r1, r3
	ldr	r0, [fp, #-140]
	bl	lstat
	str	r0, [fp, #-136]
	ldr	r3, [fp, #-136]
	cmp	r3, #0
	bne	.L160
	mov	r3, #0
	str	r3, [fp, #-148]
	b	.L161
.L164:
	ldr	r1, .L178+8
	ldr	r2, [fp, #-148]
	mov	r3, r2
	lsl	r3, r3, #4
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #100
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #49
	bne	.L162
	ldr	r2, [fp, #-148]
	mov	r3, r2
	lsl	r3, r3, #4
	add	r3, r3, r2
	lsl	r3, r3, #3
	ldr	r2, .L178+8
	add	r3, r3, r2
	ldr	r1, [fp, #-164]
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L162
	ldr	r0, .L178+12
	bl	sem_wait
	b	.L165
.L162:
	ldr	r3, [fp, #-148]
	add	r3, r3, #1
	str	r3, [fp, #-148]
.L161:
	ldr	r3, .L178+16
	ldr	r3, [r3]
	ldr	r2, [fp, #-148]
	cmp	r2, r3
	blt	.L164
.L165:
	ldr	r2, [fp, #-148]
	mov	r3, r2
	lsl	r3, r3, #4
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r3, #104
	ldr	r2, .L178+8
	add	r3, r3, r2
	sub	r2, fp, #152
	mov	r1, r2
	mov	r0, r3
	bl	sem_getvalue
	ldr	r3, [fp, #-152]
	cmp	r3, #20
	bne	.L165
	ldr	r2, [fp, #-148]
	mov	r3, r2
	lsl	r3, r3, #4
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r3, #120
	ldr	r2, .L178+8
	add	r3, r3, r2
	mov	r0, r3
	bl	sem_wait
	ldr	r1, .L178+20
	ldr	r0, [fp, #-140]
	bl	fopen
	str	r0, [fp, #-124]
	ldr	r3, [fp, #-124]
	cmp	r3, #0
	beq	.L166
	ldr	r0, [fp, #-172]
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-124]
	mov	r1, #1
	ldr	r0, [fp, #-172]
	bl	fwrite
	mov	r3, r0
	str	r3, [fp, #-116]
	ldr	r3, [fp, #-116]
	cmp	r3, #0
	bne	.L167
	ldr	r3, .L178+24
	str	r3, [fp, #-112]
	ldr	r3, [fp, #-160]
	ldr	r4, [r3]
	ldr	r0, [fp, #-112]
	bl	strlen
	mov	r2, r0
	mov	r3, #0
	ldr	r1, [fp, #-112]
	mov	r0, r4
	bl	send
	str	r0, [fp, #-128]
	mov	r0, #0
	bl	fflush
	ldr	r0, [fp, #-112]
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-128]
	cmp	r2, r3
	beq	.L168
	ldr	r0, .L178+28
	bl	perror
	b	.L159
.L168:
	bl	pthread_self
	mov	r3, r0
	ldr	r2, [fp, #-112]
	mov	r1, r3
	ldr	r0, .L178+32
	bl	printf
	ldr	r0, .L178+36
	bl	perror
	b	.L159
.L167:
	bl	pthread_self
	mov	r1, r0
	ldr	r3, [fp, #-168]
	ldr	r3, [r3]
	ldr	r2, [fp, #-164]
	ldr	r0, .L178+40
	bl	printf
	ldr	r3, [fp, #-160]
	ldr	r0, [r3]
	mov	r3, #0
	mov	r2, #4
	ldr	r1, .L178+44
	bl	send
	str	r0, [fp, #-128]
	mov	r0, #0
	bl	fflush
	ldr	r3, [fp, #-128]
	cmp	r3, #4
	beq	.L170
	ldr	r0, .L178+28
	bl	perror
	b	.L159
.L170:
	bl	pthread_self
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L178+48
	bl	printf
	ldr	r0, [fp, #-124]
	bl	fclose
	ldr	r0, .L178+12
	bl	sem_post
	ldr	r2, [fp, #-148]
	mov	r3, r2
	lsl	r3, r3, #4
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r3, #120
	ldr	r2, .L178+8
	add	r3, r3, r2
	mov	r0, r3
	bl	sem_post
	b	.L159
.L166:
	ldr	r3, .L178+52
	str	r3, [fp, #-120]
	ldr	r3, [fp, #-160]
	ldr	r4, [r3]
	ldr	r0, [fp, #-120]
	bl	strlen
	mov	r2, r0
	mov	r3, #0
	ldr	r1, [fp, #-120]
	mov	r0, r4
	bl	send
	str	r0, [fp, #-128]
	mov	r0, #0
	bl	fflush
	ldr	r0, [fp, #-120]
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-128]
	cmp	r2, r3
	beq	.L172
	ldr	r0, .L178+28
	bl	perror
	b	.L159
.L172:
	bl	pthread_self
	mov	r3, r0
	ldr	r2, [fp, #-120]
	mov	r1, r3
	ldr	r0, .L178+32
	bl	printf
	ldr	r0, .L178+56
	bl	perror
	b	.L159
.L160:
	ldr	r3, .L178+60
	str	r3, [fp, #-132]
	ldr	r3, [fp, #-160]
	ldr	r4, [r3]
	ldr	r0, [fp, #-132]
	bl	strlen
	mov	r2, r0
	mov	r3, #0
	ldr	r1, [fp, #-132]
	mov	r0, r4
	bl	send
	str	r0, [fp, #-128]
	mov	r0, #0
	bl	fflush
	ldr	r0, [fp, #-132]
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-128]
	cmp	r2, r3
	beq	.L175
	ldr	r0, .L178+28
	bl	perror
	b	.L159
.L175:
	bl	pthread_self
	mov	r3, r0
	ldr	r2, [fp, #-132]
	mov	r1, r3
	ldr	r0, .L178+32
	bl	printf
.L159:
	ldr	r3, .L178
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L177
	bl	__stack_chk_fail
.L177:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L179:
	.align	2
.L178:
	.word	.LC61
	.word	.LC38
	.word	locks
	.word	tLock
	.word	fileCount
	.word	.LC59
	.word	.LC53
	.word	.LC30
	.word	.LC44
	.word	.LC54
	.word	.LC60
	.word	.LC47
	.word	.LC48
	.word	.LC56
	.word	.LC57
	.word	.LC43
	.size	exec_APPEND, .-exec_APPEND
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
