	.file	"extr_drbg_lib.c_RAND_DRBG_instantiate.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	RAND_DRBG_instantiate
	.type	RAND_DRBG_instantiate, @function
RAND_DRBG_instantiate:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	QWORD PTR 24[rsp], 0
	mov	QWORD PTR 32[rsp], 0
	cmp	QWORD PTR 24[rdi], rdx
	jb	.L44
	cmp	QWORD PTR 112[rdi], 0
	je	.L45
	mov	rax, QWORD PTR 32[rdi]
	cmp	rax, QWORD PTR DRBG_UNINITIALISED[rip]
	mov	rcx, QWORD PTR DRBG_ERROR[rip]
	je	.L5
	mov	edi, DWORD PTR RAND_F_RAND_DRBG_INSTANTIATE[rip]
	cmp	rax, rcx
	je	.L46
	mov	esi, DWORD PTR RAND_R_ALREADY_INSTANTIATED[rip]
	xor	r14d, r14d
	xor	r13d, r13d
	call	RANDerr@PLT
.L3:
	mov	rsi, QWORD PTR 32[rsp]
	test	rsi, rsi
	je	.L18
	mov	rax, QWORD PTR 96[rbx]
	test	rax, rax
	je	.L18
	mov	rdx, r14
	mov	rdi, rbx
	call	rax
.L18:
	mov	rsi, QWORD PTR 24[rsp]
	test	rsi, rsi
	je	.L19
	mov	rax, QWORD PTR 88[rbx]
	test	rax, rax
	je	.L19
	mov	rdx, r13
	mov	rdi, rbx
	call	rax
.L19:
	mov	rax, QWORD PTR DRBG_READY[rip]
	cmp	QWORD PTR 32[rbx], rax
	sete	al
	mov	rcx, QWORD PTR 40[rsp]
	xor	rcx, QWORD PTR fs:40
	movzx	eax, al
	jne	.L47
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	rax, QWORD PTR 16[rdi]
	mov	QWORD PTR 32[rdi], rcx
	mov	r12, rsi
	mov	rbp, rdx
	mov	r14, QWORD PTR [rdi]
	mov	r13, QWORD PTR 8[rdi]
	mov	QWORD PTR 8[rsp], rax
	mov	rax, QWORD PTR 40[rdi]
	test	rax, rax
	je	.L7
	cmp	QWORD PTR 48[rdi], 0
	jne	.L7
	mov	rcx, r14
	add	r13, rax
	shr	rcx
	add	r14, rcx
	mov	rcx, QWORD PTR 56[rdi]
	add	QWORD PTR 8[rsp], rcx
	.p2align 4,,10
	.p2align 3
.L7:
	lea	r15, 104[rbx]
	mov	rdi, r15
	call	tsan_load@PLT
	test	eax, eax
	jne	.L8
	mov	rax, QWORD PTR 72[rbx]
	mov	DWORD PTR 64[rbx], 0
	test	rax, rax
	je	.L21
.L49:
	xor	r9d, r9d
	mov	rdx, r14
	mov	r8, QWORD PTR 8[rsp]
	lea	rsi, 32[rsp]
	mov	rcx, r13
	mov	rdi, rbx
	call	rax
	cmp	QWORD PTR 8[rsp], rax
	mov	r14, rax
	setb	al
.L12:
	cmp	r14, r13
	jb	.L23
	test	al, al
	jne	.L23
	mov	r13, QWORD PTR 40[rbx]
	test	r13, r13
	je	.L15
	mov	rax, QWORD PTR 48[rbx]
	test	rax, rax
	je	.L22
	mov	rdx, QWORD PTR [rbx]
	mov	rcx, r13
	mov	r8, QWORD PTR 56[rbx]
	lea	rsi, 24[rsp]
	mov	rdi, rbx
	shr	rdx
	call	rax
	mov	r13, rax
	cmp	QWORD PTR 40[rbx], rax
	ja	.L16
	cmp	QWORD PTR 56[rbx], rax
	jb	.L16
.L15:
	mov	rax, QWORD PTR 112[rbx]
	sub	rsp, 8
	.cfi_def_cfa_offset 120
	mov	rdx, r14
	mov	r9, r12
	push	rbp
	.cfi_def_cfa_offset 128
	mov	r8, r13
	mov	rcx, QWORD PTR 40[rsp]
	mov	rdi, rbx
	mov	rsi, QWORD PTR 48[rsp]
	call	[QWORD PTR [rax]]
	pop	rdx
	.cfi_def_cfa_offset 120
	pop	rcx
	.cfi_def_cfa_offset 112
	test	eax, eax
	je	.L48
	mov	rax, QWORD PTR DRBG_READY[rip]
	mov	DWORD PTR 80[rbx], 1
	xor	edi, edi
	mov	QWORD PTR 32[rbx], rax
	call	time@PLT
	mov	esi, DWORD PTR 64[rbx]
	mov	rdi, r15
	mov	DWORD PTR 108[rbx], eax
	call	tsan_store@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L44:
	mov	esi, DWORD PTR RAND_R_PERSONALISATION_STRING_TOO_LONG[rip]
	mov	edi, DWORD PTR RAND_F_RAND_DRBG_INSTANTIATE[rip]
	xor	r14d, r14d
	xor	r13d, r13d
	call	RANDerr@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L8:
	add	eax, 1
	mov	ecx, 1
	cmove	eax, ecx
	mov	DWORD PTR 64[rbx], eax
	mov	rax, QWORD PTR 72[rbx]
	test	rax, rax
	jne	.L49
