	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vdec_h264_init
_vdec_h264_init:                        ## @vdec_h264_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$48, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r14, 40(%rax)
	movq	_IPI_VDEC_H264@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
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_mtk_vcodec_err
	jmp	LBB0_7
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_8
LBB0_4:
	movq	(%rbx), %rax
	movq	%rax, 32(%rbx)
	movq	%rbx, %rdi
	callq	_allocate_predication_buf
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_vpu_dec_deinit
LBB0_7:
	movq	%rbx, %rdi
	callq	_kfree
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movq	%rbx, %rdx
	callq	_mtk_vcodec_debug
	movq	%rbx, (%r14)
	xorl	%r15d, %r15d
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IPI_VDEC_H264,4,2              ## @IPI_VDEC_H264
	.comm	_vpu_dec_ipi_handler,4,2        ## @vpu_dec_ipi_handler
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vdec_h264 init err=%d"

L_.str.1:                               ## @.str.1
	.asciz	"H264 Instance >> %p"

	.no_dead_strip	_vdec_h264_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vdec_h264_init
_vdec_h264_init:                        ; @vdec_h264_init
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #48
	bl	_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	str	x20, [x0, #40]
Lloh3:
	adrp	x8, _IPI_VDEC_H264@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IPI_VDEC_H264@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	x9, [x20, #8]
	ldr	w9, [x9]
	stp	w9, w8, [x0, #24]
	str	x20, [x0, #16]
Lloh6:
	adrp	x8, _vpu_dec_ipi_handler@GOTPAGE
Lloh7:
	ldr	x8, [x8, _vpu_dec_ipi_handler@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x0, #8]
	bl	_vpu_dec_init
	cbz	w0, LBB0_4
; %bb.2:
	mov	x21, x0
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_mtk_vcodec_err
	b	LBB0_6
LBB0_3:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_7
LBB0_4:
	ldr	x8, [x19]
	str	x8, [x19, #32]
	mov	x0, x19
	bl	_allocate_predication_buf
	mov	x21, x0
	cbz	w0, LBB0_8
; %bb.5:
	mov	x0, x19
	bl	_vpu_dec_deinit
LBB0_6:
	mov	x0, x19
	bl	_kfree
LBB0_7:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_8:
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x19
	bl	_mtk_vcodec_debug
	str	x19, [x20]
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IPI_VDEC_H264,4,2              ; @IPI_VDEC_H264
	.comm	_vpu_dec_ipi_handler,4,2        ; @vpu_dec_ipi_handler
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vdec_h264 init err=%d"

l_.str.1:                               ; @.str.1
	.asciz	"H264 Instance >> %p"

	.no_dead_strip	_vdec_h264_init
.subsections_via_symbols
