	.file	"24414.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"----- CLIENT -----\n"
	.align 8
.LC1:
	.string	"[SOCKET] ERROR trying to create socket.\n"
	.align 8
.LC2:
	.string	"[SOCKET] %i Socket was SUCCESSFUL created.\n"
	.align 8
.LC3:
	.string	"[CONNECT] ERROR trying to connect client socket to an IP address.\n"
	.align 8
.LC4:
	.string	"[CONNECT] CLient socket was SUCCESSFUL connected.\n"
	.align 8
.LC5:
	.string	"[RECV] ERROR trying to receive message from server.\n"
.LC6:
	.string	"[SERVER] > %s\n"
.LC7:
	.string	"> "
.LC8:
	.string	" %100[^\n]"
.LC9:
	.string	"Disconnecting...\n"
	.align 8
.LC10:
	.string	"[SEND] ERROR trying to send data to client.\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, 3152
	mov	DWORD PTR -3140[rbp], edi
	mov	QWORD PTR -3152[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	QWORD PTR -3088[rbp], 1953069157
	mov	QWORD PTR -3080[rbp], 0
	lea	rdx, -3072[rbp]
	mov	eax, 0
	mov	ecx, 126
	mov	rdi, rdx
	rep stosq
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -3124[rbp], eax
	cmp	DWORD PTR -3124[rbp], 0
	jns	.L2
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	eax, DWORD PTR -3124[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	WORD PTR -3104[rbp], 2
	mov	edi, 64000
	call	htons@PLT
	mov	WORD PTR -3102[rbp], ax
	mov	DWORD PTR -3100[rbp], 0
	mov	DWORD PTR -3120[rbp], 16
	mov	edx, DWORD PTR -3120[rbp]
	lea	rcx, -3104[rbp]
	mov	eax, DWORD PTR -3124[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	mov	DWORD PTR -3116[rbp], eax
	cmp	DWORD PTR -3116[rbp], 0
	jns	.L3
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -3124[rbp]
	mov	ecx, 0
	mov	edx, 1025
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -3112[rbp], eax
	cmp	DWORD PTR -3112[rbp], 0
	jns	.L4
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	lea	rax, -1040[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
.L8:
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -2064[rbp]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdx, -3088[rbp]
	lea	rax, -2064[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L5
	lea	rdi, .LC9[rip]
	call	puts@PLT
	mov	edi, 3
	call	sleep@PLT
	lea	rsi, -2064[rbp]
	mov	eax, DWORD PTR -3124[rbp]
	mov	ecx, 0
	mov	edx, 1024
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -3108[rbp], eax
	nop
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L10
	jmp	.L11
.L5:
	lea	rsi, -2064[rbp]
	mov	eax, DWORD PTR -3124[rbp]
	mov	ecx, 0
	mov	edx, 1024
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -3108[rbp], eax
	cmp	DWORD PTR -3108[rbp], 0
	jns	.L7
	lea	rdi, .LC10[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L7:
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -3124[rbp]
	mov	ecx, 0
	mov	edx, 1025
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -3112[rbp], eax
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	puts@PLT
	jmp	.L8
.L11:
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"24414.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"----- CLIENT -----\012\000"
	.align	2
.LC2:
	.ascii	"[SOCKET] ERROR trying to create socket.\012\000"
	.align	2
.LC3:
	.ascii	"[SOCKET] %i Socket was SUCCESSFUL created.\012\000"
	.align	2
.LC4:
	.ascii	"[CONNECT] ERROR trying to connect client socket to "
	.ascii	"an IP address.\012\000"
	.align	2
.LC5:
	.ascii	"[CONNECT] CLient socket was SUCCESSFUL connected.\012"
	.ascii	"\000"
	.align	2
.LC6:
	.ascii	"[RECV] ERROR trying to receive message from server."
	.ascii	"\012\000"
	.align	2
.LC7:
	.ascii	"[SERVER] > %s\012\000"
	.align	2
.LC8:
	.ascii	"> \000"
	.align	2
.LC9:
	.ascii	" %100[^\012]\000"
	.align	2
.LC10:
	.ascii	"Disconnecting...\012\000"
	.align	2
.LC11:
	.ascii	"[SEND] ERROR trying to send data to client.\012\000"
	.align	2
.LC1:
	.ascii	"exit\000"
	.space	1019
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 3128
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #3120
	sub	sp, sp, #8
	str	r0, [fp, #-3128]
	str	r1, [fp, #-3132]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L12+4
	bl	puts
	ldr	r2, .L12+8
	sub	r3, fp, #3072
	sub	r3, r3, #4
	sub	r3, r3, #8
	ldm	r2, {r0, r1}
	str	r0, [r3]
	add	r3, r3, #4
	strb	r1, [r3]
	sub	r3, fp, #3072
	sub	r3, r3, #4
	sub	r3, r3, #3
	ldr	r2, .L12+12
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-3120]
	ldr	r3, [fp, #-3120]
	cmp	r3, #0
	bge	.L2
	ldr	r0, .L12+16
	bl	perror
	mov	r0, #1
	bl	exit
.L2:
	ldr	r1, [fp, #-3120]
	ldr	r0, .L12+20
	bl	printf
	sub	r3, fp, #4
	sub	r3, r3, #3088
	sub	r3, r3, #8
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	mov	r0, #64000
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #4
	sub	r3, r3, #3088
	sub	r3, r3, #8
	strh	r2, [r3, #2]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-3096]
	mov	r3, #16
	str	r3, [fp, #-3116]
	ldr	r2, [fp, #-3116]
	sub	r3, fp, #3088
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r1, r3
	ldr	r0, [fp, #-3120]
	bl	connect
	str	r0, [fp, #-3112]
	ldr	r3, [fp, #-3112]
	cmp	r3, #0
	bge	.L3
	ldr	r0, .L12+24
	bl	perror
	mov	r0, #1
	bl	exit
.L3:
	ldr	r0, .L12+28
	bl	puts
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #8
	mov	r3, #0
	ldr	r2, .L12+32
	ldr	r0, [fp, #-3120]
	bl	recv
	str	r0, [fp, #-3108]
	ldr	r3, [fp, #-3108]
	cmp	r3, #0
	bge	.L4
	ldr	r0, .L12+36
	bl	perror
	mov	r0, #1
	bl	exit
.L4:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r1, r3
	ldr	r0, .L12+40
	bl	printf
.L8:
	ldr	r0, .L12+44
	bl	printf
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r1, r3
	ldr	r0, .L12+48
	bl	__isoc99_scanf
	sub	r2, fp, #3072
	sub	r2, r2, #4
	sub	r2, r2, #8
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r1, r2
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L5
	ldr	r0, .L12+52
	bl	puts
	mov	r0, #3
	bl	sleep
	sub	r1, fp, #2048
	sub	r1, r1, #4
	sub	r1, r1, #8
	mov	r3, #0
	mov	r2, #1024
	ldr	r0, [fp, #-3120]
	bl	send
	str	r0, [fp, #-3104]
	nop
	mov	r3, #0
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	b	.L11
.L5:
	sub	r1, fp, #2048
	sub	r1, r1, #4
	sub	r1, r1, #8
	mov	r3, #0
	mov	r2, #1024
	ldr	r0, [fp, #-3120]
	bl	send
	str	r0, [fp, #-3104]
	ldr	r3, [fp, #-3104]
	cmp	r3, #0
	bge	.L7
	ldr	r0, .L12+56
	bl	perror
	mov	r0, #1
	bl	exit
.L7:
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #8
	mov	r3, #0
	ldr	r2, .L12+32
	ldr	r0, [fp, #-3120]
	bl	recv
	str	r0, [fp, #-3108]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r0, r3
	bl	puts
	b	.L8
.L11:
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC12
	.word	.LC0
	.word	.LC1
	.word	1019
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	1025
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
