	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_mac_get_phy_if
_hns_mac_get_phy_if:                    ## @hns_mac_get_phy_if
	.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, %rbx
	movq	8(%rdi), %rax
	movl	(%rax), %edi
	callq	_AE_IS_VER1
	movl	%eax, %r14d
	movl	(%rbx), %r15d
	movq	8(%rbx), %rdi
	callq	_HNS_DSAF_IS_DEBUG
	testl	%r14d, %r14d
	je	LBB0_5
## %bb.1:
	testq	%rax, %rax
	jne	LBB0_10
## %bb.2:
	cmpl	$4, %r15d
	jae	LBB0_3
## %bb.4:
	movq	_HNS_MAC_HILINK4_REG@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_5:
	movq	_HNS_MAC_HILINK3V2_REG@GOTPCREL(%rip), %rcx
	movq	%rcx, %rdx
	cmpl	$4, %r15d
	jge	LBB0_7
## %bb.6:
	movq	_HNS_MAC_HILINK4V2_REG@GOTPCREL(%rip), %rdx
LBB0_7:
	testq	%rax, %rax
	cmoveq	%rdx, %rcx
	jmp	LBB0_8
LBB0_3:
	movq	_HNS_MAC_HILINK3_REG@GOTPCREL(%rip), %rcx
LBB0_8:
	movl	(%rcx), %esi
	movq	8(%rbx), %rdi
	callq	_dsaf_read_sub
	movl	4(%rbx), %esi
	movl	%eax, %edi
	callq	_dsaf_get_bit
	testq	%rax, %rax
	jne	LBB0_9
LBB0_10:
	movq	_PHY_INTERFACE_MODE_SGMII@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_9:
	movq	_PHY_INTERFACE_MODE_XGMII@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PHY_INTERFACE_MODE_SGMII,4,2   ## @PHY_INTERFACE_MODE_SGMII
	.comm	_HNS_MAC_HILINK4_REG,4,2        ## @HNS_MAC_HILINK4_REG
	.comm	_HNS_MAC_HILINK3_REG,4,2        ## @HNS_MAC_HILINK3_REG
	.comm	_HNS_MAC_HILINK4V2_REG,4,2      ## @HNS_MAC_HILINK4V2_REG
	.comm	_HNS_MAC_HILINK3V2_REG,4,2      ## @HNS_MAC_HILINK3V2_REG
	.comm	_PHY_INTERFACE_MODE_XGMII,4,2   ## @PHY_INTERFACE_MODE_XGMII
	.no_dead_strip	_hns_mac_get_phy_if
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns_mac_get_phy_if
_hns_mac_get_phy_if:                    ; @hns_mac_get_phy_if
	.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
	ldr	x8, [x0, #8]
	ldr	w0, [x8]
	bl	_AE_IS_VER1
	mov	x20, x0
	ldr	w21, [x19]
	ldr	x0, [x19, #8]
	bl	_HNS_DSAF_IS_DEBUG
	cbz	w20, LBB0_3
; %bb.1:
	cbz	x0, LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _PHY_INTERFACE_MODE_SGMII@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PHY_INTERFACE_MODE_SGMII@GOTPAGEOFF]
	b	LBB0_6
LBB0_3:
	cmp	w21, #4
	ccmp	x0, #0, #0, lt
Lloh2:
	adrp	x8, _HNS_MAC_HILINK3V2_REG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HNS_MAC_HILINK3V2_REG@GOTPAGEOFF]
Lloh4:
	adrp	x9, _HNS_MAC_HILINK4V2_REG@GOTPAGE
Lloh5:
	ldr	x9, [x9, _HNS_MAC_HILINK4V2_REG@GOTPAGEOFF]
	csel	x8, x9, x8, eq
	b	LBB0_5
LBB0_4:
Lloh6:
	adrp	x8, _HNS_MAC_HILINK3_REG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HNS_MAC_HILINK3_REG@GOTPAGEOFF]
Lloh8:
	adrp	x9, _HNS_MAC_HILINK4_REG@GOTPAGE
Lloh9:
	ldr	x9, [x9, _HNS_MAC_HILINK4_REG@GOTPAGEOFF]
	cmp	w21, #4
	csel	x8, x9, x8, lo
LBB0_5:
Lloh10:
	adrp	x20, _PHY_INTERFACE_MODE_SGMII@GOTPAGE
Lloh11:
	ldr	x20, [x20, _PHY_INTERFACE_MODE_SGMII@GOTPAGEOFF]
	ldr	w1, [x8]
	ldr	x0, [x19, #8]
	bl	_dsaf_read_sub
	ldr	w1, [x19, #4]
	bl	_dsaf_get_bit
Lloh12:
	adrp	x8, _PHY_INTERFACE_MODE_XGMII@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PHY_INTERFACE_MODE_XGMII@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x20, x8, eq
LBB0_6:
	ldr	w0, [x8]
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PHY_INTERFACE_MODE_SGMII,4,2   ; @PHY_INTERFACE_MODE_SGMII
	.comm	_HNS_MAC_HILINK4_REG,4,2        ; @HNS_MAC_HILINK4_REG
	.comm	_HNS_MAC_HILINK3_REG,4,2        ; @HNS_MAC_HILINK3_REG
	.comm	_HNS_MAC_HILINK4V2_REG,4,2      ; @HNS_MAC_HILINK4V2_REG
	.comm	_HNS_MAC_HILINK3V2_REG,4,2      ; @HNS_MAC_HILINK3V2_REG
	.comm	_PHY_INTERFACE_MODE_XGMII,4,2   ; @PHY_INTERFACE_MODE_XGMII
	.no_dead_strip	_hns_mac_get_phy_if
.subsections_via_symbols
