	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function hdmi_cec_received_msg
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_hdmi_cec_received_msg:                 ## @hdmi_cec_received_msg
	.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, %rbx
	movl	(%rdi), %edi
	movq	_HDMI_CEC_RX_COUNT@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	callq	_hdmi_read_reg
	testb	$112, %al
	je	LBB0_13
## %bb.1:
	movq	_HDMI_CEC_RX_OPERAND@GOTPCREL(%rip), %r13
	movq	_HDMI_CEC_RX_CONTROL@GOTPCREL(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rbx), %edi
	movl	(%r14), %esi
	callq	_hdmi_read_reg
	testb	$112, %al
	je	LBB0_13
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
                                        ##     Child Loop BB0_11 Depth 2
	testb	$-128, %al
	jne	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	andl	$15, %eax
	movq	_CEC_MAX_MSG_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	$-2, %ecx
	cmpl	%ecx, %eax
	cmovll	%eax, %ecx
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movl	%ecx, -64(%rbp)
	movl	(%rbx), %edi
	movq	_HDMI_CEC_RX_CMD_HEADER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_hdmi_read_reg
	movq	-56(%rbp), %rcx
	movl	%eax, (%rcx)
	movl	(%rbx), %edi
	movq	_HDMI_CEC_RX_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_hdmi_read_reg
	movq	-56(%rbp), %rcx
	movl	%eax, 4(%rcx)
	cmpl	$0, -64(%rbp)
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$2, %r15d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r13), %esi
	addl	%r14d, %esi
	movl	(%rbx), %edi
	callq	_hdmi_read_reg
	movq	-56(%rbp), %rcx
	movl	%r15d, %edx
	movl	%eax, (%rcx,%rdx,4)
	movl	-64(%rbp), %eax
	leaq	1(%r15), %rcx
	addl	$4, %r14d
	decq	%r15
	cmpq	%rax, %r15
	movq	%rcx, %r15
	jb	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_HDMI_CEC_RX_COUNT@GOTPCREL(%rip), %r14
	jmp	LBB0_8
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	addl	$2, %eax
	movl	%eax, -64(%rbp)
	movl	4(%rbx), %edi
	leaq	-64(%rbp), %rsi
	callq	_cec_received_msg
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rbx), %edi
	movl	(%r12), %esi
	movl	$1, %edx
	callq	_hdmi_write_reg
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rbx), %edi
	movl	(%r12), %esi
	callq	_hdmi_read_reg
	testb	$1, %al
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_11 Depth=2
	movl	$1, %edi
	callq	_udelay
	jmp	LBB0_11
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HDMI_CEC_RX_COUNT,4,2          ## @HDMI_CEC_RX_COUNT
	.comm	_CEC_MAX_MSG_SIZE,4,2           ## @CEC_MAX_MSG_SIZE
	.comm	_HDMI_CEC_RX_CMD_HEADER,4,2     ## @HDMI_CEC_RX_CMD_HEADER
	.comm	_HDMI_CEC_RX_COMMAND,4,2        ## @HDMI_CEC_RX_COMMAND
	.comm	_HDMI_CEC_RX_OPERAND,4,2        ## @HDMI_CEC_RX_OPERAND
	.comm	_HDMI_CEC_RX_CONTROL,4,2        ## @HDMI_CEC_RX_CONTROL
	.no_dead_strip	_hdmi_cec_received_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hdmi_cec_received_msg
_hdmi_cec_received_msg:                 ; @hdmi_cec_received_msg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x20, _HDMI_CEC_RX_COUNT@GOTPAGE
Lloh1:
	ldr	x20, [x20, _HDMI_CEC_RX_COUNT@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	_hdmi_read_reg
	tst	w0, #0x70
	b.eq	LBB0_11
; %bb.1:
Lloh2:
	adrp	x21, _CEC_MAX_MSG_SIZE@GOTPAGE
Lloh3:
	ldr	x21, [x21, _CEC_MAX_MSG_SIZE@GOTPAGEOFF]
Lloh4:
	adrp	x22, _HDMI_CEC_RX_CMD_HEADER@GOTPAGE
Lloh5:
	ldr	x22, [x22, _HDMI_CEC_RX_CMD_HEADER@GOTPAGEOFF]
Lloh6:
	adrp	x23, _HDMI_CEC_RX_COMMAND@GOTPAGE
Lloh7:
	ldr	x23, [x23, _HDMI_CEC_RX_COMMAND@GOTPAGEOFF]
Lloh8:
	adrp	x24, _HDMI_CEC_RX_OPERAND@GOTPAGE
Lloh9:
	ldr	x24, [x24, _HDMI_CEC_RX_OPERAND@GOTPAGEOFF]
Lloh10:
	adrp	x25, _HDMI_CEC_RX_CONTROL@GOTPAGE
Lloh11:
	ldr	x25, [x25, _HDMI_CEC_RX_CONTROL@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x19]
	ldr	w1, [x20]
	bl	_hdmi_read_reg
	tst	w0, #0x70
	b.eq	LBB0_11
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
                                        ;     Child Loop BB0_9 Depth 2
	tbnz	w0, #7, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	stp	xzr, xzr, [sp]
	and	w8, w0, #0xf
	ldr	w9, [x21]
	sub	w9, w9, #2
	cmp	w8, w9
	csel	w8, w8, w9, lt
	str	w8, [sp]
	ldr	w0, [x19]
	ldr	w1, [x22]
	bl	_hdmi_read_reg
	ldr	x8, [sp, #8]
	str	w0, [x8]
	ldr	w0, [x19]
	ldr	w1, [x23]
	bl	_hdmi_read_reg
	ldr	x8, [sp, #8]
	str	w0, [x8, #4]
	ldr	w8, [sp]
	cbz	w8, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w26, #0
	mov	w27, #2
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w8, [x24]
	add	w1, w26, w8
	ldr	w0, [x19]
	bl	_hdmi_read_reg
	ldr	x8, [sp, #8]
	str	w0, [x8, w27, uxtw #2]
	ldr	w8, [sp]
	sub	x9, x27, #1
	add	x27, x27, #1
	add	w26, w26, #4
	cmp	x9, x8
	b.lo	LBB0_6
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w8, w8, #2
	str	w8, [sp]
	ldr	w0, [x19, #4]
	mov	x1, sp
	bl	_cec_received_msg
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x19]
	ldr	w1, [x25]
	mov	w2, #1
	bl	_hdmi_write_reg
LBB0_9:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x19]
	ldr	w1, [x25]
	bl	_hdmi_read_reg
	tbz	w0, #0, LBB0_2
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	mov	w0, #1
	bl	_udelay
	b	LBB0_9
LBB0_11:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_HDMI_CEC_RX_COUNT,4,2          ; @HDMI_CEC_RX_COUNT
	.comm	_CEC_MAX_MSG_SIZE,4,2           ; @CEC_MAX_MSG_SIZE
	.comm	_HDMI_CEC_RX_CMD_HEADER,4,2     ; @HDMI_CEC_RX_CMD_HEADER
	.comm	_HDMI_CEC_RX_COMMAND,4,2        ; @HDMI_CEC_RX_COMMAND
	.comm	_HDMI_CEC_RX_OPERAND,4,2        ; @HDMI_CEC_RX_OPERAND
	.comm	_HDMI_CEC_RX_CONTROL,4,2        ; @HDMI_CEC_RX_CONTROL
	.no_dead_strip	_hdmi_cec_received_msg
.subsections_via_symbols
