	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rk3066_hdmi_config_avi
_rk3066_hdmi_config_avi:                ## @rk3066_hdmi_config_avi
	.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	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rdx
	movq	%rdi, %rbx
	leaq	16(%rdi), %rsi
	leaq	-32(%rbp), %r14
	movq	%r14, %rdi
	callq	_drm_hdmi_avi_infoframe_from_display_mode
	movq	(%rbx), %rcx
	movq	_HDMI_COLORSPACE_YUV444@GOTPCREL(%rip), %rdx
	movq	_HDMI_COLORSPACE_YUV422@GOTPCREL(%rip), %rdi
	movq	%rcx, %rsi
	cmpq	(%rdi), %rcx
	je	LBB0_2
## %bb.1:
	movq	_HDMI_COLORSPACE_RGB@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
LBB0_2:
	cmpq	(%rdx), %rcx
	cmoveq	%rcx, %rsi
	movq	%rsi, -24(%rbp)
	movl	8(%rbx), %ecx
	movl	%ecx, -28(%rbp)
	movq	_HDMI_SCAN_MODE_NONE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -32(%rbp)
	movq	_HDMI_INFOFRAME_AVI@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	$0, (%rsp)
	movq	%rbx, %rdi
	movl	%eax, %esi
	movq	%r14, %rdx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_rk3066_hdmi_upload_frame
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HDMI_COLORSPACE_YUV444,8,3     ## @HDMI_COLORSPACE_YUV444
	.comm	_HDMI_COLORSPACE_YUV422,8,3     ## @HDMI_COLORSPACE_YUV422
	.comm	_HDMI_COLORSPACE_RGB,8,3        ## @HDMI_COLORSPACE_RGB
	.comm	_HDMI_SCAN_MODE_NONE,4,2        ## @HDMI_SCAN_MODE_NONE
	.comm	_HDMI_INFOFRAME_AVI,4,2         ## @HDMI_INFOFRAME_AVI
	.no_dead_strip	_rk3066_hdmi_config_avi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rk3066_hdmi_config_avi
_rk3066_hdmi_config_avi:                ; @rk3066_hdmi_config_avi
	.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	x2, x1
	mov	x19, x0
	add	x1, x0, #16
	mov	x0, sp
	bl	_drm_hdmi_avi_infoframe_from_display_mode
	mov	x1, x0
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _HDMI_COLORSPACE_YUV444@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HDMI_COLORSPACE_YUV444@GOTPAGEOFF]
Lloh2:
	adrp	x10, _HDMI_COLORSPACE_YUV422@GOTPAGE
Lloh3:
	ldr	x10, [x10, _HDMI_COLORSPACE_YUV422@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x10
	ccmp	x8, x9, #4, ne
Lloh6:
	adrp	x9, _HDMI_COLORSPACE_RGB@GOTPAGE
Lloh7:
	ldr	x9, [x9, _HDMI_COLORSPACE_RGB@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	csel	x8, x8, x9, eq
	str	x8, [sp, #8]
	ldr	w8, [x19, #8]
Lloh9:
	adrp	x9, _HDMI_SCAN_MODE_NONE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _HDMI_SCAN_MODE_NONE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	stp	w9, w8, [sp]
Lloh12:
	adrp	x8, _HDMI_INFOFRAME_AVI@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HDMI_INFOFRAME_AVI@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
	mov	x2, sp
	mov	x0, x19
	mov	w4, #0
	mov	w5, #0
	mov	w6, #0
	bl	_rk3066_hdmi_upload_frame
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_HDMI_COLORSPACE_YUV444,8,3     ; @HDMI_COLORSPACE_YUV444
	.comm	_HDMI_COLORSPACE_YUV422,8,3     ; @HDMI_COLORSPACE_YUV422
	.comm	_HDMI_COLORSPACE_RGB,8,3        ; @HDMI_COLORSPACE_RGB
	.comm	_HDMI_SCAN_MODE_NONE,4,2        ; @HDMI_SCAN_MODE_NONE
	.comm	_HDMI_INFOFRAME_AVI,4,2         ; @HDMI_INFOFRAME_AVI
	.no_dead_strip	_rk3066_hdmi_config_avi
.subsections_via_symbols
