	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function inno_hdmi_setup
_inno_hdmi_setup:                       ## @inno_hdmi_setup
	.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, %r14
	movq	%rdi, %r13
	movq	%rsi, %rdi
	callq	_drm_match_cea_mode
	movl	%eax, 8(%r13)
	movq	_HDMI_COLORSPACE_RGB@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 40(%r13)
	movq	%rcx, 32(%r13)
	cmpl	$22, %eax
	ja	LBB0_3
## %bb.1:
	movl	$6684876, %ecx                  ## imm = 0x6600CC
	btl	%eax, %ecx
	jae	LBB0_3
## %bb.2:
	movq	_HDMI_COLORIMETRY_ITU_601@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %eax
	movl	%eax, 24(%r13)
	movq	_HDMI_AV_MUTE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_m_AUDIO_MUTE@GOTPCREL(%rip), %rax
	movq	_m_VIDEO_BLACK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	orl	(%rax), %r12d
	movl	$1, %edi
	callq	_v_AUDIO_MUTE
	movl	%eax, %ebx
	movl	$1, %edi
	callq	_v_VIDEO_MUTE
	orl	%eax, %ebx
	movq	%r13, %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	movl	%ebx, %ecx
	callq	_hdmi_modb
	movq	_HDMI_HDCP_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	16(%r13), %rdi
	callq	_v_HDMI_DVI
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_hdmi_writeb
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_inno_hdmi_config_video_timing
	movq	%r13, %rdi
	callq	_inno_hdmi_config_video_csc
	cmpq	$0, 16(%r13)
	je	LBB0_6
## %bb.5:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_inno_hdmi_config_video_avi
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_inno_hdmi_config_video_vsi
LBB0_6:
	imull	$1000, (%r14), %eax             ## imm = 0x3E8
	movl	%eax, (%r13)
	movq	%r13, %rdi
	callq	_inno_hdmi_i2c_init
	movq	_HDMI_AV_MUTE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_m_VIDEO_BLACK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_m_AUDIO_MUTE@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	xorl	%edi, %edi
	callq	_v_AUDIO_MUTE
	movl	%eax, %ebx
	xorl	%edi, %edi
	callq	_v_VIDEO_MUTE
	orl	%eax, %ebx
	movq	%r13, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	movl	%ebx, %ecx
	callq	_hdmi_modb
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_HDMI_COLORIMETRY_ITU_709@GOTPCREL(%rip), %rax
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_HDMI_COLORSPACE_RGB,8,3        ## @HDMI_COLORSPACE_RGB
	.comm	_HDMI_COLORIMETRY_ITU_601,4,2   ## @HDMI_COLORIMETRY_ITU_601
	.comm	_HDMI_COLORIMETRY_ITU_709,4,2   ## @HDMI_COLORIMETRY_ITU_709
	.comm	_HDMI_AV_MUTE,4,2               ## @HDMI_AV_MUTE
	.comm	_m_AUDIO_MUTE,4,2               ## @m_AUDIO_MUTE
	.comm	_m_VIDEO_BLACK,4,2              ## @m_VIDEO_BLACK
	.comm	_HDMI_HDCP_CTRL,4,2             ## @HDMI_HDCP_CTRL
	.no_dead_strip	_inno_hdmi_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function inno_hdmi_setup
_inno_hdmi_setup:                       ; @inno_hdmi_setup
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x19, x0
	mov	x0, x1
	bl	_drm_match_cea_mode
	str	w0, [x19, #8]
Lloh0:
	adrp	x8, _HDMI_COLORSPACE_RGB@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HDMI_COLORSPACE_RGB@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stp	x8, x8, [x19, #32]
	cmp	w0, #22
	b.hi	LBB0_6
; %bb.1:
	mov	w8, #1
	lsl	w8, w8, w0
	mov	w9, #204
	movk	w9, #102, lsl #16
	tst	w8, w9
	b.eq	LBB0_6
; %bb.2:
Lloh3:
	adrp	x8, _HDMI_COLORIMETRY_ITU_601@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HDMI_COLORIMETRY_ITU_601@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	str	w8, [x19, #24]
Lloh5:
	adrp	x24, _HDMI_AV_MUTE@GOTPAGE
Lloh6:
	ldr	x24, [x24, _HDMI_AV_MUTE@GOTPAGEOFF]
Lloh7:
	adrp	x25, _m_AUDIO_MUTE@GOTPAGE
Lloh8:
	ldr	x25, [x25, _m_AUDIO_MUTE@GOTPAGEOFF]
	ldr	w21, [x24]
	ldr	w8, [x25]
Lloh9:
	adrp	x26, _m_VIDEO_BLACK@GOTPAGE
Lloh10:
	ldr	x26, [x26, _m_VIDEO_BLACK@GOTPAGEOFF]
	ldr	w9, [x26]
	orr	w22, w9, w8
	mov	w0, #1
	bl	_v_AUDIO_MUTE
	mov	x23, x0
	mov	w0, #1
	bl	_v_VIDEO_MUTE
	orr	w3, w0, w23
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_hdmi_modb
Lloh11:
	adrp	x8, _HDMI_HDCP_CTRL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HDMI_HDCP_CTRL@GOTPAGEOFF]
Lloh13:
	ldr	w21, [x8]
	ldr	x0, [x19, #16]
	bl	_v_HDMI_DVI
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_hdmi_writeb
	mov	x0, x19
	mov	x1, x20
	bl	_inno_hdmi_config_video_timing
	mov	x0, x19
	bl	_inno_hdmi_config_video_csc
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_5
; %bb.4:
	mov	x0, x19
	mov	x1, x20
	bl	_inno_hdmi_config_video_avi
	mov	x0, x19
	mov	x1, x20
	bl	_inno_hdmi_config_video_vsi
LBB0_5:
	ldr	w8, [x20]
	mov	w9, #1000
	mul	w8, w8, w9
	str	w8, [x19]
	mov	x0, x19
	bl	_inno_hdmi_i2c_init
	ldr	w20, [x24]
	ldr	w8, [x25]
	ldr	w9, [x26]
	orr	w21, w9, w8
	mov	w0, #0
	bl	_v_AUDIO_MUTE
	mov	x22, x0
	mov	w0, #0
	bl	_v_VIDEO_MUTE
	orr	w3, w0, w22
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_hdmi_modb
	mov	w0, #0
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_6:
Lloh14:
	adrp	x8, _HDMI_COLORIMETRY_ITU_709@GOTPAGE
Lloh15:
	ldr	x8, [x8, _HDMI_COLORIMETRY_ITU_709@GOTPAGEOFF]
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_HDMI_COLORSPACE_RGB,8,3        ; @HDMI_COLORSPACE_RGB
	.comm	_HDMI_COLORIMETRY_ITU_601,4,2   ; @HDMI_COLORIMETRY_ITU_601
	.comm	_HDMI_COLORIMETRY_ITU_709,4,2   ; @HDMI_COLORIMETRY_ITU_709
	.comm	_HDMI_AV_MUTE,4,2               ; @HDMI_AV_MUTE
	.comm	_m_AUDIO_MUTE,4,2               ; @m_AUDIO_MUTE
	.comm	_m_VIDEO_BLACK,4,2              ; @m_VIDEO_BLACK
	.comm	_HDMI_HDCP_CTRL,4,2             ; @HDMI_HDCP_CTRL
	.no_dead_strip	_inno_hdmi_setup
.subsections_via_symbols
