	.file	"extr_srtp.c_do_ctr_crypt.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	do_ctr_crypt, @function
do_ctr_crypt:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	mov	r14, rdx
	push	r13
	.cfi_offset 13, -40
	mov	r13, rsi
	mov	esi, 16
	push	r12
	.cfi_offset 12, -48
	mov	r12d, edi
	mov	rdi, rcx
	push	rbx
	sub	rsp, 40
	.cfi_offset 3, -56
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	call	div@PLT
	mov	rsi, r13
	mov	edi, r12d
	mov	rbx, rdx
	mov	r15d, edx
	mov	edx, 16
	mov	QWORD PTR -72[rbp], rax
	call	gcry_cipher_setctr@PLT
	test	rax, rax
	jne	.L11
	mov	rdx, QWORD PTR -72[rbp]
	xor	r8d, r8d
	xor	ecx, ecx
	mov	rsi, r14
	mov	edi, r12d
	sal	rdx, 4
	call	gcry_cipher_encrypt@PLT
	test	rax, rax
	jne	.L11
	test	ebx, ebx
	jne	.L13
.L3:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L14
	lea	rsp, -40[rbp]
	mov	eax, r15d
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	r15, rsp
	cmp	rsp, r15
	je	.L6
.L15:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, r15
	jne	.L15
.L6:
	sub	rsp, 64
	or	QWORD PTR 56[rsp], 0
	mov	r13, QWORD PTR -72[rbp]
	sal	r13, 6
	mov	r9, rsp
	add	r14, r13
	mov	edx, ebx
	mov	rdi, r9
	mov	rsi, r14
	mov	QWORD PTR -72[rbp], r9
	call	memcpy@PLT
	mov	r9, QWORD PTR -72[rbp]
	movsx	rax, ebx
	xor	esi, esi
	mov	edx, 16
	sub	edx, ebx
	lea	rdi, [r9+rax*4]
	call	memset@PLT
	mov	r9, QWORD PTR -72[rbp]
	mov	rcx, r14
	mov	edi, r12d
	mov	r8d, 16
	mov	edx, 16
	mov	rsi, r9
	call	gcry_cipher_encrypt@PLT
	mov	r9, QWORD PTR -72[rbp]
	test	rax, rax
	jne	.L16
	mov	edx, ebx
	mov	rsi, r9
	mov	rdi, r14
	call	memcpy@PLT
	mov	rsp, r15
	xor	r15d, r15d
	jmp	.L3
.L16:
	mov	rsp, r15
	.p2align 4,,10
	.p2align 3
.L11:
	mov	r15d, -1
	jmp	.L3
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	do_ctr_crypt, .-do_ctr_crypt
	.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_srtp.c_do_ctr_crypt.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	do_ctr_crypt, %function
do_ctr_crypt:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #28
	mov	r5, r1
	mov	r4, r0
	mov	r1, r3
	ldr	r3, .L15
	sub	r0, fp, #48
	mov	r6, r2
	mov	r2, #16
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	bl	div
	mov	r1, r5
	mov	r0, r4
	mov	r2, #16
	ldr	r7, [fp, #-48]
	ldr	r5, [fp, #-44]
	bl	gcry_cipher_setctr
	subs	r3, r0, #0
	bne	.L4
	mov	r1, r6
	mov	r0, r4
	str	r3, [sp]
	lsl	r2, r7, #4
	bl	gcry_cipher_encrypt
	subs	r8, r0, #0
	bne	.L4
	cmp	r5, #0
	bne	.L12
.L1:
	ldr	r3, .L15
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L13
	mov	r0, r5
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L12:
	mov	r9, sp
	sub	sp, sp, #64
	add	r10, sp, #8
	add	r6, r6, r7, lsl #6
	mov	r1, r6
	mov	r2, r5
	mov	r0, r10
	bl	memcpy
	mov	r1, r8
	rsb	r2, r5, #16
	add	r0, r10, r5, lsl #2
	bl	memset
	mov	r2, #16
	mov	r0, r4
	mov	r1, r10
	mov	r3, r6
	str	r2, [sp]
	bl	gcry_cipher_encrypt
	subs	r4, r0, #0
	bne	.L14
	mov	r2, r5
	mov	r1, r10
	mov	r0, r6
	bl	memcpy
	mov	r5, r4
	mov	sp, r9
	b	.L1
.L4:
	mvn	r5, #0
	b	.L1
.L14:
	mvn	r5, #0
	mov	sp, r9
	b	.L1
.L13:
	bl	__stack_chk_fail
.L16:
	.align	2
.L15:
	.word	.LC0
	.size	do_ctr_crypt, .-do_ctr_crypt
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
