	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aml8726_ccm_attach
_aml8726_ccm_attach:                    ## @aml8726_ccm_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edi, %ebx
	callq	_device_get_softc
	movq	%rax, %r14
	movl	%ebx, 8(%rax)
	movq	_aml8726_soc_hw_rev@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	$-128, %eax
	cmpl	$4, %eax
	jae	LBB0_1
## %bb.3:
	cltq
	leaq	l_switch.table.aml8726_ccm_attach(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	movq	_aml8726_ccm_spec@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	movl	%ebx, %edi
	callq	_bus_alloc_resources
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_2
LBB0_1:
	leaq	L_.str(%rip), %rsi
LBB0_2:
	movl	%ebx, %edi
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	movq	%r14, %rdi
	callq	_AML_CCM_LOCK_INIT
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_aml8726_ccm_configure_gates    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_aml8726_soc_hw_rev,4,2         ## @aml8726_soc_hw_rev
	.comm	_aml8726_m3_ccm,4,2             ## @aml8726_m3_ccm
	.comm	_aml8726_m6_ccm,4,2             ## @aml8726_m6_ccm
	.comm	_aml8726_m8_ccm,4,2             ## @aml8726_m8_ccm
	.comm	_aml8726_m8b_ccm,4,2            ## @aml8726_m8b_ccm
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unsupported SoC\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_aml8726_ccm_spec,4,2           ## @aml8726_ccm_spec
L_.str.1:                               ## @.str.1
	.asciz	"can not allocate resources for device\n"

	.no_dead_strip	_aml8726_ccm_attach
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.aml8726_ccm_attach
l_switch.table.aml8726_ccm_attach:
	.quad	_aml8726_m8b_ccm
	.quad	_aml8726_m8_ccm
	.quad	_aml8726_m6_ccm
	.quad	_aml8726_m3_ccm

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aml8726_ccm_attach
_aml8726_ccm_attach:                    ; @aml8726_ccm_attach
	.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	_device_get_softc
	str	w19, [x0, #8]
Lloh0:
	adrp	x8, _aml8726_soc_hw_rev@GOTPAGE
Lloh1:
	ldr	x8, [x8, _aml8726_soc_hw_rev@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	sub	w8, w8, #128
	cmp	w8, #4
	b.hs	LBB0_3
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x9, l_switch.table.aml8726_ccm_attach@PAGE
Lloh4:
	add	x9, x9, l_switch.table.aml8726_ccm_attach@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	ldr	w8, [x8]
	str	w8, [x0, #4]
Lloh5:
	adrp	x8, _aml8726_ccm_spec@GOTPAGE
Lloh6:
	ldr	x8, [x8, _aml8726_ccm_spec@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	ldr	w2, [x0]
	mov	x0, x19
	bl	_bus_alloc_resources
	cbz	x0, LBB0_5
; %bb.2:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_3:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
LBB0_4:
	mov	x0, x19
	bl	_device_printf
Lloh12:
	adrp	x8, _ENXIO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_5:
	mov	x0, x20
	bl	_AML_CCM_LOCK_INIT
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_aml8726_ccm_configure_gates
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_aml8726_soc_hw_rev,4,2         ; @aml8726_soc_hw_rev
	.comm	_aml8726_m3_ccm,4,2             ; @aml8726_m3_ccm
	.comm	_aml8726_m6_ccm,4,2             ; @aml8726_m6_ccm
	.comm	_aml8726_m8_ccm,4,2             ; @aml8726_m8_ccm
	.comm	_aml8726_m8b_ccm,4,2            ; @aml8726_m8b_ccm
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unsupported SoC\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_aml8726_ccm_spec,4,2           ; @aml8726_ccm_spec
l_.str.1:                               ; @.str.1
	.asciz	"can not allocate resources for device\n"

	.no_dead_strip	_aml8726_ccm_attach
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.aml8726_ccm_attach
l_switch.table.aml8726_ccm_attach:
	.quad	_aml8726_m8b_ccm
	.quad	_aml8726_m8_ccm
	.quad	_aml8726_m6_ccm
	.quad	_aml8726_m3_ccm

.subsections_via_symbols
