	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_psr_compute_config       ## -- Begin function intel_psr_compute_config
	.p2align	4, 0x90
_intel_psr_compute_config:              ## @intel_psr_compute_config
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r12
	callq	_dp_to_dig_port
	movq	%rax, %r15
	movq	%r12, %rdi
	callq	_dp_to_i915
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_CAN_PSR
	testl	%eax, %eax
	je	LBB0_15
## %bb.1:
	cmpq	%r12, 8(%rbx)
	je	LBB0_2
LBB0_15:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	(%r15), %rax
	movq	_PORT_A@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.5:
	cmpq	$0, (%rbx)
	je	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_4
LBB0_3:
	leaq	L_.str(%rip), %rdi
LBB0_4:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_DEBUG_KMS                  ## TAILCALL
LBB0_7:
	leaq	8(%r14), %rbx
	movq	_DRM_MODE_FLAG_INTERLACE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_9
## %bb.8:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_4
LBB0_9:
	movq	(%r12), %rdi
	callq	_drm_dp_psr_setup_time
	testl	%eax, %eax
	js	LBB0_10
## %bb.11:
	movl	%eax, %r15d
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_intel_usecs_to_scanlines
	movl	16(%r14), %ecx
	notl	%ecx
	addl	12(%r14), %ecx
	cmpl	%ecx, %eax
	jle	LBB0_14
## %bb.12:
	leaq	L_.str.4(%rip), %rdi
	movl	%r15d, %esi
	jmp	LBB0_13
LBB0_10:
	movq	(%r12), %rax
	movl	4(%rax), %esi
	leaq	L_.str.3(%rip), %rdi
LBB0_13:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_DEBUG_KMS                  ## TAILCALL
LBB0_14:
	movl	$1, (%r14)
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_intel_psr2_config_valid
	movl	%eax, 4(%r14)
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_PORT_A,8,3                     ## @PORT_A
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PSR condition failed: Port not supported\n"

L_.str.1:                               ## @.str.1
	.asciz	"PSR sink implementation is not reliable\n"

	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ## @DRM_MODE_FLAG_INTERLACE
L_.str.2:                               ## @.str.2
	.asciz	"PSR condition failed: Interlaced mode enabled\n"

L_.str.3:                               ## @.str.3
	.asciz	"PSR condition failed: Invalid PSR setup time (0x%02x)\n"

L_.str.4:                               ## @.str.4
	.asciz	"PSR condition failed: PSR setup time (%d us) too long\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_psr_compute_config       ; -- Begin function intel_psr_compute_config
	.p2align	2
_intel_psr_compute_config:              ; @intel_psr_compute_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	mov	x20, x0
	bl	_dp_to_dig_port
	mov	x22, x0
	mov	x0, x20
	bl	_dp_to_i915
	mov	x21, x0
	bl	_CAN_PSR
	cbz	w0, LBB0_2
; %bb.1:
	ldr	x8, [x21, #8]
	cmp	x8, x20
	b.eq	LBB0_3
LBB0_2:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_3:
	ldr	x8, [x22]
Lloh0:
	adrp	x9, _PORT_A@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PORT_A@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.4:
	ldr	x8, [x21]
	cbz	x8, LBB0_8
; %bb.5:
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_6:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_DRM_DEBUG_KMS
LBB0_8:
	add	x22, x19, #8
	ldr	w8, [x22]
Lloh7:
	adrp	x9, _DRM_MODE_FLAG_INTERLACE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _DRM_MODE_FLAG_INTERLACE@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.9:
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_7
LBB0_10:
	ldr	x0, [x20]
	bl	_drm_dp_psr_setup_time
	tbnz	w0, #31, LBB0_13
; %bb.11:
	mov	x21, x0
	mov	x0, x22
	mov	x1, x21
	bl	_intel_usecs_to_scanlines
	ldp	w8, w9, [x19, #12]
	mvn	w9, w9
	add	w8, w8, w9
	cmp	w0, w8
	b.le	LBB0_14
; %bb.12:
	str	x21, [sp]
Lloh12:
	adrp	x0, l_.str.4@PAGE
Lloh13:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DRM_DEBUG_KMS
	b	LBB0_2
LBB0_13:
	ldr	x8, [x20]
	ldr	w8, [x8, #4]
	str	x8, [sp]
Lloh14:
	adrp	x0, l_.str.3@PAGE
Lloh15:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_DEBUG_KMS
	b	LBB0_2
LBB0_14:
	mov	w8, #1
	str	w8, [x19]
	mov	x0, x20
	mov	x1, x19
	bl	_intel_psr2_config_valid
	str	w0, [x19, #4]
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_PORT_A,8,3                     ; @PORT_A
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PSR condition failed: Port not supported\n"

l_.str.1:                               ; @.str.1
	.asciz	"PSR sink implementation is not reliable\n"

	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ; @DRM_MODE_FLAG_INTERLACE
l_.str.2:                               ; @.str.2
	.asciz	"PSR condition failed: Interlaced mode enabled\n"

l_.str.3:                               ; @.str.3
	.asciz	"PSR condition failed: Invalid PSR setup time (0x%02x)\n"

l_.str.4:                               ; @.str.4
	.asciz	"PSR condition failed: PSR setup time (%d us) too long\n"

.subsections_via_symbols
