	.file	"extr_bcm2835-rng.c_bcm2835_rng_read.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	bcm2835_rng_read, @function
bcm2835_rng_read:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, ecx
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rsi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	to_rng_priv@PLT
	mov	rbp, rax
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	test	r12d, r12d
	je	.L7
	xor	eax, eax
	call	cpu_relax@PLT
.L2:
	mov	esi, DWORD PTR RNG_STATUS[rip]
	mov	rdi, rbp
	call	rng_readl@PLT
	shr	eax, 24
	je	.L4
	mov	esi, DWORD PTR RNG_STATUS[rip]
	mov	rdi, rbp
	shr	r13, 3
	call	rng_readl@PLT
	sar	eax, 24
	cdqe
	cmp	r13, rax
	cmovbe	rax, r13
	mov	r12, rax
	test	rax, rax
	je	.L5
	lea	r13, [rbx+rax*8]
	.p2align 4,,10
	.p2align 3
.L6:
	mov	esi, DWORD PTR RNG_DATA[rip]
	mov	rdi, rbp
	add	rbx, 8
	call	rng_readl@PLT
	cdqe
	mov	QWORD PTR -8[rbx], rax
	cmp	rbx, r13
	jne	.L6
.L5:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	lea	eax, 0[0+r12*8]
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	add	rsp, 8
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	bcm2835_rng_read, .-bcm2835_rng_read
	.comm	RNG_STATUS,4,4
	.comm	RNG_DATA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_bcm2835-rng.c_bcm2835_rng_read.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	bcm2835_rng_read, %function
bcm2835_rng_read:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r1
	mov	r8, r2
	mov	r4, r3
	bl	to_rng_priv
	ldr	r7, .L14
	mov	r5, r0
	b	.L2
.L4:
	cmp	r4, #0
	beq	.L7
	bl	cpu_relax
.L2:
	mov	r0, r5
	ldr	r1, [r7]
	bl	rng_readl
	lsrs	r3, r0, #24
	beq	.L4
	mov	r0, r5
	ldr	r1, [r7]
	bl	rng_readl
	lsr	r3, r8, #2
	asr	r4, r0, #24
	cmp	r3, r4
	movcc	r4, r3
	cmp	r4, #0
	beq	.L7
	sub	r6, r6, #4
	ldr	r8, .L14+4
	add	r7, r6, r4, lsl #2
	lsl	r4, r4, #2
.L6:
	mov	r0, r5
	ldr	r1, [r8]
	bl	rng_readl
	str	r0, [r6, #4]!
	cmp	r6, r7
	bne	.L6
.L7:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L15:
	.align	2
.L14:
	.word	RNG_STATUS
	.word	RNG_DATA
	.size	bcm2835_rng_read, .-bcm2835_rng_read
	.comm	RNG_STATUS,4,4
	.comm	RNG_DATA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
