	.file	"extr_Layer3.c_L3RecvIp.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	L3RecvIp
	.type	L3RecvIp, @function
L3RecvIp:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	DWORD PTR 20[rsp], 0
	test	rdi, rdi
	je	.L1
	mov	rbp, rsi
	test	rsi, rsi
	je	.L1
	mov	r12, QWORD PTR 24[rsi]
	mov	r13, rdi
	mov	ebx, edx
	mov	rdi, r12
	call	IPV4_GET_HEADER_LEN@PLT
	mov	rdi, r12
	mov	r14d, eax
	call	IpCheckChecksum@PLT
	test	eax, eax
	je	.L7
	mov	edx, DWORD PTR 48[rbp]
	mov	rsi, QWORD PTR [r12]
	mov	rdi, r13
	call	L3KnownArp@PLT
	cmp	QWORD PTR 40[rbp], 0
	jne	.L7
	mov	eax, DWORD PTR 8[r12]
	mov	rsi, QWORD PTR 16[r12]
	sal	r14d, 2
	test	eax, eax
	jle	.L4
	sub	eax, 1
	je	.L4
.L5:
	mov	rdx, QWORD PTR 24[rbp]
	mov	edi, DWORD PTR 8[r13]
	mov	DWORD PTR 8[rdx], eax
	lea	rdx, 20[rsp]
	mov	QWORD PTR [rsp], rdx
	call	L3GetNextIf@PLT
	mov	rdx, QWORD PTR [rsp]
	test	rax, rax
	mov	r15, rax
	jne	.L28
	test	ebx, ebx
	je	.L34
	test	rax, rax
	jne	.L28
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rdi, QWORD PTR 16[rbp]
	call	Free@PLT
	mov	rdi, rbp
	call	FreePacket@PLT
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L35
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	xor	eax, eax
	cmp	QWORD PTR 0[r13], rsi
	je	.L5
	mov	edi, DWORD PTR 0[rbp]
	lea	r9d, 144[r14]
	lea	esi, 8[r14]
	mov	DWORD PTR [rsp], r9d
	sub	edi, r14d
	call	MIN@PLT
	mov	r9d, DWORD PTR [rsp]
	mov	ebx, eax
	mov	edi, r9d
	mov	DWORD PTR 12[rsp], r9d
	call	ZeroMalloc@PLT
	mov	esi, 4
	lea	r8, 16[rax]
	mov	r15, rax
	mov	rdi, r8
	mov	QWORD PTR [rsp], r8
	call	IPV4_SET_VERSION@PLT
	mov	r8, QWORD PTR [rsp]
	mov	esi, 16
	mov	rdi, r8
	call	IPV4_SET_HEADER_LEN@PLT
	lea	edi, 140[r14]
	call	Endian16@PLT
	mov	r8, QWORD PTR [rsp]
	mov	esi, 64
	mov	DWORD PTR 24[r15], 255
	mov	QWORD PTR 72[r15], rax
	mov	rax, QWORD PTR IP_PROTO_ICMPV4[rip]
	mov	rdi, r8
	mov	QWORD PTR 64[r15], rax
	mov	rax, QWORD PTR 0[r13]
	mov	QWORD PTR 16[r15], rax
	mov	rax, QWORD PTR [r12]
	mov	QWORD PTR 32[r15], rax
	call	IpChecksum@PLT
	mov	DWORD PTR 296[r15], 11
	mov	QWORD PTR 48[r15], rax
.L32:
	mov	edx, ebx
	lea	rdi, 544[r15]
	mov	rsi, r12
	call	Copy@PLT
	lea	esi, 68[rbx]
	lea	rdi, 272[r15]
	call	IpChecksum@PLT
	mov	r9d, DWORD PTR 12[rsp]
	mov	QWORD PTR 48[r15], 8
	mov	rdi, r15
	mov	QWORD PTR 304[r15], rax
	mov	esi, r9d
	call	ParsePacket@PLT
	mov	rsi, rax
	test	rax, rax
	je	.L36
	mov	edx, 1
	mov	rdi, r13
	call	L3RecvIp
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L28:
	mov	rax, QWORD PTR [r15]
	cmp	QWORD PTR 16[r12], rax
	je	.L37
