	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function analogix_dp_enable_scramble
_analogix_dp_enable_scramble:           ## @analogix_dp_enable_scramble
	.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	%rdi, %rbx
	testl	%esi, %esi
	je	LBB0_3
## %bb.1:
	callq	_analogix_dp_enable_scrambling
	movq	_DP_TRAINING_PATTERN_SET@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	-20(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_drm_dp_dpcd_readb
	cmpl	$1, %eax
	jne	LBB0_6
## %bb.2:
	movl	(%r14), %esi
	movq	_DP_LINK_SCRAMBLING_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	-20(%rbp), %edx
	jmp	LBB0_5
LBB0_3:
	callq	_analogix_dp_disable_scrambling
	movq	_DP_TRAINING_PATTERN_SET@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	-20(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_drm_dp_dpcd_readb
	cmpl	$1, %eax
	jne	LBB0_6
## %bb.4:
	movl	(%r14), %esi
	movq	_DP_LINK_SCRAMBLING_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	-20(%rbp), %edx
LBB0_5:
	movq	%rbx, %rdi
	callq	_drm_dp_dpcd_writeb
	movl	%eax, %ecx
	sarl	$31, %eax
	andl	%ecx, %eax
LBB0_6:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DP_TRAINING_PATTERN_SET,4,2    ## @DP_TRAINING_PATTERN_SET
	.comm	_DP_LINK_SCRAMBLING_DISABLE,4,2 ## @DP_LINK_SCRAMBLING_DISABLE
	.no_dead_strip	_analogix_dp_enable_scramble
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function analogix_dp_enable_scramble
_analogix_dp_enable_scramble:           ; @analogix_dp_enable_scramble
	.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	x19, x0
	cbz	w1, LBB0_3
; %bb.1:
	bl	_analogix_dp_enable_scrambling
Lloh0:
	adrp	x20, _DP_TRAINING_PATTERN_SET@GOTPAGE
Lloh1:
	ldr	x20, [x20, _DP_TRAINING_PATTERN_SET@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x19
	bl	_drm_dp_dpcd_readb
	cmp	w0, #1
	b.ne	LBB0_6
; %bb.2:
	ldr	w1, [x20]
	ldr	w8, [sp, #12]
Lloh2:
	adrp	x9, _DP_LINK_SCRAMBLING_DISABLE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DP_LINK_SCRAMBLING_DISABLE@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	bic	w2, w8, w9
	b	LBB0_5
LBB0_3:
	bl	_analogix_dp_disable_scrambling
Lloh5:
	adrp	x20, _DP_TRAINING_PATTERN_SET@GOTPAGE
Lloh6:
	ldr	x20, [x20, _DP_TRAINING_PATTERN_SET@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x19
	bl	_drm_dp_dpcd_readb
	cmp	w0, #1
	b.ne	LBB0_6
; %bb.4:
	ldr	w1, [x20]
	ldr	w8, [sp, #12]
Lloh7:
	adrp	x9, _DP_LINK_SCRAMBLING_DISABLE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _DP_LINK_SCRAMBLING_DISABLE@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	orr	w2, w9, w8
LBB0_5:
	mov	x0, x19
	bl	_drm_dp_dpcd_writeb
	cmp	w0, #0
	csel	w0, w0, wzr, lt
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_DP_TRAINING_PATTERN_SET,4,2    ; @DP_TRAINING_PATTERN_SET
	.comm	_DP_LINK_SCRAMBLING_DISABLE,4,2 ; @DP_LINK_SCRAMBLING_DISABLE
	.no_dead_strip	_analogix_dp_enable_scramble
.subsections_via_symbols
