	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_analogix_dp_send_psr_spd       ## -- Begin function analogix_dp_send_psr_spd
	.p2align	4, 0x90
_analogix_dp_send_psr_spd:              ## @analogix_dp_send_psr_spd
	.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
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	_ANALOGIX_DP_PKT_SEND_CTL@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	movq	_IF_EN@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	notl	%edi
	andl	%eax, %edi
	movq	(%r13), %rsi
	addq	8(%rbx), %rsi
	callq	_writel
	movq	_PSR_FRAME_UP_TYPE_BURST@GOTPCREL(%rip), %rax
	movq	_PSR_CRC_SEL_HARDWARE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	movq	_ANALOGIX_DP_PSR_FRAME_UPDATE_CTRL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	callq	_writel
	movl	8(%r12), %edi
	movq	_ANALOGIX_DP_SPD_HB0@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	callq	_writel
	movl	12(%r12), %edi
	movq	_ANALOGIX_DP_SPD_HB1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	callq	_writel
	movl	16(%r12), %edi
	movq	_ANALOGIX_DP_SPD_HB2@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	callq	_writel
	movl	20(%r12), %edi
	movq	_ANALOGIX_DP_SPD_HB3@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	callq	_writel
	movq	_ANALOGIX_DP_SPD_PB0@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	xorl	%r15d, %r15d
	xorl	%edi, %edi
	callq	_writel
	movq	_ANALOGIX_DP_SPD_PB1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	movl	$22, %edi
	callq	_writel
	movq	_ANALOGIX_DP_SPD_PB2@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	movl	$206, %edi
	callq	_writel
	movq	_ANALOGIX_DP_SPD_PB3@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	movl	$93, %edi
	callq	_writel
	movq	(%r12), %rax
	movl	(%rax), %edi
	movq	_ANALOGIX_DP_VSC_SHADOW_DB0@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	callq	_writel
	movq	(%r12), %rax
	movl	4(%rax), %edi
	movq	_ANALOGIX_DP_VSC_SHADOW_DB1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	callq	_writel
	movq	_ANALOGIX_DP_VIDEO_CTL_3@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	movq	_REUSE_SPD_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	(%r12), %rsi
	addq	8(%rbx), %rsi
	movl	%eax, %edi
	callq	_writel
	movq	(%r13), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	movq	_IF_UP@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r14), %edi
	notl	%edi
	andl	%eax, %edi
	movq	(%r13), %rsi
	addq	8(%rbx), %rsi
	callq	_writel
	movq	(%r13), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	orl	(%r14), %eax
	movq	(%r13), %rsi
	addq	8(%rbx), %rsi
	movl	%eax, %edi
	callq	_writel
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_3
## %bb.1:
	movq	_analogix_dp_get_psr_status@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_DP_TIMEOUT_PSR_LOOP_MS@GOTPCREL(%rip), %rax
	imull	$1000, (%rax), %r9d             ## imm = 0x3E8
	xorl	%r15d, %r15d
	movq	%rbx, %rsi
	xorl	%ecx, %ecx
	movl	$1500, %r8d                     ## imm = 0x5DC
	callq	_readx_poll_timeout
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %r14d
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_warn
	movl	%r14d, %r15d
LBB0_3:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ANALOGIX_DP_PKT_SEND_CTL,8,3   ## @ANALOGIX_DP_PKT_SEND_CTL
	.comm	_IF_EN,4,2                      ## @IF_EN
	.comm	_PSR_FRAME_UP_TYPE_BURST,4,2    ## @PSR_FRAME_UP_TYPE_BURST
	.comm	_PSR_CRC_SEL_HARDWARE,4,2       ## @PSR_CRC_SEL_HARDWARE
	.comm	_ANALOGIX_DP_PSR_FRAME_UPDATE_CTRL,8,3 ## @ANALOGIX_DP_PSR_FRAME_UPDATE_CTRL
	.comm	_ANALOGIX_DP_SPD_HB0,8,3        ## @ANALOGIX_DP_SPD_HB0
	.comm	_ANALOGIX_DP_SPD_HB1,8,3        ## @ANALOGIX_DP_SPD_HB1
	.comm	_ANALOGIX_DP_SPD_HB2,8,3        ## @ANALOGIX_DP_SPD_HB2
	.comm	_ANALOGIX_DP_SPD_HB3,8,3        ## @ANALOGIX_DP_SPD_HB3
	.comm	_ANALOGIX_DP_SPD_PB0,8,3        ## @ANALOGIX_DP_SPD_PB0
	.comm	_ANALOGIX_DP_SPD_PB1,8,3        ## @ANALOGIX_DP_SPD_PB1
	.comm	_ANALOGIX_DP_SPD_PB2,8,3        ## @ANALOGIX_DP_SPD_PB2
	.comm	_ANALOGIX_DP_SPD_PB3,8,3        ## @ANALOGIX_DP_SPD_PB3
	.comm	_ANALOGIX_DP_VSC_SHADOW_DB0,8,3 ## @ANALOGIX_DP_VSC_SHADOW_DB0
	.comm	_ANALOGIX_DP_VSC_SHADOW_DB1,8,3 ## @ANALOGIX_DP_VSC_SHADOW_DB1
	.comm	_ANALOGIX_DP_VIDEO_CTL_3,8,3    ## @ANALOGIX_DP_VIDEO_CTL_3
	.comm	_REUSE_SPD_EN,4,2               ## @REUSE_SPD_EN
	.comm	_IF_UP,4,2                      ## @IF_UP
	.comm	_analogix_dp_get_psr_status,4,2 ## @analogix_dp_get_psr_status
	.comm	_DP_PSR_SINK_ACTIVE_RFB,8,3     ## @DP_PSR_SINK_ACTIVE_RFB
	.comm	_DP_PSR_SINK_INACTIVE,8,3       ## @DP_PSR_SINK_INACTIVE
	.comm	_DP_TIMEOUT_PSR_LOOP_MS,4,2     ## @DP_TIMEOUT_PSR_LOOP_MS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to apply PSR %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_analogix_dp_send_psr_spd       ; -- Begin function analogix_dp_send_psr_spd
	.p2align	2
