	.file	"extr_nd6_rtr.c_nd6_prefix_lookup.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	nd6_prefix_lookup
	.type	nd6_prefix_lookup, @function
nd6_prefix_lookup:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	edi, DWORD PTR nd6_mutex[rip]
	call	lck_mtx_lock@PLT
	mov	r12, QWORD PTR nd_prefix[rip]
	test	r12, r12
	je	.L2
	lea	r13, 20[rbx]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rdi, r12
	call	NDPR_UNLOCK@PLT
	mov	r12, QWORD PTR 24[r12]
	test	r12, r12
	je	.L2
.L6:
	mov	rdi, r12
	call	NDPR_LOCK@PLT
	mov	rax, QWORD PTR [r12]
	cmp	QWORD PTR [rbx], rax
	jne	.L3
	mov	rdx, QWORD PTR 8[rbx]
	cmp	rdx, QWORD PTR 8[r12]
	jne	.L3
	lea	rsi, 20[r12]
	mov	rdi, r13
	call	in6_are_prefix_equal@PLT
	test	rax, rax
	je	.L3
	cmp	DWORD PTR ND6_PREFIX_EXPIRY_UNSPEC[rip], ebp
	je	.L4
	mov	DWORD PTR 16[r12], ebp
.L4:
	mov	rdi, r12
	call	NDPR_ADDREF_LOCKED@PLT
	mov	rdi, r12
	call	NDPR_UNLOCK@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	xor	r12d, r12d
.L5:
	mov	edi, DWORD PTR nd6_mutex[rip]
	call	lck_mtx_unlock@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 40
	mov	rax, r12
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	nd6_prefix_lookup, .-nd6_prefix_lookup
	.comm	nd_prefix,8,8
	.comm	nd6_mutex,4,4
	.comm	ND6_PREFIX_EXPIRY_UNSPEC,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_nd6_rtr.c_nd6_prefix_lookup.c"
	.text
	.align	2
	.global	nd6_prefix_lookup
	.syntax unified
	.arm
	.fpu softvfp
	.type	nd6_prefix_lookup, %function
nd6_prefix_lookup:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r7, .L16
	mov	r5, r0
	ldr	r0, [r7]
	mov	r6, r1
	bl	lck_mtx_lock
	ldr	r3, .L16+4
	ldr	r4, [r3]
	cmp	r4, #0
	beq	.L2
	add	r8, r5, #12
	b	.L6
.L3:
	mov	r0, r4
	bl	NDPR_UNLOCK
	ldr	r4, [r4, #16]
	cmp	r4, #0
	beq	.L2
.L6:
	mov	r0, r4
	bl	NDPR_LOCK
	ldr	r2, [r5]
	ldr	r3, [r4]
	cmp	r2, r3
	bne	.L3
	ldr	r2, [r5, #4]
	ldr	r3, [r4, #4]
	cmp	r2, r3
	bne	.L3
	mov	r0, r8
	add	r1, r4, #12
	bl	in6_are_prefix_equal
	cmp	r0, #0
	beq	.L3
	ldr	r3, .L16+8
	mov	r0, r4
	ldr	r3, [r3]
	cmp	r3, r6
	strne	r6, [r4, #8]
	bl	NDPR_ADDREF_LOCKED
	mov	r0, r4
	bl	NDPR_UNLOCK
	b	.L5
.L2:
	mov	r4, #0
.L5:
	ldr	r0, [r7]
	bl	lck_mtx_unlock
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L17:
	.align	2
.L16:
	.word	nd6_mutex
	.word	nd_prefix
	.word	ND6_PREFIX_EXPIRY_UNSPEC
	.size	nd6_prefix_lookup, .-nd6_prefix_lookup
	.comm	nd_prefix,4,4
	.comm	nd6_mutex,4,4
	.comm	ND6_PREFIX_EXPIRY_UNSPEC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
