	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_crypto_bignum_rand             ## -- Begin function crypto_bignum_rand
	.p2align	4, 0x90
_crypto_bignum_rand:                    ## @crypto_bignum_rand
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	xorl	%eax, %eax
	callq	_TEST_FAIL
	movl	$-1, %ebx
	testq	%rax, %rax
	jne	LBB0_5
## %bb.1:
	leaq	-36(%rbp), %rdi
	callq	_wc_InitRng
	testq	%rax, %rax
	jne	LBB0_5
## %bb.2:
	movq	%r14, %rdi
	callq	_mp_count_bits
                                        ## kill: def $eax killed $eax def $rax
	leal	7(%rax), %ecx
	leal	14(%rax), %esi
	testl	%ecx, %ecx
	cmovnsl	%ecx, %esi
	sarl	$3, %esi
	addl	%esi, %esi
	xorl	%r12d, %r12d
	leaq	-36(%rbp), %rdx
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_mp_rand_prime
	movl	$-1, %ebx
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_mp_mod
	negq	%rax
	sbbl	%r12d, %r12d
	movl	%r12d, %ebx
LBB0_4:
	leaq	-36(%rbp), %rdi
	callq	_wc_FreeRng
LBB0_5:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_crypto_bignum_rand             ; -- Begin function crypto_bignum_rand
	.p2align	2
_crypto_bignum_rand:                    ; @crypto_bignum_rand
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	bl	_TEST_FAIL
	cbnz	x0, LBB0_2
; %bb.1:
	add	x0, sp, #12
	bl	_wc_InitRng
	cbz	x0, LBB0_4
LBB0_2:
	mov	w19, #-1
LBB0_3:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_4:
	mov	x0, x20
	bl	_mp_count_bits
	add	w8, w0, #7
	add	w9, w0, #14
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #3
	lsl	w1, w8, #1
	add	x2, sp, #12
	mov	x0, x19
	mov	x3, #0
	bl	_mp_rand_prime
	cbz	x0, LBB0_6
; %bb.5:
	mov	w19, #-1
	b	LBB0_7
LBB0_6:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x19
	bl	_mp_mod
	cmp	x0, #0
	csetm	w19, ne
LBB0_7:
	add	x0, sp, #12
	bl	_wc_FreeRng
	b	LBB0_3
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
