	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vp9_decode_end_proc
_vp9_decode_end_proc:                   ## @vp9_decode_end_proc
	.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, %rbx
	movq	8(%rdi), %r14
	cmpl	$0, 12(%r14)
	je	LBB0_1
## %bb.6:
	movl	(%r14), %edx
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_mtk_vcodec_debug
LBB0_7:
	movq	%rbx, %rdi
	callq	_vp9_swap_frm_bufs
	incl	(%r14)
	movl	$1, %r14d
LBB0_8:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	movq	%rbx, %rdi
	callq	_vp9_wait_dec_end
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movq	%rbx, %rdi
	callq	_vpu_dec_end
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_mtk_vcodec_err
	jmp	LBB0_8
LBB0_2:
	movl	(%r14), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_mtk_vcodec_err
	jmp	LBB0_8
LBB0_5:
	movl	8(%r14), %ecx
	movl	(%r14), %edx
	movl	4(%r14), %r8d
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_mtk_vcodec_debug
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Decode failed, Decode Timeout @[%d]"

L_.str.1:                               ## @.str.1
	.asciz	"vp9_dec_vpu_end failed"

L_.str.2:                               ## @.str.2
	.asciz	"Decode Ok @%d (%d/%d)"

L_.str.3:                               ## @.str.3
	.asciz	"Decode Ok @%d (show_existing_frame)"

	.no_dead_strip	_vp9_decode_end_proc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vp9_decode_end_proc
_vp9_decode_end_proc:                   ; @vp9_decode_end_proc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x20, [x0, #8]
	ldr	w8, [x20, #12]
	cbz	w8, LBB0_3
; %bb.1:
	ldr	w2, [x20]
Lloh0:
	adrp	x1, l_.str.3@PAGE
Lloh1:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_2:
	mov	x0, x19
	bl	_mtk_vcodec_debug
	mov	x0, x19
	bl	_vp9_swap_frm_bufs
	ldr	w8, [x20]
	add	w8, w8, #1
	str	w8, [x20]
	mov	w0, #1
	b	LBB0_8
LBB0_3:
	mov	x0, x19
	bl	_vp9_wait_dec_end
	cbz	w0, LBB0_6
; %bb.4:
	mov	x0, x19
	bl	_vpu_dec_end
	cbz	x0, LBB0_9
; %bb.5:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_6:
	ldr	w8, [x20]
	str	x8, [sp]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
LBB0_7:
	mov	x0, x19
	bl	_mtk_vcodec_err
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_9:
	ldp	w9, w8, [x20, #4]
	ldr	w2, [x20]
	stp	x8, x9, [sp]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_2
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Decode failed, Decode Timeout @[%d]"

l_.str.1:                               ; @.str.1
	.asciz	"vp9_dec_vpu_end failed"

l_.str.2:                               ; @.str.2
	.asciz	"Decode Ok @%d (%d/%d)"

l_.str.3:                               ; @.str.3
	.asciz	"Decode Ok @%d (show_existing_frame)"

	.no_dead_strip	_vp9_decode_end_proc
.subsections_via_symbols
