	.file	"247017759.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Usage: %s <IP><port>\n"
.LC1:
	.string	"socket() error"
.LC2:
	.string	"connect() error!"
.LC3:
	.string	"Conneected......"
.LC4:
	.string	"r"
.LC5:
	.string	"w"
.LC6:
	.string	"Input message(Q to quit): "
.LC7:
	.string	"q\n"
.LC8:
	.string	"Q\n"
.LC9:
	.string	"Message from server : %s"
	.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, 1104
	mov	DWORD PTR -1092[rbp], edi
	mov	QWORD PTR -1104[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -1092[rbp], 3
	je	.L2
	mov	rax, QWORD PTR -1104[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -1076[rbp], eax
	cmp	DWORD PTR -1076[rbp], -1
	jne	.L3
	lea	rdi, .LC1[rip]
	call	ErrorHandling
.L3:
	lea	rax, -1056[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -1056[rbp], 2
	mov	rax, QWORD PTR -1104[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	inet_addr@PLT
	mov	DWORD PTR -1052[rbp], eax
	mov	rax, QWORD PTR -1104[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -1054[rbp], ax
	lea	rcx, -1056[rbp]
	mov	eax, DWORD PTR -1076[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	cmp	eax, -1
	jne	.L4
	lea	rdi, .LC2[rip]
	call	ErrorHandling
	jmp	.L5
.L4:
	lea	rdi, .LC3[rip]
	call	puts@PLT
.L5:
	mov	eax, DWORD PTR -1076[rbp]
	lea	rsi, .LC4[rip]
	mov	edi, eax
	call	fdopen@PLT
	mov	QWORD PTR -1072[rbp], rax
	mov	eax, DWORD PTR -1076[rbp]
	lea	rsi, .LC5[rip]
	mov	edi, eax
	call	fdopen@PLT
	mov	QWORD PTR -1064[rbp], rax
.L7:
	mov	rax, QWORD PTR stdout[rip]
	mov	rcx, rax
	mov	edx, 26
	mov	esi, 1
	lea	rdi, .LC6[rip]
	call	fwrite@PLT
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -1040[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	fgets@PLT
	lea	rax, -1040[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L6
	lea	rax, -1040[rbp]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L6
	mov	rdx, QWORD PTR -1064[rbp]
	lea	rax, -1040[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fputs@PLT
	mov	rax, QWORD PTR -1064[rbp]
	mov	rdi, rax
	call	fflush@PLT
	mov	rdx, QWORD PTR -1072[rbp]
	lea	rax, -1040[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	fgets@PLT
	lea	rax, -1040[rbp]
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L7
.L6:
	mov	rax, QWORD PTR -1064[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -1072[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
	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
	.globl	ErrorHandling
	.type	ErrorHandling, @function
ErrorHandling:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rdx, QWORD PTR stderr[rip]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fputs@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE7:
	.size	ErrorHandling, .-ErrorHandling
	.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	"247017759.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: %s <IP><port>\012\000"
	.align	2
.LC1:
	.ascii	"socket() error\000"
	.align	2
.LC2:
	.ascii	"connect() error!\000"
	.align	2
.LC3:
	.ascii	"Conneected......\000"
	.align	2
.LC4:
	.ascii	"r\000"
	.align	2
.LC5:
	.ascii	"w\000"
	.align	2
.LC6:
	.ascii	"Input message(Q to quit): \000"
	.align	2
.LC7:
	.ascii	"q\012\000"
	.align	2
.LC8:
	.ascii	"Q\012\000"
	.align	2
.LC9:
	.ascii	"Message from server : %s\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 = 1064
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1056
	sub	sp, sp, #8
	str	r0, [fp, #-1064]
	str	r1, [fp, #-1068]
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-1064]
	cmp	r3, #3
	beq	.L2
	ldr	r3, [fp, #-1068]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L10+4
	bl	printf
	mov	r0, #1
	bl	exit
.L2:
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-1060]
	ldr	r3, [fp, #-1060]
	cmn	r3, #1
	bne	.L3
	ldr	r0, .L10+8
	bl	ErrorHandling
.L3:
	sub	r3, fp, #1040
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #4
	sub	r3, r3, #1040
	sub	r3, r3, #4
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-1068]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	inet_addr
	mov	r3, r0
	str	r3, [fp, #-1044]
	ldr	r3, [fp, #-1068]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	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, #1040
	sub	r3, r3, #4
	strh	r2, [r3, #2]	@ movhi
	sub	r3, fp, #1040
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-1060]
	bl	connect
	mov	r3, r0
	cmn	r3, #1
	bne	.L4
	ldr	r0, .L10+12
	bl	ErrorHandling
	b	.L5
.L4:
	ldr	r0, .L10+16
	bl	puts
.L5:
	ldr	r1, .L10+20
	ldr	r0, [fp, #-1060]
	bl	fdopen
	str	r0, [fp, #-1056]
	ldr	r1, .L10+24
	ldr	r0, [fp, #-1060]
	bl	fdopen
	str	r0, [fp, #-1052]
.L7:
	ldr	r3, .L10+28
	ldr	r3, [r3]
	mov	r2, #26
	mov	r1, #1
	ldr	r0, .L10+32
	bl	fwrite
	ldr	r3, .L10+36
	ldr	r2, [r3]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, #1024
	mov	r0, r3
	bl	fgets
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L10+40
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L6
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L10+44
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L6
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, [fp, #-1052]
	mov	r0, r3
	bl	fputs
	ldr	r0, [fp, #-1052]
	bl	fflush
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-1056]
	mov	r1, #1024
	mov	r0, r3
	bl	fgets
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L10+48
	bl	printf
	b	.L7
.L6:
	ldr	r0, [fp, #-1052]
	bl	fclose
	ldr	r0, [fp, #-1056]
	bl	fclose
	mov	r3, #0
	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	.LC10
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	stdout
	.word	.LC6
	.word	stdin
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.size	main, .-main
	.align	2
	.global	ErrorHandling
	.syntax unified
	.arm
	.fpu softvfp
	.type	ErrorHandling, %function
ErrorHandling:
	@ 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, .L13
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	fputs
	ldr	r3, .L13
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L14:
	.align	2
.L13:
	.word	stderr
	.size	ErrorHandling, .-ErrorHandling
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
