	.file	"641447.c"
	.intel_syntax noprefix
	.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	rax, -213[rbp]
	mov	edx, 5
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rax, -304[rbp]
	mov	rdi, rax
	call	prepareAddrinfoHints
	cmp	DWORD PTR -324[rbp], 1
	jg	.L2
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	esi, 1
	mov	edi, eax
	call	handleError
	mov	eax, -1
	jmp	.L8
.L2:
	mov	rax, QWORD PTR -336[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	lea	rax, -213[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	lea	rax, -208[rbp]
	mov	esi, 200
	mov	rdi, rax
	call	getServerAddress
	lea	rcx, -312[rbp]
	lea	rdx, -304[rbp]
	lea	rsi, -213[rbp]
	lea	rax, -208[rbp]
	mov	rdi, rax
	call	getaddrinfo@PLT
	test	eax, eax
	je	.L4
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	esi, 2
	mov	edi, eax
	call	handleError
	mov	eax, -1
	jmp	.L8
.L4:
	mov	rax, QWORD PTR -312[rbp]
	lea	rdx, -320[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	connectToPort
	test	eax, eax
	je	.L5
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	esi, 3
	mov	edi, eax
	call	handleError
	mov	eax, -1
	jmp	.L8
.L5:
	mov	rax, QWORD PTR -312[rbp]
	mov	rdi, rax
	call	freeaddrinfo@PLT
	mov	DWORD PTR -316[rbp], 1
	lea	rax, -256[rbp]
	mov	rdi, rax
	call	clearGameBoard
	jmp	.L6
.L7:
	mov	eax, DWORD PTR -320[rbp]
	lea	rdx, -256[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	playMatch
.L6:
	cmp	DWORD PTR -316[rbp], 0
	jne	.L7
	mov	eax, 0
.L8:
	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
.LFE6:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC0:
	.string	"Waiting for a second client to connect."
.LC1:
	.string	"clear\n"
.LC2:
	.string	"Your move. "
.LC3:
	.string	"Wait for your turn."
.LC4:
	.string	"Match concluded."
.LC5:
	.string	"Congratulations, you won!"
.LC6:
	.string	"Bummer, you lost :("
.LC7:
	.string	"Whoa, it's a draw :O"
	.text
	.globl	playMatch
	.type	playMatch, @function
playMatch:
.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -32[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rdx, -32[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	receiveData
	mov	eax, DWORD PTR -32[rbp]
	test	eax, eax
	jne	.L11
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	clearGameBoard
	mov	eax, 0
	jmp	.L20
.L11:
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, 1
	jne	.L13
	mov	eax, DWORD PTR -28[rbp]
	test	eax, eax
	jne	.L14
	lea	rdi, .LC1[rip]
	call	system@PLT
	mov	eax, DWORD PTR -24[rbp]
	test	eax, eax
	js	.L15
	mov	eax, DWORD PTR -20[rbp]
	test	eax, eax
	js	.L15
	mov	eax, DWORD PTR -24[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -48[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	mov	DWORD PTR [rdx+rax*4], 2
.L15:
	mov	rdx, QWORD PTR -48[rbp]
	lea	rax, -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	displayGameBoard
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	rdx, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	playMove
	jmp	.L16
.L14:
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, 1
	jne	.L16
	mov	eax, DWORD PTR -24[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -48[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	mov	DWORD PTR [rdx+rax*4], 3
	mov	rdx, QWORD PTR -48[rbp]
	lea	rax, -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	displayGameBoard
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L20
.L13:
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, 2
	jne	.L16
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -28[rbp]
	test	eax, eax
	jne	.L17
	lea	rdi, .LC5[rip]
	call	puts@PLT
.L17:
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, 1
	jne	.L18
	lea	rdi, .LC6[rip]
	call	puts@PLT
.L18:
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, 2
	jne	.L19
	lea	rdi, .LC7[rip]
	call	puts@PLT
.L19:
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	clearGameBoard
.L16:
	mov	eax, -1
.L20:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	playMatch, .-playMatch
	.section	.rodata
	.align 8
.LC8:
	.string	"Enter the vertical (Y) and then the horizontal (X) coordinates you'd like to play."
.LC9:
	.string	"%s"
	.align 8
.LC10:
	.string	"Please enter valid coordinates!"
	.text
	.globl	playMove
	.type	playMove, @function
playMove:
.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, 256
	mov	DWORD PTR -244[rbp], edi
	mov	QWORD PTR -256[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -224[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rdi, .LC8[rip]
	call	puts@PLT
	lea	rax, -208[rbp]
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rax, -208[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -232[rbp], eax
	lea	rax, -208[rbp]
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rax, -208[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -228[rbp], eax
	cmp	DWORD PTR -232[rbp], 0
	js	.L23
	cmp	DWORD PTR -232[rbp], 2
	jg	.L23
	cmp	DWORD PTR -228[rbp], 0
	js	.L23
	cmp	DWORD PTR -228[rbp], 2
	jg	.L23
	mov	eax, DWORD PTR -232[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -256[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -228[rbp]
	cdqe
	mov	eax, DWORD PTR [rdx+rax*4]
	test	eax, eax
	jne	.L23
	mov	eax, DWORD PTR -232[rbp]
	mov	DWORD PTR -216[rbp], eax
	mov	eax, DWORD PTR -228[rbp]
	mov	DWORD PTR -212[rbp], eax
	lea	rcx, -224[rbp]
	mov	eax, DWORD PTR -244[rbp]
	mov	edx, 10
	mov	rsi, rcx
	mov	edi, eax
	call	sendData
	jmp	.L25
.L23:
	lea	rdi, .LC10[rip]
	call	puts@PLT
	mov	rdx, QWORD PTR -256[rbp]
	mov	eax, DWORD PTR -244[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	playMove
.L25:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L26
	call	__stack_chk_fail@PLT
.L26:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	playMove, .-playMove
	.section	.rodata
.LC11:
	.string	"  "
.LC12:
	.string	" %d"
.LC13:
	.string	"\n  "
.LC14:
	.string	"__"
.LC15:
	.string	"%d|"
.LC16:
	.string	" X"
.LC17:
	.string	" O"
	.text
	.globl	displayGameBoard
	.type	displayGameBoard, @function
displayGameBoard:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -16[rbp], 0
	jmp	.L28
.L29:
	mov	eax, DWORD PTR -16[rbp]
	mov	esi, eax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -16[rbp], 1
.L28:
	cmp	DWORD PTR -16[rbp], 2
	jle	.L29
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -12[rbp], 0
	jmp	.L30
.L31:
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -12[rbp], 1
.L30:
	cmp	DWORD PTR -12[rbp], 2
	jle	.L31
	mov	edi, 10
	call	putchar@PLT
	mov	DWORD PTR -8[rbp], 0
	jmp	.L32
.L38:
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, eax
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -4[rbp], 0
	jmp	.L33
.L37:
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	mov	eax, DWORD PTR [rdx+rax*4]
	test	eax, eax
	jne	.L34
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L35
.L34:
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	mov	eax, DWORD PTR [rdx+rax*4]
	cmp	eax, 2
	jne	.L36
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L35
.L36:
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	mov	eax, DWORD PTR [rdx+rax*4]
	cmp	eax, 3
	jne	.L35
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
.L35:
	add	DWORD PTR -4[rbp], 1
.L33:
	cmp	DWORD PTR -4[rbp], 2
	jle	.L37
	mov	edi, 10
	call	putchar@PLT
	add	DWORD PTR -8[rbp], 1
.L32:
	cmp	DWORD PTR -8[rbp], 2
	jle	.L38
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	displayGameBoard, .-displayGameBoard
	.globl	clearGameBoard
	.type	clearGameBoard, @function
clearGameBoard:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L40
.L41:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, 12
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	add	DWORD PTR -4[rbp], 1
.L40:
	cmp	DWORD PTR -4[rbp], 2
	jle	.L41
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	clearGameBoard, .-clearGameBoard
	.globl	sendData
	.type	sendData, @function
sendData:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -24[rbp], edx
	mov	rsi, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	ecx, 0
	mov	edx, 16
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, 15
	ja	.L43
	cmp	DWORD PTR -24[rbp], 0
	jle	.L43
	mov	edx, DWORD PTR -24[rbp]
	mov	rcx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	sendData
	cmp	eax, 16
	jne	.L44
	mov	eax, 0
	jmp	.L46
.L44:
	mov	eax, -1
	jmp	.L46
.L43:
	cmp	DWORD PTR -4[rbp], 16
	jne	.L47
	mov	eax, 0
	jmp	.L46
.L47:
	mov	eax, -1
.L46:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	sendData, .-sendData
	.globl	receiveData
	.type	receiveData, @function
receiveData:
.LFB12:
	.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
	mov	rsi, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	ecx, 0
	mov	edx, 16
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 16
	jne	.L50
	mov	eax, 0
	jmp	.L52
.L50:
	mov	eax, -1
.L52:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	receiveData, .-receiveData
	.section	.rodata
.LC18:
	.string	"localhost"
	.text
	.globl	getServerAddress
	.type	getServerAddress, @function
getServerAddress:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L54
.L57:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L59
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rcx, .LC18[rip]
	movzx	eax, BYTE PTR [rax+rcx]
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -4[rbp], 1
.L54:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L57
	jmp	.L56
.L59:
	nop
.L56:
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	getServerAddress, .-getServerAddress
	.globl	prepareAddrinfoHints
	.type	prepareAddrinfoHints, @function
prepareAddrinfoHints:
.LFB14:
	.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	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 48
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 4[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 8[rax], 1
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], 1
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	prepareAddrinfoHints, .-prepareAddrinfoHints
	.globl	getClientHostname
	.type	getClientHostname, @function
getClientHostname:
.LFB15:
	.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	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR stdin[rip]
	mov	ecx, eax
	lea	rax, -8[rbp]
	mov	edx, 200
	mov	rsi, rax
	mov	edi, ecx
	call	read@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	getClientHostname, .-getClientHostname
	.globl	connectToPort
	.type	connectToPort, @function
connectToPort:
.LFB16:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -8[rbp], rax
	jmp	.L64
.L69:
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	ecx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	esi, ecx
	mov	edi, eax
	call	socket@PLT
	mov	rdx, QWORD PTR -32[rbp]
	mov	DWORD PTR [rdx], eax
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	js	.L72
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 16[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rcx, QWORD PTR 24[rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR [rax]
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jns	.L73
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	close@PLT
	jmp	.L66
.L72:
	nop
.L66:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	QWORD PTR -8[rbp], rax
.L64:
	cmp	QWORD PTR -8[rbp], 0
	jne	.L69
	jmp	.L68
.L73:
	nop
.L68:
	cmp	QWORD PTR -8[rbp], 0
	jne	.L70
	mov	eax, -1
	jmp	.L71
.L70:
	mov	eax, 0
.L71:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	connectToPort, .-connectToPort
	.section	.rodata
	.align 8
.LC19:
	.string	"Unable to get port number. Error code: %d\n"
	.align 8
.LC20:
	.string	"Unable to get address info. Error code: %d\n"
	.align 8
.LC21:
	.string	"Unable to connect to address & port. Error code: %d\n"
	.align 8
.LC22:
	.string	"Unknown error type %d. Error code: %d\n"
.LC23:
	.string	"Error code explanation: %s\n"
	.text
	.globl	handleError
	.type	handleError, @function
handleError:
.LFB17:
	.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], edi
	mov	DWORD PTR -8[rbp], esi
	cmp	DWORD PTR -8[rbp], 3
	je	.L75
	cmp	DWORD PTR -8[rbp], 3
	jg	.L76
	cmp	DWORD PTR -8[rbp], 1
	je	.L77
	cmp	DWORD PTR -8[rbp], 2
	je	.L78
	jmp	.L76
.L77:
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC19[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L79
.L78:
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC20[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L79
.L75:
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC21[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L79
.L76:
	mov	edx, DWORD PTR -4[rbp]
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, eax
	lea	rdi, .LC22[rip]
	mov	eax, 0
	call	printf@PLT
.L79:
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	gai_strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC23[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	handleError, .-handleError
	.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	"641447.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 304
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #304
	str	r0, [fp, #-304]
	str	r1, [fp, #-308]
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #216
	mov	r2, #5
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #284
	mov	r0, r3
	bl	prepareAddrinfoHints
	ldr	r3, [fp, #-304]
	cmp	r3, #1
	bgt	.L2
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r1, #1
	mov	r0, r3
	bl	handleError
	mvn	r3, #0
	b	.L8
.L2:
	ldr	r3, [fp, #-308]
	add	r3, r3, #4
	ldr	r2, [r3]
	sub	r3, fp, #216
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	sub	r3, fp, #208
	mov	r1, #200
	mov	r0, r3
	bl	getServerAddress
	sub	r3, fp, #296
	sub	r2, fp, #284
	sub	r1, fp, #216
	sub	r0, fp, #208
	bl	getaddrinfo
	mov	r3, r0
	cmp	r3, #0
	beq	.L4
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r1, #2
	mov	r0, r3
	bl	handleError
	mvn	r3, #0
	b	.L8
.L4:
	ldr	r3, [fp, #-296]
	sub	r2, fp, #292
	mov	r1, r2
	mov	r0, r3
	bl	connectToPort
	mov	r3, r0
	cmp	r3, #0
	beq	.L5
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r1, #3
	mov	r0, r3
	bl	handleError
	mvn	r3, #0
	b	.L8
.L5:
	ldr	r3, [fp, #-296]
	mov	r0, r3
	bl	freeaddrinfo
	mov	r3, #1
	str	r3, [fp, #-288]
	sub	r3, fp, #252
	mov	r0, r3
	bl	clearGameBoard
	b	.L6
.L7:
	ldr	r3, [fp, #-292]
	sub	r2, fp, #252
	mov	r1, r2
	mov	r0, r3
	bl	playMatch
.L6:
	ldr	r3, [fp, #-288]
	cmp	r3, #0
	bne	.L7
	mov	r3, #0
.L8:
	ldr	r2, .L10
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L9
	bl	__stack_chk_fail
.L9:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC0
	.size	main, .-main
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Waiting for a second client to connect.\000"
	.align	2
.LC2:
	.ascii	"clear\012\000"
	.align	2
.LC3:
	.ascii	"Your move. \000"
	.align	2
.LC4:
	.ascii	"Wait for your turn.\000"
	.align	2
.LC5:
	.ascii	"Match concluded.\000"
	.align	2
.LC6:
	.ascii	"Congratulations, you won!\000"
	.align	2
.LC7:
	.ascii	"Bummer, you lost :(\000"
	.align	2
.LC8:
	.ascii	"Whoa, it's a draw :O\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	playMatch
	.syntax unified
	.arm
	.fpu softvfp
	.type	playMatch, %function
playMatch:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, .L24
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #24
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	receiveData
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L13
	ldr	r0, .L24+4
	bl	puts
	ldr	r0, [fp, #-36]
	bl	clearGameBoard
	mov	r3, #0
	b	.L22
.L13:
	ldr	r3, [fp, #-24]
	cmp	r3, #1
	bne	.L15
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L16
	ldr	r0, .L24+8
	bl	system
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	blt	.L17
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	blt	.L17
	ldr	r3, [fp, #-16]
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-36]
	add	r3, r3, r2
	ldr	r2, [fp, #-12]
	mov	r1, #2
	str	r1, [r3, r2, lsl #2]
.L17:
	sub	r3, fp, #24
	ldr	r1, [fp, #-36]
	mov	r0, r3
	bl	displayGameBoard
	ldr	r0, .L24+12
	bl	puts
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-32]
	bl	playMove
	b	.L18
.L16:
	ldr	r3, [fp, #-20]
	cmp	r3, #1
	bne	.L18
	ldr	r3, [fp, #-16]
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-36]
	add	r3, r3, r2
	ldr	r2, [fp, #-12]
	mov	r1, #3
	str	r1, [r3, r2, lsl #2]
	sub	r3, fp, #24
	ldr	r1, [fp, #-36]
	mov	r0, r3
	bl	displayGameBoard
	ldr	r0, .L24+16
	bl	puts
	mov	r3, #0
	b	.L22
.L15:
	ldr	r3, [fp, #-24]
	cmp	r3, #2
	bne	.L18
	ldr	r0, .L24+20
	bl	puts
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L19
	ldr	r0, .L24+24
	bl	puts
.L19:
	ldr	r3, [fp, #-20]
	cmp	r3, #1
	bne	.L20
	ldr	r0, .L24+28
	bl	puts
.L20:
	ldr	r3, [fp, #-20]
	cmp	r3, #2
	bne	.L21
	ldr	r0, .L24+32
	bl	puts
.L21:
	ldr	r0, [fp, #-36]
	bl	clearGameBoard
.L18:
	mvn	r3, #0
.L22:
	ldr	r2, .L24
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L23
	bl	__stack_chk_fail
.L23:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	.LC9
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	playMatch, .-playMatch
	.section	.rodata
	.align	2
.LC10:
	.ascii	"Enter the vertical (Y) and then the horizontal (X) "
	.ascii	"coordinates you'd like to play.\000"
	.align	2
.LC11:
	.ascii	"%s\000"
	.align	2
.LC12:
	.ascii	"Please enter valid coordinates!\000"
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	playMove
	.syntax unified
	.arm
	.fpu softvfp
	.type	playMove, %function
playMove:
	@ 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, .L31
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #224
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r0, .L31+4
	bl	puts
	sub	r3, fp, #208
	mov	r1, r3
	ldr	r0, .L31+8
	bl	__isoc99_scanf
	sub	r3, fp, #208
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-232]
	sub	r3, fp, #208
	mov	r1, r3
	ldr	r0, .L31+8
	bl	__isoc99_scanf
	sub	r3, fp, #208
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-228]
	ldr	r3, [fp, #-232]
	cmp	r3, #0
	blt	.L27
	ldr	r3, [fp, #-232]
	cmp	r3, #2
	bgt	.L27
	ldr	r3, [fp, #-228]
	cmp	r3, #0
	blt	.L27
	ldr	r3, [fp, #-228]
	cmp	r3, #2
	bgt	.L27
	ldr	r2, [fp, #-232]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-244]
	add	r3, r3, r2
	ldr	r2, [fp, #-228]
	ldr	r3, [r3, r2, lsl #2]
	cmp	r3, #0
	bne	.L27
	ldr	r3, [fp, #-232]
	str	r3, [fp, #-216]
	ldr	r3, [fp, #-228]
	str	r3, [fp, #-212]
	sub	r3, fp, #224
	mov	r2, #10
	mov	r1, r3
	ldr	r0, [fp, #-240]
	bl	sendData
	mov	r3, r0
	b	.L29
.L27:
	ldr	r0, .L31+12
	bl	puts
	ldr	r1, [fp, #-244]
	ldr	r0, [fp, #-240]
	bl	playMove
	mov	r3, r0
.L29:
	ldr	r2, .L31
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L30
	bl	__stack_chk_fail
.L30:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L32:
	.align	2
.L31:
	.word	.LC13
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.size	playMove, .-playMove
	.section	.rodata
	.align	2
.LC14:
	.ascii	"  \000"
	.align	2
.LC15:
	.ascii	" %d\000"
	.align	2
.LC16:
	.ascii	"\012  \000"
	.align	2
.LC17:
	.ascii	"__\000"
	.align	2
.LC18:
	.ascii	"%d|\000"
	.align	2
.LC19:
	.ascii	" X\000"
	.align	2
.LC20:
	.ascii	" O\000"
	.text
	.align	2
	.global	displayGameBoard
	.syntax unified
	.arm
	.fpu softvfp
	.type	displayGameBoard, %function
displayGameBoard:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r0, .L45
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L34
.L35:
	ldr	r1, [fp, #-20]
	ldr	r0, .L45+4
	bl	printf
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L34:
	ldr	r3, [fp, #-20]
	cmp	r3, #2
	ble	.L35
	ldr	r0, .L45+8
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L36
.L37:
	ldr	r0, .L45+12
	bl	printf
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L36:
	ldr	r3, [fp, #-16]
	cmp	r3, #2
	ble	.L37
	mov	r0, #10
	bl	putchar
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L38
.L44:
	ldr	r1, [fp, #-12]
	ldr	r0, .L45+16
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L39
.L43:
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-28]
	add	r3, r3, r2
	ldr	r2, [fp, #-8]
	ldr	r3, [r3, r2, lsl #2]
	cmp	r3, #0
	bne	.L40
	ldr	r0, .L45
	bl	printf
	b	.L41
.L40:
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-28]
	add	r3, r3, r2
	ldr	r2, [fp, #-8]
	ldr	r3, [r3, r2, lsl #2]
	cmp	r3, #2
	bne	.L42
	ldr	r0, .L45+20
	bl	printf
	b	.L41
.L42:
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-28]
	add	r3, r3, r2
	ldr	r2, [fp, #-8]
	ldr	r3, [r3, r2, lsl #2]
	cmp	r3, #3
	bne	.L41
	ldr	r0, .L45+24
	bl	printf
.L41:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L39:
	ldr	r3, [fp, #-8]
	cmp	r3, #2
	ble	.L43
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L38:
	ldr	r3, [fp, #-12]
	cmp	r3, #2
	ble	.L44
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L46:
	.align	2
.L45:
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.size	displayGameBoard, .-displayGameBoard
	.align	2
	.global	clearGameBoard
	.syntax unified
	.arm
	.fpu softvfp
	.type	clearGameBoard, %function
clearGameBoard:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L48
.L49:
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	mov	r2, #12
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L48:
	ldr	r3, [fp, #-8]
	cmp	r3, #2
	ble	.L49
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	clearGameBoard, .-clearGameBoard
	.align	2
	.global	sendData
	.syntax unified
	.arm
	.fpu softvfp
	.type	sendData, %function
sendData:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	mov	r3, #0
	mov	r2, #16
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	send
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #15
	bhi	.L51
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	ble	.L51
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	sendData
	mov	r3, r0
	cmp	r3, #16
	bne	.L52
	mov	r3, #0
	b	.L54
.L52:
	mvn	r3, #0
	b	.L54
.L51:
	ldr	r3, [fp, #-8]
	cmp	r3, #16
	bne	.L55
	mov	r3, #0
	b	.L54
.L55:
	mvn	r3, #0
.L54:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	sendData, .-sendData
	.align	2
	.global	receiveData
	.syntax unified
	.arm
	.fpu softvfp
	.type	receiveData, %function
receiveData:
	@ 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]
	mov	r3, #0
	mov	r2, #16
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	recv
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #16
	bne	.L58
	mov	r3, #0
	b	.L60
.L58:
	mvn	r3, #0
.L60:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	receiveData, .-receiveData
	.section	.rodata
	.align	2
.LC21:
	.ascii	"localhost\000"
	.text
	.align	2
	.global	getServerAddress
	.syntax unified
	.arm
	.fpu softvfp
	.type	getServerAddress, %function
getServerAddress:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L62
.L65:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L67
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r1, .L68
	ldr	r2, [fp, #-8]
	add	r2, r1, r2
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L62:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L65
	b	.L64
.L67:
	nop
.L64:
	mov	r3, #0
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L69:
	.align	2
.L68:
	.word	.LC21
	.size	getServerAddress, .-getServerAddress
	.align	2
	.global	prepareAddrinfoHints
	.syntax unified
	.arm
	.fpu softvfp
	.type	prepareAddrinfoHints, %function
prepareAddrinfoHints:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	mov	r2, #32
	mov	r1, #0
	ldr	r0, [fp, #-8]
	bl	memset
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	mov	r2, #1
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	mov	r2, #1
	str	r2, [r3]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	prepareAddrinfoHints, .-prepareAddrinfoHints
	.align	2
	.global	getClientHostname
	.syntax unified
	.arm
	.fpu softvfp
	.type	getClientHostname, %function
getClientHostname:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, .L73
	ldr	r3, [r3]
	mov	r0, r3
	sub	r3, fp, #8
	mov	r2, #200
	mov	r1, r3
	bl	read
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L74:
	.align	2
.L73:
	.word	stdin
	.size	getClientHostname, .-getClientHostname
	.align	2
	.global	connectToPort
	.syntax unified
	.arm
	.fpu softvfp
	.type	connectToPort, %function
connectToPort:
	@ 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]
	str	r3, [fp, #-12]
	b	.L76
.L81:
	ldr	r3, [fp, #-12]
	ldr	r0, [r3, #4]
	ldr	r3, [fp, #-12]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #12]
	mov	r2, r3
	bl	socket
	mov	r2, r0
	ldr	r3, [fp, #-20]
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	cmp	r3, #0
	blt	.L84
	ldr	r3, [fp, #-20]
	ldr	r0, [r3]
	ldr	r3, [fp, #-12]
	ldr	r1, [r3, #20]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #16]
	mov	r2, r3
	bl	connect
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L85
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	b	.L78
.L84:
	nop
.L78:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #28]
	str	r3, [fp, #-12]
.L76:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L81
	b	.L80
.L85:
	nop
.L80:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L82
	mvn	r3, #0
	b	.L83
.L82:
	mov	r3, #0
.L83:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	connectToPort, .-connectToPort
	.section	.rodata
	.align	2
.LC22:
	.ascii	"Unable to get port number. Error code: %d\012\000"
	.align	2
.LC23:
	.ascii	"Unable to get address info. Error code: %d\012\000"
	.align	2
.LC24:
	.ascii	"Unable to connect to address & port. Error code: %d"
	.ascii	"\012\000"
	.align	2
.LC25:
	.ascii	"Unknown error type %d. Error code: %d\012\000"
	.align	2
.LC26:
	.ascii	"Error code explanation: %s\012\000"
	.text
	.align	2
	.global	handleError
	.syntax unified
	.arm
	.fpu softvfp
	.type	handleError, %function
handleError:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	beq	.L87
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	bgt	.L88
	ldr	r3, [fp, #-12]
	cmp	r3, #1
	beq	.L89
	ldr	r3, [fp, #-12]
	cmp	r3, #2
	beq	.L90
	b	.L88
.L89:
	ldr	r1, [fp, #-8]
	ldr	r0, .L92
	bl	printf
	b	.L91
.L90:
	ldr	r1, [fp, #-8]
	ldr	r0, .L92+4
	bl	printf
	b	.L91
.L87:
	ldr	r1, [fp, #-8]
	ldr	r0, .L92+8
	bl	printf
	b	.L91
.L88:
	ldr	r2, [fp, #-8]
	ldr	r1, [fp, #-12]
	ldr	r0, .L92+12
	bl	printf
.L91:
	ldr	r0, [fp, #-8]
	bl	gai_strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L92+16
	bl	printf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L93:
	.align	2
.L92:
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.word	.LC26
	.size	handleError, .-handleError
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
