	.file	"extr_randombytes_internal_random.c_randombytes_block_on_dev_random.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"/dev/random"
	.text
	.p2align 4
	.type	randombytes_block_on_dev_random, @function
randombytes_block_on_dev_random:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	lea	rdi, .LC0[rip]
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 40
	.cfi_def_cfa_offset 64
	mov	esi, DWORD PTR O_RDONLY[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	open@PLT
	mov	ebp, eax
	xor	eax, eax
	cmp	ebp, -1
	je	.L1
	mov	eax, DWORD PTR POLLIN[rip]
	mov	DWORD PTR [rsp], ebp
	mov	rbx, rsp
	mov	QWORD PTR 8[rsp], 0
	mov	DWORD PTR 16[rsp], eax
	.p2align 4,,10
	.p2align 3
.L9:
	mov	edx, -1
	mov	esi, 1
	mov	rdi, rbx
	call	poll@PLT
	test	eax, eax
	jns	.L3
	mov	rax, QWORD PTR errno[rip]
	cmp	rax, QWORD PTR EINTR[rip]
	je	.L9
	cmp	rax, QWORD PTR EAGAIN[rip]
	je	.L9
.L5:
	mov	edi, ebp
	call	close@PLT
	mov	rax, QWORD PTR EIO[rip]
	mov	QWORD PTR errno[rip], rax
	mov	eax, -1
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rcx, QWORD PTR 24[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L13
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	cmp	eax, 1
	jne	.L5
	mov	edi, ebp
	call	close@PLT
	jmp	.L1
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	randombytes_block_on_dev_random, .-randombytes_block_on_dev_random
	.comm	errno,8,8
	.comm	POLLIN,4,4
	.comm	O_RDONLY,4,4
	.comm	EIO,8,8
	.comm	EINTR,8,8
	.comm	EAGAIN,8,8
	.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_randombytes_internal_random.c_randombytes_block_on_dev_random.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"/dev/random\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	randombytes_block_on_dev_random, %function
randombytes_block_on_dev_random:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, .L14
	sub	sp, sp, #16
	ldr	r1, [r3]
	ldr	r3, .L14+4
	ldr	r0, .L14+8
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	open
	cmn	r0, #1
	moveq	r0, #0
	beq	.L1
	mov	r3, #0
	mov	r7, r0
	ldr	r2, .L14+12
	ldr	r4, .L14+16
	ldr	r2, [r2]
	ldr	r5, .L14+20
	ldr	r6, .L14+24
	str	r0, [sp]
	str	r2, [sp, #8]
	str	r3, [sp, #4]
.L9:
	mvn	r2, #0
	mov	r1, #1
	mov	r0, sp
	bl	poll
	cmp	r0, #0
	bge	.L3
	ldr	r3, [r4]
	ldr	r2, [r5]
	mov	r8, r4
	cmp	r3, r2
	beq	.L9
	ldr	r2, [r6]
	cmp	r3, r2
	beq	.L9
.L5:
	mov	r0, r7
	bl	close
	mvn	r0, #0
	ldr	r3, .L14+28
	ldr	r3, [r3]
	str	r3, [r8]
.L1:
	ldr	r3, .L14+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L12
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L3:
	cmp	r0, #1
	bne	.L13
	mov	r0, r7
	bl	close
	b	.L1
.L13:
	ldr	r8, .L14+16
	b	.L5
.L12:
	bl	__stack_chk_fail
.L15:
	.align	2
.L14:
	.word	O_RDONLY
	.word	.LC1
	.word	.LC0
	.word	POLLIN
	.word	errno
	.word	EINTR
	.word	EAGAIN
	.word	EIO
	.size	randombytes_block_on_dev_random, .-randombytes_block_on_dev_random
	.comm	errno,4,4
	.comm	POLLIN,4,4
	.comm	O_RDONLY,4,4
	.comm	EIO,4,4
	.comm	EINTR,4,4
	.comm	EAGAIN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
