	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dm816x_usb_phy_init
_dm816x_usb_phy_init:                   ## @dm816x_usb_phy_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	callq	_phy_get_drvdata
	movq	%rax, %rbx
	movl	16(%rax), %edi
	callq	_clk_get_rate
	cmpl	$24000000, %eax                 ## imm = 0x16E3600
	je	LBB0_2
## %bb.1:
	movl	8(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
LBB0_2:
	movl	4(%rbx), %edi
	movq	_DM816X_USB_CTRL_PHYCLKSRC@GOTPCREL(%rip), %rax
	movq	_DM816X_USB_CTRL_PHYSLEEP1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movl	12(%rbx), %esi
	movq	_DM816X_USB_CTRL_PHYSLEEP0@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	xorl	%ecx, %ecx
	callq	_regmap_update_bits
	movl	4(%rbx), %edi
	movl	12(%rbx), %esi
	leaq	-12(%rbp), %rdx
	callq	_regmap_read
	movl	-12(%rbp), %edx
	testb	$3, %dl
	je	LBB0_4
## %bb.3:
	movl	8(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_info
LBB0_4:
	movl	(%rbx), %esi
	movl	4(%rbx), %edi
	leaq	-12(%rbp), %rdx
	callq	_regmap_read
	movq	_DM816X_USBPHY_CTRL_TXRISETUNE@GOTPCREL(%rip), %rax
	movq	_DM816X_USBPHY_CTRL_TXVREFTUNE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_DM816X_USBPHY_CTRL_TXPREEMTUNE@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	orl	-12(%rbp), %edx
	movl	%edx, -12(%rbp)
	movl	(%rbx), %esi
	movl	4(%rbx), %edi
	callq	_regmap_write
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"nonstandard phy refclk\n"

	.comm	_DM816X_USB_CTRL_PHYCLKSRC,4,2  ## @DM816X_USB_CTRL_PHYCLKSRC
	.comm	_DM816X_USB_CTRL_PHYSLEEP1,4,2  ## @DM816X_USB_CTRL_PHYSLEEP1
	.comm	_DM816X_USB_CTRL_PHYSLEEP0,4,2  ## @DM816X_USB_CTRL_PHYSLEEP0
L_.str.1:                               ## @.str.1
	.asciz	"Working dm816x USB_CTRL! (0x%08x)\n"

	.comm	_DM816X_USBPHY_CTRL_TXRISETUNE,4,2 ## @DM816X_USBPHY_CTRL_TXRISETUNE
	.comm	_DM816X_USBPHY_CTRL_TXVREFTUNE,4,2 ## @DM816X_USBPHY_CTRL_TXVREFTUNE
	.comm	_DM816X_USBPHY_CTRL_TXPREEMTUNE,4,2 ## @DM816X_USBPHY_CTRL_TXPREEMTUNE
	.no_dead_strip	_dm816x_usb_phy_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dm816x_usb_phy_init
_dm816x_usb_phy_init:                   ; @dm816x_usb_phy_init
	.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, #16]
	bl	_clk_get_rate
	mov	w8, #13824
	movk	w8, #366, lsl #16
	cmp	w0, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	w0, [x19, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
LBB0_2:
	ldr	w0, [x19, #4]
	ldr	w1, [x19, #12]
Lloh2:
	adrp	x8, _DM816X_USB_CTRL_PHYCLKSRC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DM816X_USB_CTRL_PHYCLKSRC@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _DM816X_USB_CTRL_PHYSLEEP1@GOTPAGE
Lloh6:
	ldr	x9, [x9, _DM816X_USB_CTRL_PHYSLEEP1@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh8:
	adrp	x9, _DM816X_USB_CTRL_PHYSLEEP0@GOTPAGE
Lloh9:
	ldr	x9, [x9, _DM816X_USB_CTRL_PHYSLEEP0@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	w3, #0
	bl	_regmap_update_bits
	ldr	w0, [x19, #4]
	ldr	w1, [x19, #12]
	add	x2, sp, #12
	bl	_regmap_read
	ldr	w2, [sp, #12]
	tst	w2, #0x3
	b.eq	LBB0_4
; %bb.3:
	ldr	w0, [x19, #8]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_info
LBB0_4:
	ldp	w1, w0, [x19]
	add	x2, sp, #12
	bl	_regmap_read
Lloh13:
	adrp	x8, _DM816X_USBPHY_CTRL_TXRISETUNE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DM816X_USBPHY_CTRL_TXRISETUNE@GOTPAGEOFF]
Lloh15:
	adrp	x9, _DM816X_USBPHY_CTRL_TXVREFTUNE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _DM816X_USBPHY_CTRL_TXVREFTUNE@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh19:
	adrp	x9, _DM816X_USBPHY_CTRL_TXPREEMTUNE@GOTPAGE
Lloh20:
	ldr	x9, [x9, _DM816X_USBPHY_CTRL_TXPREEMTUNE@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	w9, [sp, #12]
	orr	w2, w8, w9
	str	w2, [sp, #12]
	ldp	w1, w0, [x19]
	bl	_regmap_write
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"nonstandard phy refclk\n"

	.comm	_DM816X_USB_CTRL_PHYCLKSRC,4,2  ; @DM816X_USB_CTRL_PHYCLKSRC
	.comm	_DM816X_USB_CTRL_PHYSLEEP1,4,2  ; @DM816X_USB_CTRL_PHYSLEEP1
	.comm	_DM816X_USB_CTRL_PHYSLEEP0,4,2  ; @DM816X_USB_CTRL_PHYSLEEP0
l_.str.1:                               ; @.str.1
	.asciz	"Working dm816x USB_CTRL! (0x%08x)\n"

	.comm	_DM816X_USBPHY_CTRL_TXRISETUNE,4,2 ; @DM816X_USBPHY_CTRL_TXRISETUNE
	.comm	_DM816X_USBPHY_CTRL_TXVREFTUNE,4,2 ; @DM816X_USBPHY_CTRL_TXVREFTUNE
	.comm	_DM816X_USBPHY_CTRL_TXPREEMTUNE,4,2 ; @DM816X_USBPHY_CTRL_TXPREEMTUNE
	.no_dead_strip	_dm816x_usb_phy_init
.subsections_via_symbols
