	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function meson_ao_cec_wait_busy
_meson_ao_cec_wait_busy:                ## @meson_ao_cec_wait_busy
	.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	%rdi, %r15
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, %edi
	movl	$5000, %esi                     ## imm = 0x1388
	callq	_ktime_add_us
	movl	%eax, %ebx
	movq	_CEC_RW_REG@GOTPCREL(%rip), %r12
	movq	_CEC_RW_BUS_BUSY@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	addq	(%r15), %rdi
	callq	_readl_relaxed
	testl	%eax, (%r13)
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_ktime_compare
	testq	%rax, %rax
	jle	LBB0_1
## %bb.3:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_4:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CEC_RW_REG,8,3                 ## @CEC_RW_REG
	.comm	_CEC_RW_BUS_BUSY,4,2            ## @CEC_RW_BUS_BUSY
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_meson_ao_cec_wait_busy
.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_wait_busy
_meson_ao_cec_wait_busy:                ; @meson_ao_cec_wait_busy
	.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	x19, x0
	bl	_ktime_get
	mov	w1, #5000
	bl	_ktime_add_us
	mov	x20, x0
Lloh0:
	adrp	x21, _CEC_RW_REG@GOTPAGE
Lloh1:
	ldr	x21, [x21, _CEC_RW_REG@GOTPAGEOFF]
Lloh2:
	adrp	x22, _CEC_RW_BUS_BUSY@GOTPAGE
Lloh3:
	ldr	x22, [x22, _CEC_RW_BUS_BUSY@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_readl_relaxed
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	bl	_ktime_get
	mov	x1, x20
	bl	_ktime_compare
	cmp	x0, #1
	b.lt	LBB0_1
; %bb.3:
Lloh4:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_4:
	mov	w0, #0
LBB0_5:
	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	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_CEC_RW_REG,8,3                 ; @CEC_RW_REG
	.comm	_CEC_RW_BUS_BUSY,4,2            ; @CEC_RW_BUS_BUSY
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_meson_ao_cec_wait_busy
.subsections_via_symbols
