	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function enable_link_hdmi
_enable_link_hdmi:                      ## @enable_link_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	%rdi, %r13
	movq	(%rdi), %rbx
	movq	40(%rbx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	$0, -48(%rbp)
	xorl	%r14d, %r14d
	cmpl	$640, 8(%rbx)                   ## imm = 0x280
	jne	LBB0_2
## %bb.1:
	xorl	%r14d, %r14d
	cmpl	$480, 12(%rbx)                  ## imm = 0x1E0
	sete	%r14b
LBB0_2:
	movl	(%rbx), %eax
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movslq	16(%rbx), %rax
	imulq	$1717986919, %rax, %rax         ## imm = 0x66666667
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$34, %rax
	addl	%ecx, %eax
	movl	%eax, (%rbx)
LBB0_4:
	xorl	%r15d, %r15d
	cmpl	$340001, %eax                   ## imm = 0x53021
	setge	%r12b
	movl	4(%rbx), %edi
	callq	_dc_is_hdmi_signal
	testq	%rax, %rax
	je	LBB0_11
## %bb.5:
	movq	(%r13), %rax
	movq	40(%rax), %rcx
	movq	_EXT_DISPLAY_PATH_CAPS__EXT_CHIP_MASK@GOTPCREL(%rip), %rax
	movzwl	(%rax), %eax
	andw	(%rcx), %ax
	movb	%r12b, %r15b
	movq	_EXT_DISPLAY_PATH_CAPS__HDMI20_TISN65DP159RSBT@GOTPCREL(%rip), %rcx
	cmpw	(%rcx), %ax
	jne	LBB0_9
## %bb.6:
	movq	16(%r13), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%r13, %rdi
	callq	_get_ext_hdmi_settings
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	-48(%rbp), %rcx
	movq	%r13, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	callq	_write_i2c_retimer_setting
	jmp	LBB0_11
LBB0_9:
	movq	_EXT_DISPLAY_PATH_CAPS__HDMI20_PI3EQX1204@GOTPCREL(%rip), %rcx
	cmpw	(%rcx), %ax
	jne	LBB0_11
## %bb.10:
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_write_i2c_redriver_setting
	jmp	LBB0_11
LBB0_8:
	movq	%r13, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	callq	_write_i2c_default_retimer_setting
LBB0_11:
	movq	(%r13), %rax
	movl	4(%rax), %edi
	callq	_dc_is_hdmi_signal
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	40(%rbx), %rax
	movl	4(%rax), %edi
	movl	(%rbx), %esi
	movl	32(%rbx), %edx
	callq	_dal_ddc_service_write_scdc_data
LBB0_13:
	movq	40(%rbx), %rdi
	addq	$16, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	24(%rbx), %rax
	movq	_PIXEL_ENCODING_YCBCR422@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_14
## %bb.15:
	movq	_COLOR_DEPTH_888@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_14:
	leaq	20(%rbx), %rax
LBB0_16:
	movl	(%rax), %edx
	movq	8(%r14), %rdi
	movq	(%rdi), %rax
	movq	(%r13), %rcx
	movq	8(%r13), %rsi
	movl	(%rsi), %esi
	movl	4(%rcx), %ecx
	movl	(%rbx), %r8d
	callq	*(%rax)
	movq	(%r13), %rax
	movl	4(%rax), %edi
	callq	_dc_is_hdmi_signal
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	movl	4(%r14), %edi
	callq	_dal_ddc_service_read_scdc_data
LBB0_18:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EXT_DISPLAY_PATH_CAPS__EXT_CHIP_MASK,2,1 ## @EXT_DISPLAY_PATH_CAPS__EXT_CHIP_MASK
	.comm	_EXT_DISPLAY_PATH_CAPS__HDMI20_TISN65DP159RSBT,2,1 ## @EXT_DISPLAY_PATH_CAPS__HDMI20_TISN65DP159RSBT
	.comm	_EXT_DISPLAY_PATH_CAPS__HDMI20_PI3EQX1204,2,1 ## @EXT_DISPLAY_PATH_CAPS__HDMI20_PI3EQX1204
	.comm	_PIXEL_ENCODING_YCBCR422,8,3    ## @PIXEL_ENCODING_YCBCR422
	.comm	_COLOR_DEPTH_888,4,2            ## @COLOR_DEPTH_888
	.no_dead_strip	_enable_link_hdmi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function enable_link_hdmi
_enable_link_hdmi:                      ; @enable_link_hdmi
	.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, x0
	mov	w20, #0
	ldr	x23, [x0]
	ldr	x22, [x23, #40]
	str	wzr, [sp, #8]
	ldr	w8, [x23, #8]
	cmp	w8, #640
	b.ne	LBB0_2
; %bb.1:
	ldr	w8, [x23, #12]
	cmp	w8, #480
	cset	w20, eq
LBB0_2:
	ldr	w8, [x23]
	cbnz	w8, LBB0_4
; %bb.3:
	ldrsw	x8, [x23, #16]
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #34
	add	w8, w8, w9
	str	w8, [x23]
LBB0_4:
	mov	w9, #12320
	movk	w9, #5, lsl #16
	cmp	w8, w9
	cset	w21, gt
	ldr	w0, [x23, #4]
	bl	_dc_is_hdmi_signal
	cbz	x0, LBB0_11
; %bb.5:
	ldr	x8, [x19]
	ldr	x8, [x8, #40]
	ldrh	w8, [x8]
Lloh0:
	adrp	x9, _EXT_DISPLAY_PATH_CAPS__EXT_CHIP_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EXT_DISPLAY_PATH_CAPS__EXT_CHIP_MASK@GOTPAGEOFF]
	ldrh	w9, [x9]
	and	w8, w9, w8
Lloh2:
	adrp	x9, _EXT_DISPLAY_PATH_CAPS__HDMI20_TISN65DP159RSBT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _EXT_DISPLAY_PATH_CAPS__HDMI20_TISN65DP159RSBT@GOTPAGEOFF]
	ldrh	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_8
; %bb.6:
	ldr	x8, [x19, #16]
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	bl	_get_ext_hdmi_settings
	cbz	x0, LBB0_10
; %bb.7:
	add	x3, sp, #8
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_write_i2c_retimer_setting
	b	LBB0_11
LBB0_8:
Lloh4:
	adrp	x9, _EXT_DISPLAY_PATH_CAPS__HDMI20_PI3EQX1204@GOTPAGE
Lloh5:
	ldr	x9, [x9, _EXT_DISPLAY_PATH_CAPS__HDMI20_PI3EQX1204@GOTPAGEOFF]
	ldrh	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_11
; %bb.9:
	mov	x0, x19
	mov	x1, x21
	bl	_write_i2c_redriver_setting
	b	LBB0_11
LBB0_10:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_write_i2c_default_retimer_setting
LBB0_11:
	ldr	x8, [x19]
	ldr	w0, [x8, #4]
	bl	_dc_is_hdmi_signal
	cbz	x0, LBB0_13
; %bb.12:
	ldr	x8, [x23, #40]
	ldr	w0, [x8, #4]
	ldr	w1, [x23]
	ldr	w2, [x23, #32]
	bl	_dal_ddc_service_write_scdc_data
LBB0_13:
	ldr	x8, [x23, #40]
	add	x0, x8, #16
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	add	x8, x23, #20
	ldr	x9, [x23, #24]
Lloh6:
	adrp	x10, _PIXEL_ENCODING_YCBCR422@GOTPAGE
Lloh7:
	ldr	x10, [x10, _PIXEL_ENCODING_YCBCR422@GOTPAGEOFF]
Lloh8:
	adrp	x11, _COLOR_DEPTH_888@GOTPAGE
Lloh9:
	ldr	x11, [x11, _COLOR_DEPTH_888@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
	cmp	x9, x10
	csel	x8, x11, x8, eq
	ldr	w2, [x8]
	ldr	x0, [x22, #8]
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldp	x10, x9, [x19]
	ldr	w1, [x9]
	ldr	w3, [x10, #4]
	ldr	w4, [x23]
	blr	x8
	ldr	x8, [x19]
	ldr	w0, [x8, #4]
	bl	_dc_is_hdmi_signal
	cbz	x0, LBB0_15
; %bb.14:
	ldr	w0, [x22, #4]
	bl	_dal_ddc_service_read_scdc_data
LBB0_15:
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EXT_DISPLAY_PATH_CAPS__EXT_CHIP_MASK,2,1 ; @EXT_DISPLAY_PATH_CAPS__EXT_CHIP_MASK
	.comm	_EXT_DISPLAY_PATH_CAPS__HDMI20_TISN65DP159RSBT,2,1 ; @EXT_DISPLAY_PATH_CAPS__HDMI20_TISN65DP159RSBT
	.comm	_EXT_DISPLAY_PATH_CAPS__HDMI20_PI3EQX1204,2,1 ; @EXT_DISPLAY_PATH_CAPS__HDMI20_PI3EQX1204
	.comm	_PIXEL_ENCODING_YCBCR422,8,3    ; @PIXEL_ENCODING_YCBCR422
	.comm	_COLOR_DEPTH_888,4,2            ; @COLOR_DEPTH_888
	.no_dead_strip	_enable_link_hdmi
.subsections_via_symbols
