	.file	"822332.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"new socket failed"
.LC1:
	.string	"127.0.0.1"
.LC2:
	.string	"invaild address"
.LC3:
	.string	"connect to server failed"
.LC4:
	.string	"read %s form server\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, 2112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edx, 6
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -2096[rbp], eax
	cmp	DWORD PTR -2096[rbp], 0
	jns	.L2
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L12
.L2:
	lea	rax, -2080[rbp]
	mov	QWORD PTR [rax], 0
	mov	QWORD PTR 8[rax], 0
	mov	WORD PTR -2080[rbp], 2
	mov	edi, 8080
	call	htons@PLT
	mov	WORD PTR -2078[rbp], ax
	lea	rax, -2080[rbp]
	add	rax, 4
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	inet_aton@PLT
	cmp	eax, 1
	je	.L4
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L12
.L4:
	lea	rcx, -2080[rbp]
	mov	eax, DWORD PTR -2096[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	test	eax, eax
	jns	.L5
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L12
.L5:
	lea	rax, -2064[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	gets@PLT
	lea	rax, -2064[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, 1[rax]
	lea	rcx, -2064[rbp]
	mov	eax, DWORD PTR -2096[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	writen
	lea	rax, -1040[rbp]
	mov	QWORD PTR -2088[rbp], rax
	mov	DWORD PTR -2100[rbp], 0
.L11:
	lea	rcx, -2064[rbp]
	mov	eax, DWORD PTR -2096[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	read@PLT
	mov	DWORD PTR -2092[rbp], eax
	cmp	DWORD PTR -2092[rbp], 0
	jns	.L6
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 4
	jne	.L14
	jmp	.L8
.L6:
	cmp	DWORD PTR -2092[rbp], 0
	je	.L15
	mov	eax, DWORD PTR -2092[rbp]
	cdqe
	add	QWORD PTR -2088[rbp], rax
	mov	eax, DWORD PTR -2092[rbp]
	add	DWORD PTR -2100[rbp], eax
.L8:
	jmp	.L11
.L14:
	nop
	jmp	.L9
.L15:
	nop
.L9:
	mov	eax, DWORD PTR -2100[rbp]
	cdqe
	mov	BYTE PTR -2064[rbp+rax], 0
	lea	rax, -2064[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	exit@PLT
.L12:
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, 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
	.globl	writen
	.type	writen, @function
writen:
.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, 64
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	QWORD PTR -56[rbp], rdx
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L17
.L18:
	mov	rdx, QWORD PTR -24[rbp]
	mov	rcx, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	write@PLT
	cdqe
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	sub	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	add	QWORD PTR -16[rbp], rax
.L17:
	cmp	QWORD PTR -24[rbp], 0
	jne	.L18
	mov	rax, QWORD PTR -56[rbp]
	sub	rax, QWORD PTR -24[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	writen, .-writen
	.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	"822332.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"new socket failed\000"
	.align	2
.LC1:
	.ascii	"127.0.0.1\000"
	.align	2
.LC2:
	.ascii	"invaild address\000"
	.align	2
.LC3:
	.ascii	"connect to server failed\000"
	.align	2
.LC4:
	.ascii	"read %s form server\012\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 2088
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #2080
	sub	sp, sp, #8
	ldr	r3, .L16
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #6
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-2080]
	ldr	r3, [fp, #-2080]
	cmp	r3, #0
	bge	.L2
	ldr	r0, .L16+4
	bl	perror
	mov	r3, #1
	b	.L12
.L2:
	sub	r3, fp, #2064
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2]
	str	r3, [r2, #4]
	str	r3, [r2, #8]
	str	r3, [r2, #12]
	sub	r3, fp, #4
	sub	r3, r3, #2064
	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, #2064
	sub	r3, r3, #4
	strh	r2, [r3, #2]	@ movhi
	sub	r3, fp, #2064
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L16+12
	bl	inet_aton
	mov	r3, r0
	cmp	r3, #1
	beq	.L4
	ldr	r0, .L16+16
	bl	perror
	mov	r3, #1
	b	.L12
.L4:
	sub	r3, fp, #2064
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-2080]
	bl	connect
	mov	r3, r0
	cmp	r3, #0
	bge	.L5
	ldr	r0, .L16+20
	bl	perror
	mov	r3, #1
	b	.L12
.L5:
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	gets
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	add	r2, r3, #1
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-2080]
	bl	writen
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	str	r3, [fp, #-2088]
	mov	r3, #0
	str	r3, [fp, #-2084]
.L11:
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-2080]
	bl	read
	str	r0, [fp, #-2076]
	ldr	r3, [fp, #-2076]
	cmp	r3, #0
	bge	.L6
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #4
	bne	.L14
	b	.L8
.L6:
	ldr	r3, [fp, #-2076]
	cmp	r3, #0
	beq	.L15
	ldr	r3, [fp, #-2076]
	ldr	r2, [fp, #-2088]
	add	r3, r2, r3
	str	r3, [fp, #-2088]
	ldr	r2, [fp, #-2084]
	ldr	r3, [fp, #-2076]
	add	r3, r2, r3
	str	r3, [fp, #-2084]
.L8:
	b	.L11
.L14:
	nop
	b	.L9
.L15:
	nop
.L9:
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-2084]
	add	r3, r3, r2
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L16+24
	bl	printf
	mov	r0, #0
	bl	exit
.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	.LC5
	.word	.LC0
	.word	8080
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.align	2
	.global	writen
	.syntax unified
	.arm
	.fpu softvfp
	.type	writen, %function
writen:
	@ 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, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-12]
	b	.L19
.L20:
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-24]
	bl	write
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	sub	r3, r2, r3
	str	r3, [fp, #-16]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-12]
.L19:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L20
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-16]
	sub	r3, r2, r3
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	writen, .-writen
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
