	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dw_mipi_dsi_get_lane_mbps
_dw_mipi_dsi_get_lane_mbps:             ## @dw_mipi_dsi_get_lane_mbps
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -72(%rbp)                  ## 8-byte Spill
	movl	%r8d, -56(%rbp)                 ## 4-byte Spill
	movl	%ecx, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r13
	movq	_LANE_MIN_KBPS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rdi)
	movq	_LANE_MAX_KBPS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 4(%rdi)
	movq	8(%rdi), %rdx
	movq	_HWVER_131@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_2
## %bb.1:
	addl	%eax, %eax
	movl	%eax, (%r13)
	addl	%ecx, %ecx
	movl	%ecx, 4(%r13)
LBB0_2:
	movl	16(%r13), %edi
	callq	_clk_get_rate
	cltq
	imulq	$274877907, %rax, %r12          ## imm = 0x10624DD3
	movq	%r12, %r15
	shrq	$63, %r15
	sarq	$38, %r12
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	callq	_mipi_dsi_pixel_format_to_bpp
	imull	(%r14), %eax
	cltd
	idivl	%ebx
                                        ## kill: def $eax killed $eax def $rax
	shll	$2, %eax
	leal	(%rax,%rax,2), %eax
	movl	$3435973837, %edx               ## imm = 0xCCCCCCCD
	imulq	%rax, %rdx
	shrq	$35, %rdx
	movl	4(%r13), %ebx
	cmpl	%ebx, %edx
	jbe	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_WARN
	movl	%ebx, %edx
LBB0_4:
	addl	%r15d, %r12d
	movl	(%r13), %ebx
	cmpl	%ebx, %edx
	jae	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_WARN
	movl	%ebx, %edx
LBB0_6:
	movl	$0, -52(%rbp)
	movl	$0, -48(%rbp)
	movl	$0, -44(%rbp)
	leaq	-52(%rbp), %rcx
	leaq	-48(%rbp), %r8
	leaq	-44(%rbp), %r9
	movq	%r13, %rdi
	movl	%r12d, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_dsi_pll_get_params
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.2(%rip), %rdi
	callq	_DRM_WARN
LBB0_8:
	movl	-52(%rbp), %esi
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %ecx
	movl	%r12d, %edi
	callq	_dsi_pll_get_clkout_khz
	movl	%eax, %r14d
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	_DSI_WRPCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_WRPCR_NDIV@GOTPCREL(%rip), %rax
	movq	_WRPCR_IDF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_WRPCR_ODF@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	-48(%rbp), %eax
	shll	$2, %eax
	movl	-52(%rbp), %edi
	shll	$11, %edi
	orl	%eax, %edi
	movl	-44(%rbp), %eax
	bsfl	%eax, %ebx
	shll	$16, %ebx
	testl	%eax, %eax
	movl	$-65536, %ecx                   ## imm = 0xFFFF0000
	cmovnel	%ebx, %ecx
	orl	%edi, %ecx
	movq	%r13, %rdi
	callq	_dsi_update_bits
	movl	$4000000, %eax                  ## imm = 0x3D0900
	xorl	%edx, %edx
	divl	%r14d
	movq	_DSI_WPCR0@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_WPCR0_UIX4@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r13, %rdi
	movl	%eax, %ecx
	callq	_dsi_update_bits
	movq	_DSI_WCFGR@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_WCFGR_DSIM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_dsi_clear
	movl	(%rbx), %r14d
	movq	_WCFGR_COLMUX@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	callq	_dsi_color_from_mipi
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%rax), %ecx
	movq	%r13, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	callq	_dsi_update_bits
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	movl	%edx, %eax
	imulq	$274877907, %rax, %rcx          ## imm = 0x10624DD3
	shrq	$38, %rcx
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	%ecx, (%rax)
	leaq	L_.str.3(%rip), %rdi
	movl	%r12d, %esi
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_DRM_DEBUG_DRIVER
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LANE_MIN_KBPS,4,2              ## @LANE_MIN_KBPS
	.comm	_LANE_MAX_KBPS,4,2              ## @LANE_MAX_KBPS
	.comm	_HWVER_131,8,3                  ## @HWVER_131
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Warning max phy mbps is used\n"

