	.file	"575283.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"socket"
.LC1:
	.string	"socket create success!"
.LC2:
	.string	"connect fail"
.LC3:
	.string	"conncet success!"
	.align 8
.LC4:
	.string	"select\345\207\272\351\224\231\357\274\214\345\256\242\346\210\267\347\253\257\347\250\213\345\272\217\351\200\200\345\207\272"
.LC5:
	.string	"waiting..."
	.align 8
.LC6:
	.string	"\346\234\215\345\212\241\345\231\250\345\217\221\346\235\245\347\232\204\346\266\210\346\201\257\346\230\257\357\274\232%s\n"
	.align 8
.LC7:
	.string	"\346\234\215\345\212\241\345\231\250\351\200\200\345\207\272\344\272\206\357\274\214\350\201\212\345\244\251\347\273\210\346\255\242\357\274\201"
.LC8:
	.string	"quit"
.LC9:
	.string	"client \350\257\267\346\261\202\347\273\210\346\255\242\350\201\212\345\244\251!"
.LC10:
	.string	"\t\346\266\210\346\201\257\345\217\221\351\200\201\346\210\220\345\212\237\357\274\232%s\n"
.LC11:
	.string	"\346\266\210\346\201\257\345\217\221\351\200\201\345\244\261\350\264\245!"
	.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, 1248
	mov	DWORD PTR -1236[rbp], edi
	mov	QWORD PTR -1248[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -1220[rbp], eax
	cmp	DWORD PTR -1220[rbp], -1
	jne	.L2
	lea	rdi, .LC0[rip]
	call	perror@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	exit@PLT
.L2:
	lea	rdi, .LC1[rip]
	call	puts@PLT
	lea	rax, -1184[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -1184[rbp], 2
	mov	edi, 6666
	call	htons@PLT
	mov	WORD PTR -1182[rbp], ax
	mov	rax, QWORD PTR -1248[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rdx, -1184[rbp]
	add	rdx, 4
	mov	rsi, rdx
	mov	rdi, rax
	call	inet_aton@PLT
	test	eax, eax
	jne	.L3
	mov	rax, QWORD PTR -1248[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	perror@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	exit@PLT
.L3:
	lea	rcx, -1184[rbp]
	mov	eax, DWORD PTR -1220[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	cmp	eax, -1
	jne	.L4
	lea	rdi, .LC2[rip]
	call	perror@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	exit@PLT
.L4:
	lea	rdi, .LC3[rip]
	call	puts@PLT
.L14:
	mov	eax, 0
	mov	ecx, 16
	lea	rdx, -1168[rbp]
	mov	rdi, rdx
#APP
# 50 "the_stack_data/575283.c" 1
	cld; rep; stosq
# 0 "" 2
#NO_APP
	mov	eax, edi
	mov	edx, ecx
	mov	DWORD PTR -1216[rbp], edx
	mov	DWORD PTR -1212[rbp], eax
	mov	rax, QWORD PTR -1168[rbp]
	or	rax, 1
	mov	QWORD PTR -1168[rbp], rax
	mov	DWORD PTR -1224[rbp], 0
	mov	eax, DWORD PTR -1220[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -1168[rbp+rax*8]
	mov	eax, DWORD PTR -1220[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	or	rdi, rax
	mov	rdx, rdi
	movsx	rax, esi
	mov	QWORD PTR -1168[rbp+rax*8], rdx
	mov	eax, DWORD PTR -1224[rbp]
	cmp	eax, DWORD PTR -1220[rbp]
	jge	.L5
	mov	eax, DWORD PTR -1220[rbp]
	mov	DWORD PTR -1224[rbp], eax
.L5:
	mov	QWORD PTR -1200[rbp], 6
	mov	QWORD PTR -1192[rbp], 0
	mov	eax, DWORD PTR -1224[rbp]
	lea	edi, 1[rax]
	lea	rdx, -1200[rbp]
	lea	rax, -1168[rbp]
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 0
	mov	rsi, rax
	call	select@PLT
	mov	DWORD PTR -1208[rbp], eax
	cmp	DWORD PTR -1208[rbp], -1
	jne	.L6
	lea	rdi, .LC4[rip]
	call	puts@PLT
	jmp	.L7
.L6:
	cmp	DWORD PTR -1208[rbp], 0
	jne	.L8
	lea	rdi, .LC5[rip]
	call	puts@PLT
	jmp	.L9
.L8:
	mov	eax, DWORD PTR -1220[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	cdqe
	mov	rsi, QWORD PTR -1168[rbp+rax*8]
	mov	eax, DWORD PTR -1220[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	and	rax, rsi
	test	rax, rax
	je	.L10
	lea	rax, -1040[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 128
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1220[rbp]
	mov	ecx, 0
	mov	edx, 1024
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -1204[rbp], eax
	cmp	DWORD PTR -1204[rbp], 0
	je	.L11
	lea	rax, -1040[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L10
.L11:
	lea	rdi, .LC7[rip]
	call	puts@PLT
	jmp	.L7
.L10:
	mov	rax, QWORD PTR -1168[rbp]
	and	eax, 1
	test	rax, rax
	je	.L14
	lea	rax, -1040[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 128
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -1040[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	fgets@PLT
	lea	rax, -1040[rbp]
	mov	edx, 4
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	call	strncasecmp@PLT
	test	eax, eax
	jne	.L12
	lea	rdi, .LC9[rip]
	call	puts@PLT
	jmp	.L7
.L12:
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1220[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -1204[rbp], eax
	cmp	DWORD PTR -1204[rbp], 0
	je	.L13
	lea	rax, -1040[rbp]
	mov	rsi, rax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L14
.L13:
	lea	rdi, .LC11[rip]
	call	puts@PLT
	jmp	.L7
.L9:
	jmp	.L14
.L7:
	mov	eax, DWORD PTR -1220[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	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	"575283.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"socket\000"
	.align	2
.LC1:
	.ascii	"socket create success!\000"
	.align	2
.LC2:
	.ascii	"connect fail\000"
	.align	2
.LC3:
	.ascii	"conncet success!\000"
	.align	2
.LC4:
	.ascii	"select\345\207\272\351\224\231\357\274\214\345\256\242"
	.ascii	"\346\210\267\347\253\257\347\250\213\345\272\217\351"
	.ascii	"\200\200\345\207\272\000"
	.align	2
.LC5:
	.ascii	"waiting...\000"
	.align	2
.LC6:
	.ascii	"\346\234\215\345\212\241\345\231\250\345\217\221\346"
	.ascii	"\235\245\347\232\204\346\266\210\346\201\257\346\230"
	.ascii	"\257\357\274\232%s\012\000"
	.align	2
.LC7:
	.ascii	"\346\234\215\345\212\241\345\231\250\351\200\200\345"
	.ascii	"\207\272\344\272\206\357\274\214\350\201\212\345\244"
	.ascii	"\251\347\273\210\346\255\242\357\274\201\000"
	.align	2
.LC8:
	.ascii	"quit\000"
	.align	2
.LC9:
	.ascii	"client \350\257\267\346\261\202\347\273\210\346\255"
	.ascii	"\242\350\201\212\345\244\251!\000"
	.align	2
.LC10:
	.ascii	"\011\346\266\210\346\201\257\345\217\221\351\200\201"
	.ascii	"\346\210\220\345\212\237\357\274\232%s\012\000"
	.align	2
.LC11:
	.ascii	"\346\266\210\346\201\257\345\217\221\351\200\201\345"
	.ascii	"\244\261\350\264\245!\000"
	.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 = 1216
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1216
	sub	sp, sp, #8
	str	r0, [fp, #-1216]
	str	r1, [fp, #-1220]
	ldr	r3, .L19
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-1200]
	ldr	r3, [fp, #-1200]
	cmn	r3, #1
	bne	.L2
	ldr	r0, .L19+4
	bl	perror
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	exit
.L2:
	ldr	r0, .L19+8
	bl	puts
	sub	r3, fp, #1168
	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, #1168
	sub	r3, r3, #4
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r0, .L19+12
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #4
	sub	r3, r3, #1168
	sub	r3, r3, #4
	strh	r2, [r3, #2]	@ movhi
	ldr	r3, [fp, #-1220]
	add	r3, r3, #4
	ldr	r2, [r3]
	sub	r3, fp, #1168
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r3, r3, #4
	mov	r1, r3
	mov	r0, r2
	bl	inet_aton
	mov	r3, r0
	cmp	r3, #0
	bne	.L3
	ldr	r3, [fp, #-1220]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	perror
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	exit
.L3:
	sub	r3, fp, #1168
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-1200]
	bl	connect
	mov	r3, r0
	cmn	r3, #1
	bne	.L4
	ldr	r0, .L19+16
	bl	perror
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	exit
.L4:
	ldr	r0, .L19+20
	bl	puts
.L16:
	sub	r3, fp, #1152
	sub	r3, r3, #4
	sub	r3, r3, #4
	str	r3, [fp, #-1196]
	mov	r3, #0
	str	r3, [fp, #-1204]
	b	.L5
.L6:
	ldr	r3, [fp, #-1196]
	ldr	r2, [fp, #-1204]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-1204]
	add	r3, r3, #1
	str	r3, [fp, #-1204]
.L5:
	ldr	r3, [fp, #-1204]
	cmp	r3, #31
	bls	.L6
	ldr	r3, [fp, #-1160]
	orr	r3, r3, #1
	str	r3, [fp, #-1160]
	mov	r3, #0
	str	r3, [fp, #-1208]
	ldr	r3, [fp, #-1200]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	mov	r2, r3
	lsl	r3, r2, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-1156]
	ldr	r3, [fp, #-1200]
	rsbs	r0, r3, #0
	and	r3, r3, #31
	and	r0, r0, #31
	rsbpl	r3, r0, #0
	mov	r0, #1
	lsl	r3, r0, r3
	orr	r1, r1, r3
	lsl	r3, r2, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	str	r1, [r3, #-1156]
	ldr	r2, [fp, #-1208]
	ldr	r3, [fp, #-1200]
	cmp	r2, r3
	bge	.L7
	ldr	r3, [fp, #-1200]
	str	r3, [fp, #-1208]
.L7:
	mov	r3, #6
	str	r3, [fp, #-1184]
	mov	r3, #0
	str	r3, [fp, #-1180]
	ldr	r3, [fp, #-1208]
	add	r0, r3, #1
	sub	r1, fp, #1152
	sub	r1, r1, #4
	sub	r1, r1, #4
	sub	r3, fp, #1168
	sub	r3, r3, #4
	sub	r3, r3, #12
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #0
	bl	select
	str	r0, [fp, #-1192]
	ldr	r3, [fp, #-1192]
	cmn	r3, #1
	bne	.L8
	ldr	r0, .L19+24
	bl	puts
	b	.L9
.L8:
	ldr	r3, [fp, #-1192]
	cmp	r3, #0
	bne	.L10
	ldr	r0, .L19+28
	bl	puts
	b	.L11
.L10:
	ldr	r3, [fp, #-1200]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-1156]
	ldr	r3, [fp, #-1200]
	rsbs	r1, r3, #0
	and	r3, r3, #31
	and	r1, r1, #31
	rsbpl	r3, r1, #0
	mov	r1, #1
	lsl	r3, r1, r3
	and	r3, r3, r2
	cmp	r3, #0
	beq	.L12
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	mov	r3, #1024
	mov	r2, r3
	mov	r1, #0
	bl	memset
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	mov	r2, #1024
	ldr	r0, [fp, #-1200]
	bl	recv
	mov	r3, r0
	str	r3, [fp, #-1188]
	ldr	r3, [fp, #-1188]
	cmp	r3, #0
	beq	.L13
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L19+32
	bl	printf
	b	.L12
.L13:
	ldr	r0, .L19+36
	bl	puts
	b	.L9
.L12:
	ldr	r3, [fp, #-1160]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L16
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	mov	r3, #1024
	mov	r2, r3
	mov	r1, #0
	bl	memset
	ldr	r3, .L19+40
	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
	mov	r2, #4
	ldr	r1, .L19+44
	mov	r0, r3
	bl	strncasecmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L14
	ldr	r0, .L19+48
	bl	puts
	b	.L9
.L14:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-1200]
	bl	send
	mov	r3, r0
	str	r3, [fp, #-1188]
	ldr	r3, [fp, #-1188]
	cmp	r3, #0
	beq	.L15
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L19+52
	bl	printf
	b	.L16
.L15:
	ldr	r0, .L19+56
	bl	puts
	b	.L9
.L11:
	b	.L16
.L9:
	ldr	r0, [fp, #-1200]
	bl	close
	mov	r3, #0
	ldr	r2, .L19
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L18
	bl	__stack_chk_fail
.L18:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC12
	.word	.LC0
	.word	.LC1
	.word	6666
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	stdin
	.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
