	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rcar_du_plane_setup_mode
_rcar_du_plane_setup_mode:              ## @rcar_du_plane_setup_mode
	.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	%rdx, %rbx
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	8(%rdx), %rax
	cmpl	$129, (%rax)
	movq	_PnALPHAR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	jne	LBB0_1
## %bb.2:
	movq	_PnALPHAR_ABIT_X@GOTPCREL(%rip), %rax
	movl	16(%rbx), %ecx
	sarl	$8, %ecx
	orl	(%rax), %ecx
	jmp	LBB0_3
LBB0_1:
	movq	_PnALPHAR_ABIT_0@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_3:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_rcar_du_plane_write
	movq	_PnMR_BM_MD@GOTPCREL(%rip), %r8
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	movl	4(%rax), %eax
	movq	_RCAR_DU_COLORKEY_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	andl	(%rbx), %esi
	movq	_RCAR_DU_COLORKEY_NONE@GOTPCREL(%rip), %r9
	xorl	%edx, %edx
	movl	$0, %ecx
	cmpl	(%r9), %esi
	jne	LBB0_5
## %bb.4:
	movq	_PnMR_SPIM_TP_OFF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_5:
	orl	(%r8), %eax
	movq	_DRM_FORMAT_YUYV@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %edi
	jne	LBB0_7
## %bb.6:
	movq	_PnMR_YCDF_YUYV@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
LBB0_7:
	orl	%edx, %eax
	orl	%eax, %ecx
	movq	_PnMR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_rcar_du_plane_write
	movq	8(%rbx), %rax
	movl	(%rax), %eax
	addl	$-128, %eax
	cmpl	$4, %eax
	ja	LBB0_14
## %bb.8:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_13:
	movq	_PnTC3R@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_PnTC3R_CODE@GOTPCREL(%rip), %rax
	movl	$16777215, %ecx                 ## imm = 0xFFFFFF
	andl	(%rbx), %ecx
	orl	(%rax), %ecx
	jmp	LBB0_11
LBB0_12:
	movl	(%rbx), %ecx
	movl	%ecx, %eax
	shrl	$9, %eax
	andl	$31744, %eax                    ## imm = 0x7C00
	movl	%ecx, %edx
	shrl	$6, %edx
	andl	$992, %edx                      ## imm = 0x3E0
	jmp	LBB0_10
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	(%rbx), %ecx
	movl	%ecx, %eax
	shrl	$8, %eax
	andl	$63488, %eax                    ## imm = 0xF800
	movl	%ecx, %edx
	shrl	$5, %edx
	andl	$2016, %edx                     ## imm = 0x7E0
LBB0_10:
	orl	%eax, %edx
	shrl	$3, %ecx
	andl	$31, %ecx
	orl	%edx, %ecx
	movq	_PnTC2R@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
LBB0_11:
	movq	%r15, %rdi
	movl	%r14d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rcar_du_plane_write            ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
LJTI0_0:
	.long	L0_0_set_13
	.long	L0_0_set_12
	.long	L0_0_set_9
	.long	L0_0_set_13
	.long	L0_0_set_12
	.end_data_region
                                        ## -- End function
	.comm	_PnALPHAR,4,2                   ## @PnALPHAR
	.comm	_PnALPHAR_ABIT_0,4,2            ## @PnALPHAR_ABIT_0
	.comm	_PnALPHAR_ABIT_X,4,2            ## @PnALPHAR_ABIT_X
	.comm	_PnMR_BM_MD,4,2                 ## @PnMR_BM_MD
	.comm	_RCAR_DU_COLORKEY_MASK,4,2      ## @RCAR_DU_COLORKEY_MASK
	.comm	_RCAR_DU_COLORKEY_NONE,4,2      ## @RCAR_DU_COLORKEY_NONE
	.comm	_PnMR_SPIM_TP_OFF,4,2           ## @PnMR_SPIM_TP_OFF
	.comm	_DRM_FORMAT_YUYV,4,2            ## @DRM_FORMAT_YUYV
	.comm	_PnMR_YCDF_YUYV,4,2             ## @PnMR_YCDF_YUYV
	.comm	_PnMR,4,2                       ## @PnMR
	.comm	_PnTC2R,4,2                     ## @PnTC2R
	.comm	_PnTC3R,4,2                     ## @PnTC3R
	.comm	_PnTC3R_CODE,4,2                ## @PnTC3R_CODE
	.no_dead_strip	_rcar_du_plane_setup_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rcar_du_plane_setup_mode
_rcar_du_plane_setup_mode:              ; @rcar_du_plane_setup_mode
	.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, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x2, #8]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _PnALPHAR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PnALPHAR@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x9]
	cmp	w8, #129
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _PnALPHAR_ABIT_X@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PnALPHAR_ABIT_X@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x21, #16]
	orr	w3, w8, w9, asr #8
	b	LBB0_3
LBB0_2:
Lloh6:
	adrp	x8, _PnALPHAR_ABIT_0@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PnALPHAR_ABIT_0@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
LBB0_3:
	mov	x0, x20
	mov	x1, x19
	bl	_rcar_du_plane_write
