	.file	"extr_i31_montmul.c_br_i31_montymul.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	br_i31_montymul
	.type	br_i31_montymul, @function
br_i31_montymul:
.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
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	sub	rsp, 104
	.cfi_def_cfa_offset 160
	mov	esi, DWORD PTR [rcx]
	mov	QWORD PTR 32[rsp], rdi
	lea	eax, 31[rsi]
	mov	QWORD PTR 40[rsp], rdx
	sar	eax, 5
	mov	QWORD PTR 48[rsp], rcx
	movsx	r14, eax
	mov	DWORD PTR 68[rsp], r8d
	mov	r15, r14
	mov	QWORD PTR [rsp], r14
	and	r15, -4
	mov	QWORD PTR 56[rsp], r15
	call	br_i31_zero@PLT
	test	r14, r14
	je	.L8
	lea	rax, 0[0+r14*4]
	mov	QWORD PTR 24[rsp], rbx
	lea	rdx, 0[rbp+rax]
	add	rax, rbx
	mov	DWORD PTR 64[rsp], 0
	mov	QWORD PTR 80[rsp], rax
	lea	rax, -1[r15]
	mov	QWORD PTR 88[rsp], rax
	lea	rax, 0[rbp+r15*4]
	mov	QWORD PTR 72[rsp], rdx
	mov	QWORD PTR 16[rsp], rax
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rax, QWORD PTR 24[rsp]
	mov	r15, QWORD PTR 40[rsp]
	mov	r14, QWORD PTR 32[rsp]
	mov	r13d, DWORD PTR 4[rax]
	mov	esi, DWORD PTR 4[r15]
	mov	ebx, DWORD PTR 4[r14]
	mov	edi, r13d
	call	MUL31_lo@PLT
	mov	esi, DWORD PTR 68[rsp]
	lea	edi, [rbx+rax]
	call	MUL31_lo@PLT
	cmp	QWORD PTR 56[rsp], 0
	mov	r12d, eax
	je	.L9
	mov	rax, QWORD PTR 48[rsp]
	lea	rcx, 4[r15]
	mov	DWORD PTR 8[rsp], r12d
	xor	ebx, ebx
	mov	r15, rcx
	mov	r12, r14
	lea	rbp, 4[rax]
	.p2align 4,,10
	.p2align 3
.L4:
	mov	esi, DWORD PTR [r15]
	mov	edi, r13d
	mov	r14d, DWORD PTR 4[r12]
	add	r15, 16
	add	r12, 16
	add	rbp, 16
	call	MUL31@PLT
	mov	esi, DWORD PTR -16[rbp]
	mov	edi, DWORD PTR 8[rsp]
	add	r14d, eax
	call	MUL31@PLT
	mov	edi, r13d
	add	r14d, eax
	add	ebx, r14d
	mov	r14d, ebx
	and	ebx, 2147483647
	mov	DWORD PTR -16[r12], ebx
	mov	esi, DWORD PTR -12[r15]
	sar	r14d, 31
	mov	ebx, DWORD PTR -8[r12]
	call	MUL31@PLT
	mov	esi, DWORD PTR -12[rbp]
	mov	edi, DWORD PTR 8[rsp]
	add	ebx, eax
	call	MUL31@PLT
	mov	edi, r13d
	add	ebx, eax
	add	ebx, r14d
	mov	r14d, ebx
	and	ebx, 2147483647
	mov	DWORD PTR -12[r12], ebx
	mov	esi, DWORD PTR -8[r15]
	sar	r14d, 31
	mov	ebx, DWORD PTR -4[r12]
	call	MUL31@PLT
	mov	esi, DWORD PTR -8[rbp]
	mov	edi, DWORD PTR 8[rsp]
	add	ebx, eax
	call	MUL31@PLT
	mov	edi, r13d
	add	ebx, eax
	add	ebx, r14d
	mov	r14d, ebx
	and	ebx, 2147483647
	mov	DWORD PTR -8[r12], ebx
	mov	esi, DWORD PTR -4[r15]
	sar	r14d, 31
	mov	ebx, DWORD PTR [r12]
	call	MUL31@PLT
	mov	esi, DWORD PTR -4[rbp]
	mov	edi, DWORD PTR 8[rsp]
	add	ebx, eax
	call	MUL31@PLT
	add	ebx, eax
	add	r14d, ebx
	mov	ebx, r14d
	and	r14d, 2147483647
	mov	DWORD PTR -4[r12], r14d
	sar	ebx, 31
	cmp	r12, QWORD PTR 16[rsp]
	jne	.L4
	mov	r15, QWORD PTR 88[rsp]
	mov	r12d, DWORD PTR 8[rsp]
	and	r15, -4
	add	r15, 4
