	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function awusbphy_init
_awusbphy_init:                         ## @awusbphy_init
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r12d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_device_get_softc
	movq	%rax, %r14
	movl	%r12d, %edi
	callq	_ofw_bus_get_node
	movl	%eax, %ebx
	movq	_compat_data@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edi
	callq	_ofw_bus_search_compatible
	movq	(%rax), %rax
	movq	%rax, 24(%r14)
	leaq	L_.str(%rip), %rsi
	leaq	L_.str.1(%rip), %rdx
	leaq	-96(%rbp), %rcx
	movl	%ebx, %edi
	callq	_ofw_bus_find_string_index
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_2
LBB0_3:
	movq	_SYS_RES_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RF_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-96(%rbp), %rdx
	movl	%r12d, %edi
	callq	_bus_alloc_resource_any
	movq	%rax, 40(%r14)
	testq	%rax, %rax
	je	LBB0_24
## %bb.4:
	movl	%ebx, -88(%rbp)                 ## 4-byte Spill
	leaq	-84(%rbp), %rcx
	movl	%r12d, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_clk_get_by_ofw_index
	testq	%rax, %rax
	jne	LBB0_8
## %bb.5:
	movl	$1, %ebx
	leaq	-84(%rbp), %r15
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	-84(%rbp), %edi
	callq	_clk_enable
	testl	%eax, %eax
	jne	LBB0_29
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	%r12d, %edi
	xorl	%esi, %esi
	movl	%ebx, %edx
	movq	%r15, %rcx
	callq	_clk_get_by_ofw_index
	incl	%ebx
	testq	%rax, %rax
	je	LBB0_6
LBB0_8:
	xorl	%r15d, %r15d
	leaq	-92(%rbp), %rcx
	movl	%r12d, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_hwreset_get_by_ofw_idx
	testq	%rax, %rax
	jne	LBB0_14
## %bb.9:
	leaq	-92(%rbp), %rbx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	-92(%rbp), %edi
	callq	_hwreset_deassert
	testl	%eax, %eax
	jne	LBB0_11
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	incl	%r15d
	movl	%r12d, %edi
	xorl	%esi, %esi
	movl	%r15d, %edx
	movq	%rbx, %rcx
	callq	_hwreset_get_by_ofw_idx
	testq	%rax, %rax
	je	LBB0_10
