	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hclge_get_mdix_mode
_hclge_get_mdix_mode:                   ## @hclge_get_mdix_mode
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	callq	_hclge_get_vport
	movq	(%rax), %rax
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	_HCLGE_PHY_PAGE_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HCLGE_PHY_PAGE_MDIX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_phy_write
	movq	_HCLGE_PHY_CSC_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_phy_read
	movq	_HCLGE_PHY_MDIX_CTRL_M@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_HCLGE_PHY_MDIX_CTRL_S@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	callq	_hnae3_get_field
	movl	%eax, %r12d
	movq	_HCLGE_PHY_CSS_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_phy_read
	movl	%eax, %r14d
	movq	_HCLGE_PHY_MDIX_STATUS_B@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_hnae3_get_bit
	movl	%eax, %r13d
	movq	_HCLGE_PHY_SPEED_DUP_RESOLVE_B@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_hnae3_get_bit
	movl	%eax, %r14d
	movq	_HCLGE_PHY_PAGE_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HCLGE_PHY_PAGE_COPPER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_phy_write
	movq	_ETH_TP_MDI_INVALID@GOTPCREL(%rip), %rax
	movq	%rax, %rcx
	cmpl	$3, %r12d
	ja	LBB0_4
## %bb.3:
	movslq	%r12d, %rcx
	leaq	l_switch.table.hclge_get_mdix_mode(%rip), %rdx
	movq	(%rdx,%rcx,8), %rcx
LBB0_4:
	movl	(%rcx), %ecx
	movl	%ecx, (%r15)
	testl	%r14d, %r14d
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_8
## %bb.5:
	testl	%r13d, %r13d
	jne	LBB0_6
## %bb.7:
	movq	_ETH_TP_MDI@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_1:
	movq	_ETH_TP_MDI_INVALID@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, (%r15)
	jmp	LBB0_8
