	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_edp_init_dpcd
_intel_edp_init_dpcd:                   ## @intel_edp_init_dpcd
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_dp_to_dig_port
	movl	(%rax), %edi
	callq	_to_i915
	movq	%rax, %r14
	movq	(%r12), %rax
	movq	_DP_DPCD_REV@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	xorl	%edi, %edi
	cmpq	$0, (%rax,%rcx,8)
	setne	%dil
	callq	_WARN_ON
	movq	%r12, %rdi
	callq	_intel_dp_read_dpcd
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	leaq	32(%r12), %r15
	leaq	36(%r12), %rbx
	movq	(%r12), %rdi
	callq	_drm_dp_is_branch
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_drm_dp_read_desc
	movq	_DP_EDP_DPCD_REV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r12), %rdx
	movq	%r15, %rdi
	movl	$8, %ecx
	callq	_drm_dp_dpcd_read
	cmpl	$8, %eax
	jne	LBB0_4
## %bb.3:
	movq	8(%r12), %rdx
	leaq	L_.str(%rip), %rdi
	movl	$8, %esi
	callq	_DRM_DEBUG_KMS
LBB0_4:
	movq	%r12, %rdi
	callq	_intel_psr_init_dpcd
	movq	8(%r12), %rax
	movq	(%rax), %rax
	movq	_DP_EDP_14@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_9
## %bb.5:
	movq	%rsp, -56(%rbp)                 ## 8-byte Spill
	movq	_DP_MAX_SUPPORTED_RATES@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	shlq	$3, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	movq	_DP_SUPPORTED_LINK_RATES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leal	(,%rbx,8), %ecx
	movq	%r15, %rdi
	movq	%r13, %rdx
	callq	_drm_dp_dpcd_read
	movq	%r13, %rdi
	callq	_ARRAY_SIZE
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jle	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13,%rbx,8), %rdi
	callq	_le16_to_cpu
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	shll	$2, %eax
	leal	(%rax,%rax,4), %eax
	movq	16(%r12), %rcx
	movl	%eax, (%rcx,%rbx,4)
	incq	%rbx
	movq	%r13, %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_6
LBB0_8:
	movl	%ebx, 24(%r12)
	movq	-56(%rbp), %rsp                 ## 8-byte Reload
LBB0_9:
	cmpl	$0, 24(%r12)
	je	LBB0_11
## %bb.10:
	movl	$1, 28(%r12)
	jmp	LBB0_12
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_16
LBB0_11:
	movq	%r12, %rdi
	callq	_intel_dp_set_sink_rates
LBB0_12:
	movq	%r12, %rdi
	callq	_intel_dp_set_common_rates
	movq	%r14, %rdi
	callq	_INTEL_GEN
	cmpl	$9, %eax
	jg	LBB0_14
## %bb.13:
	movq	%r14, %rdi
	callq	_IS_GEMINILAKE
	testq	%rax, %rax
	je	LBB0_15
LBB0_14:
	movq	%r12, %rdi
	callq	_intel_dp_get_dsc_sink_cap
LBB0_15:
	movl	$1, %eax
LBB0_16:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_18
## %bb.17:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_DP_DPCD_REV,8,3                ## @DP_DPCD_REV
	.comm	_DP_EDP_DPCD_REV,4,2            ## @DP_EDP_DPCD_REV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"eDP DPCD: %*ph\n"

	.comm	_DP_EDP_14,8,3                  ## @DP_EDP_14
	.comm	_DP_MAX_SUPPORTED_RATES,4,2     ## @DP_MAX_SUPPORTED_RATES
	.comm	_DP_SUPPORTED_LINK_RATES,4,2    ## @DP_SUPPORTED_LINK_RATES
	.no_dead_strip	_intel_edp_init_dpcd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_edp_init_dpcd
_intel_edp_init_dpcd:                   ; @intel_edp_init_dpcd
	.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
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	bl	_dp_to_dig_port
	ldr	w0, [x0]
	bl	_to_i915
	mov	x20, x0
Lloh3:
	adrp	x8, _DP_DPCD_REV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DP_DPCD_REV@GOTPAGEOFF]
	ldr	x9, [x19]
