	.file	"893388.c"
	.intel_syntax noprefix
	.text
	.globl	client_message
	.bss
	.align 32
	.type	client_message, @object
	.size	client_message, 2000
client_message:
	.zero	2000
	.globl	buffer
	.align 32
	.type	buffer, @object
	.size	buffer, 1024
buffer:
	.zero	1024
	.globl	lock
	.align 32
	.type	lock, @object
	.size	lock, 40
lock:
	.zero	40
	.globl	logfp
	.align 8
	.type	logfp, @object
	.size	logfp, 8
logfp:
	.zero	8
	.globl	errfp
	.align 8
	.type	errfp, @object
	.size	errfp, 8
errfp:
	.zero	8
	.section	.rodata
.LC0:
	.string	"mkdir -p %s"
	.text
	.globl	createDir
	.type	createDir, @function
createDir:
.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, 112
	mov	QWORD PTR -104[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -96[rbp], 48
	mov	QWORD PTR -88[rbp], 0
	mov	QWORD PTR -80[rbp], 0
	mov	QWORD PTR -72[rbp], 0
	mov	QWORD PTR -64[rbp], 0
	mov	QWORD PTR -56[rbp], 0
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	QWORD PTR -24[rbp], 0
	mov	rdx, QWORD PTR -104[rbp]
	lea	rax, -96[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -96[rbp]
	mov	rdi, rax
	call	system@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L2
	call	__stack_chk_fail@PLT
.L2:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	createDir, .-createDir
	.section	.rodata
.LC1:
	.string	"21:53:20"
.LC2:
	.string	"Dec 18 2024"
.LC3:
	.string	"%s %s\tReceive File Error\n"
.LC4:
	.string	"%s %s\tWrite File Error\n"
	.text
	.globl	writefile
	.type	writefile, @function
writefile:
.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 48
	mov	DWORD PTR -4132[rbp], edi
	mov	QWORD PTR -4144[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -4128[rbp], 0
	mov	QWORD PTR -4112[rbp], 0
	mov	QWORD PTR -4104[rbp], 0
	lea	rdx, -4096[rbp]
	mov	eax, 0
	mov	ecx, 510
	mov	rdi, rdx
	rep stosq
	jmp	.L4
.L7:
	mov	rax, QWORD PTR -4120[rbp]
	add	QWORD PTR -4128[rbp], rax
	cmp	QWORD PTR -4120[rbp], -1
	jne	.L5
	mov	rax, QWORD PTR errfp[rip]
	lea	rcx, .LC1[rip]
	lea	rdx, .LC2[rip]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	mov	rdx, QWORD PTR -4120[rbp]
	mov	rcx, QWORD PTR -4144[rbp]
	lea	rax, -4112[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	rdx, QWORD PTR -4120[rbp]
	cmp	rax, rdx
	je	.L6
	mov	rax, QWORD PTR errfp[rip]
	lea	rcx, .LC1[rip]
	lea	rdx, .LC2[rip]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	lea	rax, -4112[rbp]
	mov	edx, 4096
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
.L4:
	lea	rsi, -4112[rbp]
	mov	eax, DWORD PTR -4132[rbp]
	mov	ecx, 0
	mov	edx, 4096
	mov	edi, eax
	call	recv@PLT
	mov	QWORD PTR -4120[rbp], rax
	cmp	QWORD PTR -4120[rbp], 0
	jg	.L7
	mov	rax, QWORD PTR -4128[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	writefile, .-writefile
	.section	.rodata
.LC5:
	.string	"%s %s\tCan't receive hostname\n"
.LC6:
	.string	"%s %s\tCan't receive filename\n"
.LC7:
	.string	"wb"
.LC8:
	.string	"%s %s\tCan't open file\n"
	.align 8
.LC9:
	.string	"%s %s\tStart receive file: %s from %s\n"
	.align 8
.LC10:
	.string	"%s %s\tReceive Success, NumBytes = %ld\n"
	.text
	.globl	socketThread
	.type	socketThread, @function
socketThread:
.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 64
	mov	QWORD PTR -12344[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -12344[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -12324[rbp], eax
	mov	QWORD PTR -12304[rbp], 0
	mov	QWORD PTR -12296[rbp], 0
	lea	rdx, -12288[rbp]
	mov	eax, 0
	mov	ecx, 510
	mov	rdi, rdx
	rep stosq
	mov	QWORD PTR -8208[rbp], 0
	mov	QWORD PTR -8200[rbp], 0
	lea	rdx, -8192[rbp]
	mov	eax, 0
	mov	ecx, 510
	mov	rdi, rdx
	rep stosq
	mov	QWORD PTR -4112[rbp], 0
	mov	QWORD PTR -4104[rbp], 0
	lea	rdx, -4096[rbp]
	mov	eax, 0
	mov	ecx, 510
	mov	rdi, rdx
	rep stosq
	lea	rsi, -12304[rbp]
	mov	eax, DWORD PTR -12324[rbp]
	mov	ecx, 0
	mov	edx, 4096
	mov	edi, eax
	call	recv@PLT
	cmp	rax, -1
	jne	.L11
	mov	rax, QWORD PTR errfp[rip]
	lea	rcx, .LC1[rip]
	lea	rdx, .LC2[rip]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L11:
	lea	rsi, -8208[rbp]
	mov	eax, DWORD PTR -12324[rbp]
	mov	ecx, 0
	mov	edx, 4096
	mov	edi, eax
	call	recv@PLT
	cmp	rax, -1
	jne	.L12
	mov	rax, QWORD PTR errfp[rip]
	lea	rcx, .LC1[rip]
	lea	rdx, .LC2[rip]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L12:
	lea	rdx, -8208[rbp]
	lea	rax, -4112[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	lea	rax, -4112[rbp]
	mov	rdi, rax
	call	dirname@PLT
	mov	rdi, rax
	call	createDir
	lea	rax, -8208[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -12320[rbp], rax
	cmp	QWORD PTR -12320[rbp], 0
	jne	.L13
	mov	rax, QWORD PTR errfp[rip]
	lea	rcx, .LC1[rip]
	lea	rdx, .LC2[rip]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L13:
	mov	rax, QWORD PTR logfp[rip]
	lea	rcx, -12304[rbp]
	lea	rdx, -8208[rbp]
	mov	r9, rcx
	mov	r8, rdx
	lea	rcx, .LC1[rip]
	lea	rdx, .LC2[rip]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rdx, QWORD PTR -12320[rbp]
	mov	eax, DWORD PTR -12324[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	writefile
	mov	QWORD PTR -12312[rbp], rax
	mov	rax, QWORD PTR logfp[rip]
	mov	rdx, QWORD PTR -12312[rbp]
	mov	r8, rdx
	lea	rcx, .LC1[rip]
	lea	rdx, .LC2[rip]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -12320[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, DWORD PTR -12324[rbp]
	mov	edi, eax
	call	close@PLT
	mov	edi, 0
	call	pthread_exit@PLT
	.cfi_endproc
.LFE8:
	.size	socketThread, .-socketThread
	.section	.rodata
.LC11:
	.string	"a+"
.LC12:
	.string	"/var/log/Couch-server.log"
.LC13:
	.string	"%s %s\tCan't open LOG file %s\n"
.LC14:
	.string	"\n%s %s\tStarting\n"
	.align 8
.LC15:
	.string	"/var/log/Couch-server-error.log"
	.align 8
.LC16:
	.string	"%s %s\tCan't open ERROR LOG file %s\n"
.LC17:
	.string	"10.0.0.150"
.LC18:
	.string	"%s %s\tListening\n"
.LC19:
	.string	"%s %s\tError\n"
	.align 8
.LC20:
	.string	"%s %s\tFailed to create thread\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 720
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rsi, .LC11[rip]
	lea	rdi, .LC12[rip]
	call	fopen@PLT
	mov	QWORD PTR logfp[rip], rax
	mov	rax, QWORD PTR logfp[rip]
	test	rax, rax
	jne	.L16
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR errfp[rip]
	mov	r8, rdx
	lea	rcx, .LC1[rip]
	lea	rdx, .LC2[rip]
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L16:
	mov	rax, QWORD PTR logfp[rip]
	lea	rcx, .LC1[rip]
	lea	rdx, .LC2[rip]
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rsi, .LC11[rip]
	lea	rdi, .LC15[rip]
	call	fopen@PLT
	mov	QWORD PTR errfp[rip], rax
	mov	rax, QWORD PTR logfp[rip]
	test	rax, rax
	jne	.L17
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR errfp[rip]
	mov	r8, rdx
	lea	rcx, .LC1[rip]
	lea	rdx, .LC2[rip]
	lea	rsi, .LC16[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L17:
	mov	rax, QWORD PTR errfp[rip]
	lea	rcx, .LC1[rip]
	lea	rdx, .LC2[rip]
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR logfp[rip]
	mov	ecx, 0
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	setvbuf@PLT
	mov	rax, QWORD PTR errfp[rip]
	mov	ecx, 0
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	setvbuf@PLT
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -708[rbp], eax
	mov	WORD PTR -704[rbp], 2
	mov	edi, 7799
	call	htons@PLT
	mov	WORD PTR -702[rbp], ax
	lea	rdi, .LC17[rip]
	call	inet_addr@PLT
	mov	DWORD PTR -700[rbp], eax
	lea	rax, -704[rbp]
	add	rax, 8
	mov	edx, 8
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rcx, -704[rbp]
	mov	eax, DWORD PTR -708[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	lea	rax, -688[rbp]
	mov	rdi, rax
	call	pthread_attr_init@PLT
	lea	rax, -688[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	pthread_attr_setdetachstate@PLT
	mov	eax, DWORD PTR -708[rbp]
	mov	esi, 50
	mov	edi, eax
	call	listen@PLT
	test	eax, eax
	jne	.L18
	mov	rax, QWORD PTR logfp[rip]
	lea	rcx, .LC1[rip]
	lea	rdx, .LC2[rip]
	lea	rsi, .LC18[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L19
.L18:
	mov	rax, QWORD PTR logfp[rip]
	lea	rcx, .LC1[rip]
	lea	rdx, .LC2[rip]
	lea	rsi, .LC19[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L19:
	mov	DWORD PTR -712[rbp], 0
.L24:
	mov	DWORD PTR -716[rbp], 128
	lea	rdx, -716[rbp]
	lea	rcx, -624[rbp]
	mov	eax, DWORD PTR -708[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -720[rbp], eax
	mov	eax, DWORD PTR -712[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -712[rbp], edx
	lea	rdx, -496[rbp]
	cdqe
	sal	rax, 3
	lea	rdi, [rdx+rax]
	lea	rdx, -720[rbp]
	lea	rax, -688[rbp]
	mov	rcx, rdx
	lea	rdx, socketThread[rip]
	mov	rsi, rax
	call	pthread_create@PLT
	test	eax, eax
	je	.L20
	mov	rax, QWORD PTR logfp[rip]
	lea	rcx, .LC1[rip]
	lea	rdx, .LC2[rip]
	lea	rsi, .LC20[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L20:
	cmp	DWORD PTR -712[rbp], 49
	jle	.L24
	mov	DWORD PTR -712[rbp], 0
	jmp	.L22
.L23:
	mov	eax, DWORD PTR -712[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -712[rbp], edx
	cdqe
	mov	rax, QWORD PTR -496[rbp+rax*8]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
.L22:
	cmp	DWORD PTR -712[rbp], 49
	jle	.L23
	mov	DWORD PTR -712[rbp], 0
	jmp	.L24
	.cfi_endproc
.LFE9:
	.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	"893388.c"
	.text
	.comm	client_message,2000,4
	.comm	buffer,1024,4
	.global	lock
	.bss
	.align	2
	.type	lock, %object
	.size	lock, 24
lock:
	.space	24
	.comm	logfp,4,4
	.comm	errfp,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"mkdir -p %s\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	createDir
	.syntax unified
	.arm
	.fpu softvfp
	.type	createDir, %function
createDir:
	@ args = 0, pretend = 0, frame = 96
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #96
	str	r0, [fp, #-96]
	ldr	r3, .L3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #48
	str	r3, [fp, #-88]
	sub	r3, fp, #84
	mov	r2, #76
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #88
	ldr	r2, [fp, #-96]
	ldr	r1, .L3+4
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #88
	mov	r0, r3
	bl	system
	nop
	ldr	r3, .L3
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L2
	bl	__stack_chk_fail
.L2:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	.LC1
	.word	.LC0
	.size	createDir, .-createDir
	.section	.rodata
	.align	2
.LC2:
	.ascii	"20:56:45\000"
	.align	2
.LC3:
	.ascii	"Dec 18 2024\000"
	.align	2
.LC4:
	.ascii	"%s %s\011Receive File Error\012\000"
	.align	2
.LC5:
	.ascii	"%s %s\011Write File Error\012\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	writefile
	.syntax unified
	.arm
	.fpu softvfp
	.type	writefile, %function
writefile:
	@ args = 0, pretend = 0, frame = 4120
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #4096
	sub	sp, sp, #28
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r0, [r3, #-20]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r1, [r3, #-24]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-12]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-4]
	mov	r0, r2
	ldr	r3, .L12+4
	mov	r2, r3
	mov	r1, #0
	bl	memset
	b	.L6
.L9:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r1, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r2, #-12]
	ldr	r3, [r3, #-8]
	add	r3, r2, r3
	str	r3, [r1, #-12]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	cmn	r3, #1
	bne	.L7
	ldr	r3, .L12+8
	ldr	r0, [r3]
	ldr	r3, .L12+12
	ldr	r2, .L12+16
	ldr	r1, .L12+20
	bl	fprintf
	mov	r0, #1
	bl	exit
.L7:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r3, #-8]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r0, fp, #4096
	sub	r0, r0, #12
	sub	r0, r0, #4
	ldr	r3, [r3, #-24]
	mov	r1, #1
	bl	fwrite
	mov	r2, r0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	cmp	r2, r3
	beq	.L8
	ldr	r3, .L12+8
	ldr	r0, [r3]
	ldr	r3, .L12+12
	ldr	r2, .L12+16
	ldr	r1, .L12+24
	bl	fprintf
	mov	r0, #1
	bl	exit
.L8:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #4096
	mov	r1, #0
	mov	r0, r3
	bl	memset
.L6:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r1, fp, #4096
	sub	r1, r1, #12
	sub	r1, r1, #4
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r0, r3
	mov	r3, #0
	mov	r2, #4096
	ldr	r0, [r0, #-20]
	bl	recv
	str	r0, [r4, #-8]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	cmp	r3, #0
	bgt	.L9
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC6
	.word	4092
	.word	errfp
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	writefile, .-writefile
	.section	.rodata
	.align	2
.LC7:
	.ascii	"%s %s\011Can't receive hostname\012\000"
	.align	2
.LC8:
	.ascii	"%s %s\011Can't receive filename\012\000"
	.align	2
.LC9:
	.ascii	"wb\000"
	.align	2
.LC10:
	.ascii	"%s %s\011Can't open file\012\000"
	.align	2
.LC11:
	.ascii	"%s %s\011Start receive file: %s from %s\012\000"
	.align	2
.LC12:
	.ascii	"%s %s\011Receive Success, NumBytes = %ld\012\000"
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	socketThread
	.syntax unified
	.arm
	.fpu softvfp
	.type	socketThread, %function
socketThread:
	@ args = 0, pretend = 0, frame = 12312
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12288
	sub	sp, sp, #36
	sub	r3, fp, #12288
	sub	r3, r3, #12
	str	r0, [r3, #-20]
	ldr	r3, .L19
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #12288
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #12288
	sub	r3, r3, #12
	ldr	r3, [r3, #-20]
	ldr	r3, [r3]
	str	r3, [r2, #-16]
	sub	r3, fp, #12288
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-4]
	mov	r0, r2
	ldr	r3, .L19+4
	mov	r2, r3
	mov	r1, #0
	bl	memset
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-4]
	mov	r0, r2
	ldr	r3, .L19+4
	mov	r2, r3
	mov	r1, #0
	bl	memset
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-4]
	mov	r0, r2
	ldr	r3, .L19+4
	mov	r2, r3
	mov	r1, #0
	bl	memset
	sub	r1, fp, #12288
	sub	r1, r1, #12
	sub	r1, r1, #4
	sub	r3, fp, #12288
	sub	r3, r3, #12
	mov	r0, r3
	mov	r3, #0
	mov	r2, #4096
	ldr	r0, [r0, #-16]
	bl	recv
	mov	r3, r0
	cmn	r3, #1
	bne	.L15
	ldr	r3, .L19+8
	ldr	r0, [r3]
	ldr	r3, .L19+12
	ldr	r2, .L19+16
	ldr	r1, .L19+20
	bl	fprintf
	mov	r0, #1
	bl	exit
.L15:
	sub	r1, fp, #8192
	sub	r1, r1, #12
	sub	r1, r1, #4
	sub	r3, fp, #12288
	sub	r3, r3, #12
	mov	r0, r3
	mov	r3, #0
	mov	r2, #4096
	ldr	r0, [r0, #-16]
	bl	recv
	mov	r3, r0
	cmn	r3, #1
	bne	.L16
	ldr	r3, .L19+8
	ldr	r0, [r3]
	ldr	r3, .L19+12
	ldr	r2, .L19+16
	ldr	r1, .L19+24
	bl	fprintf
	mov	r0, #1
	bl	exit
.L16:
	sub	r2, fp, #8192
	sub	r2, r2, #12
	sub	r2, r2, #4
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	dirname
	mov	r3, r0
	mov	r0, r3
	bl	createDir
	sub	r3, fp, #12288
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r1, .L19+28
	mov	r0, r3
	bl	fopen
	str	r0, [r4, #-12]
	sub	r3, fp, #12288
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	cmp	r3, #0
	bne	.L17
	ldr	r3, .L19+8
	ldr	r0, [r3]
	ldr	r3, .L19+12
	ldr	r2, .L19+16
	ldr	r1, .L19+32
	bl	fprintf
	mov	r0, #1
	bl	exit
.L17:
	ldr	r3, .L19+36
	ldr	r0, [r3]
	sub	r3, fp, #12288
	sub	r3, r3, #12
	sub	r3, r3, #4
	str	r3, [sp, #4]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r3, r3, #4
	str	r3, [sp]
	ldr	r3, .L19+12
	ldr	r2, .L19+16
	ldr	r1, .L19+40
	bl	fprintf
	sub	r3, fp, #12288
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #12288
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #12288
	sub	r3, r3, #12
	ldr	r1, [r2, #-12]
	ldr	r0, [r3, #-16]
	bl	writefile
	str	r0, [r4, #-8]
	ldr	r3, .L19+36
	ldr	r0, [r3]
	sub	r3, fp, #12288
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	str	r3, [sp]
	ldr	r3, .L19+12
	ldr	r2, .L19+16
	ldr	r1, .L19+44
	bl	fprintf
	sub	r3, fp, #12288
	sub	r3, r3, #12
	ldr	r0, [r3, #-12]
	bl	fclose
	sub	r3, fp, #12288
	sub	r3, r3, #12
	ldr	r0, [r3, #-16]
	bl	close
	mov	r0, #0
	bl	pthread_exit
.L20:
	.align	2
.L19:
	.word	.LC13
	.word	4092
	.word	errfp
	.word	.LC2
	.word	.LC3
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	logfp
	.word	.LC11
	.word	.LC12
	.size	socketThread, .-socketThread
	.section	.rodata
	.align	2
.LC14:
	.ascii	"a+\000"
	.align	2
.LC15:
	.ascii	"/var/log/Couch-server.log\000"
	.align	2
.LC16:
	.ascii	"%s %s\011Can't open LOG file %s\012\000"
	.align	2
.LC17:
	.ascii	"\012%s %s\011Starting\012\000"
	.align	2
.LC18:
	.ascii	"/var/log/Couch-server-error.log\000"
	.align	2
.LC19:
	.ascii	"%s %s\011Can't open ERROR LOG file %s\012\000"
	.align	2
.LC20:
	.ascii	"10.0.0.150\000"
	.align	2
.LC21:
	.ascii	"%s %s\011Listening\012\000"
	.align	2
.LC22:
	.ascii	"%s %s\011Error\012\000"
	.align	2
.LC23:
	.ascii	"%s %s\011Failed to create thread\012\000"
	.align	2
.LC24:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 440
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #452
	ldr	r3, .L32
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r1, .L32+4
	ldr	r0, .L32+8
	bl	fopen
	mov	r3, r0
	ldr	r2, .L32+12
	str	r3, [r2]
	ldr	r3, .L32+12
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L22
	ldr	r3, .L32+16
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	str	r3, [sp]
	ldr	r3, .L32+20
	ldr	r2, .L32+24
	ldr	r1, .L32+28
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L22:
	ldr	r3, .L32+12
	ldr	r0, [r3]
	ldr	r3, .L32+20
	ldr	r2, .L32+24
	ldr	r1, .L32+32
	bl	fprintf
	ldr	r1, .L32+4
	ldr	r0, .L32+36
	bl	fopen
	mov	r3, r0
	ldr	r2, .L32+16
	str	r3, [r2]
	ldr	r3, .L32+12
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L23
	ldr	r3, .L32+16
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	str	r3, [sp]
	ldr	r3, .L32+20
	ldr	r2, .L32+24
	ldr	r1, .L32+40
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L23:
	ldr	r3, .L32+16
	ldr	r0, [r3]
	ldr	r3, .L32+20
	ldr	r2, .L32+24
	ldr	r1, .L32+32
	bl	fprintf
	ldr	r3, .L32+12
	ldr	r0, [r3]
	mov	r3, #0
	mov	r2, #2
	mov	r1, #0
	bl	setvbuf
	ldr	r3, .L32+16
	ldr	r0, [r3]
	mov	r3, #0
	mov	r2, #2
	mov	r1, #0
	bl	setvbuf
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-440]
	sub	r3, fp, #12
	sub	r3, r3, #424
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r0, .L32+44
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #12
	sub	r3, r3, #424
	strh	r2, [r3, #2]	@ movhi
	ldr	r0, .L32+48
	bl	inet_addr
	mov	r3, r0
	str	r3, [fp, #-432]
	sub	r3, fp, #436
	add	r3, r3, #8
	mov	r2, #8
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #436
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-440]
	bl	bind
	sub	r3, fp, #420
	mov	r0, r3
	bl	pthread_attr_init
	sub	r3, fp, #420
	mov	r1, #1
	mov	r0, r3
	bl	pthread_attr_setdetachstate
	mov	r1, #50
	ldr	r0, [fp, #-440]
	bl	listen
	mov	r3, r0
	cmp	r3, #0
	bne	.L24
	ldr	r3, .L32+12
	ldr	r0, [r3]
	ldr	r3, .L32+20
	ldr	r2, .L32+24
	ldr	r1, .L32+52
	bl	fprintf
	b	.L25
.L24:
	ldr	r3, .L32+12
	ldr	r0, [r3]
	ldr	r3, .L32+20
	ldr	r2, .L32+24
	ldr	r1, .L32+56
	bl	fprintf
.L25:
	mov	r3, #0
	str	r3, [fp, #-444]
.L30:
	mov	r3, #128
	str	r3, [fp, #-448]
	sub	r2, fp, #448
	sub	r3, fp, #384
	mov	r1, r3
	ldr	r0, [fp, #-440]
	bl	accept
	mov	r3, r0
	str	r3, [fp, #-452]
	ldr	r3, [fp, #-444]
	add	r2, r3, #1
	str	r2, [fp, #-444]
	sub	r2, fp, #256
	lsl	r3, r3, #2
	add	r0, r2, r3
	sub	r3, fp, #452
	sub	r1, fp, #420
	ldr	r2, .L32+60
	bl	pthread_create
	mov	r3, r0
	cmp	r3, #0
	beq	.L26
	ldr	r3, .L32+12
	ldr	r0, [r3]
	ldr	r3, .L32+20
	ldr	r2, .L32+24
	ldr	r1, .L32+64
	bl	fprintf
.L26:
	ldr	r3, [fp, #-444]
	cmp	r3, #49
	ble	.L30
	mov	r3, #0
	str	r3, [fp, #-444]
	b	.L28
.L29:
	ldr	r3, [fp, #-444]
	add	r2, r3, #1
	str	r2, [fp, #-444]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r3, [r3, #-244]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
.L28:
	ldr	r3, [fp, #-444]
	cmp	r3, #49
	ble	.L29
	mov	r3, #0
	str	r3, [fp, #-444]
	b	.L30
.L33:
	.align	2
.L32:
	.word	.LC24
	.word	.LC14
	.word	.LC15
	.word	logfp
	.word	errfp
	.word	.LC2
	.word	.LC3
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	7799
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	socketThread
	.word	.LC23
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
