	.file	"extr_mpih-div.c_mpihelp_divmod_1.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	mpihelp_divmod_1
	.type	mpihelp_divmod_1, @function
mpihelp_divmod_1:
.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
	xor	r12d, r12d
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	test	edx, edx
	je	.L1
	mov	eax, DWORD PTR UMUL_TIME[rip]
	mov	ebx, edx
	mov	r14, rdi
	mov	r13, rsi
	mov	ebp, ecx
	lea	edx, 6[rax+rax]
	mov	eax, DWORD PTR UDIV_TIME[rip]
	cmp	edx, eax
	jge	.L3
	mov	esi, eax
	sub	esi, edx
	mov	edx, esi
	imul	edx, ebx
	cmp	eax, edx
	jl	.L38
.L3:
	cmp	QWORD PTR UDIV_NEEDS_NORMALIZATION[rip], 0
	jne	.L39
.L12:
	lea	eax, -1[rbx]
	movsx	rdx, eax
	mov	r12d, DWORD PTR 0[r13+rdx*4]
	cmp	ebp, r12d
	jle	.L21
	mov	DWORD PTR [r14+rdx*4], 0
	lea	eax, -2[rbx]
.L15:
	movsx	rbx, eax
	test	eax, eax
	js	.L1
	.p2align 4,,10
	.p2align 3
.L16:
	mov	ecx, DWORD PTR 0[r13+rbx*4]
	mov	edi, DWORD PTR [r14+rbx*4]
	mov	r8d, ebp
	mov	edx, r12d
	mov	esi, r12d
	sub	rbx, 1
	call	udiv_qrnnd@PLT
	test	ebx, ebx
	jns	.L16
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
.L39:
	.cfi_restore_state
	xor	r9d, r9d
	mov	esi, ebp
	mov	edi, r9d
	mov	DWORD PTR 12[rsp], r9d
	call	count_leading_zeros@PLT
	mov	r9d, DWORD PTR 12[rsp]
	test	r9d, r9d
	je	.L12
	xor	r9d, r9d
	mov	esi, DWORD PTR BITS_PER_MPI_LIMB[rip]
	movsx	rax, ebx
	mov	ecx, r9d
	mov	eax, DWORD PTR -4[r13+rax*4]
	sal	ebp, cl
	mov	ecx, esi
	sub	ecx, r9d
	mov	r12d, eax
	sar	r12d, cl
	sub	ebx, 2
	js	.L20
	movsx	rbx, ebx
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L40:
	mov	esi, DWORD PTR BITS_PER_MPI_LIMB[rip]
	mov	eax, r15d
.L14:
	mov	r15d, DWORD PTR 0[r13+rbx*4]
	mov	ecx, esi
	mov	edi, DWORD PTR 4[r14+rbx*4]
	mov	r8d, ebp
	mov	esi, r12d
	sub	rbx, 1
	mov	edx, r15d
	sar	edx, cl
	mov	ecx, edx
	mov	edx, r12d
	or	ecx, eax
	call	udiv_qrnnd@PLT
	test	ebx, ebx
	jns	.L40
.L13:
	xor	r9d, r9d
	mov	edi, DWORD PTR [r14]
	mov	edx, r12d
	mov	esi, r12d
	mov	ecx, r9d
	mov	r8d, ebp
	mov	DWORD PTR 12[rsp], r9d
	sal	r15d, cl
	mov	ecx, r15d
	call	udiv_qrnnd@PLT
	mov	r9d, DWORD PTR 12[rsp]
	mov	ecx, r9d
	sar	r12d, cl
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L21:
	xor	r12d, r12d
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L38:
	xor	edi, edi
	mov	esi, ecx
	call	count_leading_zeros@PLT
	mov	eax, ebp
	add	eax, eax
	jne	.L41
.L8:
	lea	eax, -1[rbx]
	movsx	rcx, eax
	mov	edx, DWORD PTR 0[r13+rcx*4]
	cmp	ebp, edx
	jg	.L42
