	.file	"174200.c"
	.intel_syntax noprefix
	.text
	.globl	error
	.type	error, @function
error:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	perror@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	error, .-error
	.section	.rodata
.LC0:
	.string	"Server: %s"
.LC1:
	.string	">> "
.LC2:
	.string	"exit"
.LC3:
	.string	"Client Closed"
	.text
	.globl	chat
	.type	chat, @function
chat:
.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, 1040
	mov	DWORD PTR -1028[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
.L7:
	lea	rax, -1008[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 125
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
	lea	rcx, -1008[rbp]
	mov	eax, DWORD PTR -1028[rbp]
	mov	edx, 1000
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	lea	rax, -1008[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -1008[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 125
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -1012[rbp], 0
	jmp	.L3
.L4:
	mov	eax, DWORD PTR -1012[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -1012[rbp], edx
	cdqe
	movzx	edx, BYTE PTR -1013[rbp]
	mov	BYTE PTR -1008[rbp+rax], dl
.L3:
	call	getchar@PLT
	mov	BYTE PTR -1013[rbp], al
	cmp	BYTE PTR -1013[rbp], 10
	jne	.L4
	lea	rcx, -1008[rbp]
	mov	eax, DWORD PTR -1028[rbp]
	mov	edx, 1000
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	lea	rax, -1008[rbp]
	mov	edx, 4
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	call	strncmp@PLT
	test	eax, eax
	jne	.L7
	lea	rdi, .LC3[rip]
	call	puts@PLT
	nop
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	chat, .-chat
	.section	.rodata
.LC4:
	.string	"127.0.0.1"
.LC5:
	.string	"Error opening the socket"
.LC6:
	.string	"localhost"
.LC7:
	.string	"Error, no server\n"
.LC8:
	.string	"Error connecting"
	.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, 1072
	mov	DWORD PTR -1060[rbp], edi
	mov	QWORD PTR -1072[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, .LC4[rip]
	mov	QWORD PTR -1040[rbp], rax
	cmp	DWORD PTR -1060[rbp], 1
	jg	.L11
	mov	DWORD PTR -1048[rbp], 9200
	jmp	.L12
.L11:
	mov	rax, QWORD PTR -1072[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -1048[rbp], eax
.L12:
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -1044[rbp], eax
	cmp	DWORD PTR -1044[rbp], 0
	jns	.L13
	lea	rdi, .LC5[rip]
	call	error
.L13:
	lea	rdi, .LC6[rip]
	call	gethostbyname@PLT
	mov	QWORD PTR -1032[rbp], rax
	cmp	QWORD PTR -1032[rbp], 0
	jne	.L14
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 17
	mov	esi, 1
	lea	rdi, .LC7[rip]
	call	fwrite@PLT
	mov	edi, 0
	call	exit@PLT
.L14:
	mov	WORD PTR -1024[rbp], 2
	mov	rax, QWORD PTR -1032[rbp]
	mov	eax, DWORD PTR 20[rax]
	movsx	rdx, eax
	mov	rax, QWORD PTR -1032[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rax, QWORD PTR [rax]
	lea	rcx, -1024[rbp]
	add	rcx, 4
	mov	rsi, rax
	mov	rdi, rcx
	call	memmove@PLT
	mov	eax, DWORD PTR -1048[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -1022[rbp], ax
	lea	rcx, -1024[rbp]
	mov	eax, DWORD PTR -1044[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	test	eax, eax
	jns	.L15
	lea	rdi, .LC8[rip]
	call	error
.L15:
	mov	eax, DWORD PTR -1044[rbp]
	mov	edi, eax
	call	chat
	mov	eax, DWORD PTR -1044[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	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	"174200.c"
	.text
	.align	2
	.global	error
	.syntax unified
	.arm
	.fpu softvfp
	.type	error, %function
error:
	@ 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	r0, [fp, #-8]
	bl	perror
	mov	r0, #0
	bl	exit
	.size	error, .-error
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Server: %s\000"
	.align	2
.LC1:
	.ascii	">> \000"
	.align	2
.LC2:
	.ascii	"exit\000"
	.align	2
.LC3:
	.ascii	"Client Closed\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	chat
	.syntax unified
	.arm
	.fpu softvfp
	.type	chat, %function
chat:
	@ 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]
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
.L7:
	sub	r3, fp, #1008
	mov	r0, r3
	mov	r3, #1000
	mov	r2, r3
	mov	r1, #0
	bl	memset
	sub	r3, fp, #1008
	mov	r2, #1000
	mov	r1, r3
	ldr	r0, [fp, #-1024]
	bl	read
	sub	r3, fp, #1008
	mov	r1, r3
	ldr	r0, .L10+4
	bl	printf
	sub	r3, fp, #1008
	mov	r0, r3
	mov	r3, #1000
	mov	r2, r3
	mov	r1, #0
	bl	memset
	ldr	r0, .L10+8
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-1012]
	b	.L3
.L4:
	ldr	r3, [fp, #-1012]
	add	r2, r3, #1
	str	r2, [fp, #-1012]
	sub	r2, fp, #4
	add	r3, r2, r3
	ldrb	r2, [fp, #-1013]
	strb	r2, [r3, #-1004]
.L3:
	bl	getchar
	mov	r3, r0
	strb	r3, [fp, #-1013]
	ldrb	r3, [fp, #-1013]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L4
	sub	r3, fp, #1008
	mov	r2, #1000
	mov	r1, r3
	ldr	r0, [fp, #-1024]
	bl	write
	sub	r3, fp, #1008
	mov	r2, #4
	mov	r1, r3
	ldr	r0, .L10+12
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L7
	ldr	r0, .L10+16
	bl	puts
	nop
	nop
	ldr	r3, .L10
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L8
	bl	__stack_chk_fail
.L8:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC4
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	chat, .-chat
	.section	.rodata
	.align	2
.LC5:
	.ascii	"127.0.0.1\000"
	.align	2
.LC6:
	.ascii	"Error opening the socket\000"
	.align	2
.LC7:
	.ascii	"localhost\000"
	.align	2
.LC8:
	.ascii	"Error, no server\012\000"
	.align	2
.LC9:
	.ascii	"Error connecting\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 = 1048
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1040
	sub	sp, sp, #8
	str	r0, [fp, #-1048]
	str	r1, [fp, #-1052]
	ldr	r3, .L20
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L20+4
	str	r3, [fp, #-1036]
	ldr	r3, [fp, #-1048]
	cmp	r3, #1
	bgt	.L13
	ldr	r3, .L20+8
	str	r3, [fp, #-1040]
	b	.L14
.L13:
	ldr	r3, [fp, #-1052]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-1040]
.L14:
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-1032]
	ldr	r3, [fp, #-1032]
	cmp	r3, #0
	bge	.L15
	ldr	r0, .L20+12
	bl	error
.L15:
	ldr	r0, .L20+16
	bl	gethostbyname
	str	r0, [fp, #-1028]
	ldr	r3, [fp, #-1028]
	cmp	r3, #0
	bne	.L16
	ldr	r3, .L20+20
	ldr	r3, [r3]
	mov	r2, #17
	mov	r1, #1
	ldr	r0, .L20+24
	bl	fwrite
	mov	r0, #0
	bl	exit
.L16:
	sub	r3, fp, #4
	sub	r3, r3, #1020
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-1028]
	ldr	r3, [r3, #16]
	ldr	r1, [r3]
	ldr	r3, [fp, #-1028]
	ldr	r3, [r3, #12]
	mov	r2, r3
	sub	r3, fp, #1024
	add	r3, r3, #4
	mov	r0, r3
	bl	memmove
	ldr	r3, [fp, #-1040]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #4
	sub	r3, r3, #1020
	strh	r2, [r3, #2]	@ movhi
	sub	r3, fp, #1024
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-1032]
	bl	connect
	mov	r3, r0
	cmp	r3, #0
	bge	.L17
	ldr	r0, .L20+28
	bl	error
.L17:
	ldr	r0, [fp, #-1032]
	bl	chat
	ldr	r0, [fp, #-1032]
	bl	close
	mov	r3, #0
	ldr	r2, .L20
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L19
	bl	__stack_chk_fail
.L19:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	.LC10
	.word	.LC5
	.word	9200
	.word	.LC6
	.word	.LC7
	.word	stderr
	.word	.LC8
	.word	.LC9
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
