	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rcar_du_planes_init            ## -- Begin function rcar_du_planes_init
	.p2align	4, 0x90
_rcar_du_planes_init:                   ## @rcar_du_planes_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	24(%rdi), %rdx
	movl	4(%rdi), %eax
	leal	7(%rax), %ecx
	movl	%ecx, (%rdi)
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movb	(%rdx), %cl
	movl	$-1, %edx
	shll	%cl, %edx
	movb	8(%rdi), %cl
	addb	%cl, %cl
	movl	$3, %r12d
	shll	%cl, %r12d
	movl	%eax, %ecx
	addl	$7, %ecx
	je	LBB0_8
## %bb.1:
	notl	%edx
	andl	%edx, %r12d
	xorl	%edx, %edx
	xorl	%r13d, %r13d
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%eax, %ecx
	movq	_DRM_PLANE_TYPE_OVERLAY@GOTPCREL(%rip), %rax
	cmpq	%rcx, %r13
	jae	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_DRM_PLANE_TYPE_PRIMARY@GOTPCREL(%rip), %rax
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rax), %r14d
	movq	16(%rdi), %rbx
	movq	%rdi, 8(%rbx,%rdx)
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	addq	%rdx, %rbx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %r12d
	movq	_formats@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	%r15d, %edi
	callq	_ARRAY_SIZE
	subq	$8, %rsp
	movl	%r12d, %edi
	movq	%rbx, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	_rcar_du_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_9
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	movq	_rcar_du_plane_helper_funcs@GOTPCREL(%rip), %rsi
	callq	_drm_plane_helper_add
	movq	%rbx, %rdi
	callq	_drm_plane_create_alpha_property
	movq	_DRM_PLANE_TYPE_PRIMARY@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %esi
	movq	_RCAR_DU_COLORKEY_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_drm_object_attach_property
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$1, %edx
	movl	$7, %ecx
	callq	_drm_plane_create_zpos_property
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%r13
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	(%rdi), %eax
	cmpq	%rax, %r13
	jae	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%rdi), %eax
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	addq	$16, %rdx
	jmp	LBB0_2
LBB0_8:
	xorl	%eax, %eax
LBB0_9:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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_plane_funcs,4,2        ## @rcar_du_plane_funcs
	.comm	_formats,4,2                    ## @formats
	.comm	_rcar_du_plane_helper_funcs,4,2 ## @rcar_du_plane_helper_funcs
	.comm	_RCAR_DU_COLORKEY_NONE,4,2      ## @RCAR_DU_COLORKEY_NONE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rcar_du_planes_init            ; -- Begin function rcar_du_planes_init
	.p2align	2
_rcar_du_planes_init:                   ; @rcar_du_planes_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
	ldr	x27, [x0, #24]
	ldr	w8, [x0, #4]
	adds	w9, w8, #7
	str	w9, [x0]
	b.eq	LBB0_7
; %bb.1:
	mov	x19, x0
	mov	x28, #0
	ldr	w9, [x27]
	mov	w10, #-1
	lsl	w9, w10, w9
	ldr	w10, [x0, #8]
	lsl	w10, w10, #1
	mov	w11, #3
	lsl	w10, w11, w10
	bic	w9, w10, w9
	str	w9, [sp, #12]                   ; 4-byte Folded Spill
	mov	w22, #8
Lloh0:
	adrp	x25, _DRM_PLANE_TYPE_PRIMARY@GOTPAGE
Lloh1:
	ldr	x25, [x25, _DRM_PLANE_TYPE_PRIMARY@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x28, w8, uxtw
Lloh2:
	adrp	x8, _DRM_PLANE_TYPE_OVERLAY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DRM_PLANE_TYPE_OVERLAY@GOTPAGEOFF]
	csel	x8, x25, x8, lo
	ldr	w24, [x8]
	ldr	x21, [x19, #16]
	add	x23, x21, x22
	str	x19, [x23], #-8
	ldr	w20, [x27, #8]
Lloh4:
	adrp	x8, _formats@GOTPAGE
Lloh5:
	ldr	x8, [x8, _formats@GOTPAGEOFF]
Lloh6:
	ldr	w26, [x8]
	mov	x0, x26
	bl	_ARRAY_SIZE
	mov	x5, x0
	str	xzr, [sp]
	mov	x0, x20
	mov	x1, x23
	ldr	w2, [sp, #12]                   ; 4-byte Folded Reload
Lloh7:
	adrp	x3, _rcar_du_plane_funcs@GOTPAGE
Lloh8:
	ldr	x3, [x3, _rcar_du_plane_funcs@GOTPAGEOFF]
	mov	x4, x26
	mov	x6, #0
	mov	x7, x24
	bl	_drm_universal_plane_init
	tbnz	w0, #31, LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x23
Lloh9:
	adrp	x1, _rcar_du_plane_helper_funcs@GOTPAGE
Lloh10:
	ldr	x1, [x1, _rcar_du_plane_helper_funcs@GOTPAGEOFF]
	bl	_drm_plane_helper_add
	mov	x0, x23
	bl	_drm_plane_create_alpha_property
	ldr	w8, [x25]
	cmp	w24, w8
	b.eq	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x8, x21, x22
	sub	x0, x8, #8
	ldr	w1, [x27, #4]
Lloh11:
	adrp	x8, _RCAR_DU_COLORKEY_NONE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _RCAR_DU_COLORKEY_NONE@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	bl	_drm_object_attach_property
	mov	x0, x23
	mov	w1, #1
	mov	w2, #1
	mov	w3, #7
	bl	_drm_plane_create_zpos_property
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	x28, x28, #1
	ldr	w8, [x19]
	cmp	x28, x8
	b.hs	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x19, #4]
	add	x22, x22, #16
	b	LBB0_2
LBB0_7:
	mov	w0, #0
LBB0_8:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.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_plane_funcs,4,2        ; @rcar_du_plane_funcs
	.comm	_formats,4,2                    ; @formats
	.comm	_rcar_du_plane_helper_funcs,4,2 ; @rcar_du_plane_helper_funcs
	.comm	_RCAR_DU_COLORKEY_NONE,4,2      ; @RCAR_DU_COLORKEY_NONE
.subsections_via_symbols
