	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_dp_set_link_train
_intel_dp_set_link_train:               ## @intel_dp_set_link_train
	.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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	callq	_intel_dp_program_link_training_pattern
	movl	%ebx, -64(%rbp)
	movq	_DP_TRAINING_PATTERN_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movq	_DP_TRAINING_PATTERN_DISABLE@GOTPCREL(%rip), %rax
	movl	$1, %r14d
	cmpl	(%rax), %ebx
	je	LBB0_2
## %bb.1:
	leaq	-60(%rbp), %rdi
	movl	(%r15), %edx
	movl	8(%r15), %esi
	callq	_memcpy
	movl	(%r15), %r14d
	incl	%r14d
LBB0_2:
	addq	$4, %r15
	movq	_DP_TRAINING_PATTERN_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdx
	movq	%r15, %rdi
	movl	%r14d, %ecx
	callq	_drm_dp_dpcd_write
	movl	%eax, %ecx
	xorl	%eax, %eax
	cmpl	%r14d, %ecx
	sete	%cl
	movq	___stack_chk_guard@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	-32(%rbp), %rdx
	jne	LBB0_4
## %bb.3:
	movb	%cl, %al
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_DP_TRAINING_PATTERN_MASK,4,2   ## @DP_TRAINING_PATTERN_MASK
	.comm	_DP_TRAINING_PATTERN_DISABLE,4,2 ## @DP_TRAINING_PATTERN_DISABLE
	.comm	_DP_TRAINING_PATTERN_SET,4,2    ## @DP_TRAINING_PATTERN_SET
	.no_dead_strip	_intel_dp_set_link_train
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_dp_set_link_train
_intel_dp_set_link_train:               ; @intel_dp_set_link_train
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	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, #24]
	bl	_intel_dp_program_link_training_pattern
	str	w20, [sp, #4]
Lloh3:
	adrp	x8, _DP_TRAINING_PATTERN_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DP_TRAINING_PATTERN_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w8, w8, w20
Lloh6:
	adrp	x9, _DP_TRAINING_PATTERN_DISABLE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DP_TRAINING_PATTERN_DISABLE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
	mov	w20, #1
	b	LBB0_3
LBB0_2:
	add	x8, sp, #4
	add	x0, x8, #4
	ldr	w1, [x19, #8]
	ldr	w2, [x19]
	bl	_memcpy
	ldr	w8, [x19]
	add	w20, w8, #1
LBB0_3:
	add	x0, x19, #4
Lloh9:
	adrp	x8, _DP_TRAINING_PATTERN_SET@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DP_TRAINING_PATTERN_SET@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	add	x2, sp, #4
	mov	x3, x20
	bl	_drm_dp_dpcd_write
	cmp	w0, w20
	cset	w0, eq
	ldr	x8, [sp, #24]
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_5
; %bb.4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_DP_TRAINING_PATTERN_MASK,4,2   ; @DP_TRAINING_PATTERN_MASK
	.comm	_DP_TRAINING_PATTERN_DISABLE,4,2 ; @DP_TRAINING_PATTERN_DISABLE
	.comm	_DP_TRAINING_PATTERN_SET,4,2    ; @DP_TRAINING_PATTERN_SET
	.no_dead_strip	_intel_dp_set_link_train
.subsections_via_symbols
