	.file	"extr_TCP_connection.c_kill_tcp_connection_to.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	kill_tcp_connection_to
	.type	kill_tcp_connection_to, @function
kill_tcp_connection_to:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdi
	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
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	get_connection@PLT
	test	rax, rax
	je	.L2
	mov	r12, rax
	mov	eax, DWORD PTR MAX_FRIEND_TCP_CONNECTIONS[rip]
	xor	ebx, ebx
	test	eax, eax
	jne	.L3
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L5:
	add	ebx, 1
	cmp	DWORD PTR MAX_FRIEND_TCP_CONNECTIONS[rip], ebx
	jbe	.L8
.L3:
	mov	rdx, QWORD PTR 8[r12]
	mov	eax, ebx
	lea	rax, [rax+rax*2]
	mov	esi, DWORD PTR [rdx+rax*8]
	lea	r14, 0[0+rax*8]
	test	esi, esi
	je	.L5
	sub	esi, 1
	mov	rdi, r15
	call	get_tcp_connection@PLT
	mov	r13, rax
	test	rax, rax
	je	.L5
	mov	rax, QWORD PTR 8[r12]
	mov	rcx, QWORD PTR TCP_CONN_CONNECTED[rip]
	add	rax, r14
	cmp	QWORD PTR 0[r13], rcx
	je	.L17
.L7:
	mov	rcx, QWORD PTR TCP_CONNECTIONS_STATUS_ONLINE[rip]
	cmp	QWORD PTR 8[rax], rcx
	jne	.L5
	sub	DWORD PTR 12[r13], 1
	mov	rax, QWORD PTR TCP_CONN_SLEEPING[rip]
	cmp	QWORD PTR [r12], rax
	jne	.L5
	sub	DWORD PTR 8[r13], 1
	add	ebx, 1
	cmp	DWORD PTR MAX_FRIEND_TCP_CONNECTIONS[rip], ebx
	ja	.L3
.L8:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	esi, ebp
	mov	rdi, r15
	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	wipe_connection@PLT
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	esi, DWORD PTR 16[rax]
	mov	edi, DWORD PTR 16[r13]
	call	send_disconnect_request@PLT
	mov	rax, QWORD PTR 8[r12]
	add	rax, r14
	jmp	.L7
.L2:
	add	rsp, 8
	.cfi_def_cfa_offset 56
	mov	eax, -1
	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
	.cfi_endproc
.LFE0:
	.size	kill_tcp_connection_to, .-kill_tcp_connection_to
	.comm	TCP_CONN_SLEEPING,8,8
	.comm	TCP_CONN_CONNECTED,8,8
	.comm	TCP_CONNECTIONS_STATUS_ONLINE,8,8
	.comm	MAX_FRIEND_TCP_CONNECTIONS,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_TCP_connection.c_kill_tcp_connection_to.c"
	.text
	.align	2
	.global	kill_tcp_connection_to
	.syntax unified
	.arm
	.fpu softvfp
	.type	kill_tcp_connection_to, %function
kill_tcp_connection_to:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #12
	mov	r6, r0
	mov	r7, r1
	bl	get_connection
	subs	fp, r0, #0
	beq	.L2
	ldr	r10, .L17
	ldr	r2, [r10]
	cmp	r2, #0
	beq	.L8
	mov	r4, #0
	ldr	r9, .L17+4
	mov	r5, r4
	ldr	r8, .L17+8
	b	.L3
.L5:
	ldr	r2, [r10]
	add	r4, r4, #12
	cmp	r2, r5
	bls	.L8
.L3:
	ldr	r2, [fp, #4]
	add	r5, r5, #1
	ldr	r1, [r2, r4]
	cmp	r1, #0
	beq	.L5
	mov	r0, r6
	sub	r1, r1, #1
	bl	get_tcp_connection
	subs	r2, r0, #0
	beq	.L5
	ldr	ip, [r2]
	ldr	r0, [r9]
	ldr	r1, [fp, #4]
	cmp	ip, r0
	add	r1, r1, r4
	beq	.L16
.L7:
	ldr	r0, [r1, #4]
	ldr	r1, [r8]
	cmp	r0, r1
	bne	.L5
	ldr	r3, .L17+12
	ldr	r1, [r2, #8]
	ldr	ip, [fp]
	ldr	r0, [r3]
	sub	r1, r1, #1
	cmp	ip, r0
	str	r1, [r2, #8]
	ldreq	r1, [r2, #4]
	add	r4, r4, #12
	subeq	r1, r1, #1
	streq	r1, [r2, #4]
	ldr	r2, [r10]
	cmp	r2, r5
	bhi	.L3
.L8:
	mov	r1, r7
	mov	r0, r6
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	wipe_connection
.L16:
	ldr	r1, [r1, #8]
	ldr	r0, [r2, #12]
	str	r2, [sp, #4]
	bl	send_disconnect_request
	ldr	r1, [fp, #4]
	ldr	r2, [sp, #4]
	add	r1, r1, r4
	b	.L7
.L2:
	mvn	r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L18:
	.align	2
.L17:
	.word	MAX_FRIEND_TCP_CONNECTIONS
	.word	TCP_CONN_CONNECTED
	.word	TCP_CONNECTIONS_STATUS_ONLINE
	.word	TCP_CONN_SLEEPING
	.size	kill_tcp_connection_to, .-kill_tcp_connection_to
	.comm	TCP_CONN_SLEEPING,4,4
	.comm	TCP_CONN_CONNECTED,4,4
	.comm	TCP_CONNECTIONS_STATUS_ONLINE,4,4
	.comm	MAX_FRIEND_TCP_CONNECTIONS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
