	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function analogix_dp_enable_sink_psr
_analogix_dp_enable_sink_psr:           ## @analogix_dp_enable_sink_psr
	.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	%rdi, %r14
	leaq	8(%rdi), %r15
	movq	_DP_PSR_EN_CFG@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	-41(%rbp), %rdx
	movq	%r15, %rdi
	callq	_drm_dp_dpcd_readb
	cmpl	$1, %eax
	jne	LBB0_1
## %bb.3:
	movq	_DP_PSR_ENABLE@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	notb	%al
	andb	-41(%rbp), %al
	movb	%al, -41(%rbp)
	movl	(%r13), %esi
	movzbl	%al, %edx
	movq	%r15, %rdi
	callq	_drm_dp_dpcd_writeb
	cmpl	$1, %eax
	jne	LBB0_4
## %bb.5:
	movq	_DP_PSR_CRC_VERIFICATION@GOTPCREL(%rip), %rax
	movzbl	(%rax), %edx
	movb	%dl, -41(%rbp)
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_drm_dp_dpcd_writeb
	leaq	L_.str.2(%rip), %r12
	cmpl	$1, %eax
	jne	LBB0_6
## %bb.7:
	movq	_DP_PSR_CRC_VERIFICATION@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movq	_DP_PSR_ENABLE@GOTPCREL(%rip), %rcx
	orb	(%rcx), %al
	movb	%al, -41(%rbp)
	movl	(%r13), %esi
	movzbl	%al, %edx
	movq	%r15, %rdi
	callq	_drm_dp_dpcd_writeb
	movl	%eax, %ebx
	cmpl	$1, %eax
	jne	LBB0_2
## %bb.8:
	movq	%r14, %rdi
	callq	_analogix_dp_enable_psr_crc
	movl	$1, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %r12
	jmp	LBB0_2
LBB0_4:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %r12
	jmp	LBB0_2
LBB0_6:
	movl	%eax, %ebx
LBB0_2:
	movl	4(%r14), %edi
	movq	%r12, %rsi
	callq	_dev_err
	movl	4(%r14), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_err
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DP_PSR_EN_CFG,4,2              ## @DP_PSR_EN_CFG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to get psr config\n"

	.comm	_DP_PSR_ENABLE,1,0              ## @DP_PSR_ENABLE
L_.str.1:                               ## @.str.1
	.asciz	"failed to disable panel psr\n"

	.comm	_DP_PSR_CRC_VERIFICATION,1,0    ## @DP_PSR_CRC_VERIFICATION
L_.str.2:                               ## @.str.2
	.asciz	"failed to set panel psr\n"

L_.str.3:                               ## @.str.3
	.asciz	"enable psr fail, force to disable psr\n"

	.no_dead_strip	_analogix_dp_enable_sink_psr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function analogix_dp_enable_sink_psr
_analogix_dp_enable_sink_psr:           ; @analogix_dp_enable_sink_psr
	.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, x0
	add	x21, x0, #8
Lloh0:
	adrp	x22, _DP_PSR_EN_CFG@GOTPAGE
Lloh1:
	ldr	x22, [x22, _DP_PSR_EN_CFG@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #15
	mov	x0, x21
	bl	_drm_dp_dpcd_readb
	cmp	w0, #1
	b.ne	LBB0_5
; %bb.1:
Lloh2:
	adrp	x23, _DP_PSR_ENABLE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _DP_PSR_ENABLE@GOTPAGEOFF]
	ldrb	w8, [x23]
	ldrb	w9, [sp, #15]
	bic	w8, w9, w8
	strb	w8, [sp, #15]
	ldr	w1, [x22]
	and	w2, w8, #0xff
	mov	x0, x21
	bl	_drm_dp_dpcd_writeb
	cmp	w0, #1
	b.ne	LBB0_6
; %bb.2:
Lloh4:
	adrp	x24, _DP_PSR_CRC_VERIFICATION@GOTPAGE
Lloh5:
	ldr	x24, [x24, _DP_PSR_CRC_VERIFICATION@GOTPAGEOFF]
	ldrb	w2, [x24]
	strb	w2, [sp, #15]
	ldr	w1, [x22]
	mov	x0, x21
	bl	_drm_dp_dpcd_writeb
	cmp	w0, #1
	b.ne	LBB0_7
; %bb.3:
	ldrb	w8, [x23]
	ldrb	w9, [x24]
	orr	w8, w9, w8
	strb	w8, [sp, #15]
	ldr	w1, [x22]
	and	w2, w8, #0xff
	mov	x0, x21
	bl	_drm_dp_dpcd_writeb
	cmp	w0, #1
	b.ne	LBB0_7
; %bb.4:
	mov	x0, x19
	bl	_analogix_dp_enable_psr_crc
	mov	w20, #0
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_9
LBB0_5:
	mov	x20, x0
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_8
LBB0_6:
	mov	x20, x0
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_7:
	mov	x20, x0
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_8:
	ldr	w0, [x19, #4]
	bl	_dev_err
	ldr	w0, [x19, #4]
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
LBB0_9:
	mov	x0, x20
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_DP_PSR_EN_CFG,4,2              ; @DP_PSR_EN_CFG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to get psr config\n"

	.comm	_DP_PSR_ENABLE,1,0              ; @DP_PSR_ENABLE
l_.str.1:                               ; @.str.1
	.asciz	"failed to disable panel psr\n"

	.comm	_DP_PSR_CRC_VERIFICATION,1,0    ; @DP_PSR_CRC_VERIFICATION
l_.str.2:                               ; @.str.2
	.asciz	"failed to set panel psr\n"

l_.str.3:                               ; @.str.3
	.asciz	"enable psr fail, force to disable psr\n"

	.no_dead_strip	_analogix_dp_enable_sink_psr
.subsections_via_symbols
