	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function meson_ao_cec_g12a_transmit
_meson_ao_cec_g12a_transmit:            ## @meson_ao_cec_g12a_transmit
	.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	%rcx, %r15
	movl	%edx, %r14d
	movq	(%rdi), %r12
	movl	(%r12), %edi
	movq	_CECB_LOCK_BUF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	jne	LBB0_19
## %bb.1:
	movq	_CECB_LOCK_BUF_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -44(%rbp)
	je	LBB0_4
LBB0_2:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_19
LBB0_4:
	movl	(%r12), %edi
	movq	_CECB_CTRL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-44(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	je	LBB0_5
LBB0_19:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_CECB_CTRL_SEND@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	testl	%eax, -44(%rbp)
	jne	LBB0_2
## %bb.6:
	cmpl	$129, %r14d
	jne	LBB0_7
## %bb.8:
	movq	_CECB_CTRL_TYPE_NEXT@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_CECB_CTRL_TYPE_NEW@GOTPCREL(%rip), %rax
LBB0_9:
	cmpl	$128, %r14d
	jne	LBB0_11
## %bb.10:
	movq	_CECB_CTRL_TYPE_RETRY@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	(%r15), %edx
	testl	%edx, %edx
	jle	LBB0_12
## %bb.13:
	xorl	%ebx, %ebx
	movq	_CECB_TX_DATA00@GOTPCREL(%rip), %r13
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	movq	(%r13), %rsi
	addq	%rbx, %rsi
	movq	8(%r15), %rax
	movl	(%rax,%rbx,4), %edx
	callq	_regmap_write
	orl	%eax, %r14d
	incq	%rbx
	movslq	(%r15), %rdx
	cmpq	%rdx, %rbx
	jl	LBB0_14
## %bb.15:
	movq	_CECB_CTRL@GOTPCREL(%rip), %rbx
	movq	_CECB_CTRL_SEND@GOTPCREL(%rip), %r13
	jmp	LBB0_16
LBB0_12:
	xorl	%r14d, %r14d
LBB0_16:
	movl	(%r12), %edi
	movq	_CECB_TX_CNT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_regmap_write
	orl	%r14d, %eax
	je	LBB0_18
## %bb.17:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_18:
	movl	(%r12), %r14d
	movl	(%rbx), %r15d
	movl	(%r13), %ebx
	movq	_CECB_CTRL_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, %r13d
	orl	%ebx, %r13d
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_FIELD_PREP
	orl	%eax, %ebx
	movl	%r14d, %edi
	movl	%r15d, %esi
	movl	%r13d, %edx
	movl	%ebx, %ecx
	callq	_regmap_update_bits
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_CECB_LOCK_BUF,4,2              ## @CECB_LOCK_BUF
	.comm	_CECB_LOCK_BUF_EN,4,2           ## @CECB_LOCK_BUF_EN
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_CECB_CTRL,4,2                  ## @CECB_CTRL
	.comm	_CECB_CTRL_SEND,4,2             ## @CECB_CTRL_SEND
	.comm	_CECB_CTRL_TYPE_RETRY,4,2       ## @CECB_CTRL_TYPE_RETRY
	.comm	_CECB_CTRL_TYPE_NEXT,4,2        ## @CECB_CTRL_TYPE_NEXT
	.comm	_CECB_CTRL_TYPE_NEW,4,2         ## @CECB_CTRL_TYPE_NEW
	.comm	_CECB_TX_DATA00,8,3             ## @CECB_TX_DATA00
	.comm	_CECB_TX_CNT,8,3                ## @CECB_TX_CNT
	.comm	_EIO,4,2                        ## @EIO
	.comm	_CECB_CTRL_TYPE,4,2             ## @CECB_CTRL_TYPE
	.no_dead_strip	_meson_ao_cec_g12a_transmit
.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_g12a_transmit
_meson_ao_cec_g12a_transmit:            ; @meson_ao_cec_g12a_transmit
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x19, x3
	mov	x20, x2
	ldr	x21, [x0]
	ldr	w0, [x21]
Lloh0:
	adrp	x8, _CECB_LOCK_BUF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CECB_LOCK_BUF@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
	cbnz	w0, LBB0_5
; %bb.1:
	ldr	w8, [sp, #12]
Lloh3:
	adrp	x9, _CECB_LOCK_BUF_EN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CECB_LOCK_BUF_EN@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
LBB0_2:
Lloh6:
	adrp	x8, _EBUSY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_4:
	ldr	w0, [x21]
Lloh8:
	adrp	x22, _CECB_CTRL@GOTPAGE
Lloh9:
	ldr	x22, [x22, _CECB_CTRL@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #12
	bl	_regmap_read
	cbz	w0, LBB0_6
LBB0_5:
	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
	add	sp, sp, #96
	ret
LBB0_6:
	ldr	w8, [sp, #12]
Lloh10:
	adrp	x23, _CECB_CTRL_SEND@GOTPAGE
Lloh11:
	ldr	x23, [x23, _CECB_CTRL_SEND@GOTPAGEOFF]
	ldr	w9, [x23]
	tst	w9, w8
	b.ne	LBB0_2
; %bb.7:
Lloh12:
	adrp	x8, _CECB_CTRL_TYPE_RETRY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CECB_CTRL_TYPE_RETRY@GOTPAGEOFF]
Lloh14:
	adrp	x9, _CECB_CTRL_TYPE_NEXT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _CECB_CTRL_TYPE_NEXT@GOTPAGEOFF]
Lloh16:
	adrp	x10, _CECB_CTRL_TYPE_NEW@GOTPAGE
Lloh17:
	ldr	x10, [x10, _CECB_CTRL_TYPE_NEW@GOTPAGEOFF]
	cmp	w20, #129
	csel	x9, x9, x10, eq
	cmp	w20, #128
	csel	x8, x8, x9, eq
	ldr	w20, [x8]
	ldr	w2, [x19]
	cmp	w2, #1
	b.lt	LBB0_10
; %bb.8:
	mov	x25, #0
	mov	w24, #0
Lloh18:
	adrp	x26, _CECB_TX_DATA00@GOTPAGE
Lloh19:
	ldr	x26, [x26, _CECB_TX_DATA00@GOTPAGEOFF]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	ldr	x8, [x26]
	add	x1, x25, x8
	ldr	x8, [x19, #8]
	ldr	w2, [x8, x25, lsl #2]
	bl	_regmap_write
	orr	w24, w0, w24
	add	x25, x25, #1
	ldrsw	x2, [x19]
	cmp	x25, x2
	b.lt	LBB0_9
	b	LBB0_11
LBB0_10:
	mov	w24, #0
LBB0_11:
	ldr	w0, [x21]
Lloh20:
	adrp	x8, _CECB_TX_CNT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CECB_TX_CNT@GOTPAGEOFF]
Lloh22:
	ldr	x1, [x8]
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_regmap_write
	orr	w8, w0, w24
	cbz	w8, LBB0_13
; %bb.12:
Lloh23:
	adrp	x8, _EIO@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_3
LBB0_13:
	ldr	w19, [x21]
	ldr	w21, [x22]
	ldr	w23, [x23]
Lloh25:
	adrp	x8, _CECB_CTRL_TYPE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _CECB_CTRL_TYPE@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	orr	w22, w0, w23
	mov	x1, x20
	bl	_FIELD_PREP
	orr	w3, w0, w23
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_regmap_update_bits
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_CECB_LOCK_BUF,4,2              ; @CECB_LOCK_BUF
	.comm	_CECB_LOCK_BUF_EN,4,2           ; @CECB_LOCK_BUF_EN
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_CECB_CTRL,4,2                  ; @CECB_CTRL
	.comm	_CECB_CTRL_SEND,4,2             ; @CECB_CTRL_SEND
	.comm	_CECB_CTRL_TYPE_RETRY,4,2       ; @CECB_CTRL_TYPE_RETRY
	.comm	_CECB_CTRL_TYPE_NEXT,4,2        ; @CECB_CTRL_TYPE_NEXT
	.comm	_CECB_CTRL_TYPE_NEW,4,2         ; @CECB_CTRL_TYPE_NEW
	.comm	_CECB_TX_DATA00,8,3             ; @CECB_TX_DATA00
	.comm	_CECB_TX_CNT,8,3                ; @CECB_TX_CNT
	.comm	_EIO,4,2                        ; @EIO
	.comm	_CECB_CTRL_TYPE,4,2             ; @CECB_CTRL_TYPE
	.no_dead_strip	_meson_ao_cec_g12a_transmit
.subsections_via_symbols
