	.file	"848752.c"
	.intel_syntax noprefix
	.text
	.globl	port
	.data
	.align 2
	.type	port, @object
	.size	port, 2
port:
	.value	80
	.globl	ip
	.section	.rodata
.LC0:
	.string	"127.0.0.1"
	.section	.data.rel.local,"aw"
	.align 8
	.type	ip, @object
	.size	ip, 8
ip:
	.quad	.LC0
	.section	.rodata
.LC1:
	.string	"%u\n"
	.text
	.type	tick, @function
tick:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR count.1[rip]
	add	eax, 1
	mov	DWORD PTR count.1[rip], eax
	lea	rax, -32[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	gettimeofday@PLT
	mov	rdx, QWORD PTR past.0[rip]
	mov	rax, QWORD PTR -32[rbp]
	cmp	rdx, rax
	je	.L4
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR past.0[rip], rax
	mov	QWORD PTR past.0[rip+8], rdx
	mov	eax, DWORD PTR count.1[rip]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR count.1[rip], 0
.L4:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	tick, .-tick
	.section	.rodata
	.align 8
.LC2:
	.string	"setsocketopt() failed to set reuse address flag: (errno=%i) %s\n"
	.align 8
.LC3:
	.string	"setsocketopt() failed to set linger options: (errno=%i) %s\n"
	.align 8
.LC4:
	.string	"setsocketopt() failed to set TCP no delay flag: (errno=%i) %s\n"
	.text
	.type	set_socket_options, @function
set_socket_options:
.LFB9:
	.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, 56
	.cfi_offset 3, -24
	mov	DWORD PTR -52[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -40[rbp], 1
	lea	rdx, -40[rbp]
	mov	eax, DWORD PTR -52[rbp]
	mov	r8d, 4
	mov	rcx, rdx
	mov	edx, 2
	mov	esi, 1
	mov	edi, eax
	call	setsockopt@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], -1
	jne	.L6
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	rdx, rbx
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	mov	DWORD PTR -32[rbp], 0
	mov	DWORD PTR -28[rbp], 0
	lea	rdx, -32[rbp]
	mov	eax, DWORD PTR -52[rbp]
	mov	r8d, 8
	mov	rcx, rdx
	mov	edx, 13
	mov	esi, 1
	mov	edi, eax
	call	setsockopt@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], -1
	jne	.L7
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	rdx, rbx
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L7:
	lea	rdx, -40[rbp]
	mov	eax, DWORD PTR -52[rbp]
	mov	r8d, 4
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 6
	mov	edi, eax
	call	setsockopt@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], -1
	jne	.L10
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	rdx, rbx
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	exit@PLT
.L10:
	nop
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	set_socket_options, .-set_socket_options
	.section	.rodata
	.align 8
.LC5:
	.string	"./ping-ping-speedtest <'server'|'client'>"
	.align 8
.LC6:
	.string	"socket() failed: (errno=%i) %s\n"
.LC7:
	.string	"Server mode"
.LC8:
	.string	"Pong"
	.align 8
.LC9:
	.string	"bind(): failed (errno=%i) %s, addr=%s:%u\n"
.LC10:
	.string	"Bound"
	.align 8
.LC11:
	.string	"listen() failed: (errno=%i) %s\n"
.LC12:
	.string	"Listening"
	.align 8
.LC13:
	.string	"accept() failed: (errno=%i) %s\n"
.LC14:
	.string	"Accepted"
.LC15:
	.string	"recv() failed!"
	.align 8
.LC16:
	.string	"send(): Error writing to socket: (errno=%i) %s\n"
.LC17:
	.string	"Client mode"
.LC18:
	.string	"Ping"
	.align 8
.LC19:
	.string	"connect(): failed (errno=%i) %s, addr=%s:%u\n"
