	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtk_vcodec_dec_clock_on        ## -- Begin function mtk_vcodec_dec_clock_on
	.p2align	4, 0x90
_mtk_vcodec_dec_clock_on:               ## @mtk_vcodec_dec_clock_on
	.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
	cmpl	$0, 8(%rdi)
	jle	LBB0_1
## %bb.2:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r14), %rax
	movl	(%rax,%rbx,8), %edi
	callq	_clk_prepare_enable
	testl	%eax, %eax
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movslq	8(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_3
	jmp	LBB0_6
LBB0_1:
	xorl	%ebx, %ebx
LBB0_6:
	movl	(%r14), %edi
	callq	_mtk_smi_larb_get
	testl	%eax, %eax
	je	LBB0_11
## %bb.7:
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_mtk_v4l2_err
	testl	%ebx, %ebx
	jg	LBB0_9
	jmp	LBB0_11
LBB0_4:
	movq	16(%r14), %rcx
	movl	4(%rcx,%rbx,8), %edx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_mtk_v4l2_err
	testl	%ebx, %ebx
	jle	LBB0_11
LBB0_9:
	movl	%ebx, %ebx
	incq	%rbx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r14), %rax
	movl	-16(%rax,%rbx,8), %edi
	callq	_clk_disable_unprepare
	decq	%rbx
	cmpq	$1, %rbx
	ja	LBB0_10
LBB0_11:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"clk_prepare_enable %d %s fail %d"

L_.str.1:                               ## @.str.1
	.asciz	"mtk_smi_larb_get larbvdec fail %d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtk_vcodec_dec_clock_on        ; -- Begin function mtk_vcodec_dec_clock_on
	.p2align	2
_mtk_vcodec_dec_clock_on:               ; @mtk_vcodec_dec_clock_on
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	ldr	w8, [x0, #8]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x21, #0
	mov	x20, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	w0, [x8, x21]
	bl	_clk_prepare_enable
                                        ; kill: def $w0 killed $w0 def $x0
	cbnz	w0, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x20, x20, #1
	ldrsw	x8, [x19, #8]
	add	x21, x21, #8
	cmp	x20, x8
	b.lt	LBB0_2
	b	LBB0_5
LBB0_4:
	mov	w20, #0
LBB0_5:
	ldr	w0, [x19]
	bl	_mtk_smi_larb_get
	cbz	w0, LBB0_11
; %bb.6:
	mov	x1, x0
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_7:
	ldr	x8, [x19, #16]
	add	x8, x8, x21
	ldr	w8, [x8, #4]
	stp	x8, x0, [sp]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
LBB0_8:
	bl	_mtk_v4l2_err
	cmp	w20, #1
	b.lt	LBB0_11
; %bb.9:
	mov	w8, w20
	add	x20, x8, #1
	lsl	x8, x8, #3
	sub	x21, x8, #8
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	w0, [x8, x21]
	bl	_clk_disable_unprepare
	sub	x20, x20, #1
	sub	x21, x21, #8
	cmp	x20, #1
	b.hi	LBB0_10
LBB0_11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"clk_prepare_enable %d %s fail %d"

l_.str.1:                               ; @.str.1
	.asciz	"mtk_smi_larb_get larbvdec fail %d"

.subsections_via_symbols
