	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rand_pool_bytes_needed         ## -- Begin function rand_pool_bytes_needed
	.p2align	4, 0x90
_rand_pool_bytes_needed:                ## @rand_pool_bytes_needed
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	callq	_rand_pool_entropy_needed
	testl	%ebx, %ebx
	je	LBB0_1
## %bb.3:
	movq	%rax, %rdi
	movl	%ebx, %esi
	callq	_ENTROPY_TO_BYTES
	movq	(%r14), %rdx
	movq	8(%r14), %rcx
	subq	%rcx, %rdx
	cmpq	%rdx, %rax
	jbe	LBB0_5
## %bb.4:
	movq	_RAND_F_RAND_POOL_BYTES_NEEDED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_RAND_R_RANDOM_POOL_OVERFLOW@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	_RAND_F_RAND_POOL_BYTES_NEEDED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_RAND_R_ARGUMENT_OUT_OF_RANGE@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %esi
	callq	_RANDerr
LBB0_7:
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_5:
	movq	16(%r14), %rdx
	movq	%rdx, %rbx
	subq	%rcx, %rbx
	cmpq	%rbx, %rax
	cmovaq	%rax, %rbx
	cmpq	%rcx, %rdx
	cmovbeq	%rax, %rbx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_rand_pool_grow
	testl	%eax, %eax
	je	LBB0_6
LBB0_8:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r14)
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_RAND_F_RAND_POOL_BYTES_NEEDED,4,2 ## @RAND_F_RAND_POOL_BYTES_NEEDED
	.comm	_RAND_R_ARGUMENT_OUT_OF_RANGE,4,2 ## @RAND_R_ARGUMENT_OUT_OF_RANGE
	.comm	_RAND_R_RANDOM_POOL_OVERFLOW,4,2 ## @RAND_R_RANDOM_POOL_OVERFLOW
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rand_pool_bytes_needed         ; -- Begin function rand_pool_bytes_needed
	.p2align	2
_rand_pool_bytes_needed:                ; @rand_pool_bytes_needed
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.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	_rand_pool_entropy_needed
	cbz	w20, LBB0_3
; %bb.1:
	mov	x1, x20
	bl	_ENTROPY_TO_BYTES
	ldp	x9, x8, [x19]
	sub	x9, x9, x8
	cmp	x0, x9
	b.ls	LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, _RAND_F_RAND_POOL_BYTES_NEEDED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RAND_F_RAND_POOL_BYTES_NEEDED@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _RAND_R_RANDOM_POOL_OVERFLOW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RAND_R_RANDOM_POOL_OVERFLOW@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh5:
	adrp	x8, _RAND_F_RAND_POOL_BYTES_NEEDED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RAND_F_RAND_POOL_BYTES_NEEDED@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x8, _RAND_R_ARGUMENT_OUT_OF_RANGE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RAND_R_ARGUMENT_OUT_OF_RANGE@GOTPAGEOFF]
LBB0_4:
	ldr	w1, [x8]
	bl	_RANDerr
	mov	x20, #0
	b	LBB0_7
LBB0_5:
	ldr	x9, [x19, #16]
	subs	x10, x9, x8
	cmp	x0, x10
	csel	x10, x0, x10, hi
	cmp	x9, x8
	csel	x20, x10, x0, hi
	mov	x0, x19
	mov	x1, x20
	bl	_rand_pool_grow
	cbnz	w0, LBB0_7
; %bb.6:
	mov	x20, #0
	stp	xzr, xzr, [x19]
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_RAND_F_RAND_POOL_BYTES_NEEDED,4,2 ; @RAND_F_RAND_POOL_BYTES_NEEDED
	.comm	_RAND_R_ARGUMENT_OUT_OF_RANGE,4,2 ; @RAND_R_ARGUMENT_OUT_OF_RANGE
	.comm	_RAND_R_RANDOM_POOL_OVERFLOW,4,2 ; @RAND_R_RANDOM_POOL_OVERFLOW
.subsections_via_symbols