LBB0_6:
	movq	_ETH_TP_MDI_X@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
	movl	%eax, (%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ETH_TP_MDI_INVALID,4,2         ## @ETH_TP_MDI_INVALID
	.comm	_HCLGE_PHY_PAGE_REG,4,2         ## @HCLGE_PHY_PAGE_REG
	.comm	_HCLGE_PHY_PAGE_MDIX,4,2        ## @HCLGE_PHY_PAGE_MDIX
	.comm	_HCLGE_PHY_CSC_REG,4,2          ## @HCLGE_PHY_CSC_REG
	.comm	_HCLGE_PHY_MDIX_CTRL_M,4,2      ## @HCLGE_PHY_MDIX_CTRL_M
	.comm	_HCLGE_PHY_MDIX_CTRL_S,4,2      ## @HCLGE_PHY_MDIX_CTRL_S
	.comm	_HCLGE_PHY_CSS_REG,4,2          ## @HCLGE_PHY_CSS_REG
	.comm	_HCLGE_PHY_MDIX_STATUS_B,4,2    ## @HCLGE_PHY_MDIX_STATUS_B
	.comm	_HCLGE_PHY_SPEED_DUP_RESOLVE_B,4,2 ## @HCLGE_PHY_SPEED_DUP_RESOLVE_B
	.comm	_HCLGE_PHY_PAGE_COPPER,4,2      ## @HCLGE_PHY_PAGE_COPPER
	.comm	_ETH_TP_MDI,4,2                 ## @ETH_TP_MDI
	.comm	_ETH_TP_MDI_X,4,2               ## @ETH_TP_MDI_X
	.comm	_ETH_TP_MDI_AUTO,4,2            ## @ETH_TP_MDI_AUTO
	.no_dead_strip	_hclge_get_mdix_mode
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.hclge_get_mdix_mode
l_switch.table.hclge_get_mdix_mode:
	.quad	_ETH_TP_MDI
	.quad	_ETH_TP_MDI_X
	.quad	_ETH_TP_MDI_INVALID
	.quad	_ETH_TP_MDI_AUTO

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hclge_get_mdix_mode
_hclge_get_mdix_mode:                   ; @hclge_get_mdix_mode
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x20, x1
	bl	_hclge_get_vport
	ldr	x8, [x0]
	ldr	x21, [x8]
	cbz	x21, LBB0_3
; %bb.1:
Lloh0:
	adrp	x25, _HCLGE_PHY_PAGE_REG@GOTPAGE
Lloh1:
	ldr	x25, [x25, _HCLGE_PHY_PAGE_REG@GOTPAGEOFF]
	ldr	w1, [x25]
Lloh2:
	adrp	x8, _HCLGE_PHY_PAGE_MDIX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HCLGE_PHY_PAGE_MDIX@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_phy_write
Lloh5:
	adrp	x8, _HCLGE_PHY_CSC_REG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HCLGE_PHY_CSC_REG@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_phy_read
Lloh8:
	adrp	x8, _HCLGE_PHY_MDIX_CTRL_M@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HCLGE_PHY_MDIX_CTRL_M@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _HCLGE_PHY_MDIX_CTRL_S@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HCLGE_PHY_MDIX_CTRL_S@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	bl	_hnae3_get_field
	mov	x22, x0
Lloh14:
	adrp	x8, _HCLGE_PHY_CSS_REG@GOTPAGE
Lloh15:
	ldr	x8, [x8, _HCLGE_PHY_CSS_REG@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_phy_read
	mov	x24, x0
Lloh17:
	adrp	x8, _HCLGE_PHY_MDIX_STATUS_B@GOTPAGE
Lloh18:
	ldr	x8, [x8, _HCLGE_PHY_MDIX_STATUS_B@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	bl	_hnae3_get_bit
	mov	x23, x0
Lloh20:
	adrp	x8, _HCLGE_PHY_SPEED_DUP_RESOLVE_B@GOTPAGE
Lloh21:
	ldr	x8, [x8, _HCLGE_PHY_SPEED_DUP_RESOLVE_B@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x24
	bl	_hnae3_get_bit
	mov	x24, x0
	ldr	w1, [x25]
Lloh23:
	adrp	x8, _HCLGE_PHY_PAGE_COPPER@GOTPAGE
Lloh24:
	ldr	x8, [x8, _HCLGE_PHY_PAGE_COPPER@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_phy_write
	cmp	w22, #3
	b.hi	LBB0_4
; %bb.2:
Lloh26:
	adrp	x8, l_switch.table.hclge_get_mdix_mode@PAGE
Lloh27:
	add	x8, x8, l_switch.table.hclge_get_mdix_mode@PAGEOFF
	ldr	x8, [x8, w22, sxtw #3]
	b	LBB0_5
LBB0_3:
Lloh28:
	adrp	x8, _ETH_TP_MDI_INVALID@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ETH_TP_MDI_INVALID@GOTPAGEOFF]
	ldr	w9, [x8]
	str	w9, [x20]
	b	LBB0_8
LBB0_4:
Lloh30:
	adrp	x8, _ETH_TP_MDI_INVALID@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ETH_TP_MDI_INVALID@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	str	w8, [x20]
	cbz	w24, LBB0_7
; %bb.6:
Lloh32:
	adrp	x8, _ETH_TP_MDI_X@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ETH_TP_MDI_X@GOTPAGEOFF]
Lloh34:
	adrp	x9, _ETH_TP_MDI@GOTPAGE
Lloh35:
	ldr	x9, [x9, _ETH_TP_MDI@GOTPAGEOFF]
	cmp	w23, #0
	csel	x8, x9, x8, eq
	b	LBB0_8
LBB0_7:
Lloh36:
	adrp	x8, _ETH_TP_MDI_INVALID@GOTPAGE
Lloh37:
	ldr	x8, [x8, _ETH_TP_MDI_INVALID@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	str	w8, [x19]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_ETH_TP_MDI_INVALID,4,2         ; @ETH_TP_MDI_INVALID
	.comm	_HCLGE_PHY_PAGE_REG,4,2         ; @HCLGE_PHY_PAGE_REG
	.comm	_HCLGE_PHY_PAGE_MDIX,4,2        ; @HCLGE_PHY_PAGE_MDIX
	.comm	_HCLGE_PHY_CSC_REG,4,2          ; @HCLGE_PHY_CSC_REG
	.comm	_HCLGE_PHY_MDIX_CTRL_M,4,2      ; @HCLGE_PHY_MDIX_CTRL_M
	.comm	_HCLGE_PHY_MDIX_CTRL_S,4,2      ; @HCLGE_PHY_MDIX_CTRL_S
	.comm	_HCLGE_PHY_CSS_REG,4,2          ; @HCLGE_PHY_CSS_REG
	.comm	_HCLGE_PHY_MDIX_STATUS_B,4,2    ; @HCLGE_PHY_MDIX_STATUS_B
	.comm	_HCLGE_PHY_SPEED_DUP_RESOLVE_B,4,2 ; @HCLGE_PHY_SPEED_DUP_RESOLVE_B
	.comm	_HCLGE_PHY_PAGE_COPPER,4,2      ; @HCLGE_PHY_PAGE_COPPER
	.comm	_ETH_TP_MDI,4,2                 ; @ETH_TP_MDI
	.comm	_ETH_TP_MDI_X,4,2               ; @ETH_TP_MDI_X
	.comm	_ETH_TP_MDI_AUTO,4,2            ; @ETH_TP_MDI_AUTO
	.no_dead_strip	_hclge_get_mdix_mode
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.hclge_get_mdix_mode
l_switch.table.hclge_get_mdix_mode:
	.quad	_ETH_TP_MDI
	.quad	_ETH_TP_MDI_X
	.quad	_ETH_TP_MDI_INVALID
	.quad	_ETH_TP_MDI_AUTO

.subsections_via_symbols
