	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___rcar_du_plane_setup          ## -- Begin function __rcar_du_plane_setup
	.p2align	4, 0x90
___rcar_du_plane_setup:                 ## @__rcar_du_plane_setup
	.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	%rsi, %rbx
	movq	%rdi, %r15
	movq	8(%rdi), %r14
	movl	(%rsi), %esi
	movq	%rbx, %rdx
	callq	_rcar_du_plane_setup_format
	movq	16(%rbx), %rax
	cmpl	$2, (%rax)
	jne	LBB0_2
## %bb.1:
	movl	(%rbx), %eax
	leal	1(%rax), %ecx
	leal	8(%rax), %edx
	testl	%ecx, %ecx
	cmovnsl	%ecx, %edx
	andl	$-8, %edx
	negl	%edx
	leal	(%rax,%rdx), %esi
	incl	%esi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	callq	_rcar_du_plane_setup_format
LBB0_2:
	movq	8(%r14), %rax
	cmpl	$2, (%rax)
	jg	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_rcar_du_plane_setup_scanout
LBB0_4:
	movq	8(%rbx), %rax
	movq	_RCAR_DU_PLANE_VSPD1@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	xorl	%eax, %eax
	cmpq	$0, (%r15)
	setne	%al
	addl	%eax, %eax
	cmpl	%eax, (%r14)
	jne	LBB0_7
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	%eax, (%r14)
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rcar_du_set_dpad0_vsp1_routing ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RCAR_DU_PLANE_VSPD1,8,3        ## @RCAR_DU_PLANE_VSPD1
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___rcar_du_plane_setup          ; -- Begin function __rcar_du_plane_setup
	.p2align	2
___rcar_du_plane_setup:                 ; @__rcar_du_plane_setup
	.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	x21, x1
	mov	x20, x0
	ldr	x19, [x0, #8]
	ldr	w1, [x1]
	mov	x2, x21
	bl	_rcar_du_plane_setup_format
	ldr	x8, [x21, #16]
	ldr	w8, [x8]
	cmp	w8, #2
	b.ne	LBB0_2
; %bb.1:
	ldr	w8, [x21]
	add	w8, w8, #1
	negs	w9, w8
	and	w9, w9, #0x7
	and	w8, w8, #0x7
	csneg	w1, w8, w9, mi
	mov	x0, x20
	mov	x2, x21
	bl	_rcar_du_plane_setup_format
LBB0_2:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	cmp	w8, #2
	b.gt	LBB0_4
; %bb.3:
	mov	x0, x20
	mov	x1, x21
	bl	_rcar_du_plane_setup_scanout
LBB0_4:
	ldr	x8, [x21, #8]
Lloh0:
	adrp	x9, _RCAR_DU_PLANE_VSPD1@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RCAR_DU_PLANE_VSPD1@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	ldr	x8, [x20]
	cmp	x8, #0
	cset	w8, ne
	lsl	w8, w8, #1
	ldr	w9, [x19]
	cmp	w9, w8
	b.ne	LBB0_7
LBB0_6:
	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_7:
	str	w8, [x19]
	mov	x0, x19
	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
	b	_rcar_du_set_dpad0_vsp1_routing
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_RCAR_DU_PLANE_VSPD1,8,3        ; @RCAR_DU_PLANE_VSPD1
.subsections_via_symbols
