	.file	"extr_hclge_main.c_hclge_set_loopback.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"loop_mode %d is not supported\n"
	.text
	.p2align 4
	.type	hclge_set_loopback, @function
hclge_set_loopback:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15d, esi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	hclge_get_vport@PLT
	mov	r14, QWORD PTR 8[rax]
	mov	rbp, rax
	mov	rax, QWORD PTR [r14]
	cmp	DWORD PTR [rax], 32
	jle	.L10
	xor	edx, edx
	test	r12d, r12d
	je	.L27
.L8:
	mov	ecx, DWORD PTR HCLGE_SWITCH_ALW_LPBK_MASK[rip]
	mov	esi, DWORD PTR PF_VPORT_ID[rip]
	mov	rdi, r14
	call	hclge_config_switch_param@PLT
	mov	r13d, eax
	test	eax, eax
	jne	.L1
.L10:
	cmp	r15d, 130
	je	.L3
	ja	.L4
	cmp	r15d, 128
	je	.L3
	cmp	r15d, 129
	jne	.L6
	mov	esi, r12d
	mov	rdi, r14
	call	hclge_set_phy_loopback@PLT
	mov	r13d, eax
.L11:
	test	r13d, r13d
	jne	.L1
	mov	eax, DWORD PTR 0[rbp]
	xor	ebx, ebx
	test	eax, eax
	jg	.L12
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L28:
	add	ebx, 1
	cmp	DWORD PTR 0[rbp], ebx
	jle	.L1
.L12:
	xor	edx, edx
	mov	ecx, r12d
	mov	esi, ebx
	mov	rdi, r14
	call	hclge_tqp_enable@PLT
	test	eax, eax
	je	.L28
	mov	r13d, eax
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r13d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	cmp	r15d, 131
	jne	.L6
	mov	esi, r12d
	mov	rdi, r14
	call	hclge_set_app_loopback@PLT
	mov	r13d, eax
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rax, QWORD PTR [r14]
	mov	r13d, DWORD PTR ENOTSUPP[rip]
	mov	edx, r15d
	lea	rsi, .LC0[rip]
	lea	rdi, 4[rax]
	neg	r13d
	call	dev_err@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edx, r15d
	mov	esi, r12d
	mov	rdi, r14
	call	hclge_set_serdes_loopback@PLT
	mov	r13d, eax
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L27:
	mov	edi, DWORD PTR HCLGE_SWITCH_ALW_LPBK_B[rip]
	call	BIT@PLT
	mov	edx, eax
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	hclge_set_loopback, .-hclge_set_loopback
	.comm	PF_VPORT_ID,4,4
	.comm	HCLGE_SWITCH_ALW_LPBK_MASK,4,4
	.comm	HCLGE_SWITCH_ALW_LPBK_B,4,4
	.comm	ENOTSUPP,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_hclge_main.c_hclge_set_loopback.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"loop_mode %d is not supported\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	hclge_set_loopback, %function
hclge_set_loopback:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r1
	mov	r6, r2
	bl	hclge_get_vport
	ldr	r7, [r0, #4]
	mov	r5, r0
	ldr	r3, [r7]
	ldr	r3, [r3]
	cmp	r3, #32
	ble	.L10
	cmp	r6, #0
	movne	r2, #0
	beq	.L20
.L8:
	ldr	r3, .L22
	ldr	r1, .L22+4
	mov	r0, r7
	ldr	r3, [r3]
	ldr	r1, [r1]
	bl	hclge_config_switch_param
	subs	r8, r0, #0
	bne	.L1
.L10:
	sub	r3, r4, #128
	cmp	r3, #3
	ldrls	pc, [pc, r3, asl #2]
	b	.L3
.L5:
	.word	.L6
	.word	.L7
	.word	.L6
	.word	.L4
.L6:
	mov	r2, r4
	mov	r1, r6
	mov	r0, r7
	bl	hclge_set_serdes_loopback
	mov	r8, r0
.L11:
	cmp	r8, #0
	bne	.L1
	ldr	r3, [r5]
	cmp	r3, #0
	ble	.L1
	mov	r4, r8
	b	.L12
.L21:
	ldr	r3, [r5]
	cmp	r3, r4
	ble	.L1
.L12:
	mov	r1, r4
	mov	r3, r6
	mov	r2, #0
	mov	r0, r7
	bl	hclge_tqp_enable
	cmp	r0, #0
	add	r4, r4, #1
	beq	.L21
	mov	r8, r0
.L1:
	mov	r0, r8
	pop	{r4, r5, r6, r7, r8, pc}
.L4:
	mov	r1, r6
	mov	r0, r7
	bl	hclge_set_app_loopback
	mov	r8, r0
	b	.L11
.L7:
	mov	r1, r6
	mov	r0, r7
	bl	hclge_set_phy_loopback
	mov	r8, r0
	b	.L11
.L20:
	ldr	r3, .L22+8
	ldr	r0, [r3]
	bl	BIT
	mov	r2, r0
	b	.L8
.L3:
	ldr	r3, .L22+12
	ldr	r0, [r7]
	ldr	r8, [r3]
	mov	r2, r4
	ldr	r1, .L22+16
	add	r0, r0, #4
	rsb	r8, r8, #0
	bl	dev_err
	b	.L11
.L23:
	.align	2
.L22:
	.word	HCLGE_SWITCH_ALW_LPBK_MASK
	.word	PF_VPORT_ID
	.word	HCLGE_SWITCH_ALW_LPBK_B
	.word	ENOTSUPP
	.word	.LC0
	.size	hclge_set_loopback, .-hclge_set_loopback
	.comm	PF_VPORT_ID,4,4
	.comm	HCLGE_SWITCH_ALW_LPBK_MASK,4,4
	.comm	HCLGE_SWITCH_ALW_LPBK_B,4,4
	.comm	ENOTSUPP,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
