	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ccm_attach
_ccm_attach:                            ## @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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	callq	_device_get_softc
	movq	%rax, %r14
	movl	%ebx, (%rax)
	movq	_ccm_spec@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r14), %rdx
	movl	%ebx, %edi
	callq	_bus_alloc_resources
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_18
LBB0_2:
	movq	8(%r14), %rax
	movl	(%rax), %edi
	callq	_rman_get_bustag
	movl	%eax, 20(%r14)
	movq	8(%r14), %rax
	movl	(%rax), %edi
	callq	_rman_get_bushandle
	movl	%eax, 16(%r14)
	movq	_CCM_CCR@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_READ4
	movq	_FIRC_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_FXOSC_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%rbx), %esi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_WRITE4
	movq	_CCM_CSR@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_READ4
	movq	_FXOSC_RDY@GOTPCREL(%rip), %rbx
	testl	%eax, (%rbx)
	jne	LBB0_3
## %bb.4:
	xorl	%eax, %eax
	callq	_cpufunc_nullop
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_READ4
	testl	%eax, (%rbx)
	jne	LBB0_3
## %bb.5:
	xorl	%eax, %eax
	callq	_cpufunc_nullop
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_READ4
	testl	%eax, (%rbx)
	jne	LBB0_3
## %bb.6:
	xorl	%eax, %eax
	callq	_cpufunc_nullop
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_READ4
	testl	%eax, (%rbx)
	jne	LBB0_3
## %bb.7:
	xorl	%eax, %eax
	callq	_cpufunc_nullop
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_READ4
	testl	%eax, (%rbx)
	jne	LBB0_3
## %bb.8:
	xorl	%eax, %eax
	callq	_cpufunc_nullop
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_READ4
	testl	%eax, (%rbx)
	jne	LBB0_3
## %bb.9:
	xorl	%eax, %eax
	callq	_cpufunc_nullop
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_READ4
	testl	%eax, (%rbx)
	jne	LBB0_3
## %bb.10:
	xorl	%eax, %eax
	callq	_cpufunc_nullop
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_READ4
	testl	%eax, (%rbx)
	jne	LBB0_3
## %bb.11:
	xorl	%eax, %eax
	callq	_cpufunc_nullop
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_READ4
	testl	%eax, (%rbx)
	jne	LBB0_3
## %bb.12:
	xorl	%eax, %eax
	callq	_cpufunc_nullop
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_READ4
	testl	%eax, (%rbx)
	je	LBB0_13
LBB0_3:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_device_printf
LBB0_14:
	movq	_CCM_CCGRN@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_17
## %bb.15:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_CCM_CCGR
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	$-1, %edx
	callq	_WRITE4
	incl	%ebx
	cmpl	(%r15), %ebx
	jl	LBB0_16
LBB0_17:
	movq	%r14, %rdi
	callq	_ccm_fdt_set
	xorl	%eax, %eax
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	xorl	%eax, %eax
	callq	_cpufunc_nullop
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_ccm_spec,4,2                   ## @ccm_spec
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not allocate resources\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_CCM_CCR,4,2                    ## @CCM_CCR
	.comm	_FIRC_EN,4,2                    ## @FIRC_EN
	.comm	_FXOSC_EN,4,2                   ## @FXOSC_EN
	.comm	_CCM_CSR,4,2                    ## @CCM_CSR
	.comm	_FXOSC_RDY,4,2                  ## @FXOSC_RDY
L_.str.1:                               ## @.str.1
	.asciz	"On board oscillator is ready.\n"

	.comm	_CCM_CCGRN,4,2                  ## @CCM_CCGRN
	.no_dead_strip	_ccm_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ccm_attach
_ccm_attach:                            ; @ccm_attach
	.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	x20, x0
	bl	_device_get_softc
	mov	x19, x0
	str	w20, [x0]