.L9:
	movsx	rbx, eax
	test	eax, eax
	js	.L1
	.p2align 4,,10
	.p2align 3
.L10:
	mov	ecx, DWORD PTR 0[r13+rbx*4]
	mov	edi, DWORD PTR [r14+rbx*4]
	mov	r8d, ebp
	mov	edx, r12d
	mov	r9d, -1
	mov	esi, r12d
	sub	rbx, 1
	call	UDIV_QRNND_PREINV@PLT
	test	ebx, ebx
	jns	.L10
	jmp	.L1
.L42:
	mov	DWORD PTR [r14+rcx*4], 0
	lea	eax, -2[rbx]
	mov	r12d, edx
	jmp	.L9
.L41:
	mov	edx, ebp
	mov	r8d, ebp
	xor	ecx, ecx
	xor	esi, esi
	neg	edx
	xor	edi, edi
	call	udiv_qrnnd@PLT
	jmp	.L8
.L20:
	mov	r15d, eax
	jmp	.L13
	.cfi_endproc
.LFE0:
	.size	mpihelp_divmod_1, .-mpihelp_divmod_1
	.comm	UMUL_TIME,4,4
	.comm	UDIV_TIME,4,4
	.comm	UDIV_NEEDS_NORMALIZATION,8,8
	.comm	BITS_PER_MPI_LIMB,4,4
	.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_mpih-div.c_mpihelp_divmod_1.c"
	.text
	.align	2
	.global	mpihelp_divmod_1
	.syntax unified
	.arm
	.fpu softvfp
	.type	mpihelp_divmod_1, %function
mpihelp_divmod_1:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	subs	r5, r2, #0
	moveq	r6, r5
	sub	sp, sp, #12
	beq	.L1
	mov	r7, r3
	ldr	r3, .L47
	ldr	r2, .L47+4
	ldr	r3, [r3]
	ldr	r2, [r2]
	add	r3, r3, #3
	cmp	r2, r3, lsl #1
	mov	r9, r0
	mov	r8, r1
	lsl	r3, r3, #1
	ble	.L3
	sub	r3, r2, r3
	mul	r3, r5, r3
	cmp	r2, r3
	blt	.L40
