	.file	"extr_necp.c_necp_get_tlv_at_offset.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"necp_get_tlv_at_offset buffer is NULL"
	.align 8
.LC1:
	.string	"necp_get_tlv_at_offset buffer_length is too small for TLV (%u < %u)"
	.align 8
.LC2:
	.string	"necp_get_tlv_at_offset buffer_length is too small for TLV of length %u (%u < %u)"
	.align 8
.LC3:
	.string	"necp_get_tlv_at_offset out_buffer_length is too small for TLV value (%u < %u)"
	.align 8
.LC4:
	.string	"necp_get_tlv_at_offset tlv_value is NULL"
	.text
	.p2align 4
	.type	necp_get_tlv_at_offset, @function
necp_get_tlv_at_offset:
.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
	mov	r14d, r8d
	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
	mov	ebp, ecx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	r8, QWORD PTR 96[rsp]
	test	rdi, rdi
	jne	.L20
	mov	r12, rsi
	test	rsi, rsi
	je	.L21
	mov	r13d, edx
	movsx	rdx, ecx
	lea	rcx, 8[rdx]
	movsx	rbx, r13d
	cmp	rcx, rbx
	ja	.L22
	mov	esi, ebp
	mov	rdi, r12
	mov	QWORD PTR 24[rsp], r8
	sub	rbx, 8
	mov	QWORD PTR 16[rsp], r9
	mov	QWORD PTR 8[rsp], rcx
	mov	QWORD PTR [rsp], rdx
	call	necp_buffer_get_tlv_length@PLT
	mov	rdx, QWORD PTR [rsp]
	mov	rcx, QWORD PTR 8[rsp]
	mov	r15d, eax
	cdqe
	mov	r9, QWORD PTR 16[rsp]
	mov	r8, QWORD PTR 24[rsp]
	sub	rbx, rdx
	cmp	rax, rbx
	ja	.L23
	test	r9, r9
	je	.L7
	test	r14d, r14d
	jle	.L7
	cmp	r15d, r14d
	jg	.L24
	xor	edx, edx
	mov	esi, ebp
	mov	rdi, r12
	mov	QWORD PTR 8[rsp], r8
	mov	QWORD PTR [rsp], r9
	call	necp_buffer_get_tlv_value@PLT
	mov	r9, QWORD PTR [rsp]
	mov	r8, QWORD PTR 8[rsp]
	test	rax, rax
	mov	rsi, rax
	je	.L25
	mov	edx, r15d
	mov	rdi, r9
	mov	QWORD PTR [rsp], r8
	call	memcpy@PLT
	mov	r8, QWORD PTR [rsp]
.L7:
	xor	eax, eax
	test	r8, r8
	je	.L1
	mov	DWORD PTR [r8], r15d
.L1:
	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
.L20:
	.cfi_restore_state
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	edx, r14d
	mov	esi, ebp
	mov	rcx, r9
	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
	jmp	necp_packet_get_tlv_at_offset@PLT
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	mov	edi, DWORD PTR LOG_ERR[rip]
	lea	ecx, 8[rbp]
	mov	edx, r13d
	xor	eax, eax
	lea	rsi, .LC1[rip]
	call	NECPLOG@PLT
	mov	eax, DWORD PTR EINVAL[rip]
	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
