	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function decide_edp_link_settings
_decide_edp_link_settings:              ## @decide_edp_link_settings
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	movq	_DPCD_REV_14@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_2
## %bb.1:
	cmpq	$0, (%rbx)
	je	LBB0_2
## %bb.4:
	movq	%rdx, %r12
	leaq	-120(%rbp), %rdi
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movq	_LANE_COUNT_ONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -120(%rbp)
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movq	%rax, -112(%rbp)
	movq	_LINK_SPREAD_DISABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -88(%rbp)
	movl	$1, -104(%rbp)
	movq	$0, -96(%rbp)
	movq	-120(%rbp), %rax
	movq	%rax, -80(%rbp)
	movq	-112(%rbp), %rax
	movq	%rax, -72(%rbp)
	movq	-88(%rbp), %rax
	movq	%rax, -48(%rbp)
	movl	-104(%rbp), %eax
	movl	%eax, -64(%rbp)
	movl	-100(%rbp), %eax
	movl	%eax, -60(%rbp)
	movq	-96(%rbp), %rax
	movq	%rax, -56(%rbp)
	movq	-72(%rbp), %rax
	cmpq	32(%rbx), %rax
	jg	LBB0_13
## %bb.5:
	leaq	-80(%rbp), %r13
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	callq	_increase_lane_count
	movq	-72(%rbp), %rcx
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%rax, -80(%rbp)
	cmpq	32(%rbx), %rcx
	jg	LBB0_13
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_dc_link_bandwidth_kbps
	cmpq	%r12, %rax
	jge	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	-80(%rbp), %rdi
	cmpq	24(%rbx), %rdi
	jl	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	-56(%rbp), %rax
	cmpq	(%rbx), %rax
	jae	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	leaq	1(%rax), %rcx
	movq	%rcx, -56(%rbp)
	movq	8(%rbx), %rcx
	movq	8(%rcx,%rax,8), %rcx
	movq	%rcx, -72(%rbp)
	movq	-120(%rbp), %rax
	jmp	LBB0_12
LBB0_2:
	movq	56(%rbx), %rax
	movq	%rax, 32(%r14)
	movups	24(%rbx), %xmm0
	movups	40(%rbx), %xmm1
LBB0_3:
	movups	%xmm1, 16(%r14)
	movups	%xmm0, (%r14)
	movl	$1, %r15d
LBB0_13:
	movl	%r15d, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	-48(%rbp), %rax
	movq	%rax, 32(%r14)
	movaps	-80(%rbp), %xmm0
	movaps	-64(%rbp), %xmm1
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_DPCD_REV_14,8,3                ## @DPCD_REV_14
	.comm	_LANE_COUNT_ONE,8,3             ## @LANE_COUNT_ONE
	.comm	_LINK_SPREAD_DISABLED,4,2       ## @LINK_SPREAD_DISABLED
	.no_dead_strip	_decide_edp_link_settings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function decide_edp_link_settings
_decide_edp_link_settings:              ; @decide_edp_link_settings
	.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, x1
	mov	x20, x0
	ldr	x8, [x0, #16]
Lloh0:
	adrp	x9, _DPCD_REV_14@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DPCD_REV_14@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_9
; %bb.1:
	ldr	x8, [x20]
	cbz	x8, LBB0_9
; %bb.2:
	mov	x21, x2
	add	x0, sp, #40
	mov	w1, #0
	mov	w2, #40
	bl	_memset
	mov	w0, #0
Lloh3:
	adrp	x8, _LANE_COUNT_ONE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LANE_COUNT_ONE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	str	x8, [sp, #48]
Lloh6:
	adrp	x8, _LINK_SPREAD_DISABLED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LINK_SPREAD_DISABLED@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [sp, #72]
	mov	w8, #1
	str	w8, [sp, #56]
	str	xzr, [sp, #64]
	ldr	x8, [sp, #72]
	str	x8, [sp, #32]
	ldur	q0, [sp, #40]
	ldur	q1, [sp, #56]
	stp	q0, q1, [sp]
	ldr	x8, [sp, #8]
	ldr	x9, [x20, #32]
	cmp	x8, x9
	b.le	LBB0_5
	b	LBB0_11
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	bl	_increase_lane_count
	ldr	x8, [sp, #8]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	str	x0, [sp]
	ldr	x9, [x20, #32]
	cmp	x8, x9
	b.gt	LBB0_12
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x1, sp
	mov	x0, x20
	bl	_dc_link_bandwidth_kbps
	cmp	x0, x21
	b.ge	LBB0_13
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [sp]
	ldr	x8, [x20, #24]
	cmp	x0, x8
	b.lt	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [sp, #24]
	ldr	x9, [x20]
	cmp	x8, x9
	b.hs	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x8, x8, #1
	str	x8, [sp, #24]
	ldr	x9, [x20, #8]
	ldr	x8, [x9, x8, lsl #3]
	str	x8, [sp, #8]
	ldr	x0, [sp, #40]
	b	LBB0_4
LBB0_9:
	ldur	q0, [x20, #24]
	ldur	q1, [x20, #40]
	ldr	x8, [x20, #56]
	str	x8, [x19, #32]
	stp	q0, q1, [x19]
LBB0_10:
	mov	w0, #1
LBB0_11:
	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_12:
	mov	w0, #0
	b	LBB0_11
LBB0_13:
	ldp	q0, q1, [sp]
	stp	q0, q1, [x19]
	ldr	x8, [sp, #32]
	str	x8, [x19, #32]
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_DPCD_REV_14,8,3                ; @DPCD_REV_14
	.comm	_LANE_COUNT_ONE,8,3             ; @LANE_COUNT_ONE
	.comm	_LINK_SPREAD_DISABLED,4,2       ; @LINK_SPREAD_DISABLED
	.no_dead_strip	_decide_edp_link_settings
.subsections_via_symbols
