	.file	"1060557.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Socket error"
.LC1:
	.string	"setsockopt"
.LC2:
	.string	"Bind error"
.LC3:
	.string	"Listen error"
.LC4:
	.string	"Accept error"
.LC5:
	.string	"Send error"
.LC6:
	.string	"Recv error"
	.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, 608
	mov	DWORD PTR -596[rbp], edi
	mov	QWORD PTR -608[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	movabs	rax, 2334385650107901261
	mov	QWORD PTR -542[rbp], rax
	mov	DWORD PTR -534[rbp], 1953391955
	mov	WORD PTR -530[rbp], 10
	mov	DWORD PTR -588[rbp], 1
	mov	WORD PTR -576[rbp], 2
	mov	edi, 9000
	call	htons@PLT
	mov	WORD PTR -574[rbp], ax
	mov	DWORD PTR -572[rbp], 0
	lea	rax, -576[rbp]
	add	rax, 8
	mov	QWORD PTR [rax], 0
	mov	DWORD PTR -592[rbp], 16
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -584[rbp], eax
	cmp	DWORD PTR -584[rbp], -1
	jne	.L2
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L2:
	mov	edx, 0
	mov	esi, 1
	mov	edi, -1
	call	socket@PLT
	lea	rdx, -588[rbp]
	mov	eax, DWORD PTR -584[rbp]
	mov	r8d, 4
	mov	rcx, rdx
	mov	edx, 2
	mov	esi, 1
	mov	edi, eax
	call	setsockopt@PLT
	cmp	eax, -1
	jne	.L3
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L3:
	lea	rax, -588[rbp]
	mov	r8d, 4
	mov	rcx, rax
	mov	edx, 2
	mov	esi, 1
	mov	edi, -1
	call	setsockopt@PLT
	mov	edx, DWORD PTR -592[rbp]
	lea	rcx, -576[rbp]
	mov	eax, DWORD PTR -584[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	cmp	eax, -1
	jne	.L4
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L4:
	mov	edx, DWORD PTR -592[rbp]
	lea	rax, -576[rbp]
	mov	rsi, rax
	mov	edi, -1
	call	bind@PLT
	mov	eax, DWORD PTR -584[rbp]
	mov	esi, 1
	mov	edi, eax
	call	listen@PLT
	cmp	eax, -1
	jne	.L5
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L5:
	mov	esi, 1
	mov	edi, -1
	call	listen@PLT
	lea	rdx, -592[rbp]
	lea	rcx, -560[rbp]
	mov	eax, DWORD PTR -584[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -580[rbp], eax
	cmp	DWORD PTR -580[rbp], -1
	jne	.L6
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L6:
	lea	rdx, -592[rbp]
	lea	rax, -560[rbp]
	mov	rsi, rax
	mov	edi, -1
	call	accept@PLT
	mov	edx, DWORD PTR -592[rbp]
	lea	rax, -576[rbp]
	mov	rsi, rax
	mov	edi, -1
	call	connect@PLT
	lea	rax, -542[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -542[rbp]
	mov	eax, DWORD PTR -580[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	cmp	rax, -1
	jne	.L7
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L7:
	lea	rax, -542[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rax, -542[rbp]
	mov	ecx, 0
	mov	rsi, rax
	mov	edi, -1
	call	send@PLT
	lea	rax, -528[rbp]
	mov	ecx, 0
	mov	edx, 512
	mov	rsi, rax
	mov	edi, -1
	call	recv@PLT
	lea	rsi, -528[rbp]
	mov	eax, DWORD PTR -580[rbp]
	mov	ecx, 0
	mov	edx, 512
	mov	edi, eax
	call	recv@PLT
	cmp	rax, -1
	jne	.L8
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L8:
	mov	eax, DWORD PTR -580[rbp]
	mov	edi, eax
	call	close@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	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	"1060557.c"
	.text
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Socket error\000"
	.align	2
.LC2:
	.ascii	"setsockopt\000"
	.align	2
.LC3:
	.ascii	"Bind error\000"
	.align	2
.LC4:
	.ascii	"Listen error\000"
	.align	2
.LC5:
	.ascii	"Accept error\000"
	.align	2
.LC6:
	.ascii	"Send error\000"
	.align	2
.LC7:
	.ascii	"Recv error\000"
	.align	2
.LC0:
	.ascii	"Message Sent\012\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 592
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #600
	str	r0, [fp, #-592]
	str	r1, [fp, #-596]
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L10+4
	sub	ip, fp, #536
	ldm	r3, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2}
	strh	r3, [ip]	@ movhi
	mov	r3, #1
	str	r3, [fp, #-580]
	sub	r3, fp, #4
	sub	r3, r3, #564
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r0, .L10+8
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #4
	sub	r3, r3, #564
	strh	r2, [r3, #2]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-564]
	sub	r3, fp, #568
	add	r3, r3, #8
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2]
	str	r3, [r2, #4]
	mov	r3, #16
	str	r3, [fp, #-584]
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-576]
	ldr	r3, [fp, #-576]
	cmn	r3, #1
	bne	.L2
	ldr	r0, .L10+12
	bl	perror
	mvn	r0, #0
	bl	exit
.L2:
	mov	r2, #0
	mov	r1, #1
	mvn	r0, #0
	bl	socket
	sub	r3, fp, #580
	mov	r2, #4
	str	r2, [sp]
	mov	r2, #2
	mov	r1, #1
	ldr	r0, [fp, #-576]
	bl	setsockopt
	mov	r3, r0
	cmn	r3, #1
	bne	.L3
	ldr	r0, .L10+16
	bl	perror
	mvn	r0, #0
	bl	exit
.L3:
	sub	r3, fp, #580
	mov	r2, #4
	str	r2, [sp]
	mov	r2, #2
	mov	r1, #1
	mvn	r0, #0
	bl	setsockopt
	ldr	r2, [fp, #-584]
	sub	r3, fp, #568
	mov	r1, r3
	ldr	r0, [fp, #-576]
	bl	bind
	mov	r3, r0
	cmn	r3, #1
	bne	.L4
	ldr	r0, .L10+20
	bl	perror
	mvn	r0, #0
	bl	exit
.L4:
	ldr	r2, [fp, #-584]
	sub	r3, fp, #568
	mov	r1, r3
	mvn	r0, #0
	bl	bind
	mov	r1, #1
	ldr	r0, [fp, #-576]
	bl	listen
	mov	r3, r0
	cmn	r3, #1
	bne	.L5
	ldr	r0, .L10+24
	bl	perror
	mvn	r0, #0
	bl	exit
.L5:
	mov	r1, #1
	mvn	r0, #0
	bl	listen
	sub	r2, fp, #584
	sub	r3, fp, #552
	mov	r1, r3
	ldr	r0, [fp, #-576]
	bl	accept
	str	r0, [fp, #-572]
	ldr	r3, [fp, #-572]
	cmn	r3, #1
	bne	.L6
	ldr	r0, .L10+28
	bl	perror
	mvn	r0, #0
	bl	exit
.L6:
	sub	r2, fp, #584
	sub	r3, fp, #552
	mov	r1, r3
	mvn	r0, #0
	bl	accept
	ldr	r2, [fp, #-584]
	sub	r3, fp, #568
	mov	r1, r3
	mvn	r0, #0
	bl	connect
	sub	r3, fp, #536
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #536
	mov	r3, #0
	ldr	r0, [fp, #-572]
	bl	send
	mov	r3, r0
	cmn	r3, #1
	bne	.L7
	ldr	r0, .L10+32
	bl	perror
	mvn	r0, #0
	bl	exit
.L7:
	sub	r3, fp, #536
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #536
	mov	r3, #0
	mvn	r0, #0
	bl	send
	sub	r1, fp, #520
	mov	r3, #0
	mov	r2, #512
	mvn	r0, #0
	bl	recv
	sub	r1, fp, #520
	mov	r3, #0
	mov	r2, #512
	ldr	r0, [fp, #-572]
	bl	recv
	mov	r3, r0
	cmn	r3, #1
	bne	.L8
	ldr	r0, .L10+36
	bl	perror
	mvn	r0, #0
	bl	exit
.L8:
	ldr	r0, [fp, #-572]
	bl	close
	nop
	ldr	r3, .L10
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L9
	bl	__stack_chk_fail
.L9:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC8
	.word	.LC0
	.word	9000
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