.L10:
	mov	QWORD PTR 32[r12], 0
	mov	esi, r14d
	mov	rdi, r12
	call	IpChecksum@PLT
	mov	edi, 24
	mov	QWORD PTR 32[r12], rax
	call	ZeroMalloc@PLT
	mov	r12, rax
	xor	eax, eax
	call	Tick64@PLT
	mov	QWORD PTR 8[r12], rbp
	mov	rdx, r12
	mov	rsi, r15
	add	rax, QWORD PTR IP_WAIT_FOR_ARP_TIMEOUT[rip]
	mov	rdi, r13
	mov	QWORD PTR 16[r12], rax
	mov	eax, DWORD PTR 20[rsp]
	mov	DWORD PTR [r12], eax
	call	L3StoreIpPacketToIf@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L34:
	mov	edi, DWORD PTR 0[rbp]
	lea	r9d, 144[r14]
	lea	esi, 8[r14]
	mov	DWORD PTR [rsp], r9d
	sub	edi, r14d
	call	MIN@PLT
	mov	r9d, DWORD PTR [rsp]
	mov	ebx, eax
	mov	edi, r9d
	mov	DWORD PTR 12[rsp], r9d
	call	ZeroMalloc@PLT
	mov	esi, 4
	lea	r8, 16[rax]
	mov	r15, rax
	mov	rdi, r8
	mov	QWORD PTR [rsp], r8
	call	IPV4_SET_VERSION@PLT
	mov	r8, QWORD PTR [rsp]
	mov	esi, 16
	mov	rdi, r8
	call	IPV4_SET_HEADER_LEN@PLT
	lea	edi, 140[r14]
	call	Endian16@PLT
	mov	r8, QWORD PTR [rsp]
	mov	esi, 64
	mov	DWORD PTR 24[r15], 255
	mov	QWORD PTR 72[r15], rax
	mov	rax, QWORD PTR IP_PROTO_ICMPV4[rip]
	mov	rdi, r8
	mov	QWORD PTR 64[r15], rax
	mov	rax, QWORD PTR 0[r13]
	mov	QWORD PTR 16[r15], rax
	mov	rax, QWORD PTR [r12]
	mov	QWORD PTR 32[r15], rax
	call	IpChecksum@PLT
	mov	DWORD PTR 296[r15], 3
	mov	QWORD PTR 48[r15], rax
	jmp	.L32
	.p2align 4,,10
	.p2align 3
.L37:
	mov	rax, QWORD PTR L4_ICMPV4[rip]
	cmp	QWORD PTR 8[rbp], rax
	jne	.L7
	mov	rbx, QWORD PTR 32[rbp]
	movsx	rax, DWORD PTR 24[rbx]
	cmp	rax, QWORD PTR ICMP_TYPE_ECHO_REQUEST[rip]
	jne	.L7
	mov	rax, QWORD PTR 24[rbp]
	mov	rdi, rbx
	mov	QWORD PTR [rsp], rdx
	mov	rcx, QWORD PTR 16[rax]
	movsx	rsi, DWORD PTR [rax]
	movsx	rcx, ecx
	mov	QWORD PTR 16[rax], rsi
	mov	QWORD PTR [rax], rcx
	mov	rax, QWORD PTR 40[r12]
	mov	DWORD PTR 8[r12], 255
	mov	QWORD PTR 8[rax], 0
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR ICMP_TYPE_ECHO_RESPONSE[rip]
	mov	QWORD PTR 32[rbx], 0
	mov	DWORD PTR 24[rbx], eax
	mov	eax, DWORD PTR 0[rbp]
	lea	esi, -4[rax]
	sub	esi, r14d
	call	IpChecksum@PLT
	mov	rsi, QWORD PTR 16[r12]
	mov	edi, DWORD PTR 8[r13]
	mov	QWORD PTR 32[rbx], rax
	mov	rdx, QWORD PTR [rsp]
	call	L3GetNextIf@PLT
	mov	r15, rax
	test	rax, rax
	jne	.L10
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L36:
	mov	rdi, r15
	call	Free@PLT
	jmp	.L7
