	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ralink_usb_phy_power_on
_ralink_usb_phy_power_on:               ## @ralink_usb_phy_power_on
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	callq	_phy_get_drvdata
	movq	%rax, %rbx
	movq	_RT_SYSC_REG_CLKCFG1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%rbx), %edi
	movl	32(%rbx), %ecx
	movl	%ecx, %edx
	callq	_regmap_update_bits
	movl	8(%rbx), %edi
	movq	_RT_SYSC_REG_SYSCFG1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RT_SYSCFG1_USB0_HOST_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, %edx
	callq	_regmap_update_bits
	movl	28(%rbx), %edi
	callq	_reset_control_deassert
	movl	24(%rbx), %edi
	callq	_reset_control_deassert
	movl	$10, %edi
	callq	_mdelay
	cmpq	$0, 16(%rbx)
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_ralink_usb_phy_init
LBB0_2:
	movl	8(%rbx), %edi
	movq	_RT_SYSC_REG_USB_PHY_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-12(%rbp), %rdx
	callq	_regmap_read
	movq	(%rbx), %rdi
	movq	_UDEV_WAKEUP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-12(%rbp), %eax
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_info
	movq	_USB_PHY_UTMI_8B60M@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-12(%rbp), %eax
	movq	(%rbx), %rdi
	leaq	L_.str.4(%rip), %rax
	leaq	L_.str.3(%rip), %rsi
	cmoveq	%rax, %rsi
	xorl	%eax, %eax
	callq	_dev_info
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RT_SYSC_REG_CLKCFG1,4,2        ## @RT_SYSC_REG_CLKCFG1
	.comm	_RT_SYSC_REG_SYSCFG1,4,2        ## @RT_SYSC_REG_SYSCFG1
	.comm	_RT_SYSCFG1_USB0_HOST_MODE,4,2  ## @RT_SYSCFG1_USB0_HOST_MODE
	.comm	_RT_SYSC_REG_USB_PHY_CFG,4,2    ## @RT_SYSC_REG_USB_PHY_CFG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"remote usb device wakeup %s\n"

	.comm	_UDEV_WAKEUP,4,2                ## @UDEV_WAKEUP
L_.str.1:                               ## @.str.1
	.asciz	"enabled"

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

	.comm	_USB_PHY_UTMI_8B60M,4,2         ## @USB_PHY_UTMI_8B60M
L_.str.3:                               ## @.str.3
	.asciz	"UTMI 8bit 60MHz\n"

L_.str.4:                               ## @.str.4
	.asciz	"UTMI 16bit 30MHz\n"

	.no_dead_strip	_ralink_usb_phy_power_on
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ralink_usb_phy_power_on
_ralink_usb_phy_power_on:               ; @ralink_usb_phy_power_on
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	bl	_phy_get_drvdata
	mov	x19, x0
	ldr	w0, [x0, #8]
Lloh0:
	adrp	x8, _RT_SYSC_REG_CLKCFG1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RT_SYSC_REG_CLKCFG1@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	w2, [x19, #32]
	mov	x3, x2
	bl	_regmap_update_bits
	ldr	w0, [x19, #8]
Lloh3:
	adrp	x8, _RT_SYSC_REG_SYSCFG1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RT_SYSC_REG_SYSCFG1@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _RT_SYSCFG1_USB0_HOST_MODE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RT_SYSCFG1_USB0_HOST_MODE@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x3, x2
	bl	_regmap_update_bits
	ldr	w0, [x19, #28]
	bl	_reset_control_deassert
	ldr	w0, [x19, #24]
	bl	_reset_control_deassert
	mov	w0, #10
	bl	_mdelay
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_ralink_usb_phy_init
LBB0_2:
	ldr	w0, [x19, #8]
Lloh9:
	adrp	x8, _RT_SYSC_REG_USB_PHY_CFG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RT_SYSC_REG_USB_PHY_CFG@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
	ldr	x0, [x19]
	ldr	w8, [sp, #12]
Lloh12:
	adrp	x9, _UDEV_WAKEUP@GOTPAGE
Lloh13:
	ldr	x9, [x9, _UDEV_WAKEUP@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
Lloh15:
	adrp	x10, l_.str.1@PAGE
Lloh16:
	add	x10, x10, l_.str.1@PAGEOFF
Lloh17:
	adrp	x11, l_.str.2@PAGE
Lloh18:
	add	x11, x11, l_.str.2@PAGEOFF
	tst	w9, w8
	csel	x8, x11, x10, eq
	str	x8, [sp]
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
	ldr	w8, [sp, #12]
Lloh21:
	adrp	x9, _USB_PHY_UTMI_8B60M@GOTPAGE
Lloh22:
	ldr	x9, [x9, _USB_PHY_UTMI_8B60M@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	ldr	x0, [x19]
Lloh24:
	adrp	x10, l_.str.3@PAGE
Lloh25:
	add	x10, x10, l_.str.3@PAGEOFF
Lloh26:
	adrp	x11, l_.str.4@PAGE
Lloh27:
	add	x11, x11, l_.str.4@PAGEOFF
	tst	w9, w8
	csel	x1, x11, x10, eq
	bl	_dev_info
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_RT_SYSC_REG_CLKCFG1,4,2        ; @RT_SYSC_REG_CLKCFG1
	.comm	_RT_SYSC_REG_SYSCFG1,4,2        ; @RT_SYSC_REG_SYSCFG1
	.comm	_RT_SYSCFG1_USB0_HOST_MODE,4,2  ; @RT_SYSCFG1_USB0_HOST_MODE
	.comm	_RT_SYSC_REG_USB_PHY_CFG,4,2    ; @RT_SYSC_REG_USB_PHY_CFG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"remote usb device wakeup %s\n"

	.comm	_UDEV_WAKEUP,4,2                ; @UDEV_WAKEUP
l_.str.1:                               ; @.str.1
	.asciz	"enabled"

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

	.comm	_USB_PHY_UTMI_8B60M,4,2         ; @USB_PHY_UTMI_8B60M
l_.str.3:                               ; @.str.3
	.asciz	"UTMI 8bit 60MHz\n"

l_.str.4:                               ; @.str.4
	.asciz	"UTMI 16bit 30MHz\n"

	.no_dead_strip	_ralink_usb_phy_power_on
.subsections_via_symbols
