	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i965_update_wm
_i965_update_wm:                        ## @i965_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
	movl	16(%rdi), %edi
	callq	_to_i915
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_single_enabled_crtc
	movq	%rax, %r15
	testq	%rax, %rax
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_2
## %bb.1:
	movq	8(%r15), %rax
	movq	24(%r15), %rcx
	movq	(%rax), %rax
	movq	(%rax), %rax
	movl	(%rcx), %edx
	movl	4(%rcx), %r12d
	movl	8(%rcx), %r13d
	movq	(%rax), %rax
	movq	(%rax), %rax
	movl	(%rax), %ecx
	movl	%r12d, %edi
	movl	%r13d, %esi
	movl	$120, %r8d
	callq	_intel_wm_method2
	movq	_I915_FIFO_LINE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_DIV_ROUND_UP
	movq	_I965_FIFO_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	subl	%eax, %ecx
	movl	%ecx, %edx
	andl	$511, %edx                      ## imm = 0x1FF
	testl	%ecx, %ecx
	movl	$1, %ebx
	cmovnsl	%edx, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	(%r15), %rax
	movq	(%rax), %rax
	movl	(%rax), %edx
	movl	%r12d, %edi
	movl	%r13d, %esi
	movl	$4, %ecx
	movl	$120, %r8d
	callq	_intel_wm_method2
	movq	_i965_cursor_wm_info@GOTPCREL(%rip), %r14
	movl	12(%r14), %esi
	movl	%eax, %edi
	callq	_DIV_ROUND_UP
	addl	(%r14), %eax
	movl	4(%r14), %r12d
	subl	%eax, %r12d
	movl	8(%r14), %eax
	cmpl	%eax, %r12d
	cmovgel	%eax, %r12d
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	jmp	LBB0_3
LBB0_2:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_intel_set_memory_cxsr
	movl	$1, %ebx
	movl	$16, %r12d
LBB0_3:
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	_DSPFW1@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_SR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_FW_WM
	movl	%eax, %ebx
	movq	_CURSORB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$8, %edi
	callq	_FW_WM
	movl	%eax, %r14d
	movq	_PLANEB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$8, %edi
	callq	_FW_WM
	orl	%eax, %r14d
	movq	_PLANEA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$8, %edi
	callq	_FW_WM
	orl	%eax, %r14d
	orl	%ebx, %r14d
	movl	%r13d, %edi
	movl	%r14d, %esi
	callq	_I915_WRITE
	movq	_DSPFW2@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_CURSORA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$8, %edi
	callq	_FW_WM
	movl	%eax, %ebx
	movq	_PLANEC_OLD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$8, %edi
	callq	_FW_WM
	orl	%eax, %ebx
	movl	%r14d, %edi
	movl	%ebx, %esi
	callq	_I915_WRITE
	movq	_DSPFW3@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_CURSOR_SR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edi
	callq	_FW_WM
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_I915_WRITE
	testq	%r15, %r15
	je	LBB0_4
## %bb.5:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	$1, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_intel_set_memory_cxsr          ## TAILCALL
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I915_FIFO_LINE_SIZE,4,2        ## @I915_FIFO_LINE_SIZE
	.comm	_I965_FIFO_SIZE,4,2             ## @I965_FIFO_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"self-refresh entries: %d, wm: %d\n"

	.comm	_i965_cursor_wm_info,16,2       ## @i965_cursor_wm_info
L_.str.1:                               ## @.str.1
	.asciz	"self-refresh watermark: display plane %d cursor %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Setting FIFO watermarks - A: 8, B: 8, C: 8, SR %d\n"

	.comm	_DSPFW1,4,2                     ## @DSPFW1
	.comm	_SR,4,2                         ## @SR
	.comm	_CURSORB,4,2                    ## @CURSORB
	.comm	_PLANEB,4,2                     ## @PLANEB
	.comm	_PLANEA,4,2                     ## @PLANEA
	.comm	_DSPFW2,4,2                     ## @DSPFW2
	.comm	_CURSORA,4,2                    ## @CURSORA
	.comm	_PLANEC_OLD,4,2                 ## @PLANEC_OLD
	.comm	_DSPFW3,4,2                     ## @DSPFW3
	.comm	_CURSOR_SR,4,2                  ## @CURSOR_SR
	.no_dead_strip	_i965_update_wm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i965_update_wm
