	.file	"179832075.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"hello from SocketStream_Demo!"
.LC1:
	.string	"socket create error!\n"
.LC2:
	.string	"sock:%d\n"
.LC3:
	.string	"bind error!\n"
.LC4:
	.string	"listen error!\n"
.LC5:
	.string	"accept error!\n"
	.align 8
.LC6:
	.string	"server:get connection from %s, port %d socket %d \n"
.LC7:
	.string	"recv error!"
.LC8:
	.string	"the client quit!"
.LC9:
	.string	"receive message: %s \n"
.LC10:
	.string	"%d"
.LC11:
	.string	"send data failed\n"
	.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
	push	rbx
	sub	rsp, 312
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	DWORD PTR -316[rbp], 0
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -312[rbp], eax
	cmp	DWORD PTR -312[rbp], 0
	jns	.L2
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	eax, DWORD PTR -312[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -304[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -304[rbp], 2
	mov	edi, 8888
	call	htons@PLT
	mov	WORD PTR -302[rbp], ax
	mov	DWORD PTR -300[rbp], 0
	lea	rcx, -304[rbp]
	mov	eax, DWORD PTR -312[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	cmp	eax, -1
	jne	.L3
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	eax, DWORD PTR -312[rbp]
	mov	esi, 5
	mov	edi, eax
	call	listen@PLT
	test	eax, eax
	jns	.L4
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	mov	DWORD PTR -320[rbp], 16
	lea	rdx, -320[rbp]
	lea	rcx, -288[rbp]
	mov	eax, DWORD PTR -312[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -308[rbp], eax
	cmp	DWORD PTR -308[rbp], 0
	jns	.L5
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	movzx	eax, WORD PTR -286[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	ntohs@PLT
	movzx	ebx, ax
	mov	eax, DWORD PTR -284[rbp]
	mov	edi, eax
	call	inet_ntoa@PLT
	mov	rsi, rax
	mov	eax, DWORD PTR -308[rbp]
	mov	ecx, eax
	mov	edx, ebx
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rsi, -272[rbp]
	mov	eax, DWORD PTR -308[rbp]
	mov	ecx, 0
	mov	edx, 100
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -320[rbp], eax
	mov	eax, DWORD PTR -320[rbp]
	test	eax, eax
	jns	.L6
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	mov	eax, DWORD PTR -320[rbp]
	test	eax, eax
	jne	.L7
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L7:
	mov	eax, DWORD PTR -320[rbp]
	cdqe
	mov	BYTE PTR -272[rbp+rax], 0
	lea	rax, -272[rbp]
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -272[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -316[rbp], eax
	add	DWORD PTR -316[rbp], 1
	mov	edx, DWORD PTR -316[rbp]
	lea	rax, -160[rbp]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -160[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -160[rbp]
	mov	eax, DWORD PTR -308[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	test	rax, rax
	jns	.L4
	lea	rdi, .LC11[rip]
	call	perror@PLT
	jmp	.L4
	.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	"179832075.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"hello from SocketStream_Demo!\000"
	.align	2
.LC1:
	.ascii	"socket create error!\012\000"
	.align	2
.LC2:
	.ascii	"sock:%d\012\000"
	.align	2
.LC3:
	.ascii	"bind error!\012\000"
	.align	2
.LC4:
	.ascii	"listen error!\012\000"
	.align	2
.LC5:
	.ascii	"accept error!\012\000"
	.align	2
.LC6:
	.ascii	"server:get connection from %s, port %d socket %d \012"
	.ascii	"\000"
	.align	2
.LC7:
	.ascii	"recv error!\000"
	.align	2
.LC8:
	.ascii	"the client quit!\000"
	.align	2
.LC9:
	.ascii	"receive message: %s \012\000"
	.align	2
.LC10:
	.ascii	"%d\000"
	.align	2
.LC11:
	.ascii	"send data failed\012\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 = 280
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #284
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r0, .L10+4
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-288]
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-284]
	ldr	r3, [fp, #-284]
	cmp	r3, #0
	bge	.L2
	ldr	r0, .L10+8
	bl	perror
	mov	r0, #1
	bl	exit
.L2:
	ldr	r1, [fp, #-284]
	ldr	r0, .L10+12
	bl	printf
	sub	r3, fp, #276
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #12
	sub	r3, r3, #264
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r0, .L10+16
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #12
	sub	r3, r3, #264
	strh	r2, [r3, #2]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-272]
	sub	r3, fp, #276
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-284]
	bl	bind
	mov	r3, r0
	cmn	r3, #1
	bne	.L3
	ldr	r0, .L10+20
	bl	perror
	mov	r0, #1
	bl	exit
.L3:
	mov	r1, #5
	ldr	r0, [fp, #-284]
	bl	listen
	mov	r3, r0
	cmp	r3, #0
	bge	.L4
	ldr	r0, .L10+24
	bl	perror
	mov	r0, #1
	bl	exit
.L4:
	mov	r3, #16
	str	r3, [fp, #-292]
	sub	r2, fp, #292
	sub	r3, fp, #260
	mov	r1, r3
	ldr	r0, [fp, #-284]
	bl	accept
	str	r0, [fp, #-280]
	ldr	r3, [fp, #-280]
	cmp	r3, #0
	bge	.L5
	ldr	r0, .L10+28
	bl	perror
	mov	r0, #1
	bl	exit
.L5:
	ldr	r0, [fp, #-256]
	bl	inet_ntoa
	mov	r4, r0
	sub	r3, fp, #256
	sub	r3, r3, #2
	ldrh	r3, [r3]
	mov	r0, r3
	bl	ntohs
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-280]
	mov	r1, r4
	ldr	r0, .L10+32
	bl	printf
	sub	r1, fp, #244
	mov	r3, #0
	mov	r2, #100
	ldr	r0, [fp, #-280]
	bl	recv
	mov	r3, r0
	str	r3, [fp, #-292]
	ldr	r3, [fp, #-292]
	cmp	r3, #0
	bge	.L6
	ldr	r0, .L10+36
	bl	puts
	mov	r0, #1
	bl	exit
.L6:
	ldr	r3, [fp, #-292]
	cmp	r3, #0
	bne	.L7
	ldr	r0, .L10+40
	bl	puts
	mov	r0, #1
	bl	exit
.L7:
	ldr	r3, [fp, #-292]
	sub	r2, fp, #12
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3, #-232]
	sub	r3, fp, #244
	mov	r1, r3
	ldr	r0, .L10+44
	bl	printf
	sub	r3, fp, #244
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-288]
	ldr	r3, [fp, #-288]
	add	r3, r3, #1
	str	r3, [fp, #-288]
	sub	r3, fp, #144
	ldr	r2, [fp, #-288]
	ldr	r1, .L10+48
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #144
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #144
	mov	r3, #0
	ldr	r0, [fp, #-280]
	bl	send
	mov	r3, r0
	cmp	r3, #0
	bge	.L4
	ldr	r0, .L10+52
	bl	perror
	b	.L4
.L11:
	.align	2
.L10:
	.word	.LC12
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	8888
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.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
