	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mv_ap806_clock_attach
_mv_ap806_clock_attach:                 ## @mv_ap806_clock_attach
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	callq	_device_get_softc
	movq	%rax, %rbx
	movl	%r14d, 8(%rax)
	movl	%r14d, %edi
	movq	%rax, %rsi
	callq	_SYSCON_GET_HANDLE
	testq	%rax, %rax
	je	LBB0_1
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	xorl	%eax, %eax
	callq	_device_printf
LBB0_3:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	cmpq	$0, (%rbx)
	je	LBB0_2
## %bb.4:
	movq	%rbx, %rdi
	movl	$1024, %esi                     ## imm = 0x400
	callq	_RD4
                                        ## kill: def $eax killed $eax def $rax
	andl	$31, %eax
	cmpl	$20, %eax
	ja	LBB0_8
## %bb.5:
	movl	$2000000000, %ecx               ## imm = 0x77359400
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rax,4), %rsi
	addq	%rdx, %rsi
	jmpq	*%rsi
LBB0_9:
	movl	$1800000000, %ecx               ## imm = 0x6B49D200
	jmp	LBB0_10
LBB0_8:
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_device_printf
	jmp	LBB0_3
LBB0_6:
	movl	$1600000000, %ecx               ## imm = 0x5F5E1000
	jmp	LBB0_10
LBB0_7:
	movl	$1333000000, %ecx               ## imm = 0x4F73F740
LBB0_10:
	movq	_ap806_clk_cluster_0@GOTPCREL(%rip), %rbx
	movq	%rcx, (%rbx)
	movq	_ap806_clk_cluster_1@GOTPCREL(%rip), %r15
	movq	%rcx, (%r15)
	movl	%r14d, %edi
	callq	_clkdom_create
	movq	%rax, %r14
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_clknode_fixed_register
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_clknode_fixed_register
	movq	_ap806_clk_fixed@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_clknode_fixed_register
	movq	_ap806_clk_mss@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_clknode_fixed_register
	movq	_ap806_clk_sdio@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_clknode_fixed_register
	movq	%r14, %rdi
	callq	_clkdom_finit
	movq	_bootverbose@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	cmpq	$0, (%rax)
	je	LBB0_12
## %bb.11:
	movq	%r14, %rdi
	callq	_clkdom_dump
	jmp	LBB0_12
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
LJTI0_0:
	.long	L0_0_set_10
	.long	L0_0_set_10
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_9
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_6
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_7
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot get syscon for device\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.1:                               ## @.str.1
	.asciz	"Cannot guess clock freq with reg %x\n"

	.comm	_ap806_clk_cluster_0,8,3        ## @ap806_clk_cluster_0
	.comm	_ap806_clk_cluster_1,8,3        ## @ap806_clk_cluster_1
	.comm	_ap806_clk_fixed,8,3            ## @ap806_clk_fixed
	.comm	_ap806_clk_mss,8,3              ## @ap806_clk_mss
	.comm	_ap806_clk_sdio,8,3             ## @ap806_clk_sdio
	.comm	_bootverbose,8,3                ## @bootverbose
	.no_dead_strip	_mv_ap806_clock_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mv_ap806_clock_attach
