	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aw_ccu_attach
_aw_ccu_attach:                         ## @aw_ccu_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	callq	_device_get_softc
	movq	%rax, %r15
	movq	%r12, %rdi
	callq	_ofw_bus_get_node
	movq	%rax, %r14
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_simplebus_init
	xorl	%eax, %eax
	callq	_aw_ccu_search_compatible
	movl	(%rax), %eax
	movl	%eax, 12(%r15)
	movq	%r12, %rdi
	callq	_bus_get_bus_tag
	movl	%eax, 8(%r15)
	movq	_CCU_BASE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_CCU_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	leaq	4(%r15), %r8
	movl	%eax, %edi
	xorl	%ecx, %ecx
	callq	_bus_space_map
	testl	%eax, %eax
	je	LBB0_1
## %bb.7:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_device_printf
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%r12, %rdi
	callq	_device_get_nameunit
	movq	_MTX_DEF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r15, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_mtx_init
	movq	%r14, %rdi
	callq	_OF_child
	testq	%rax, %rax
	jle	LBB0_6
## %bb.2:
	movq	%rax, %rbx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	callq	_OF_peer
	movq	%rax, %rbx
	testq	%rax, %rax
	jle	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	_simplebus_add_device
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %rdi
	callq	_device_probe_and_attach
	jmp	LBB0_5
LBB0_6:
	movq	%r12, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bus_generic_attach             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CCU_BASE,4,2                   ## @CCU_BASE
	.comm	_CCU_SIZE,4,2                   ## @CCU_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"couldn't map CCU: %d\n"

	.comm	_MTX_DEF,4,2                    ## @MTX_DEF
	.no_dead_strip	_aw_ccu_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aw_ccu_attach
_aw_ccu_attach:                         ; @aw_ccu_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	x19, x0
	bl	_device_get_softc
	mov	x21, x0
	mov	x0, x19
	bl	_ofw_bus_get_node
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_simplebus_init
	bl	_aw_ccu_search_compatible
	ldr	w8, [x0]
	str	w8, [x21, #12]
	mov	x0, x19
	bl	_bus_get_bus_tag
Lloh0:
	adrp	x8, _CCU_BASE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CCU_BASE@GOTPAGEOFF]
	str	w0, [x21, #8]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _CCU_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CCU_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	add	x4, x21, #4
	mov	w3, #0
	bl	_bus_space_map
	cbz	w0, LBB0_2
; %bb.1:
	mov	x22, x0
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_device_printf
	mov	x0, x22
	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_2:
	mov	x0, x19
	bl	_device_get_nameunit
	mov	x1, x0
Lloh8:
	adrp	x8, _MTX_DEF@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MTX_DEF@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x2, #0
	bl	_mtx_init
	mov	x0, x20
	bl	_OF_child
	cmp	x0, #1
	b.lt	LBB0_7
; %bb.3:
	mov	x20, x0
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	bl	_OF_peer
	mov	x20, x0
	cmp	x0, #0
	b.le	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	mov	x3, #0
	mov	w4, #-1
	mov	x5, #0
	bl	_simplebus_add_device
	cbz	x0, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	bl	_device_probe_and_attach
	b	LBB0_4
LBB0_7:
	mov	x0, x19
	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
	b	_bus_generic_attach
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_CCU_BASE,4,2                   ; @CCU_BASE
	.comm	_CCU_SIZE,4,2                   ; @CCU_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"couldn't map CCU: %d\n"

	.comm	_MTX_DEF,4,2                    ; @MTX_DEF
	.no_dead_strip	_aw_ccu_attach
.subsections_via_symbols
