	.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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edi, %r14d
	callq	_device_get_softc
	movq	%rax, %rbx
	movl	$0, -20(%rbp)
	movq	_SYS_RES_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RF_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-20(%rbp), %rdx
	movl	%r14d, %edi
	callq	_bus_alloc_resource_any
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_ccm_sc@GOTPCREL(%rip), %rax
	movq	%rbx, (%rax)
	movq	_CCM_CGPR@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_RD4
	movq	_CCM_CGPR_INT_MEM_CLK_LPM@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r14), %esi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_WR4
	movq	_CCM_CLPCR@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_RD4
	movq	_CCM_CLPCR_LPM_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movq	_CCM_CLPCR_LPM_RUN@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_WR4
	movq	%rbx, %rdi
	callq	_ccm_init_gates
LBB0_4:
	xorl	%ebx, %ebx
	jmp	LBB0_5
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	je	LBB0_4
## %bb.3:
	movl	%r14d, %edi
	callq	_ccm_detach
LBB0_5:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SYS_RES_MEMORY,4,2             ## @SYS_RES_MEMORY
	.comm	_RF_ACTIVE,4,2                  ## @RF_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot allocate memory resources\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_ccm_sc,8,3                     ## @ccm_sc
	.comm	_CCM_CGPR,4,2                   ## @CCM_CGPR
	.comm	_CCM_CGPR_INT_MEM_CLK_LPM,4,2   ## @CCM_CGPR_INT_MEM_CLK_LPM
	.comm	_CCM_CLPCR,4,2                  ## @CCM_CLPCR
	.comm	_CCM_CLPCR_LPM_MASK,4,2         ## @CCM_CLPCR_LPM_MASK
	.comm	_CCM_CLPCR_LPM_RUN,4,2          ## @CCM_CLPCR_LPM_RUN
	.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:
	sub	sp, sp, #48
	.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
	mov	x20, x0
	bl	_device_get_softc
	mov	x19, x0
	str	wzr, [sp, #12]
Lloh0:
	adrp	x8, _SYS_RES_MEMORY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SYS_RES_MEMORY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _RF_ACTIVE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RF_ACTIVE@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	add	x2, sp, #12
	mov	x0, x20
	bl	_bus_alloc_resource_any
	str	x0, [x19]
	cbz	x0, LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _ccm_sc@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ccm_sc@GOTPAGEOFF]
Lloh8:
	str	x19, [x8]
Lloh9:
	adrp	x20, _CCM_CGPR@GOTPAGE
Lloh10:
	ldr	x20, [x20, _CCM_CGPR@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_RD4
Lloh11:
	adrp	x8, _CCM_CGPR_INT_MEM_CLK_LPM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CCM_CGPR_INT_MEM_CLK_LPM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	orr	w2, w8, w0
	ldr	w1, [x20]
	mov	x0, x19
	bl	_WR4
Lloh14:
	adrp	x20, _CCM_CLPCR@GOTPAGE
Lloh15:
	ldr	x20, [x20, _CCM_CLPCR@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_RD4
Lloh16:
	adrp	x8, _CCM_CLPCR_LPM_MASK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _CCM_CLPCR_LPM_MASK@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	bic	w8, w0, w8
Lloh19:
	adrp	x9, _CCM_CLPCR_LPM_RUN@GOTPAGE
Lloh20:
	ldr	x9, [x9, _CCM_CLPCR_LPM_RUN@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w2, w8, w9
	ldr	w1, [x20]
	mov	x0, x19
	bl	_WR4
	mov	x0, x19
	bl	_ccm_init_gates
	mov	w19, #0
	b	LBB0_4
LBB0_2:
Lloh22:
	adrp	x1, l_.str@PAGE
Lloh23:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_device_printf
Lloh24:
	adrp	x8, _ENXIO@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh26:
	ldr	w19, [x8]
	cbz	w19, LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_ccm_detach
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotStr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_SYS_RES_MEMORY,4,2             ; @SYS_RES_MEMORY
	.comm	_RF_ACTIVE,4,2                  ; @RF_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot allocate memory resources\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_ccm_sc,8,3                     ; @ccm_sc
	.comm	_CCM_CGPR,4,2                   ; @CCM_CGPR
	.comm	_CCM_CGPR_INT_MEM_CLK_LPM,4,2   ; @CCM_CGPR_INT_MEM_CLK_LPM
	.comm	_CCM_CLPCR,4,2                  ; @CCM_CLPCR
	.comm	_CCM_CLPCR_LPM_MASK,4,2         ; @CCM_CLPCR_LPM_MASK
	.comm	_CCM_CLPCR_LPM_RUN,4,2          ; @CCM_CLPCR_LPM_RUN
	.no_dead_strip	_ccm_attach
.subsections_via_symbols