.L23:
	.cfi_restore_state
	mov	edi, DWORD PTR LOG_ERR[rip]
	lea	r8, [rcx+rax]
	xor	eax, eax
	mov	ecx, r13d
	mov	edx, r15d
	lea	rsi, .LC2[rip]
	call	NECPLOG@PLT
	mov	eax, DWORD PTR EINVAL[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L21:
	mov	edi, DWORD PTR LOG_ERR[rip]
	lea	rsi, .LC0[rip]
	call	NECPLOG0@PLT
	mov	eax, DWORD PTR EINVAL[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L24:
	mov	edi, DWORD PTR LOG_ERR[rip]
	mov	ecx, r15d
	mov	edx, r14d
	xor	eax, eax
	lea	rsi, .LC3[rip]
	call	NECPLOG@PLT
	mov	eax, DWORD PTR EINVAL[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L25:
	mov	edi, DWORD PTR LOG_ERR[rip]
	lea	rsi, .LC4[rip]
	call	NECPLOG0@PLT
	mov	eax, DWORD PTR ENOENT[rip]
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	necp_get_tlv_at_offset, .-necp_get_tlv_at_offset
	.comm	LOG_ERR,4,4
	.comm	ENOENT,4,4
	.comm	EINVAL,4,4
	.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_necp.c_necp_get_tlv_at_offset.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"necp_get_tlv_at_offset buffer is NULL\000"
	.align	2
.LC1:
	.ascii	"necp_get_tlv_at_offset buffer_length is too small f"
	.ascii	"or TLV (%u < %u)\000"
	.align	2
.LC2:
	.ascii	"necp_get_tlv_at_offset buffer_length is too small f"
	.ascii	"or TLV of length %u (%u < %u)\000"
	.align	2
.LC3:
	.ascii	"necp_get_tlv_at_offset out_buffer_length is too sma"
	.ascii	"ll for TLV value (%u < %u)\000"
	.align	2
.LC4:
	.ascii	"necp_get_tlv_at_offset tlv_value is NULL\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	necp_get_tlv_at_offset, %function
necp_get_tlv_at_offset:
	@ args = 12, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	subs	r9, r0, #0
	sub	sp, sp, #20
	mov	r4, r3
	ldr	r10, [sp, #56]
	ldr	fp, [sp, #60]
	ldr	r6, [sp, #64]
	bne	.L16
	cmp	r1, #0
	mov	r8, r1
	beq	.L17
	add	r3, r3, #8
	cmp	r3, r2
	mov	r5, r2
	bhi	.L18
	mov	r1, r4
	mov	r0, r8
	str	r3, [sp, #12]
	bl	necp_buffer_get_tlv_length
	sub	r2, r5, #8
	sub	r2, r2, r4
	cmp	r2, r0
	mov	r7, r0
	ldr	r3, [sp, #12]
	bcc	.L19
	cmp	fp, #0
	cmpne	r10, #0
	ble	.L7
	cmp	r0, r10
	bgt	.L20
	mov	r1, r4
	mov	r2, r9
	mov	r0, r8
	bl	necp_buffer_get_tlv_value
	subs	r1, r0, #0
	beq	.L21
	mov	r0, fp
	mov	r2, r7
	bl	memcpy
.L7:
	cmp	r6, #0
	movne	r0, #0
	moveq	r0, r6
	strne	r7, [r6]
.L1:
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L16:
	mov	r3, fp
	mov	r2, r10
	mov	r1, r4
	str	r6, [sp, #56]
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	necp_packet_get_tlv_at_offset
.L18:
	ldr	r1, .L22
	ldr	r0, [r1]
	ldr	r1, .L22+4
	bl	NECPLOG
	ldr	r3, .L22+8
	ldr	r0, [r3]
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L19:
	add	r3, r3, r0
	ldr	r1, .L22
	str	r3, [sp]
	mov	r2, r0
	mov	r3, r5
	ldr	r0, [r1]
	ldr	r1, .L22+12
	bl	NECPLOG
	ldr	r3, .L22+8
	ldr	r0, [r3]
	b	.L1
.L17:
	ldr	r3, .L22
	ldr	r1, .L22+16
	ldr	r0, [r3]
	bl	NECPLOG0
	ldr	r3, .L22+8
	ldr	r0, [r3]
	b	.L1
.L20:
	ldr	r1, .L22
	mov	r3, r0
	mov	r2, r10
	ldr	r0, [r1]
	ldr	r1, .L22+20
	bl	NECPLOG
	ldr	r3, .L22+8
	ldr	r0, [r3]
	b	.L1
.L21:
	ldr	r3, .L22
	ldr	r1, .L22+24
	ldr	r0, [r3]
	bl	NECPLOG0
	ldr	r3, .L22+28
	ldr	r0, [r3]
	b	.L1
.L23:
	.align	2
.L22:
	.word	LOG_ERR
	.word	.LC1
	.word	EINVAL
	.word	.LC2
	.word	.LC0
	.word	.LC3
	.word	.LC4
	.word	ENOENT
	.size	necp_get_tlv_at_offset, .-necp_get_tlv_at_offset
	.comm	LOG_ERR,4,4
	.comm	ENOENT,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
