	.file	"extr_bn_x931p.c_BN_X931_generate_Xpq.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	BN_X931_generate_Xpq
	.type	BN_X931_generate_Xpq, @function
BN_X931_generate_Xpq:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xor	r15d, r15d
	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
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	cmp	edx, 1023
	jle	.L1
	mov	r15d, edx
	mov	ebx, edx
	and	r15d, 255
	je	.L25
	xor	r15d, r15d
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r15d
	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
.L25:
	.cfi_restore_state
	sar	ebx
	mov	r12, rcx
	mov	r8, rcx
	mov	edx, DWORD PTR BN_RAND_TOP_TWO[rip]
	mov	ecx, DWORD PTR BN_RAND_BOTTOM_ANY[rip]
	mov	rbp, rsi
	mov	esi, ebx
	mov	r13, rdi
	call	BN_priv_rand_ex@PLT
	test	eax, eax
	jne	.L26
.L22:
	mov	rdi, r12
	call	BN_CTX_end@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L26:
	mov	rdi, r12
	call	BN_CTX_start@PLT
	mov	rdi, r12
	call	BN_CTX_get@PLT
	mov	r14, rax
	test	rax, rax
	je	.L22
	lea	eax, -99[rbx]
	mov	DWORD PTR 12[rsp], 1000
	mov	DWORD PTR 8[rsp], eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L27:
	mov	rdx, rbp
	mov	rsi, r13
	mov	rdi, r14
	call	BN_sub@PLT
	test	eax, eax
	je	.L22
	mov	rdi, r14
	call	BN_num_bits@PLT
	cmp	DWORD PTR 8[rsp], eax
	jle	.L4
	sub	DWORD PTR 12[rsp], 1
	je	.L22
.L5:
	mov	ecx, DWORD PTR BN_RAND_BOTTOM_ANY[rip]
	mov	r8, r12
	mov	esi, ebx
	mov	rdi, rbp
	mov	edx, DWORD PTR BN_RAND_TOP_TWO[rip]
	call	BN_priv_rand_ex@PLT
	test	eax, eax
	jne	.L27
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rdi, r12
	mov	r15d, 1
	call	BN_CTX_end@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	BN_X931_generate_Xpq, .-BN_X931_generate_Xpq
	.comm	BN_RAND_TOP_TWO,4,4
	.comm	BN_RAND_BOTTOM_ANY,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_bn_x931p.c_BN_X931_generate_Xpq.c"
	.text
	.align	2
	.global	BN_X931_generate_Xpq
	.syntax unified
	.arm
	.fpu softvfp
	.type	BN_X931_generate_Xpq, %function
BN_X931_generate_Xpq:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	cmp	r2, #1024
	sub	sp, sp, #20
	blt	.L8
	ands	r10, r2, #255
	beq	.L29
.L8:
	mov	r10, #0
.L1:
	mov	r0, r10
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L29:
	str	r3, [sp]
	mov	r6, r3
	ldr	fp, .L32
	ldr	r3, .L32+4
	asr	r4, r2, #1
	mov	r5, r1
	ldr	r3, [r3]
	mov	r1, r4
	ldr	r2, [fp]
	mov	r7, r0
	bl	BN_priv_rand_ex
	cmp	r0, #0
	bne	.L30
.L27:
	mov	r0, r6
	bl	BN_CTX_end
	mov	r0, r10
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L30:
	mov	r0, r6
	bl	BN_CTX_start
	mov	r0, r6
	bl	BN_CTX_get
	subs	r9, r0, #0
	beq	.L27
	sub	r3, r4, #99
	str	r10, [sp, #12]
	mov	r8, #1000
	mov	r10, r3
	b	.L5
.L31:
	mov	r2, r5
	mov	r1, r7
	mov	r0, r9
	bl	BN_sub
	cmp	r0, #0
	beq	.L25
	mov	r0, r9
	bl	BN_num_bits
	cmp	r10, r0
	ble	.L4
	subs	r8, r8, #1
	beq	.L25
.L5:
	ldr	r3, .L32+4
	str	r6, [sp]
	mov	r1, r4
	mov	r0, r5
	ldr	r3, [r3]
	ldr	r2, [fp]
	bl	BN_priv_rand_ex
	cmp	r0, #0
	bne	.L31
.L25:
	ldr	r10, [sp, #12]
	b	.L27
.L4:
	mov	r0, r6
	bl	BN_CTX_end
	mov	r10, #1
	b	.L1
.L33:
	.align	2
.L32:
	.word	BN_RAND_TOP_TWO
	.word	BN_RAND_BOTTOM_ANY
	.size	BN_X931_generate_Xpq, .-BN_X931_generate_Xpq
	.comm	BN_RAND_TOP_TWO,4,4
	.comm	BN_RAND_BOTTOM_ANY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
