	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function awusb3phy_attach
_awusb3phy_attach:                      ## @awusb3phy_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r12d
	callq	_device_get_softc
	movq	%rax, %r14
	movl	%r12d, %edi
	callq	_ofw_bus_get_node
	movq	%rax, %rbx
	movq	_aw_usb3phy_spec@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	4(%r14), %rdx
	movl	%r12d, %edi
	callq	_bus_alloc_resources
	testq	%rax, %rax
	je	LBB0_1
## %bb.5:
	leaq	L_.str(%rip), %rsi
LBB0_16:
	movl	%r12d, %edi
	xorl	%eax, %eax
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_17:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	leaq	-44(%rbp), %rcx
	movl	%r12d, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_clk_get_by_ofw_index
	testq	%rax, %rax
	jne	LBB0_7
## %bb.2:
	movl	$1, %ebx
	leaq	-44(%rbp), %r13
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	-44(%rbp), %edi
	callq	_clk_enable
	testl	%eax, %eax
	jne	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r12d, %edi
	xorl	%esi, %esi
	movl	%ebx, %edx
	movq	%r13, %rcx
	callq	_clk_get_by_ofw_index
	incl	%ebx
	testq	%rax, %rax
	je	LBB0_3
LBB0_7:
	xorl	%r13d, %r13d
	leaq	-48(%rbp), %rcx
	movl	%r12d, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_hwreset_get_by_ofw_idx
	testq	%rax, %rax
	jne	LBB0_13
## %bb.8:
	leaq	-48(%rbp), %rbx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	-48(%rbp), %edi
	callq	_hwreset_deassert
	testl	%eax, %eax
	jne	LBB0_10
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	incl	%r13d
	movl	%r12d, %edi
	xorl	%esi, %esi
	movl	%r13d, %edx
	movq	%rbx, %rcx
	callq	_hwreset_get_by_ofw_idx
	testq	%rax, %rax
	je	LBB0_9
LBB0_13:
	leaq	L_.str.3(%rip), %rdx
	movl	%r12d, %edi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%r14, %rcx
	callq	_regulator_get_by_ofw_property
	movl	%r12d, %edi
	callq	_ofw_bus_get_node
	movq	%rax, -64(%rbp)
	movq	_awusb3phy_phynode_class@GOTPCREL(%rip), %rsi
	leaq	-64(%rbp), %rdx
	movl	%r12d, %edi
	callq	_phynode_create
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movq	%rax, %rdi
	callq	_phynode_register
	xorl	%r15d, %r15d
	testq	%rax, %rax
	jne	LBB0_17
LBB0_15:
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_16
LBB0_4:
	movl	%eax, %r15d
	movl	-44(%rbp), %edi
	callq	_clk_get_name
	leaq	L_.str.1(%rip), %rsi
	movl	%r12d, %edi
	movl	%eax, %edx
	jmp	LBB0_11
LBB0_10:
	movl	%eax, %r15d
	leaq	L_.str.2(%rip), %rsi
	movl	%r12d, %edi
	movl	%r13d, %edx
LBB0_11:
	xorl	%eax, %eax
	callq	_device_printf
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_aw_usb3phy_spec,4,2            ## @aw_usb3phy_spec
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot allocate resources for device\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.1:                               ## @.str.1
	.asciz	"couldn't enable clock %s\n"

L_.str.2:                               ## @.str.2
	.asciz	"couldn't de-assert reset %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"phy-supply"

	.comm	_awusb3phy_phynode_class,4,2    ## @awusb3phy_phynode_class
L_.str.4:                               ## @.str.4
	.asciz	"failed to create USB PHY\n"

	.no_dead_strip	_awusb3phy_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function awusb3phy_attach
_awusb3phy_attach:                      ; @awusb3phy_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	bl	_device_get_softc
	mov	x20, x0
	mov	x0, x19
	bl	_ofw_bus_get_node
	mov	x21, x0
Lloh0:
	adrp	x8, _aw_usb3phy_spec@GOTPAGE
Lloh1:
	ldr	x8, [x8, _aw_usb3phy_spec@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, x20, #4
	mov	x0, x19
	bl	_bus_alloc_resources
	cbz	x0, LBB0_4
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
LBB0_2:
	mov	x0, x19
	bl	_device_printf
Lloh5:
	adrp	x8, _ENXIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh7:
	ldr	w22, [x8]
LBB0_3:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_4:
	add	x3, sp, #20
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	bl	_clk_get_by_ofw_index
	cbnz	x0, LBB0_8
; %bb.5:
	mov	w23, #1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [sp, #20]
	bl	_clk_enable
	cbnz	w0, LBB0_16
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x3, sp, #20
	mov	x0, x19
	mov	w1, #0
	mov	x2, x23
	bl	_clk_get_by_ofw_index
	add	w23, w23, #1
	cbz	x0, LBB0_6
LBB0_8:
	add	x3, sp, #16
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	bl	_hwreset_get_by_ofw_idx
	cbnz	x0, LBB0_12
; %bb.9:
	mov	w23, #0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [sp, #16]
	bl	_hwreset_deassert
	cbnz	w0, LBB0_17
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	add	w23, w23, #1
	add	x3, sp, #16
	mov	x0, x19
	mov	w1, #0
	mov	x2, x23
	bl	_hwreset_get_by_ofw_idx
	cbz	x0, LBB0_10
LBB0_12:
Lloh8:
	adrp	x2, l_.str.3@PAGE
Lloh9:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	mov	x3, x20
	bl	_regulator_get_by_ofw_property
	mov	x0, x19
	bl	_ofw_bus_get_node
	str	x0, [sp, #24]
Lloh10:
	adrp	x1, _awusb3phy_phynode_class@GOTPAGE
Lloh11:
	ldr	x1, [x1, _awusb3phy_phynode_class@GOTPAGEOFF]
	add	x2, sp, #24
	mov	x0, x19
	bl	_phynode_create
	cbz	x0, LBB0_15
; %bb.13:
	bl	_phynode_register
	cbz	x0, LBB0_15
; %bb.14:
	mov	w22, #0
	b	LBB0_3
LBB0_15:
Lloh12:
	adrp	x1, l_.str.4@PAGE
Lloh13:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_2
LBB0_16:
	mov	x22, x0
	ldr	w0, [sp, #20]
	bl	_clk_get_name
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_18
LBB0_17:
	mov	x22, x0
	str	x23, [sp]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_18:
	mov	x0, x19
	bl	_device_printf
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_aw_usb3phy_spec,4,2            ; @aw_usb3phy_spec
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot allocate resources for device\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.1:                               ; @.str.1
	.asciz	"couldn't enable clock %s\n"

l_.str.2:                               ; @.str.2
	.asciz	"couldn't de-assert reset %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"phy-supply"

	.comm	_awusb3phy_phynode_class,4,2    ; @awusb3phy_phynode_class
l_.str.4:                               ; @.str.4
	.asciz	"failed to create USB PHY\n"

	.no_dead_strip	_awusb3phy_attach
.subsections_via_symbols
