	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function exynos_dsi_set_pll
_exynos_dsi_set_pll:                    ## @exynos_dsi_set_pll
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rdx
	movq	%rdi, %r15
	movq	24(%rdi), %r12
	movq	(%rdi), %rsi
	leaq	-52(%rbp), %rcx
	leaq	-44(%rbp), %r8
	leaq	-48(%rbp), %r9
	callq	_exynos_dsi_pll_find_pms
	movl	8(%r15), %edi
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r14
	movl	-52(%rbp), %ecx
	movl	-44(%rbp), %r8d
	movl	-48(%rbp), %r9d
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	8(%r12), %rsi
	movq	16(%r12), %rax
	movq	_PLL_TIMER@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %edi
	addq	16(%r15), %rsi
	callq	_writel
	movq	_DSIM_PLL_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	-52(%rbp), %edi
	callq	_DSIM_PLL_P
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movl	%eax, %r12d
	movl	-44(%rbp), %edi
	callq	_DSIM_PLL_M
	movl	%eax, %r13d
	orl	%r12d, %r13d
	movl	-48(%rbp), %edi
	callq	_DSIM_PLL_S
	movl	%eax, %r12d
	orl	%r13d, %r12d
	orl	-56(%rbp), %r12d                ## 4-byte Folded Reload
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.4:
	leaq	_exynos_dsi_set_pll.freq_bands(%rip), %r13
	movq	%r13, %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_8
## %bb.5:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	(%r13), %r14
	jb	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%rbx
	leaq	_exynos_dsi_set_pll.freq_bands(%rip), %rdi
	callq	_ARRAY_SIZE
	cltq
	addq	$8, %r13
	cmpq	%rax, %rbx
	jl	LBB0_6
