	.file	"836109.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%u.%u.%u.%u%n"
	.align 8
.LC1:
	.string	"net_control: invalid address '%s'\n"
	.text
	.type	parse_ipv4_addr, @function
parse_ipv4_addr:
.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, 64
	mov	QWORD PTR -56[rbp], rdi
	mov	QWORD PTR -64[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -44[rbp], 0
	lea	rax, -32[rbp]
	lea	r8, 12[rax]
	lea	rax, -32[rbp]
	lea	rdi, 8[rax]
	lea	rax, -32[rbp]
	lea	rcx, 4[rax]
	lea	rdx, -32[rbp]
	mov	rax, QWORD PTR -56[rbp]
	sub	rsp, 8
	lea	rsi, -44[rbp]
	push	rsi
	mov	r9, r8
	mov	r8, rdi
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	add	rsp, 16
	mov	DWORD PTR -40[rbp], eax
	cmp	DWORD PTR -40[rbp], 4
	jne	.L2
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, 255
	ja	.L2
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, 255
	ja	.L2
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, 255
	ja	.L2
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, 255
	ja	.L2
	mov	eax, DWORD PTR -44[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L3
.L2:
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -56[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 0
	jmp	.L5
.L3:
	mov	eax, DWORD PTR -32[rbp]
	mov	BYTE PTR -36[rbp], al
	mov	eax, DWORD PTR -28[rbp]
	mov	BYTE PTR -35[rbp], al
	mov	eax, DWORD PTR -24[rbp]
	mov	BYTE PTR -34[rbp], al
	mov	eax, DWORD PTR -20[rbp]
	mov	BYTE PTR -33[rbp], al
	mov	edx, DWORD PTR -36[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	DWORD PTR [rax], edx
	mov	eax, 1
.L5:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	parse_ipv4_addr, .-parse_ipv4_addr
	.section	.rodata
.LC2:
	.string	"Usage: %s <server IP>\n"
.LC3:
	.string	"socket"
.LC4:
	.string	"Invalid IP address"
.LC5:
	.string	"PING %zu"
.LC6:
	.string	"sendto"
.LC7:
	.string	"Client sent %ld of %ld bytes\n"
.LC8:
	.string	"recvfrom"
	.align 8
.LC9:
	.string	"Client received %ld byte message '%s'\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 208
	mov	DWORD PTR -196[rbp], edi
	mov	QWORD PTR -208[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -196[rbp], 2
	je	.L8
	mov	rax, QWORD PTR -208[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
	jmp	.L17
.L8:
	mov	edx, 0
	mov	esi, 2
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -188[rbp], eax
	cmp	DWORD PTR -188[rbp], 0
	jns	.L10
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L17
.L10:
	mov	QWORD PTR -160[rbp], 0
	mov	QWORD PTR -152[rbp], 0
	mov	WORD PTR -160[rbp], 2
	mov	edi, 12345
	call	htons@PLT
	mov	WORD PTR -158[rbp], ax
	mov	rax, QWORD PTR -208[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rdx, -160[rbp]
	add	rdx, 4
	mov	rsi, rdx
	mov	rdi, rax
	call	parse_ipv4_addr
	xor	eax, 1
	test	al, al
	je	.L11
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L17
.L11:
	mov	QWORD PTR -184[rbp], 0
	jmp	.L12
.L16:
	mov	rdx, QWORD PTR -184[rbp]
	lea	rax, -144[rbp]
	mov	rcx, rdx
	lea	rdx, .LC5[rip]
	mov	esi, 128
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	cdqe
	mov	QWORD PTR -176[rbp], rax
	lea	rdx, -144[rbp]
	mov	rax, QWORD PTR -176[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	rdx, QWORD PTR -176[rbp]
	lea	rcx, -160[rbp]
	lea	rsi, -144[rbp]
	mov	eax, DWORD PTR -188[rbp]
	mov	r9d, 16
	mov	r8, rcx
	mov	ecx, 0
	mov	edi, eax
	call	sendto@PLT
	mov	QWORD PTR -168[rbp], rax
	cmp	QWORD PTR -168[rbp], 0
	jns	.L13
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L17
.L13:
	mov	rdx, QWORD PTR -176[rbp]
	mov	rax, QWORD PTR -168[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rsi, -144[rbp]
	mov	eax, DWORD PTR -188[rbp]
	mov	r9d, 0
	mov	r8d, 0
	mov	ecx, 0
	mov	edx, 128
	mov	edi, eax
	call	recvfrom@PLT
	mov	QWORD PTR -176[rbp], rax
	cmp	QWORD PTR -176[rbp], 0
	jns	.L15
	lea	rdi, .LC8[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L17
.L15:
	lea	rdx, -144[rbp]
	mov	rax, QWORD PTR -176[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	lea	rdx, -144[rbp]
	mov	rax, QWORD PTR -176[rbp]
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	sleep@PLT
	add	QWORD PTR -184[rbp], 1
.L12:
	cmp	QWORD PTR -184[rbp], 9
	jbe	.L16
	mov	eax, 0
.L17:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"836109.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%u.%u.%u.%u%n\000"
	.align	2
.LC1:
	.ascii	"net_control: invalid address '%s'\012\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	parse_ipv4_addr, %function
parse_ipv4_addr:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L7
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-36]
	sub	r3, fp, #24
	add	r1, r3, #4
	sub	r2, fp, #24
	sub	r3, fp, #36
	str	r3, [sp, #8]
	sub	r3, fp, #24
	add	r3, r3, #12
	str	r3, [sp, #4]
	sub	r3, fp, #24
	add	r3, r3, #8
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, .L7+4
	ldr	r0, [fp, #-40]
	bl	__isoc99_sscanf
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #4
	bne	.L2
	ldr	r3, [fp, #-24]
	cmp	r3, #255
	bhi	.L2
	ldr	r3, [fp, #-20]
	cmp	r3, #255
	bhi	.L2
	ldr	r3, [fp, #-16]
	cmp	r3, #255
	bhi	.L2
	ldr	r3, [fp, #-12]
	cmp	r3, #255
	bhi	.L2
	ldr	r3, [fp, #-36]
	mov	r2, r3
	ldr	r3, [fp, #-40]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L3
.L2:
	ldr	r3, .L7+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-40]
	ldr	r1, .L7+12
	mov	r0, r3
	bl	fprintf
	mov	r3, #0
	b	.L5
.L3:
	ldr	r3, [fp, #-24]
	and	r3, r3, #255
	strb	r3, [fp, #-28]
	ldr	r3, [fp, #-20]
	and	r3, r3, #255
	strb	r3, [fp, #-27]
	ldr	r3, [fp, #-16]
	and	r3, r3, #255
	strb	r3, [fp, #-26]
	ldr	r3, [fp, #-12]
	and	r3, r3, #255
	strb	r3, [fp, #-25]
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-44]
	str	r2, [r3]
	mov	r3, #1
.L5:
	ldr	r2, .L7
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L6
	bl	__stack_chk_fail
.L6:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC2
	.word	.LC0
	.word	stderr
	.word	.LC1
	.size	parse_ipv4_addr, .-parse_ipv4_addr
	.section	.rodata
	.align	2
.LC3:
	.ascii	"Usage: %s <server IP>\012\000"
	.align	2
.LC4:
	.ascii	"socket\000"
	.align	2
.LC5:
	.ascii	"Invalid IP address\000"
	.align	2
.LC6:
	.ascii	"PING %zu\000"
	.align	2
.LC7:
	.ascii	"sendto\000"
	.align	2
.LC8:
	.ascii	"Client sent %ld of %ld bytes\012\000"
	.align	2
.LC9:
	.ascii	"recvfrom\000"
	.align	2
.LC10:
	.ascii	"Client received %ld byte message '%s'\012\000"
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 176
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #184
	str	r0, [fp, #-176]
	str	r1, [fp, #-180]
	ldr	r3, .L21
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-176]
	cmp	r3, #2
	beq	.L10
	ldr	r3, [fp, #-180]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L21+4
	bl	printf
	mov	r3, #1
	b	.L19
.L10:
	mov	r2, #0
	mov	r1, #2
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-168]
	ldr	r3, [fp, #-168]
	cmp	r3, #0
	bge	.L12
	ldr	r0, .L21+8
	bl	perror
	mov	r3, #1
	b	.L19
.L12:
	sub	r3, fp, #156
	mov	r2, #0
	str	r2, [r3]
	str	r2, [r3, #4]
	str	r2, [r3, #8]
	str	r2, [r3, #12]
	mov	r3, #2
	strh	r3, [fp, #-156]	@ movhi
	ldr	r0, .L21+12
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-154]	@ movhi
	ldr	r3, [fp, #-180]
	add	r3, r3, #4
	ldr	r2, [r3]
	sub	r3, fp, #156
	add	r3, r3, #4
	mov	r1, r3
	mov	r0, r2
	bl	parse_ipv4_addr
	mov	r3, r0
	eor	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L13
	ldr	r0, .L21+16
	bl	puts
	mov	r3, #1
	b	.L19
.L13:
	mov	r3, #0
	str	r3, [fp, #-172]
	b	.L14
.L18:
	sub	r0, fp, #140
	ldr	r3, [fp, #-172]
	ldr	r2, .L21+20
	mov	r1, #128
	bl	snprintf
	str	r0, [fp, #-164]
	sub	r2, fp, #140
	ldr	r3, [fp, #-164]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r2, [fp, #-164]
	sub	r1, fp, #140
	mov	r3, #16
	str	r3, [sp, #4]
	sub	r3, fp, #156
	str	r3, [sp]
	mov	r3, #0
	ldr	r0, [fp, #-168]
	bl	sendto
	str	r0, [fp, #-160]
	ldr	r3, [fp, #-160]
	cmp	r3, #0
	bge	.L15
	ldr	r0, .L21+24
	bl	perror
	mov	r3, #1
	b	.L19
.L15:
	ldr	r2, [fp, #-164]
	ldr	r1, [fp, #-160]
	ldr	r0, .L21+28
	bl	printf
	sub	r1, fp, #140
	mov	r3, #0
	str	r3, [sp, #4]
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #128
	ldr	r0, [fp, #-168]
	bl	recvfrom
	str	r0, [fp, #-164]
	ldr	r3, [fp, #-164]
	cmp	r3, #0
	bge	.L17
	ldr	r0, .L21+32
	bl	perror
	mov	r3, #1
	b	.L19
.L17:
	sub	r2, fp, #140
	ldr	r3, [fp, #-164]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #140
	mov	r2, r3
	ldr	r1, [fp, #-164]
	ldr	r0, .L21+36
	bl	printf
	mov	r0, #1
	bl	sleep
	ldr	r3, [fp, #-172]
	add	r3, r3, #1
	str	r3, [fp, #-172]
.L14:
	ldr	r3, [fp, #-172]
	cmp	r3, #9
	bls	.L18
	mov	r3, #0
.L19:
	ldr	r2, .L21
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L20
	bl	__stack_chk_fail
.L20:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC11
	.word	.LC3
	.word	.LC4
	.word	12345
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