_i965_update_wm:                        ; @i965_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
	ldr	w0, [x0, #16]
	bl	_to_i915
	mov	x19, x0
	bl	_single_enabled_crtc
	mov	x20, x0
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x8, [x20, #24]
	ldr	x9, [x20, #8]
	ldr	x9, [x9]
	ldr	x9, [x9]
	ldp	w23, w21, [x8, #4]
	ldr	w2, [x8]
	ldr	x8, [x9]
	ldr	x8, [x8]
	ldr	w3, [x8]
	mov	x0, x23
	mov	x1, x21
	mov	w4, #120
	bl	_intel_wm_method2
Lloh0:
	adrp	x8, _I915_FIFO_LINE_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I915_FIFO_LINE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_DIV_ROUND_UP
	mov	x1, x0
Lloh3:
	adrp	x8, _I965_FIFO_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I965_FIFO_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	sub	w8, w8, w0
	and	w9, w8, #0x1ff
	cmp	w8, #0
	csinc	w22, w9, wzr, ge
	str	x22, [sp]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	w2, [x8]
	mov	x0, x23
	mov	x1, x21
	mov	w3, #4
	mov	w4, #120
	bl	_intel_wm_method2
Lloh8:
	adrp	x21, _i965_cursor_wm_info@GOTPAGE
Lloh9:
	ldr	x21, [x21, _i965_cursor_wm_info@GOTPAGEOFF]
	ldr	w1, [x21, #12]
	bl	_DIV_ROUND_UP
	ldp	w8, w9, [x21]
	add	w8, w8, w0
	sub	w8, w9, w8
	ldr	w9, [x21, #8]
	cmp	w8, w9
	csel	w21, w8, w9, lt
	str	x21, [sp]
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x22
	bl	_DRM_DEBUG_KMS
	b	LBB0_3
LBB0_2:
	mov	x0, x19
	mov	w1, #0
	bl	_intel_set_memory_cxsr
	mov	w22, #1
	mov	w21, #16
LBB0_3:
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x22
	bl	_DRM_DEBUG_KMS
Lloh14:
	adrp	x8, _DSPFW1@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DSPFW1@GOTPAGEOFF]
Lloh16:
	ldr	w23, [x8]
Lloh17:
	adrp	x8, _SR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SR@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_FW_WM
	mov	x22, x0
Lloh20:
	adrp	x8, _CURSORB@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CURSORB@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	w0, #8
	bl	_FW_WM
	orr	w22, w0, w22
Lloh23:
	adrp	x8, _PLANEB@GOTPAGE
Lloh24:
	ldr	x8, [x8, _PLANEB@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	w0, #8
	bl	_FW_WM
	orr	w22, w22, w0
Lloh26:
	adrp	x8, _PLANEA@GOTPAGE
Lloh27:
	ldr	x8, [x8, _PLANEA@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	w0, #8
	bl	_FW_WM
	orr	w1, w22, w0
	mov	x0, x23
	bl	_I915_WRITE
Lloh29:
	adrp	x8, _DSPFW2@GOTPAGE
Lloh30:
	ldr	x8, [x8, _DSPFW2@GOTPAGEOFF]
Lloh31:
	ldr	w22, [x8]
Lloh32:
	adrp	x8, _CURSORA@GOTPAGE
Lloh33:
	ldr	x8, [x8, _CURSORA@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	mov	w0, #8
	bl	_FW_WM
	mov	x23, x0
Lloh35:
	adrp	x8, _PLANEC_OLD@GOTPAGE
Lloh36:
	ldr	x8, [x8, _PLANEC_OLD@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	mov	w0, #8
	bl	_FW_WM
	orr	w1, w0, w23
	mov	x0, x22
	bl	_I915_WRITE
Lloh38:
	adrp	x8, _DSPFW3@GOTPAGE
Lloh39:
	ldr	x8, [x8, _DSPFW3@GOTPAGEOFF]
Lloh40:
	ldr	w22, [x8]
Lloh41:
	adrp	x8, _CURSOR_SR@GOTPAGE
Lloh42:
	ldr	x8, [x8, _CURSOR_SR@GOTPAGEOFF]
Lloh43:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_FW_WM
	mov	x1, x0
	mov	x0, x22
	bl	_I915_WRITE
	cbz	x20, LBB0_5
; %bb.4:
	mov	x0, x19
	mov	w1, #1
	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	_intel_set_memory_cxsr
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
	ret
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_I915_FIFO_LINE_SIZE,4,2        ; @I915_FIFO_LINE_SIZE
	.comm	_I965_FIFO_SIZE,4,2             ; @I965_FIFO_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"self-refresh entries: %d, wm: %d\n"

	.comm	_i965_cursor_wm_info,16,2       ; @i965_cursor_wm_info
l_.str.1:                               ; @.str.1
	.asciz	"self-refresh watermark: display plane %d cursor %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Setting FIFO watermarks - A: 8, B: 8, C: 8, SR %d\n"

	.comm	_DSPFW1,4,2                     ; @DSPFW1
	.comm	_SR,4,2                         ; @SR
	.comm	_CURSORB,4,2                    ; @CURSORB
	.comm	_PLANEB,4,2                     ; @PLANEB
	.comm	_PLANEA,4,2                     ; @PLANEA
	.comm	_DSPFW2,4,2                     ; @DSPFW2
	.comm	_CURSORA,4,2                    ; @CURSORA
	.comm	_PLANEC_OLD,4,2                 ; @PLANEC_OLD
	.comm	_DSPFW3,4,2                     ; @DSPFW3
	.comm	_CURSOR_SR,4,2                  ; @CURSOR_SR
	.no_dead_strip	_i965_update_wm
.subsections_via_symbols