LBB0_8:
	movl	8(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	%ebx, %edi
	callq	_DSIM_FREQ_BAND
	orl	%eax, %r12d
LBB0_9:
	movq	_DSIM_PLLCTRL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_exynos_dsi_write
	movl	$-1001, %ebx                    ## imm = 0xFC17
	movq	_DSIM_STATUS_REG@GOTPCREL(%rip), %r12
	movq	_DSIM_PLL_STABLE@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	incl	%ebx
	je	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_exynos_dsi_read
	testl	%eax, (%r13)
	je	LBB0_10
	jmp	LBB0_13
LBB0_1:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_11:
	movl	8(%r15), %edi
	leaq	L_.str.3(%rip), %rsi
LBB0_2:
	callq	_dev_err
	xorl	%r14d, %r14d
LBB0_13:
	movq	%r14, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to find PLL PMS for requested frequency\n"

L_.str.1:                               ## @.str.1
	.asciz	"PLL freq %lu, (p %d, m %d, s %d)\n"

	.comm	_PLL_TIMER,8,3                  ## @PLL_TIMER
	.comm	_DSIM_PLL_EN,4,2                ## @DSIM_PLL_EN
	.section	__TEXT,__const
	.p2align	4                               ## @exynos_dsi_set_pll.freq_bands
_exynos_dsi_set_pll.freq_bands:
	.quad	12800                           ## 0x3200
	.quad	15360                           ## 0x3c00
	.quad	20480                           ## 0x5000
	.quad	25600                           ## 0x6400
	.quad	34560                           ## 0x8700
	.quad	40960                           ## 0xa000
	.quad	49920                           ## 0xc300
	.quad	57600                           ## 0xe100
	.quad	65280                           ## 0xff00
	.quad	71680                           ## 0x11800
	.quad	81920                           ## 0x14000
	.quad	88320                           ## 0x15900
	.quad	98560                           ## 0x18100
	.quad	111360                          ## 0x1b300
	.quad	121600                          ## 0x1db00

	.section	__TEXT,__cstring,cstring_literals
L_.str.2:                               ## @.str.2
	.asciz	"band %d\n"

	.comm	_DSIM_PLLCTRL_REG,4,2           ## @DSIM_PLLCTRL_REG
L_.str.3:                               ## @.str.3
	.asciz	"PLL failed to stabilize\n"

	.comm	_DSIM_STATUS_REG,4,2            ## @DSIM_STATUS_REG
	.comm	_DSIM_PLL_STABLE,4,2            ## @DSIM_PLL_STABLE
	.no_dead_strip	_exynos_dsi_set_pll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function exynos_dsi_set_pll
_exynos_dsi_set_pll:                    ; @exynos_dsi_set_pll
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x2, x1
	mov	x19, x0
	ldr	x22, [x0, #24]
	ldr	x1, [x0]
	add	x3, sp, #44
	add	x4, sp, #36
	add	x5, sp, #40
	bl	_exynos_dsi_pll_find_pms
	mov	x20, x0
	ldr	w0, [x19, #8]
	cbz	x20, LBB0_6
; %bb.1:
	ldp	w10, w8, [sp, #40]
	ldr	w9, [sp, #36]
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_dev_dbg
Lloh2:
	adrp	x8, _PLL_TIMER@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PLL_TIMER@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	ldp	x10, x9, [x22, #8]
	ldr	w0, [x9, x8, lsl #2]
	ldr	x8, [x19, #16]
	add	x1, x10, x8
	bl	_writel
Lloh5:
	adrp	x8, _DSIM_PLL_EN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DSIM_PLL_EN@GOTPAGEOFF]
Lloh7:
	ldr	w21, [x8]
	ldr	w0, [sp, #44]
	bl	_DSIM_PLL_P
	orr	w21, w0, w21
	ldr	w0, [sp, #36]
	bl	_DSIM_PLL_M
	orr	w21, w21, w0
	ldr	w0, [sp, #40]
	bl	_DSIM_PLL_S
	orr	w21, w21, w0
	ldr	x8, [x22]
	cbz	x8, LBB0_9
; %bb.2:
Lloh8:
	adrp	x23, _exynos_dsi_set_pll.freq_bands@PAGE
Lloh9:
	add	x23, x23, _exynos_dsi_set_pll.freq_bands@PAGEOFF
	mov	x0, x23
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_7
; %bb.3:
	mov	x22, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23, x22, lsl #3]
	cmp	x20, x8
	b.lo	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x22, #1
	mov	x0, x23
	bl	_ARRAY_SIZE
	cmp	x22, w0, sxtw
	b.lt	LBB0_4
	b	LBB0_8
LBB0_6:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_13
LBB0_7:
	mov	w22, #0
LBB0_8:
	ldr	w0, [x19, #8]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x22
	bl	_dev_dbg
	mov	x0, x22
	bl	_DSIM_FREQ_BAND
	orr	w21, w0, w21
LBB0_9:
Lloh14:
	adrp	x8, _DSIM_PLLCTRL_REG@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DSIM_PLLCTRL_REG@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_exynos_dsi_write
	mov	w21, #-1001
Lloh17:
	adrp	x22, _DSIM_STATUS_REG@GOTPAGE
Lloh18:
	ldr	x22, [x22, _DSIM_STATUS_REG@GOTPAGEOFF]
Lloh19:
	adrp	x23, _DSIM_PLL_STABLE@GOTPAGE
Lloh20:
	ldr	x23, [x23, _DSIM_PLL_STABLE@GOTPAGEOFF]
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	adds	w21, w21, #1
	b.hs	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w1, [x22]
	mov	x0, x19
	bl	_exynos_dsi_read
	ldr	w8, [x23]
	tst	w8, w0
	b.eq	LBB0_10
	b	LBB0_13
LBB0_12:
	ldr	w0, [x19, #8]
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
	mov	x20, #0
LBB0_13:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to find PLL PMS for requested frequency\n"

l_.str.1:                               ; @.str.1
	.asciz	"PLL freq %lu, (p %d, m %d, s %d)\n"

	.comm	_PLL_TIMER,8,3                  ; @PLL_TIMER
	.comm	_DSIM_PLL_EN,4,2                ; @DSIM_PLL_EN
	.section	__TEXT,__const
	.p2align	3                               ; @exynos_dsi_set_pll.freq_bands
_exynos_dsi_set_pll.freq_bands:
	.quad	12800                           ; 0x3200
	.quad	15360                           ; 0x3c00
	.quad	20480                           ; 0x5000
	.quad	25600                           ; 0x6400
	.quad	34560                           ; 0x8700
	.quad	40960                           ; 0xa000
	.quad	49920                           ; 0xc300
	.quad	57600                           ; 0xe100
	.quad	65280                           ; 0xff00
	.quad	71680                           ; 0x11800
	.quad	81920                           ; 0x14000
	.quad	88320                           ; 0x15900
	.quad	98560                           ; 0x18100
	.quad	111360                          ; 0x1b300
	.quad	121600                          ; 0x1db00

	.section	__TEXT,__cstring,cstring_literals
l_.str.2:                               ; @.str.2
	.asciz	"band %d\n"

	.comm	_DSIM_PLLCTRL_REG,4,2           ; @DSIM_PLLCTRL_REG
l_.str.3:                               ; @.str.3
	.asciz	"PLL failed to stabilize\n"

	.comm	_DSIM_STATUS_REG,4,2            ; @DSIM_STATUS_REG
	.comm	_DSIM_PLL_STABLE,4,2            ; @DSIM_PLL_STABLE
	.no_dead_strip	_exynos_dsi_set_pll
.subsections_via_symbols