L_.str.1:                               ## @.str.1
	.asciz	"Warning min phy mbps is used\n"

L_.str.2:                               ## @.str.2
	.asciz	"Warning dsi_pll_get_params(): bad params\n"

	.comm	_DSI_WRPCR,4,2                  ## @DSI_WRPCR
	.comm	_WRPCR_NDIV,4,2                 ## @WRPCR_NDIV
	.comm	_WRPCR_IDF,4,2                  ## @WRPCR_IDF
	.comm	_WRPCR_ODF,4,2                  ## @WRPCR_ODF
	.comm	_DSI_WPCR0,4,2                  ## @DSI_WPCR0
	.comm	_WPCR0_UIX4,4,2                 ## @WPCR0_UIX4
	.comm	_DSI_WCFGR,4,2                  ## @DSI_WCFGR
	.comm	_WCFGR_DSIM,4,2                 ## @WCFGR_DSIM
	.comm	_WCFGR_COLMUX,4,2               ## @WCFGR_COLMUX
L_.str.3:                               ## @.str.3
	.asciz	"pll_in %ukHz pll_out %ukHz lane_mbps %uMHz\n"

	.no_dead_strip	_dw_mipi_dsi_get_lane_mbps
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dw_mipi_dsi_get_lane_mbps
_dw_mipi_dsi_get_lane_mbps:             ; @dw_mipi_dsi_get_lane_mbps
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x5
	mov	x21, x4
	mov	x23, x3
	mov	x24, x1
	mov	x20, x0
	ldr	x10, [x0, #8]
Lloh0:
	adrp	x8, _LANE_MIN_KBPS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LANE_MIN_KBPS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x0]
