	.file	"extr_net_crypto.c_write_cryptpacket.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	write_cryptpacket
	.type	write_cryptpacket, @function
write_cryptpacket:
.LFB0:
	.cfi_startproc
	endbr64
	test	rcx, rcx
	je	.L20
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR [rdx]
	cmp	rax, QWORD PTR CRYPTO_RESERVED_PACKETS[rip]
	jl	.L4
	cmp	rax, QWORD PTR PACKET_ID_LOSSY_RANGE_START[rip]
	jge	.L4
	mov	rbp, rdi
	mov	r14d, esi
	mov	r12, rcx
	mov	r15, r8
	call	get_crypto_connection@PLT
	mov	rbx, rax
	test	rax, rax
	je	.L4
	mov	rax, QWORD PTR CRYPTO_CONN_ESTABLISHED[rip]
	cmp	QWORD PTR [rbx], rax
	jne	.L4
	test	r15, r15
	je	.L5
	cmp	QWORD PTR 8[rbx], 0
	je	.L4
	mov	r8, r15
	mov	rcx, r12
	mov	rdx, r13
	mov	esi, r14d
	mov	rdi, rbp
	call	send_lossless_packet@PLT
	cmp	eax, -1
	je	.L1
	sub	QWORD PTR 8[rbx], 1
	sub	DWORD PTR 20[rbx], 1
	add	DWORD PTR 16[rbx], 1
.L1:
	add	rsp, 8
	.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
.L5:
	.cfi_restore_state
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rcx, r12
	mov	rdx, r13
	mov	esi, r14d
	pop	rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 48
	mov	rdi, rbp
	xor	r8d, r8d
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_restore 12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_restore 13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_restore 14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_restore 15
	.cfi_def_cfa_offset 8
	jmp	send_lossless_packet@PLT
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	eax, -1
	jmp	.L1
.L20:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	or	eax, -1
	ret
	.cfi_endproc
.LFE0:
	.size	write_cryptpacket, .-write_cryptpacket
	.comm	PACKET_ID_LOSSY_RANGE_START,8,8
	.comm	CRYPTO_RESERVED_PACKETS,8,8
	.comm	CRYPTO_CONN_ESTABLISHED,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_net_crypto.c_write_cryptpacket.c"
	.text
	.align	2
	.global	write_cryptpacket
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_cryptpacket, %function
write_cryptpacket:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	subs	r5, r3, #0
	sub	sp, sp, #12
	ldr	r8, [sp, #40]
	beq	.L4
	ldr	r3, .L21
	ldr	ip, [r2]
	ldr	r3, [r3]
	mov	r6, r2
	cmp	ip, r3
	blt	.L4
	ldr	r3, .L21+4
	ldr	r3, [r3]
	cmp	ip, r3
	bge	.L4
	mov	r7, r0
	mov	r9, r1
	bl	get_crypto_connection
	subs	r4, r0, #0
	beq	.L4
	ldr	r3, .L21+8
	ldr	r2, [r4]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L4
	cmp	r8, #0
	beq	.L5
	ldr	r3, [r4, #4]
	cmp	r3, #0
	beq	.L4
	mov	r3, r5
	mov	r2, r6
	mov	r1, r9
	mov	r0, r7
	str	r8, [sp]
	bl	send_lossless_packet
	cmn	r0, #1
	beq	.L1
	ldr	r1, [r4, #4]
	ldr	r2, [r4, #12]
	ldr	r3, [r4, #8]
	sub	r1, r1, #1
	sub	r2, r2, #1
	add	r3, r3, #1
	str	r1, [r4, #4]
	str	r2, [r4, #12]
	str	r3, [r4, #8]
.L1:
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L5:
	mov	r3, r5
	mov	r2, r6
	mov	r1, r9
	mov	r0, r7
	str	r8, [sp, #40]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, lr}
	b	send_lossless_packet
.L4:
	mvn	r0, #0
	b	.L1
.L22:
	.align	2
.L21:
	.word	CRYPTO_RESERVED_PACKETS
	.word	PACKET_ID_LOSSY_RANGE_START
	.word	CRYPTO_CONN_ESTABLISHED
	.size	write_cryptpacket, .-write_cryptpacket
	.comm	PACKET_ID_LOSSY_RANGE_START,4,4
	.comm	CRYPTO_RESERVED_PACKETS,4,4
	.comm	CRYPTO_CONN_ESTABLISHED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
