	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_aml8726_clkmsr_bus_frequency   ## -- Begin function aml8726_clkmsr_bus_frequency
	.p2align	4, 0x90
_aml8726_clkmsr_bus_frequency:          ## @aml8726_clkmsr_bus_frequency
	.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
	subq	$64, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_aml8726_soc_hw_rev@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_AML_SOC_HW_REV_UNKNOWN@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	leaq	L_.str.1(%rip), %rdi
	callq	_OF_finddevice
	cmpl	$-1, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edi
	callq	_fdt_is_compatible_strict
	testq	%rax, %rax
	jne	LBB0_4
LBB0_2:
	leaq	L_.str.3(%rip), %rdi
	callq	_OF_finddevice
	xorl	%r14d, %r14d
	cmpl	$-1, %eax
	je	LBB0_8
## %bb.3:
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edi
	movl	$1, %edx
	callq	_fdt_find_compatible
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_8
LBB0_4:
	movl	%ebx, %edi
	callq	_OF_parent
	xorl	%r14d, %r14d
	leaq	-40(%rbp), %rdx
	leaq	-64(%rbp), %rcx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_fdt_get_range
	testq	%rax, %rax
	jne	LBB0_8
## %bb.5:
	leaq	-32(%rbp), %rsi
	leaq	-24(%rbp), %rdx
	movl	%ebx, %edi
	callq	_fdt_regsize
	testq	%rax, %rax
	jne	LBB0_8
## %bb.6:
	movq	-40(%rbp), %rax
	addq	%rax, -32(%rbp)
	leaq	-56(%rbp), %rbx
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	_fdtbus_bs_tag@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, -52(%rbp)
	movq	-32(%rbp), %rsi
	movq	-24(%rbp), %rdx
	xorl	%ecx, %ecx
	movq	%rbx, %r8
	callq	_bus_space_map
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	leaq	-80(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	-72(%rbp), %rax
	movq	%rbx, (%rax)
	movq	_AML_CLKMSR_CLK81@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_aml8726_clkmsr_clock_frequency
	imull	$1000000, %eax, %r14d           ## imm = 0xF4240
	movl	-56(%rbp), %esi
	movl	-52(%rbp), %edi
	movq	-24(%rbp), %rdx
	callq	_bus_space_unmap
LBB0_8:
	movl	%r14d, %eax
	addq	$64, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_aml8726_soc_hw_rev,8,3         ## @aml8726_soc_hw_rev
	.comm	_AML_SOC_HW_REV_UNKNOWN,8,3     ## @AML_SOC_HW_REV_UNKNOWN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"aml8726_soc_hw_rev isn't initialized"

L_.str.1:                               ## @.str.1
	.asciz	"clkmsr"

L_.str.2:                               ## @.str.2
	.asciz	"amlogic,aml8726-clkmsr"

L_.str.3:                               ## @.str.3
	.asciz	"/soc"

	.comm	_fdtbus_bs_tag,4,2              ## @fdtbus_bs_tag
	.comm	_AML_CLKMSR_CLK81,4,2           ## @AML_CLKMSR_CLK81
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_aml8726_clkmsr_bus_frequency   ; -- Begin function aml8726_clkmsr_bus_frequency
	.p2align	2
_aml8726_clkmsr_bus_frequency:          ; @aml8726_clkmsr_bus_frequency
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
Lloh0:
	adrp	x8, _aml8726_soc_hw_rev@GOTPAGE
Lloh1:
	ldr	x8, [x8, _aml8726_soc_hw_rev@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _AML_SOC_HW_REV_UNKNOWN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AML_SOC_HW_REV_UNKNOWN@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, ne
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_OF_finddevice
	cmn	w0, #1
	b.eq	LBB0_2
; %bb.1:
	mov	x19, x0
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_fdt_is_compatible_strict
	cbnz	x0, LBB0_4
LBB0_2:
Lloh12:
	adrp	x0, l_.str.3@PAGE
Lloh13:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_OF_finddevice
	cmn	w0, #1
	b.eq	LBB0_6
; %bb.3:
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w2, #1
	bl	_fdt_find_compatible
	mov	x19, x0
	cbz	w0, LBB0_6
LBB0_4:
	mov	x0, x19
	bl	_OF_parent
	add	x2, sp, #24
	add	x3, sp, #16
	mov	w1, #0
	bl	_fdt_get_range
	mov	w20, #0
	cbnz	x0, LBB0_7
; %bb.5:
	add	x1, sp, #8
	mov	x2, sp
	mov	x0, x19
	bl	_fdt_regsize
	cbz	x0, LBB0_8
LBB0_6:
	mov	w20, #0
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_8:
	ldr	x8, [sp, #24]
	ldr	x9, [sp, #8]
	add	x8, x9, x8
	str	x8, [sp, #8]
	sub	x19, x29, #32
	sub	x0, x29, #32
	mov	w1, #0
	mov	w2, #16
	bl	_memset
Lloh16:
	adrp	x8, _fdtbus_bs_tag@GOTPAGE
Lloh17:
	ldr	x8, [x8, _fdtbus_bs_tag@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	stur	w0, [x29, #-28]
	ldp	x2, x1, [sp]
	sub	x4, x29, #32
	mov	w3, #0
	bl	_bus_space_map
	mov	w20, #0
	cbnz	x0, LBB0_7
; %bb.9:
	add	x0, sp, #32
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	ldr	x8, [sp, #40]
	str	x19, [x8]
Lloh19:
	adrp	x8, _AML_CLKMSR_CLK81@GOTPAGE
Lloh20:
	ldr	x8, [x8, _AML_CLKMSR_CLK81@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	add	x0, sp, #32
	bl	_aml8726_clkmsr_clock_frequency
	mov	w8, #16960
	movk	w8, #15, lsl #16
	mul	w20, w0, w8
	ldp	w1, w0, [x29, #-32]
	ldr	x2, [sp]
	bl	_bus_space_unmap
	b	LBB0_7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_aml8726_soc_hw_rev,8,3         ; @aml8726_soc_hw_rev
	.comm	_AML_SOC_HW_REV_UNKNOWN,8,3     ; @AML_SOC_HW_REV_UNKNOWN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"aml8726_soc_hw_rev isn't initialized"

l_.str.1:                               ; @.str.1
	.asciz	"clkmsr"

l_.str.2:                               ; @.str.2
	.asciz	"amlogic,aml8726-clkmsr"

l_.str.3:                               ; @.str.3
	.asciz	"/soc"

	.comm	_fdtbus_bs_tag,4,2              ; @fdtbus_bs_tag
	.comm	_AML_CLKMSR_CLK81,4,2           ; @AML_CLKMSR_CLK81
.subsections_via_symbols
