	.file	"extr_friend_connection.c_handle_new_connections.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	handle_new_connections, @function
handle_new_connections:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14, rsi
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	esi, DWORD PTR 16[rsi]
	mov	rbx, rdi
	call	getfriend_conn_id_pk@PLT
	mov	rdi, rbx
	mov	esi, eax
	mov	r13d, eax
	call	get_conn@PLT
	test	rax, rax
	je	.L4
	cmp	DWORD PTR [rax], -1
	mov	r12, rax
	jne	.L4
	mov	edi, DWORD PTR [rbx]
	mov	rsi, r14
	call	accept_crypto_connection@PLT
	mov	ebp, eax
	cmp	eax, -1
	je	.L4
	mov	edi, DWORD PTR [rbx]
	mov	r8d, r13d
	mov	rcx, rbx
	lea	rdx, handle_status[rip]
	mov	esi, eax
	call	connection_status_handler@PLT
	mov	edi, DWORD PTR [rbx]
	mov	r8d, r13d
	mov	rcx, rbx
	lea	rdx, handle_packet[rip]
	mov	esi, ebp
	call	connection_data_handler@PLT
	mov	edi, DWORD PTR [rbx]
	mov	r8d, r13d
	mov	rcx, rbx
	lea	rdx, handle_lossy_packet[rip]
	mov	esi, ebp
	call	connection_lossy_data_handler@PLT
	mov	rax, QWORD PTR 8[r14]
	cmp	rax, QWORD PTR AF_INET[rip]
	mov	DWORD PTR [r12], ebp
	je	.L5
	cmp	rax, QWORD PTR AF_INET6[rip]
	jne	.L16
.L5:
	mov	rax, QWORD PTR 8[r14]
	mov	QWORD PTR 16[r12], rax
	xor	eax, eax
	call	unix_time@PLT
	mov	DWORD PTR 8[r12], eax
.L6:
	mov	edi, DWORD PTR 4[r12]
	mov	esi, DWORD PTR [r14]
	call	public_key_cmp@PLT
	test	rax, rax
	jne	.L17
.L7:
	mov	edi, DWORD PTR [rbx]
	mov	r8d, r13d
	mov	rcx, rbx
	lea	rdx, dht_pk_callback[rip]
	mov	esi, ebp
	call	nc_dht_pk_callback@PLT
	xor	eax, eax
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	rdx, QWORD PTR 16[r12]
	mov	edi, DWORD PTR [rbx]
	xor	ecx, ecx
	mov	esi, ebp
	call	set_direct_ip_port@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L17:
	mov	edx, DWORD PTR [r14]
	mov	esi, r13d
	mov	rdi, rbx
	call	change_dht_pk@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	mov	eax, -1
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	handle_new_connections, .-handle_new_connections
	.comm	handle_status,4,4
	.comm	handle_packet,4,4
	.comm	handle_lossy_packet,4,4
	.comm	dht_pk_callback,4,4
	.comm	AF_INET6,8,8
	.comm	AF_INET,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_friend_connection.c_handle_new_connections.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	handle_new_connections, %function
handle_new_connections:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r1
	sub	sp, sp, #8
	ldr	r1, [r1, #8]
	mov	r4, r0
	bl	getfriend_conn_id_pk
	mov	r7, r0
	mov	r0, r4
	mov	r1, r7
	bl	get_conn
	subs	r8, r0, #0
	beq	.L4
	ldr	r3, [r8]
	cmn	r3, #1
	bne	.L4
	mov	r1, r6
	ldr	r0, [r4]
	bl	accept_crypto_connection
	cmn	r0, #1
	mov	r5, r0
	beq	.L4
	str	r7, [sp]
	mov	r1, r0
	mov	r3, r4
	ldr	r2, .L18
	ldr	r0, [r4]
	bl	connection_status_handler
	str	r7, [sp]
	mov	r3, r4
	mov	r1, r5
	ldr	r2, .L18+4
	ldr	r0, [r4]
	bl	connection_data_handler
	str	r7, [sp]
	mov	r3, r4
	ldr	r2, .L18+8
	mov	r1, r5
	ldr	r0, [r4]
	bl	connection_lossy_data_handler
	ldr	r2, .L18+12
	ldr	r3, [r6, #4]
	ldr	r2, [r2]
	str	r5, [r8]
	cmp	r3, r2
	beq	.L5
	ldr	r2, .L18+16
	ldr	r2, [r2]
	cmp	r3, r2
	bne	.L16
.L5:
	ldr	r3, [r6, #4]
	str	r3, [r8, #12]
	bl	unix_time
	str	r0, [r8, #8]
.L6:
	ldr	r0, [r8, #4]
	ldr	r1, [r6]
	bl	public_key_cmp
	cmp	r0, #0
	bne	.L17
.L7:
	str	r7, [sp]
	mov	r1, r5
	mov	r3, r4
	ldr	r0, [r4]
	ldr	r2, .L18+20
	bl	nc_dht_pk_callback
	mov	r0, #0
.L1:
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L16:
	mov	r3, #0
	mov	r1, r5
	ldr	r2, [r8, #12]
	ldr	r0, [r4]
	bl	set_direct_ip_port
	b	.L6
.L17:
	mov	r1, r7
	mov	r0, r4
	ldr	r2, [r6]
	bl	change_dht_pk
	b	.L7
.L4:
	mvn	r0, #0
	b	.L1
.L19:
	.align	2
.L18:
	.word	handle_status
	.word	handle_packet
	.word	handle_lossy_packet
	.word	AF_INET
	.word	AF_INET6
	.word	dht_pk_callback
	.size	handle_new_connections, .-handle_new_connections
	.comm	handle_status,4,4
	.comm	handle_packet,4,4
	.comm	handle_lossy_packet,4,4
	.comm	dht_pk_callback,4,4
	.comm	AF_INET6,4,4
	.comm	AF_INET,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