_analogix_dp_send_psr_spd:              ; @analogix_dp_send_psr_spd
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x22, _ANALOGIX_DP_PKT_SEND_CTL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ANALOGIX_DP_PKT_SEND_CTL@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
Lloh2:
	adrp	x23, _IF_EN@GOTPAGE
Lloh3:
	ldr	x23, [x23, _IF_EN@GOTPAGEOFF]
	ldr	w8, [x23]
	bic	w0, w0, w8
	ldr	x8, [x19, #8]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writel
Lloh4:
	adrp	x8, _PSR_FRAME_UP_TYPE_BURST@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PSR_FRAME_UP_TYPE_BURST@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _PSR_CRC_SEL_HARDWARE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _PSR_CRC_SEL_HARDWARE@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	orr	w0, w9, w8
	ldr	x8, [x19, #8]
Lloh10:
	adrp	x9, _ANALOGIX_DP_PSR_FRAME_UPDATE_CTRL@GOTPAGE
Lloh11:
	ldr	x9, [x9, _ANALOGIX_DP_PSR_FRAME_UPDATE_CTRL@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	w0, [x21, #8]
	ldr	x8, [x19, #8]
Lloh13:
	adrp	x9, _ANALOGIX_DP_SPD_HB0@GOTPAGE
Lloh14:
	ldr	x9, [x9, _ANALOGIX_DP_SPD_HB0@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	w0, [x21, #12]
	ldr	x8, [x19, #8]
Lloh16:
	adrp	x9, _ANALOGIX_DP_SPD_HB1@GOTPAGE
Lloh17:
	ldr	x9, [x9, _ANALOGIX_DP_SPD_HB1@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	w0, [x21, #16]
	ldr	x8, [x19, #8]
Lloh19:
	adrp	x9, _ANALOGIX_DP_SPD_HB2@GOTPAGE
Lloh20:
	ldr	x9, [x9, _ANALOGIX_DP_SPD_HB2@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	w0, [x21, #20]
	ldr	x8, [x19, #8]
Lloh22:
	adrp	x9, _ANALOGIX_DP_SPD_HB3@GOTPAGE
Lloh23:
	ldr	x9, [x9, _ANALOGIX_DP_SPD_HB3@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x19, #8]
Lloh25:
	adrp	x9, _ANALOGIX_DP_SPD_PB0@GOTPAGE
Lloh26:
	ldr	x9, [x9, _ANALOGIX_DP_SPD_PB0@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel
	ldr	x8, [x19, #8]
Lloh28:
	adrp	x9, _ANALOGIX_DP_SPD_PB1@GOTPAGE
Lloh29:
	ldr	x9, [x9, _ANALOGIX_DP_SPD_PB1@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #22
	bl	_writel
	ldr	x8, [x19, #8]
Lloh31:
	adrp	x9, _ANALOGIX_DP_SPD_PB2@GOTPAGE
Lloh32:
	ldr	x9, [x9, _ANALOGIX_DP_SPD_PB2@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #206
	bl	_writel
	ldr	x8, [x19, #8]
Lloh34:
	adrp	x9, _ANALOGIX_DP_SPD_PB3@GOTPAGE
Lloh35:
	ldr	x9, [x9, _ANALOGIX_DP_SPD_PB3@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #93
	bl	_writel
	ldr	x8, [x21]
	ldr	w0, [x8]
	ldr	x8, [x19, #8]
Lloh37:
	adrp	x9, _ANALOGIX_DP_VSC_SHADOW_DB0@GOTPAGE
Lloh38:
	ldr	x9, [x9, _ANALOGIX_DP_VSC_SHADOW_DB0@GOTPAGEOFF]
Lloh39:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x21]
	ldr	w0, [x8, #4]
	ldr	x8, [x19, #8]
Lloh40:
	adrp	x9, _ANALOGIX_DP_VSC_SHADOW_DB1@GOTPAGE
Lloh41:
	ldr	x9, [x9, _ANALOGIX_DP_VSC_SHADOW_DB1@GOTPAGEOFF]
Lloh42:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x19, #8]
Lloh43:
	adrp	x21, _ANALOGIX_DP_VIDEO_CTL_3@GOTPAGE
Lloh44:
	ldr	x21, [x21, _ANALOGIX_DP_VIDEO_CTL_3@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_readl
Lloh45:
	adrp	x8, _REUSE_SPD_EN@GOTPAGE
Lloh46:
	ldr	x8, [x8, _REUSE_SPD_EN@GOTPAGEOFF]
Lloh47:
	ldr	w8, [x8]
	orr	w0, w8, w0
	ldr	x8, [x19, #8]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x19, #8]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
Lloh48:
	adrp	x8, _IF_UP@GOTPAGE
Lloh49:
	ldr	x8, [x8, _IF_UP@GOTPAGEOFF]
Lloh50:
	ldr	w8, [x8]
	orr	w8, w8, w0
	ldr	w9, [x23]
	bic	w0, w8, w9
	ldr	x8, [x19, #8]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x19, #8]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
	ldr	w8, [x23]
	orr	w0, w8, w0
	ldr	x8, [x19, #8]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writel
	cbz	w20, LBB0_3
; %bb.1:
Lloh51:
	adrp	x8, _analogix_dp_get_psr_status@GOTPAGE
Lloh52:
	ldr	x8, [x8, _analogix_dp_get_psr_status@GOTPAGEOFF]
Lloh53:
	ldr	w0, [x8]
Lloh54:
	adrp	x8, _DP_TIMEOUT_PSR_LOOP_MS@GOTPAGE
Lloh55:
	ldr	x8, [x8, _DP_TIMEOUT_PSR_LOOP_MS@GOTPAGEOFF]
Lloh56:
	ldr	w8, [x8]
	mov	w9, #1000
	mul	w5, w8, w9
	mov	x1, x19
	mov	w3, #0
	mov	w4, #1500
	bl	_readx_poll_timeout
	mov	x20, x0
	cbz	w0, LBB0_3
; %bb.2:
	ldr	w0, [x19]
Lloh57:
	adrp	x1, l_.str@PAGE
Lloh58:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_warn
LBB0_3:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpAdd	Lloh57, Lloh58
	.cfi_endproc
                                        ; -- End function
	.comm	_ANALOGIX_DP_PKT_SEND_CTL,8,3   ; @ANALOGIX_DP_PKT_SEND_CTL
	.comm	_IF_EN,4,2                      ; @IF_EN
	.comm	_PSR_FRAME_UP_TYPE_BURST,4,2    ; @PSR_FRAME_UP_TYPE_BURST
	.comm	_PSR_CRC_SEL_HARDWARE,4,2       ; @PSR_CRC_SEL_HARDWARE
	.comm	_ANALOGIX_DP_PSR_FRAME_UPDATE_CTRL,8,3 ; @ANALOGIX_DP_PSR_FRAME_UPDATE_CTRL
	.comm	_ANALOGIX_DP_SPD_HB0,8,3        ; @ANALOGIX_DP_SPD_HB0
	.comm	_ANALOGIX_DP_SPD_HB1,8,3        ; @ANALOGIX_DP_SPD_HB1
	.comm	_ANALOGIX_DP_SPD_HB2,8,3        ; @ANALOGIX_DP_SPD_HB2
	.comm	_ANALOGIX_DP_SPD_HB3,8,3        ; @ANALOGIX_DP_SPD_HB3
	.comm	_ANALOGIX_DP_SPD_PB0,8,3        ; @ANALOGIX_DP_SPD_PB0
	.comm	_ANALOGIX_DP_SPD_PB1,8,3        ; @ANALOGIX_DP_SPD_PB1
	.comm	_ANALOGIX_DP_SPD_PB2,8,3        ; @ANALOGIX_DP_SPD_PB2
	.comm	_ANALOGIX_DP_SPD_PB3,8,3        ; @ANALOGIX_DP_SPD_PB3
	.comm	_ANALOGIX_DP_VSC_SHADOW_DB0,8,3 ; @ANALOGIX_DP_VSC_SHADOW_DB0
	.comm	_ANALOGIX_DP_VSC_SHADOW_DB1,8,3 ; @ANALOGIX_DP_VSC_SHADOW_DB1
	.comm	_ANALOGIX_DP_VIDEO_CTL_3,8,3    ; @ANALOGIX_DP_VIDEO_CTL_3
	.comm	_REUSE_SPD_EN,4,2               ; @REUSE_SPD_EN
	.comm	_IF_UP,4,2                      ; @IF_UP
	.comm	_analogix_dp_get_psr_status,4,2 ; @analogix_dp_get_psr_status
	.comm	_DP_PSR_SINK_ACTIVE_RFB,8,3     ; @DP_PSR_SINK_ACTIVE_RFB
	.comm	_DP_PSR_SINK_INACTIVE,8,3       ; @DP_PSR_SINK_INACTIVE
	.comm	_DP_TIMEOUT_PSR_LOOP_MS,4,2     ; @DP_TIMEOUT_PSR_LOOP_MS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to apply PSR %d\n"

.subsections_via_symbols
