	.file	"extr_ntp_peer.c_findpeer.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	findpeer
	.type	findpeer, @function
findpeer:
.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	r14, rdx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	lea	r13, 12[rdi]
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	mov	rdi, r13
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	add	DWORD PTR findpeer_calls[rip], 1
	call	NTP_HASH_ADDR@PLT
	mov	rdx, QWORD PTR peer_hash[rip]
	mov	r12, QWORD PTR [rdx+rax*8]
	test	r12, r12
	je	.L2
	lea	r15, 4[rsp]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	cmp	DWORD PTR AM_ERR[rip], eax
	je	.L21
.L23:
	cmp	DWORD PTR AM_NOMATCH[rip], eax
	jne	.L1
.L5:
	mov	r12, QWORD PTR 24[r12]
	test	r12, r12
	je	.L2
.L4:
	mov	rax, QWORD PTR MODE_BCLIENT[rip]
	cmp	QWORD PTR [r12], rax
	je	.L3
	mov	rax, QWORD PTR [rbx]
	cmp	QWORD PTR 8[r12], rax
	jne	.L5
.L3:
	lea	rsi, 20[r12]
	mov	rdi, r13
	call	ADDR_PORT_EQ@PLT
	test	eax, eax
	je	.L5
	mov	rdi, QWORD PTR [r12]
	mov	esi, ebp
	call	MATCH_ASSOC@PLT
	mov	DWORD PTR [r14], eax
	cmp	DWORD PTR MODE_SERVER[rip], ebp
	jne	.L6
	cmp	eax, DWORD PTR AM_PROCPKT[rip]
	jne	.L6
	lea	rdi, 8[rbx]
	mov	rsi, r15
	call	NTOHL_FP@PLT
	lea	rdi, 16[r12]
	mov	rsi, r15
	call	L_ISEQU@PLT
	test	eax, eax
	je	.L7
.L20:
	mov	eax, DWORD PTR [r14]
	cmp	DWORD PTR AM_ERR[rip], eax
	jne	.L23
	.p2align 4,,10
	.p2align 3
.L21:
	xor	r12d, r12d
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L24
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r12
	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
.L2:
	.cfi_restore_state
	mov	rdi, QWORD PTR NO_PEER[rip]
	mov	esi, ebp
	xor	r12d, r12d
	call	MATCH_ASSOC@PLT
	mov	DWORD PTR [r14], eax
	jmp	.L1
.L7:
	mov	rdi, rbx
	call	findmanycastpeer@PLT
	test	rax, rax
	je	.L20
	mov	eax, DWORD PTR AM_ERR[rip]
	mov	DWORD PTR [r14], eax
	jmp	.L6
.L24:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	findpeer, .-findpeer
	.comm	peer_hash,8,8
	.comm	findpeer_calls,4,4
	.comm	NO_PEER,8,8
	.comm	MODE_SERVER,4,4
	.comm	MODE_BCLIENT,8,8
	.comm	AM_PROCPKT,4,4
	.comm	AM_NOMATCH,4,4
	.comm	AM_ERR,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_ntp_peer.c_findpeer.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	findpeer
	.syntax unified
	.arm
	.fpu softvfp
	.type	findpeer, %function
findpeer:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	ip, .L26
	sub	sp, sp, #20
	ldr	r3, [ip]
	str	r2, [sp]
	add	r6, r0, #8
	ldr	r2, .L26+4
	add	r3, r3, #1
	mov	r4, r0
	mov	r0, r6
	ldr	r2, [r2]
	str	r2, [sp, #12]
	mov	r2,#0
	mov	r5, r1
	str	r3, [ip]
	bl	NTP_HASH_ADDR
	ldr	r3, .L26+8
	ldr	r3, [r3]
	ldr	fp, [r3, r0, lsl #2]
	cmp	fp, #0
	beq	.L2
	add	r3, r4, #4
	ldr	r7, .L26+12
	ldr	r9, .L26+16
	ldr	r10, .L26+20
	ldr	r8, .L26+24
	str	r3, [sp, #4]
	b	.L4
.L6:
	ldr	r2, [r8]
	cmp	r2, r0
	beq	.L11
.L24:
	ldr	r2, [r10]
	cmp	r2, r0
	bne	.L1
.L5:
	ldr	fp, [fp, #16]
	cmp	fp, #0
	beq	.L2
.L4:
	ldr	r1, [fp]
	ldr	r2, [r7]
	cmp	r1, r2
	beq	.L3
	ldr	r1, [fp, #4]
	ldr	r2, [r4]
	cmp	r1, r2
	bne	.L5
.L3:
	mov	r0, r6
	add	r1, fp, #12
	bl	ADDR_PORT_EQ
	cmp	r0, #0
	beq	.L5
	mov	r1, r5
	ldr	r0, [fp]
	bl	MATCH_ASSOC
	ldr	r3, [sp]
	str	r0, [r3]
	ldr	r2, [r9]
	cmp	r2, r5
	bne	.L6
	ldr	r3, .L26+28
	ldr	r2, [r3]
	cmp	r0, r2
	bne	.L6
	add	r1, sp, #8
	ldr	r0, [sp, #4]
	bl	NTOHL_FP
	add	r1, sp, #8
	add	r0, fp, #8
	bl	L_ISEQU
	cmp	r0, #0
	beq	.L7
.L22:
	ldr	r3, [sp]
	ldr	r2, [r8]
	ldr	r0, [r3]
	cmp	r2, r0
	bne	.L24
.L11:
	mov	fp, #0
.L1:
	ldr	r3, .L26+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L25
	mov	r0, fp
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	ldr	r3, .L26+32
	mov	r1, r5
	ldr	r0, [r3]
	bl	MATCH_ASSOC
	ldr	r3, [sp]
	mov	fp, #0
	str	r0, [r3]
	b	.L1
.L7:
	mov	r0, r4
	bl	findmanycastpeer
	cmp	r0, #0
	beq	.L22
	ldr	r0, [r8]
	ldr	r3, [sp]
	str	r0, [r3]
	b	.L6
.L25:
	bl	__stack_chk_fail
.L27:
	.align	2
.L26:
	.word	findpeer_calls
	.word	.LC0
	.word	peer_hash
	.word	MODE_BCLIENT
	.word	MODE_SERVER
	.word	AM_NOMATCH
	.word	AM_ERR
	.word	AM_PROCPKT
	.word	NO_PEER
	.size	findpeer, .-findpeer
	.comm	peer_hash,4,4
	.comm	findpeer_calls,4,4
	.comm	NO_PEER,4,4
	.comm	MODE_SERVER,4,4
	.comm	MODE_BCLIENT,4,4
	.comm	AM_PROCPKT,4,4
	.comm	AM_NOMATCH,4,4
	.comm	AM_ERR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
