	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_detect_edp_sink_caps           ## -- Begin function detect_edp_sink_caps
	.p2align	4, 0x90
_detect_edp_sink_caps:                  ## @detect_edp_sink_caps
	.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	$80, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	callq	_retrieve_link_cap
	movq	$0, 16(%r14)
	leaq	-96(%rbp), %rdi
	xorl	%esi, %esi
	movl	$64, %edx
	callq	_memset
	movq	32(%r14), %rax
	movq	_DPCD_REV_14@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_1
LBB0_8:
	movq	(%r14), %rax
	movq	%rax, 8(%r14)
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_10
## %bb.9:
	addq	$80, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	movq	40(%r14), %rax
	cmpq	$0, (%rax)
	jne	LBB0_3
## %bb.2:
	movq	(%r14), %rax
	movq	_LINK_RATE_UNKNOWN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
LBB0_3:
	movq	_DP_SUPPORTED_LINK_RATES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-96(%rbp), %rdx
	movq	%r14, %rdi
	movl	$64, %ecx
	callq	_core_link_read_dpcd
	movq	$-2, %rbx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	addq	$2, %rbx
	cmpq	$14, %rbx
	jae	LBB0_8
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	-84(%rbp,%rbx,4), %eax
	shll	$8, %eax
	addl	-88(%rbp,%rbx,4), %eax
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	imull	$200, %eax, %edi
	callq	_linkRateInKHzToLinkRateMultiplier
	movq	16(%r14), %rcx
	movq	24(%r14), %rdx
	movl	%eax, (%rdx,%rcx,4)
	incq	%rcx
	movq	%rcx, 16(%r14)
	movl	%eax, %eax
	cmpq	%rax, (%r14)
	jge	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, (%r14)
	jmp	LBB0_7
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_LINK_RATE_UNKNOWN,8,3          ## @LINK_RATE_UNKNOWN
	.comm	_DPCD_REV_14,8,3                ## @DPCD_REV_14
	.comm	_DP_SUPPORTED_LINK_RATES,4,2    ## @DP_SUPPORTED_LINK_RATES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_detect_edp_sink_caps           ; -- Begin function detect_edp_sink_caps
	.p2align	2
_detect_edp_sink_caps:                  ; @detect_edp_sink_caps
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	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, #-40]
	bl	_retrieve_link_cap
	str	xzr, [x19, #16]
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #64
	bl	_memset
	ldr	x8, [x19, #32]
Lloh3:
	adrp	x9, _DPCD_REV_14@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DPCD_REV_14@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_3
LBB0_1:
	ldr	x8, [x19]
	str	x8, [x19, #8]
	ldur	x8, [x29, #-40]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.2:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_3:
	ldr	x8, [x19, #40]
	ldr	x8, [x8]
	cbnz	x8, LBB0_5
; %bb.4:
	ldr	x8, [x19]
Lloh9:
	adrp	x9, _LINK_RATE_UNKNOWN@GOTPAGE
Lloh10:
	ldr	x9, [x9, _LINK_RATE_UNKNOWN@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_1
LBB0_5:
Lloh12:
	adrp	x8, _DP_SUPPORTED_LINK_RATES@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DP_SUPPORTED_LINK_RATES@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	add	x20, sp, #8
	add	x2, sp, #8
	mov	x0, x19
	mov	w3, #64
	bl	_core_link_read_dpcd
	mov	x21, #0
	mov	w22, #200
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x8, x21, #2
	cmp	x21, #14
	mov	x21, x8
	b.hs	LBB0_1
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add	x8, x20, x21, lsl #2
	ldp	w8, w9, [x8]
	adds	w8, w8, w9, lsl #8
	b.eq	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mul	w0, w8, w22
	bl	_linkRateInKHzToLinkRateMultiplier
	ldp	x9, x8, [x19, #16]
	str	w0, [x8, x9, lsl #2]
	add	x8, x9, #1
	str	x8, [x19, #16]
	ldr	x9, [x19]
	mov	w8, w0
	cmp	x9, x8
	b.ge	LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	str	x8, [x19]
	b	LBB0_6
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_LINK_RATE_UNKNOWN,8,3          ; @LINK_RATE_UNKNOWN
	.comm	_DPCD_REV_14,8,3                ; @DPCD_REV_14
	.comm	_DP_SUPPORTED_LINK_RATES,4,2    ; @DP_SUPPORTED_LINK_RATES
.subsections_via_symbols
