	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtk_mdp_vpu_init               ## -- Begin function mtk_mdp_vpu_init
	.p2align	4, 0x90
_mtk_mdp_vpu_init:                      ## @mtk_mdp_vpu_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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	callq	_vpu_to_ctx
	movq	(%rax), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	_AP_MDP_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -12(%rbp)
	movq	_IPI_MDP@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, -16(%rbp)
	movq	%rbx, -24(%rbp)
	leaq	-24(%rbp), %rdi
	movl	$16, %esi
	movq	%rbx, %rdx
	callq	_mtk_mdp_vpu_send_msg
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	cmpq	$0, (%rbx)
	je	LBB0_2
## %bb.3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_4
LBB0_2:
	xorl	%eax, %eax
LBB0_4:
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AP_MDP_INIT,4,2                ## @AP_MDP_INIT
	.comm	_IPI_MDP,4,2                    ## @IPI_MDP
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtk_mdp_vpu_init               ; -- Begin function mtk_mdp_vpu_init
	.p2align	2
_mtk_mdp_vpu_init:                      ; @mtk_mdp_vpu_init
	.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
	bl	_vpu_to_ctx
	ldr	x8, [x0]
	ldr	w8, [x8]
	str	w8, [x19, #8]
Lloh0:
	adrp	x8, _AP_MDP_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AP_MDP_INIT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _IPI_MDP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IPI_MDP@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x9]
	stp	w3, w8, [sp, #8]
	str	x19, [sp]
	mov	x0, sp
	mov	w1, #16
	mov	x2, x19
	bl	_mtk_mdp_vpu_send_msg
	cbnz	w0, LBB0_4
; %bb.1:
	ldr	x8, [x19]
	cbz	x8, LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_4
LBB0_3:
	mov	w0, #0
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_AP_MDP_INIT,4,2                ; @AP_MDP_INIT
	.comm	_IPI_MDP,4,2                    ; @IPI_MDP
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