.L3:
	cmp	QWORD PTR [rsp], r15
	jbe	.L5
	mov	DWORD PTR 8[rsp], r13d
	mov	r14, QWORD PTR 40[rsp]
	mov	DWORD PTR 12[rsp], r12d
	mov	r13, QWORD PTR 32[rsp]
	mov	r12, r15
	mov	r15, QWORD PTR 48[rsp]
	.p2align 4,,10
	.p2align 3
.L6:
	add	r12, 1
	mov	edi, DWORD PTR 8[rsp]
	mov	esi, DWORD PTR [r14+r12*4]
	mov	ebp, DWORD PTR 0[r13+r12*4]
	call	MUL31@PLT
	mov	esi, DWORD PTR [r15+r12*4]
	mov	edi, DWORD PTR 12[rsp]
	add	ebp, eax
	call	MUL31@PLT
	add	ebp, eax
	add	ebp, ebx
	mov	ebx, ebp
	and	ebp, 2147483647
	mov	DWORD PTR -4[r13+r12*4], ebp
	sar	ebx, 31
	cmp	r12, QWORD PTR [rsp]
	jne	.L6
.L5:
	add	ebx, DWORD PTR 64[rsp]
	mov	rdx, QWORD PTR 72[rsp]
	mov	eax, ebx
	sar	ebx, 31
	add	QWORD PTR 24[rsp], 4
	and	eax, 2147483647
	mov	DWORD PTR 64[rsp], ebx
	mov	DWORD PTR [rdx], eax
	mov	rax, QWORD PTR 24[rsp]
	cmp	rax, QWORD PTR 80[rsp]
	jne	.L7
.L2:
	mov	r15, QWORD PTR 48[rsp]
	mov	r14, QWORD PTR 32[rsp]
	xor	esi, esi
	mov	edi, DWORD PTR 64[rsp]
	mov	eax, DWORD PTR [r15]
	mov	DWORD PTR [r14], eax
	call	NEQ@PLT
	mov	rsi, r15
	xor	edx, edx
	mov	rdi, r14
	mov	ebx, eax
	call	br_i31_sub@PLT
	mov	edi, eax
	call	NOT@PLT
	add	rsp, 104
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	edx, ebx
	mov	rsi, r15
	pop	rbx
	.cfi_def_cfa_offset 48
	mov	rdi, r14
	pop	rbp
	.cfi_def_cfa_offset 40
	or	edx, eax
	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	br_i31_sub@PLT
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	xor	r15d, r15d
	xor	ebx, ebx
	jmp	.L3
.L8:
	mov	DWORD PTR 64[rsp], 0
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	br_i31_montymul, .-br_i31_montymul
	.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_i31_montmul.c_br_i31_montymul.c"
	.text
	.align	2
	.global	br_i31_montymul
	.syntax unified
	.arm
	.fpu softvfp
	.type	br_i31_montymul, %function
