	.file	"71177.c"
	.intel_syntax noprefix
	.text
	.globl	pid
	.bss
	.align 4
	.type	pid, @object
	.size	pid, 4
pid:
	.zero	4
	.section	.rodata
.LC0:
	.string	"[%d] running %s\n"
.LC1:
	.string	"[%d] error: %s\n"
.LC2:
	.string	"192.168.10.3"
.LC3:
	.string	"[%d] connected\n"
	.align 8
.LC4:
	.string	"[%d] Input message(Q for quit): "
.LC5:
	.string	"q\n"
.LC6:
	.string	"Q\n"
.LC7:
	.string	"[%d] Received: %s"
.LC8:
	.string	"[%d] terminated\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
	push	rbx
	sub	rsp, 328
	.cfi_offset 3, -24
	mov	DWORD PTR -324[rbp], edi
	mov	QWORD PTR -336[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -336[rbp]
	mov	rbx, QWORD PTR [rax]
	call	getpid@PLT
	mov	DWORD PTR pid[rip], eax
	mov	eax, DWORD PTR pid[rip]
	mov	rdx, rbx
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -316[rbp], eax
	cmp	DWORD PTR -316[rbp], -1
	jne	.L2
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	eax, DWORD PTR pid[rip]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
	jmp	.L9
.L2:
	mov	WORD PTR -304[rbp], 2
	lea	rdi, .LC2[rip]
	call	inet_addr@PLT
	mov	DWORD PTR -300[rbp], eax
	mov	edi, 25000
	call	htons@PLT
	mov	WORD PTR -302[rbp], ax
	mov	DWORD PTR -312[rbp], 16
	mov	edx, DWORD PTR -312[rbp]
	lea	rcx, -304[rbp]
	mov	eax, DWORD PTR -316[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	mov	DWORD PTR -308[rbp], eax
	cmp	DWORD PTR -308[rbp], -1
	jne	.L4
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	eax, DWORD PTR pid[rip]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
	jmp	.L9
.L4:
	mov	eax, DWORD PTR pid[rip]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
.L8:
	mov	eax, DWORD PTR pid[rip]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -288[rbp]
	mov	esi, 256
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	je	.L5
	lea	rax, -288[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L6
	lea	rax, -288[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L6
	lea	rax, -288[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rcx, -288[rbp]
	mov	eax, DWORD PTR -316[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
.L5:
	lea	rcx, -288[rbp]
	mov	eax, DWORD PTR -316[rbp]
	mov	edx, 256
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -312[rbp], eax
	cmp	DWORD PTR -312[rbp], 0
	jle	.L8
	mov	eax, DWORD PTR -312[rbp]
	cdqe
	mov	BYTE PTR -288[rbp+rax], 0
	mov	eax, DWORD PTR pid[rip]
	lea	rdx, -288[rbp]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L8
.L6:
	mov	eax, DWORD PTR -316[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR pid[rip]
	mov	esi, eax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
.L9:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	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	"71177.c"
	.text
	.comm	pid,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"[%d] running %s\012\000"
	.align	2
.LC1:
	.ascii	"[%d] error: %s\012\000"
	.align	2
.LC2:
	.ascii	"192.168.10.3\000"
	.align	2
.LC3:
	.ascii	"[%d] connected\012\000"
	.align	2
.LC4:
	.ascii	"[%d] Input message(Q for quit): \000"
	.align	2
.LC5:
	.ascii	"q\012\000"
	.align	2
.LC6:
	.ascii	"Q\012\000"
	.align	2
.LC7:
	.ascii	"[%d] Received: %s\000"
	.align	2
.LC8:
	.ascii	"[%d] terminated\012\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 296
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #300
	str	r0, [fp, #-304]
	str	r1, [fp, #-308]
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	bl	getpid
	mov	r3, r0
	ldr	r2, .L11+4
	str	r3, [r2]
	ldr	r3, .L11+4
	ldr	r1, [r3]
	ldr	r3, [fp, #-308]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r0, .L11+8
	bl	printf
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-300]
	ldr	r3, [fp, #-300]
	cmn	r3, #1
	bne	.L2
	ldr	r3, .L11+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L11+12
	bl	printf
	mov	r3, #1
	b	.L9
.L2:
	sub	r3, fp, #12
	sub	r3, r3, #276
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r0, .L11+16
	bl	inet_addr
	mov	r3, r0
	str	r3, [fp, #-284]
	ldr	r0, .L11+20
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #12
	sub	r3, r3, #276
	strh	r2, [r3, #2]	@ movhi
	mov	r3, #16
	str	r3, [fp, #-296]
	ldr	r2, [fp, #-296]
	sub	r3, fp, #288
	mov	r1, r3
	ldr	r0, [fp, #-300]
	bl	connect
	str	r0, [fp, #-292]
	ldr	r3, [fp, #-292]
	cmn	r3, #1
	bne	.L4
	ldr	r3, .L11+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L11+12
	bl	printf
	mov	r3, #1
	b	.L9
.L4:
	ldr	r3, .L11+4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L11+24
	bl	printf
.L8:
	ldr	r3, .L11+4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L11+28
	bl	printf
	ldr	r3, .L11+32
	ldr	r2, [r3]
	sub	r3, fp, #272
	mov	r1, #256
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	beq	.L5
	sub	r3, fp, #272
	ldr	r1, .L11+36
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L6
	sub	r3, fp, #272
	ldr	r1, .L11+40
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L6
	sub	r3, fp, #272
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #272
	mov	r1, r3
	ldr	r0, [fp, #-300]
	bl	write
.L5:
	sub	r3, fp, #272
	mov	r2, #256
	mov	r1, r3
	ldr	r0, [fp, #-300]
	bl	read
	str	r0, [fp, #-296]
	ldr	r3, [fp, #-296]
	cmp	r3, #0
	ble	.L8
	sub	r2, fp, #272
	ldr	r3, [fp, #-296]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, .L11+4
	ldr	r3, [r3]
	sub	r2, fp, #272
	mov	r1, r3
	ldr	r0, .L11+44
	bl	printf
	b	.L8
.L6:
	ldr	r0, [fp, #-300]
	bl	close
	ldr	r3, .L11+4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L11+48
	bl	printf
	mov	r3, #0
.L9:
	ldr	r2, .L11
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC9
	.word	pid
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	25000
	.word	.LC3
	.word	.LC4
	.word	stdin
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
