	.file	"548844.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"socket"
.LC1:
	.string	"bind"
.LC2:
	.string	"listen"
.LC3:
	.string	"wait for connect"
.LC4:
	.string	"accept"
	.align 8
.LC5:
	.string	"server: got connection from %s, port %d, socket %d\n"
.LC6:
	.string	"fork"
.LC7:
	.string	"input the message to send:"
.LC8:
	.string	"quit"
.LC9:
	.string	"i will close the connect!"
	.align 8
.LC10:
	.string	"message recv successful :'%s',%dByte recv\n"
.LC11:
	.string	"the other one close 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
	push	rbx
	sub	rsp, 1128
	.cfi_offset 3, -24
	mov	DWORD PTR -1124[rbp], edi
	mov	QWORD PTR -1136[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -1136[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L2
	mov	rax, QWORD PTR -1136[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -1108[rbp], eax
	jmp	.L3
.L2:
	mov	DWORD PTR -1108[rbp], 7575
.L3:
	mov	rax, QWORD PTR -1136[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L4
	mov	rax, QWORD PTR -1136[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -1104[rbp], eax
	jmp	.L5
.L4:
	mov	DWORD PTR -1104[rbp], 5
.L5:
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -1100[rbp], eax
	cmp	DWORD PTR -1100[rbp], -1
	jne	.L6
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	lea	rax, -1088[rbp]
	mov	QWORD PTR [rax], 0
	mov	QWORD PTR 8[rax], 0
	mov	WORD PTR -1088[rbp], 2
	mov	eax, DWORD PTR -1108[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -1086[rbp], ax
	mov	rax, QWORD PTR -1136[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L7
	mov	rax, QWORD PTR -1136[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	inet_addr@PLT
	mov	DWORD PTR -1084[rbp], eax
	jmp	.L8
.L7:
	mov	DWORD PTR -1084[rbp], 0
.L8:
	lea	rcx, -1088[rbp]
	mov	eax, DWORD PTR -1100[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	cmp	eax, -1
	jne	.L9
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L9:
	mov	edx, DWORD PTR -1104[rbp]
	mov	eax, DWORD PTR -1100[rbp]
	mov	esi, edx
	mov	edi, eax
	call	listen@PLT
	cmp	eax, -1
	jne	.L10
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L10:
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	DWORD PTR -1112[rbp], 16
	lea	rdx, -1112[rbp]
	lea	rcx, -1072[rbp]
	mov	eax, DWORD PTR -1100[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -1096[rbp], eax
	cmp	DWORD PTR -1096[rbp], -1
	jne	.L11
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L11:
	movzx	eax, WORD PTR -1070[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	ntohs@PLT
	movzx	ebx, ax
	mov	eax, DWORD PTR -1068[rbp]
	mov	edi, eax
	call	inet_ntoa@PLT
	mov	rsi, rax
	mov	eax, DWORD PTR -1096[rbp]
	mov	ecx, eax
	mov	edx, ebx
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	call	fork@PLT
	mov	DWORD PTR -1092[rbp], eax
	cmp	DWORD PTR -1092[rbp], -1
	jne	.L12
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L12:
	cmp	DWORD PTR -1092[rbp], 0
	jne	.L13
.L16:
	lea	rax, -1056[rbp]
	mov	rdx, rax
	mov	eax, 0
	mov	ecx, 128
	mov	rdi, rdx
	rep stosq
	mov	rdx, rdi
	mov	BYTE PTR [rdx], al
	add	rdx, 1
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -1056[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	fgets@PLT
	lea	rax, -1056[rbp]
	mov	edx, 4
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	call	strncasecmp@PLT
	test	eax, eax
	jne	.L14
	lea	rdi, .LC9[rip]
	call	puts@PLT
	jmp	.L17
.L14:
	lea	rax, -1056[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, -1[rax]
	lea	rsi, -1056[rbp]
	mov	eax, DWORD PTR -1096[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -1112[rbp], eax
	jmp	.L16
.L13:
	lea	rax, -1056[rbp]
	mov	rdx, rax
	mov	eax, 0
	mov	ecx, 128
	mov	rdi, rdx
	rep stosq
	mov	rdx, rdi
	mov	BYTE PTR [rdx], al
	add	rdx, 1
	lea	rsi, -1056[rbp]
	mov	eax, DWORD PTR -1096[rbp]
	mov	ecx, 0
	mov	edx, 1024
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -1112[rbp], eax
	mov	eax, DWORD PTR -1112[rbp]
	test	eax, eax
	je	.L18
	mov	edx, DWORD PTR -1112[rbp]
	lea	rax, -1056[rbp]
	mov	rsi, rax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L13
.L18:
	lea	rdi, .LC11[rip]
	call	puts@PLT
.L17:
	mov	eax, DWORD PTR -1096[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -1100[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	mov	rbx, QWORD PTR -8[rbp]
	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	"548844.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"socket\000"
	.align	2
.LC1:
	.ascii	"bind\000"
	.align	2
.LC2:
	.ascii	"listen\000"
	.align	2
.LC3:
	.ascii	"wait for connect\000"
	.align	2
.LC4:
	.ascii	"accept\000"
	.align	2
.LC5:
	.ascii	"server: got connection from %s, port %d, socket %d\012"
	.ascii	"\000"
	.align	2
.LC6:
	.ascii	"fork\000"
	.align	2
.LC7:
	.ascii	"input the message to send:\000"
	.align	2
.LC8:
	.ascii	"quit\000"
	.align	2
.LC9:
	.ascii	"i will close the connect!\000"
	.align	2
.LC10:
	.ascii	"message recv successful :'%s',%dByte recv\012\000"
	.align	2
.LC11:
	.ascii	"the other one close quit\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 = 1096
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #1088
	sub	sp, sp, #12
	str	r0, [fp, #-1104]
	str	r1, [fp, #-1108]
	ldr	r3, .L23
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-1108]
	add	r3, r3, #8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L2
	ldr	r3, [fp, #-1108]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	str	r3, [fp, #-1096]
	b	.L3
.L2:
	ldr	r3, .L23+4
	str	r3, [fp, #-1096]
.L3:
	ldr	r3, [fp, #-1108]
	add	r3, r3, #12
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L4
	ldr	r3, [fp, #-1108]
	add	r3, r3, #12
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	str	r3, [fp, #-1092]
	b	.L5
.L4:
	mov	r3, #5
	str	r3, [fp, #-1092]
.L5:
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-1088]
	ldr	r3, [fp, #-1088]
	cmn	r3, #1
	bne	.L6
	ldr	r0, .L23+8
	bl	perror
	mov	r0, #1
	bl	exit
.L6:
	sub	r3, fp, #1056
	sub	r3, r3, #12
	sub	r3, r3, #8
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2]
	str	r3, [r2, #4]
	str	r3, [r2, #8]
	str	r3, [r2, #12]
	sub	r3, fp, #12
	sub	r3, r3, #1056
	sub	r3, r3, #8
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-1096]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #12
	sub	r3, r3, #1056
	sub	r3, r3, #8
	strh	r2, [r3, #2]	@ movhi
	ldr	r3, [fp, #-1108]
	add	r3, r3, #4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L7
	ldr	r3, [fp, #-1108]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	inet_addr
	mov	r3, r0
	str	r3, [fp, #-1072]
	b	.L8
.L7:
	mov	r3, #0
	str	r3, [fp, #-1072]
.L8:
	sub	r3, fp, #1056
	sub	r3, r3, #12
	sub	r3, r3, #8
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-1088]
	bl	bind
	mov	r3, r0
	cmn	r3, #1
	bne	.L9
	ldr	r0, .L23+12
	bl	perror
	mov	r0, #1
	bl	exit
.L9:
	ldr	r3, [fp, #-1092]
	mov	r1, r3
	ldr	r0, [fp, #-1088]
	bl	listen
	mov	r3, r0
	cmn	r3, #1
	bne	.L10
	ldr	r0, .L23+16
	bl	perror
	mov	r0, #1
	bl	exit
.L10:
	ldr	r0, .L23+20
	bl	puts
	mov	r3, #16
	str	r3, [fp, #-1100]
	sub	r2, fp, #1088
	sub	r2, r2, #12
	sub	r3, fp, #1040
	sub	r3, r3, #12
	sub	r3, r3, #8
	mov	r1, r3
	ldr	r0, [fp, #-1088]
	bl	accept
	str	r0, [fp, #-1084]
	ldr	r3, [fp, #-1084]
	cmn	r3, #1
	bne	.L11
	ldr	r0, .L23+24
	bl	perror
	mov	r0, #1
	bl	exit
.L11:
	ldr	r0, [fp, #-1056]
	bl	inet_ntoa
	mov	r4, r0
	sub	r3, fp, #12
	sub	r3, r3, #1040
	sub	r3, r3, #8
	ldrh	r3, [r3, #2]
	mov	r0, r3
	bl	ntohs
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-1084]
	mov	r1, r4
	ldr	r0, .L23+28
	bl	printf
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-1080]
	ldr	r3, [fp, #-1080]
	cmn	r3, #1
	bne	.L12
	ldr	r0, .L23+32
	bl	perror
	mov	r0, #1
	bl	exit
.L12:
	ldr	r3, [fp, #-1080]
	cmp	r3, #0
	bne	.L13
.L16:
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #8
	mov	r0, r3
	ldr	r3, .L23+36
	mov	r2, r3
	mov	r1, #0
	bl	memset
	ldr	r0, .L23+40
	bl	printf
	ldr	r3, .L23+44
	ldr	r2, [r3]
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #8
	mov	r1, #1024
	mov	r0, r3
	bl	fgets
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #8
	mov	r2, #4
	ldr	r1, .L23+48
	mov	r0, r3
	bl	strncasecmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L14
	ldr	r0, .L23+52
	bl	puts
	b	.L17
.L14:
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #8
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	sub	r2, r3, #1
	sub	r1, fp, #1024
	sub	r1, r1, #12
	sub	r1, r1, #8
	mov	r3, #0
	ldr	r0, [fp, #-1084]
	bl	send
	mov	r3, r0
	str	r3, [fp, #-1100]
	b	.L16
.L13:
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #8
	mov	r0, r3
	ldr	r3, .L23+36
	mov	r2, r3
	mov	r1, #0
	bl	memset
	sub	r1, fp, #1024
	sub	r1, r1, #12
	sub	r1, r1, #8
	mov	r3, #0
	mov	r2, #1024
	ldr	r0, [fp, #-1084]
	bl	recv
	mov	r3, r0
	str	r3, [fp, #-1100]
	ldr	r3, [fp, #-1100]
	cmp	r3, #0
	beq	.L18
	ldr	r2, [fp, #-1100]
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #8
	mov	r1, r3
	ldr	r0, .L23+56
	bl	printf
	b	.L13
.L18:
	ldr	r0, .L23+60
	bl	puts
.L17:
	ldr	r0, [fp, #-1084]
	bl	close
	ldr	r0, [fp, #-1088]
	bl	close
	mov	r3, #0
	ldr	r2, .L23
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L21
	bl	__stack_chk_fail
.L21:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L24:
	.align	2
.L23:
	.word	.LC12
	.word	7575
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	1025
	.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
