	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sandybridge_update_sprite_wm
_sandybridge_update_sprite_wm:          ## @sandybridge_update_sprite_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movl	%edx, %r15d
	movl	%esi, %ebx
	movq	%rdi, %r12
	xorl	%eax, %eax
	callq	_SNB_READ_WM0_LATENCY
	cmpl	$2, %ebx
	ja	LBB0_12
## %bb.1:
	imull	$100, %eax, %r9d
	movslq	%ebx, %rax
	leaq	l_switch.table.sandybridge_update_sprite_wm(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movl	(%rax), %r13d
	leaq	-44(%rbp), %rax
	movq	%rax, (%rsp)
	movq	_sandybridge_display_wm_info@GOTPCREL(%rip), %r8
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	callq	_sandybridge_compute_sprite_wm
	testl	%eax, %eax
	je	LBB0_2
## %bb.4:
	movl	%r13d, %edi
	callq	_I915_READ
	movq	_WM0_PIPE_SPRITE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movl	-44(%rbp), %esi
	movq	_WM0_PIPE_SPRITE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %esi
	orl	%edx, %esi
	movl	%r13d, %edi
	callq	_I915_WRITE
	movl	-44(%rbp), %edx
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	xorl	%eax, %eax
	callq	_SNB_READ_WM1_LATENCY
	imull	$500, %eax, %r9d                ## imm = 0x1F4
	leaq	-44(%rbp), %r13
	movq	%r13, (%rsp)
	movq	_sandybridge_display_srwm_info@GOTPCREL(%rip), %r8
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	callq	_sandybridge_compute_sprite_srwm
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movq	_WM1S_LP_ILK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-44(%rbp), %esi
	callq	_I915_WRITE
	movq	%r12, %rdi
	callq	_IS_IVYBRIDGE
	testl	%eax, %eax
	je	LBB0_12
## %bb.7:
	xorl	%eax, %eax
	callq	_SNB_READ_WM2_LATENCY
	imull	$500, %eax, %r9d                ## imm = 0x1F4
	movq	%r13, (%rsp)
	movq	_sandybridge_display_srwm_info@GOTPCREL(%rip), %r8
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	callq	_sandybridge_compute_sprite_srwm
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	movq	_WM2S_LP_IVB@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-44(%rbp), %esi
	callq	_I915_WRITE
	xorl	%eax, %eax
	callq	_SNB_READ_WM3_LATENCY
	imull	$500, %eax, %r9d                ## imm = 0x1F4
	movq	%r13, (%rsp)
	movq	_sandybridge_display_srwm_info@GOTPCREL(%rip), %r8
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	callq	_sandybridge_compute_sprite_srwm
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	movq	_WM3S_LP_IVB@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-44(%rbp), %esi
	callq	_I915_WRITE
	jmp	LBB0_12
LBB0_2:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_3
LBB0_5:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_3
LBB0_8:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_3
LBB0_10:
	leaq	L_.str.4(%rip), %rdi
LBB0_3:
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
LBB0_12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WM0_PIPEA_ILK,4,2              ## @WM0_PIPEA_ILK
	.comm	_WM0_PIPEB_ILK,4,2              ## @WM0_PIPEB_ILK
	.comm	_WM0_PIPEC_IVB,4,2              ## @WM0_PIPEC_IVB
	.comm	_sandybridge_display_wm_info,4,2 ## @sandybridge_display_wm_info
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to compute sprite wm for pipe %d\n"

	.comm	_WM0_PIPE_SPRITE_MASK,4,2       ## @WM0_PIPE_SPRITE_MASK
	.comm	_WM0_PIPE_SPRITE_SHIFT,4,2      ## @WM0_PIPE_SPRITE_SHIFT
L_.str.1:                               ## @.str.1
	.asciz	"sprite watermarks For pipe %d - %d\n"

	.comm	_sandybridge_display_srwm_info,4,2 ## @sandybridge_display_srwm_info
L_.str.2:                               ## @.str.2
	.asciz	"failed to compute sprite lp1 wm on pipe %d\n"

	.comm	_WM1S_LP_ILK,4,2                ## @WM1S_LP_ILK
L_.str.3:                               ## @.str.3
	.asciz	"failed to compute sprite lp2 wm on pipe %d\n"

	.comm	_WM2S_LP_IVB,4,2                ## @WM2S_LP_IVB
L_.str.4:                               ## @.str.4
	.asciz	"failed to compute sprite lp3 wm on pipe %d\n"

	.comm	_WM3S_LP_IVB,4,2                ## @WM3S_LP_IVB
	.no_dead_strip	_sandybridge_update_sprite_wm
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.sandybridge_update_sprite_wm
l_switch.table.sandybridge_update_sprite_wm:
	.quad	_WM0_PIPEA_ILK
	.quad	_WM0_PIPEB_ILK
	.quad	_WM0_PIPEC_IVB

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sandybridge_update_sprite_wm
_sandybridge_update_sprite_wm:          ; @sandybridge_update_sprite_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, x3
	mov	x21, x2
	mov	x19, x1
	mov	x22, x0
	bl	_SNB_READ_WM0_LATENCY
	cmp	w19, #2
	b.hi	LBB0_12
; %bb.1:
	mov	w8, #100
	mul	w5, w0, w8
Lloh0:
	adrp	x8, l_switch.table.sandybridge_update_sprite_wm@PAGE
Lloh1:
	add	x8, x8, l_switch.table.sandybridge_update_sprite_wm@PAGEOFF
	ldr	x8, [x8, w19, sxtw #3]
	ldr	w23, [x8]
Lloh2:
	adrp	x4, _sandybridge_display_wm_info@GOTPAGE
Lloh3:
	ldr	x4, [x4, _sandybridge_display_wm_info@GOTPAGEOFF]
	add	x6, sp, #12
	mov	x0, x22
	mov	x1, x19
	mov	x2, x21
	mov	x3, x20
	bl	_sandybridge_compute_sprite_wm
	cbz	w0, LBB0_7
; %bb.2:
	mov	x0, x23
	bl	_I915_READ
Lloh4:
	adrp	x8, _WM0_PIPE_SPRITE_MASK@GOTPAGE
Lloh5:
	ldr	x8, [x8, _WM0_PIPE_SPRITE_MASK@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	bic	w8, w0, w8
	ldr	w9, [sp, #12]
Lloh7:
	adrp	x10, _WM0_PIPE_SPRITE_SHIFT@GOTPAGE
Lloh8:
	ldr	x10, [x10, _WM0_PIPE_SPRITE_SHIFT@GOTPAGEOFF]
Lloh9:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w1, w9, w8
	mov	x0, x23
	bl	_I915_WRITE
	ldr	w8, [sp, #12]
	str	x8, [sp]
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_DRM_DEBUG_KMS
	bl	_SNB_READ_WM1_LATENCY
	mov	w8, #500
	mul	w5, w0, w8
Lloh12:
	adrp	x4, _sandybridge_display_srwm_info@GOTPAGE
Lloh13:
	ldr	x4, [x4, _sandybridge_display_srwm_info@GOTPAGEOFF]
	add	x6, sp, #12
	mov	x0, x22
	mov	x1, x19
	mov	x2, x21
	mov	x3, x20
	bl	_sandybridge_compute_sprite_srwm
	cbz	w0, LBB0_8
; %bb.3:
Lloh14:
	adrp	x8, _WM1S_LP_ILK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _WM1S_LP_ILK@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ldr	w1, [sp, #12]
	bl	_I915_WRITE
	mov	x0, x22
	bl	_IS_IVYBRIDGE
	cbz	w0, LBB0_12
; %bb.4:
	bl	_SNB_READ_WM2_LATENCY
	mov	w23, #500
	mul	w5, w0, w23
Lloh17:
	adrp	x4, _sandybridge_display_srwm_info@GOTPAGE
Lloh18:
	ldr	x4, [x4, _sandybridge_display_srwm_info@GOTPAGEOFF]
	add	x6, sp, #12
	mov	x0, x22
	mov	x1, x19
	mov	x2, x21
	mov	x3, x20
	bl	_sandybridge_compute_sprite_srwm
	cbz	w0, LBB0_9
; %bb.5:
Lloh19:
	adrp	x8, _WM2S_LP_IVB@GOTPAGE
Lloh20:
	ldr	x8, [x8, _WM2S_LP_IVB@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	ldr	w1, [sp, #12]
	bl	_I915_WRITE
	bl	_SNB_READ_WM3_LATENCY
	mul	w5, w0, w23
Lloh22:
	adrp	x4, _sandybridge_display_srwm_info@GOTPAGE
Lloh23:
	ldr	x4, [x4, _sandybridge_display_srwm_info@GOTPAGEOFF]
	add	x6, sp, #12
	mov	x0, x22
	mov	x1, x19
	mov	x2, x21
	mov	x3, x20
	bl	_sandybridge_compute_sprite_srwm
	cbz	w0, LBB0_10
; %bb.6:
Lloh24:
	adrp	x8, _WM3S_LP_IVB@GOTPAGE
Lloh25:
	ldr	x8, [x8, _WM3S_LP_IVB@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	ldr	w1, [sp, #12]
	bl	_I915_WRITE
	b	LBB0_12
LBB0_7:
Lloh27:
	adrp	x0, l_.str@PAGE
Lloh28:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_11
LBB0_8:
Lloh29:
	adrp	x0, l_.str.2@PAGE
Lloh30:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_11
LBB0_9:
Lloh31:
	adrp	x0, l_.str.3@PAGE
Lloh32:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_11
LBB0_10:
Lloh33:
	adrp	x0, l_.str.4@PAGE
Lloh34:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_11:
	mov	x1, x19
	bl	_DRM_DEBUG_KMS
LBB0_12:
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_WM0_PIPEA_ILK,4,2              ; @WM0_PIPEA_ILK
	.comm	_WM0_PIPEB_ILK,4,2              ; @WM0_PIPEB_ILK
	.comm	_WM0_PIPEC_IVB,4,2              ; @WM0_PIPEC_IVB
	.comm	_sandybridge_display_wm_info,4,2 ; @sandybridge_display_wm_info
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to compute sprite wm for pipe %d\n"

	.comm	_WM0_PIPE_SPRITE_MASK,4,2       ; @WM0_PIPE_SPRITE_MASK
	.comm	_WM0_PIPE_SPRITE_SHIFT,4,2      ; @WM0_PIPE_SPRITE_SHIFT
l_.str.1:                               ; @.str.1
	.asciz	"sprite watermarks For pipe %d - %d\n"

	.comm	_sandybridge_display_srwm_info,4,2 ; @sandybridge_display_srwm_info
l_.str.2:                               ; @.str.2
	.asciz	"failed to compute sprite lp1 wm on pipe %d\n"

	.comm	_WM1S_LP_ILK,4,2                ; @WM1S_LP_ILK
l_.str.3:                               ; @.str.3
	.asciz	"failed to compute sprite lp2 wm on pipe %d\n"

	.comm	_WM2S_LP_IVB,4,2                ; @WM2S_LP_IVB
l_.str.4:                               ; @.str.4
	.asciz	"failed to compute sprite lp3 wm on pipe %d\n"

	.comm	_WM3S_LP_IVB,4,2                ; @WM3S_LP_IVB
	.no_dead_strip	_sandybridge_update_sprite_wm
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.sandybridge_update_sprite_wm
l_switch.table.sandybridge_update_sprite_wm:
	.quad	_WM0_PIPEA_ILK
	.quad	_WM0_PIPEB_ILK
	.quad	_WM0_PIPEC_IVB

.subsections_via_symbols
