	.file	"extr_bn_word.c_BN_mod_word.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	BN_mod_word
	.type	BN_mod_word, @function
BN_mod_word:
.LFB0:
	.cfi_startproc
	endbr64
	test	rsi, rsi
	je	.L15
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	eax, 1
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rsi
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	mov	rcx, QWORD PTR BN_BITS4[rip]
	sal	rax, cl
	cmp	rax, rsi
	jge	.L3
	call	BN_dup@PLT
	mov	r12, rax
	test	rax, rax
	je	.L2
	mov	rsi, rbp
	mov	rdi, rax
	call	BN_div_word@PLT
	mov	rdi, r12
	mov	QWORD PTR 8[rsp], rax
	call	BN_free@PLT
	mov	rdx, QWORD PTR 8[rsp]
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rax, rdx
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	call	bn_check_top@PLT
	mov	rsi, QWORD PTR BN_MASK2[rip]
	mov	edi, DWORD PTR [r12]
	and	rsi, rbp
	sub	edi, 1
	js	.L6
	mov	ecx, DWORD PTR BN_BITS4[rip]
	mov	r9, QWORD PTR 8[r12]
	movsx	rdi, edi
	xor	edx, edx
	mov	r8, QWORD PTR BN_MASK2l[rip]
	.p2align 4,,10
	.p2align 3
.L5:
	mov	r10, QWORD PTR [r9+rdi*8]
	sal	rdx, cl
	sub	rdi, 1
	mov	rax, r10
	and	r10, r8
	sar	rax, cl
	and	rax, r8
	or	rax, rdx
	cqo
	idiv	rsi
	mov	rax, rdx
	sal	rax, cl
	or	rax, r10
	cqo
	idiv	rsi
	test	edi, edi
	jns	.L5
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rax, rdx
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	xor	edx, edx
	jmp	.L1
.L2:
	mov	rdx, -1
	jmp	.L1
.L15:
	.cfi_def_cfa_offset 8
	.cfi_restore 6
	.cfi_restore 12
	or	rdx, -1
	mov	rax, rdx
	ret
	.cfi_endproc
.LFE0:
	.size	BN_mod_word, .-BN_mod_word
	.comm	BN_MASK2l,8,8
	.comm	BN_MASK2,8,8
	.comm	BN_BITS4,8,8
	.comm	BN_BITS2,8,8
	.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_bn_word.c_BN_mod_word.c"
	.text
	.global	__aeabi_idivmod
	.align	2
	.global	BN_mod_word
	.syntax unified
	.arm
	.fpu softvfp
	.type	BN_mod_word, %function
BN_mod_word:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	subs	r6, r1, #0
	beq	.L2
	mov	r2, #1
	ldr	r7, .L16
	ldr	r3, [r7]
	cmp	r6, r2, lsl r3
	ble	.L3
	bl	BN_dup
	subs	r4, r0, #0
	beq	.L2
	mov	r1, r6
	bl	BN_div_word
	mov	r5, r0
	mov	r0, r4
	bl	BN_free
.L1:
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L3:
	mov	r4, r0
	bl	bn_check_top
	ldr	r3, .L16+4
	ldr	r10, [r4]
	ldr	r1, [r3]
	cmp	r10, #0
	mov	r5, #0
	and	r6, r6, r1
	ble	.L1
	ldr	r3, .L16+8
	ldr	r9, [r4, #4]
	ldr	r7, [r7]
	ldr	r8, [r3]
	add	r10, r9, r10, lsl #2
.L5:
	ldr	r4, [r10, #-4]!
	mov	r1, r6
	and	r0, r8, r4, asr r7
	orr	r0, r0, r5, lsl r7
	bl	__aeabi_idivmod
	and	r4, r4, r8
	orr	r0, r4, r1, lsl r7
	mov	r1, r6
	bl	__aeabi_idivmod
	cmp	r9, r10
	mov	r5, r1
	bne	.L5
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L2:
	mvn	r5, #0
	b	.L1
.L17:
	.align	2
.L16:
	.word	BN_BITS4
	.word	BN_MASK2
	.word	BN_MASK2l
	.size	BN_mod_word, .-BN_mod_word
	.comm	BN_MASK2l,4,4
	.comm	BN_MASK2,4,4
	.comm	BN_BITS4,4,4
	.comm	BN_BITS2,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
