	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_hdmi_reset_link
_intel_hdmi_reset_link:                 ## @intel_hdmi_reset_link
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	callq	_to_i915
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_enc_to_intel_hdmi
	movq	8(%rax), %rbx
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_intel_gmbus_get_adapter
	testq	%rbx, %rbx
	je	LBB0_15
## %bb.1:
	movq	%rax, %r13
	movq	(%rbx), %rax
	movq	_connector_status_connected@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.2:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_drm_modeset_lock
	testl	%eax, %eax
	jne	LBB0_16
## %bb.3:
	movq	8(%rbx), %rbx
	movl	8(%rbx), %edi
	callq	_to_intel_crtc
	testq	%rax, %rax
	je	LBB0_15
## %bb.4:
	movq	%rax, %r14
	leaq	4(%rax), %rdi
	movq	%r15, %rsi
	callq	_drm_modeset_lock
	testl	%eax, %eax
	jne	LBB0_16
## %bb.5:
	movl	(%r14), %edi
	callq	_to_intel_crtc_state
	movq	%rax, %r12
	movq	_INTEL_OUTPUT_HDMI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_intel_crtc_has_type
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_WARN_ON
	cmpl	$0, 8(%r12)
	je	LBB0_15
## %bb.6:
	cmpl	$0, (%r12)
	jne	LBB0_8
## %bb.7:
	cmpl	$0, 4(%r12)
	je	LBB0_15
LBB0_8:
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.9:
	callq	_try_wait_for_completion
	testl	%eax, %eax
	je	LBB0_15
LBB0_10:
	movq	_SCDC_TMDS_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	movq	%r13, %rdi
	callq	_drm_scdc_readb
	testl	%eax, %eax
	js	LBB0_19
## %bb.11:
	movl	-44(%rbp), %eax
	movq	_SCDC_TMDS_BIT_CLOCK_RATIO_BY_40@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	testl	%eax, (%rcx)
	setne	%dl
	cmpl	%edx, (%r12)
	jne	LBB0_13
## %bb.12:
	movq	_SCDC_SCRAMBLING_ENABLE@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	testl	%eax, (%rcx)
	setne	%dl
	movl	$0, %eax
	cmpl	%edx, 4(%r12)
	je	LBB0_16
LBB0_13:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_modeset_pipe
	jmp	LBB0_16
LBB0_19:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_ERROR
LBB0_15:
	xorl	%eax, %eax
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_connector_status_connected,8,3 ## @connector_status_connected
	.comm	_INTEL_OUTPUT_HDMI,4,2          ## @INTEL_OUTPUT_HDMI
	.comm	_SCDC_TMDS_CONFIG,4,2           ## @SCDC_TMDS_CONFIG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to read TMDS config: %d\n"

	.comm	_SCDC_TMDS_BIT_CLOCK_RATIO_BY_40,4,2 ## @SCDC_TMDS_BIT_CLOCK_RATIO_BY_40
	.comm	_SCDC_SCRAMBLING_ENABLE,4,2     ## @SCDC_SCRAMBLING_ENABLE
	.no_dead_strip	_intel_hdmi_reset_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_hdmi_reset_link
_intel_hdmi_reset_link:                 ; @intel_hdmi_reset_link
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	w0, [x0]
	bl	_to_i915
	mov	x21, x0
	mov	x0, x20
	bl	_enc_to_intel_hdmi
	ldr	x22, [x0, #8]
	ldr	w1, [x0]
	mov	x0, x21
	bl	_intel_gmbus_get_adapter
	cbz	x22, LBB0_15
; %bb.1:
	ldr	x8, [x22]
Lloh0:
	adrp	x9, _connector_status_connected@GOTPAGE
Lloh1:
	ldr	x9, [x9, _connector_status_connected@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.2:
	mov	x20, x0
	mov	x0, x21
	mov	x1, x19
	bl	_drm_modeset_lock
	cbnz	w0, LBB0_16
; %bb.3:
	ldr	x23, [x22, #8]
	ldr	w0, [x23, #8]
	bl	_to_intel_crtc
	cbz	x0, LBB0_16
; %bb.4:
	mov	x21, x0
	add	x0, x0, #4
	mov	x1, x19
	bl	_drm_modeset_lock
	cbnz	w0, LBB0_16
; %bb.5:
	ldr	w0, [x21]
	bl	_to_intel_crtc_state
	mov	x22, x0
Lloh3:
	adrp	x8, _INTEL_OUTPUT_HDMI@GOTPAGE
Lloh4:
	ldr	x8, [x8, _INTEL_OUTPUT_HDMI@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_intel_crtc_has_type
	cmp	w0, #0
	cset	w0, eq
	bl	_WARN_ON
	ldr	w8, [x22, #8]
	cbz	w8, LBB0_15
; %bb.6:
	ldr	w8, [x22]
	cbnz	w8, LBB0_8
; %bb.7:
	ldr	w8, [x22, #4]
	cbz	w8, LBB0_15
LBB0_8:
	ldr	x0, [x23]
	cbz	x0, LBB0_10
; %bb.9:
	bl	_try_wait_for_completion
	cbz	w0, LBB0_16
LBB0_10:
Lloh6:
	adrp	x8, _SCDC_TMDS_CONFIG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SCDC_TMDS_CONFIG@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x20
	bl	_drm_scdc_readb
	tbnz	w0, #31, LBB0_14
; %bb.11:
Lloh9:
	adrp	x9, _SCDC_TMDS_BIT_CLOCK_RATIO_BY_40@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SCDC_TMDS_BIT_CLOCK_RATIO_BY_40@GOTPAGEOFF]
	ldr	w8, [sp, #12]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w9, ne
	ldr	w10, [x22]
	cmp	w10, w9
	b.ne	LBB0_13
; %bb.12:
Lloh12:
	adrp	x9, _SCDC_SCRAMBLING_ENABLE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _SCDC_SCRAMBLING_ENABLE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w8, ne
	ldr	w9, [x22, #4]
	cmp	w9, w8
	b.eq	LBB0_15
LBB0_13:
	mov	x0, x21
	mov	x1, x19
	bl	_modeset_pipe
	b	LBB0_16
LBB0_14:
	mov	x1, x0
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_15:
	mov	w0, #0
LBB0_16:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_connector_status_connected,8,3 ; @connector_status_connected
	.comm	_INTEL_OUTPUT_HDMI,4,2          ; @INTEL_OUTPUT_HDMI
	.comm	_SCDC_TMDS_CONFIG,4,2           ; @SCDC_TMDS_CONFIG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to read TMDS config: %d\n"

	.comm	_SCDC_TMDS_BIT_CLOCK_RATIO_BY_40,4,2 ; @SCDC_TMDS_BIT_CLOCK_RATIO_BY_40
	.comm	_SCDC_SCRAMBLING_ENABLE,4,2     ; @SCDC_SCRAMBLING_ENABLE
	.no_dead_strip	_intel_hdmi_reset_link
.subsections_via_symbols
