	.file	"extr_sc25519.c_crypto_sign_ed25519_ref_sc25519_window5.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	sc25519_window5
	.type	sc25519_window5, @function
sc25519_window5:
.LFB0:
	.cfi_startproc
	endbr64
	mov	rdx, rdi
	mov	rcx, rdi
	xor	eax, eax
	.p2align 4,,10
	.p2align 3
.L2:
	mov	r8, QWORD PTR [rsi]
	add	rcx, 8
	mov	r8d, DWORD PTR [r8+rax]
	and	r8d, 31
	mov	BYTE PTR -8[rcx], r8b
	mov	r8, QWORD PTR [rsi]
	mov	r8d, DWORD PTR [r8+rax]
	sar	r8d, 5
	mov	r9d, r8d
	and	r9d, 31
	mov	BYTE PTR -7[rcx], r9b
	mov	r9, QWORD PTR [rsi]
	mov	r9d, DWORD PTR 4[r9+rax]
	sal	r9d, 3
	xor	r8d, r9d
	and	r8d, 31
	mov	BYTE PTR -7[rcx], r8b
	mov	r8, QWORD PTR [rsi]
	mov	r8d, DWORD PTR 4[r8+rax]
	sar	r8d, 2
	and	r8d, 31
	mov	BYTE PTR -6[rcx], r8b
	mov	r8, QWORD PTR [rsi]
	mov	r8d, DWORD PTR 4[r8+rax]
	sar	r8d, 7
	mov	r9d, r8d
	and	r9d, 31
	mov	BYTE PTR -5[rcx], r9b
	mov	r9, QWORD PTR [rsi]
	mov	r9d, DWORD PTR 8[r9+rax]
	add	r9d, r9d
	xor	r8d, r9d
	and	r8d, 31
	mov	BYTE PTR -5[rcx], r8b
	mov	r8, QWORD PTR [rsi]
	mov	r8d, DWORD PTR 8[r8+rax]
	sar	r8d, 4
	mov	r9d, r8d
	and	r9d, 31
	mov	BYTE PTR -4[rcx], r9b
	mov	r9, QWORD PTR [rsi]
	mov	r9d, DWORD PTR 12[r9+rax]
	sal	r9d, 4
	xor	r8d, r9d
	and	r8d, 31
	mov	BYTE PTR -4[rcx], r8b
	mov	r8, QWORD PTR [rsi]
	mov	r8d, DWORD PTR 12[r8+rax]
	sar	r8d
	and	r8d, 31
	mov	BYTE PTR -3[rcx], r8b
	mov	r8, QWORD PTR [rsi]
	mov	r8d, DWORD PTR 12[r8+rax]
	sar	r8d, 6
	mov	r9d, r8d
	and	r9d, 31
	mov	BYTE PTR -2[rcx], r9b
	mov	r9, QWORD PTR [rsi]
	mov	r9d, DWORD PTR 16[r9+rax]
	sal	r9d, 2
	xor	r8d, r9d
	and	r8d, 31
	mov	BYTE PTR -2[rcx], r8b
	mov	r8, QWORD PTR [rsi]
	mov	r8d, DWORD PTR 16[r8+rax]
	add	rax, 20
	shr	r8b, 3
	mov	BYTE PTR -1[rcx], r8b
	cmp	rax, 120
	jne	.L2
	mov	rax, QWORD PTR [rsi]
	lea	r8, 50[rdi]
	mov	eax, DWORD PTR 120[rax]
	and	eax, 31
	mov	BYTE PTR 48[rdi], al
	mov	rax, QWORD PTR [rsi]
	mov	eax, DWORD PTR 120[rax]
	sar	eax, 5
	mov	ecx, eax
	and	ecx, 31
	mov	BYTE PTR 49[rdi], cl
	mov	rcx, QWORD PTR [rsi]
	mov	ecx, DWORD PTR 124[rcx]
	sal	ecx, 3
	xor	eax, ecx
	xor	ecx, ecx
	and	eax, 31
	mov	BYTE PTR 49[rdi], al
	mov	rax, QWORD PTR [rsi]
	mov	eax, DWORD PTR 124[rax]
	sar	eax, 2
	and	eax, 31
	mov	BYTE PTR 50[rdi], al
	.p2align 4,,10
	.p2align 3
.L3:
	movzx	eax, BYTE PTR [rdx]
	add	eax, ecx
	mov	ecx, eax
	and	eax, 31
	sar	cl, 5
	add	BYTE PTR 1[rdx], cl
	mov	ecx, eax
	add	rdx, 1
	sar	cl, 4
	mov	esi, ecx
	sal	esi, 5
	sub	eax, esi
	mov	BYTE PTR -1[rdx], al
	cmp	r8, rdx
	jne	.L3
	add	BYTE PTR 50[rdi], cl
	ret
	.cfi_endproc
