	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_psr_init                 ## -- Begin function intel_psr_init
	.p2align	4, 0x90
_intel_psr_init:                        ## @intel_psr_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_HAS_PSR
	testl	%eax, %eax
	je	LBB0_15
## %bb.1:
	movq	%rbx, %rdi
	callq	_IS_HASWELL
	testq	%rax, %rax
	jne	LBB0_2
## %bb.3:
	movq	_BDW_EDP_PSR_BASE@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_HSW_EDP_PSR_BASE@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	cmpl	$0, 16(%rbx)
	je	LBB0_15
## %bb.5:
	movq	_i915_modparams@GOTPCREL(%rip), %r14
	cmpl	$-1, (%r14)
	jne	LBB0_9
## %bb.6:
	movq	%rbx, %rdi
	callq	_INTEL_GEN
	cmpl	$9, %eax
	jl	LBB0_8
## %bb.7:
	cmpl	$0, 24(%rbx)
	jne	LBB0_9
LBB0_8:
	movl	$0, (%r14)
LBB0_9:
	movq	_EDP_PSR_IIR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_I915_READ
	movl	%eax, %r14d
	movq	_TRANSCODER_EDP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_edp_psr_shift
	movl	%eax, %edi
	callq	_EDP_PSR_ERROR
	testl	%r14d, %eax
	je	LBB0_11
## %bb.10:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	movl	$1, (%rbx)
LBB0_11:
	movq	%rbx, %rdi
	callq	_IS_HASWELL
	xorl	%r14d, %r14d
	testq	%rax, %rax
	jne	LBB0_14
## %bb.12:
	movq	%rbx, %rdi
	callq	_IS_BROADWELL
	testq	%rax, %rax
	jne	LBB0_14
## %bb.13:
	movl	20(%rbx), %r14d
LBB0_14:
	movl	%r14d, 4(%rbx)
	leaq	12(%rbx), %rdi
	movq	_intel_psr_work@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	addq	$8, %rbx
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_mutex_init                     ## TAILCALL
LBB0_15:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HSW_EDP_PSR_BASE,4,2           ## @HSW_EDP_PSR_BASE
	.comm	_BDW_EDP_PSR_BASE,4,2           ## @BDW_EDP_PSR_BASE
	.comm	_i915_modparams,4,2             ## @i915_modparams
	.comm	_EDP_PSR_IIR,4,2                ## @EDP_PSR_IIR
	.comm	_TRANSCODER_EDP,4,2             ## @TRANSCODER_EDP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PSR interruption error set\n"

	.comm	_intel_psr_work,4,2             ## @intel_psr_work
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_psr_init                 ; -- Begin function intel_psr_init
	.p2align	2
_intel_psr_init:                        ; @intel_psr_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_HAS_PSR
	cbz	w0, LBB0_12
; %bb.1:
	mov	x0, x19
	bl	_IS_HASWELL
Lloh0:
	adrp	x8, _HSW_EDP_PSR_BASE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HSW_EDP_PSR_BASE@GOTPAGEOFF]
Lloh2:
	adrp	x9, _BDW_EDP_PSR_BASE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BDW_EDP_PSR_BASE@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
	str	w8, [x19, #28]
	ldr	w8, [x19, #16]
	cbz	w8, LBB0_12
; %bb.2:
Lloh4:
	adrp	x20, _i915_modparams@GOTPAGE
Lloh5:
	ldr	x20, [x20, _i915_modparams@GOTPAGEOFF]
	ldr	w8, [x20]
	cmn	w8, #1
	b.ne	LBB0_6
; %bb.3:
	mov	x0, x19
	bl	_INTEL_GEN
	cmp	w0, #9
	b.lt	LBB0_5
; %bb.4:
	ldr	w8, [x19, #24]
	cbnz	w8, LBB0_6
LBB0_5:
	str	wzr, [x20]
LBB0_6:
Lloh6:
	adrp	x8, _EDP_PSR_IIR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EDP_PSR_IIR@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_I915_READ
	mov	x20, x0
Lloh9:
	adrp	x8, _TRANSCODER_EDP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TRANSCODER_EDP@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_edp_psr_shift
	bl	_EDP_PSR_ERROR
	tst	w0, w20
	b.eq	LBB0_8
; %bb.7:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
	mov	w8, #1
	str	w8, [x19]
LBB0_8:
	mov	x0, x19
	bl	_IS_HASWELL
	cbnz	x0, LBB0_10
; %bb.9:
	mov	x0, x19
	bl	_IS_BROADWELL
	cbz	x0, LBB0_13
LBB0_10:
	mov	w8, #0
LBB0_11:
	str	w8, [x19, #4]
	add	x0, x19, #12
Lloh14:
	adrp	x8, _intel_psr_work@GOTPAGE
Lloh15:
	ldr	x8, [x8, _intel_psr_work@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_INIT_WORK
	add	x0, x19, #8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mutex_init
LBB0_12:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_13:
	ldr	w8, [x19, #20]
	b	LBB0_11
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_HSW_EDP_PSR_BASE,4,2           ; @HSW_EDP_PSR_BASE
	.comm	_BDW_EDP_PSR_BASE,4,2           ; @BDW_EDP_PSR_BASE
	.comm	_i915_modparams,4,2             ; @i915_modparams
	.comm	_EDP_PSR_IIR,4,2                ; @EDP_PSR_IIR
	.comm	_TRANSCODER_EDP,4,2             ; @TRANSCODER_EDP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PSR interruption error set\n"

	.comm	_intel_psr_work,4,2             ; @intel_psr_work
.subsections_via_symbols