LBB0_14:
	leaq	36(%r14), %rcx
	leaq	L_.str.6(%rip), %rdx
	movl	%r12d, %edi
	movl	-88(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	callq	_gpio_pin_get_by_ofw_property
	testl	%eax, %eax
	jne	LBB0_16
## %bb.15:
	movl	$1, (%r14)
LBB0_16:
	movq	%r14, %rcx
	addq	$32, %rcx
	leaq	L_.str.7(%rip), %rdx
	movl	%r12d, %edi
	movl	%ebx, %esi
	callq	_gpio_pin_get_by_ofw_property
	testl	%eax, %eax
	jne	LBB0_18
## %bb.17:
	movl	$1, 4(%r14)
LBB0_18:
	movq	24(%r14), %rax
	movl	(%rax), %edi
	shll	$2, %edi
	movq	_M_DEVBUF@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	_M_WAITOK@GOTPCREL(%rip), %r15
	movq	_M_ZERO@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	orl	(%r15), %edx
	callq	_malloc
	movq	%rax, 16(%r14)
	movq	24(%r14), %rax
	movl	(%rax), %edi
	shll	$3, %edi
	movl	(%r13), %esi
	movl	(%rbx), %edx
	orl	(%r15), %edx
	callq	_malloc
	movq	%rax, 8(%r14)
	movq	24(%r14), %rax
	cmpl	$0, (%rax)
	jle	LBB0_26
## %bb.19:
	xorl	%ebx, %ebx
	leaq	-80(%rbp), %r13
	leaq	-96(%rbp), %r15
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_20 Depth=1
	incq	%rbx
	movq	24(%r14), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %rbx
	jge	LBB0_26
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	$20, %esi
	leaq	L_.str.8(%rip), %rdx
	movl	%ebx, %ecx
	callq	_snprintf
	movl	%r12d, %edi
	xorl	%esi, %esi
	movq	%r13, %rdx
	leaq	-100(%rbp), %rcx
	callq	_regulator_get_by_ofw_property
	testq	%rax, %rax
	jne	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=1
	movl	-100(%rbp), %eax
	movq	16(%r14), %rcx
	movl	%eax, (%rcx,%rbx,4)
LBB0_22:                                ##   in Loop: Header=BB0_20 Depth=1
	movq	%r13, %rdi
	movl	$20, %esi
	leaq	L_.str.9(%rip), %rdx
	movl	%ebx, %ecx
	callq	_snprintf
	movl	-88(%rbp), %edi                 ## 4-byte Reload
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdx
	movq	%r15, %rcx
	callq	_ofw_bus_find_string_index
	testq	%rax, %rax
	jne	LBB0_25
## %bb.23:                              ##   in Loop: Header=BB0_20 Depth=1
	movq	_SYS_RES_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RF_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r12d, %edi
	movq	%r15, %rdx
	callq	_bus_alloc_resource_any
	movq	8(%r14), %rcx
	movq	%rax, (%rcx,%rbx,8)
	movq	8(%r14), %rax
	cmpq	$0, (%rax,%rbx,8)
	jne	LBB0_25
LBB0_24:
	leaq	L_.str.3(%rip), %rsi
LBB0_2:
	movl	%r12d, %edi
	xorl	%eax, %eax
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_27:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_30
## %bb.28:
	movl	%r13d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:
	xorl	%r13d, %r13d
	jmp	LBB0_27
LBB0_29:
	movl	%eax, %r13d
	movl	-84(%rbp), %edi
	callq	_clk_get_name
	leaq	L_.str.4(%rip), %rsi
	movl	%r12d, %edi
	movl	%eax, %edx
	jmp	LBB0_12
LBB0_11:
	movl	%eax, %r13d
	leaq	L_.str.5(%rip), %rsi
	movl	%r12d, %edi
	movl	%r15d, %edx
LBB0_12:
	xorl	%eax, %eax
	callq	_device_printf
	jmp	LBB0_27
LBB0_30:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_compat_data,4,2                ## @compat_data
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reg-names"

L_.str.1:                               ## @.str.1
	.asciz	"phy_ctrl"

L_.str.2:                               ## @.str.2
	.asciz	"Cannot locate phy control resource\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_SYS_RES_MEMORY,4,2             ## @SYS_RES_MEMORY
	.comm	_RF_ACTIVE,4,2                  ## @RF_ACTIVE
L_.str.3:                               ## @.str.3
	.asciz	"Cannot allocate resource\n"

L_.str.4:                               ## @.str.4
	.asciz	"couldn't enable clock %s\n"

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

L_.str.6:                               ## @.str.6
	.asciz	"usb0_id_det-gpios"

L_.str.7:                               ## @.str.7
	.asciz	"usb0_vbus_det-gpios"

	.comm	_M_DEVBUF,4,2                   ## @M_DEVBUF
	.comm	_M_WAITOK,4,2                   ## @M_WAITOK
	.comm	_M_ZERO,4,2                     ## @M_ZERO
L_.str.8:                               ## @.str.8
	.asciz	"usb%d_vbus-supply"

L_.str.9:                               ## @.str.9
	.asciz	"pmu%d"

	.no_dead_strip	_awusbphy_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function awusbphy_init
_awusbphy_init:                         ; @awusbphy_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	bl	_device_get_softc
	mov	x20, x0
	mov	x0, x19
	bl	_ofw_bus_get_node
	mov	x21, x0
Lloh3:
	adrp	x8, _compat_data@GOTPAGE
Lloh4:
	ldr	x8, [x8, _compat_data@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ofw_bus_search_compatible
	ldr	x8, [x0]
	str	x8, [x20, #24]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
Lloh8:
	adrp	x2, l_.str.1@PAGE
Lloh9:
	add	x2, x2, l_.str.1@PAGEOFF
	add	x3, sp, #32
	mov	x0, x21
	bl	_ofw_bus_find_string_index
	cbz	x0, LBB0_2
; %bb.1:
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_23
LBB0_2:
Lloh12:
	adrp	x26, _SYS_RES_MEMORY@GOTPAGE
Lloh13:
	ldr	x26, [x26, _SYS_RES_MEMORY@GOTPAGEOFF]
	ldr	w1, [x26]
Lloh14:
	adrp	x27, _RF_ACTIVE@GOTPAGE
Lloh15:
	ldr	x27, [x27, _RF_ACTIVE@GOTPAGEOFF]
	ldr	w3, [x27]
	add	x2, sp, #32
	mov	x0, x19
	bl	_bus_alloc_resource_any
	str	x0, [x20, #40]
	cbz	x0, LBB0_22
; %bb.3:
	add	x3, sp, #20
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	bl	_clk_get_by_ofw_index
	cbnz	x0, LBB0_7
; %bb.4:
	mov	w23, #1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [sp, #20]
	bl	_clk_enable
	cbnz	w0, LBB0_27
; %bb.6:                                ;   in Loop: Header=BB0_5 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_5
LBB0_7:
	add	x3, sp, #24
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	bl	_hwreset_get_by_ofw_idx
	cbnz	x0, LBB0_11
; %bb.8:
	mov	w23, #0
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [sp, #24]
	bl	_hwreset_deassert
	cbnz	w0, LBB0_28
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	w23, w23, #1
	add	x3, sp, #24
	mov	x0, x19
	mov	w1, #0
	mov	x2, x23
	bl	_hwreset_get_by_ofw_idx
	cbz	x0, LBB0_9
LBB0_11:
	add	x3, x20, #36
Lloh16:
	adrp	x2, l_.str.6@PAGE
Lloh17:
	add	x2, x2, l_.str.6@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	bl	_gpio_pin_get_by_ofw_property
	cbnz	w0, LBB0_13
; %bb.12:
	mov	w8, #1
	str	w8, [x20]
LBB0_13:
	add	x3, x20, #32
Lloh18:
	adrp	x2, l_.str.7@PAGE
Lloh19:
	add	x2, x2, l_.str.7@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	bl	_gpio_pin_get_by_ofw_property
	cbnz	w0, LBB0_15
; %bb.14:
	mov	w8, #1
	str	w8, [x20, #4]
LBB0_15:
	ldr	x8, [x20, #24]
	ldr	w8, [x8]
	lsl	w0, w8, #2
Lloh20:
	adrp	x22, _M_DEVBUF@GOTPAGE
Lloh21:
	ldr	x22, [x22, _M_DEVBUF@GOTPAGEOFF]
Lloh22:
	adrp	x23, _M_WAITOK@GOTPAGE
Lloh23:
	ldr	x23, [x23, _M_WAITOK@GOTPAGEOFF]
	ldr	w1, [x22]
	ldr	w8, [x23]
Lloh24:
	adrp	x24, _M_ZERO@GOTPAGE
Lloh25:
	ldr	x24, [x24, _M_ZERO@GOTPAGEOFF]
	ldr	w9, [x24]
	orr	w2, w9, w8
	bl	_malloc
	str	x0, [x20, #16]
	ldr	x8, [x20, #24]
	ldr	w8, [x8]
	lsl	w0, w8, #3
	ldr	w1, [x22]
	ldr	w8, [x23]
	ldr	w9, [x24]
	orr	w2, w9, w8
	bl	_malloc
	str	x0, [x20, #8]
	ldr	x8, [x20, #24]
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_26
; %bb.16:
	mov	x22, #0
Lloh26:
	adrp	x23, l_.str.8@PAGE
Lloh27:
	add	x23, x23, l_.str.8@PAGEOFF
Lloh28:
	adrp	x24, l_.str.9@PAGE
Lloh29:
	add	x24, x24, l_.str.9@PAGEOFF
Lloh30:
	adrp	x25, l_.str@PAGE
Lloh31:
	add	x25, x25, l_.str@PAGEOFF
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=1
	add	x22, x22, #1
	ldr	x8, [x20, #24]
	ldrsw	x8, [x8]
	cmp	x22, x8
	b.ge	LBB0_26
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #36
	mov	w1, #20
	mov	x2, x23
	mov	x3, x22
	bl	_snprintf
	add	x2, sp, #36
	add	x3, sp, #28
	mov	x0, x19
	mov	w1, #0
	bl	_regulator_get_by_ofw_property
	cbnz	x0, LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	w8, [sp, #28]
	ldr	x9, [x20, #16]
	str	w8, [x9, x22, lsl #2]
LBB0_20:                                ;   in Loop: Header=BB0_18 Depth=1
	add	x0, sp, #36
	mov	w1, #20
	mov	x2, x24
	mov	x3, x22
	bl	_snprintf
	add	x2, sp, #36
	add	x3, sp, #32
	mov	x0, x21
	mov	x1, x25
	bl	_ofw_bus_find_string_index
	cbnz	x0, LBB0_17
; %bb.21:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	w1, [x26]
	ldr	w3, [x27]
	add	x2, sp, #32
	mov	x0, x19
	bl	_bus_alloc_resource_any
	ldr	x8, [x20, #8]
	lsl	x9, x22, #3
	str	x0, [x8, x9]
	ldr	x8, [x20, #8]
	ldr	x8, [x8, x9]
	cbnz	x8, LBB0_17
LBB0_22:
Lloh32:
	adrp	x1, l_.str.3@PAGE
Lloh33:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_23:
	mov	x0, x19
	bl	_device_printf
Lloh34:
	adrp	x8, _ENXIO@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh36:
	ldr	w22, [x8]
LBB0_24:
	ldr	x8, [sp, #56]
Lloh37:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh38:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh39:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_30
; %bb.25:
	mov	x0, x22
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_26:
	mov	w22, #0
	b	LBB0_24
LBB0_27:
	mov	x22, x0
	ldr	w0, [sp, #20]
	bl	_clk_get_name
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh40:
	adrp	x1, l_.str.4@PAGE
Lloh41:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_29
LBB0_28:
	mov	x22, x0
	str	x23, [sp]
Lloh42:
	adrp	x1, l_.str.5@PAGE
Lloh43:
	add	x1, x1, l_.str.5@PAGEOFF
LBB0_29:
	mov	x0, x19
	bl	_device_printf
	b	LBB0_24
LBB0_30:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_compat_data,4,2                ; @compat_data
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reg-names"

l_.str.1:                               ; @.str.1
	.asciz	"phy_ctrl"

l_.str.2:                               ; @.str.2
	.asciz	"Cannot locate phy control resource\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_SYS_RES_MEMORY,4,2             ; @SYS_RES_MEMORY
	.comm	_RF_ACTIVE,4,2                  ; @RF_ACTIVE
l_.str.3:                               ; @.str.3
	.asciz	"Cannot allocate resource\n"

l_.str.4:                               ; @.str.4
	.asciz	"couldn't enable clock %s\n"

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

l_.str.6:                               ; @.str.6
	.asciz	"usb0_id_det-gpios"

l_.str.7:                               ; @.str.7
	.asciz	"usb0_vbus_det-gpios"

	.comm	_M_DEVBUF,4,2                   ; @M_DEVBUF
	.comm	_M_WAITOK,4,2                   ; @M_WAITOK
	.comm	_M_ZERO,4,2                     ; @M_ZERO
l_.str.8:                               ; @.str.8
	.asciz	"usb%d_vbus-supply"

l_.str.9:                               ; @.str.9
	.asciz	"pmu%d"

	.no_dead_strip	_awusbphy_init
.subsections_via_symbols
