	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function n2rng_control_selftest
_n2rng_control_selftest:                ## @n2rng_control_selftest
	.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
	movq	_RNG_CTL_ASEL_SHIFT@GOTPCREL(%rip), %r8
	movb	(%r8), %cl
	movl	$2, %eax
	shll	%cl, %eax
	movq	%rdi, %rbx
	movl	$2, %edi
	movq	(%rbx), %rdx
	movl	%eax, (%rdx)
	movb	(%r8), %cl
	shll	%cl, %edi
	movl	%edi, 4(%rdx)
	movl	%edi, 8(%rdx)
	movq	_SELFTEST_TICKS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	$-2, %eax
	movq	_RNG_CTL_WAIT_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movq	_RNG_CTL_LFSR@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edi
	movq	%rsi, %r14
	orl	%edi, %eax
	movl	%eax, 12(%rdx)
	movq	_HV_RNG_STATE_HEALTHCHECK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	24(%rbx), %r8d
	movq	16(%rbx), %r10
	movl	8(%rbx), %eax
	movq	%rbx, %rdi
	movl	$4, %r9d
	pushq	%rax
	pushq	(%r10,%rsi,8)
	callq	_n2rng_entropy_diag_read
	addq	$16, %rsp
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_n2rng_check_selftest_buffer    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RNG_CTL_ASEL_SHIFT,4,2         ## @RNG_CTL_ASEL_SHIFT
	.comm	_RNG_CTL_LFSR,4,2               ## @RNG_CTL_LFSR
	.comm	_SELFTEST_TICKS,4,2             ## @SELFTEST_TICKS
	.comm	_RNG_CTL_WAIT_SHIFT,4,2         ## @RNG_CTL_WAIT_SHIFT
	.comm	_HV_RNG_STATE_HEALTHCHECK,4,2   ## @HV_RNG_STATE_HEALTHCHECK
	.no_dead_strip	_n2rng_control_selftest
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function n2rng_control_selftest
_n2rng_control_selftest:                ; @n2rng_control_selftest
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _RNG_CTL_ASEL_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RNG_CTL_ASEL_SHIFT@GOTPAGEOFF]
	ldr	w9, [x8]
	mov	w10, #2
	lsl	w9, w10, w9
	ldr	x2, [x0]
	str	w9, [x2]
	ldr	w8, [x8]
	lsl	w8, w10, w8
	stp	w8, w8, [x2, #4]
Lloh2:
	adrp	x9, _RNG_CTL_LFSR@GOTPAGE
Lloh3:
	ldr	x9, [x9, _RNG_CTL_LFSR@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh5:
	adrp	x9, _SELFTEST_TICKS@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SELFTEST_TICKS@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	sub	w9, w9, #2
Lloh8:
	adrp	x10, _RNG_CTL_WAIT_SHIFT@GOTPAGE
Lloh9:
	ldr	x10, [x10, _RNG_CTL_WAIT_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w8, w8, w9
	str	w8, [x2, #12]
Lloh11:
	adrp	x8, _HV_RNG_STATE_HEALTHCHECK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HV_RNG_STATE_HEALTHCHECK@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	ldr	w4, [x0, #24]
	ldr	x8, [x0, #16]
	ldr	x6, [x8, x1, lsl #3]
	ldr	w7, [x0, #8]
	mov	w5, #4
	bl	_n2rng_entropy_diag_read
	cbz	w0, LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x0, x20
	mov	x1, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_n2rng_check_selftest_buffer
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_RNG_CTL_ASEL_SHIFT,4,2         ; @RNG_CTL_ASEL_SHIFT
	.comm	_RNG_CTL_LFSR,4,2               ; @RNG_CTL_LFSR
	.comm	_SELFTEST_TICKS,4,2             ; @SELFTEST_TICKS
	.comm	_RNG_CTL_WAIT_SHIFT,4,2         ; @RNG_CTL_WAIT_SHIFT
	.comm	_HV_RNG_STATE_HEALTHCHECK,4,2   ; @HV_RNG_STATE_HEALTHCHECK
	.no_dead_strip	_n2rng_control_selftest
.subsections_via_symbols
