	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_dpi_config_color_format
_mtk_dpi_config_color_format:           ## @mtk_dpi_config_color_format
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_MTK_DPI_COLOR_FORMAT_YCBCR_444@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	movq	_MTK_DPI_OUT_CHANNEL_SWAP_BGR@GOTPCREL(%rip), %r12
	movl	$1, %r15d
	cmpl	%esi, (%rax)
	je	LBB0_3
## %bb.1:
	movq	_MTK_DPI_COLOR_FORMAT_YCBCR_444_FULL@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	je	LBB0_3
## %bb.2:
	movq	_MTK_DPI_COLOR_FORMAT_YCBCR_422@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	sete	%al
	movq	_MTK_DPI_COLOR_FORMAT_YCBCR_422_FULL@GOTPCREL(%rip), %rcx
	cmpl	%esi, (%rcx)
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %r14d
	movq	_MTK_DPI_OUT_CHANNEL_SWAP_RGB@GOTPCREL(%rip), %r12
	movl	%r14d, %r15d
LBB0_3:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_mtk_dpi_config_yuv422_enable
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_mtk_dpi_config_csc_enable
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_mtk_dpi_config_swap_input
	movl	(%r12), %esi
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mtk_dpi_config_channel_swap    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MTK_DPI_COLOR_FORMAT_YCBCR_444,4,2 ## @MTK_DPI_COLOR_FORMAT_YCBCR_444
	.comm	_MTK_DPI_COLOR_FORMAT_YCBCR_444_FULL,4,2 ## @MTK_DPI_COLOR_FORMAT_YCBCR_444_FULL
	.comm	_MTK_DPI_OUT_CHANNEL_SWAP_BGR,4,2 ## @MTK_DPI_OUT_CHANNEL_SWAP_BGR
	.comm	_MTK_DPI_COLOR_FORMAT_YCBCR_422,4,2 ## @MTK_DPI_COLOR_FORMAT_YCBCR_422
	.comm	_MTK_DPI_COLOR_FORMAT_YCBCR_422_FULL,4,2 ## @MTK_DPI_COLOR_FORMAT_YCBCR_422_FULL
	.comm	_MTK_DPI_OUT_CHANNEL_SWAP_RGB,4,2 ## @MTK_DPI_OUT_CHANNEL_SWAP_RGB
	.no_dead_strip	_mtk_dpi_config_color_format
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_dpi_config_color_format
_mtk_dpi_config_color_format:           ; @mtk_dpi_config_color_format
	.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	x19, x0
Lloh0:
	adrp	x8, _MTK_DPI_COLOR_FORMAT_YCBCR_444@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MTK_DPI_COLOR_FORMAT_YCBCR_444@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _MTK_DPI_COLOR_FORMAT_YCBCR_444_FULL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MTK_DPI_COLOR_FORMAT_YCBCR_444_FULL@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w1
	ccmp	w9, w1, #4, ne
	b.ne	LBB0_2
; %bb.1:
	mov	w20, #0
Lloh6:
	adrp	x22, _MTK_DPI_OUT_CHANNEL_SWAP_BGR@GOTPAGE
Lloh7:
	ldr	x22, [x22, _MTK_DPI_OUT_CHANNEL_SWAP_BGR@GOTPAGEOFF]
	mov	w21, #1
	b	LBB0_3
LBB0_2:
Lloh8:
	adrp	x8, _MTK_DPI_COLOR_FORMAT_YCBCR_422@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MTK_DPI_COLOR_FORMAT_YCBCR_422@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w8, w1
Lloh11:
	adrp	x8, _MTK_DPI_COLOR_FORMAT_YCBCR_422_FULL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MTK_DPI_COLOR_FORMAT_YCBCR_422_FULL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	ccmp	w8, w1, #4, ne
	cset	w20, eq
Lloh14:
	adrp	x22, _MTK_DPI_OUT_CHANNEL_SWAP_RGB@GOTPAGE
Lloh15:
	ldr	x22, [x22, _MTK_DPI_OUT_CHANNEL_SWAP_RGB@GOTPAGEOFF]
	mov	x21, x20
LBB0_3:
	mov	x0, x19
	mov	x1, x20
	bl	_mtk_dpi_config_yuv422_enable
	mov	x0, x19
	mov	x1, x21
	bl	_mtk_dpi_config_csc_enable
	mov	x0, x19
	mov	x1, x20
	bl	_mtk_dpi_config_swap_input
	ldr	w1, [x22]
	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	_mtk_dpi_config_channel_swap
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_MTK_DPI_COLOR_FORMAT_YCBCR_444,4,2 ; @MTK_DPI_COLOR_FORMAT_YCBCR_444
	.comm	_MTK_DPI_COLOR_FORMAT_YCBCR_444_FULL,4,2 ; @MTK_DPI_COLOR_FORMAT_YCBCR_444_FULL
	.comm	_MTK_DPI_OUT_CHANNEL_SWAP_BGR,4,2 ; @MTK_DPI_OUT_CHANNEL_SWAP_BGR
	.comm	_MTK_DPI_COLOR_FORMAT_YCBCR_422,4,2 ; @MTK_DPI_COLOR_FORMAT_YCBCR_422
	.comm	_MTK_DPI_COLOR_FORMAT_YCBCR_422_FULL,4,2 ; @MTK_DPI_COLOR_FORMAT_YCBCR_422_FULL
	.comm	_MTK_DPI_OUT_CHANNEL_SWAP_RGB,4,2 ; @MTK_DPI_OUT_CHANNEL_SWAP_RGB
	.no_dead_strip	_mtk_dpi_config_color_format
.subsections_via_symbols
