	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtk_mdp_comp_init              ## -- Begin function mtk_mdp_comp_init
	.p2align	4, 0x90
_mtk_mdp_comp_init:                     ## @mtk_mdp_comp_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movq	_MTK_MDP_COMP_ID_MAX@GOTPCREL(%rip), %rax
	cmpl	%ecx, (%rax)
	jbe	LBB0_11
## %bb.1:
	movq	%rdx, %r13
	movq	%rsi, %r15
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	callq	_of_node_get
	movl	%eax, 36(%r13)
	movl	%ebx, (%r13)
	movq	_mtk_mdp_matches@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ebx, %ecx
	movq	(%rax,%rcx,8), %rax
	movq	%rax, 8(%r13)
	xorl	%r12d, %r12d
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_of_iomap
	movl	%eax, 32(%r13)
	movq	24(%r13), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_5
## %bb.2:
	xorl	%ebx, %ebx
	movq	_MTK_MDP_RDMA@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_of_clk_get
	movq	24(%r13), %rdi
	movl	%eax, (%rdi,%rbx,4)
	movq	8(%r13), %rax
	cmpq	(%r14), %rax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_3
LBB0_5:
	movq	$0, 16(%r13)
	movq	8(%r13), %rax
	movq	_MTK_MDP_RDMA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.6:
	movq	_MTK_MDP_WDMA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.7:
	movq	_MTK_MDP_WROT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
LBB0_8:
	leaq	L_.str.1(%rip), %rsi
	xorl	%r12d, %r12d
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_of_parse_phandle
	testq	%rax, %rax
	je	LBB0_15
## %bb.9:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_of_find_device_by_node
	testq	%rax, %rax
	je	LBB0_16
## %bb.10:
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_of_node_put
	movq	%r15, 16(%r13)
	xorl	%r12d, %r12d
	jmp	LBB0_14
LBB0_11:
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_12:
	xorl	%r12d, %r12d
LBB0_13:
	subl	(%rax), %r12d
LBB0_14:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	leaq	L_.str.2(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %edx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_16:
	leaq	L_.str.3(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_dev_warn
	movq	%rbx, %rdi
	callq	_of_node_put
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rax
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_MTK_MDP_COMP_ID_MAX,4,2        ## @MTK_MDP_COMP_ID_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid comp_id %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_mtk_mdp_matches,8,3            ## @mtk_mdp_matches
	.comm	_MTK_MDP_RDMA,8,3               ## @MTK_MDP_RDMA
	.comm	_MTK_MDP_WDMA,8,3               ## @MTK_MDP_WDMA
	.comm	_MTK_MDP_WROT,8,3               ## @MTK_MDP_WROT
L_.str.1:                               ## @.str.1
	.asciz	"mediatek,larb"

L_.str.2:                               ## @.str.2
	.asciz	"Missing mediadek,larb phandle in %pOF node\n"

L_.str.3:                               ## @.str.3
	.asciz	"Waiting for larb device %pOF\n"

	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtk_mdp_comp_init              ; -- Begin function mtk_mdp_comp_init
	.p2align	2
_mtk_mdp_comp_init:                     ; @mtk_mdp_comp_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x3
	mov	x19, x0
Lloh0:
	adrp	x8, _MTK_MDP_COMP_ID_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MTK_MDP_COMP_ID_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w3
	b.ls	LBB0_9
; %bb.1:
	mov	x20, x2
	mov	x21, x1
	mov	x0, x1
	bl	_of_node_get
	str	w0, [x20, #36]
	str	w22, [x20]
Lloh3:
	adrp	x8, _mtk_mdp_matches@GOTPAGE
Lloh4:
	ldr	x8, [x8, _mtk_mdp_matches@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	x8, [x8, w22, uxtw #3]
	str	x8, [x20, #8]
	mov	x0, x21
	mov	w1, #0
	bl	_of_iomap
	str	w0, [x20, #32]
	ldr	x0, [x20, #24]
	bl	_ARRAY_SIZE
Lloh6:
	adrp	x23, _MTK_MDP_RDMA@GOTPAGE
Lloh7:
	ldr	x23, [x23, _MTK_MDP_RDMA@GOTPAGEOFF]
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.2:
	mov	x22, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x22
	bl	_of_clk_get
	mov	x8, x0
	ldr	x0, [x20, #24]
	str	w8, [x0, x22, lsl #2]
	ldr	x8, [x20, #8]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x22, x22, #1
	bl	_ARRAY_SIZE
	cmp	x22, w0, sxtw
	b.lt	LBB0_3
LBB0_5:
	str	xzr, [x20, #16]
	ldr	x8, [x20, #8]
	ldr	x9, [x23]
Lloh8:
	adrp	x10, _MTK_MDP_WDMA@GOTPAGE
Lloh9:
	ldr	x10, [x10, _MTK_MDP_WDMA@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
Lloh11:
	adrp	x11, _MTK_MDP_WROT@GOTPAGE
Lloh12:
	ldr	x11, [x11, _MTK_MDP_WROT@GOTPAGEOFF]
Lloh13:
	ldr	x11, [x11]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	ccmp	x8, x11, #4, ne
	b.ne	LBB0_12
; %bb.6:
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	w2, #0
	bl	_of_parse_phandle
	cbz	x0, LBB0_14
; %bb.7:
	mov	x22, x0
	bl	_of_find_device_by_node
	cbz	x0, LBB0_15
; %bb.8:
	mov	x21, x0
	mov	x0, x22
	bl	_of_node_put
	mov	w0, #0
	str	x21, [x20, #16]
	b	LBB0_13
LBB0_9:
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x22
LBB0_10:
	bl	_dev_err
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_12:
	mov	w0, #0
LBB0_13:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_14:
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	b	LBB0_10
LBB0_15:
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_dev_warn
	mov	x0, x22
	bl	_of_node_put
Lloh24:
	adrp	x8, _EPROBE_DEFER@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EPROBE_DEFER@GOTPAGEOFF]
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_MTK_MDP_COMP_ID_MAX,4,2        ; @MTK_MDP_COMP_ID_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid comp_id %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_mtk_mdp_matches,8,3            ; @mtk_mdp_matches
	.comm	_MTK_MDP_RDMA,8,3               ; @MTK_MDP_RDMA
	.comm	_MTK_MDP_WDMA,8,3               ; @MTK_MDP_WDMA
	.comm	_MTK_MDP_WROT,8,3               ; @MTK_MDP_WROT
l_.str.1:                               ; @.str.1
	.asciz	"mediatek,larb"

l_.str.2:                               ; @.str.2
	.asciz	"Missing mediadek,larb phandle in %pOF node\n"

l_.str.3:                               ; @.str.3
	.asciz	"Waiting for larb device %pOF\n"

	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
.subsections_via_symbols