_mv_ap806_clock_attach:                 ; @mv_ap806_clock_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	_device_get_softc
	mov	x20, x0
	str	w19, [x0, #8]
	mov	x0, x19
	mov	x1, x20
	bl	_SYSCON_GET_HANDLE
	cbz	x0, LBB0_4
LBB0_1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
LBB0_2:
	mov	x0, x19
	bl	_device_printf
Lloh2:
	adrp	x8, _ENXIO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_4:
	ldr	x8, [x20]
	cbz	x8, LBB0_1
; %bb.5:
	mov	x0, x20
	mov	w1, #1024
	bl	_RD4
	and	w9, w0, #0x1f
	cmp	w9, #20
	b.hi	LBB0_8
; %bb.6:
	mov	w8, #37888
	movk	w8, #30517, lsl #16
Lloh5:
	adrp	x10, lJTI0_0@PAGE
Lloh6:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_7
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_7:
	mov	w8, #53760
	movk	w8, #27465, lsl #16
	b	LBB0_11
LBB0_8:
                                        ; kill: def $w9 killed $w9 killed $x9 def $x9
	str	x9, [sp]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_2
LBB0_9:
	mov	w8, #4096
	movk	w8, #24414, lsl #16
	b	LBB0_11
LBB0_10:
	mov	w8, #63296
	movk	w8, #20339, lsl #16
LBB0_11:
Lloh9:
	adrp	x20, _ap806_clk_cluster_0@GOTPAGE
Lloh10:
	ldr	x20, [x20, _ap806_clk_cluster_0@GOTPAGEOFF]
	str	x8, [x20]
Lloh11:
	adrp	x21, _ap806_clk_cluster_1@GOTPAGE
Lloh12:
	ldr	x21, [x21, _ap806_clk_cluster_1@GOTPAGEOFF]
	str	x8, [x21]
	mov	x0, x19
	bl	_clkdom_create
	mov	x19, x0
	mov	x1, x20
	bl	_clknode_fixed_register
	mov	x0, x19
	mov	x1, x21
	bl	_clknode_fixed_register
Lloh13:
	adrp	x1, _ap806_clk_fixed@GOTPAGE
Lloh14:
	ldr	x1, [x1, _ap806_clk_fixed@GOTPAGEOFF]
	mov	x0, x19
	bl	_clknode_fixed_register
Lloh15:
	adrp	x1, _ap806_clk_mss@GOTPAGE
Lloh16:
	ldr	x1, [x1, _ap806_clk_mss@GOTPAGEOFF]
	mov	x0, x19
	bl	_clknode_fixed_register
Lloh17:
	adrp	x1, _ap806_clk_sdio@GOTPAGE
Lloh18:
	ldr	x1, [x1, _ap806_clk_sdio@GOTPAGEOFF]
	mov	x0, x19
	bl	_clknode_fixed_register
	mov	x0, x19
	bl	_clkdom_finit
Lloh19:
	adrp	x8, _bootverbose@GOTPAGE
Lloh20:
	ldr	x8, [x8, _bootverbose@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	cbz	x8, LBB0_13
; %bb.12:
	mov	x0, x19
	bl	_clkdom_dump
LBB0_13:
	mov	w0, #0
	b	LBB0_3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_11-LBB0_7)>>2
	.byte	(LBB0_11-LBB0_7)>>2
	.byte	(LBB0_8-LBB0_7)>>2
	.byte	(LBB0_8-LBB0_7)>>2
	.byte	(LBB0_8-LBB0_7)>>2
	.byte	(LBB0_8-LBB0_7)>>2
	.byte	(LBB0_7-LBB0_7)>>2
	.byte	(LBB0_8-LBB0_7)>>2
	.byte	(LBB0_8-LBB0_7)>>2
	.byte	(LBB0_8-LBB0_7)>>2
	.byte	(LBB0_8-LBB0_7)>>2
	.byte	(LBB0_8-LBB0_7)>>2
	.byte	(LBB0_8-LBB0_7)>>2
	.byte	(LBB0_9-LBB0_7)>>2
	.byte	(LBB0_8-LBB0_7)>>2
	.byte	(LBB0_8-LBB0_7)>>2
	.byte	(LBB0_8-LBB0_7)>>2
	.byte	(LBB0_8-LBB0_7)>>2
	.byte	(LBB0_8-LBB0_7)>>2
	.byte	(LBB0_8-LBB0_7)>>2
	.byte	(LBB0_10-LBB0_7)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot get syscon for device\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.1:                               ; @.str.1
	.asciz	"Cannot guess clock freq with reg %x\n"

	.comm	_ap806_clk_cluster_0,8,3        ; @ap806_clk_cluster_0
	.comm	_ap806_clk_cluster_1,8,3        ; @ap806_clk_cluster_1
	.comm	_ap806_clk_fixed,8,3            ; @ap806_clk_fixed
	.comm	_ap806_clk_mss,8,3              ; @ap806_clk_mss
	.comm	_ap806_clk_sdio,8,3             ; @ap806_clk_sdio
	.comm	_bootverbose,8,3                ; @bootverbose
	.no_dead_strip	_mv_ap806_clock_attach
.subsections_via_symbols
