	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sun4i_usb_phy_power_on
_sun4i_usb_phy_power_on:                ## @sun4i_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_phy_get_drvdata
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_to_sun4i_usb_phy_data
	cmpl	$0, 16(%rbx)
	je	LBB0_10
## %bb.1:
	cmpl	$0, (%rbx)
	je	LBB0_2
LBB0_10:
	xorl	%eax, %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%rax, %r14
	cmpq	$0, 8(%rbx)
	je	LBB0_3
LBB0_6:
	movl	16(%rbx), %edi
	callq	_regulator_enable
	testl	%eax, %eax
	jne	LBB0_11
## %bb.7:
	movl	$1, (%rbx)
	cmpq	$0, 8(%rbx)
	jne	LBB0_10
## %bb.8:
	movq	%r14, %rdi
	callq	_sun4i_usb_phy0_poll
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	_system_wq@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_DEBOUNCE_TIME@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rsi
	callq	_mod_delayed_work
	jmp	LBB0_10
LBB0_3:
	movq	%r14, %rdi
	callq	_sun4i_usb_phy0_have_vbus_det
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	cmpq	$0, 8(%r14)
	je	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_warn
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"External vbus detected, not enabling our own vbus\n"

	.comm	_system_wq,4,2                  ## @system_wq
	.comm	_DEBOUNCE_TIME,4,2              ## @DEBOUNCE_TIME
	.no_dead_strip	_sun4i_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 sun4i_usb_phy_power_on
_sun4i_usb_phy_power_on:                ; @sun4i_usb_phy_power_on
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x0
	bl	_phy_get_drvdata
	mov	x20, x0
	bl	_to_sun4i_usb_phy_data
	ldr	w8, [x20, #16]
	cbz	w8, LBB0_2
; %bb.1:
	ldr	w8, [x20]
	cbz	w8, LBB0_4
LBB0_2:
	mov	w0, #0
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	x19, x0
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_9
LBB0_5:
	ldr	w0, [x20, #16]
	bl	_regulator_enable
	cbnz	w0, LBB0_3
; %bb.6:
	mov	w8, #1
	str	w8, [x20]
	ldr	x8, [x20, #8]
	cbnz	x8, LBB0_2
; %bb.7:
	mov	x0, x19
	bl	_sun4i_usb_phy0_poll
	cbz	x0, LBB0_3
; %bb.8:
Lloh0:
	adrp	x8, _system_wq@GOTPAGE
Lloh1:
	ldr	x8, [x8, _system_wq@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _DEBOUNCE_TIME@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DEBOUNCE_TIME@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x1, x19
	bl	_mod_delayed_work
	b	LBB0_2
LBB0_9:
	mov	x0, x19
	bl	_sun4i_usb_phy0_have_vbus_det
	cbz	x0, LBB0_5
; %bb.10:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_5
; %bb.11:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_warn
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"External vbus detected, not enabling our own vbus\n"

	.comm	_system_wq,4,2                  ; @system_wq
	.comm	_DEBOUNCE_TIME,4,2              ; @DEBOUNCE_TIME
	.no_dead_strip	_sun4i_usb_phy_power_on
.subsections_via_symbols