.L3:
	ldr	r3, .L47+8
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L41
.L12:
	sub	r3, r5, #1
	ldr	r6, [r8, r3, lsl #2]
	lsl	r4, r3, #2
	cmp	r7, r6
	movle	r6, #0
	movgt	r2, #0
	subgt	r3, r5, #2
	strgt	r2, [r9, r4]
	subgt	r4, r4, #4
.L15:
	cmp	r3, #0
	addge	r4, r4, #4
	addge	r9, r9, r4
	addge	r4, r8, r4
	blt	.L1
.L16:
	ldr	r3, [r4, #-4]!
	str	r7, [sp]
	mov	r2, r6
	mov	r1, r6
	ldr	r0, [r9, #-4]!
	bl	udiv_qrnnd
	cmp	r4, r8
	bne	.L16
.L1:
	mov	r0, r6
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L41:
	mov	r6, #0
	mov	r1, r7
	mov	r0, r6
	bl	count_leading_zeros
	cmp	r6, r6
	beq	.L12
	ldr	r6, .L47+12
	sub	r3, r5, #-1073741823
	ldr	r2, [r6]
	ldr	r3, [r8, r3, lsl #2]
	cmp	r5, #1
	asr	fp, r3, r2
	ble	.L20
	sub	r4, r5, #1
	add	r4, r8, r4, lsl #2
	add	r5, r9, r5, lsl #2
	b	.L14
.L42:
	mov	r3, r10
	ldr	r2, [r6]
.L14:
	ldr	r10, [r4, #-4]!
	str	r7, [sp]
	orr	r3, r3, r10, asr r2
	mov	r1, fp
	mov	r2, fp
	ldr	r0, [r5, #-4]!
	bl	udiv_qrnnd
	cmp	r4, r8
	bne	.L42
.L13:
	mov	r6, #0
	str	r7, [sp]
	lsl	r3, r10, r6
	mov	r2, fp
	mov	r1, fp
	ldr	r0, [r9]
	asr	r6, fp, r6
	bl	udiv_qrnnd
	mov	r0, r6
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L40:
	mov	r6, #0
	mov	r1, r7
	mov	r0, r6
	bl	count_leading_zeros
	cmp	r6, r6
	beq	.L4
	lsls	r3, r7, #1
	bne	.L43
.L5:
	ldr	r6, .L47+12
	sub	r3, r5, #-1073741823
	ldr	r1, [r6]
	ldr	r3, [r8, r3, lsl #2]
	cmp	r5, #1
	asr	fp, r3, r1
	ble	.L19
	sub	r4, r5, #1
	add	r4, r8, r4, lsl #2
	add	r5, r9, r5, lsl #2
	b	.L7
.L44:
	mov	r3, r10
	ldr	r1, [r6]
.L7:
	mvn	r2, #0
	ldr	r10, [r4, #-4]!
	str	r2, [sp, #4]
	str	r7, [sp]
	orr	r3, r3, r10, asr r1
	mov	r2, fp
	mov	r1, fp
	ldr	r0, [r5, #-4]!
	bl	UDIV_QRNND_PREINV
	cmp	r8, r4
	bne	.L44
.L6:
	mov	r6, #0
	mvn	r1, #0
	str	r7, [sp]
	ldr	r0, [r9]
	lsl	r3, r10, r6
	str	r1, [sp, #4]
	mov	r2, fp
	mov	r1, fp
	asr	r6, fp, r6
	bl	UDIV_QRNND_PREINV
	b	.L1
.L4:
	lsls	r3, r7, #1
	bne	.L45
.L8:
	sub	r2, r5, #1
	ldr	r1, [r8, r2, lsl #2]
	lsl	r3, r2, #2
	cmp	r7, r1
	bgt	.L46
.L9:
	cmp	r2, #0
	addge	r3, r3, #4
	mvnge	r10, #0
	addge	r9, r9, r3
	addge	r4, r8, r3
	blt	.L1
.L10:
	ldr	r3, [r4, #-4]!
	stm	sp, {r7, r10}
	mov	r2, r6
	mov	r1, r6
	ldr	r0, [r9, #-4]!
	bl	UDIV_QRNND_PREINV
	cmp	r8, r4
	bne	.L10
	b	.L1
.L46:
	mov	r0, #0
	mov	r6, r1
	str	r0, [r9, r3]
	sub	r2, r5, #2
	sub	r3, r3, #4
	b	.L9
.L43:
	mov	r3, r6
	mov	r1, r6
	mov	r0, r6
	str	r7, [sp]
	rsb	r2, r7, #0
	bl	udiv_qrnnd
	b	.L5
.L45:
	mov	r6, #0
	str	r7, [sp]
	mov	r3, r6
	mov	r1, r6
	mov	r0, r6
	rsb	r2, r7, #0
	bl	udiv_qrnnd
	b	.L8
.L19:
	mov	r10, r3
	b	.L6
.L20:
	mov	r10, r3
	b	.L13
.L48:
	.align	2
.L47:
	.word	UMUL_TIME
	.word	UDIV_TIME
	.word	UDIV_NEEDS_NORMALIZATION
	.word	BITS_PER_MPI_LIMB
	.size	mpihelp_divmod_1, .-mpihelp_divmod_1
	.comm	UMUL_TIME,4,4
	.comm	UDIV_TIME,4,4
	.comm	UDIV_NEEDS_NORMALIZATION,4,4
	.comm	BITS_PER_MPI_LIMB,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
