	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function n2rng_data_read
_n2rng_data_read:                       ## @n2rng_data_read
	.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
	movq	%rsi, %r15
	movq	(%rdi), %rbx
	movq	%rbx, %rdi
	callq	___pa
	movl	4(%rbx), %ecx
	movq	_N2RNG_FLAG_READY@GOTPCREL(%rip), %r12
	xorl	%r14d, %r14d
	testl	%ecx, (%r12)
	je	LBB0_8
## %bb.1:
	movq	_N2RNG_FLAG_BUFFER_VALID@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%ecx, %edx
	je	LBB0_3
## %bb.2:
	notl	%edx
	andl	%edx, %ecx
	movl	%ecx, 4(%rbx)
	movl	8(%rbx), %eax
LBB0_5:
	movl	%eax, (%r15)
	movl	$4, %r14d
LBB0_8:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rax, %rdi
	callq	_n2rng_generic_read_data
	testl	%eax, %eax
	je	LBB0_4
## %bb.6:
	movq	16(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movl	(%r12), %eax
	notl	%eax
	andl	4(%rbx), %eax
	movl	%eax, 4(%rbx)
	movq	_N2RNG_FLAG_SHUTDOWN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_8
## %bb.7:
	addq	$12, %rbx
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_schedule_delayed_work
	jmp	LBB0_8
LBB0_4:
	movl	(%rbx), %eax
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_N2RNG_FLAG_READY,4,2           ## @N2RNG_FLAG_READY
	.comm	_N2RNG_FLAG_BUFFER_VALID,4,2    ## @N2RNG_FLAG_BUFFER_VALID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RNG error, restesting\n"

	.comm	_N2RNG_FLAG_SHUTDOWN,4,2        ## @N2RNG_FLAG_SHUTDOWN
	.no_dead_strip	_n2rng_data_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function n2rng_data_read
_n2rng_data_read:                       ; @n2rng_data_read
	.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	x20, x1
	ldr	x19, [x0]
	mov	x0, x19
	bl	___pa
	ldr	w8, [x19, #4]
Lloh0:
	adrp	x21, _N2RNG_FLAG_READY@GOTPAGE
Lloh1:
	ldr	x21, [x21, _N2RNG_FLAG_READY@GOTPAGEOFF]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.1:
Lloh2:
	adrp	x9, _N2RNG_FLAG_BUFFER_VALID@GOTPAGE
Lloh3:
	ldr	x9, [x9, _N2RNG_FLAG_BUFFER_VALID@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
	bic	w8, w8, w9
	str	w8, [x19, #4]
	ldr	w8, [x19, #8]
LBB0_3:
	str	w8, [x20]
	mov	w0, #4
	b	LBB0_8
LBB0_4:
	bl	_n2rng_generic_read_data
	cbz	w0, LBB0_9
; %bb.5:
	ldr	x0, [x19, #16]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	ldr	w8, [x21]
	ldr	w9, [x19, #4]
	bic	w8, w9, w8
	str	w8, [x19, #4]
Lloh7:
	adrp	x9, _N2RNG_FLAG_SHUTDOWN@GOTPAGE
Lloh8:
	ldr	x9, [x9, _N2RNG_FLAG_SHUTDOWN@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_7
; %bb.6:
	add	x0, x19, #12
	mov	w1, #0
	bl	_schedule_delayed_work
LBB0_7:
	mov	w0, #0
LBB0_8:
	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
LBB0_9:
	ldr	w8, [x19]
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_N2RNG_FLAG_READY,4,2           ; @N2RNG_FLAG_READY
	.comm	_N2RNG_FLAG_BUFFER_VALID,4,2    ; @N2RNG_FLAG_BUFFER_VALID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RNG error, restesting\n"

	.comm	_N2RNG_FLAG_SHUTDOWN,4,2        ; @N2RNG_FLAG_SHUTDOWN
	.no_dead_strip	_n2rng_data_read
.subsections_via_symbols
