	.file	"extr_stream_salsa208_ref.c_crypto_stream_salsa208.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	crypto_stream_salsa208
	.type	crypto_stream_salsa208, @function
crypto_stream_salsa208:
.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
	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
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 152
	.cfi_def_cfa_offset 208
	mov	QWORD PTR 8[rsp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 136[rsp], rax
	xor	eax, eax
	test	rsi, rsi
	je	.L2
	mov	r15, rdi
	lea	r14, 32[rsp]
	.p2align 4,,10
	.p2align 3
.L3:
	movzx	esi, BYTE PTR [rcx+rax]
	mov	BYTE PTR [r14+rax], sil
	add	rax, 1
	cmp	rax, 32
	jne	.L3
	xor	eax, eax
	lea	rbx, 16[rsp]
	.p2align 4,,10
	.p2align 3
.L4:
	movzx	ecx, BYTE PTR [rdx+rax]
	mov	BYTE PTR [rbx+rax], cl
	add	rax, 1
	cmp	rax, 8
	jne	.L4
	mov	QWORD PTR 24[rsp], 0
	mov	rax, QWORD PTR 8[rsp]
	cmp	rax, 63
	jbe	.L11
	sub	rax, 64
	lea	r12, 24[rsp]
	lea	r13, 32[rsp]
	and	rax, -64
	lea	rbp, 64[r15+rax]
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rdx, r14
	xor	ecx, ecx
	mov	rsi, rbx
	mov	rdi, r15
	call	crypto_core_salsa208@PLT
	mov	r14, r13
	mov	rdx, r12
	mov	eax, 1
	.p2align 4,,10
	.p2align 3
.L6:
	movzx	ecx, BYTE PTR [rdx]
	add	rdx, 1
	add	eax, ecx
	mov	BYTE PTR -1[rdx], al
	shr	eax, 8
	cmp	r13, rdx
	jne	.L6
	add	r15, 64
	cmp	r15, rbp
	jne	.L7
	and	QWORD PTR 8[rsp], 63
	lea	r12, 64[rsp]
	jne	.L5
.L8:
	mov	esi, 64
	mov	rdi, r12
	call	sodium_memzero@PLT
	mov	esi, 32
	mov	rdi, r14
	call	sodium_memzero@PLT
.L2:
	mov	rax, QWORD PTR 136[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L25
	add	rsp, 152
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	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
.L11:
	.cfi_restore_state
	mov	rbp, r15
.L5:
	lea	r12, 64[rsp]
	mov	rsi, rbx
	xor	ecx, ecx
	mov	rdx, r14
	mov	rdi, r12
	call	crypto_core_salsa208@PLT
	mov	ebx, DWORD PTR 8[rsp]
	xor	eax, eax
	.p2align 4,,10
	.p2align 3
.L9:
	movzx	edx, BYTE PTR [r12+rax]
	mov	BYTE PTR 0[rbp+rax], dl
	add	rax, 1
	cmp	ebx, eax
	ja	.L9
	jmp	.L8
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	crypto_stream_salsa208, .-crypto_stream_salsa208
	.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_stream_salsa208_ref.c_crypto_stream_salsa208.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	crypto_stream_salsa208
	.syntax unified
	.arm
	.fpu softvfp
	.type	crypto_stream_salsa208, %function
crypto_stream_salsa208:
	@ args = 8, pretend = 0, frame = 120
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r8, r2
	mov	r9, r3
	orrs	r3, r8, r9
	ldr	r3, .L26
	sub	sp, sp, #124
	mov	r10, r0
	ldr	r3, [r3]
	str	r3, [sp, #116]
	mov	r3,#0
	ldr	r0, [sp, #160]
	ldr	r2, [sp, #164]
	beq	.L2
	add	r3, sp, #20
	sub	r2, r2, #1
	add	r5, sp, #52
.L3:
	ldrb	r1, [r2, #1]!	@ zero_extendqisi2
	strb	r1, [r3], #1
	cmp	r3, r5
	bne	.L3
	sub	r3, r0, #1
	add	r2, sp, #4
	add	r0, r0, #7
.L4:
	ldrb	r1, [r3, #1]!	@ zero_extendqisi2
	cmp	r3, r0
	strb	r1, [r2], #1
	bne	.L4
	mov	r3, #0
	cmp	r9, #0
	cmpeq	r8, #63
	mov	r6, r8
	mov	r7, r9
	str	r3, [sp, #12]
	str	r3, [sp, #16]
	bls	.L5
	add	fp, r10, r8
	add	r4, sp, #19
.L7:
	mov	r3, #0
	add	r2, sp, #20
	add	r1, sp, #4
	sub	r0, fp, r6
	bl	crypto_core_salsa208
	mov	r3, #1
	add	r2, sp, #11
.L6:
	ldrb	r1, [r2, #1]!	@ zero_extendqisi2
	add	r3, r1, r3
	cmp	r2, r4
	strb	r3, [r2]
	lsr	r3, r3, #8
	bne	.L6
	subs	r6, r6, #64
	sbc	r7, r7, #0
	cmp	r7, #0
	cmpeq	r6, #63
	bhi	.L7
	mov	r7, #0
	subs	r3, r8, #64
	and	r6, r8, #63
	bic	r3, r3, #63
	add	r3, r3, #64
	orrs	r2, r6, r7
	add	r10, r10, r3
	bne	.L5
.L8:
	mov	r1, #64
	mov	r0, r5
	bl	sodium_memzero
	mov	r1, #32
	add	r0, sp, #20
	bl	sodium_memzero
.L2:
	ldr	r3, .L26
	ldr	r2, [r3]
	ldr	r3, [sp, #116]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L25
	mov	r0, #0
	add	sp, sp, #124
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L5:
	add	r1, sp, #4
	add	r2, sp, #20
	mov	r3, #0
	mov	r0, r5
	bl	crypto_core_salsa208
	add	r1, sp, #51
	sub	r2, r10, #1
.L9:
	add	r3, r2, #2
	ldrb	r0, [r1, #1]!	@ zero_extendqisi2
	sub	r3, r3, r10
	cmp	r6, r3
	strb	r0, [r2, #1]!
	bhi	.L9
	b	.L8
.L25:
	bl	__stack_chk_fail
.L27:
	.align	2
.L26:
	.word	.LC0
	.size	crypto_stream_salsa208, .-crypto_stream_salsa208
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
