	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hclge_set_loopback
_hclge_set_loopback:                    ## @hclge_set_loopback
	.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
	movl	%edx, %r14d
	movl	%esi, %ebx
	callq	_hclge_get_vport
	movq	%rax, %r15
	movq	8(%rax), %r13
	movq	(%r13), %rax
	cmpl	$33, (%rax)
	jl	LBB0_4
## %bb.1:
	xorl	%edx, %edx
	testl	%r14d, %r14d
	jne	LBB0_3
## %bb.2:
	movq	_HCLGE_SWITCH_ALW_LPBK_B@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	movl	%eax, %edx
LBB0_3:
	movq	_PF_VPORT_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HCLGE_SWITCH_ALW_LPBK_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rdi
	callq	_hclge_config_switch_param
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_18
LBB0_4:
	leal	-128(%rbx), %eax
	cmpl	$3, %eax
	ja	LBB0_7
## %bb.5:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_6:
	movq	%r13, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_hclge_set_serdes_loopback
	jmp	LBB0_10
LBB0_7:
	movq	_ENOTSUPP@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	movq	(%r13), %rdi
	addq	$4, %rdi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_err
	testl	%r12d, %r12d
	jne	LBB0_18
	jmp	LBB0_11
LBB0_8:
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_hclge_set_phy_loopback
	jmp	LBB0_10
LBB0_9:
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_hclge_set_app_loopback
LBB0_10:
	movl	%eax, %r12d
	testl	%r12d, %r12d
	jne	LBB0_18
LBB0_11:
	cmpl	$0, (%r15)
	jle	LBB0_16
## %bb.12:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	movl	%r14d, %ecx
	callq	_hclge_tqp_enable
	testl	%eax, %eax
	jne	LBB0_17
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	incl	%ebx
	cmpl	(%r15), %ebx
	jl	LBB0_13
LBB0_16:
	xorl	%r12d, %r12d
	jmp	LBB0_18
LBB0_17:
	movl	%eax, %r12d
LBB0_18:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
LJTI0_0:
	.long	L0_0_set_6
	.long	L0_0_set_8
	.long	L0_0_set_6
	.long	L0_0_set_9
	.end_data_region
                                        ## -- End function
	.comm	_HCLGE_SWITCH_ALW_LPBK_B,4,2    ## @HCLGE_SWITCH_ALW_LPBK_B
	.comm	_PF_VPORT_ID,4,2                ## @PF_VPORT_ID
	.comm	_HCLGE_SWITCH_ALW_LPBK_MASK,4,2 ## @HCLGE_SWITCH_ALW_LPBK_MASK
	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"loop_mode %d is not supported\n"

	.no_dead_strip	_hclge_set_loopback
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hclge_set_loopback
_hclge_set_loopback:                    ; @hclge_set_loopback
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x2
	mov	x22, x1
	bl	_hclge_get_vport
	mov	x20, x0
	ldr	x21, [x0, #8]
	ldr	x8, [x21]
	ldr	w8, [x8]
	cmp	w8, #33
	b.lt	LBB0_5
; %bb.1:
	cbz	w19, LBB0_3
; %bb.2:
	mov	w2, #0
	b	LBB0_4
LBB0_3:
Lloh0:
	adrp	x8, _HCLGE_SWITCH_ALW_LPBK_B@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HCLGE_SWITCH_ALW_LPBK_B@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_BIT
	mov	x2, x0
LBB0_4:
Lloh3:
	adrp	x8, _PF_VPORT_ID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PF_VPORT_ID@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _HCLGE_SWITCH_ALW_LPBK_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HCLGE_SWITCH_ALW_LPBK_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, x21
	bl	_hclge_config_switch_param
	mov	x23, x0
	cbnz	w0, LBB0_17
LBB0_5:
	sub	w8, w22, #128
	cmp	w8, #3
	b.hi	LBB0_8
; %bb.6:
Lloh9:
	adrp	x9, lJTI0_0@PAGE
Lloh10:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_7
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_7:
	mov	x0, x21
	mov	x1, x19
	mov	x2, x22
	bl	_hclge_set_serdes_loopback
	mov	x23, x0
	cbnz	w23, LBB0_17
	b	LBB0_11
LBB0_8:
Lloh11:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w23, w8
	ldr	x8, [x21]
	add	x0, x8, #4
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	bl	_dev_err
	cbnz	w23, LBB0_17
	b	LBB0_11
LBB0_9:
	mov	x0, x21
	mov	x1, x19
	bl	_hclge_set_phy_loopback
	mov	x23, x0
	cbnz	w23, LBB0_17
	b	LBB0_11
LBB0_10:
	mov	x0, x21
	mov	x1, x19
	bl	_hclge_set_app_loopback
	mov	x23, x0
	cbnz	w23, LBB0_17
LBB0_11:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.12:
	mov	w22, #0
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x22
	mov	w2, #0
	mov	x3, x19
	bl	_hclge_tqp_enable
	cbnz	w0, LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	add	w22, w22, #1
	ldr	w8, [x20]
	cmp	w22, w8
	b.lt	LBB0_13
LBB0_15:
	mov	w23, #0
	b	LBB0_17
LBB0_16:
	mov	x23, x0
LBB0_17:
	mov	x0, x23
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_7-LBB0_7)>>2
	.byte	(LBB0_9-LBB0_7)>>2
	.byte	(LBB0_7-LBB0_7)>>2
	.byte	(LBB0_10-LBB0_7)>>2
                                        ; -- End function
	.comm	_HCLGE_SWITCH_ALW_LPBK_B,4,2    ; @HCLGE_SWITCH_ALW_LPBK_B
	.comm	_PF_VPORT_ID,4,2                ; @PF_VPORT_ID
	.comm	_HCLGE_SWITCH_ALW_LPBK_MASK,4,2 ; @HCLGE_SWITCH_ALW_LPBK_MASK
	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"loop_mode %d is not supported\n"

	.no_dead_strip	_hclge_set_loopback
.subsections_via_symbols