Lloh3:
	adrp	x9, _LANE_MAX_KBPS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _LANE_MAX_KBPS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	str	w9, [x0, #4]
Lloh6:
	adrp	x11, _HWVER_131@GOTPAGE
Lloh7:
	ldr	x11, [x11, _HWVER_131@GOTPAGEOFF]
Lloh8:
	ldr	x11, [x11]
	cmp	x10, x11
	b.ne	LBB0_2
; %bb.1:
	lsl	w8, w8, #1
	lsl	w9, w9, #1
	stp	w8, w9, [x20]
LBB0_2:
	ldr	w0, [x20, #16]
	bl	_clk_get_rate
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	smull	x8, w0, w8
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w22, w8, w9
	mov	x0, x21
	bl	_mipi_dsi_pixel_format_to_bpp
	ldr	w8, [x24]
	mul	w8, w8, w0
	sdiv	w8, w8, w23
	add	w8, w8, w8, lsl #1
	lsl	w8, w8, #2
	mov	w9, #52429
	movk	w9, #52428, lsl #16
	umull	x8, w8, w9
	lsr	x2, x8, #35
	ldr	w23, [x20, #4]
	cmp	w2, w23
	b.ls	LBB0_4
; %bb.3:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_WARN
	mov	x2, x23
LBB0_4:
	ldr	w23, [x20]
	cmp	w2, w23
	b.hs	LBB0_6
; %bb.5:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_WARN
	mov	x2, x23
LBB0_6:
	str	xzr, [sp, #8]
	str	wzr, [sp, #4]
	add	x3, sp, #12
	add	x4, sp, #8
	add	x5, sp, #4
	mov	x0, x20
	mov	x1, x22
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_dsi_pll_get_params
	cbz	w0, LBB0_8
; %bb.7:
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_WARN
LBB0_8:
	ldp	w2, w1, [sp, #8]
	ldr	w3, [sp, #4]
	mov	x0, x22
	bl	_dsi_pll_get_clkout_khz
	mov	x23, x0
Lloh15:
	adrp	x8, _DSI_WRPCR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DSI_WRPCR@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x8, _WRPCR_NDIV@GOTPAGE
Lloh19:
	ldr	x8, [x8, _WRPCR_NDIV@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _WRPCR_IDF@GOTPAGE
Lloh22:
	ldr	x9, [x9, _WRPCR_IDF@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh24:
	adrp	x9, _WRPCR_ODF@GOTPAGE
Lloh25:
	ldr	x9, [x9, _WRPCR_ODF@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	orr	w2, w8, w9
	ldp	w8, w9, [sp, #8]
	lsl	w9, w9, #11
	orr	w8, w9, w8, lsl #2
	ldr	w9, [sp, #4]
	rbit	w10, w9
	clz	w10, w10
	lsl	w10, w10, #16
	mov	w11, #-65536
	cmp	w9, #0
	csel	w9, w11, w10, eq
	orr	w3, w8, w9
	mov	x0, x20
	bl	_dsi_update_bits
Lloh27:
	adrp	x8, _DSI_WPCR0@GOTPAGE
Lloh28:
	ldr	x8, [x8, _DSI_WPCR0@GOTPAGEOFF]
	mov	w9, #2304
	movk	w9, #61, lsl #16
Lloh29:
	ldr	w1, [x8]
Lloh30:
	adrp	x8, _WPCR0_UIX4@GOTPAGE
Lloh31:
	ldr	x8, [x8, _WPCR0_UIX4@GOTPAGEOFF]
Lloh32:
	ldr	w2, [x8]
	udiv	w3, w9, w23
	mov	x0, x20
	bl	_dsi_update_bits
Lloh33:
	adrp	x24, _DSI_WCFGR@GOTPAGE
Lloh34:
	ldr	x24, [x24, _DSI_WCFGR@GOTPAGEOFF]
	ldr	w1, [x24]
Lloh35:
	adrp	x8, _WCFGR_DSIM@GOTPAGE
Lloh36:
	ldr	x8, [x8, _WCFGR_DSIM@GOTPAGEOFF]
Lloh37:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_dsi_clear
	ldr	w24, [x24]
Lloh38:
	adrp	x8, _WCFGR_COLMUX@GOTPAGE
Lloh39:
	ldr	x8, [x8, _WCFGR_COLMUX@GOTPAGEOFF]
Lloh40:
	ldr	w25, [x8]
	mov	x0, x21
	bl	_dsi_color_from_mipi
	lsl	w3, w0, #1
	mov	x0, x20
	mov	x1, x24
	mov	x2, x25
	bl	_dsi_update_bits
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	umull	x8, w23, w8
	lsr	x3, x8, #38
	str	w3, [x19]
Lloh41:
	adrp	x0, l_.str.3@PAGE
Lloh42:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x22
	mov	x2, x23
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_DRM_DEBUG_DRIVER
	mov	w0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.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
	.cfi_endproc
                                        ; -- End function
	.comm	_LANE_MIN_KBPS,4,2              ; @LANE_MIN_KBPS
	.comm	_LANE_MAX_KBPS,4,2              ; @LANE_MAX_KBPS
	.comm	_HWVER_131,8,3                  ; @HWVER_131
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Warning max phy mbps is used\n"

l_.str.1:                               ; @.str.1
	.asciz	"Warning min phy mbps is used\n"

l_.str.2:                               ; @.str.2
	.asciz	"Warning dsi_pll_get_params(): bad params\n"

	.comm	_DSI_WRPCR,4,2                  ; @DSI_WRPCR
	.comm	_WRPCR_NDIV,4,2                 ; @WRPCR_NDIV
	.comm	_WRPCR_IDF,4,2                  ; @WRPCR_IDF
	.comm	_WRPCR_ODF,4,2                  ; @WRPCR_ODF
	.comm	_DSI_WPCR0,4,2                  ; @DSI_WPCR0
	.comm	_WPCR0_UIX4,4,2                 ; @WPCR0_UIX4
	.comm	_DSI_WCFGR,4,2                  ; @DSI_WCFGR
	.comm	_WCFGR_DSIM,4,2                 ; @WCFGR_DSIM
	.comm	_WCFGR_COLMUX,4,2               ; @WCFGR_COLMUX
l_.str.3:                               ; @.str.3
	.asciz	"pll_in %ukHz pll_out %ukHz lane_mbps %uMHz\n"

	.no_dead_strip	_dw_mipi_dsi_get_lane_mbps
.subsections_via_symbols