Lloh9:
	adrp	x8, _PnMR_BM_MD@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PnMR_BM_MD@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	x9, [x21, #8]
	ldp	w9, w10, [x9]
	orr	w8, w10, w8
Lloh12:
	adrp	x10, _RCAR_DU_COLORKEY_MASK@GOTPAGE
Lloh13:
	ldr	x10, [x10, _RCAR_DU_COLORKEY_MASK@GOTPAGEOFF]
	ldr	w11, [x21]
Lloh14:
	ldr	w10, [x10]
	and	w10, w10, w11
Lloh15:
	adrp	x11, _RCAR_DU_COLORKEY_NONE@GOTPAGE
Lloh16:
	ldr	x11, [x11, _RCAR_DU_COLORKEY_NONE@GOTPAGEOFF]
Lloh17:
	ldr	w11, [x11]
Lloh18:
	adrp	x12, _PnMR_SPIM_TP_OFF@GOTPAGE
Lloh19:
	ldr	x12, [x12, _PnMR_SPIM_TP_OFF@GOTPAGEOFF]
Lloh20:
	ldr	w12, [x12]
	cmp	w10, w11
	csel	w10, w12, wzr, eq
	orr	w8, w8, w10
Lloh21:
	adrp	x10, _DRM_FORMAT_YUYV@GOTPAGE
Lloh22:
	ldr	x10, [x10, _DRM_FORMAT_YUYV@GOTPAGEOFF]
Lloh23:
	ldr	w10, [x10]
Lloh24:
	adrp	x11, _PnMR_YCDF_YUYV@GOTPAGE
Lloh25:
	ldr	x11, [x11, _PnMR_YCDF_YUYV@GOTPAGEOFF]
Lloh26:
	ldr	w11, [x11]
	cmp	w9, w10
	csel	w9, w11, wzr, eq
	orr	w3, w8, w9
Lloh27:
	adrp	x8, _PnMR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _PnMR@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_rcar_du_plane_write
	ldr	x8, [x21, #8]
	ldr	w8, [x8]
	sub	w8, w8, #128
	cmp	w8, #4
	b.hi	LBB0_7
; %bb.4:
Lloh30:
	adrp	x9, lJTI0_0@PAGE
Lloh31:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_5
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_5:
Lloh32:
	adrp	x8, _PnTC3R@GOTPAGE
Lloh33:
	ldr	x8, [x8, _PnTC3R@GOTPAGEOFF]
Lloh34:
	ldr	w2, [x8]
Lloh35:
	adrp	x8, _PnTC3R_CODE@GOTPAGE
Lloh36:
	ldr	x8, [x8, _PnTC3R_CODE@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	ldr	w9, [x21]
	and	w9, w9, #0xffffff
	orr	w3, w9, w8
	b	LBB0_10
LBB0_6:
	ldr	w8, [x21]
	lsr	w9, w8, #9
	and	w3, w9, #0x7c00
	bfxil	w3, w8, #6, #10
	b	LBB0_9
LBB0_7:
	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_8:
	ldr	w8, [x21]
	lsr	w9, w8, #8
	and	w3, w9, #0xf800
	bfxil	w3, w8, #5, #11
LBB0_9:
Lloh38:
	adrp	x9, _PnTC2R@GOTPAGE
Lloh39:
	ldr	x9, [x9, _PnTC2R@GOTPAGEOFF]
	bfxil	w3, w8, #3, #5
Lloh40:
	ldr	w2, [x9]
LBB0_10:
	mov	x0, x20
	mov	x1, 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_plane_write
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_6-LBB0_5)>>2
	.byte	(LBB0_8-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_6-LBB0_5)>>2
                                        ; -- End function
	.comm	_PnALPHAR,4,2                   ; @PnALPHAR
	.comm	_PnALPHAR_ABIT_0,4,2            ; @PnALPHAR_ABIT_0
	.comm	_PnALPHAR_ABIT_X,4,2            ; @PnALPHAR_ABIT_X
	.comm	_PnMR_BM_MD,4,2                 ; @PnMR_BM_MD
	.comm	_RCAR_DU_COLORKEY_MASK,4,2      ; @RCAR_DU_COLORKEY_MASK
	.comm	_RCAR_DU_COLORKEY_NONE,4,2      ; @RCAR_DU_COLORKEY_NONE
	.comm	_PnMR_SPIM_TP_OFF,4,2           ; @PnMR_SPIM_TP_OFF
	.comm	_DRM_FORMAT_YUYV,4,2            ; @DRM_FORMAT_YUYV
	.comm	_PnMR_YCDF_YUYV,4,2             ; @PnMR_YCDF_YUYV
	.comm	_PnMR,4,2                       ; @PnMR
	.comm	_PnTC2R,4,2                     ; @PnTC2R
	.comm	_PnTC3R,4,2                     ; @PnTC3R
	.comm	_PnTC3R_CODE,4,2                ; @PnTC3R_CODE
	.no_dead_strip	_rcar_du_plane_setup_mode
.subsections_via_symbols
