	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_dp_set_drrs_state
_intel_dp_set_drrs_state:               ## @intel_dp_set_drrs_state
	.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	%edx, %r14d
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	16(%rdi), %rbx
	movl	8(%rsi), %edi
	callq	_to_intel_crtc
	testl	%r14d, %r14d
	jle	LBB0_5
## %bb.1:
	testq	%rbx, %rbx
	je	LBB0_6
## %bb.2:
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	(%r15), %rax
	movq	_SEAMLESS_DRRS_SUPPORT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_8
## %bb.4:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_17
LBB0_5:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_17
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_17
LBB0_7:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_17
LBB0_8:
	movq	(%rbx), %rax
	movq	(%rax), %rax
	xorl	%ecx, %ecx
	cmpl	%r14d, (%rax)
	sete	%cl
	movl	$130, %r13d
	subl	%ecx, %r13d
	cmpl	8(%r15), %r13d
	jne	LBB0_10
## %bb.9:
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_17
LBB0_10:
	cmpl	$0, 4(%r12)
	je	LBB0_16
## %bb.11:
	movq	%r15, %rdi
	callq	_INTEL_GEN
	cmpl	$8, %eax
	jl	LBB0_13
## %bb.12:
	movq	%r15, %rdi
	callq	_IS_CHERRYVIEW
	testq	%rax, %rax
	je	LBB0_18
LBB0_13:
	movq	%r15, %rdi
	callq	_INTEL_GEN
	cmpl	$7, %eax
	jl	LBB0_28
## %bb.14:
	movl	(%r12), %edi
	callq	_PIPECONF
	movl	%eax, %r12d
	movl	%eax, %edi
	callq	_I915_READ
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_IS_VALLEYVIEW
	testq	%rax, %rax
	jne	LBB0_23
## %bb.21:
	movq	%r15, %rdi
	callq	_IS_CHERRYVIEW
	testq	%rax, %rax
	jne	LBB0_23
## %bb.22:
	movq	_PIPECONF_EDP_RR_MODE_SWITCH@GOTPCREL(%rip), %rax
	jmp	LBB0_24
LBB0_16:
	leaq	L_.str.5(%rip), %rdi
LBB0_17:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_DEBUG_KMS                  ## TAILCALL
LBB0_23:
	movq	_PIPECONF_EDP_RR_MODE_SWITCH_VLV@GOTPCREL(%rip), %rax
LBB0_24:
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %ebx
	movl	%r12d, %edi
	movl	%ebx, %esi
	callq	_I915_WRITE
	jmp	LBB0_28
LBB0_18:
	cmpb	$-127, %r13b
	je	LBB0_25
## %bb.19:
	cmpb	$-126, %r13b
	jne	LBB0_27
## %bb.20:
	movq	_M1_N1@GOTPCREL(%rip), %rax
	jmp	LBB0_26
LBB0_25:
	movq	_M2_N2@GOTPCREL(%rip), %rax
LBB0_26:
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_intel_dp_set_m_n
	jmp	LBB0_28
LBB0_27:
	leaq	L_.str.6(%rip), %rdi
	callq	_DRM_ERROR
LBB0_28:
	movl	%r13d, 8(%r15)
	leaq	L_.str.7(%rip), %rdi
	movl	%r14d, %esi
	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	"Refresh rate should be positive non-zero.\n"

L_.str.1:                               ## @.str.1
	.asciz	"DRRS not supported.\n"

L_.str.2:                               ## @.str.2
	.asciz	"DRRS: intel_crtc not initialized\n"

	.comm	_SEAMLESS_DRRS_SUPPORT,8,3      ## @SEAMLESS_DRRS_SUPPORT
L_.str.3:                               ## @.str.3
	.asciz	"Only Seamless DRRS supported.\n"

L_.str.4:                               ## @.str.4
	.asciz	"DRRS requested for previously set RR...ignoring\n"

L_.str.5:                               ## @.str.5
	.asciz	"eDP encoder disabled. CRTC not Active\n"

	.comm	_M1_N1,4,2                      ## @M1_N1
	.comm	_M2_N2,4,2                      ## @M2_N2
L_.str.6:                               ## @.str.6
	.asciz	"Unsupported refreshrate type\n"

	.comm	_PIPECONF_EDP_RR_MODE_SWITCH_VLV,4,2 ## @PIPECONF_EDP_RR_MODE_SWITCH_VLV
	.comm	_PIPECONF_EDP_RR_MODE_SWITCH,4,2 ## @PIPECONF_EDP_RR_MODE_SWITCH
L_.str.7:                               ## @.str.7
	.asciz	"eDP Refresh Rate set to : %dHz\n"

	.no_dead_strip	_intel_dp_set_drrs_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_dp_set_drrs_state
