	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_dsi_ps_control
_mtk_dsi_ps_control:                    ## @mtk_dsi_ps_control
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	$-129, %eax
	addl	(%rdi), %eax
	cmpl	$2, %eax
	ja	LBB0_1
## %bb.2:
	movslq	%eax, %rcx
	leaq	l_switch.table.mtk_dsi_ps_control(%rip), %rax
	movl	(%rax,%rcx,4), %eax
	leaq	l_switch.table.mtk_dsi_ps_control.1(%rip), %rdx
	movq	(%rdx,%rcx,8), %rcx
	jmp	LBB0_3
LBB0_1:
	movq	_PACKED_PS_24BIT_RGB888@GOTPCREL(%rip), %rcx
	movl	$3, %eax
LBB0_3:
	imull	16(%rdi), %eax
	movq	_DSI_PS_WC@GOTPCREL(%rip), %rdx
	andl	(%rdx), %eax
	addl	(%rcx), %eax
	movq	_DSI_PSCTRL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	8(%rdi), %rsi
	movl	%eax, %edi
	popq	%rbp
	jmp	_writel                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PACKED_PS_24BIT_RGB888,4,2     ## @PACKED_PS_24BIT_RGB888
	.comm	_LOOSELY_PS_18BIT_RGB666,4,2    ## @LOOSELY_PS_18BIT_RGB666
	.comm	_PACKED_PS_18BIT_RGB666,4,2     ## @PACKED_PS_18BIT_RGB666
	.comm	_PACKED_PS_16BIT_RGB565,4,2     ## @PACKED_PS_16BIT_RGB565
	.comm	_DSI_PS_WC,4,2                  ## @DSI_PS_WC
	.comm	_DSI_PSCTRL,8,3                 ## @DSI_PSCTRL
	.no_dead_strip	_mtk_dsi_ps_control
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.mtk_dsi_ps_control
l_switch.table.mtk_dsi_ps_control:
	.long	3                               ## 0x3
	.long	3                               ## 0x3
	.long	2                               ## 0x2

	.section	__DATA,__const
	.p2align	3                               ## @switch.table.mtk_dsi_ps_control.1
l_switch.table.mtk_dsi_ps_control.1:
	.quad	_PACKED_PS_18BIT_RGB666
	.quad	_LOOSELY_PS_18BIT_RGB666
	.quad	_PACKED_PS_16BIT_RGB565

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_dsi_ps_control
_mtk_dsi_ps_control:                    ; @mtk_dsi_ps_control
	.cfi_startproc
; %bb.0:
	ldr	w8, [x0]
	sub	w9, w8, #129
	cmp	w9, #2
	b.hi	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, l_switch.table.mtk_dsi_ps_control@PAGE
Lloh1:
	add	x8, x8, l_switch.table.mtk_dsi_ps_control@PAGEOFF
	ldr	w8, [x8, w9, sxtw #2]
Lloh2:
	adrp	x10, l_switch.table.mtk_dsi_ps_control.1@PAGE
Lloh3:
	add	x10, x10, l_switch.table.mtk_dsi_ps_control.1@PAGEOFF
	ldr	x9, [x10, w9, sxtw #3]
	b	LBB0_3
LBB0_2:
Lloh4:
	adrp	x9, _PACKED_PS_24BIT_RGB888@GOTPAGE
Lloh5:
	ldr	x9, [x9, _PACKED_PS_24BIT_RGB888@GOTPAGEOFF]
	mov	w8, #3
LBB0_3:
	ldr	w9, [x9]
	ldr	w10, [x0, #16]
	mul	w8, w10, w8
Lloh6:
	adrp	x10, _DSI_PS_WC@GOTPAGE
Lloh7:
	ldr	x10, [x10, _DSI_PS_WC@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	and	w8, w8, w10
	add	w8, w8, w9
	ldr	x9, [x0, #8]
Lloh9:
	adrp	x10, _DSI_PSCTRL@GOTPAGE
Lloh10:
	ldr	x10, [x10, _DSI_PSCTRL@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	add	x1, x10, x9
	mov	x0, x8
	b	_writel
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PACKED_PS_24BIT_RGB888,4,2     ; @PACKED_PS_24BIT_RGB888
	.comm	_LOOSELY_PS_18BIT_RGB666,4,2    ; @LOOSELY_PS_18BIT_RGB666
	.comm	_PACKED_PS_18BIT_RGB666,4,2     ; @PACKED_PS_18BIT_RGB666
	.comm	_PACKED_PS_16BIT_RGB565,4,2     ; @PACKED_PS_16BIT_RGB565
	.comm	_DSI_PS_WC,4,2                  ; @DSI_PS_WC
	.comm	_DSI_PSCTRL,8,3                 ; @DSI_PSCTRL
	.no_dead_strip	_mtk_dsi_ps_control
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.mtk_dsi_ps_control
l_switch.table.mtk_dsi_ps_control:
	.long	3                               ; 0x3
	.long	3                               ; 0x3
	.long	2                               ; 0x2

	.section	__DATA,__const
	.p2align	3                               ; @switch.table.mtk_dsi_ps_control.1
l_switch.table.mtk_dsi_ps_control.1:
	.quad	_PACKED_PS_18BIT_RGB666
	.quad	_LOOSELY_PS_18BIT_RGB666
	.quad	_PACKED_PS_16BIT_RGB565

.subsections_via_symbols
