	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgene_phy_hw_init
_xgene_phy_hw_init:                     ## @xgene_phy_hw_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	callq	_phy_get_drvdata
	movq	%rax, %r15
	movq	_CLK_EXT_DIFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SSC_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_xgene_phy_hw_initialize
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r14d
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_8
LBB0_2:
	movl	4(%r15), %edi
	callq	_IS_ERR
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movl	4(%r15), %edi
	callq	_clk_prepare_enable
	movl	4(%r15), %edi
	callq	_clk_disable_unprepare
	movl	4(%r15), %edi
	callq	_clk_prepare_enable
LBB0_4:
	movq	_MAX_LANE@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_7
## %bb.5:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_xgene_phy_gen_avg_val
	incl	%ebx
	cmpl	(%r14), %ebx
	jl	LBB0_6
LBB0_7:
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_dbg
	xorl	%r14d, %r14d
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CLK_EXT_DIFF,4,2               ## @CLK_EXT_DIFF
	.comm	_SSC_DISABLE,4,2                ## @SSC_DISABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PHY initialize failed %d\n"

	.comm	_MAX_LANE,4,2                   ## @MAX_LANE
L_.str.1:                               ## @.str.1
	.asciz	"PHY initialized\n"

	.no_dead_strip	_xgene_phy_hw_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgene_phy_hw_init
_xgene_phy_hw_init:                     ; @xgene_phy_hw_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
	bl	_phy_get_drvdata
	mov	x19, x0
Lloh0:
	adrp	x8, _CLK_EXT_DIFF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CLK_EXT_DIFF@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _SSC_DISABLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SSC_DISABLE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	bl	_xgene_phy_hw_initialize
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
	ldr	w0, [x19]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
	b	LBB0_8
LBB0_2:
	ldr	w0, [x19, #4]
	bl	_IS_ERR
	cbnz	w0, LBB0_4
; %bb.3:
	ldr	w0, [x19, #4]
	bl	_clk_prepare_enable
	ldr	w0, [x19, #4]
	bl	_clk_disable_unprepare
	ldr	w0, [x19, #4]
	bl	_clk_prepare_enable
LBB0_4:
Lloh8:
	adrp	x21, _MAX_LANE@GOTPAGE
Lloh9:
	ldr	x21, [x21, _MAX_LANE@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.5:
	mov	w20, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_xgene_phy_gen_avg_val
	add	w20, w20, #1
	ldr	w8, [x21]
	cmp	w20, w8
	b.lt	LBB0_6
LBB0_7:
	ldr	w0, [x19]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	mov	w20, #0
LBB0_8:
	mov	x0, x20
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_CLK_EXT_DIFF,4,2               ; @CLK_EXT_DIFF
	.comm	_SSC_DISABLE,4,2                ; @SSC_DISABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PHY initialize failed %d\n"

	.comm	_MAX_LANE,4,2                   ; @MAX_LANE
l_.str.1:                               ; @.str.1
	.asciz	"PHY initialized\n"

	.no_dead_strip	_xgene_phy_hw_init
.subsections_via_symbols
