	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aml8726_hardclock
_aml8726_hardclock:                     ## @aml8726_hardclock
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_AML_TIMER_LOCK
	cmpq	$0, (%rbx)
	je	LBB0_3
## %bb.1:
	movq	8(%rbx), %rdx
	testq	%rdx, %rdx
	je	LBB0_3
## %bb.2:
	movq	$0, (%rbx)
	movq	_AML_TIMER_A_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_CSR_WRITE_4
	movq	_AML_TIMER_MUX_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_CSR_READ_4
	movq	_AML_TIMER_A_PERIODIC@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_AML_TIMER_A_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_CSR_WRITE_4
LBB0_3:
	movq	%rbx, %rdi
	callq	_AML_TIMER_UNLOCK
	cmpq	$0, 32(%rbx)
	je	LBB0_5
## %bb.4:
	leaq	16(%rbx), %rdi
	movl	16(%rbx), %esi
	callq	*24(%rbx)
LBB0_5:
	movq	_FILTER_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AML_TIMER_A_REG,4,2            ## @AML_TIMER_A_REG
	.comm	_AML_TIMER_MUX_REG,4,2          ## @AML_TIMER_MUX_REG
	.comm	_AML_TIMER_A_PERIODIC,4,2       ## @AML_TIMER_A_PERIODIC
	.comm	_AML_TIMER_A_EN,4,2             ## @AML_TIMER_A_EN
	.comm	_FILTER_HANDLED,4,2             ## @FILTER_HANDLED
	.no_dead_strip	_aml8726_hardclock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aml8726_hardclock
_aml8726_hardclock:                     ; @aml8726_hardclock
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_AML_TIMER_LOCK
	ldr	x8, [x19]
	cbz	x8, LBB0_3
; %bb.1:
	ldr	x2, [x19, #8]
	cbz	x2, LBB0_3
; %bb.2:
	str	xzr, [x19]
Lloh0:
	adrp	x8, _AML_TIMER_A_REG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AML_TIMER_A_REG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_CSR_WRITE_4
Lloh3:
	adrp	x8, _AML_TIMER_MUX_REG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AML_TIMER_MUX_REG@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_CSR_READ_4
Lloh6:
	adrp	x8, _AML_TIMER_A_PERIODIC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AML_TIMER_A_PERIODIC@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	orr	w8, w8, w0
Lloh9:
	adrp	x9, _AML_TIMER_A_EN@GOTPAGE
Lloh10:
	ldr	x9, [x9, _AML_TIMER_A_EN@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x19
	mov	x1, x20
	bl	_CSR_WRITE_4
LBB0_3:
	mov	x0, x19
	bl	_AML_TIMER_UNLOCK
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_5
; %bb.4:
	ldr	w1, [x19, #16]!
	ldr	x8, [x19, #8]
	mov	x0, x19
	blr	x8
LBB0_5:
Lloh12:
	adrp	x8, _FILTER_HANDLED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _FILTER_HANDLED@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_AML_TIMER_A_REG,4,2            ; @AML_TIMER_A_REG
	.comm	_AML_TIMER_MUX_REG,4,2          ; @AML_TIMER_MUX_REG
	.comm	_AML_TIMER_A_PERIODIC,4,2       ; @AML_TIMER_A_PERIODIC
	.comm	_AML_TIMER_A_EN,4,2             ; @AML_TIMER_A_EN
	.comm	_FILTER_HANDLED,4,2             ; @FILTER_HANDLED
	.no_dead_strip	_aml8726_hardclock
.subsections_via_symbols
