	.file	"extr_optee-rng.c_optee_rng_probe.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"tee_client_open_session failed, err: %x\n"
	.align 8
.LC1:
	.string	"hwrng registration failed (%d)\n"
	.text
	.p2align 4
	.type	optee_rng_probe, @function
optee_rng_probe:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	sub	rsp, 48
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	r13, rsp
	call	to_tee_client_device@PLT
	xor	esi, esi
	mov	edx, 32
	mov	rdi, r13
	mov	r12, rax
	call	memset@PLT
	mov	esi, DWORD PTR optee_ctx_match[rip]
	xor	edi, edi
	xor	ecx, ecx
	xor	edx, edx
	call	tee_client_open_context@PLT
	mov	edi, eax
	mov	DWORD PTR pvt_data[rip], eax
	call	IS_ERR@PLT
	test	rax, rax
	je	.L2
	mov	r12d, DWORD PTR ENODEV[rip]
	neg	r12d
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L13
	add	rsp, 48
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	mov	eax, r12d
	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
.L2:
	.cfi_restore_state
	mov	edx, DWORD PTR TEE_IOCTL_UUID_LEN[rip]
	mov	esi, DWORD PTR [r12]
	mov	edi, DWORD PTR 28[rsp]
	call	memcpy@PLT
	mov	eax, DWORD PTR TEE_IOCTL_LOGIN_PUBLIC[rip]
	xor	edx, edx
	mov	rsi, r13
	mov	QWORD PTR 16[rsp], 0
	mov	edi, DWORD PTR pvt_data[rip]
	mov	DWORD PTR 24[rsp], eax
	call	tee_client_open_session@PLT
	mov	rdx, QWORD PTR [rsp]
	test	eax, eax
	js	.L5
	test	rdx, rdx
	jne	.L5
	mov	eax, DWORD PTR 8[rsp]
	mov	rdi, rbp
	mov	DWORD PTR pvt_data[rip+4], eax
	call	get_optee_rng_info@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L14
.L8:
	mov	esi, DWORD PTR pvt_data[rip+4]
	mov	edi, DWORD PTR pvt_data[rip]
	call	tee_client_close_session@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L5:
	lea	rsi, .LC0[rip]
	mov	rdi, rbp
	call	dev_err@PLT
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
.L7:
	mov	edi, DWORD PTR pvt_data[rip]
	call	tee_client_close_context@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	lea	rdi, pvt_data[rip+16]
	call	hwrng_register@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L15
	mov	QWORD PTR pvt_data[rip+8], rbp
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L15:
	mov	edx, eax
	lea	rsi, .LC1[rip]
	mov	rdi, rbp
	call	dev_err@PLT
	jmp	.L8
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	optee_rng_probe, .-optee_rng_probe
	.comm	pvt_data,24,16
	.comm	optee_ctx_match,4,4
	.comm	TEE_IOCTL_UUID_LEN,4,4
	.comm	TEE_IOCTL_LOGIN_PUBLIC,4,4
	.comm	ENODEV,4,4
	.comm	EINVAL,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_optee-rng.c_optee_rng_probe.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"tee_client_open_session failed, err: %x\012\000"
	.align	2
.LC1:
	.ascii	"hwrng registration failed (%d)\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	optee_rng_probe, %function
optee_rng_probe:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r3, .L15
	sub	sp, sp, #28
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	mov	r5, r0
	bl	to_tee_client_device
	mov	r3, #0
	ldr	r1, .L15+4
	mov	r2, r3
	ldr	r1, [r1]
	mov	r7, r0
	mov	r0, r3
	str	r3, [sp]
	str	r3, [sp, #4]
	str	r3, [sp, #8]
	str	r3, [sp, #12]
	str	r3, [sp, #16]
	bl	tee_client_open_context
	ldr	r6, .L15+8
	str	r0, [r6]
	bl	IS_ERR
	subs	r4, r0, #0
	beq	.L2
	ldr	r3, .L15+12
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L1:
	ldr	r3, .L15
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L13
	mov	r0, r4
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L2:
	ldr	r3, .L15+16
	ldr	r1, [r7]
	ldr	r2, [r3]
	ldr	r0, [sp, #16]
	bl	memcpy
	ldr	r3, .L15+20
	mov	r2, r4
	ldr	r3, [r3]
	mov	r1, sp
	ldr	r0, [r6]
	str	r4, [sp, #8]
	str	r3, [sp, #12]
	bl	tee_client_open_session
	cmp	r0, #0
	ldr	r2, [sp]
	blt	.L5
	cmp	r2, #0
	bne	.L5
	ldr	r3, [sp, #4]
	mov	r0, r5
	str	r3, [r6, #4]
	bl	get_optee_rng_info
	subs	r4, r0, #0
	beq	.L14
.L8:
	ldm	r6, {r0, r1}
	bl	tee_client_close_session
	b	.L7
.L5:
	mov	r0, r5
	ldr	r1, .L15+24
	bl	dev_err
	ldr	r3, .L15+28
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L7:
	ldr	r0, [r6]
	bl	tee_client_close_context
	b	.L1
.L14:
	add	r0, r6, #12
	bl	hwrng_register
	subs	r4, r0, #0
	streq	r5, [r6, #8]
	beq	.L1
	mov	r0, r5
	mov	r2, r4
	ldr	r1, .L15+32
	bl	dev_err
	b	.L8
.L13:
	bl	__stack_chk_fail
.L16:
	.align	2
.L15:
	.word	.LC2
	.word	optee_ctx_match
	.word	pvt_data
	.word	ENODEV
	.word	TEE_IOCTL_UUID_LEN
	.word	TEE_IOCTL_LOGIN_PUBLIC
	.word	.LC0
	.word	EINVAL
	.word	.LC1
	.size	optee_rng_probe, .-optee_rng_probe
	.comm	pvt_data,16,4
	.comm	optee_ctx_match,4,4
	.comm	TEE_IOCTL_UUID_LEN,4,4
	.comm	TEE_IOCTL_LOGIN_PUBLIC,4,4
	.comm	ENODEV,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