Lloh0:
	adrp	x8, _ccm_spec@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ccm_spec@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	x2, [x0, #8]
	mov	x0, x20
	bl	_bus_alloc_resources
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_device_printf
Lloh5:
	adrp	x8, _ENXIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	b	LBB0_17
LBB0_2:
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	bl	_rman_get_bustag
	str	w0, [x19, #20]
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	bl	_rman_get_bushandle
	str	w0, [x19, #16]
Lloh8:
	adrp	x20, _CCM_CCR@GOTPAGE
Lloh9:
	ldr	x20, [x20, _CCM_CCR@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_READ4
Lloh10:
	adrp	x8, _FIRC_EN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _FIRC_EN@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _FXOSC_EN@GOTPAGE
Lloh14:
	ldr	x9, [x9, _FXOSC_EN@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w8, w8, w0
	orr	w2, w8, w9
	ldr	w1, [x20]
	mov	x0, x19
	bl	_WRITE4
Lloh16:
	adrp	x20, _CCM_CSR@GOTPAGE
Lloh17:
	ldr	x20, [x20, _CCM_CSR@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_READ4
Lloh18:
	adrp	x21, _FXOSC_RDY@GOTPAGE
Lloh19:
	ldr	x21, [x21, _FXOSC_RDY@GOTPAGEOFF]
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_12
; %bb.3:
	bl	_cpufunc_nullop
	ldr	w1, [x20]
	mov	x0, x19
	bl	_READ4
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_12
; %bb.4:
	bl	_cpufunc_nullop
	ldr	w1, [x20]
	mov	x0, x19
	bl	_READ4
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_12
; %bb.5:
	bl	_cpufunc_nullop
	ldr	w1, [x20]
	mov	x0, x19
	bl	_READ4
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_12
; %bb.6:
	bl	_cpufunc_nullop
	ldr	w1, [x20]
	mov	x0, x19
	bl	_READ4
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_12
; %bb.7:
	bl	_cpufunc_nullop
	ldr	w1, [x20]
	mov	x0, x19
	bl	_READ4
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_12
; %bb.8:
	bl	_cpufunc_nullop
	ldr	w1, [x20]
	mov	x0, x19
	bl	_READ4
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_12
; %bb.9:
	bl	_cpufunc_nullop
	ldr	w1, [x20]
	mov	x0, x19
	bl	_READ4
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_12
; %bb.10:
	bl	_cpufunc_nullop
	ldr	w1, [x20]
	mov	x0, x19
	bl	_READ4
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_12
; %bb.11:
	bl	_cpufunc_nullop
	ldr	w1, [x20]
	mov	x0, x19
	bl	_READ4
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_18
LBB0_12:
	ldr	w0, [x19]
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_device_printf
LBB0_13:
Lloh22:
	adrp	x21, _CCM_CCGRN@GOTPAGE
Lloh23:
	ldr	x21, [x21, _CCM_CCGRN@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.14:
	mov	w20, #0
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_CCM_CCGR
	mov	x1, x0
	mov	x0, x19
	mov	w2, #-1
	bl	_WRITE4
	add	w20, w20, #1
	ldr	w8, [x21]
	cmp	w20, w8
	b.lt	LBB0_15
LBB0_16:
	mov	x0, x19
	bl	_ccm_fdt_set
	mov	w0, #0
LBB0_17:
	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
LBB0_18:
	bl	_cpufunc_nullop
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_ccm_spec,4,2                   ; @ccm_spec
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not allocate resources\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_CCM_CCR,4,2                    ; @CCM_CCR
	.comm	_FIRC_EN,4,2                    ; @FIRC_EN
	.comm	_FXOSC_EN,4,2                   ; @FXOSC_EN
	.comm	_CCM_CSR,4,2                    ; @CCM_CSR
	.comm	_FXOSC_RDY,4,2                  ; @FXOSC_RDY
l_.str.1:                               ; @.str.1
	.asciz	"On board oscillator is ready.\n"

	.comm	_CCM_CCGRN,4,2                  ; @CCM_CCGRN
	.no_dead_strip	_ccm_attach
.subsections_via_symbols