.L21:
	xor	eax, eax
	xor	r14d, r14d
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L46:
	mov	esi, DWORD PTR RAND_R_IN_ERROR_STATE[rip]
	xor	r14d, r14d
	xor	r13d, r13d
	call	RANDerr@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L48:
	mov	esi, DWORD PTR RAND_R_ERROR_INSTANTIATING_DRBG[rip]
	mov	edi, DWORD PTR RAND_F_RAND_DRBG_INSTANTIATE[rip]
	call	RANDerr@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L45:
	mov	esi, DWORD PTR RAND_R_NO_DRBG_IMPLEMENTATION_SELECTED[rip]
	mov	edi, DWORD PTR RAND_F_RAND_DRBG_INSTANTIATE[rip]
	xor	r14d, r14d
	xor	r13d, r13d
	call	RANDerr@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L23:
	mov	esi, DWORD PTR RAND_R_ERROR_RETRIEVING_ENTROPY[rip]
	mov	edi, DWORD PTR RAND_F_RAND_DRBG_INSTANTIATE[rip]
	xor	r13d, r13d
	call	RANDerr@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L16:
	mov	esi, DWORD PTR RAND_R_ERROR_RETRIEVING_NONCE[rip]
	mov	edi, DWORD PTR RAND_F_RAND_DRBG_INSTANTIATE[rip]
	call	RANDerr@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L22:
	xor	r13d, r13d
	jmp	.L15
.L47:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	RAND_DRBG_instantiate, .-RAND_DRBG_instantiate
	.comm	RAND_R_PERSONALISATION_STRING_TOO_LONG,4,4
	.comm	RAND_R_NO_DRBG_IMPLEMENTATION_SELECTED,4,4
	.comm	RAND_R_IN_ERROR_STATE,4,4
	.comm	RAND_R_ERROR_RETRIEVING_NONCE,4,4
	.comm	RAND_R_ERROR_RETRIEVING_ENTROPY,4,4
	.comm	RAND_R_ERROR_INSTANTIATING_DRBG,4,4
	.comm	RAND_R_ALREADY_INSTANTIATED,4,4
	.comm	RAND_F_RAND_DRBG_INSTANTIATE,4,4
	.comm	DRBG_UNINITIALISED,8,8
	.comm	DRBG_READY,8,8
	.comm	DRBG_ERROR,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_drbg_lib.c_RAND_DRBG_instantiate.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	RAND_DRBG_instantiate
	.syntax unified
	.arm
	.fpu softvfp
	.type	RAND_DRBG_instantiate, %function
