	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ironlake_check_srwm
_ironlake_check_srwm:                   ## @ironlake_check_srwm
	.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	%r9, %r14
	movl	%r8d, %r12d
	movl	%ecx, %r13d
	movl	%edx, %ebx
	movl	%esi, %r15d
	leaq	L_.str(%rip), %rdi
	movl	%ecx, %edx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	_SNB_FBC_MAX_SRWM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	cmpl	%ebx, %edx
	jge	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	_DISP_ARB_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_I915_READ
	movq	_DISP_FBC_WM_DIS@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_I915_WRITE
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_2:
	cmpl	%r13d, (%r14)
	jge	LBB0_5
## %bb.3:
	movq	_SNB_DISPLAY_MAX_SRWM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r13d, %esi
	jmp	LBB0_4
LBB0_5:
	movq	16(%rbp), %rax
	cmpl	%r12d, (%rax)
	jge	LBB0_7
## %bb.6:
	movq	_SNB_CURSOR_MAX_SRWM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.3(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r12d, %esi
LBB0_4:
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	orl	%ebx, %r13d
	movl	$1, %ebx
	orl	%r12d, %r13d
	jne	LBB0_9
## %bb.8:
	leaq	L_.str.4(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r15d, %esi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"watermark %d: display plane %d, fbc lines %d, cursor %d\n"

	.comm	_SNB_FBC_MAX_SRWM,4,2           ## @SNB_FBC_MAX_SRWM
L_.str.1:                               ## @.str.1
	.asciz	"fbc watermark(%d) is too large(%d), disabling wm%d+\n"

	.comm	_DISP_ARB_CTL,4,2               ## @DISP_ARB_CTL
	.comm	_DISP_FBC_WM_DIS,4,2            ## @DISP_FBC_WM_DIS
L_.str.2:                               ## @.str.2
	.asciz	"display watermark(%d) is too large(%d), disabling wm%d+\n"

	.comm	_SNB_DISPLAY_MAX_SRWM,4,2       ## @SNB_DISPLAY_MAX_SRWM
L_.str.3:                               ## @.str.3
	.asciz	"cursor watermark(%d) is too large(%d), disabling wm%d+\n"

	.comm	_SNB_CURSOR_MAX_SRWM,4,2        ## @SNB_CURSOR_MAX_SRWM
L_.str.4:                               ## @.str.4
	.asciz	"latency %d is 0, disabling wm%d+\n"

	.no_dead_strip	_ironlake_check_srwm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ironlake_check_srwm
_ironlake_check_srwm:                   ; @ironlake_check_srwm
	.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	x23, x6
	mov	x24, x5
	mov	x20, x4
	mov	x21, x3
	mov	x22, x2
	mov	x19, x1
	stp	x22, x20, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x3
	bl	_DRM_DEBUG_KMS
Lloh2:
	adrp	x8, _SNB_FBC_MAX_SRWM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SNB_FBC_MAX_SRWM@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	cmp	w2, w22
	b.ge	LBB0_2
; %bb.1:
	str	x19, [sp]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x22
	bl	_DRM_DEBUG_KMS
Lloh7:
	adrp	x8, _DISP_ARB_CTL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DISP_ARB_CTL@GOTPAGEOFF]
Lloh9:
	ldr	w19, [x8]
	mov	x0, x19
	bl	_I915_READ
Lloh10:
	adrp	x8, _DISP_FBC_WM_DIS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DISP_FBC_WM_DIS@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	orr	w1, w8, w0
	mov	x0, x19
	bl	_I915_WRITE
	b	LBB0_10
LBB0_2:
	ldr	w8, [x24]
	cmp	w8, w21
	b.ge	LBB0_4
; %bb.3:
Lloh13:
	adrp	x8, _SNB_DISPLAY_MAX_SRWM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SNB_DISPLAY_MAX_SRWM@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
                                        ; kill: def $w19 killed $w19 killed $x19 def $x19
	str	x19, [sp]
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	b	LBB0_9
LBB0_4:
	ldr	w8, [x23]
	cmp	w8, w20
	b.ge	LBB0_6
; %bb.5:
Lloh18:
	adrp	x8, _SNB_CURSOR_MAX_SRWM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SNB_CURSOR_MAX_SRWM@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
                                        ; kill: def $w19 killed $w19 killed $x19 def $x19
	str	x19, [sp]
Lloh21:
	adrp	x0, l_.str.3@PAGE
Lloh22:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x20
	b	LBB0_9
LBB0_6:
	orr	w8, w21, w22
	orr	w8, w8, w20
	cbz	w8, LBB0_8
; %bb.7:
	mov	w0, #1
	b	LBB0_11
LBB0_8:
Lloh23:
	adrp	x0, l_.str.4@PAGE
Lloh24:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x19
	mov	x2, x19
LBB0_9:
	bl	_DRM_DEBUG_KMS
LBB0_10:
	mov	w0, #0
LBB0_11:
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"watermark %d: display plane %d, fbc lines %d, cursor %d\n"

	.comm	_SNB_FBC_MAX_SRWM,4,2           ; @SNB_FBC_MAX_SRWM
l_.str.1:                               ; @.str.1
	.asciz	"fbc watermark(%d) is too large(%d), disabling wm%d+\n"

	.comm	_DISP_ARB_CTL,4,2               ; @DISP_ARB_CTL
	.comm	_DISP_FBC_WM_DIS,4,2            ; @DISP_FBC_WM_DIS
l_.str.2:                               ; @.str.2
	.asciz	"display watermark(%d) is too large(%d), disabling wm%d+\n"

	.comm	_SNB_DISPLAY_MAX_SRWM,4,2       ; @SNB_DISPLAY_MAX_SRWM
l_.str.3:                               ; @.str.3
	.asciz	"cursor watermark(%d) is too large(%d), disabling wm%d+\n"

	.comm	_SNB_CURSOR_MAX_SRWM,4,2        ; @SNB_CURSOR_MAX_SRWM
l_.str.4:                               ; @.str.4
	.asciz	"latency %d is 0, disabling wm%d+\n"

	.no_dead_strip	_ironlake_check_srwm
.subsections_via_symbols
