	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_enable_serdes_lb
_hns_enable_serdes_lb:                  ## @hns_enable_serdes_lb
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	callq	_netdev_priv
	movq	(%rax), %rbx
	movq	8(%rbx), %rax
	movq	(%rax), %r14
	movq	_MAC_INTERNALLOOP_SERDES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	*(%r14)
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movq	8(%r14), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	*%rax
	testl	%eax, %eax
	jne	LBB0_4
LBB0_3:
	movq	(%rbx), %rax
	movq	_PHY_INTERFACE_MODE_XGMII@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movl	$10000, %eax                    ## imm = 0x2710
	movl	$1000, %esi                     ## imm = 0x3E8
	cmovel	%eax, %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	*16(%r14)
	movl	$300, %edi                      ## imm = 0x12C
	callq	_mdelay
	xorl	%eax, %eax
LBB0_4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAC_INTERNALLOOP_SERDES,4,2    ## @MAC_INTERNALLOOP_SERDES
	.comm	_PHY_INTERFACE_MODE_XGMII,8,3   ## @PHY_INTERFACE_MODE_XGMII
	.no_dead_strip	_hns_enable_serdes_lb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns_enable_serdes_lb
_hns_enable_serdes_lb:                  ; @hns_enable_serdes_lb
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	bl	_netdev_priv
	ldr	x19, [x0]
	ldr	x8, [x19, #8]
	ldr	x20, [x8]
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _MAC_INTERNALLOOP_SERDES@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MAC_INTERNALLOOP_SERDES@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	mov	x0, x19
	mov	w2, #1
	blr	x8
	cbnz	w0, LBB0_4
; %bb.1:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_3
; %bb.2:
	mov	x0, x19
	blr	x8
	cbnz	w0, LBB0_4
LBB0_3:
	ldr	x8, [x19]
Lloh3:
	adrp	x9, _PHY_INTERFACE_MODE_XGMII@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PHY_INTERFACE_MODE_XGMII@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	mov	w8, #1000
	mov	w9, #10000
	csel	w1, w9, w8, eq
	ldr	x8, [x20, #16]
	mov	x0, x19
	mov	w2, #1
	blr	x8
	mov	w0, #300
	bl	_mdelay
	mov	w0, #0
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MAC_INTERNALLOOP_SERDES,4,2    ; @MAC_INTERNALLOOP_SERDES
	.comm	_PHY_INTERFACE_MODE_XGMII,8,3   ; @PHY_INTERFACE_MODE_XGMII
	.no_dead_strip	_hns_enable_serdes_lb
.subsections_via_symbols