.L35:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	L3RecvIp, .-L3RecvIp
	.comm	L4_ICMPV4,8,8
	.comm	IP_WAIT_FOR_ARP_TIMEOUT,8,8
	.comm	IP_PROTO_ICMPV4,8,8
	.comm	ICMP_TYPE_ECHO_RESPONSE,8,8
	.comm	ICMP_TYPE_ECHO_REQUEST,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_Layer3.c_L3RecvIp.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	L3RecvIp
	.syntax unified
	.arm
	.fpu softvfp
	.type	L3RecvIp, %function
L3RecvIp:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, #0
	cmp	r1, #0
	cmpne	r0, #0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r7, r2
	ldr	r2, .L30
	sub	sp, sp, #20
	ldr	r2, [r2]
	str	r2, [sp, #12]
	mov	r2,#0
	str	r3, [sp, #8]
	bne	.L24
.L1:
	ldr	r3, .L30
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L25
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L24:
	ldr	r6, [r1, #12]
	mov	r5, r0
	mov	r0, r6
	mov	r4, r1
	bl	IPV4_GET_HEADER_LEN
	mov	r8, r0
	mov	r0, r6
	bl	IpCheckChecksum
	cmp	r0, #0
	beq	.L7
	mov	r0, r5
	ldr	r2, [r4, #24]
	ldr	r1, [r6]
	bl	L3KnownArp
	ldr	r3, [r4, #20]
	cmp	r3, #0
	bne	.L7
	ldr	r2, [r6, #4]
	ldr	r1, [r6, #8]
	cmp	r2, #0
	lsl	r8, r8, #2
	ble	.L4
	subs	r2, r2, #1
	bne	.L12
.L4:
	ldr	r2, [r5]
	cmp	r2, r1
	bne	.L26
.L5:
	ldr	r2, [r4, #12]
	ldr	r0, [r5, #4]
	str	r3, [r2, #4]
	add	r2, sp, #8
	bl	L3GetNextIf
	orrs	r7, r0, r7
	mov	r9, r0
	beq	.L27
	cmp	r0, #0
	beq	.L7
	ldr	r2, [r6, #8]
	ldr	r3, [r0]
	cmp	r2, r3
	beq	.L28
.L10:
	mov	r3, #0
	mov	r1, r8
	str	r3, [r6, #16]
	mov	r0, r6
	bl	IpChecksum
	mov	r3, r0
	mov	r0, #12
	str	r3, [r6, #16]
	bl	ZeroMalloc
	mov	r6, r0
	bl	Tick64
	ldr	r3, .L30+4
	ldr	r2, [sp, #8]
	ldr	r3, [r3]
	mov	r1, r9
	add	r3, r3, r0
	str	r2, [r6]
	mov	r0, r5
	mov	r2, r6
	str	r4, [r6, #4]
	str	r3, [r6, #8]
	bl	L3StoreIpPacketToIf
	b	.L1
.L26:
	ldr	r0, [r4]
	add	r1, r8, #8
	sub	r0, r0, r8
	bl	MIN
	add	fp, r8, #80
	mov	r9, r0
	mov	r0, fp
	bl	ZeroMalloc
	add	r10, r0, #16
	mov	r7, r0
	mov	r1, #4
	mov	r0, r10
	bl	IPV4_SET_VERSION
	mov	r1, #8
	mov	r0, r10
	bl	IPV4_SET_HEADER_LEN
	add	r0, r8, #76
	bl	Endian16
	mov	r1, #255
	mov	ip, r0
	ldr	r2, [r5]
	ldr	r3, .L30+8
	str	r2, [r7, #16]
	ldr	r2, [r3]
	ldr	r3, [r6]
	mov	r0, r10
	str	ip, [r7, #44]
	str	r1, [r7, #20]
	str	r2, [r7, #40]
	mov	r1, #32
	str	r3, [r7, #24]
	bl	IpChecksum
	mov	r3, #11
	mov	r2, r9
	str	r3, [r7, #156]
	mov	r1, r6
	str	r0, [r7, #32]
	add	r0, r7, #288
	bl	Copy
	add	r1, r9, #36
	add	r0, r7, #144
	bl	IpChecksum
	mov	r2, #8
	mov	r3, #0
	mov	r1, fp
	str	r0, [r7, #160]
	str	r2, [r7, #48]
	mov	r0, r7
	str	r3, [r7, #52]
	bl	ParsePacket
	subs	r1, r0, #0
	beq	.L29
.L9:
	mov	r0, r5
	mov	r2, #1
	bl	L3RecvIp
.L7:
	ldr	r0, [r4, #8]
	bl	Free
	mov	r0, r4
	bl	FreePacket
	b	.L1
.L12:
	mov	r3, r2
	b	.L5
.L28:
	ldr	r3, .L30+12
	ldr	r2, [r4, #4]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L7
	ldr	r7, [r4, #16]
	ldr	r3, .L30+16
	ldr	r2, [r7, #12]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L7
	mov	r2, #0
	mov	r1, #255
	ldr	r3, [r4, #12]
	ldr	r0, [r3]
	ldr	ip, [r3, #8]
	str	r0, [r3, #8]
	str	ip, [r3]
	ldr	r3, [r6, #20]
	ldr	r0, .L30+20
	str	r1, [r6, #4]
	str	r2, [r3]
	ldr	r1, [r4]
	ldr	r0, [r0]
	sub	r1, r1, #4
	str	r2, [r3, #4]
	sub	r1, r1, r8
	str	r2, [r7, #16]
	str	r0, [r7, #12]
	mov	r0, r7
	bl	IpChecksum
	ldr	r1, [r6, #8]
	str	r0, [r7, #16]
	add	r2, sp, #8
	ldr	r0, [r5, #4]
	bl	L3GetNextIf
	subs	r9, r0, #0
	bne	.L10
	b	.L7
.L27:
	ldr	r0, [r4]
	add	r1, r8, #8
	sub	r0, r0, r8
	bl	MIN
	add	r3, r8, #80
	mov	r10, r0
	mov	r0, r3
	str	r3, [sp, #4]
	bl	ZeroMalloc
	add	fp, r0, #16
	mov	r9, r0
	mov	r1, #4
	mov	r0, fp
	bl	IPV4_SET_VERSION
	mov	r1, #8
	mov	r0, fp
	bl	IPV4_SET_HEADER_LEN
	add	r0, r8, #76
	bl	Endian16
	mov	ip, #255
	mov	lr, r0
	ldr	r1, [r5]
	ldr	r2, .L30+8
	str	r1, [r9, #16]
	ldr	r1, [r2]
	ldr	r2, [r6]
	mov	r0, fp
	str	lr, [r9, #44]
	str	ip, [r9, #20]
	str	r1, [r9, #40]
	str	r2, [r9, #24]
	mov	r1, #32
	bl	IpChecksum
	mov	r2, #3
	mov	r1, r6
	str	r0, [r9, #32]
	str	r2, [r9, #156]
	add	r0, r9, #288
	mov	r2, r10
	bl	Copy
	add	r1, r10, #36
	add	r0, r9, #144
	bl	IpChecksum
	mov	r2, #8
	ldr	r3, [sp, #4]
	str	r0, [r9, #160]
	mov	r1, r3
	mov	r0, r9
	str	r7, [r9, #52]
	str	r2, [r9, #48]
	bl	ParsePacket
	subs	r1, r0, #0
	bne	.L9
	mov	r0, r9
	bl	Free
	b	.L7
.L29:
	mov	r0, r7
	bl	Free
	b	.L7
.L25:
	bl	__stack_chk_fail
.L31:
	.align	2
.L30:
	.word	.LC0
	.word	IP_WAIT_FOR_ARP_TIMEOUT
	.word	IP_PROTO_ICMPV4
	.word	L4_ICMPV4
	.word	ICMP_TYPE_ECHO_REQUEST
	.word	ICMP_TYPE_ECHO_RESPONSE
	.size	L3RecvIp, .-L3RecvIp
	.comm	L4_ICMPV4,4,4
	.comm	IP_WAIT_FOR_ARP_TIMEOUT,4,4
	.comm	IP_PROTO_ICMPV4,4,4
	.comm	ICMP_TYPE_ECHO_RESPONSE,4,4
	.comm	ICMP_TYPE_ECHO_REQUEST,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
