	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnrand
_bnrand:                                ## @bnrand
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movq	%rsi, %r12
	testl	%edx, %edx
	je	LBB0_1
## %bb.4:
	js	LBB0_38
## %bb.5:
	movl	%edx, %ebx
	movq	%rdi, %r15
	cmpl	$1, %edx
	jne	LBB0_7
## %bb.6:
	testl	%r14d, %r14d
	jg	LBB0_38
LBB0_7:
	movl	%r8d, -56(%rbp)                 ## 4-byte Spill
	addl	$7, %ebx
	movl	%ebx, %edi
	shrl	$3, %edi
	andl	$7, %ebx
	movl	$510, %eax                      ## imm = 0x1FE
	movl	%ebx, %ecx
	shll	%cl, %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	callq	_OPENSSL_malloc
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	_NORMAL@GOTPCREL(%rip), %rax
	cmpq	%r15, (%rax)
	jne	LBB0_11
## %bb.10:
	movq	%r13, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_RAND_bytes
	testl	%eax, %eax
	jg	LBB0_14
	jmp	LBB0_13
LBB0_1:
	movq	_BN_RAND_TOP_ANY@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_38
## %bb.2:
	movq	_BN_RAND_BOTTOM_ANY@GOTPCREL(%rip), %rax
	cmpl	%r8d, (%rax)
	jne	LBB0_38
## %bb.3:
	movq	%r12, %rdi
	callq	_BN_zero
	movl	$1, %ebx
	jmp	LBB0_39
LBB0_38:
	movq	_BN_F_BNRAND@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_BN_R_BITS_TOO_SMALL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_BNerr
	xorl	%ebx, %ebx
	jmp	LBB0_39
LBB0_8:
	movq	_BN_F_BNRAND@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_MALLOC_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_BNerr
	jmp	LBB0_13
LBB0_11:
	movq	%r13, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_RAND_priv_bytes
	testl	%eax, %eax
	jle	LBB0_13
LBB0_14:
	movq	_TESTING@GOTPCREL(%rip), %rax
	cmpq	%r15, (%rax)
	jne	LBB0_26
## %bb.15:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	leaq	-45(%rbp), %rdi
	movl	$1, %esi
	callq	_RAND_bytes
	testq	%rax, %rax
	jle	LBB0_40
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	movzbl	-45(%rbp), %ecx
	testb	%cl, %cl
	jns	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=1
	testq	%r12, %r12
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_16 Depth=1
	leal	-1(%r12), %eax
	movzbl	(%r13,%rax), %eax
	jmp	LBB0_23
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_16 Depth=1
	cmpb	$42, %cl
	jae	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_16 Depth=1
	xorl	%eax, %eax
	jmp	LBB0_23
LBB0_22:                                ##   in Loop: Header=BB0_16 Depth=1
	movb	$-1, %al
	cmpb	$83, %cl
	ja	LBB0_24
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_16 Depth=1
	movb	%al, (%r13,%r12)
LBB0_24:                                ##   in Loop: Header=BB0_16 Depth=1
	incq	%r12
	cmpq	%r12, %r15
	jne	LBB0_16
## %bb.25:
	movq	-64(%rbp), %r12                 ## 8-byte Reload
LBB0_26:
	testl	%r14d, %r14d
	js	LBB0_27
## %bb.28:
	je	LBB0_32
## %bb.29:
	testl	%ebx, %ebx
	je	LBB0_30
## %bb.31:
	decb	%bl
	movl	$3, %eax
	jmp	LBB0_33
LBB0_13:
	xorl	%ebx, %ebx
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	jmp	LBB0_37
LBB0_27:
	movb	(%r13), %al
	jmp	LBB0_34
LBB0_40:
	xorl	%ebx, %ebx
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	jmp	LBB0_37
LBB0_32:
	movl	$1, %eax
LBB0_33:
	movl	%ebx, %ecx
	shll	%cl, %eax
	orb	(%r13), %al
	movb	%al, (%r13)
	jmp	LBB0_34
LBB0_30:
	movb	$1, (%r13)
	orb	$-128, 1(%r13)
	movb	$1, %al
LBB0_34:
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	notb	%cl
	andb	%al, %cl
	movb	%cl, (%r13)
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_36
## %bb.35:
	movl	%r14d, %eax
	orb	$1, -1(%rax,%r13)
LBB0_36:
	movq	%r13, %rdi
	movl	%r14d, %esi
	movq	%r12, %rdx
	callq	_BN_bin2bn
	xorl	%ebx, %ebx
	testl	%eax, %eax
	setne	%bl
LBB0_37:
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_OPENSSL_clear_free
	movq	%r12, %rdi
	callq	_bn_check_top
LBB0_39:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BN_RAND_TOP_ANY,4,2            ## @BN_RAND_TOP_ANY
	.comm	_BN_RAND_BOTTOM_ANY,4,2         ## @BN_RAND_BOTTOM_ANY
	.comm	_BN_F_BNRAND,4,2                ## @BN_F_BNRAND
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ## @ERR_R_MALLOC_FAILURE
	.comm	_NORMAL,8,3                     ## @NORMAL
	.comm	_TESTING,8,3                    ## @TESTING
	.comm	_BN_R_BITS_TOO_SMALL,4,2        ## @BN_R_BITS_TOO_SMALL
	.no_dead_strip	_bnrand
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnrand
_bnrand:                                ; @bnrand
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x4
	mov	x23, x3
	mov	x19, x1
	cbz	w2, LBB0_7
