	.file	"extr_rsa_i31_keygen_inner.c_mkrand.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mkrand, @function
mkrand:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	rax, QWORD PTR [rdi]
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	lea	r13d, 31[rdx]
	sar	r13d, 5
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12d, edx
	movsx	r13, r13d
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	lea	r14, 0[0+r13*4]
	lea	rbx, 4[rsi]
	mov	rsi, rbx
	mov	rdx, r14
	call	[QWORD PTR [rax]]
	lea	rsi, 0[rbp+r14]
	mov	rax, rbx
	cmp	r13, 1
	jbe	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	and	DWORD PTR [rax], 2147483647
	add	rax, 4
	cmp	rsi, rax
	jne	.L5
.L6:
	mov	edx, DWORD PTR [rsi]
	and	r12d, 31
	jne	.L14
	mov	eax, edx
	and	eax, 2147483647
	mov	DWORD PTR [rsi], eax
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	mov	ecx, 31
	mov	eax, 2147483647
	sub	ecx, r12d
	sar	eax, cl
	and	eax, edx
	mov	DWORD PTR [rsi], eax
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	mkrand, .-mkrand
	.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_rsa_i31_keygen_inner.c_mkrand.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mkrand, %function
mkrand:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	add	r6, r2, #31
	ldr	r3, [r0]
	asr	r6, r6, #5
	lsl	r7, r6, #2
	mov	r5, r1
	ldr	r3, [r3]
	mov	r4, r2
	add	r1, r1, #4
	mov	r2, r7
	blx	r3
	cmp	r6, #1
	subhi	ip, r5, #4
	movhi	r3, r5
	addhi	ip, ip, r7
	bls	.L6
.L5:
	ldr	r0, [r3, #4]!
	bic	r0, r0, #-2147483648
	cmp	ip, r3
	str	r0, [r3]
	bne	.L5
.L6:
	ands	r4, r4, #31
	ldr	r3, [r5, r6, lsl #2]
	bne	.L12
	bic	r3, r3, #-2147483648
	str	r3, [r5, r6, lsl #2]
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	mvn	r2, #-2147483648
	rsb	r4, r4, #31
	and	r4, r3, r2, asr r4
	str	r4, [r5, r6, lsl #2]
	pop	{r4, r5, r6, r7, r8, pc}
	.size	mkrand, .-mkrand
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
