	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aw_dwc3_attach
_aw_dwc3_attach:                        ## @aw_dwc3_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, 16(%rax)
	movq	%r12, %rdi
	callq	_ofw_bus_get_node
	movq	%rax, %r14
	leaq	8(%r15), %rbx
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	xorl	%esi, %esi
	movq	%rbx, %rcx
	callq	_clk_get_by_ofw_name
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
LBB0_2:
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_device_printf
	jmp	LBB0_3
LBB0_4:
	movl	(%rbx), %edi
	callq	_clk_enable
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	(%rbx), %edi
	callq	_clk_get_name
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_device_printf
LBB0_3:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	leaq	4(%r15), %rbx
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rcx
	callq	_hwreset_get_by_ofw_name
	testq	%rax, %rax
	je	LBB0_7
LBB0_9:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_simplebus_init
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_simplebus_fill_ranges
	testq	%rax, %rax
	js	LBB0_10
## %bb.11:
	movq	%r14, %rdi
	callq	_OF_child
	testq	%rax, %rax
	jle	LBB0_16
## %bb.12:
	movq	%rax, %rbx
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	%rbx, %rdi
	callq	_OF_peer
	movq	%rax, %rbx
	testq	%rax, %rax
	jle	LBB0_16
LBB0_13:                                ## =>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_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	%rax, %rdi
	callq	_device_probe_and_attach
	jmp	LBB0_15
LBB0_16:
	movq	%r12, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bus_generic_attach             ## TAILCALL
LBB0_7:
	movl	(%rbx), %edi
	callq	_hwreset_deassert
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_2
LBB0_10:
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bus"

L_.str.1:                               ## @.str.1
	.asciz	"Cannot get bus clock\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.2:                               ## @.str.2
	.asciz	"Could not enable clock %s\n"

L_.str.3:                               ## @.str.3
	.asciz	"Cannot deassert reset\n"

L_.str.4:                               ## @.str.4
	.asciz	"could not get ranges\n"

	.no_dead_strip	_aw_dwc3_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aw_dwc3_attach
_aw_dwc3_attach:                        ; @aw_dwc3_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	x21, x0
	str	x19, [x0, #16]
	mov	x0, x19
	bl	_ofw_bus_get_node
	mov	x20, x0
	add	x22, x21, #8
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	mov	x3, x22
	bl	_clk_get_by_ofw_name
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_2:
	ldr	w0, [x22]
	bl	_clk_enable
	cbz	w0, LBB0_5
; %bb.3:
	ldr	w0, [x22]
	bl	_clk_get_name
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_4:
	mov	x0, x19
	bl	_device_printf
Lloh6:
	adrp	x8, _ENXIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	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_5:
	add	x22, x21, #4
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	mov	x3, x22
	bl	_hwreset_get_by_ofw_name
	cbz	x0, LBB0_13
LBB0_6:
	mov	x0, x19
	mov	x1, x20
	bl	_simplebus_init
	mov	x0, x20
	mov	x1, x21
	bl	_simplebus_fill_ranges
	tbnz	x0, #63, LBB0_15
; %bb.7:
	mov	x0, x20
	bl	_OF_child
	cmp	x0, #1
	b.lt	LBB0_12
; %bb.8:
	mov	x20, x0
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x20
	bl	_OF_peer
	mov	x20, x0
	cmp	x0, #0
	b.le	LBB0_12
LBB0_10:                                ; =>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_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	bl	_device_probe_and_attach
	b	LBB0_9
LBB0_12:
	mov	x0, x19
	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
	b	_bus_generic_attach
LBB0_13:
	ldr	w0, [x22]
	bl	_hwreset_deassert
	cbz	x0, LBB0_6
; %bb.14:
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_4
LBB0_15:
Lloh13:
	adrp	x1, l_.str.4@PAGE
Lloh14:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bus"

l_.str.1:                               ; @.str.1
	.asciz	"Cannot get bus clock\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.2:                               ; @.str.2
	.asciz	"Could not enable clock %s\n"

l_.str.3:                               ; @.str.3
	.asciz	"Cannot deassert reset\n"

l_.str.4:                               ; @.str.4
	.asciz	"could not get ranges\n"

	.no_dead_strip	_aw_dwc3_attach
.subsections_via_symbols