RAND_DRBG_instantiate:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r6, r2
	mov	r3, #0
	ldr	r2, [r0, #12]
	sub	sp, sp, #36
	cmp	r2, r6
	ldr	r2, .L49
	mov	r4, r0
	ldr	r2, [r2]
	str	r2, [sp, #28]
	mov	r2,#0
	str	r3, [sp, #20]
	str	r3, [sp, #24]
	bcc	.L45
	ldr	r5, [r0, #60]
	cmp	r5, #0
	ldreq	r2, .L49+4
	beq	.L42
	mov	r7, r1
	ldr	r1, .L49+8
	ldr	r2, [r0, #16]
	ldr	r0, [r1]
	ldr	r1, .L49+12
	cmp	r2, r0
	ldr	r1, [r1]
	beq	.L5
	mov	r5, r3
	cmp	r2, r1
	ldreq	r3, .L49+16
	ldrne	r3, .L49+20
	ldr	r0, .L49+24
	ldr	r1, [r3]
	ldr	r0, [r0]
	bl	RANDerr
	mov	r8, r5
	ldr	r6, .L49+28
.L3:
	ldr	r1, [sp, #24]
	cmp	r1, #0
	beq	.L17
	ldr	r3, [r4, #48]
	cmp	r3, #0
	beq	.L17
	mov	r2, r5
	mov	r0, r4
	blx	r3
.L17:
	ldr	r1, [sp, #20]
	cmp	r1, #0
	beq	.L18
	ldr	r3, [r4, #44]
	cmp	r3, #0
	beq	.L18
	mov	r2, r8
	mov	r0, r4
	blx	r3
.L18:
	ldr	r3, [r6]
	ldr	r0, [r4, #16]
	sub	r0, r0, r3
	ldr	r3, .L49
	clz	r0, r0
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	lsr	r0, r0, #5
	bne	.L46
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L5:
	ldr	r3, [r4, #20]
	ldr	fp, [r4]
	cmp	r3, #0
	str	r1, [r4, #16]
	ldmib	r4, {r8, r10}
	beq	.L7
	ldr	r2, [r4, #24]
	cmp	r2, #0
	ldreq	r2, [r4, #28]
	addeq	fp, fp, fp, lsr #1
	addeq	r8, r8, r3
	addeq	r10, r10, r2
.L7:
	add	r9, r4, #52
	mov	r0, r9
	bl	tsan_load
	cmp	r0, #0
	bne	.L8
.L41:
	str	r0, [r4, #32]
.L9:
	ldr	r5, [r4, #36]
	cmp	r5, #0
	beq	.L20
	mov	r3, #0
	mov	r2, fp
	str	r3, [sp, #4]
	mov	r0, r4
	mov	r3, r8
	str	r10, [sp]
	add	r1, sp, #24
	blx	r5
	cmp	r10, r0
	mov	r5, r0
	movcs	r2, #0
	movcc	r2, #1
.L12:
	cmp	r5, r8
	orrcc	r2, r2, #1
	cmp	r2, #0
	bne	.L47
	ldr	r8, [r4, #20]
	cmp	r8, #0
	beq	.L14
	ldr	r10, [r4, #24]
	cmp	r10, #0
	beq	.L21
	ldr	r2, [r4]
	ldr	r1, [r4, #28]
	mov	r3, r8
	str	r1, [sp]
	mov	r0, r4
	lsr	r2, r2, #1
	add	r1, sp, #20
	blx	r10
	ldr	r3, [r4, #20]
	mov	r8, r0
	cmp	r3, r0
	bhi	.L15
	ldr	r3, [r4, #28]
	cmp	r3, r0
	bcc	.L15
.L14:
	ldr	r3, [r4, #60]
	str	r6, [sp, #8]
	str	r7, [sp, #4]
	str	r8, [sp]
	ldr	r6, [r3]
	mov	r2, r5
	mov	r0, r4
	ldr	r3, [sp, #20]
	ldr	r1, [sp, #24]
	blx	r6
	cmp	r0, #0
	beq	.L48
	mov	r3, #1
	ldr	r6, .L49+28
	str	r3, [r4, #40]
	ldr	r3, [r6]
	mov	r0, #0
	str	r3, [r4, #16]
	bl	time
	mov	r3, r0
	ldr	r1, [r4, #32]
	mov	r0, r9
	str	r3, [r4, #56]
	bl	tsan_store
	b	.L3
.L47:
	ldr	r2, .L49+32
.L42:
	ldr	r3, .L49+24
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	RANDerr
	mov	r8, #0
	ldr	r6, .L49+28
	b	.L3
.L45:
	mov	r5, r3
	ldr	r2, .L49+36
	b	.L42
.L8:
	adds	r0, r0, #1
	moveq	r3, #1
	streq	r3, [r4, #32]
	beq	.L9
	b	.L41
.L48:
	ldr	r2, .L49+40
.L43:
	ldr	r3, .L49+24
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	RANDerr
	ldr	r6, .L49+28
	b	.L3
.L20:
	mov	r2, r5
	b	.L12
.L15:
	ldr	r2, .L49+44
	b	.L43
.L21:
	mov	r8, r10
	b	.L14
.L46:
	bl	__stack_chk_fail
.L50:
	.align	2
.L49:
	.word	.LC0
	.word	RAND_R_NO_DRBG_IMPLEMENTATION_SELECTED
	.word	DRBG_UNINITIALISED
	.word	DRBG_ERROR
	.word	RAND_R_IN_ERROR_STATE
	.word	RAND_R_ALREADY_INSTANTIATED
	.word	RAND_F_RAND_DRBG_INSTANTIATE
	.word	DRBG_READY
	.word	RAND_R_ERROR_RETRIEVING_ENTROPY
	.word	RAND_R_PERSONALISATION_STRING_TOO_LONG
	.word	RAND_R_ERROR_INSTANTIATING_DRBG
	.word	RAND_R_ERROR_RETRIEVING_NONCE
	.size	RAND_DRBG_instantiate, .-RAND_DRBG_instantiate
	.comm	RAND_R_PERSONALISATION_STRING_TOO_LONG,4,4
	.comm	RAND_R_NO_DRBG_IMPLEMENTATION_SELECTED,4,4
	.comm	RAND_R_IN_ERROR_STATE,4,4
	.comm	RAND_R_ERROR_RETRIEVING_NONCE,4,4
	.comm	RAND_R_ERROR_RETRIEVING_ENTROPY,4,4
	.comm	RAND_R_ERROR_INSTANTIATING_DRBG,4,4
	.comm	RAND_R_ALREADY_INSTANTIATED,4,4
	.comm	RAND_F_RAND_DRBG_INSTANTIATE,4,4
	.comm	DRBG_UNINITIALISED,4,4
	.comm	DRBG_READY,4,4
	.comm	DRBG_ERROR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