br_i31_montymul:
	@ args = 4, pretend = 0, frame = 48
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #52
	str	r3, [sp, #16]
	ldr	r3, [r3]
	mov	r4, r1
	add	r1, r3, #31
	asr	r5, r1, #5
	mov	r1, r3
	ldr	r3, [sp, #88]
	str	r2, [sp, #12]
	mov	r6, r0
	str	r5, [sp, #28]
	str	r0, [sp, #8]
	str	r3, [sp, #32]
	bl	br_i31_zero
	bic	r2, r5, #3
	cmp	r5, #0
	str	r2, [sp, #24]
	beq	.L8
	mov	r0, #0
	add	r3, r6, r5, lsl #2
	str	r3, [sp, #20]
	add	r3, r6, r2, lsl #2
	add	r1, r4, r5, lsl #2
	str	r3, [sp, #40]
	sub	r3, r2, #4
	str	r4, [sp]
	str	r0, [sp, #4]
	str	r1, [sp, #36]
	str	r3, [sp, #44]
.L7:
	ldr	r3, [sp]
	ldr	r8, [sp, #12]
	ldr	r6, [r3, #4]!
	ldr	r10, [sp, #8]
	ldr	r1, [r8, #4]
	mov	r0, r6
	str	r3, [sp]
	ldr	r4, [r10, #4]
	bl	MUL31_lo
	ldr	r1, [sp, #32]
	add	r0, r4, r0
	bl	MUL31_lo
	ldr	r3, [sp, #24]
	mov	r5, r0
	cmp	r3, #0
	beq	.L9
	mov	r4, #0
	ldr	r7, [sp, #16]
	ldr	r9, [sp, #40]
.L4:
	ldr	r1, [r8, #4]
	mov	r0, r6
	ldr	fp, [r10, #4]
	bl	MUL31
	mov	r3, r0
	ldr	r1, [r7, #4]
	mov	r0, r5
	add	fp, fp, r3
	bl	MUL31
	add	r0, fp, r0
	add	r4, r0, r4
	bic	r3, r4, #-2147483648
	str	r3, [r10]
	ldr	r1, [r8, #8]
	mov	r0, r6
	ldr	fp, [r10, #8]
	bl	MUL31
	mov	r3, r0
	ldr	r1, [r7, #8]
	mov	r0, r5
	add	fp, fp, r3
	bl	MUL31
	asr	r4, r4, #31
	add	r3, fp, r0
	add	r3, r3, r4
	bic	r2, r3, #-2147483648
	str	r2, [r10, #4]
	ldr	r1, [r8, #12]
	mov	r0, r6
	ldr	fp, [r10, #12]
	asr	r4, r3, #31
	bl	MUL31
	mov	r3, r0
	ldr	r1, [r7, #12]
	mov	r0, r5
	add	fp, fp, r3
	bl	MUL31
	add	r3, fp, r0
	add	r3, r3, r4
	bic	r2, r3, #-2147483648
	str	r2, [r10, #8]
	ldr	r1, [r8, #16]!
	mov	r0, r6
	ldr	r4, [r10, #16]
	asr	fp, r3, #31
	bl	MUL31
	mov	r3, r0
	ldr	r1, [r7, #16]!
	mov	r0, r5
	add	r4, r4, r3
	bl	MUL31
	add	r0, r4, r0
	add	r0, r0, fp
	bic	r3, r0, #-2147483648
	str	r3, [r10, #12]
	add	r10, r10, #16
	cmp	r10, r9
	asr	r4, r0, #31
	bne	.L4
	ldr	r3, [sp, #44]
	add	r8, r3, #4
.L3:
	ldr	r3, [sp, #28]
	cmp	r3, r8
	bls	.L5
	ldr	r3, [sp, #8]
	ldr	r9, [sp, #20]
	add	r10, r3, r8, lsl #2
	ldr	r3, [sp, #12]
	add	fp, r3, r8, lsl #2
	ldr	r3, [sp, #16]
	add	r8, r3, r8, lsl #2
.L6:
	ldr	r1, [fp, #4]!
	mov	r0, r6
	ldr	r7, [r10, #4]
	bl	MUL31
	mov	r3, r0
	ldr	r1, [r8, #4]!
	mov	r0, r5
	add	r7, r7, r3
	bl	MUL31
	add	r0, r7, r0
	add	r0, r0, r4
	bic	r3, r0, #-2147483648
	str	r3, [r10], #4
	cmp	r9, r10
	asr	r4, r0, #31
	bne	.L6
.L5:
	ldr	r3, [sp, #4]
	ldr	r2, [sp, #36]
	add	r4, r3, r4
	ldr	r3, [sp]
	cmp	r3, r2
	ldr	r2, [sp, #20]
	bic	r3, r4, #-2147483648
	str	r3, [r2]
	asr	r3, r4, #31
	str	r3, [sp, #4]
	bne	.L7
.L2:
	ldmib	sp, {r0, r6}
	ldr	r5, [sp, #16]
	mov	r1, #0
	ldr	r3, [r5]
	str	r3, [r6]
	bl	NEQ
	mov	r1, r5
	mov	r4, r0
	mov	r2, #0
	mov	r0, r6
	bl	br_i31_sub
	bl	NOT
	mov	r1, r5
	orr	r2, r4, r0
	mov	r0, r6
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	br_i31_sub
.L9:
	ldr	r4, [sp, #24]
	mov	r8, r4
	b	.L3
.L8:
	ldr	r3, [sp, #28]
	str	r3, [sp, #4]
	b	.L2
	.size	br_i31_montymul, .-br_i31_montymul
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
