	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_dp_link_configure          ## -- Begin function drm_dp_link_configure
	.p2align	4, 0x90
_drm_dp_link_configure:                 ## @drm_dp_link_configure
	.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	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movl	8(%rsi), %edi
	callq	_drm_dp_link_rate_to_bw_code
	movl	%eax, -32(%rbp)
	movl	4(%rbx), %eax
	movl	%eax, -28(%rbp)
	movq	_DP_LINK_CAP_ENHANCED_FRAMING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rbx)
	je	LBB0_2
## %bb.1:
	movq	_DP_LANE_COUNT_ENHANCED_FRAME_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, -28(%rbp)
LBB0_2:
	movq	_DP_LINK_BW_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdx
	movq	%r14, %rdi
	movl	$8, %ecx
	callq	_drm_dp_dpcd_write
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-24(%rbp), %rcx
	jne	LBB0_4
## %bb.3:
	movl	%eax, %ecx
	sarl	$31, %ecx
	andl	%eax, %ecx
	movl	%ecx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_DP_LINK_CAP_ENHANCED_FRAMING,4,2 ## @DP_LINK_CAP_ENHANCED_FRAMING
	.comm	_DP_LANE_COUNT_ENHANCED_FRAME_EN,4,2 ## @DP_LANE_COUNT_ENHANCED_FRAME_EN
	.comm	_DP_LINK_BW_SET,4,2             ## @DP_LINK_BW_SET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_dp_link_configure          ; -- Begin function drm_dp_link_configure
	.p2align	2
_drm_dp_link_configure:                 ; @drm_dp_link_configure
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	ldr	w0, [x1, #8]
	bl	_drm_dp_link_rate_to_bw_code
	ldp	w9, w8, [x20]
	stp	w0, w8, [sp]
Lloh3:
	adrp	x10, _DP_LINK_CAP_ENHANCED_FRAMING@GOTPAGE
Lloh4:
	ldr	x10, [x10, _DP_LINK_CAP_ENHANCED_FRAMING@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_2
; %bb.1:
Lloh6:
	adrp	x9, _DP_LANE_COUNT_ENHANCED_FRAME_EN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DP_LANE_COUNT_ENHANCED_FRAME_EN@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [sp, #4]
LBB0_2:
Lloh9:
	adrp	x8, _DP_LINK_BW_SET@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DP_LINK_BW_SET@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x2, sp
	mov	x0, x19
	mov	w3, #8
	bl	_drm_dp_dpcd_write
	cmp	w0, #0
	csel	w0, w0, wzr, lt
	ldr	x8, [sp, #8]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_4:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_DP_LINK_CAP_ENHANCED_FRAMING,4,2 ; @DP_LINK_CAP_ENHANCED_FRAMING
	.comm	_DP_LANE_COUNT_ENHANCED_FRAME_EN,4,2 ; @DP_LANE_COUNT_ENHANCED_FRAME_EN
	.comm	_DP_LINK_BW_SET,4,2             ; @DP_LINK_BW_SET
.subsections_via_symbols
