	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pineview_update_wm
_pineview_update_wm:                    ## @pineview_update_wm
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rbx
	callq	_IS_PINEVIEW_G
	movl	8(%rbx), %esi
	movl	(%rbx), %ecx
	movl	4(%rbx), %edx
	movl	%eax, %edi
	callq	_intel_get_cxsr_latency
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_single_enabled_crtc
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movl	8(%rax), %r14d
	movq	(%rax), %rax
	movl	(%rax), %eax
	leal	7(%rax), %r13d
	testl	%eax, %eax
	cmovnsl	%eax, %r13d
	sarl	$3, %r13d
	movq	_pineview_display_wm@GOTPCREL(%rip), %rsi
	movl	(%rsi), %edx
	movl	12(%r15), %r8d
	movl	%r14d, %edi
	movl	%r13d, %ecx
	callq	_intel_calculate_wm
	movq	%rax, %rbx
	movq	_DSPFW1@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_I915_READ
	movq	_DSPFW_SR_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movq	_DSPFW_SR_MASK@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	shlq	%cl, %rbx
	notq	%rdx
	andq	%rax, %rdx
	orq	%rdx, %rbx
	movl	(%r12), %edi
	movq	%rbx, %rsi
	callq	_I915_WRITE
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	_pineview_display_wm@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	8(%r15), %r8d
	movq	_pineview_cursor_wm@GOTPCREL(%rip), %rsi
	movl	%r14d, %edi
	movl	%r13d, %ecx
	callq	_intel_calculate_wm
	movq	%rax, %rbx
	movq	_DSPFW3@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rax, %r12
	callq	_I915_READ
	movq	_DSPFW_CURSOR_SR_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movq	_DSPFW_CURSOR_SR_MASK@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	andl	$63, %ebx
	shlq	%cl, %rbx
	notq	%rdx
	andq	%rax, %rdx
	orq	%rdx, %rbx
	movl	(%r12), %edi
	movq	%rbx, %rsi
	callq	_I915_WRITE
	movq	_pineview_display_hplloff_wm@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movl	4(%r15), %r8d
	movl	%r14d, %edi
	movq	%r12, %rsi
	movl	%r13d, %ecx
	callq	_intel_calculate_wm
	movq	%rax, %rbx
	movq	_DSPFW3@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_I915_READ
	movq	_DSPFW_HPLL_SR_MASK@GOTPCREL(%rip), %rcx
	xorq	%rax, %rbx
	andq	(%rcx), %rbx
	xorq	%rax, %rbx
	movq	_DSPFW3@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_I915_WRITE
	movl	(%r12), %edx
	movl	(%r15), %r8d
	movq	_pineview_cursor_hplloff_wm@GOTPCREL(%rip), %rsi
	movl	%r14d, %edi
	movl	%r13d, %ecx
	callq	_intel_calculate_wm
	movq	%rax, %rbx
	movq	_DSPFW3@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_I915_READ
	movq	_DSPFW_HPLL_CURSOR_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movq	_DSPFW_HPLL_CURSOR_MASK@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	andl	$63, %ebx
	shlq	%cl, %rbx
	notq	%rdx
	andq	%rax, %rdx
	orq	%rdx, %rbx
	movl	(%r14), %edi
	movq	%rbx, %rsi
	callq	_I915_WRITE
	leaq	L_.str.2(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movl	(%r14), %ebx
	movl	%ebx, %edi
	callq	_I915_READ
	movq	_PINEVIEW_SELF_REFRESH_EN@GOTPCREL(%rip), %rcx
	orq	(%rcx), %rax
	movl	%ebx, %edi
	movq	%rax, %rsi
	callq	_I915_WRITE
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_4
LBB0_5:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pineview_disable_cxsr          ## TAILCALL
LBB0_3:
	movq	%r14, %rdi
	callq	_pineview_disable_cxsr
	leaq	L_.str.4(%rip), %rdi
LBB0_4:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_DEBUG_KMS                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown FSB/MEM found, disable CxSR\n"

	.comm	_pineview_display_wm,4,2        ## @pineview_display_wm
	.comm	_DSPFW1,4,2                     ## @DSPFW1
	.comm	_DSPFW_SR_MASK,8,3              ## @DSPFW_SR_MASK
	.comm	_DSPFW_SR_SHIFT,8,3             ## @DSPFW_SR_SHIFT
L_.str.1:                               ## @.str.1
	.asciz	"DSPFW1 register is %x\n"

	.comm	_pineview_cursor_wm,4,2         ## @pineview_cursor_wm
	.comm	_DSPFW3,4,2                     ## @DSPFW3
	.comm	_DSPFW_CURSOR_SR_MASK,8,3       ## @DSPFW_CURSOR_SR_MASK
	.comm	_DSPFW_CURSOR_SR_SHIFT,8,3      ## @DSPFW_CURSOR_SR_SHIFT
	.comm	_pineview_display_hplloff_wm,4,2 ## @pineview_display_hplloff_wm
	.comm	_DSPFW_HPLL_SR_MASK,8,3         ## @DSPFW_HPLL_SR_MASK
	.comm	_pineview_cursor_hplloff_wm,4,2 ## @pineview_cursor_hplloff_wm
	.comm	_DSPFW_HPLL_CURSOR_MASK,8,3     ## @DSPFW_HPLL_CURSOR_MASK
	.comm	_DSPFW_HPLL_CURSOR_SHIFT,8,3    ## @DSPFW_HPLL_CURSOR_SHIFT
L_.str.2:                               ## @.str.2
	.asciz	"DSPFW3 register is %x\n"

	.comm	_PINEVIEW_SELF_REFRESH_EN,8,3   ## @PINEVIEW_SELF_REFRESH_EN
L_.str.3:                               ## @.str.3
	.asciz	"Self-refresh is enabled\n"

L_.str.4:                               ## @.str.4
	.asciz	"Self-refresh is disabled\n"

	.no_dead_strip	_pineview_update_wm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pineview_update_wm
_pineview_update_wm:                    ; @pineview_update_wm
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x0
	ldr	x19, [x0]
	bl	_IS_PINEVIEW_G
	ldp	w2, w1, [x19, #4]
	ldr	w3, [x19]
	bl	_intel_get_cxsr_latency
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	mov	x0, x20
	bl	_single_enabled_crtc
	cbz	x0, LBB0_4
; %bb.2:
	ldr	w20, [x0, #8]
	ldr	x8, [x0]
	ldr	w8, [x8]
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w21, w8, #3
Lloh0:
	adrp	x22, _pineview_display_wm@GOTPAGE
Lloh1:
	ldr	x22, [x22, _pineview_display_wm@GOTPAGEOFF]
	ldr	w2, [x22]
	ldr	w4, [x19, #12]
	mov	x0, x20
	mov	x1, x22
	mov	x3, x21
	bl	_intel_calculate_wm
	mov	x23, x0
Lloh2:
	adrp	x24, _DSPFW1@GOTPAGE
Lloh3:
	ldr	x24, [x24, _DSPFW1@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_I915_READ
Lloh4:
	adrp	x8, _DSPFW_SR_MASK@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DSPFW_SR_MASK@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	bic	x8, x0, x8
Lloh7:
	adrp	x9, _DSPFW_SR_SHIFT@GOTPAGE
Lloh8:
	ldr	x9, [x9, _DSPFW_SR_SHIFT@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	lsl	x9, x23, x9
	orr	x23, x9, x8
	ldr	w0, [x24]
	mov	x1, x23
	bl	_I915_WRITE
	str	x23, [sp]
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_KMS
	ldr	w2, [x22]
	ldr	w4, [x19, #8]
Lloh12:
	adrp	x1, _pineview_cursor_wm@GOTPAGE
Lloh13:
	ldr	x1, [x1, _pineview_cursor_wm@GOTPAGEOFF]
	mov	x0, x20
	mov	x3, x21
	bl	_intel_calculate_wm
	mov	x22, x0
Lloh14:
	adrp	x24, _DSPFW3@GOTPAGE
Lloh15:
	ldr	x24, [x24, _DSPFW3@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_I915_READ
Lloh16:
	adrp	x8, _DSPFW_CURSOR_SR_MASK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DSPFW_CURSOR_SR_MASK@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	bic	x8, x0, x8
	and	x9, x22, #0x3f
Lloh19:
	adrp	x10, _DSPFW_CURSOR_SR_SHIFT@GOTPAGE
Lloh20:
	ldr	x10, [x10, _DSPFW_CURSOR_SR_SHIFT@GOTPAGEOFF]
Lloh21:
	ldr	x10, [x10]
	lsl	x9, x9, x10
	orr	x1, x9, x8
	ldr	w0, [x24]
	bl	_I915_WRITE
Lloh22:
	adrp	x22, _pineview_display_hplloff_wm@GOTPAGE
Lloh23:
	ldr	x22, [x22, _pineview_display_hplloff_wm@GOTPAGEOFF]
	ldr	w2, [x22]
	ldr	w4, [x19, #4]
	mov	x0, x20
	mov	x1, x22
	mov	x3, x21
	bl	_intel_calculate_wm
	mov	x23, x0
	ldr	w0, [x24]
	bl	_I915_READ
Lloh24:
	adrp	x8, _DSPFW_HPLL_SR_MASK@GOTPAGE
Lloh25:
	ldr	x8, [x8, _DSPFW_HPLL_SR_MASK@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	bic	x9, x0, x8
	and	x8, x8, x23
	orr	x1, x9, x8
	ldr	w0, [x24]
	bl	_I915_WRITE
	ldr	w2, [x22]
	ldr	w4, [x19]
Lloh27:
	adrp	x1, _pineview_cursor_hplloff_wm@GOTPAGE
Lloh28:
	ldr	x1, [x1, _pineview_cursor_hplloff_wm@GOTPAGEOFF]
	mov	x0, x20
	mov	x3, x21
	bl	_intel_calculate_wm
	mov	x19, x0
	ldr	w0, [x24]
	bl	_I915_READ
Lloh29:
	adrp	x8, _DSPFW_HPLL_CURSOR_MASK@GOTPAGE
Lloh30:
	ldr	x8, [x8, _DSPFW_HPLL_CURSOR_MASK@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
	bic	x8, x0, x8
	and	x9, x19, #0x3f
Lloh32:
	adrp	x10, _DSPFW_HPLL_CURSOR_SHIFT@GOTPAGE
Lloh33:
	ldr	x10, [x10, _DSPFW_HPLL_CURSOR_SHIFT@GOTPAGEOFF]
Lloh34:
	ldr	x10, [x10]
	lsl	x9, x9, x10
	orr	x19, x9, x8
	ldr	w0, [x24]
	mov	x1, x19
	bl	_I915_WRITE
	str	x19, [sp]
Lloh35:
	adrp	x0, l_.str.2@PAGE
Lloh36:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_DEBUG_KMS
	ldr	w19, [x24]
	mov	x0, x19
	bl	_I915_READ
Lloh37:
	adrp	x8, _PINEVIEW_SELF_REFRESH_EN@GOTPAGE
Lloh38:
	ldr	x8, [x8, _PINEVIEW_SELF_REFRESH_EN@GOTPAGEOFF]
Lloh39:
	ldr	x8, [x8]
	orr	x1, x8, x0
	mov	x0, x19
	bl	_I915_WRITE
Lloh40:
	adrp	x0, l_.str.3@PAGE
Lloh41:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_5
LBB0_3:
Lloh42:
	adrp	x0, l_.str@PAGE
Lloh43:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
	mov	x0, x20
	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
	add	sp, sp, #80
	b	_pineview_disable_cxsr
LBB0_4:
	mov	x0, x20
	bl	_pineview_disable_cxsr
Lloh44:
	adrp	x0, l_.str.4@PAGE
Lloh45:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_5:
	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
	add	sp, sp, #80
	b	_DRM_DEBUG_KMS
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpAdd	Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown FSB/MEM found, disable CxSR\n"

	.comm	_pineview_display_wm,4,2        ; @pineview_display_wm
	.comm	_DSPFW1,4,2                     ; @DSPFW1
	.comm	_DSPFW_SR_MASK,8,3              ; @DSPFW_SR_MASK
	.comm	_DSPFW_SR_SHIFT,8,3             ; @DSPFW_SR_SHIFT
l_.str.1:                               ; @.str.1
	.asciz	"DSPFW1 register is %x\n"

	.comm	_pineview_cursor_wm,4,2         ; @pineview_cursor_wm
	.comm	_DSPFW3,4,2                     ; @DSPFW3
	.comm	_DSPFW_CURSOR_SR_MASK,8,3       ; @DSPFW_CURSOR_SR_MASK
	.comm	_DSPFW_CURSOR_SR_SHIFT,8,3      ; @DSPFW_CURSOR_SR_SHIFT
	.comm	_pineview_display_hplloff_wm,4,2 ; @pineview_display_hplloff_wm
	.comm	_DSPFW_HPLL_SR_MASK,8,3         ; @DSPFW_HPLL_SR_MASK
	.comm	_pineview_cursor_hplloff_wm,4,2 ; @pineview_cursor_hplloff_wm
	.comm	_DSPFW_HPLL_CURSOR_MASK,8,3     ; @DSPFW_HPLL_CURSOR_MASK
	.comm	_DSPFW_HPLL_CURSOR_SHIFT,8,3    ; @DSPFW_HPLL_CURSOR_SHIFT
l_.str.2:                               ; @.str.2
	.asciz	"DSPFW3 register is %x\n"

	.comm	_PINEVIEW_SELF_REFRESH_EN,8,3   ; @PINEVIEW_SELF_REFRESH_EN
l_.str.3:                               ; @.str.3
	.asciz	"Self-refresh is enabled\n"

l_.str.4:                               ; @.str.4
	.asciz	"Self-refresh is disabled\n"

	.no_dead_strip	_pineview_update_wm
.subsections_via_symbols