Lloh5:
	ldr	x8, [x8]
	ldr	x8, [x9, x8, lsl #3]
	cmp	x8, #0
	cset	w0, ne
	bl	_WARN_ON
	mov	x0, x19
	bl	_intel_dp_read_dpcd
	cbz	w0, LBB0_17
; %bb.1:
	add	x21, x19, #32
	add	x22, x19, #36
	ldr	x0, [x19]
	bl	_drm_dp_is_branch
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_drm_dp_read_desc
Lloh6:
	adrp	x8, _DP_EDP_DPCD_REV@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DP_EDP_DPCD_REV@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	x2, [x19, #8]
	mov	x0, x21
	mov	w3, #8
	bl	_drm_dp_dpcd_read
	cmp	w0, #8
	b.ne	LBB0_3
; %bb.2:
	ldr	x2, [x19, #8]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	mov	w1, #8
	bl	_DRM_DEBUG_KMS
LBB0_3:
	mov	x0, x19
	bl	_intel_psr_init_dpcd
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
Lloh11:
	adrp	x9, _DP_EDP_14@GOTPAGE
Lloh12:
	ldr	x9, [x9, _DP_EDP_14@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_10
; %bb.4:
	mov	x23, sp
Lloh14:
	adrp	x8, _DP_MAX_SUPPORTED_RATES@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DP_MAX_SUPPORTED_RATES@GOTPAGEOFF]
Lloh16:
	ldr	w12, [x8]
	lsl	x8, x12, #3
	mov	x9, x8
Lloh17:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh18:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x22, x9, x8
	mov	sp, x22
Lloh19:
	adrp	x8, _DP_SUPPORTED_LINK_RATES@GOTPAGE
Lloh20:
	ldr	x8, [x8, _DP_SUPPORTED_LINK_RATES@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	lsl	w3, w12, #3
	mov	x0, x21
	mov	x2, x22
	bl	_drm_dp_dpcd_read
	mov	x0, x22
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_8
; %bb.5:
	mov	x21, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x22, x21, lsl #3]
	bl	_le16_to_cpu
	cbz	w0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	w8, w0, w0, lsl #2
	lsl	w8, w8, #2
	ldr	x9, [x19, #16]
	str	w8, [x9, x21, lsl #2]
	add	x21, x21, #1
	mov	x0, x22
	bl	_ARRAY_SIZE
	cmp	x21, w0, sxtw
	b.lt	LBB0_6
	b	LBB0_9
LBB0_8:
	mov	w21, #0
LBB0_9:
	str	w21, [x19, #24]
	mov	sp, x23
LBB0_10:
	ldr	w8, [x19, #24]
	cbz	w8, LBB0_12
; %bb.11:
	mov	w8, #1
	str	w8, [x19, #28]
	b	LBB0_13
LBB0_12:
	mov	x0, x19
	bl	_intel_dp_set_sink_rates
LBB0_13:
	mov	x0, x19
	bl	_intel_dp_set_common_rates
	mov	x0, x20
	bl	_INTEL_GEN
	cmp	w0, #9
	b.gt	LBB0_15
; %bb.14:
	mov	x0, x20
	bl	_IS_GEMINILAKE
	cbz	x0, LBB0_16
LBB0_15:
	mov	x0, x19
	bl	_intel_dp_get_dsc_sink_cap
LBB0_16:
	mov	w0, #1
LBB0_17:
	ldur	x8, [x29, #-56]
Lloh22:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh23:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.18:
	sub	sp, x29, #48
	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_19:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_DP_DPCD_REV,8,3                ; @DP_DPCD_REV
	.comm	_DP_EDP_DPCD_REV,4,2            ; @DP_EDP_DPCD_REV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"eDP DPCD: %*ph\n"

	.comm	_DP_EDP_14,8,3                  ; @DP_EDP_14
	.comm	_DP_MAX_SUPPORTED_RATES,4,2     ; @DP_MAX_SUPPORTED_RATES
	.comm	_DP_SUPPORTED_LINK_RATES,4,2    ; @DP_SUPPORTED_LINK_RATES
	.no_dead_strip	_intel_edp_init_dpcd
.subsections_via_symbols
