	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_psr_update               ## -- Begin function intel_psr_update
	.p2align	4, 0x90
_intel_psr_update:                      ## @intel_psr_update
	.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	%rsi, %r15
	movq	%rdi, %rbx
	callq	_dp_to_i915
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_CAN_PSR
	testl	%eax, %eax
	je	LBB0_20
## %bb.1:
	movl	28(%r12), %edi
	callq	_READ_ONCE
	cmpq	%rbx, %rax
	je	LBB0_2
LBB0_20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	leaq	8(%r12), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	cmpq	$0, 8(%r15)
	je	LBB0_3
## %bb.4:
	movl	24(%r12), %edi
	callq	_psr_global_enabled
	testq	%rax, %rax
	setne	%r13b
	jmp	LBB0_5
LBB0_3:
	xorl	%r13d, %r13d
LBB0_5:
	movzbl	%r13b, %r14d
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_intel_psr2_enabled
	movl	(%r12), %ecx
	cmpl	%r14d, %ecx
	jne	LBB0_15
## %bb.6:
	cmpl	4(%r12), %eax
	jne	LBB0_15
## %bb.7:
	cmpq	$0, (%r15)
	je	LBB0_10
## %bb.8:
	xorb	$1, %r13b
	jne	LBB0_10
## %bb.9:
	movq	%r12, %rdi
	callq	_psr_force_hw_tracking_exit
	jmp	LBB0_19
LBB0_15:
	testl	%ecx, %ecx
	je	LBB0_17
## %bb.16:
	movq	%rbx, %rdi
	callq	_intel_psr_disable_locked
LBB0_17:
	testb	%r13b, %r13b
	je	LBB0_19
## %bb.18:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_intel_psr_enable_locked
LBB0_19:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
LBB0_10:
	movq	%r12, %rdi
	callq	_INTEL_GEN
	cmpl	$8, %eax
	jg	LBB0_19
## %bb.11:
	cmpl	$0, (%r12)
	je	LBB0_19
## %bb.12:
	cmpl	$0, 20(%r12)
	jne	LBB0_19
## %bb.13:
	cmpl	$0, 16(%r12)
	jne	LBB0_19
## %bb.14:
	addq	$12, %r12
	movq	%r12, %rdi
	callq	_schedule_work
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_psr_update               ; -- Begin function intel_psr_update
	.p2align	2
_intel_psr_update:                      ; @intel_psr_update
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x1
	mov	x22, x0
	bl	_dp_to_i915
	mov	x19, x0
	bl	_CAN_PSR
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x19, #28]
	bl	_READ_ONCE
	cmp	x0, x22
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_3:
	add	x20, x19, #8
	mov	x0, x20
	bl	_mutex_lock
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_5
; %bb.4:
	ldr	w0, [x19, #24]
	bl	_psr_global_enabled
	cmp	x0, #0
	cset	w23, ne
	b	LBB0_6
LBB0_5:
	mov	w23, #0
LBB0_6:
	mov	x0, x19
	mov	x1, x21
	bl	_intel_psr2_enabled
	ldr	w8, [x19]
	cmp	w8, w23
	b.ne	LBB0_11
; %bb.7:
	ldr	w9, [x19, #4]
	cmp	w0, w9
	b.ne	LBB0_11
; %bb.8:
	ldr	x8, [x21]
	cbz	x8, LBB0_16
; %bb.9:
	eor	w8, w23, #0x1
	tbnz	w8, #0, LBB0_16
; %bb.10:
	mov	x0, x19
	bl	_psr_force_hw_tracking_exit
	b	LBB0_15
LBB0_11:
	cbz	w8, LBB0_13
; %bb.12:
	mov	x0, x22
	bl	_intel_psr_disable_locked
LBB0_13:
	cbz	w23, LBB0_15
; %bb.14:
	mov	x0, x19
	mov	x1, x21
	bl	_intel_psr_enable_locked
LBB0_15:
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_mutex_unlock
LBB0_16:
	mov	x0, x19
	bl	_INTEL_GEN
	cmp	w0, #8
	b.gt	LBB0_15
; %bb.17:
	ldr	w8, [x19]
	cbz	w8, LBB0_15
; %bb.18:
	ldr	w8, [x19, #20]
	cbnz	w8, LBB0_15
; %bb.19:
	ldr	w8, [x19, #16]
	cbnz	w8, LBB0_15
; %bb.20:
	add	x0, x19, #12
	bl	_schedule_work
	b	LBB0_15
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
