	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ti_sn_bridge_set_dsi_dp_rate
_ti_sn_bridge_set_dsi_dp_rate:          ## @ti_sn_bridge_set_dsi_dp_rate
	.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, %r14
	movq	8(%rdi), %rax
	movq	16(%rdi), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rcx
	movslq	(%rcx), %rcx
	imulq	$274877907, %rcx, %rbx          ## imm = 0x10624DD3
	movq	%rbx, %rcx
	shrq	$63, %rcx
	sarq	$38, %rbx
	addl	%ecx, %ebx
	movl	4(%rax), %edi
	callq	_mipi_dsi_pixel_format_to_bpp
	movl	%eax, %r15d
	imull	%ebx, %r15d
	movq	8(%r14), %rax
	movl	(%rax), %ecx
	addl	%ecx, %ecx
	xorl	%ebx, %ebx
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	movq	_MIN_DSI_CLK_FREQ_MHZ@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	imulq	$1717986919, %rcx, %rsi         ## imm = 0x66666667
	movq	%rsi, %rdx
	shrq	$63, %rdx
	sarq	$33, %rsi
	addl	%edx, %esi
	subl	%ecx, %eax
	movl	$3435973837, %ecx               ## imm = 0xCCCCCCCD
	imulq	%rax, %rcx
	shrq	$34, %rcx
	movzbl	%cl, %edx
	addl	%esi, %edx
	movl	(%r14), %edi
	movq	_SN_DSIA_CLK_FREQ_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_regmap_write
	movq	8(%r14), %rcx
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	(%rcx)
	movq	_DP_CLK_FUDGE_NUM@GOTPCREL(%rip), %rcx
	imull	(%rcx), %eax
	movq	_DP_CLK_FUDGE_DEN@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	divl	(%rcx)
	movl	%eax, %r15d
	movq	_ti_sn_bridge_dp_rate_lut@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	cmpl	$1, %eax
	je	LBB0_4
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	cmpl	%r15d, (%rdi,%rbx,4)
	ja	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
                                        ## kill: def $eax killed $eax def $rax
	decl	%eax
	cmpq	%rax, %rbx
	jb	LBB0_2
LBB0_4:
	movl	(%r14), %r14d
	movq	_SN_DATARATE_CONFIG_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_DP_DATARATE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	%ebx, %edi
	callq	_DP_DATARATE
	movl	%r14d, %edi
	movl	%r15d, %esi
	movl	%r12d, %edx
	movl	%eax, %ecx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_regmap_update_bits             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MIN_DSI_CLK_FREQ_MHZ,4,2       ## @MIN_DSI_CLK_FREQ_MHZ
	.comm	_SN_DSIA_CLK_FREQ_REG,4,2       ## @SN_DSIA_CLK_FREQ_REG
	.comm	_DP_CLK_FUDGE_NUM,4,2           ## @DP_CLK_FUDGE_NUM
	.comm	_DP_CLK_FUDGE_DEN,4,2           ## @DP_CLK_FUDGE_DEN
	.comm	_ti_sn_bridge_dp_rate_lut,8,3   ## @ti_sn_bridge_dp_rate_lut
	.comm	_SN_DATARATE_CONFIG_REG,4,2     ## @SN_DATARATE_CONFIG_REG
	.comm	_DP_DATARATE_MASK,4,2           ## @DP_DATARATE_MASK
	.no_dead_strip	_ti_sn_bridge_set_dsi_dp_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ti_sn_bridge_set_dsi_dp_rate
_ti_sn_bridge_set_dsi_dp_rate:          ; @ti_sn_bridge_set_dsi_dp_rate
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	ldp	x9, x8, [x0, #8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldrsw	x8, [x8]
	mov	w10, #19923
	movk	w10, #4194, lsl #16
	mul	x8, x8, x10
	lsr	x10, x8, #63
	asr	x8, x8, #38
	add	w20, w8, w10
	ldr	w0, [x9, #4]
	bl	_mipi_dsi_pixel_format_to_bpp
	mul	w21, w0, w20
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	lsl	w8, w8, #1
	udiv	w8, w21, w8
Lloh0:
	adrp	x9, _MIN_DSI_CLK_FREQ_MHZ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MIN_DSI_CLK_FREQ_MHZ@GOTPAGEOFF]
Lloh2:
	ldrsw	x9, [x9]
	mov	w10, #26215
	movk	w10, #26214, lsl #16
	mul	x10, x9, x10
	lsr	x11, x10, #63
	asr	x10, x10, #33
	add	w10, w10, w11
	sub	w8, w8, w9
	mov	w9, #52429
	movk	w9, #52428, lsl #16
	umull	x8, w8, w9
	lsr	x8, x8, #34
	add	w2, w10, w8, uxtb
	ldr	w0, [x19]
Lloh3:
	adrp	x8, _SN_DSIA_CLK_FREQ_REG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SN_DSIA_CLK_FREQ_REG@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_regmap_write
	ldr	x8, [x19, #8]
	ldr	w23, [x8]
Lloh6:
	adrp	x8, _DP_CLK_FUDGE_NUM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DP_CLK_FUDGE_NUM@GOTPAGEOFF]
Lloh8:
	ldr	w24, [x8]
Lloh9:
	adrp	x8, _DP_CLK_FUDGE_DEN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DP_CLK_FUDGE_DEN@GOTPAGEOFF]
Lloh11:
	ldr	w25, [x8]
Lloh12:
	adrp	x22, _ti_sn_bridge_dp_rate_lut@GOTPAGE
Lloh13:
	ldr	x22, [x22, _ti_sn_bridge_dp_rate_lut@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.ne	LBB0_2
; %bb.1:
	mov	w20, #0
	b	LBB0_5
LBB0_2:
	mov	x20, #0
	udiv	w8, w21, w23
	mul	w8, w24, w8
	udiv	w21, w8, w25
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x22]
	ldr	w8, [x0, x20, lsl #2]
	cmp	w8, w21
	b.hi	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x20, x20, #1
	bl	_ARRAY_SIZE
	sub	w8, w0, #1
	cmp	x20, x8
	b.lo	LBB0_3
LBB0_5:
	ldr	w19, [x19]
Lloh14:
	adrp	x8, _SN_DATARATE_CONFIG_REG@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SN_DATARATE_CONFIG_REG@GOTPAGEOFF]
Lloh16:
	ldr	w21, [x8]
Lloh17:
	adrp	x8, _DP_DATARATE_MASK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _DP_DATARATE_MASK@GOTPAGEOFF]
Lloh19:
	ldr	w22, [x8]
	mov	x0, x20
	bl	_DP_DATARATE
	mov	x3, x0
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_regmap_update_bits
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_MIN_DSI_CLK_FREQ_MHZ,4,2       ; @MIN_DSI_CLK_FREQ_MHZ
	.comm	_SN_DSIA_CLK_FREQ_REG,4,2       ; @SN_DSIA_CLK_FREQ_REG
	.comm	_DP_CLK_FUDGE_NUM,4,2           ; @DP_CLK_FUDGE_NUM
	.comm	_DP_CLK_FUDGE_DEN,4,2           ; @DP_CLK_FUDGE_DEN
	.comm	_ti_sn_bridge_dp_rate_lut,8,3   ; @ti_sn_bridge_dp_rate_lut
	.comm	_SN_DATARATE_CONFIG_REG,4,2     ; @SN_DATARATE_CONFIG_REG
	.comm	_DP_DATARATE_MASK,4,2           ; @DP_DATARATE_MASK
	.no_dead_strip	_ti_sn_bridge_set_dsi_dp_rate
.subsections_via_symbols
