	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vdec_vp9_init
_vdec_vp9_init:                         ## @vdec_vp9_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_vp9_alloc_inst
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rbx
	movq	$0, 48(%rax)
	movq	%r14, 40(%rax)
	movq	_IPI_VDEC_VP9@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movq	8(%r14), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	%r14, 16(%rbx)
	movq	_vpu_dec_ipi_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	%rbx, %rdi
	callq	_vpu_dec_init
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_mtk_vcodec_err
	movq	%rbx, %rdi
	callq	_vp9_free_inst
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_5:
	movq	(%rbx), %rax
	movq	%rax, 32(%rbx)
	movq	%rbx, %rdi
	callq	_init_all_fb_lists
	movq	%rbx, (%r14)
	xorl	%eax, %eax
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IPI_VDEC_VP9,4,2               ## @IPI_VDEC_VP9
	.comm	_vpu_dec_ipi_handler,4,2        ## @vpu_dec_ipi_handler
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vp9_dec_vpu_init failed"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_vdec_vp9_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vdec_vp9_init
_vdec_vp9_init:                         ; @vdec_vp9_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	bl	_vp9_alloc_inst
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	stp	x20, xzr, [x0, #40]
Lloh0:
	adrp	x8, _IPI_VDEC_VP9@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IPI_VDEC_VP9@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	x9, [x20, #8]
	ldr	w9, [x9]
	stp	w9, w8, [x0, #24]
	str	x20, [x0, #16]
Lloh3:
	adrp	x8, _vpu_dec_ipi_handler@GOTPAGE
Lloh4:
	ldr	x8, [x8, _vpu_dec_ipi_handler@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x0, #8]
	bl	_vpu_dec_init
	cbz	x0, LBB0_5
; %bb.2:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_mtk_vcodec_err
	mov	x0, x19
	bl	_vp9_free_inst
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_5:
	ldr	x8, [x19]
	str	x8, [x19, #32]
	mov	x0, x19
	bl	_init_all_fb_lists
	mov	w0, #0
	str	x19, [x20]
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IPI_VDEC_VP9,4,2               ; @IPI_VDEC_VP9
	.comm	_vpu_dec_ipi_handler,4,2        ; @vpu_dec_ipi_handler
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vp9_dec_vpu_init failed"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_vdec_vp9_init
.subsections_via_symbols
