	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cprng_reset
_cprng_reset:                           ## @cprng_reset
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %r15
	callq	_crypto_rng_ctx
	movq	%rax, %r14
	movq	_DEFAULT_BLK_SZ@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	_DEFAULT_PRNG_KSZ@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rdx
	leal	(%rdx,%rax), %ecx
	cmpl	%r12d, %ecx
	ja	LBB0_2
## %bb.1:
	leaq	(%r15,%rax,4), %rsi
	leal	(%rdx,%rax,2), %eax
	xorl	%ebx, %ebx
	cmpl	%r12d, %eax
	leaq	(%rsi,%rdx,4), %rax
	movl	$0, %r8d
	cmovbeq	%rax, %r8
	movq	%r14, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	movq	%r15, %rcx
	callq	_reset_prng_context
	movq	_PRNG_NEED_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_3
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_3:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DEFAULT_BLK_SZ,4,2             ## @DEFAULT_BLK_SZ
	.comm	_DEFAULT_PRNG_KSZ,4,2           ## @DEFAULT_PRNG_KSZ
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PRNG_NEED_RESET,4,2            ## @PRNG_NEED_RESET
	.no_dead_strip	_cprng_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cprng_reset
_cprng_reset:                           ; @cprng_reset
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x2
	mov	x19, x1
	bl	_crypto_rng_ctx
Lloh0:
	adrp	x8, _DEFAULT_BLK_SZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DEFAULT_BLK_SZ@GOTPAGEOFF]
Lloh2:
	ldrsw	x8, [x8]
Lloh3:
	adrp	x9, _DEFAULT_PRNG_KSZ@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DEFAULT_PRNG_KSZ@GOTPAGEOFF]
Lloh5:
	ldrsw	x2, [x9]
	add	w9, w2, w8
	cmp	w9, w21
	b.hi	LBB0_2
; %bb.1:
	mov	x20, x0
	add	x1, x19, x8, lsl #2
	add	w8, w2, w8, lsl #1
	add	x9, x1, x2, lsl #2
	cmp	w8, w21
	csel	x4, xzr, x9, hi
                                        ; kill: def $w2 killed $w2 killed $x2
	mov	x3, x19
	bl	_reset_prng_context
	ldr	w8, [x20]
Lloh6:
	adrp	x9, _PRNG_NEED_RESET@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PRNG_NEED_RESET@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
LBB0_2:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_4
LBB0_3:
	mov	w0, #0
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_DEFAULT_BLK_SZ,4,2             ; @DEFAULT_BLK_SZ
	.comm	_DEFAULT_PRNG_KSZ,4,2           ; @DEFAULT_PRNG_KSZ
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PRNG_NEED_RESET,4,2            ; @PRNG_NEED_RESET
	.no_dead_strip	_cprng_reset
.subsections_via_symbols
