	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rk3066_hdmi_upload_frame
_rk3066_hdmi_upload_frame:              ## @rk3066_hdmi_upload_frame
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %rbx
	movq	%rcx, %r14
	movq	%rdx, %r12
	movl	%esi, %r15d
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	testq	%r8, %r8
	je	LBB0_2
## %bb.1:
	movq	_HDMI_CP_AUTO_SEND_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movq	%rbx, %rdx
	movq	%r9, %rcx
	callq	_hdmi_modb
LBB0_2:
	movq	_HDMI_CP_BUF_INDEX@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r13, %rdi
	movq	%r14, %rdx
	callq	_hdmi_writeb
	testl	%r15d, %r15d
	js	LBB0_11
## %bb.3:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsp, -72(%rbp)                 ## 8-byte Spill
	movq	_HDMI_MAXIMUM_INFO_FRAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	shlq	$3, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	leal	(,%rbx,8), %edx
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_hdmi_infoframe_pack
	movq	%rax, %r12
	testq	%rax, %rax
	js	LBB0_13
## %bb.4:
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	je	LBB0_7
## %bb.5:
	xorl	%ebx, %ebx
	movq	_HDMI_CP_BUF_ACC_HB0@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rsi
	addq	%rbx, %rsi
	movq	(%r14,%rbx,2), %rdx
	movq	%r13, %rdi
	callq	_hdmi_writeb
	addq	$4, %rbx
	decq	%r12
	jne	LBB0_6
LBB0_7:
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	testq	%rdx, %rdx
	je	LBB0_9
## %bb.8:
	movq	16(%rbp), %rcx
	movq	_HDMI_CP_AUTO_SEND_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_hdmi_modb
LBB0_9:
	movl	-52(%rbp), %r15d                ## 4-byte Reload
	jmp	LBB0_10
LBB0_13:
	movl	%r12d, %r15d
LBB0_10:
	movq	-72(%rbp), %rsp                 ## 8-byte Reload
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.12:
	movl	%r15d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_HDMI_CP_AUTO_SEND_CTRL,4,2     ## @HDMI_CP_AUTO_SEND_CTRL
	.comm	_HDMI_CP_BUF_INDEX,8,3          ## @HDMI_CP_BUF_INDEX
	.comm	_HDMI_MAXIMUM_INFO_FRAME_SIZE,4,2 ## @HDMI_MAXIMUM_INFO_FRAME_SIZE
	.comm	_HDMI_CP_BUF_ACC_HB0,8,3        ## @HDMI_CP_BUF_ACC_HB0
	.no_dead_strip	_rk3066_hdmi_upload_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rk3066_hdmi_upload_frame
_rk3066_hdmi_upload_frame:              ; @rk3066_hdmi_upload_frame
	.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
	sub	sp, sp, #16
	mov	x20, x6
	mov	x21, x4
	mov	x23, x3
	mov	x24, x2
	mov	x19, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	cbz	x4, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _HDMI_CP_AUTO_SEND_CTRL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HDMI_CP_AUTO_SEND_CTRL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x22
	mov	x2, x21
	mov	x3, x5
	bl	_hdmi_modb
LBB0_2:
Lloh6:
	adrp	x8, _HDMI_CP_BUF_INDEX@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HDMI_CP_BUF_INDEX@GOTPAGEOFF]
Lloh8:
	ldr	x1, [x8]
	mov	x0, x22
	mov	x2, x23
	bl	_hdmi_writeb
	tbnz	w19, #31, LBB0_11
; %bb.3:
	mov	x25, sp
Lloh9:
	adrp	x8, _HDMI_MAXIMUM_INFO_FRAME_SIZE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HDMI_MAXIMUM_INFO_FRAME_SIZE@GOTPAGEOFF]
Lloh11:
	ldr	w12, [x8]
	lsl	x8, x12, #3
	mov	x9, x8
Lloh12:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh13:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x23, x9, x8
	mov	sp, x23
	lsl	w2, w12, #3
	mov	x0, x24
	mov	x1, x23
	bl	_hdmi_infoframe_pack
	mov	x24, x0
	tbnz	x0, #63, LBB0_9
; %bb.4:
	cbz	x24, LBB0_7
; %bb.5:
	mov	x26, #0
Lloh14:
	adrp	x27, _HDMI_CP_BUF_ACC_HB0@GOTPAGE
Lloh15:
	ldr	x27, [x27, _HDMI_CP_BUF_ACC_HB0@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x27]
	add	x1, x26, x8
	ldr	x2, [x23], #8
	mov	x0, x22
	bl	_hdmi_writeb
	add	x26, x26, #4
	subs	x24, x24, #1
	b.ne	LBB0_6
LBB0_7:
	cbz	x21, LBB0_10
; %bb.8:
Lloh16:
	adrp	x8, _HDMI_CP_AUTO_SEND_CTRL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _HDMI_CP_AUTO_SEND_CTRL@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x22
	mov	x2, x21
	mov	x3, x20
	bl	_hdmi_modb
	b	LBB0_10
LBB0_9:
	mov	x19, x24
LBB0_10:
	mov	sp, x25
LBB0_11:
	ldur	x8, [x29, #-88]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.12:
	mov	x0, x19
	sub	sp, x29, #80
	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
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_HDMI_CP_AUTO_SEND_CTRL,4,2     ; @HDMI_CP_AUTO_SEND_CTRL
	.comm	_HDMI_CP_BUF_INDEX,8,3          ; @HDMI_CP_BUF_INDEX
	.comm	_HDMI_MAXIMUM_INFO_FRAME_SIZE,4,2 ; @HDMI_MAXIMUM_INFO_FRAME_SIZE
	.comm	_HDMI_CP_BUF_ACC_HB0,8,3        ; @HDMI_CP_BUF_ACC_HB0
	.no_dead_strip	_rk3066_hdmi_upload_frame
.subsections_via_symbols