.LC20:
	.string	"Connected"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r13
	push	r12
	push	rbx
	sub	rsp, 1608
	.cfi_offset 13, -24
	.cfi_offset 12, -32
	.cfi_offset 3, -40
	mov	DWORD PTR -1620[rbp], edi
	mov	QWORD PTR -1632[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -1620[rbp], 2
	je	.L12
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L12:
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -1608[rbp], eax
	cmp	DWORD PTR -1608[rbp], -1
	jne	.L13
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	rdx, rbx
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L13:
	mov	eax, DWORD PTR -1608[rbp]
	mov	edi, eax
	call	set_socket_options
	lea	rax, -1584[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -1584[rbp], 2
	movzx	eax, WORD PTR port[rip]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -1582[rbp], ax
	mov	rax, QWORD PTR ip[rip]
	mov	rdi, rax
	call	inet_addr@PLT
	mov	DWORD PTR -1580[rbp], eax
	mov	rax, QWORD PTR -1632[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 115
	jne	.L14
	lea	rdi, .LC7[rip]
	call	puts@PLT
	lea	rax, .LC8[rip]
	mov	QWORD PTR -1592[rbp], rax
	lea	rcx, -1584[rbp]
	mov	eax, DWORD PTR -1608[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	je	.L15
	movzx	eax, WORD PTR -1582[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	ntohs@PLT
	movzx	r13d, ax
	mov	eax, DWORD PTR -1580[rbp]
	mov	edi, eax
	call	inet_ntoa@PLT
	mov	r12, rax
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	r8d, r13d
	mov	rcx, r12
	mov	rdx, rbx
	mov	esi, eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
	jmp	.L26
.L15:
	lea	rdi, .LC10[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -1608[rbp]
	mov	esi, 1
	mov	edi, eax
	call	listen@PLT
	test	eax, eax
	je	.L17
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	rdx, rbx
	mov	esi, eax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L17:
	lea	rdi, .LC12[rip]
	call	puts@PLT
	mov	DWORD PTR -1612[rbp], 16
	lea	rdx, -1612[rbp]
	lea	rcx, -1568[rbp]
	mov	eax, DWORD PTR -1608[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -1600[rbp], eax
	cmp	DWORD PTR -1600[rbp], -1
	jne	.L18
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	rdx, rbx
	mov	esi, eax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L18:
	lea	rdi, .LC14[rip]
	call	puts@PLT
.L21:
	lea	rsi, -1552[rbp]
	mov	eax, DWORD PTR -1600[rbp]
	mov	ecx, 0
	mov	edx, 1500
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -1596[rbp], eax
	mov	rax, QWORD PTR -1592[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	DWORD PTR -1596[rbp], eax
	je	.L19
	lea	rdi, .LC15[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L19:
	mov	rax, QWORD PTR -1592[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rsi, QWORD PTR -1592[rbp]
	mov	eax, DWORD PTR -1600[rbp]
	mov	ecx, 16384
	mov	edi, eax
	call	send@PLT
	mov	rbx, rax
	mov	rax, QWORD PTR -1592[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cdqe
	cmp	rbx, rax
	je	.L20
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	rdx, rbx
	mov	esi, eax
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
.L20:
	call	tick
	jmp	.L21
.L14:
	lea	rdi, .LC17[rip]
	call	puts@PLT
	lea	rax, .LC18[rip]
	mov	QWORD PTR -1592[rbp], rax
	lea	rcx, -1584[rbp]
	mov	eax, DWORD PTR -1608[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	test	eax, eax
	je	.L22
	movzx	eax, WORD PTR -1582[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	ntohs@PLT
	movzx	r13d, ax
	mov	eax, DWORD PTR -1580[rbp]
	mov	edi, eax
	call	inet_ntoa@PLT
	mov	r12, rax
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	r8d, r13d
	mov	rcx, r12
	mov	rdx, rbx
	mov	esi, eax
	lea	rdi, .LC19[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
	jmp	.L26
.L22:
	lea	rdi, .LC20[rip]
	call	puts@PLT
.L25:
	mov	rax, QWORD PTR -1592[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rsi, QWORD PTR -1592[rbp]
	mov	eax, DWORD PTR -1608[rbp]
	mov	ecx, 16384
	mov	edi, eax
	call	send@PLT
	mov	rbx, rax
	mov	rax, QWORD PTR -1592[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cdqe
	cmp	rbx, rax
	je	.L23
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	rdx, rbx
	mov	esi, eax
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
.L23:
	lea	rsi, -1552[rbp]
	mov	eax, DWORD PTR -1608[rbp]
	mov	ecx, 0
	mov	edx, 1500
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -1604[rbp], eax
	mov	rax, QWORD PTR -1592[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	DWORD PTR -1604[rbp], eax
	je	.L24
	lea	rdi, .LC15[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L24:
	call	tick
	jmp	.L25
.L26:
	mov	rcx, QWORD PTR -40[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	add	rsp, 1608
	pop	rbx
	pop	r12
	pop	r13
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	main, .-main
	.local	count.1
	.comm	count.1,4,4
	.local	past.0
	.comm	past.0,16,16
	.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	"848752.c"
	.text
	.global	port
	.data
	.align	1
	.type	port, %object
	.size	port, 2
port:
	.short	80
	.global	ip
	.section	.rodata
	.align	2
.LC0:
	.ascii	"127.0.0.1\000"
	.data
	.align	2
	.type	ip, %object
	.size	ip, 4
ip:
	.word	.LC0
	.section	.rodata
	.align	2
.LC1:
	.ascii	"%u\012\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	tick, %function
tick:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L5
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L5+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L5+4
	str	r3, [r2]
	sub	r3, fp, #16
	mov	r1, #0
	mov	r0, r3
	bl	gettimeofday
	ldr	r3, .L5+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	beq	.L4
	ldr	r3, .L5+8
	mov	r2, r3
	sub	r3, fp, #16
	ldm	r3, {r0, r1}
	stm	r2, {r0, r1}
	ldr	r3, .L5+4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L5+12
	bl	printf
	ldr	r3, .L5+4
	mov	r2, #0
	str	r2, [r3]
.L4:
	nop
	ldr	r3, .L5
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L3
	bl	__stack_chk_fail
.L3:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC2
	.word	count.6426
	.word	past.6427
	.word	.LC1
	.size	tick, .-tick
	.section	.rodata
	.align	2
.LC3:
	.ascii	"setsocketopt() failed to set reuse address flag: (e"
	.ascii	"rrno=%i) %s\012\000"
	.align	2
.LC4:
	.ascii	"setsocketopt() failed to set linger options: (errno"
	.ascii	"=%i) %s\012\000"
	.align	2
.LC5:
	.ascii	"setsocketopt() failed to set TCP no delay flag: (er"
	.ascii	"rno=%i) %s\012\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	set_socket_options, %function
set_socket_options:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #44
	str	r0, [fp, #-40]
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #1
	str	r3, [fp, #-32]
	sub	r3, fp, #32
	mov	r2, #4
	str	r2, [sp]
	mov	r2, #2
	mov	r1, #1
	ldr	r0, [fp, #-40]
	bl	setsockopt
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmn	r3, #1
	bne	.L8
	bl	__errno_location
	mov	r3, r0
	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, .L13+4
	bl	printf
	mov	r0, #1
	bl	exit
.L8:
	mov	r3, #0
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-20]
	sub	r3, fp, #24
	mov	r2, #8
	str	r2, [sp]
	mov	r2, #13
	mov	r1, #1
	ldr	r0, [fp, #-40]
	bl	setsockopt
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmn	r3, #1
	bne	.L9
	bl	__errno_location
	mov	r3, r0
	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, .L13+8
	bl	printf
	mov	r0, #1
	bl	exit
.L9:
	sub	r3, fp, #32
	mov	r2, #4
	str	r2, [sp]
	mov	r2, #1
	mov	r1, #6
	ldr	r0, [fp, #-40]
	bl	setsockopt
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmn	r3, #1
	bne	.L12
	bl	__errno_location
	mov	r3, r0
	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, .L13+12
	bl	printf
	mov	r0, #0
	bl	exit
.L12:
	nop
	ldr	r3, .L13
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC6
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	set_socket_options, .-set_socket_options
	.section	.rodata
	.align	2
.LC7:
	.ascii	"./ping-ping-speedtest <'server'|'client'>\000"
	.align	2
.LC8:
	.ascii	"socket() failed: (errno=%i) %s\012\000"
	.align	2
.LC9:
	.ascii	"Server mode\000"
	.align	2
.LC10:
	.ascii	"Pong\000"
	.align	2
.LC11:
	.ascii	"bind(): failed (errno=%i) %s, addr=%s:%u\012\000"
	.align	2
.LC12:
	.ascii	"Bound\000"
	.align	2
.LC13:
	.ascii	"listen() failed: (errno=%i) %s\012\000"
	.align	2
.LC14:
	.ascii	"Listening\000"
	.align	2
.LC15:
	.ascii	"accept() failed: (errno=%i) %s\012\000"
	.align	2
.LC16:
	.ascii	"Accepted\000"
	.align	2
.LC17:
	.ascii	"recv() failed!\000"
	.align	2
.LC18:
	.ascii	"send(): Error writing to socket: (errno=%i) %s\012\000"
	.align	2
.LC19:
	.ascii	"Client mode\000"
	.align	2
.LC20:
	.ascii	"Ping\000"
	.align	2
.LC21:
	.ascii	"connect(): failed (errno=%i) %s, addr=%s:%u\012\000"
	.align	2
.LC22:
	.ascii	"Connected\000"
	.align	2
.LC23:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1568
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, fp, lr}
	add	fp, sp, #16
	sub	sp, sp, #1568
	sub	sp, sp, #12
	str	r0, [fp, #-1584]
	str	r1, [fp, #-1588]
	ldr	r3, .L32
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	ldr	r3, [fp, #-1584]
	cmp	r3, #2
	beq	.L16
	ldr	r0, .L32+4
	bl	puts
	mov	r0, #1
	bl	exit
.L16:
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-1576]
	ldr	r3, [fp, #-1576]
	cmn	r3, #1
	bne	.L17
	bl	__errno_location
	mov	r3, r0
	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, .L32+8
	bl	printf
	mov	r0, #1
	bl	exit
.L17:
	ldr	r0, [fp, #-1576]
	bl	set_socket_options
	sub	r3, fp, #1552
	sub	r3, r3, #4
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #20
	sub	r3, r3, #1536
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r3, .L32+12
	ldrh	r3, [r3]
	mov	r0, r3
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #20
	sub	r3, r3, #1536
	strh	r2, [r3, #2]	@ movhi
	ldr	r3, .L32+16
	ldr	r3, [r3]
	mov	r0, r3
	bl	inet_addr
	mov	r3, r0
	str	r3, [fp, #-1552]
	ldr	r3, [fp, #-1588]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #115
	bne	.L18
	ldr	r0, .L32+20
	bl	puts
	ldr	r3, .L32+24
	str	r3, [fp, #-1572]
	sub	r3, fp, #1552
	sub	r3, r3, #4
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-1576]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	beq	.L19
	bl	__errno_location
	mov	r3, r0
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r5, r0
	ldr	r0, [fp, #-1552]
	bl	inet_ntoa
	mov	r6, r0
	sub	r3, fp, #20
	sub	r3, r3, #1536
	ldrh	r3, [r3, #2]
	mov	r0, r3
	bl	ntohs
	mov	r3, r0
	str	r3, [sp]
	mov	r3, r6
	mov	r2, r5
	mov	r1, r4
	ldr	r0, .L32+28
	bl	printf
	mov	r3, #1
	b	.L30
.L19:
	ldr	r0, .L32+32
	bl	puts
	mov	r1, #1
	ldr	r0, [fp, #-1576]
	bl	listen
	mov	r3, r0
	cmp	r3, #0
	beq	.L21
	bl	__errno_location
	mov	r3, r0
	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, .L32+36
	bl	printf
	mov	r0, #1
	bl	exit
.L21:
	ldr	r0, .L32+40
	bl	puts
	mov	r3, #16
	str	r3, [fp, #-1580]
	sub	r3, fp, #1568
	sub	r3, r3, #4
	sub	r3, r3, #8
	sub	r1, fp, #1536
	sub	r1, r1, #4
	mov	r2, r3
	ldr	r0, [fp, #-1576]
	bl	accept
	str	r0, [fp, #-1564]
	ldr	r3, [fp, #-1564]
	cmn	r3, #1
	bne	.L22
	bl	__errno_location
	mov	r3, r0
	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, .L32+44
	bl	printf
	mov	r0, #1
	bl	exit
.L22:
	ldr	r0, .L32+48
	bl	puts
.L25:
	sub	r1, fp, #1520
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r2, .L32+52
	ldr	r0, [fp, #-1564]
	bl	recv
	str	r0, [fp, #-1560]
	ldr	r0, [fp, #-1572]
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-1560]
	cmp	r3, r2
	beq	.L23
	ldr	r0, .L32+56
	bl	puts
	mov	r0, #1
	bl	exit
.L23:
	ldr	r0, [fp, #-1572]
	bl	strlen
	mov	r2, r0
	mov	r3, #16384
	ldr	r1, [fp, #-1572]
	ldr	r0, [fp, #-1564]
	bl	send
	mov	r4, r0
	ldr	r0, [fp, #-1572]
	bl	strlen
	mov	r3, r0
	cmp	r4, r3
	beq	.L24
	bl	__errno_location
	mov	r3, r0
	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, .L32+60
	bl	printf
.L24:
	bl	tick
	b	.L25
.L18:
	ldr	r0, .L32+64
	bl	puts
	ldr	r3, .L32+68
	str	r3, [fp, #-1572]
	sub	r3, fp, #1552
	sub	r3, r3, #4
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-1576]
	bl	connect
	mov	r3, r0
	cmp	r3, #0
	beq	.L26
	bl	__errno_location
	mov	r3, r0
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r5, r0
	ldr	r0, [fp, #-1552]
	bl	inet_ntoa
	mov	r6, r0
	sub	r3, fp, #20
	sub	r3, r3, #1536
	ldrh	r3, [r3, #2]
	mov	r0, r3
	bl	ntohs
	mov	r3, r0
	str	r3, [sp]
	mov	r3, r6
	mov	r2, r5
	mov	r1, r4
	ldr	r0, .L32+72
	bl	printf
	mov	r3, #1
	b	.L30
.L26:
	ldr	r0, .L32+76
	bl	puts
.L29:
	ldr	r0, [fp, #-1572]
	bl	strlen
	mov	r2, r0
	mov	r3, #16384
	ldr	r1, [fp, #-1572]
	ldr	r0, [fp, #-1576]
	bl	send
	mov	r4, r0
	ldr	r0, [fp, #-1572]
	bl	strlen
	mov	r3, r0
	cmp	r4, r3
	beq	.L27
	bl	__errno_location
	mov	r3, r0
	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, .L32+60
	bl	printf
.L27:
	sub	r1, fp, #1520
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r2, .L32+52
	ldr	r0, [fp, #-1576]
	bl	recv
	str	r0, [fp, #-1568]
	ldr	r0, [fp, #-1572]
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-1568]
	cmp	r3, r2
	beq	.L28
	ldr	r0, .L32+56
	bl	puts
	mov	r0, #1
	bl	exit
.L28:
	bl	tick
	b	.L29
.L30:
	ldr	r2, .L32
	ldr	r1, [r2]
	ldr	r2, [fp, #-24]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L31
	bl	__stack_chk_fail
.L31:
	mov	r0, r3
	sub	sp, fp, #16
	@ sp needed
	pop	{r4, r5, r6, fp, pc}
.L33:
	.align	2
.L32:
	.word	.LC23
	.word	.LC7
	.word	.LC8
	.word	port
	.word	ip
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	1500
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.size	main, .-main
	.local	count.6426
	.comm	count.6426,4,4
	.local	past.6427
	.comm	past.6427,8,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
