	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function n2rng_generic_read_control_v2
_n2rng_generic_read_control_v2:         ## @n2rng_generic_read_control_v2
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	leaq	-72(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	leaq	-64(%rbp), %r8
	leaq	-56(%rbp), %r9
	callq	_sun4v_rng_ctl_read_v2
	movq	_HV_EOK@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jne	LBB0_1
LBB0_9:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	xorl	%r13d, %r13d
	xorl	%r15d, %r15d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdi
	callq	___delay
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	movq	%r14, %rsi
	leaq	-72(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	leaq	-64(%rbp), %r8
	leaq	-56(%rbp), %r9
	callq	_sun4v_rng_ctl_read_v2
	cmpq	(%r12), %rax
	je	LBB0_9
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_HV_EBUSY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%r13d
	movq	_N2RNG_BUSY_LIMIT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r13d
	jge	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %edi
	callq	_udelay
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_HV_EWOULDBLOCK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%r15d
	movq	_N2RNG_BLOCK_LIMIT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r15d
	jl	LBB0_7
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_HV_EOK,8,3                     ## @HV_EOK
	.comm	_HV_EBUSY,8,3                   ## @HV_EBUSY
	.comm	_N2RNG_BUSY_LIMIT,4,2           ## @N2RNG_BUSY_LIMIT
	.comm	_HV_EWOULDBLOCK,8,3             ## @HV_EWOULDBLOCK
	.comm	_N2RNG_BLOCK_LIMIT,4,2          ## @N2RNG_BLOCK_LIMIT
	.no_dead_strip	_n2rng_generic_read_control_v2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function n2rng_generic_read_control_v2
_n2rng_generic_read_control_v2:         ; @n2rng_generic_read_control_v2
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x20, x0
	add	x2, sp, #24
	add	x3, sp, #16
	add	x4, sp, #8
	mov	x5, sp
	bl	_sun4v_rng_ctl_read_v2
Lloh0:
	adrp	x21, _HV_EOK@GOTPAGE
Lloh1:
	ldr	x21, [x21, _HV_EOK@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_2:
	mov	w22, #0
	mov	w23, #0
Lloh2:
	adrp	x24, _HV_EBUSY@GOTPAGE
Lloh3:
	ldr	x24, [x24, _HV_EBUSY@GOTPAGEOFF]
Lloh4:
	adrp	x25, _N2RNG_BUSY_LIMIT@GOTPAGE
Lloh5:
	ldr	x25, [x25, _N2RNG_BUSY_LIMIT@GOTPAGEOFF]
Lloh6:
	adrp	x26, _HV_EWOULDBLOCK@GOTPAGE
Lloh7:
	ldr	x26, [x26, _HV_EWOULDBLOCK@GOTPAGEOFF]
Lloh8:
	adrp	x27, _N2RNG_BLOCK_LIMIT@GOTPAGE
Lloh9:
	ldr	x27, [x27, _N2RNG_BLOCK_LIMIT@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [sp, #16]
	bl	___delay
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x2, sp, #24
	add	x3, sp, #16
	add	x4, sp, #8
	mov	x5, sp
	mov	x0, x20
	mov	x1, x19
	bl	_sun4v_rng_ctl_read_v2
	ldr	x8, [x21]
	cmp	x0, x8
	b.eq	LBB0_1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	w22, w22, #1
	ldr	w8, [x25]
	cmp	w22, w8
	b.ge	LBB0_1
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #1
	bl	_udelay
	b	LBB0_4
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x26]
	cmp	x0, x8
	b.ne	LBB0_1
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	add	w23, w23, #1
	ldr	w8, [x27]
	cmp	w23, w8
	b.lt	LBB0_3
	b	LBB0_1
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_HV_EOK,8,3                     ; @HV_EOK
	.comm	_HV_EBUSY,8,3                   ; @HV_EBUSY
	.comm	_N2RNG_BUSY_LIMIT,4,2           ; @N2RNG_BUSY_LIMIT
	.comm	_HV_EWOULDBLOCK,8,3             ; @HV_EWOULDBLOCK
	.comm	_N2RNG_BLOCK_LIMIT,4,2          ; @N2RNG_BLOCK_LIMIT
	.no_dead_strip	_n2rng_generic_read_control_v2
.subsections_via_symbols
