	.file	"848866.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Connecting to %s\n"
.LC1:
	.string	"Connected."
.LC2:
	.string	"Goodbye."
.LC3:
	.string	"quit"
	.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, 1168
	mov	DWORD PTR -1156[rbp], edi
	mov	QWORD PTR -1168[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -1120[rbp], 0
	mov	QWORD PTR -1112[rbp], 0
	mov	QWORD PTR -1128[rbp], 0
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -1136[rbp], eax
	cmp	DWORD PTR -1136[rbp], 0
	jns	.L2
	mov	edi, 0
	mov	eax, 0
	call	perror@PLT
	mov	eax, 1
	jmp	.L12
.L2:
	lea	rax, -1040[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	gethostname@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	gethostbyname@PLT
	mov	QWORD PTR -1128[rbp], rax
	lea	rax, -1040[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -1120[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rax, QWORD PTR -1128[rbp]
	mov	eax, DWORD PTR 20[rax]
	movsx	rdx, eax
	mov	rax, QWORD PTR -1128[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rax, QWORD PTR [rax]
	lea	rcx, -1120[rbp]
	add	rcx, 4
	mov	rsi, rax
	mov	rdi, rcx
	call	memcpy@PLT
	mov	WORD PTR -1120[rbp], 2
	mov	edi, 2014
	call	htons@PLT
	mov	WORD PTR -1118[rbp], ax
	lea	rcx, -1120[rbp]
	mov	eax, DWORD PTR -1136[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	test	eax, eax
	jns	.L4
	mov	edi, 0
	mov	eax, 0
	call	perror@PLT
	mov	eax, 1
	jmp	.L12
.L4:
	lea	rdi, .LC1[rip]
	call	puts@PLT
	jmp	.L5
.L11:
	mov	DWORD PTR -1132[rbp], 0
	mov	DWORD PTR -1144[rbp], 0
	jmp	.L6
.L7:
	mov	eax, 64
	sub	eax, DWORD PTR -1144[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -1144[rbp]
	cdqe
	lea	rcx, -1104[rbp]
	lea	rsi, [rcx+rax]
	mov	eax, DWORD PTR -1136[rbp]
	mov	ecx, 16384
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -1132[rbp], eax
	mov	eax, DWORD PTR -1132[rbp]
	add	DWORD PTR -1144[rbp], eax
.L6:
	cmp	DWORD PTR -1144[rbp], 63
	jle	.L7
	cmp	DWORD PTR -1144[rbp], 64
	jne	.L14
	mov	DWORD PTR -1140[rbp], 0
	nop
.L10:
	lea	rcx, -1104[rbp]
	mov	eax, DWORD PTR -1136[rbp]
	mov	edx, 64
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -1140[rbp]
	add	eax, edx
	mov	DWORD PTR -1140[rbp], eax
	cmp	DWORD PTR -1140[rbp], 63
	jle	.L10
	lea	rax, -1104[rbp]
	mov	rdi, rax
	call	puts@PLT
	lea	rax, -1104[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L15
.L5:
	lea	rax, -1104[rbp]
	mov	esi, 64
	mov	rdi, rax
	mov	eax, 0
	call	gets@PLT
	test	eax, eax
	je	.L9
	lea	rax, -1104[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L11
	jmp	.L9
.L14:
	nop
	jmp	.L9
.L15:
	nop
.L9:
	mov	eax, 0
.L12:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	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	"848866.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Connecting to %s\012\000"
	.align	2
.LC1:
	.ascii	"Connected.\000"
	.align	2
.LC2:
	.ascii	"Goodbye.\000"
	.align	2
.LC3:
	.ascii	"quit\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1136
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1136
	str	r0, [fp, #-1136]
	str	r1, [fp, #-1140]
	ldr	r3, .L16
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #1104
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #0
	str	r2, [r3]
	str	r2, [r3, #4]
	str	r2, [r3, #8]
	str	r2, [r3, #12]
	mov	r3, #0
	str	r3, [fp, #-1124]
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-1120]
	ldr	r3, [fp, #-1120]
	cmp	r3, #0
	bge	.L2
	mov	r0, #0
	bl	perror
	mov	r3, #1
	b	.L12
.L2:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, #1024
	mov	r0, r3
	bl	gethostname
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	gethostbyname
	str	r0, [fp, #-1124]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L16+4
	bl	printf
	sub	r3, fp, #1104
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, [fp, #-1124]
	ldr	r3, [r3, #16]
	ldr	r1, [r3]
	ldr	r3, [fp, #-1124]
	ldr	r3, [r3, #12]
	mov	r2, r3
	sub	r3, fp, #1104
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r3, r3, #4
	mov	r0, r3
	bl	memcpy
	sub	r3, fp, #4
	sub	r3, r3, #1104
	sub	r3, r3, #4
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r0, .L16+8
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #4
	sub	r3, r3, #1104
	sub	r3, r3, #4
	strh	r2, [r3, #2]	@ movhi
	sub	r3, fp, #1104
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-1120]
	bl	connect
	mov	r3, r0
	cmp	r3, #0
	bge	.L4
	mov	r0, #0
	bl	perror
	mov	r3, #1
	b	.L12
.L4:
	ldr	r0, .L16+12
	bl	puts
	b	.L5
.L11:
	mov	r3, #0
	str	r3, [fp, #-1116]
	mov	r3, #0
	str	r3, [fp, #-1132]
	b	.L6
.L7:
	ldr	r2, [fp, #-1132]
	sub	r3, fp, #1088
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r1, r3, r2
	ldr	r3, [fp, #-1132]
	rsb	r3, r3, #64
	mov	r2, r3
	mov	r3, #16384
	ldr	r0, [fp, #-1120]
	bl	send
	str	r0, [fp, #-1116]
	ldr	r2, [fp, #-1132]
	ldr	r3, [fp, #-1116]
	add	r3, r2, r3
	str	r3, [fp, #-1132]
.L6:
	ldr	r3, [fp, #-1132]
	cmp	r3, #63
	ble	.L7
	ldr	r3, [fp, #-1132]
	cmp	r3, #64
	bne	.L14
	mov	r3, #0
	str	r3, [fp, #-1128]
	nop
.L10:
	sub	r3, fp, #1088
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #64
	mov	r1, r3
	ldr	r0, [fp, #-1120]
	bl	read
	mov	r2, r0
	ldr	r3, [fp, #-1128]
	add	r3, r3, r2
	str	r3, [fp, #-1128]
	ldr	r3, [fp, #-1128]
	cmp	r3, #63
	ble	.L10
	sub	r3, fp, #1088
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	puts
	sub	r3, fp, #1088
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L16+16
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L15
.L5:
	sub	r3, fp, #1088
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, #64
	mov	r0, r3
	bl	gets
	mov	r3, r0
	cmp	r3, #0
	beq	.L9
	sub	r3, fp, #1088
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L16+20
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L11
	b	.L9
.L14:
	nop
	b	.L9
.L15:
	nop
.L9:
	mov	r3, #0
.L12:
	ldr	r2, .L16
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC4
	.word	.LC0
	.word	2014
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
