	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rcar_du_vsp_init               ## -- Begin function rcar_du_vsp_init
	.p2align	4, 0x90
_rcar_du_vsp_init:                      ## @rcar_du_vsp_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	24(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %edi
	callq	_hweight32
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_of_find_device_by_node
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, 16(%r15)
	movq	%rax, %rdi
	callq	_vsp1_du_init
	testl	%eax, %eax
	js	LBB0_14
## %bb.4:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %rax
	xorl	%esi, %esi
	cmpl	$3, (%rax)
	setge	%sil
	orl	$4, %esi
	movl	%esi, (%r15)
	movl	4(%rcx), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$16, %edx
	callq	_devm_kcalloc
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_16
## %bb.5:
	cmpl	$0, (%r15)
	je	LBB0_13
## %bb.6:
	movl	%r14d, %ecx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	$4, %edx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	_DRM_PLANE_TYPE_OVERLAY@GOTPCREL(%rip), %rcx
	cmpq	-64(%rbp), %r13                 ## 8-byte Folded Reload
	jae	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	_DRM_PLANE_TYPE_PRIMARY@GOTPCREL(%rip), %rcx
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movl	(%rcx), %r14d
	leaq	(%rax,%rdx), %rbx
	movq	%r15, %r12
	movq	%r15, 4(%rax,%rdx)
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movl	%r13d, -4(%rax,%rdx)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_rcar_du_vsp_formats@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	%r15d, %edi
	callq	_ARRAY_SIZE
	subq	$8, %rsp
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movq	%rbx, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	_rcar_du_vsp_plane_funcs@GOTPCREL(%rip), %rcx
	movl	%r15d, %r8d
	movl	%eax, %r9d
	pushq	$0
	pushq	%r14
	pushq	$0
	callq	_drm_universal_plane_init
	addq	$32, %rsp
	testl	%eax, %eax
	js	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%rbx, %rdi
	movq	_rcar_du_vsp_plane_helper_funcs@GOTPCREL(%rip), %rsi
	callq	_drm_plane_helper_add
	movq	_DRM_PLANE_TYPE_PRIMARY@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	movq	%r12, %r15
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%rbx, %rdi
	callq	_drm_plane_create_alpha_property
	movl	(%r15), %ecx
	decl	%ecx
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$1, %edx
	callq	_drm_plane_create_zpos_property
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%r13
	movl	(%r15), %eax
	cmpq	%rax, %r13
	jae	LBB0_13
## %bb.15:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%r15), %rax
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	addq	$16, %rdx
	jmp	LBB0_7
LBB0_1:
	movq	_ENXIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_13:
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_16:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DRM_PLANE_TYPE_PRIMARY,4,2     ## @DRM_PLANE_TYPE_PRIMARY
	.comm	_DRM_PLANE_TYPE_OVERLAY,4,2     ## @DRM_PLANE_TYPE_OVERLAY
	.comm	_rcar_du_vsp_plane_funcs,4,2    ## @rcar_du_vsp_plane_funcs
	.comm	_rcar_du_vsp_formats,4,2        ## @rcar_du_vsp_formats
	.comm	_rcar_du_vsp_plane_helper_funcs,4,2 ## @rcar_du_vsp_plane_helper_funcs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rcar_du_vsp_init               ; -- Begin function rcar_du_vsp_init
	.p2align	2
_rcar_du_vsp_init:                      ; @rcar_du_vsp_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	ldr	x27, [x0, #24]
	mov	x0, x2
	bl	_hweight32
	mov	x23, x0
	mov	x0, x21
	bl	_of_find_device_by_node
	cbz	x0, LBB0_10
; %bb.1:
	str	x0, [x20, #16]
	bl	_vsp1_du_init
	tbnz	w0, #31, LBB0_14
; %bb.2:
	ldr	x8, [x27, #8]
	ldr	w8, [x8]
	cmp	w8, #2
	mov	w8, #4
	cinc	w1, w8, gt
	str	w1, [x20]
	ldr	w0, [x27, #4]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	w2, #16
	bl	_devm_kcalloc
	str	x0, [x20, #8]
	cbz	x0, LBB0_12
; %bb.3:
	ldr	w8, [x20]
	cbz	w8, LBB0_11
; %bb.4:
	mov	x28, #0
	mov	x21, #0
Lloh3:
	adrp	x25, _DRM_PLANE_TYPE_PRIMARY@GOTPAGE
Lloh4:
	ldr	x25, [x25, _DRM_PLANE_TYPE_PRIMARY@GOTPAGEOFF]
	mov	w8, w23
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	cmp	x21, x8
Lloh5:
	adrp	x8, _DRM_PLANE_TYPE_OVERLAY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DRM_PLANE_TYPE_OVERLAY@GOTPAGEOFF]
	csel	x8, x25, x8, lo
	ldr	w24, [x8]
	add	x8, x0, x28
	str	x20, [x8, #8]
	str	w21, [x8]
	ldr	w22, [x27]
	add	x23, x8, #4
Lloh7:
	adrp	x8, _rcar_du_vsp_formats@GOTPAGE
Lloh8:
	ldr	x8, [x8, _rcar_du_vsp_formats@GOTPAGEOFF]
Lloh9:
	ldr	w26, [x8]
	mov	x0, x26
	bl	_ARRAY_SIZE
	mov	x5, x0
	str	xzr, [sp]
	mov	x0, x22
	mov	x1, x23
	mov	x2, x19
Lloh10:
	adrp	x3, _rcar_du_vsp_plane_funcs@GOTPAGE
Lloh11:
	ldr	x3, [x3, _rcar_du_vsp_plane_funcs@GOTPAGEOFF]
	mov	x4, x26
	mov	x6, #0
	mov	x7, x24
	bl	_drm_universal_plane_init
	tbnz	w0, #31, LBB0_14
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x23
Lloh12:
	adrp	x1, _rcar_du_vsp_plane_helper_funcs@GOTPAGE
Lloh13:
	ldr	x1, [x1, _rcar_du_vsp_plane_helper_funcs@GOTPAGEOFF]
	bl	_drm_plane_helper_add
	ldr	w8, [x25]
	cmp	w24, w8
	b.eq	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x23
	bl	_drm_plane_create_alpha_property
	ldr	w8, [x20]
	sub	w3, w8, #1
	mov	x0, x23
	mov	w1, #1
	mov	w2, #1
	bl	_drm_plane_create_zpos_property
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x21, x21, #1
	ldr	w8, [x20]
	cmp	x21, x8
	b.hs	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [x20, #8]
	add	x28, x28, #16
	b	LBB0_5
LBB0_10:
Lloh14:
	adrp	x8, _ENXIO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_13
LBB0_11:
	mov	w0, #0
	b	LBB0_14
LBB0_12:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DRM_PLANE_TYPE_PRIMARY,4,2     ; @DRM_PLANE_TYPE_PRIMARY
	.comm	_DRM_PLANE_TYPE_OVERLAY,4,2     ; @DRM_PLANE_TYPE_OVERLAY
	.comm	_rcar_du_vsp_plane_funcs,4,2    ; @rcar_du_vsp_plane_funcs
	.comm	_rcar_du_vsp_formats,4,2        ; @rcar_du_vsp_formats
	.comm	_rcar_du_vsp_plane_helper_funcs,4,2 ; @rcar_du_vsp_plane_helper_funcs
.subsections_via_symbols
