	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_enable_ddi_hdmi
_intel_enable_ddi_hdmi:                 ## @intel_enable_ddi_hdmi
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r14
	leaq	4(%rdi), %r13
	movl	4(%rdi), %edi
	callq	_to_i915
	movq	%rax, %r12
	movq	%r13, %rdi
	callq	_enc_to_dig_port
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rbx
	movl	(%r14), %r13d
	movl	8(%r15), %ecx
	movl	12(%r15), %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_intel_hdmi_handle_sink_scrambling
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movl	(%rbx), %edx
	movl	4(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
LBB0_2:
	movq	%r12, %rdi
	callq	_IS_GEN9_BC
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_gen9_chicken_trans_reg_by_port
	movl	%eax, %r12d
	movl	%eax, %edi
	callq	_I915_READ
	movq	_PORT_E@GOTPCREL(%rip), %r8
	movq	_DDIE_TRAINING_OVERRIDE_ENABLE@GOTPCREL(%rip), %rdi
	movq	_DDI_TRAINING_OVERRIDE_ENABLE@GOTPCREL(%rip), %rsi
	movq	_DDIE_TRAINING_OVERRIDE_VALUE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_DDI_TRAINING_OVERRIDE_VALUE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	orl	(%rdi), %ecx
	orl	(%rsi), %ebx
	cmpl	(%r8), %r13d
	cmovel	%ecx, %ebx
	orl	%eax, %ebx
	movl	%r12d, %edi
	movl	%ebx, %esi
	callq	_I915_WRITE
	movl	%r12d, %edi
	callq	_POSTING_READ
	movl	$1, %edi
	callq	_udelay
	movq	_DDIE_TRAINING_OVERRIDE_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_DDI_TRAINING_OVERRIDE_VALUE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_DDIE_TRAINING_OVERRIDE_ENABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_DDI_TRAINING_OVERRIDE_ENABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %esi
	movq	_PORT_E@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r13d
	cmovel	%eax, %esi
	notl	%esi
	andl	%ebx, %esi
	movl	%r12d, %edi
	callq	_I915_WRITE
LBB0_4:
	movl	%r13d, %edi
	callq	_DDI_BUF_CTL
	movq	_DDI_BUF_CTL_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	orl	(%rcx), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	cmpq	$0, (%r15)
	je	LBB0_5
## %bb.6:
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_intel_audio_codec_enable       ## TAILCALL
LBB0_5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[CONNECTOR:%d:%s] Failed to configure sink scrambling/TMDS bit clock ratio\n"

	.comm	_PORT_E,4,2                     ## @PORT_E
	.comm	_DDIE_TRAINING_OVERRIDE_ENABLE,4,2 ## @DDIE_TRAINING_OVERRIDE_ENABLE
	.comm	_DDIE_TRAINING_OVERRIDE_VALUE,4,2 ## @DDIE_TRAINING_OVERRIDE_VALUE
	.comm	_DDI_TRAINING_OVERRIDE_ENABLE,4,2 ## @DDI_TRAINING_OVERRIDE_ENABLE
	.comm	_DDI_TRAINING_OVERRIDE_VALUE,4,2 ## @DDI_TRAINING_OVERRIDE_VALUE
	.comm	_DDI_BUF_CTL_ENABLE,4,2         ## @DDI_BUF_CTL_ENABLE
	.no_dead_strip	_intel_enable_ddi_hdmi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_enable_ddi_hdmi
_intel_enable_ddi_hdmi:                 ; @intel_enable_ddi_hdmi
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	x22, x0
	ldr	w0, [x22, #4]!
	bl	_to_i915
	mov	x24, x0
	mov	x0, x22
	bl	_enc_to_dig_port
	mov	x22, x0
	ldr	x25, [x19]
	ldr	w23, [x21]
	ldp	w3, w2, [x20, #8]
	mov	x0, x21
	mov	x1, x25
	bl	_intel_hdmi_handle_sink_scrambling
	cbnz	w0, LBB0_2
; %bb.1:
	ldp	w2, w1, [x25]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_2:
	mov	x0, x24
	bl	_IS_GEN9_BC
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x24
	mov	x1, x23
	bl	_gen9_chicken_trans_reg_by_port
	mov	x24, x0
	bl	_I915_READ
Lloh2:
	adrp	x8, _PORT_E@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PORT_E@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _DDIE_TRAINING_OVERRIDE_ENABLE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _DDIE_TRAINING_OVERRIDE_ENABLE@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	adrp	x28, _DDI_TRAINING_OVERRIDE_ENABLE@GOTPAGE
Lloh9:
	ldr	x28, [x28, _DDI_TRAINING_OVERRIDE_ENABLE@GOTPAGEOFF]
	ldr	w10, [x28]
Lloh10:
	adrp	x27, _DDIE_TRAINING_OVERRIDE_VALUE@GOTPAGE
Lloh11:
	ldr	x27, [x27, _DDIE_TRAINING_OVERRIDE_VALUE@GOTPAGEOFF]
	ldr	w11, [x27]
Lloh12:
	adrp	x26, _DDI_TRAINING_OVERRIDE_VALUE@GOTPAGE
Lloh13:
	ldr	x26, [x26, _DDI_TRAINING_OVERRIDE_VALUE@GOTPAGEOFF]
	ldr	w12, [x26]
	orr	w9, w11, w9
	orr	w10, w12, w10
	cmp	w23, w8
	csel	w8, w9, w10, eq
	orr	w25, w8, w0
	mov	x0, x24
	mov	x1, x25
	bl	_I915_WRITE
	mov	x0, x24
	bl	_POSTING_READ
	mov	w0, #1
	bl	_udelay
Lloh14:
	adrp	x8, _PORT_E@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PORT_E@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _DDIE_TRAINING_OVERRIDE_ENABLE@GOTPAGE
Lloh18:
	ldr	x9, [x9, _DDIE_TRAINING_OVERRIDE_ENABLE@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	ldr	w10, [x28]
	ldr	w11, [x27]
	ldr	w12, [x26]
	orr	w9, w11, w9
	orr	w10, w12, w10
	cmp	w23, w8
	csel	w8, w9, w10, eq
	bic	w1, w25, w8
	mov	x0, x24
	bl	_I915_WRITE
LBB0_4:
	mov	x0, x23
	bl	_DDI_BUF_CTL
	ldr	w8, [x22]
Lloh20:
	adrp	x9, _DDI_BUF_CTL_ENABLE@GOTPAGE
Lloh21:
	ldr	x9, [x9, _DDI_BUF_CTL_ENABLE@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_I915_WRITE
	ldr	x8, [x20]
	cbz	x8, LBB0_6
; %bb.5:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_intel_audio_codec_enable
LBB0_6:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[CONNECTOR:%d:%s] Failed to configure sink scrambling/TMDS bit clock ratio\n"

	.comm	_PORT_E,4,2                     ; @PORT_E
	.comm	_DDIE_TRAINING_OVERRIDE_ENABLE,4,2 ; @DDIE_TRAINING_OVERRIDE_ENABLE
	.comm	_DDIE_TRAINING_OVERRIDE_VALUE,4,2 ; @DDIE_TRAINING_OVERRIDE_VALUE
	.comm	_DDI_TRAINING_OVERRIDE_ENABLE,4,2 ; @DDI_TRAINING_OVERRIDE_ENABLE
	.comm	_DDI_TRAINING_OVERRIDE_VALUE,4,2 ; @DDI_TRAINING_OVERRIDE_VALUE
	.comm	_DDI_BUF_CTL_ENABLE,4,2         ; @DDI_BUF_CTL_ENABLE
	.no_dead_strip	_intel_enable_ddi_hdmi
.subsections_via_symbols
