	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function awusbphy_phy_enable
_awusbphy_phy_enable:                   ## @awusbphy_phy_enable
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %rbx
	callq	_phynode_get_device
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_phynode_get_id
	movq	%rax, %r15
	movl	%r14d, %edi
	callq	_device_get_softc
	testq	%r15, %r15
	js	LBB0_2
## %bb.1:
	movq	%rax, %rbx
	movq	8(%rax), %rax
	cmpq	(%rax), %r15
	jge	LBB0_2
## %bb.3:
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movl	%r14d, %edi
	movq	%r15, %rsi
	callq	_awusbphy_configure
	movq	(%rbx), %rax
	movq	(%rax,%r15,8), %r13
	xorl	%r12d, %r12d
	testq	%r13, %r13
	je	LBB0_14
## %bb.4:
	testq	%r15, %r15
	je	LBB0_5
LBB0_9:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_11
## %bb.10:
	movq	%r13, %rdi
	callq	_regulator_enable
	jmp	LBB0_12
LBB0_2:
	movq	_ERANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_14:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	-48(%rbp), %rsi
	movl	%r14d, %edi
	callq	_awusbphy_vbus_detect
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.6:
	cmpl	$1, -48(%rbp)
	jne	LBB0_9
## %bb.7:
	movq	_bootverbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_14
## %bb.8:
	leaq	L_.str(%rip), %rsi
	xorl	%r12d, %r12d
	movl	%r14d, %edi
	xorl	%eax, %eax
	callq	_device_printf
	jmp	LBB0_14
LBB0_11:
	movq	%r13, %rdi
	callq	_regulator_disable
LBB0_12:
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_14
LBB0_13:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.2(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edi
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_device_printf
	movl	%ebx, %r12d
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_ERANGE,4,2                     ## @ERANGE
	.comm	_bootverbose,8,3                ## @bootverbose
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"External VBUS detected, not enabling the regulator\n"

L_.str.1:                               ## @.str.1
	.asciz	"couldn't %s regulator for phy %jd\n"

L_.str.2:                               ## @.str.2
	.asciz	"enable"

L_.str.3:                               ## @.str.3
	.asciz	"disable"

	.no_dead_strip	_awusbphy_phy_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function awusbphy_phy_enable
_awusbphy_phy_enable:                   ; @awusbphy_phy_enable
	.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	x20, x1
	mov	x21, x0
	bl	_phynode_get_device
	mov	x19, x0
	mov	x0, x21
	bl	_phynode_get_id
	mov	x21, x0
	mov	x0, x19
	bl	_device_get_softc
	tbnz	x21, #63, LBB0_6
; %bb.1:
	mov	x22, x0
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
	cmp	x21, x8
	b.ge	LBB0_6
; %bb.2:
	mov	x0, x19
	mov	x1, x21
	bl	_awusbphy_configure
	ldr	x8, [x22]
	ldr	x23, [x8, x21, lsl #3]
	cbz	x23, LBB0_12
; %bb.3:
	cbz	x21, LBB0_8
LBB0_4:
	mov	x0, x23
	cbz	w20, LBB0_13
; %bb.5:
	bl	_regulator_enable
	mov	x22, x0
	cbnz	w0, LBB0_14
	b	LBB0_7
LBB0_6:
Lloh0:
	adrp	x8, _ERANGE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
LBB0_7:
	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_8:
	add	x1, sp, #28
	mov	x0, x19
	bl	_awusbphy_vbus_detect
	mov	x22, x0
	cbnz	w0, LBB0_14
; %bb.9:
	ldr	w8, [sp, #28]
	cmp	w8, #1
	b.ne	LBB0_4
; %bb.10:
Lloh3:
	adrp	x8, _bootverbose@GOTPAGE
Lloh4:
	ldr	x8, [x8, _bootverbose@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cbz	x8, LBB0_12
; %bb.11:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_device_printf
	mov	w22, #0
	b	LBB0_7
LBB0_12:
	mov	w22, #0
	b	LBB0_7
LBB0_13:
	bl	_regulator_disable
	mov	x22, x0
	cbz	w0, LBB0_7
LBB0_14:
Lloh8:
	adrp	x8, l_.str.2@PAGE
Lloh9:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh10:
	adrp	x9, l_.str.3@PAGE
Lloh11:
	add	x9, x9, l_.str.3@PAGEOFF
	cmp	w20, #0
	csel	x8, x9, x8, eq
	stp	x8, x21, [sp]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_device_printf
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ERANGE,4,2                     ; @ERANGE
	.comm	_bootverbose,8,3                ; @bootverbose
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"External VBUS detected, not enabling the regulator\n"

l_.str.1:                               ; @.str.1
	.asciz	"couldn't %s regulator for phy %jd\n"

l_.str.2:                               ; @.str.2
	.asciz	"enable"

l_.str.3:                               ; @.str.3
	.asciz	"disable"

	.no_dead_strip	_awusbphy_phy_enable
.subsections_via_symbols