; %bb.1:
	tbnz	w2, #31, LBB0_8
; %bb.2:
	mov	x24, x0
	cmp	w2, #1
	b.ne	LBB0_4
; %bb.3:
	cmp	w23, #0
	b.gt	LBB0_8
LBB0_4:
	add	w25, w2, #7
	lsr	w20, w25, #3
	mov	x0, x20
	bl	_OPENSSL_malloc
	mov	x21, x0
	cbz	x0, LBB0_10
; %bb.5:
Lloh0:
	adrp	x8, _NORMAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NORMAL@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	mov	x0, x21
	mov	x1, x20
	cmp	x8, x24
	b.ne	LBB0_11
; %bb.6:
	bl	_RAND_bytes
	cmp	w0, #1
	b.ge	LBB0_12
	b	LBB0_28
LBB0_7:
Lloh3:
	adrp	x8, _BN_RAND_TOP_ANY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BN_RAND_TOP_ANY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _BN_RAND_BOTTOM_ANY@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BN_RAND_BOTTOM_ANY@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w23
	ccmp	w9, w22, #0, eq
	b.eq	LBB0_9
LBB0_8:
Lloh9:
	adrp	x8, _BN_F_BNRAND@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BN_F_BNRAND@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x8, _BN_R_BITS_TOO_SMALL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BN_R_BITS_TOO_SMALL@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_BNerr
	mov	w22, #0
	b	LBB0_37
LBB0_9:
	mov	x0, x19
	bl	_BN_zero
	mov	w22, #1
	b	LBB0_37
LBB0_10:
Lloh15:
	adrp	x8, _BN_F_BNRAND@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BN_F_BNRAND@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x8, _ERR_R_MALLOC_FAILURE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ERR_R_MALLOC_FAILURE@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	bl	_BNerr
	mov	w22, #0
	b	LBB0_36
LBB0_11:
	bl	_RAND_priv_bytes
	cmp	w0, #1
	b.lt	LBB0_28
LBB0_12:
Lloh21:
	adrp	x8, _TESTING@GOTPAGE
Lloh22:
	ldr	x8, [x8, _TESTING@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	cmp	x8, x24
	b.ne	LBB0_24
; %bb.13:
	mov	x24, #0
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #15
	mov	w1, #1
	bl	_RAND_bytes
	cmp	x0, #1
	b.lt	LBB0_28
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	ldrsb	w8, [sp, #15]
	tbz	w8, #31, LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=1
	cbz	x24, LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_14 Depth=1
	sub	w8, w24, #1
	ldrb	w8, [x21, w8, uxtw]
	b	LBB0_22
LBB0_18:                                ;   in Loop: Header=BB0_14 Depth=1
	and	w8, w8, #0xff
	cmp	w8, #42
	b.hs	LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	w8, #0
	b	LBB0_22
LBB0_20:                                ;   in Loop: Header=BB0_14 Depth=1
	cmp	w8, #83
	b.hi	LBB0_23
; %bb.21:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	w8, #255
LBB0_22:                                ;   in Loop: Header=BB0_14 Depth=1
	strb	w8, [x21, x24]
LBB0_23:                                ;   in Loop: Header=BB0_14 Depth=1
	add	x24, x24, #1
	cmp	x20, x24
	b.ne	LBB0_14
LBB0_24:
	and	w9, w25, #0x7
	mov	w8, #510
	lsl	w8, w8, w9
	tbnz	w23, #31, LBB0_29
; %bb.25:
	cbz	w23, LBB0_30
; %bb.26:
	cbz	w9, LBB0_32
; %bb.27:
	sub	w9, w9, #1
	mov	w10, #3
	b	LBB0_31
LBB0_28:
	mov	w22, #0
	b	LBB0_36
LBB0_29:
	ldrb	w9, [x21]
	b	LBB0_33
LBB0_30:
	mov	w10, #1
LBB0_31:
	lsl	w9, w10, w9
	ldrb	w10, [x21]
	orr	w9, w10, w9
	strb	w9, [x21]
	b	LBB0_33
LBB0_32:
	mov	w9, #1
	strb	w9, [x21]
	ldrb	w10, [x21, #1]
	orr	w10, w10, #0x80
	strb	w10, [x21, #1]
LBB0_33:
	bic	w8, w9, w8
	strb	w8, [x21]
	cbz	w22, LBB0_35
; %bb.34:
	add	x8, x21, w20, uxtw
	ldurb	w9, [x8, #-1]
	orr	w9, w9, #0x1
	sturb	w9, [x8, #-1]
LBB0_35:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_BN_bin2bn
	cmp	w0, #0
	cset	w22, ne
LBB0_36:
	mov	x0, x21
	mov	x1, x20
	bl	_OPENSSL_clear_free
	mov	x0, x19
	bl	_bn_check_top
LBB0_37:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_BN_RAND_TOP_ANY,4,2            ; @BN_RAND_TOP_ANY
	.comm	_BN_RAND_BOTTOM_ANY,4,2         ; @BN_RAND_BOTTOM_ANY
	.comm	_BN_F_BNRAND,4,2                ; @BN_F_BNRAND
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ; @ERR_R_MALLOC_FAILURE
	.comm	_NORMAL,8,3                     ; @NORMAL
	.comm	_TESTING,8,3                    ; @TESTING
	.comm	_BN_R_BITS_TOO_SMALL,4,2        ; @BN_R_BITS_TOO_SMALL
	.no_dead_strip	_bnrand
.subsections_via_symbols
