	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_hpd_irq_psr_sink
_handle_hpd_irq_psr_sink:               ## @handle_hpd_irq_psr_sink
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	xorl	%r14d, %r14d
	cmpl	$0, 4(%rdi)
	je	LBB0_3
## %bb.1:
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	leaq	-32(%rbp), %rcx
	movq	%rbx, %rsi
	movl	$368, %edx                      ## imm = 0x170
	movl	$1, %r8d
	callq	_dm_helpers_dp_read_dpcd
	cmpq	$0, -32(%rbp)
	je	LBB0_3
## %bb.2:
	movb	$0, -18(%rbp)
	movw	$0, -20(%rbp)
	movl	(%rbx), %edi
	leaq	-20(%rbp), %rcx
	movq	%rbx, %rsi
	movl	$8198, %edx                     ## imm = 0x2006
	movl	$3, %r8d
	callq	_dm_helpers_dp_read_dpcd
	movb	-20(%rbp), %al
	movb	%al, -48(%rbp)
	movl	(%rbx), %edi
	leaq	-48(%rbp), %rcx
	movq	%rbx, %rsi
	movl	$8198, %edx                     ## imm = 0x2006
	movl	$1, %r8d
	callq	_dm_helpers_dp_write_dpcd
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	callq	_dc_link_set_psr_enable
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$1, %edx
	callq	_dc_link_set_psr_enable
	movl	$1, %r14d
LBB0_3:
	movl	%r14d, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PSR_SINK_STATE_ACTIVE_DISPLAY_FROM_SINK_RFB,8,3 ## @PSR_SINK_STATE_ACTIVE_DISPLAY_FROM_SINK_RFB
	.no_dead_strip	_handle_hpd_irq_psr_sink
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_hpd_irq_psr_sink
_handle_hpd_irq_psr_sink:               ; @handle_hpd_irq_psr_sink
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	ldr	w8, [x0, #4]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	w0, [x0]
	add	x3, sp, #24
	mov	x1, x19
	mov	w2, #368
	mov	w4, #1
	bl	_dm_helpers_dp_read_dpcd
	ldr	x8, [sp, #24]
	cbz	x8, LBB0_3
; %bb.2:
	strb	wzr, [sp, #22]
	strh	wzr, [sp, #20]
	ldr	w0, [x19]
	add	x3, sp, #20
	mov	x1, x19
	mov	w2, #8198
	mov	w4, #3
	bl	_dm_helpers_dp_read_dpcd
	ldrb	w8, [sp, #20]
	strb	w8, [sp]
	ldr	w0, [x19]
	mov	w20, #1
	mov	x3, sp
	mov	x1, x19
	mov	w2, #8198
	mov	w4, #1
	bl	_dm_helpers_dp_write_dpcd
	mov	x0, x19
	mov	w1, #0
	mov	w2, #1
	bl	_dc_link_set_psr_enable
	mov	x0, x19
	mov	w1, #1
	mov	w2, #1
	bl	_dc_link_set_psr_enable
	b	LBB0_4
LBB0_3:
	mov	w20, #0
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.cfi_endproc
                                        ; -- End function
	.comm	_PSR_SINK_STATE_ACTIVE_DISPLAY_FROM_SINK_RFB,8,3 ; @PSR_SINK_STATE_ACTIVE_DISPLAY_FROM_SINK_RFB
	.no_dead_strip	_handle_hpd_irq_psr_sink
.subsections_via_symbols
