	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rockchip_usb2phy_init
_rockchip_usb2phy_init:                 ## @rockchip_usb2phy_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_phy_get_drvdata
	movq	%rax, %r12
	movl	(%rbx), %edi
	callq	_dev_get_drvdata
	movq	%rax, %r15
	leaq	16(%r12), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	(%r12), %rax
	movq	_USB2PHY_PORT_OTG@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.1:
	movq	8(%r12), %rdx
	movq	_USB_DR_MODE_HOST@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_6
## %bb.2:
	movq	_USB_DR_MODE_UNKNOWN@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_6
## %bb.3:
	movl	(%r15), %edi
	movq	24(%r12), %rsi
	addq	$12, %rsi
	movl	$1, %edx
	callq	_property_enable
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.4:
	movl	(%r15), %edi
	movq	24(%r12), %rsi
	addq	$8, %rsi
	movl	$1, %edx
	callq	_property_enable
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.5:
	addq	$40, %r12
	movq	_OTG_SCHEDULE_DELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	(%rax,%rax,2), %esi
	jmp	LBB0_11
LBB0_7:
	movq	_USB2PHY_PORT_HOST@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.8:
	movl	(%r15), %edi
	movq	24(%r12), %rsi
	addq	$4, %rsi
	movl	$1, %edx
	callq	_property_enable
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.9:
	movl	(%r15), %edi
	movq	24(%r12), %rsi
	movl	$1, %edx
	callq	_property_enable
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.10:
	addq	$20, %r12
	movq	_SCHEDULE_DELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
LBB0_11:
	movq	%r12, %rdi
	callq	_schedule_delayed_work
	jmp	LBB0_12
LBB0_6:
	movq	32(%r12), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
LBB0_12:
	xorl	%ebx, %ebx
LBB0_13:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_USB2PHY_PORT_OTG,8,3           ## @USB2PHY_PORT_OTG
	.comm	_USB_DR_MODE_HOST,8,3           ## @USB_DR_MODE_HOST
	.comm	_USB_DR_MODE_UNKNOWN,8,3        ## @USB_DR_MODE_UNKNOWN
	.comm	_OTG_SCHEDULE_DELAY,4,2         ## @OTG_SCHEDULE_DELAY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mode %d\n"

	.comm	_USB2PHY_PORT_HOST,8,3          ## @USB2PHY_PORT_HOST
	.comm	_SCHEDULE_DELAY,4,2             ## @SCHEDULE_DELAY
	.no_dead_strip	_rockchip_usb2phy_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rockchip_usb2phy_init
_rockchip_usb2phy_init:                 ; @rockchip_usb2phy_init
	.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	x19, x0
	bl	_phy_get_drvdata
	mov	x20, x0
	ldr	w0, [x19]
	bl	_dev_get_drvdata
	mov	x21, x0
	add	x19, x20, #16
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _USB2PHY_PORT_OTG@GOTPAGE
Lloh1:
	ldr	x9, [x9, _USB2PHY_PORT_OTG@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	ldr	x2, [x20, #8]
Lloh3:
	adrp	x8, _USB_DR_MODE_HOST@GOTPAGE
Lloh4:
	ldr	x8, [x8, _USB_DR_MODE_HOST@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _USB_DR_MODE_UNKNOWN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _USB_DR_MODE_UNKNOWN@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x2, x8
	ccmp	x2, x9, #4, ne
	b.ne	LBB0_8
; %bb.2:
	ldr	x0, [x20, #32]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	b	LBB0_7
LBB0_3:
Lloh11:
	adrp	x9, _USB2PHY_PORT_HOST@GOTPAGE
Lloh12:
	ldr	x9, [x9, _USB2PHY_PORT_HOST@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.4:
	ldr	w0, [x21]
	ldr	x8, [x20, #24]
	add	x1, x8, #4
	mov	w2, #1
	bl	_property_enable
	mov	x22, x0
	cbnz	w0, LBB0_12
; %bb.5:
	ldr	w0, [x21]
	ldr	x1, [x20, #24]
	mov	w2, #1
	bl	_property_enable
	mov	x22, x0
	cbnz	w0, LBB0_12
; %bb.6:
	add	x0, x20, #20
Lloh14:
	adrp	x8, _SCHEDULE_DELAY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SCHEDULE_DELAY@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	b	LBB0_11
LBB0_7:
	mov	w22, #0
	b	LBB0_12
LBB0_8:
	ldr	w0, [x21]
	ldr	x8, [x20, #24]
	add	x1, x8, #12
	mov	w2, #1
	bl	_property_enable
	mov	x22, x0
	cbnz	w0, LBB0_12
; %bb.9:
	ldr	w0, [x21]
	ldr	x8, [x20, #24]
	add	x1, x8, #8
	mov	w2, #1
	bl	_property_enable
	mov	x22, x0
	cbnz	w0, LBB0_12
; %bb.10:
	add	x0, x20, #40
Lloh17:
	adrp	x8, _OTG_SCHEDULE_DELAY@GOTPAGE
Lloh18:
	ldr	x8, [x8, _OTG_SCHEDULE_DELAY@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	add	w1, w8, w8, lsl #1
LBB0_11:
	bl	_schedule_delayed_work
LBB0_12:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x22
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_USB2PHY_PORT_OTG,8,3           ; @USB2PHY_PORT_OTG
	.comm	_USB_DR_MODE_HOST,8,3           ; @USB_DR_MODE_HOST
	.comm	_USB_DR_MODE_UNKNOWN,8,3        ; @USB_DR_MODE_UNKNOWN
	.comm	_OTG_SCHEDULE_DELAY,4,2         ; @OTG_SCHEDULE_DELAY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mode %d\n"

	.comm	_USB2PHY_PORT_HOST,8,3          ; @USB2PHY_PORT_HOST
	.comm	_SCHEDULE_DELAY,4,2             ; @SCHEDULE_DELAY
	.no_dead_strip	_rockchip_usb2phy_init
.subsections_via_symbols
