	.file	"198240.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"In client handler"
.LC1:
	.string	"Ready to receive"
.LC2:
	.string	"Received message: %s\n"
.LC3:
	.string	"%s %s"
.LC4:
	.string	"user is authenticated"
.LC5:
	.string	"user authenticated"
.LC6:
	.string	"not a valid user"
.LC7:
	.string	"Login denied"
.LC8:
	.string	"marketing"
.LC9:
	.string	"offers"
.LC10:
	.string	"sales"
.LC11:
	.string	"promotions"
.LC12:
	.string	"Not a valid folder option"
	.align 8
.LC13:
	.string	"/home/eamon/Documents/software/systems-software/assignment2/test/serverfiles/"
.LC14:
	.string	"w"
.LC15:
	.string	"START_TRANSFER"
.LC16:
	.string	"Data received. %d\n"
.LC17:
	.string	"BACKUP_COMPLETE"
	.text
	.globl	clientHandler
	.type	clientHandler, @function
clientHandler:
.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, 3648
	mov	QWORD PTR -3640[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -3640[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -3628[rbp], eax
	lea	rax, -1040[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 64
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
	lea	rax, -528[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 64
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
	lea	rdi, .LC1[rip]
	call	puts@PLT
	lea	rsi, -528[rbp]
	mov	eax, DWORD PTR -3628[rbp]
	mov	ecx, 0
	mov	edx, 512
	mov	edi, eax
	call	recv@PLT
	lea	rax, -528[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rcx, -3088[rbp]
	lea	rdx, -3600[rbp]
	lea	rax, -528[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	lea	rax, -3600[rbp]
	mov	rdi, rax
	call	puts@PLT
	lea	rax, -3088[rbp]
	mov	rdi, rax
	call	puts@PLT
	lea	rdx, -3088[rbp]
	lea	rax, -3600[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	mov	eax, 0
	call	authenticate
	cmp	eax, 1
	jne	.L2
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -3628[rbp]
	mov	edx, 19
	lea	rsi, .LC5[rip]
	mov	edi, eax
	call	write@PLT
	lea	rsi, -528[rbp]
	mov	eax, DWORD PTR -3628[rbp]
	mov	ecx, 0
	mov	edx, 512
	mov	edi, eax
	call	recv@PLT
	lea	rcx, -2064[rbp]
	lea	rdx, -2576[rbp]
	lea	rax, -528[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	lea	rax, -2576[rbp]
	mov	rdi, rax
	call	puts@PLT
	lea	rax, -2064[rbp]
	mov	rdi, rax
	call	puts@PLT
	lea	rax, -2064[rbp]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L5
	jmp	.L11
.L2:
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -3628[rbp]
	mov	edx, 17
	lea	rsi, .LC7[rip]
	mov	edi, eax
	call	write@PLT
	mov	eax, 1
	jmp	.L1
.L11:
	lea	rax, -2064[rbp]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L5
	lea	rax, -2064[rbp]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L5
	lea	rax, -2064[rbp]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L5
	mov	eax, DWORD PTR -3628[rbp]
	mov	edx, 26
	lea	rsi, .LC12[rip]
	mov	edi, eax
	call	write@PLT
	mov	eax, 1
	jmp	.L1
.L5:
	lea	rax, -528[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 64
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
	lea	rax, .LC13[rip]
	mov	QWORD PTR -3616[rbp], rax
	mov	rdx, QWORD PTR -3616[rbp]
	lea	rax, -1552[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	lea	rdx, -2064[rbp]
	lea	rax, -1552[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
	lea	rax, -1552[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rax, -1552[rbp]
	add	rax, rdx
	mov	WORD PTR [rax], 47
	lea	rdx, -2576[rbp]
	lea	rax, -1552[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
	lea	rax, -1552[rbp]
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -3608[rbp], rax
	mov	DWORD PTR -3624[rbp], 0
	mov	eax, DWORD PTR -3628[rbp]
	mov	edx, 15
	lea	rsi, .LC15[rip]
	mov	edi, eax
	call	write@PLT
	jmp	.L6
.L8:
	mov	eax, DWORD PTR -3624[rbp]
	mov	esi, eax
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -3624[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -3608[rbp]
	lea	rax, -1040[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	DWORD PTR -3620[rbp], eax
	lea	rax, -528[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 64
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
	lea	rax, -1040[rbp]
	mov	edx, 512
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	cmp	DWORD PTR -3620[rbp], 0
	je	.L7
	cmp	DWORD PTR -3620[rbp], 512
	jne	.L7
.L6:
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -3628[rbp]
	mov	ecx, 0
	mov	edx, 512
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -3624[rbp], eax
	cmp	DWORD PTR -3624[rbp], 0
	jg	.L8
.L7:
	mov	rax, QWORD PTR -3608[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, DWORD PTR -3628[rbp]
	mov	edx, 16
	lea	rsi, .LC17[rip]
	mov	edi, eax
	call	write@PLT
.L1:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	clientHandler, .-clientHandler
	.section	.rodata
.LC18:
	.string	"r"
.LC19:
	.string	"users.txt"
	.text
	.globl	authenticate
	.type	authenticate, @function
authenticate:
.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, 1056
	mov	QWORD PTR -1048[rbp], rdi
	mov	QWORD PTR -1056[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rsi, .LC18[rip]
	lea	rdi, .LC19[rip]
	call	fopen@PLT
	mov	QWORD PTR -1032[rbp], rax
	mov	DWORD PTR -1036[rbp], 0
	jmp	.L13
.L15:
	lea	rdx, -1024[rbp]
	mov	rax, QWORD PTR -1048[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L13
	lea	rdx, -512[rbp]
	mov	rax, QWORD PTR -1056[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L13
	mov	DWORD PTR -1036[rbp], 1
	mov	eax, 1
	jmp	.L17
.L13:
	lea	rcx, -512[rbp]
	lea	rdx, -1024[rbp]
	mov	rax, QWORD PTR -1032[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	cmp	eax, -1
	jne	.L15
	cmp	DWORD PTR -1036[rbp], 1
	jne	.L16
	mov	rax, QWORD PTR -1032[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 1
	jmp	.L17
.L16:
	mov	rax, QWORD PTR -1032[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
.L17:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	authenticate, .-authenticate
	.section	.rodata
	.align 8
.LC20:
	.string	"/home/eamon/Documents/software/systems-software/assignment2/test/serverfiles/file.txt"
.LC21:
	.string	"Cloud not create socket"
.LC22:
	.string	"Socket created successfully"
.LC23:
	.string	"Bind issue\n"
.LC24:
	.string	"Bind complete"
	.align 8
.LC25:
	.string	"Waiting incoming connection form client>>"
.LC26:
	.string	"Cant establish connection\n"
	.align 8
.LC27:
	.string	"Connection form client accepted"
	.align 8
.LC28:
	.string	"Failed to create thread for client"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 608
	mov	DWORD PTR -596[rbp], edi
	mov	QWORD PTR -608[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, .LC20[rip]
	mov	QWORD PTR -560[rbp], rax
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -576[rbp], eax
	cmp	DWORD PTR -576[rbp], -1
	jne	.L20
	lea	rdi, .LC21[rip]
	call	puts@PLT
	jmp	.L21
.L20:
	lea	rdi, .LC22[rip]
	call	puts@PLT
.L21:
	mov	edi, 8081
	call	htons@PLT
	mov	WORD PTR -542[rbp], ax
	mov	WORD PTR -544[rbp], 2
	mov	DWORD PTR -540[rbp], 0
	lea	rcx, -544[rbp]
	mov	eax, DWORD PTR -576[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jns	.L22
	lea	rdi, .LC23[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L28
.L22:
	lea	rdi, .LC24[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -576[rbp]
	mov	esi, 3
	mov	edi, eax
	call	listen@PLT
	lea	rdi, .LC25[rip]
	call	puts@PLT
	mov	DWORD PTR -580[rbp], 16
	jmp	.L24
.L27:
	cmp	DWORD PTR -572[rbp], 0
	jns	.L25
	lea	rdi, .LC26[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L28
.L25:
	lea	rdi, .LC27[rip]
	call	puts@PLT
	mov	edi, 200
	call	malloc@PLT
	mov	QWORD PTR -552[rbp], rax
	mov	rax, QWORD PTR -552[rbp]
	mov	edx, DWORD PTR -572[rbp]
	mov	DWORD PTR [rax], edx
	mov	rdx, QWORD PTR -552[rbp]
	lea	rax, -568[rbp]
	mov	rcx, rdx
	lea	rdx, clientHandler[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	test	eax, eax
	jns	.L24
	lea	rdi, .LC28[rip]
	call	perror@PLT
.L24:
	lea	rdx, -580[rbp]
	lea	rcx, -528[rbp]
	mov	eax, DWORD PTR -576[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -572[rbp], eax
	cmp	DWORD PTR -572[rbp], 0
	jne	.L27
	mov	eax, 0
.L28:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"198240.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"In client handler\000"
	.align	2
.LC1:
	.ascii	"Ready to receive\000"
	.align	2
.LC2:
	.ascii	"Received message: %s\012\000"
	.align	2
.LC3:
	.ascii	"%s %s\000"
	.align	2
.LC4:
	.ascii	"user is authenticated\000"
	.align	2
.LC5:
	.ascii	"user authenticated\000"
	.align	2
.LC6:
	.ascii	"not a valid user\000"
	.align	2
.LC7:
	.ascii	"Login denied\000"
	.align	2
.LC8:
	.ascii	"marketing\000"
	.align	2
.LC9:
	.ascii	"offers\000"
	.align	2
.LC10:
	.ascii	"sales\000"
	.align	2
.LC11:
	.ascii	"promotions\000"
	.align	2
.LC12:
	.ascii	"Not a valid folder option\000"
	.align	2
.LC13:
	.ascii	"/home/eamon/Documents/software/systems-software/ass"
	.ascii	"ignment2/test/serverfiles/\000"
	.align	2
.LC14:
	.ascii	"/\000"
	.align	2
.LC15:
	.ascii	"w\000"
	.align	2
.LC16:
	.ascii	"START_TRANSFER\000"
	.align	2
.LC17:
	.ascii	"Data received. %d\012\000"
	.align	2
.LC18:
	.ascii	"BACKUP_COMPLETE\000"
	.align	2
.LC19:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	clientHandler
	.syntax unified
	.arm
	.fpu softvfp
	.type	clientHandler, %function
clientHandler:
	@ args = 0, pretend = 0, frame = 3560
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #3552
	sub	sp, sp, #8
	str	r0, [fp, #-3560]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L12+4
	bl	puts
	ldr	r3, [fp, #-3560]
	ldr	r3, [r3]
	str	r3, [fp, #-3552]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	mov	r3, #512
	mov	r2, r3
	mov	r1, #0
	bl	memset
	sub	r3, fp, #520
	mov	r0, r3
	mov	r3, #512
	mov	r2, r3
	mov	r1, #0
	bl	memset
	ldr	r0, .L12+8
	bl	puts
	sub	r1, fp, #520
	mov	r3, #0
	mov	r2, #512
	ldr	r0, [fp, #-3552]
	bl	recv
	sub	r3, fp, #520
	mov	r1, r3
	ldr	r0, .L12+12
	bl	printf
	sub	r3, fp, #3024
	sub	r3, r3, #4
	sub	r3, r3, #4
	sub	r2, fp, #3520
	sub	r2, r2, #4
	sub	r2, r2, #8
	sub	r0, fp, #520
	ldr	r1, .L12+16
	bl	__isoc99_sscanf
	sub	r3, fp, #3520
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r0, r3
	bl	puts
	sub	r3, fp, #3024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	puts
	sub	r2, fp, #3024
	sub	r2, r2, #4
	sub	r2, r2, #4
	sub	r3, fp, #3520
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r1, r2
	mov	r0, r3
	bl	authenticate
	mov	r3, r0
	cmp	r3, #1
	bne	.L2
	ldr	r0, .L12+20
	bl	puts
	mov	r2, #19
	ldr	r1, .L12+24
	ldr	r0, [fp, #-3552]
	bl	write
	sub	r1, fp, #520
	mov	r3, #0
	mov	r2, #512
	ldr	r0, [fp, #-3552]
	bl	recv
	sub	r3, fp, #2016
	sub	r3, r3, #4
	sub	r3, r3, #12
	sub	r2, fp, #2528
	sub	r2, r2, #4
	sub	r0, fp, #520
	ldr	r1, .L12+16
	bl	__isoc99_sscanf
	sub	r3, fp, #2528
	sub	r3, r3, #4
	mov	r0, r3
	bl	puts
	sub	r3, fp, #2016
	sub	r3, r3, #4
	sub	r3, r3, #12
	mov	r0, r3
	bl	puts
	sub	r3, fp, #2016
	sub	r3, r3, #4
	sub	r3, r3, #12
	ldr	r1, .L12+28
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L5
	b	.L11
.L2:
	ldr	r0, .L12+32
	bl	puts
	mov	r2, #17
	ldr	r1, .L12+36
	ldr	r0, [fp, #-3552]
	bl	write
	mov	r3, #1
	b	.L1
.L11:
	sub	r3, fp, #2016
	sub	r3, r3, #4
	sub	r3, r3, #12
	ldr	r1, .L12+40
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L5
	sub	r3, fp, #2016
	sub	r3, r3, #4
	sub	r3, r3, #12
	ldr	r1, .L12+44
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L5
	sub	r3, fp, #2016
	sub	r3, r3, #4
	sub	r3, r3, #12
	ldr	r1, .L12+48
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L5
	mov	r2, #26
	ldr	r1, .L12+52
	ldr	r0, [fp, #-3552]
	bl	write
	mov	r3, #1
	b	.L1
.L5:
	sub	r3, fp, #520
	mov	r0, r3
	mov	r3, #512
	mov	r2, r3
	mov	r1, #0
	bl	memset
	ldr	r3, .L12+56
	str	r3, [fp, #-3548]
	sub	r3, fp, #1520
	sub	r3, r3, #4
	sub	r3, r3, #8
	ldr	r1, [fp, #-3548]
	mov	r0, r3
	bl	strcpy
	sub	r2, fp, #2016
	sub	r2, r2, #4
	sub	r2, r2, #12
	sub	r3, fp, #1520
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r1, r2
	mov	r0, r3
	bl	strcat
	sub	r3, fp, #1520
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #1520
	sub	r3, r3, #4
	sub	r3, r3, #8
	add	r3, r3, r2
	ldr	r2, .L12+60
	mov	r0, r3
	mov	r1, r2
	mov	r3, #2
	mov	r2, r3
	bl	memcpy
	sub	r2, fp, #2528
	sub	r2, r2, #4
	sub	r3, fp, #1520
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r1, r2
	mov	r0, r3
	bl	strcat
	sub	r3, fp, #1520
	sub	r3, r3, #4
	sub	r3, r3, #8
	ldr	r1, .L12+64
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-3544]
	mov	r3, #0
	str	r3, [fp, #-3540]
	mov	r2, #15
	ldr	r1, .L12+68
	ldr	r0, [fp, #-3552]
	bl	write
	b	.L6
.L8:
	ldr	r1, [fp, #-3540]
	ldr	r0, .L12+72
	bl	printf
	ldr	r2, [fp, #-3540]
	sub	r0, fp, #1024
	sub	r0, r0, #4
	sub	r0, r0, #4
	ldr	r3, [fp, #-3544]
	mov	r1, #1
	bl	fwrite
	mov	r3, r0
	str	r3, [fp, #-3536]
	sub	r3, fp, #520
	mov	r0, r3
	mov	r3, #512
	mov	r2, r3
	mov	r1, #0
	bl	memset
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #512
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, [fp, #-3536]
	cmp	r3, #0
	beq	.L7
	ldr	r3, [fp, #-3536]
	cmp	r3, #512
	bne	.L7
.L6:
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	mov	r2, #512
	ldr	r0, [fp, #-3552]
	bl	recv
	str	r0, [fp, #-3540]
	ldr	r3, [fp, #-3540]
	cmp	r3, #0
	bgt	.L8
.L7:
	ldr	r0, [fp, #-3544]
	bl	fclose
	mov	r2, #16
	ldr	r1, .L12+76
	ldr	r0, [fp, #-3552]
	bl	write
.L1:
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC19
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC8
	.word	.LC6
	.word	.LC7
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.size	clientHandler, .-clientHandler
	.section	.rodata
	.align	2
.LC20:
	.ascii	"r\000"
	.align	2
.LC21:
	.ascii	"users.txt\000"
	.align	2
.LC22:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	authenticate
	.syntax unified
	.arm
	.fpu softvfp
	.type	authenticate, %function
authenticate:
	@ args = 0, pretend = 0, frame = 1024
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1024
	str	r0, [fp, #-1024]
	str	r1, [fp, #-1028]
	ldr	r3, .L21
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, .L21+4
	ldr	r0, .L21+8
	bl	fopen
	str	r0, [fp, #-1016]
	mov	r3, #0
	str	r3, [fp, #-1012]
	b	.L15
.L17:
	sub	r3, fp, #1008
	mov	r1, r3
	ldr	r0, [fp, #-1024]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L15
	sub	r3, fp, #508
	mov	r1, r3
	ldr	r0, [fp, #-1028]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L15
	mov	r3, #1
	str	r3, [fp, #-1012]
	mov	r3, #1
	b	.L19
.L15:
	sub	r3, fp, #508
	sub	r2, fp, #1008
	ldr	r1, .L21+12
	ldr	r0, [fp, #-1016]
	bl	__isoc99_fscanf
	mov	r3, r0
	cmn	r3, #1
	bne	.L17
	ldr	r3, [fp, #-1012]
	cmp	r3, #1
	bne	.L18
	ldr	r0, [fp, #-1016]
	bl	fclose
	mov	r3, #1
	b	.L19
.L18:
	ldr	r0, [fp, #-1016]
	bl	fclose
	mov	r3, #0
.L19:
	ldr	r2, .L21
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L20
	bl	__stack_chk_fail
.L20:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC22
	.word	.LC20
	.word	.LC21
	.word	.LC3
	.size	authenticate, .-authenticate
	.section	.rodata
	.align	2
.LC23:
	.ascii	"/home/eamon/Documents/software/systems-software/ass"
	.ascii	"ignment2/test/serverfiles/file.txt\000"
	.align	2
.LC24:
	.ascii	"Cloud not create socket\000"
	.align	2
.LC25:
	.ascii	"Socket created successfully\000"
	.align	2
.LC26:
	.ascii	"Bind issue\012\000"
	.align	2
.LC27:
	.ascii	"Bind complete\000"
	.align	2
.LC28:
	.ascii	"Waiting incoming connection form client>>\000"
	.align	2
.LC29:
	.ascii	"Cant establish connection\012\000"
	.align	2
.LC30:
	.ascii	"Connection form client accepted\000"
	.align	2
.LC31:
	.ascii	"Failed to create thread for client\000"
	.align	2
.LC32:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 568
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #568
	str	r0, [fp, #-568]
	str	r1, [fp, #-572]
	ldr	r3, .L34
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L34+4
	str	r3, [fp, #-556]
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-552]
	ldr	r3, [fp, #-552]
	cmn	r3, #1
	bne	.L24
	ldr	r0, .L34+8
	bl	puts
	b	.L25
.L24:
	ldr	r0, .L34+12
	bl	puts
.L25:
	ldr	r0, .L34+16
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #4
	sub	r3, r3, #536
	strh	r2, [r3, #2]	@ movhi
	sub	r3, fp, #4
	sub	r3, r3, #536
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-536]
	sub	r3, fp, #540
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-552]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L26
	ldr	r0, .L34+20
	bl	perror
	mov	r3, #1
	b	.L32
.L26:
	ldr	r0, .L34+24
	bl	puts
	mov	r1, #3
	ldr	r0, [fp, #-552]
	bl	listen
	ldr	r0, .L34+28
	bl	puts
	mov	r3, #16
	str	r3, [fp, #-564]
	b	.L28
.L31:
	ldr	r3, [fp, #-548]
	cmp	r3, #0
	bge	.L29
	ldr	r0, .L34+32
	bl	perror
	mov	r3, #1
	b	.L32
.L29:
	ldr	r0, .L34+36
	bl	puts
	mov	r0, #200
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-544]
	ldr	r3, [fp, #-544]
	ldr	r2, [fp, #-548]
	str	r2, [r3]
	sub	r0, fp, #560
	ldr	r3, [fp, #-544]
	ldr	r2, .L34+40
	mov	r1, #0
	bl	pthread_create
	mov	r3, r0
	cmp	r3, #0
	bge	.L28
	ldr	r0, .L34+44
	bl	perror
.L28:
	sub	r2, fp, #564
	sub	r3, fp, #524
	mov	r1, r3
	ldr	r0, [fp, #-552]
	bl	accept
	str	r0, [fp, #-548]
	ldr	r3, [fp, #-548]
	cmp	r3, #0
	bne	.L31
	mov	r3, #0
.L32:
	ldr	r2, .L34
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L33
	bl	__stack_chk_fail
.L33:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L35:
	.align	2
.L34:
	.word	.LC32
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.word	8081
	.word	.LC26
	.word	.LC27
	.word	.LC28
	.word	.LC29
	.word	.LC30
	.word	clientHandler
	.word	.LC31
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