_intel_dp_set_drrs_state:               ; @intel_dp_set_drrs_state
	.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	x19, x2
	mov	x21, x1
	mov	x20, x0
	ldr	x22, [x0, #16]
	ldr	w0, [x1, #8]
	bl	_to_intel_crtc
	cmp	w19, #0
	b.le	LBB0_5
; %bb.1:
	cbz	x22, LBB0_6
; %bb.2:
	cbz	x0, LBB0_7
; %bb.3:
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _SEAMLESS_DRRS_SUPPORT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SEAMLESS_DRRS_SUPPORT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_8
; %bb.4:
Lloh3:
	adrp	x0, l_.str.3@PAGE
Lloh4:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_18
LBB0_5:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_18
LBB0_6:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_18
LBB0_7:
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_18
LBB0_8:
	ldr	x8, [x22]
	ldr	x8, [x8]
	ldr	w8, [x8]
	cmp	w8, w19
	mov	w8, #129
	cinc	w23, w8, ne
	ldr	w8, [x20, #8]
	cmp	w23, w8
	b.ne	LBB0_10
; %bb.9:
Lloh11:
	adrp	x0, l_.str.4@PAGE
Lloh12:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_18
LBB0_10:
	ldr	w8, [x21, #4]
	cbz	w8, LBB0_17
; %bb.11:
	mov	x0, x20
	bl	_INTEL_GEN
	cmp	w0, #7
	b.le	LBB0_13
; %bb.12:
	mov	x0, x20
	bl	_IS_CHERRYVIEW
	cbz	x0, LBB0_19
LBB0_13:
	mov	x0, x20
	bl	_INTEL_GEN
	cmp	w0, #7
	b.lt	LBB0_25
; %bb.14:
	ldr	w0, [x21]
	bl	_PIPECONF
	mov	x21, x0
	bl	_I915_READ
	mov	x22, x0
	mov	x0, x20
	bl	_IS_VALLEYVIEW
Lloh13:
	adrp	x24, _PIPECONF_EDP_RR_MODE_SWITCH_VLV@GOTPAGE
Lloh14:
	ldr	x24, [x24, _PIPECONF_EDP_RR_MODE_SWITCH_VLV@GOTPAGEOFF]
	cbnz	x0, LBB0_16
; %bb.15:
	mov	x0, x20
	bl	_IS_CHERRYVIEW
Lloh15:
	adrp	x8, _PIPECONF_EDP_RR_MODE_SWITCH@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PIPECONF_EDP_RR_MODE_SWITCH@GOTPAGEOFF]
	cmp	x0, #0
	csel	x24, x8, x24, eq
LBB0_16:
	ldr	w8, [x24]
	bic	w1, w22, w8
	mov	x0, x21
	bl	_I915_WRITE
	b	LBB0_25
LBB0_17:
Lloh17:
	adrp	x0, l_.str.5@PAGE
Lloh18:
	add	x0, x0, l_.str.5@PAGEOFF
LBB0_18:
	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
LBB0_19:
	and	w8, w23, #0x3
	cmp	w8, #1
	b.eq	LBB0_22
; %bb.20:
	cmp	w8, #2
	b.ne	LBB0_24
; %bb.21:
Lloh19:
	adrp	x8, _M1_N1@GOTPAGE
Lloh20:
	ldr	x8, [x8, _M1_N1@GOTPAGEOFF]
	b	LBB0_23
LBB0_22:
Lloh21:
	adrp	x8, _M2_N2@GOTPAGE
Lloh22:
	ldr	x8, [x8, _M2_N2@GOTPAGEOFF]
LBB0_23:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_intel_dp_set_m_n
	b	LBB0_25
LBB0_24:
Lloh23:
	adrp	x0, l_.str.6@PAGE
Lloh24:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_DRM_ERROR
LBB0_25:
	str	w23, [x20, #8]
	str	x19, [sp]
Lloh25:
	adrp	x0, l_.str.7@PAGE
Lloh26:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_DRM_DEBUG_KMS
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Refresh rate should be positive non-zero.\n"

l_.str.1:                               ; @.str.1
	.asciz	"DRRS not supported.\n"

l_.str.2:                               ; @.str.2
	.asciz	"DRRS: intel_crtc not initialized\n"

	.comm	_SEAMLESS_DRRS_SUPPORT,8,3      ; @SEAMLESS_DRRS_SUPPORT
l_.str.3:                               ; @.str.3
	.asciz	"Only Seamless DRRS supported.\n"

l_.str.4:                               ; @.str.4
	.asciz	"DRRS requested for previously set RR...ignoring\n"

l_.str.5:                               ; @.str.5
	.asciz	"eDP encoder disabled. CRTC not Active\n"

	.comm	_M1_N1,4,2                      ; @M1_N1
	.comm	_M2_N2,4,2                      ; @M2_N2
l_.str.6:                               ; @.str.6
	.asciz	"Unsupported refreshrate type\n"

	.comm	_PIPECONF_EDP_RR_MODE_SWITCH_VLV,4,2 ; @PIPECONF_EDP_RR_MODE_SWITCH_VLV
	.comm	_PIPECONF_EDP_RR_MODE_SWITCH,4,2 ; @PIPECONF_EDP_RR_MODE_SWITCH
l_.str.7:                               ; @.str.7
	.asciz	"eDP Refresh Rate set to : %dHz\n"

	.no_dead_strip	_intel_dp_set_drrs_state
.subsections_via_symbols
