	.file	"extr_rkmppdec.c_rkmpp_init_decoder.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Initializing RKMPP decoder.\n"
.LC1:
	.string	"Unknown codec type (%d).\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"Codec type (%d) unsupported by MPP\n"
	.align 8
.LC3:
	.string	"Failed to create MPP context (code = %d).\n"
	.align 8
.LC4:
	.string	"Failed to initialize MPP context (code = %d).\n"
	.align 8
.LC5:
	.string	"Failed to set blocking mode on MPI (code = %d).\n"
	.align 8
.LC6:
	.string	"Failed to set block timeout on MPI (code = %d).\n"
	.align 8
.LC7:
	.string	"Failed to retrieve buffer group (code = %d)\n"
	.align 8
.LC8:
	.string	"Failed to assign buffer group (code = %d)\n"
	.align 8
.LC9:
	.string	"Failed to set buffer group limit (code = %d)\n"
	.align 8
.LC10:
	.string	"RKMPP decoder initialized successfully.\n"
	.align 8
.LC11:
	.string	"Failed to initialize RKMPP decoder.\n"
	.text
	.p2align 4
	.type	rkmpp_init_decoder, @function
rkmpp_init_decoder:
.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, 16
	.cfi_def_cfa_offset 48
	mov	r13, QWORD PTR 8[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR AV_PIX_FMT_DRM_PRIME[rip]
	mov	DWORD PTR 4[rdi], eax
	mov	edi, 32
	call	av_mallocz@PLT
	test	rax, rax
	je	.L18
	mov	r8d, DWORD PTR AV_BUFFER_FLAG_READONLY[rip]
	xor	ecx, ecx
	mov	rdi, rax
	mov	r12, rax
	mov	edx, DWORD PTR rkmpp_release_decoder[rip]
	mov	esi, 32
	call	av_buffer_create@PLT
	mov	DWORD PTR 0[r13], eax
	test	eax, eax
	je	.L21
	mov	esi, DWORD PTR AV_LOG_DEBUG[rip]
	lea	rdx, .LC0[rip]
	mov	rdi, rbp
	xor	eax, eax
	call	av_log@PLT
	mov	rdi, rbp
	call	rkmpp_get_codingtype@PLT
	cmp	QWORD PTR MPP_VIDEO_CodingUnused[rip], rax
	mov	r13, rax
	je	.L22
	mov	edi, DWORD PTR MPP_CTX_DEC[rip]
	mov	rsi, rax
	call	mpp_check_support_format@PLT
	cmp	DWORD PTR MPP_OK[rip], eax
	je	.L6
	mov	ecx, DWORD PTR 0[rbp]
	lea	rdx, .LC2[rip]
.L19:
	mov	esi, DWORD PTR AV_LOG_ERROR[rip]
	mov	rdi, rbp
	xor	eax, eax
	call	av_log@PLT
	mov	r13d, DWORD PTR AVERROR_UNKNOWN[rip]
.L3:
	mov	esi, DWORD PTR AV_LOG_ERROR[rip]
	mov	rdi, rbp
	lea	rdx, .LC11[rip]
	xor	eax, eax
	call	av_log@PLT
	mov	rdi, rbp
	call	rkmpp_close_decoder@PLT
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L23
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	mov	eax, r13d
	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
.L21:
	.cfi_restore_state
	mov	rdi, r12
	call	av_free@PLT
.L18:
	mov	edi, DWORD PTR ENOMEM[rip]
	call	AVERROR@PLT
	mov	r13d, eax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L6:
	lea	rsi, 24[r12]
	lea	rdi, 16[r12]
	call	mpp_create@PLT
	cmp	DWORD PTR MPP_OK[rip], eax
	lea	rdx, .LC3[rip]
	mov	ecx, eax
	jne	.L19
	mov	edi, DWORD PTR 16[r12]
	mov	esi, DWORD PTR MPP_CTX_DEC[rip]
	mov	rdx, r13
	call	mpp_init@PLT
	cmp	DWORD PTR MPP_OK[rip], eax
	lea	rdx, .LC4[rip]
	mov	ecx, eax
	jne	.L19
	mov	eax, DWORD PTR MPP_POLL_BLOCK[rip]
	lea	rdx, 4[rsp]
	mov	edi, DWORD PTR 16[r12]
	mov	esi, DWORD PTR MPP_SET_OUTPUT_BLOCK[rip]
	mov	DWORD PTR 4[rsp], eax
	mov	rax, QWORD PTR 24[r12]
	call	[QWORD PTR [rax]]
	cmp	DWORD PTR MPP_OK[rip], eax
	lea	rdx, .LC5[rip]
	mov	ecx, eax
	jne	.L19
	mov	eax, DWORD PTR RECEIVE_FRAME_TIMEOUT[rip]
	mov	rdx, rsp
	mov	edi, DWORD PTR 16[r12]
	mov	esi, DWORD PTR MPP_SET_OUTPUT_BLOCK_TIMEOUT[rip]
	mov	DWORD PTR [rsp], eax
	mov	rax, QWORD PTR 24[r12]
	call	[QWORD PTR [rax]]
	cmp	DWORD PTR MPP_OK[rip], eax
	lea	rdx, .LC6[rip]
	mov	ecx, eax
	jne	.L19
	mov	esi, DWORD PTR MPP_BUFFER_TYPE_ION[rip]
	lea	rdi, 8[r12]
	call	mpp_buffer_group_get_internal@PLT
	lea	rdx, .LC7[rip]
	mov	ecx, eax
	test	eax, eax
	jne	.L19
	mov	rax, QWORD PTR 24[r12]
	mov	rdx, QWORD PTR 8[r12]
	mov	edi, DWORD PTR 16[r12]
	mov	esi, DWORD PTR MPP_DEC_SET_EXT_BUF_GROUP[rip]
	call	[QWORD PTR [rax]]
	lea	rdx, .LC8[rip]
	mov	ecx, eax
	test	eax, eax
	jne	.L19
	mov	rdi, QWORD PTR 8[r12]
	mov	edx, DWORD PTR FRAMEGROUP_MAX_FRAMES[rip]
	xor	esi, esi
	call	mpp_buffer_group_limit_config@PLT
	mov	r13d, eax
	test	eax, eax
	jne	.L24
	mov	DWORD PTR [r12], 1
	mov	esi, DWORD PTR AV_LOG_DEBUG[rip]
	mov	rdi, rbp
	xor	eax, eax
	lea	rdx, .LC10[rip]
	call	av_log@PLT
	mov	edi, DWORD PTR AV_HWDEVICE_TYPE_DRM[rip]
	call	av_hwdevice_ctx_alloc@PLT
	mov	DWORD PTR 4[r12], eax
	mov	edi, eax
	test	eax, eax
	je	.L18
	call	av_hwdevice_ctx_init@PLT
	test	eax, eax
	jns	.L1
	mov	r13d, eax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L22:
	mov	ecx, DWORD PTR 0[rbp]
	lea	rdx, .LC1[rip]
	jmp	.L19
.L24:
	mov	ecx, eax
	lea	rdx, .LC9[rip]
	jmp	.L19
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	rkmpp_init_decoder, .-rkmpp_init_decoder
	.comm	rkmpp_release_decoder,4,4
	.comm	RECEIVE_FRAME_TIMEOUT,4,4
	.comm	MPP_VIDEO_CodingUnused,8,8
	.comm	MPP_SET_OUTPUT_BLOCK_TIMEOUT,4,4
	.comm	MPP_SET_OUTPUT_BLOCK,4,4
	.comm	MPP_POLL_BLOCK,4,4
	.comm	MPP_OK,4,4
	.comm	MPP_DEC_SET_EXT_BUF_GROUP,4,4
	.comm	MPP_CTX_DEC,4,4
	.comm	MPP_BUFFER_TYPE_ION,4,4
	.comm	FRAMEGROUP_MAX_FRAMES,4,4
	.comm	ENOMEM,4,4
	.comm	AV_PIX_FMT_DRM_PRIME,4,4
	.comm	AV_LOG_ERROR,4,4
	.comm	AV_LOG_DEBUG,4,4
	.comm	AV_HWDEVICE_TYPE_DRM,4,4
	.comm	AV_BUFFER_FLAG_READONLY,4,4
	.comm	AVERROR_UNKNOWN,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_rkmppdec.c_rkmpp_init_decoder.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Initializing RKMPP decoder.\012\000"
	.align	2
.LC1:
	.ascii	"Unknown codec type (%d).\012\000"
	.align	2
.LC2:
	.ascii	"Codec type (%d) unsupported by MPP\012\000"
	.align	2
.LC3:
	.ascii	"Failed to create MPP context (code = %d).\012\000"
	.align	2
.LC4:
	.ascii	"Failed to initialize MPP context (code = %d).\012\000"
	.align	2
.LC5:
	.ascii	"Failed to set blocking mode on MPI (code = %d).\012"
	.ascii	"\000"
	.align	2
.LC6:
	.ascii	"Failed to set block timeout on MPI (code = %d).\012"
	.ascii	"\000"
	.align	2
.LC7:
	.ascii	"Failed to retrieve buffer group (code = %d)\012\000"
	.align	2
.LC8:
	.ascii	"Failed to assign buffer group (code = %d)\012\000"
	.align	2
.LC9:
	.ascii	"Failed to set buffer group limit (code = %d)\012\000"
	.align	2
.LC10:
	.ascii	"RKMPP decoder initialized successfully.\012\000"
	.align	2
.LC11:
	.ascii	"Failed to initialize RKMPP decoder.\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rkmpp_init_decoder, %function
rkmpp_init_decoder:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r4, r0
	ldr	r3, .L29
	ldr	r2, .L29+4
	ldr	r3, [r3]
	sub	sp, sp, #28
	ldr	r2, [r2]
	str	r2, [sp, #20]
	mov	r2,#0
	mov	r0, #20
	str	r3, [r4, #4]
	ldr	r6, [r4, #8]
	bl	av_mallocz
	subs	r5, r0, #0
	beq	.L18
	ldr	r3, .L29+8
	ldr	r2, .L29+12
	ldr	r3, [r3]
	ldr	r2, [r2]
	mov	r1, #20
	str	r3, [sp]
	mov	r3, #0
	bl	av_buffer_create
	cmp	r0, #0
	str	r0, [r6]
	beq	.L20
	ldr	r8, .L29+16
	ldr	r2, .L29+20
	ldr	r1, [r8]
	mov	r0, r4
	bl	av_log
	mov	r0, r4
	bl	rkmpp_get_codingtype
	ldr	r3, .L29+24
	mov	r6, r0
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L21
	ldr	r9, .L29+28
	mov	r1, r0
	ldr	r0, [r9]
	bl	mpp_check_support_format
	ldr	r7, .L29+32
	ldr	r3, [r7]
	cmp	r3, r0
	beq	.L6
	ldr	r5, .L29+36
	ldr	r3, [r4]
	mov	r0, r4
	ldr	r1, [r5]
	ldr	r2, .L29+40
	bl	av_log
	ldr	r3, .L29+44
	ldr	r6, [r3]
.L3:
	mov	r0, r4
	ldr	r1, [r5]
	ldr	r2, .L29+48
	bl	av_log
	mov	r0, r4
	bl	rkmpp_close_decoder
.L1:
	ldr	r3, .L29+4
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L22
	mov	r0, r6
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L20:
	mov	r0, r5
	bl	av_free
.L18:
	ldr	r3, .L29+52
	ldr	r5, .L29+36
	ldr	r0, [r3]
	bl	AVERROR
	mov	r6, r0
	b	.L3
.L6:
	add	r1, r5, #16
	add	r0, r5, #12
	bl	mpp_create
	ldr	r2, [r7]
	cmp	r2, r0
	bne	.L23
	mov	r2, r6
	ldr	r1, [r9]
	ldr	r0, [r5, #12]
	bl	mpp_init
	ldr	r2, [r7]
	cmp	r2, r0
	bne	.L24
	ldr	r3, .L29+56
	ldr	r2, .L29+60
	ldr	r1, [r3]
	ldr	r3, [r5, #16]
	str	r1, [sp, #16]
	ldr	r3, [r3]
	ldr	r1, [r2]
	ldr	r0, [r5, #12]
	add	r2, sp, #16
	blx	r3
	ldr	r2, [r7]
	cmp	r2, r0
	bne	.L25
	ldr	r3, .L29+64
	ldr	r2, .L29+68
	ldr	r1, [r3]
	ldr	r3, [r5, #16]
	str	r1, [sp, #12]
	ldr	r3, [r3]
	ldr	r1, [r2]
	ldr	r0, [r5, #12]
	add	r2, sp, #12
	blx	r3
	ldr	r2, [r7]
	mov	r3, r0
	cmp	r2, r0
	beq	.L10
	ldr	r5, .L29+36
	mov	r0, r4
	ldr	r1, [r5]
	ldr	r2, .L29+72
	bl	av_log
	ldr	r3, .L29+44
	ldr	r6, [r3]
	b	.L3
.L21:
	ldr	r5, .L29+36
	ldr	r3, [r4]
	mov	r0, r4
	ldr	r1, [r5]
	ldr	r2, .L29+76
	bl	av_log
	ldr	r3, .L29+44
	ldr	r6, [r3]
	b	.L3
.L23:
	ldr	r5, .L29+36
	mov	r3, r0
	ldr	r1, [r5]
	mov	r0, r4
	ldr	r2, .L29+80
	bl	av_log
	ldr	r3, .L29+44
	ldr	r6, [r3]
	b	.L3
.L25:
	ldr	r5, .L29+36
	mov	r3, r0
	ldr	r1, [r5]
	mov	r0, r4
	ldr	r2, .L29+84
	bl	av_log
	ldr	r3, .L29+44
	ldr	r6, [r3]
	b	.L3
.L24:
	ldr	r5, .L29+36
	mov	r3, r0
	ldr	r1, [r5]
	mov	r0, r4
	ldr	r2, .L29+88
	bl	av_log
	ldr	r3, .L29+44
	ldr	r6, [r3]
	b	.L3
.L10:
	ldr	r3, .L29+92
	add	r0, r5, #8
	ldr	r1, [r3]
	bl	mpp_buffer_group_get_internal
	subs	r3, r0, #0
	bne	.L26
	ldr	r2, .L29+96
	ldr	r3, [r5, #16]
	ldr	r1, [r2]
	ldr	r3, [r3]
	ldr	r2, [r5, #8]
	ldr	r0, [r5, #12]
	blx	r3
	subs	r3, r0, #0
	bne	.L27
	ldr	r3, .L29+100
	mov	r1, #0
	ldr	r2, [r3]
	ldr	r0, [r5, #8]
	bl	mpp_buffer_group_limit_config
	subs	r6, r0, #0
	bne	.L28
	mov	r3, #1
	ldr	r1, [r8]
	ldr	r2, .L29+104
	str	r3, [r5]
	mov	r0, r4
	bl	av_log
	ldr	r3, .L29+108
	ldr	r0, [r3]
	bl	av_hwdevice_ctx_alloc
	cmp	r0, #0
	str	r0, [r5, #4]
	beq	.L18
	bl	av_hwdevice_ctx_init
	cmp	r0, #0
	bge	.L1
	mov	r6, r0
	ldr	r5, .L29+36
	b	.L3
.L27:
	ldr	r5, .L29+36
	mov	r0, r4
	ldr	r1, [r5]
	ldr	r2, .L29+112
	bl	av_log
	ldr	r3, .L29+44
	ldr	r6, [r3]
	b	.L3
.L26:
	ldr	r5, .L29+36
	mov	r0, r4
	ldr	r1, [r5]
	ldr	r2, .L29+116
	bl	av_log
	ldr	r3, .L29+44
	ldr	r6, [r3]
	b	.L3
.L28:
	ldr	r5, .L29+36
	mov	r3, r6
	mov	r0, r4
	ldr	r1, [r5]
	ldr	r2, .L29+120
	bl	av_log
	ldr	r3, .L29+44
	ldr	r6, [r3]
	b	.L3
.L22:
	bl	__stack_chk_fail
.L30:
	.align	2
.L29:
	.word	AV_PIX_FMT_DRM_PRIME
	.word	.LC12
	.word	AV_BUFFER_FLAG_READONLY
	.word	rkmpp_release_decoder
	.word	AV_LOG_DEBUG
	.word	.LC0
	.word	MPP_VIDEO_CodingUnused
	.word	MPP_CTX_DEC
	.word	MPP_OK
	.word	AV_LOG_ERROR
	.word	.LC2
	.word	AVERROR_UNKNOWN
	.word	.LC11
	.word	ENOMEM
	.word	MPP_POLL_BLOCK
	.word	MPP_SET_OUTPUT_BLOCK
	.word	RECEIVE_FRAME_TIMEOUT
	.word	MPP_SET_OUTPUT_BLOCK_TIMEOUT
	.word	.LC6
	.word	.LC1
	.word	.LC3
	.word	.LC5
	.word	.LC4
	.word	MPP_BUFFER_TYPE_ION
	.word	MPP_DEC_SET_EXT_BUF_GROUP
	.word	FRAMEGROUP_MAX_FRAMES
	.word	.LC10
	.word	AV_HWDEVICE_TYPE_DRM
	.word	.LC8
	.word	.LC7
	.word	.LC9
	.size	rkmpp_init_decoder, .-rkmpp_init_decoder
	.comm	rkmpp_release_decoder,4,4
	.comm	RECEIVE_FRAME_TIMEOUT,4,4
	.comm	MPP_VIDEO_CodingUnused,4,4
	.comm	MPP_SET_OUTPUT_BLOCK_TIMEOUT,4,4
	.comm	MPP_SET_OUTPUT_BLOCK,4,4
	.comm	MPP_POLL_BLOCK,4,4
	.comm	MPP_OK,4,4
	.comm	MPP_DEC_SET_EXT_BUF_GROUP,4,4
	.comm	MPP_CTX_DEC,4,4
	.comm	MPP_BUFFER_TYPE_ION,4,4
	.comm	FRAMEGROUP_MAX_FRAMES,4,4
	.comm	ENOMEM,4,4
	.comm	AV_PIX_FMT_DRM_PRIME,4,4
	.comm	AV_LOG_ERROR,4,4
	.comm	AV_LOG_DEBUG,4,4
	.comm	AV_HWDEVICE_TYPE_DRM,4,4
	.comm	AV_BUFFER_FLAG_READONLY,4,4
	.comm	AVERROR_UNKNOWN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
