	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function meson_ao_cec_irq_rx
_meson_ao_cec_irq_rx:                   ## @meson_ao_cec_irq_rx
	.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, %r12
	movl	$0, -44(%rbp)
	movq	_CEC_RX_MSG_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	-48(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	callq	_meson_ao_cec_read
	movl	-48(%rbp), %eax
	movq	_RX_DONE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_7
## %bb.1:
	movq	_CEC_RX_NUM_MSG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	-48(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	movq	%r12, %rdi
	callq	_meson_ao_cec_read
	cmpl	$1, -48(%rbp)
	jne	LBB0_7
## %bb.2:
	movq	_CEC_RX_MSG_LENGTH@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	-48(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	movq	%r12, %rdi
	callq	_meson_ao_cec_read
	movl	-48(%rbp), %eax
	leal	1(%rax), %ecx
	movq	_CEC_MAX_MSG_SIZE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	cmpl	%edx, %eax
	cmovgel	%edx, %ecx
	movl	%ecx, 8(%r12)
	testl	%ecx, %ecx
	jle	LBB0_5
## %bb.3:
	xorl	%ebx, %ebx
	movq	_CEC_RX_MSG_0_HEADER@GOTPCREL(%rip), %r13
	leaq	-52(%rbp), %r14
	leaq	-44(%rbp), %r15
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rsi
	addq	%rbx, %rsi
	movq	%r12, %rdi
	movq	%r14, %rdx
	movq	%r15, %rcx
	callq	_meson_ao_cec_read
	movl	-52(%rbp), %eax
	movq	16(%r12), %rcx
	movl	%eax, (%rcx,%rbx,4)
	incq	%rbx
	movslq	8(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_4
LBB0_5:
	cmpl	$0, -44(%rbp)
	jne	LBB0_7
## %bb.6:
	leaq	8(%r12), %rsi
	movl	24(%r12), %edi
	callq	_cec_received_msg
LBB0_7:
	movq	_CEC_INTR_RX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CEC_INTR_CLR_REG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r12), %rsi
	callq	_writel_relaxed
	movq	_CEC_RX_MSG_CMD@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_RX_ACK_CURRENT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %r14
	movq	%r12, %rdi
	movq	%r14, %rcx
	callq	_meson_ao_cec_write
	movl	(%rbx), %esi
	movq	_RX_NO_OP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%r14, %rcx
	callq	_meson_ao_cec_write
	movq	_CEC_RX_CLEAR_BUF@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_CLEAR_START@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%r14, %rcx
	callq	_meson_ao_cec_write
	movl	(%rbx), %esi
	movq	_CLEAR_STOP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%r14, %rcx
	callq	_meson_ao_cec_write
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CEC_RX_MSG_STATUS,8,3          ## @CEC_RX_MSG_STATUS
	.comm	_RX_DONE,4,2                    ## @RX_DONE
	.comm	_CEC_RX_NUM_MSG,8,3             ## @CEC_RX_NUM_MSG
	.comm	_CEC_RX_MSG_LENGTH,8,3          ## @CEC_RX_MSG_LENGTH
	.comm	_CEC_MAX_MSG_SIZE,4,2           ## @CEC_MAX_MSG_SIZE
	.comm	_CEC_RX_MSG_0_HEADER,8,3        ## @CEC_RX_MSG_0_HEADER
	.comm	_CEC_INTR_RX,4,2                ## @CEC_INTR_RX
	.comm	_CEC_INTR_CLR_REG,8,3           ## @CEC_INTR_CLR_REG
	.comm	_CEC_RX_MSG_CMD,4,2             ## @CEC_RX_MSG_CMD
	.comm	_RX_ACK_CURRENT,4,2             ## @RX_ACK_CURRENT
	.comm	_RX_NO_OP,4,2                   ## @RX_NO_OP
	.comm	_CEC_RX_CLEAR_BUF,4,2           ## @CEC_RX_CLEAR_BUF
	.comm	_CLEAR_START,4,2                ## @CLEAR_START
	.comm	_CLEAR_STOP,4,2                 ## @CLEAR_STOP
	.no_dead_strip	_meson_ao_cec_irq_rx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function meson_ao_cec_irq_rx
_meson_ao_cec_irq_rx:                   ; @meson_ao_cec_irq_rx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	str	wzr, [sp, #12]
Lloh0:
	adrp	x8, _CEC_RX_MSG_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CEC_RX_MSG_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	x1, [x8]
	add	x2, sp, #8
	add	x3, sp, #12
	bl	_meson_ao_cec_read
	ldr	w8, [sp, #8]
Lloh3:
	adrp	x9, _RX_DONE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _RX_DONE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_7
; %bb.1:
Lloh6:
	adrp	x8, _CEC_RX_NUM_MSG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CEC_RX_NUM_MSG@GOTPAGEOFF]
Lloh8:
	ldr	x1, [x8]
	add	x2, sp, #8
	add	x3, sp, #12
	mov	x0, x19
	bl	_meson_ao_cec_read
	ldr	w8, [sp, #8]
	cmp	w8, #1
	b.ne	LBB0_7
; %bb.2:
Lloh9:
	adrp	x8, _CEC_RX_MSG_LENGTH@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CEC_RX_MSG_LENGTH@GOTPAGEOFF]
Lloh11:
	ldr	x1, [x8]
	add	x2, sp, #8
	add	x3, sp, #12
	mov	x0, x19
	bl	_meson_ao_cec_read
	ldr	w8, [sp, #8]
Lloh12:
	adrp	x9, _CEC_MAX_MSG_SIZE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _CEC_MAX_MSG_SIZE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	cmp	w8, w9
	csinc	w8, w9, w8, ge
	mov	x20, x19
	str	w8, [x20, #8]!
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.3:
	mov	x21, #0
Lloh15:
	adrp	x22, _CEC_RX_MSG_0_HEADER@GOTPAGE
Lloh16:
	ldr	x22, [x22, _CEC_RX_MSG_0_HEADER@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	add	x1, x21, x8
	add	x2, sp, #4
	add	x3, sp, #12
	mov	x0, x19
	bl	_meson_ao_cec_read
	ldr	w8, [sp, #4]
	ldr	x9, [x19, #16]
	str	w8, [x9, x21, lsl #2]
	add	x21, x21, #1
	ldrsw	x8, [x19, #8]
	cmp	x21, x8
	b.lt	LBB0_4
LBB0_5:
	ldr	w8, [sp, #12]
	cbnz	w8, LBB0_7
; %bb.6:
	ldr	w0, [x19, #24]
	mov	x1, x20
	bl	_cec_received_msg
LBB0_7:
Lloh17:
	adrp	x8, _CEC_INTR_RX@GOTPAGE
Lloh18:
	ldr	x8, [x8, _CEC_INTR_RX@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	ldr	x8, [x19]
Lloh20:
	adrp	x9, _CEC_INTR_CLR_REG@GOTPAGE
Lloh21:
	ldr	x9, [x9, _CEC_INTR_CLR_REG@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel_relaxed
Lloh23:
	adrp	x20, _CEC_RX_MSG_CMD@GOTPAGE
Lloh24:
	ldr	x20, [x20, _CEC_RX_MSG_CMD@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh25:
	adrp	x8, _RX_ACK_CURRENT@GOTPAGE
Lloh26:
	ldr	x8, [x8, _RX_ACK_CURRENT@GOTPAGEOFF]
Lloh27:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x19
	bl	_meson_ao_cec_write
	ldr	w1, [x20]
Lloh28:
	adrp	x8, _RX_NO_OP@GOTPAGE
Lloh29:
	ldr	x8, [x8, _RX_NO_OP@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x19
	bl	_meson_ao_cec_write
Lloh31:
	adrp	x20, _CEC_RX_CLEAR_BUF@GOTPAGE
Lloh32:
	ldr	x20, [x20, _CEC_RX_CLEAR_BUF@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh33:
	adrp	x8, _CLEAR_START@GOTPAGE
Lloh34:
	ldr	x8, [x8, _CLEAR_START@GOTPAGEOFF]
Lloh35:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x19
	bl	_meson_ao_cec_write
	ldr	w1, [x20]
Lloh36:
	adrp	x8, _CLEAR_STOP@GOTPAGE
Lloh37:
	ldr	x8, [x8, _CLEAR_STOP@GOTPAGEOFF]
Lloh38:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x19
	bl	_meson_ao_cec_write
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_CEC_RX_MSG_STATUS,8,3          ; @CEC_RX_MSG_STATUS
	.comm	_RX_DONE,4,2                    ; @RX_DONE
	.comm	_CEC_RX_NUM_MSG,8,3             ; @CEC_RX_NUM_MSG
	.comm	_CEC_RX_MSG_LENGTH,8,3          ; @CEC_RX_MSG_LENGTH
	.comm	_CEC_MAX_MSG_SIZE,4,2           ; @CEC_MAX_MSG_SIZE
	.comm	_CEC_RX_MSG_0_HEADER,8,3        ; @CEC_RX_MSG_0_HEADER
	.comm	_CEC_INTR_RX,4,2                ; @CEC_INTR_RX
	.comm	_CEC_INTR_CLR_REG,8,3           ; @CEC_INTR_CLR_REG
	.comm	_CEC_RX_MSG_CMD,4,2             ; @CEC_RX_MSG_CMD
	.comm	_RX_ACK_CURRENT,4,2             ; @RX_ACK_CURRENT
	.comm	_RX_NO_OP,4,2                   ; @RX_NO_OP
	.comm	_CEC_RX_CLEAR_BUF,4,2           ; @CEC_RX_CLEAR_BUF
	.comm	_CLEAR_START,4,2                ; @CLEAR_START
	.comm	_CLEAR_STOP,4,2                 ; @CLEAR_STOP
	.no_dead_strip	_meson_ao_cec_irq_rx
.subsections_via_symbols
