	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function meson_ao_cec_adap_enable
_meson_ao_cec_adap_enable:              ## @meson_ao_cec_adap_enable
	.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
	movl	%esi, %r15d
	movq	(%rdi), %r14
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_meson_ao_cec_irq_setup
	movq	_CEC_GEN_CNTL_RESET@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	_CEC_GEN_CNTL_REG@GOTPCREL(%rip), %r13
	movq	(%r13), %rdx
	addq	(%r14), %rdx
	movl	%edi, %esi
	callq	_writel_bits_relaxed
	testl	%r15d, %r15d
	je	LBB0_6
## %bb.1:
	movq	_CEC_GEN_CNTL_CLK_CTRL_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_CEC_GEN_CNTL_CLK_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_FIELD_PREP
	movq	(%r13), %rdx
	addq	(%r14), %rdx
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_writel_bits_relaxed
	movl	$100, %edi
	callq	_udelay
	movl	(%r12), %edi
	movq	(%r13), %rdx
	addq	(%r14), %rdx
	xorl	%esi, %esi
	callq	_writel_bits_relaxed
	movq	%r14, %rdi
	callq	_meson_ao_cec_clear
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.2:
	movq	_CEC_SIGNAL_FREE_TIME_RETRY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$280, %edx                      ## imm = 0x118
	callq	_meson_ao_cec_arbit_bit_time_set
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movq	_CEC_SIGNAL_FREE_TIME_NEW_INITIATOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_meson_ao_cec_arbit_bit_time_set
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	movq	_CEC_SIGNAL_FREE_TIME_NEXT_XFER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$682, %edx                      ## imm = 0x2AA
	callq	_meson_ao_cec_arbit_bit_time_set
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_meson_ao_cec_irq_setup
	xorl	%ebx, %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CEC_GEN_CNTL_RESET,4,2         ## @CEC_GEN_CNTL_RESET
	.comm	_CEC_GEN_CNTL_REG,8,3           ## @CEC_GEN_CNTL_REG
	.comm	_CEC_GEN_CNTL_CLK_CTRL_MASK,4,2 ## @CEC_GEN_CNTL_CLK_CTRL_MASK
	.comm	_CEC_GEN_CNTL_CLK_ENABLE,4,2    ## @CEC_GEN_CNTL_CLK_ENABLE
	.comm	_CEC_SIGNAL_FREE_TIME_RETRY,4,2 ## @CEC_SIGNAL_FREE_TIME_RETRY
	.comm	_CEC_SIGNAL_FREE_TIME_NEW_INITIATOR,4,2 ## @CEC_SIGNAL_FREE_TIME_NEW_INITIATOR
	.comm	_CEC_SIGNAL_FREE_TIME_NEXT_XFER,4,2 ## @CEC_SIGNAL_FREE_TIME_NEXT_XFER
	.no_dead_strip	_meson_ao_cec_adap_enable
.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_adap_enable
_meson_ao_cec_adap_enable:              ; @meson_ao_cec_adap_enable
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x1
	ldr	x19, [x0]
	mov	x0, x19
	mov	w1, #0
	bl	_meson_ao_cec_irq_setup
Lloh0:
	adrp	x21, _CEC_GEN_CNTL_RESET@GOTPAGE
Lloh1:
	ldr	x21, [x21, _CEC_GEN_CNTL_RESET@GOTPAGEOFF]
	ldr	w0, [x21]
	ldr	x8, [x19]
Lloh2:
	adrp	x22, _CEC_GEN_CNTL_REG@GOTPAGE
Lloh3:
	ldr	x22, [x22, _CEC_GEN_CNTL_REG@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x2, x9, x8
	mov	x1, x0
	bl	_writel_bits_relaxed
	cbz	w20, LBB0_6
; %bb.1:
Lloh4:
	adrp	x8, _CEC_GEN_CNTL_CLK_CTRL_MASK@GOTPAGE
Lloh5:
	ldr	x8, [x8, _CEC_GEN_CNTL_CLK_CTRL_MASK@GOTPAGEOFF]
Lloh6:
	ldr	w20, [x8]
Lloh7:
	adrp	x8, _CEC_GEN_CNTL_CLK_ENABLE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _CEC_GEN_CNTL_CLK_ENABLE@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_FIELD_PREP
	mov	x1, x0
	ldr	x8, [x19]
	ldr	x9, [x22]
	add	x2, x9, x8
	mov	x0, x20
	bl	_writel_bits_relaxed
	mov	w0, #100
	bl	_udelay
	ldr	w0, [x21]
	ldr	x8, [x19]
	ldr	x9, [x22]
	add	x2, x9, x8
	mov	w1, #0
	bl	_writel_bits_relaxed
	mov	x0, x19
	bl	_meson_ao_cec_clear
	cbnz	w0, LBB0_7
; %bb.2:
Lloh10:
	adrp	x8, _CEC_SIGNAL_FREE_TIME_RETRY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CEC_SIGNAL_FREE_TIME_RETRY@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #280
	bl	_meson_ao_cec_arbit_bit_time_set
	cbnz	w0, LBB0_7
; %bb.3:
Lloh13:
	adrp	x8, _CEC_SIGNAL_FREE_TIME_NEW_INITIATOR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CEC_SIGNAL_FREE_TIME_NEW_INITIATOR@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_meson_ao_cec_arbit_bit_time_set
	cbnz	w0, LBB0_7
; %bb.4:
Lloh16:
	adrp	x8, _CEC_SIGNAL_FREE_TIME_NEXT_XFER@GOTPAGE
Lloh17:
	ldr	x8, [x8, _CEC_SIGNAL_FREE_TIME_NEXT_XFER@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #682
	bl	_meson_ao_cec_arbit_bit_time_set
	cbnz	w0, LBB0_7
; %bb.5:
	mov	x0, x19
	mov	w1, #1
	bl	_meson_ao_cec_irq_setup
LBB0_6:
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_CEC_GEN_CNTL_RESET,4,2         ; @CEC_GEN_CNTL_RESET
	.comm	_CEC_GEN_CNTL_REG,8,3           ; @CEC_GEN_CNTL_REG
	.comm	_CEC_GEN_CNTL_CLK_CTRL_MASK,4,2 ; @CEC_GEN_CNTL_CLK_CTRL_MASK
	.comm	_CEC_GEN_CNTL_CLK_ENABLE,4,2    ; @CEC_GEN_CNTL_CLK_ENABLE
	.comm	_CEC_SIGNAL_FREE_TIME_RETRY,4,2 ; @CEC_SIGNAL_FREE_TIME_RETRY
	.comm	_CEC_SIGNAL_FREE_TIME_NEW_INITIATOR,4,2 ; @CEC_SIGNAL_FREE_TIME_NEW_INITIATOR
	.comm	_CEC_SIGNAL_FREE_TIME_NEXT_XFER,4,2 ; @CEC_SIGNAL_FREE_TIME_NEXT_XFER
	.no_dead_strip	_meson_ao_cec_adap_enable
.subsections_via_symbols