.LFE0:
	.size	sc25519_window5, .-sc25519_window5
	.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_sc25519.c_crypto_sign_ed25519_ref_sc25519_window5.c"
	.text
	.align	2
	.global	sc25519_window5
	.syntax unified
	.arm
	.fpu softvfp
	.type	sc25519_window5, %function
sc25519_window5:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r2, r0
	mov	r3, r0
	mov	lr, #4
.L2:
	ldr	ip, [r1]
	sub	r4, lr, #4
	ldr	ip, [ip, r4]
	add	r6, lr, #4
	and	ip, ip, #31
	strb	ip, [r3]
	ldr	ip, [r1]
	add	r5, lr, #8
	ldr	ip, [ip, r4]
	add	r4, lr, #12
	asr	ip, ip, #5
	and	r7, ip, #31
	strb	r7, [r3, #1]
	ldr	r7, [r1]
	lsl	ip, ip, #24
	ldr	r7, [r7, lr]
	asr	ip, ip, #24
	eor	ip, ip, r7, lsl #3
	and	ip, ip, #31
	strb	ip, [r3, #1]
	ldr	ip, [r1]
	add	r3, r3, #8
	ldr	ip, [ip, lr]
	asr	ip, ip, #2
	and	ip, ip, #31
	strb	ip, [r3, #-6]
	ldr	ip, [r1]
	ldr	ip, [ip, lr]
	add	lr, lr, #20
	asr	ip, ip, #7
	and	r7, ip, #31
	strb	r7, [r3, #-5]
	ldr	r7, [r1]
	lsl	ip, ip, #24
	ldr	r7, [r7, r6]
	asr	ip, ip, #24
	eor	ip, ip, r7, lsl #1
	and	ip, ip, #31
	strb	ip, [r3, #-5]
	ldr	ip, [r1]
	cmp	lr, #124
	ldr	ip, [ip, r6]
	asr	ip, ip, #4
	and	r6, ip, #31
	strb	r6, [r3, #-4]
	ldr	r6, [r1]
	lsl	ip, ip, #24
	ldr	r6, [r6, r5]
	asr	ip, ip, #24
	eor	ip, ip, r6, lsl #4
	and	ip, ip, #31
	strb	ip, [r3, #-4]
	ldr	ip, [r1]
	ldr	ip, [ip, r5]
	asr	ip, ip, #1
	and	ip, ip, #31
	strb	ip, [r3, #-3]
	ldr	ip, [r1]
	ldr	ip, [ip, r5]
	asr	ip, ip, #6
	and	r5, ip, #31
	strb	r5, [r3, #-2]
	ldr	r5, [r1]
	lsl	ip, ip, #24
	ldr	r5, [r5, r4]
	asr	ip, ip, #24
	eor	ip, ip, r5, lsl #2
	and	ip, ip, #31
	strb	ip, [r3, #-2]
	ldr	ip, [r1]
	ldr	ip, [ip, r4]
	asr	ip, ip, #3
	and	ip, ip, #31
	strb	ip, [r3, #-1]
	bne	.L2
	mov	r5, r0
	mov	lr, #0
	ldr	r3, [r1]
	ldr	r3, [r3, #120]
	and	r3, r3, #31
	strb	r3, [r0, #48]
	ldr	r3, [r1]
	ldr	r3, [r3, #120]
	asr	r3, r3, #5
	and	ip, r3, #31
	strb	ip, [r0, #49]
	ldr	ip, [r1]
	lsl	r3, r3, #24
	ldr	ip, [ip, #124]
	asr	r3, r3, #24
	eor	r3, r3, ip, lsl #3
	and	r3, r3, #31
	strb	r3, [r0, #49]
	ldr	r3, [r1]
	ldr	r3, [r3, #124]
	asr	r3, r3, #2
	and	r3, r3, #31
	strb	r3, [r5, #50]!
.L3:
	ldrsb	r3, [r2]
	ldrb	ip, [r2, #1]!	@ zero_extendqisi2
	add	r3, lr, r3
	lsl	r3, r3, #24
	and	r4, r3, #520093696
	lsr	lr, r4, #28
	lsl	r1, lr, #5
	add	r3, ip, r3, asr #29
	rsb	r1, r1, r4, lsr #24
	cmp	r5, r2
	strb	r3, [r2]
	strb	r1, [r2, #-1]
	bne	.L3
	ldrb	r3, [r0, #50]	@ zero_extendqisi2
	add	r3, lr, r3
	strb	r3, [r0, #50]
	pop	{r4, r5, r6, r7, pc}
	.size	sc25519_window5, .-sc25519_window5
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
