	.file	"extr_eswitch.c_mlx5_eswitch_disable.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"LEGACY"
.LC1:
	.string	"OFFLOADS"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"Disable: mode(%s), nvfs(%d), active vports(%d)\n"
	.text
	.p2align 4
	.globl	mlx5_eswitch_disable
	.type	mlx5_eswitch_disable, @function
mlx5_eswitch_disable:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	ESW_ALLOWED@PLT
	test	eax, eax
	je	.L1
	mov	rax, QWORD PTR [rbx]
	cmp	rax, QWORD PTR MLX5_ESWITCH_NONE[rip]
	je	.L1
	lea	rdx, .LC0[rip]
	mov	ecx, DWORD PTR 16[rbx]
	mov	edi, DWORD PTR 8[rbx]
	lea	rsi, .LC2[rip]
	cmp	rax, QWORD PTR MLX5_ESWITCH_LEGACY[rip]
	lea	rax, .LC1[rip]
	mov	r8d, DWORD PTR 12[rbx]
	cmovne	rdx, rax
	call	esw_info@PLT
	mov	rdi, rbx
	call	mlx5_eswitch_event_handlers_unregister@PLT
	mov	rax, QWORD PTR [rbx]
	cmp	rax, QWORD PTR MLX5_ESWITCH_LEGACY[rip]
	je	.L11
	movsx	rdx, DWORD PTR MLX5_ESWITCH_OFFLOADS[rip]
	cmp	rax, rdx
	je	.L12
.L7:
	mov	rdi, rbx
	call	esw_destroy_tsar@PLT
	mov	rax, QWORD PTR MLX5_ESWITCH_NONE[rip]
	mov	rbp, QWORD PTR [rbx]
	mov	edi, DWORD PTR 8[rbx]
	mov	QWORD PTR [rbx], rax
	call	mlx5_lag_update@PLT
	cmp	DWORD PTR MLX5_ESWITCH_OFFLOADS[rip], ebp
	je	.L13
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	edi, DWORD PTR 8[rbx]
	mov	esi, DWORD PTR MLX5_INTERFACE_PROTOCOL_IB[rip]
	call	mlx5_reload_interface@PLT
	mov	edi, DWORD PTR 8[rbx]
	mov	esi, DWORD PTR MLX5_INTERFACE_PROTOCOL_ETH[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	jmp	mlx5_reload_interface@PLT
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	rdi, rbx
	call	esw_legacy_disable@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rdi, rbx
	call	esw_offloads_disable@PLT
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	mlx5_eswitch_disable, .-mlx5_eswitch_disable
	.comm	MLX5_INTERFACE_PROTOCOL_IB,4,4
	.comm	MLX5_INTERFACE_PROTOCOL_ETH,4,4
	.comm	MLX5_ESWITCH_OFFLOADS,4,4
	.comm	MLX5_ESWITCH_NONE,8,8
	.comm	MLX5_ESWITCH_LEGACY,8,8
	.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_eswitch.c_mlx5_eswitch_disable.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"LEGACY\000"
	.align	2
.LC1:
	.ascii	"OFFLOADS\000"
	.align	2
.LC2:
	.ascii	"Disable: mode(%s), nvfs(%d), active vports(%d)\012\000"
	.text
	.align	2
	.global	mlx5_eswitch_disable
	.syntax unified
	.arm
	.fpu softvfp
	.type	mlx5_eswitch_disable, %function
mlx5_eswitch_disable:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	sub	sp, sp, #8
	mov	r4, r0
	bl	ESW_ALLOWED
	cmp	r0, #0
	beq	.L1
	ldr	r5, .L14
	ldr	r3, [r4]
	ldr	r2, [r5]
	cmp	r3, r2
	beq	.L1
	ldr	r6, .L14+4
	ldr	r1, [r4, #8]
	ldr	ip, [r6]
	ldr	r0, .L14+8
	cmp	r3, ip
	str	r1, [sp]
	ldr	r2, .L14+12
	ldr	r3, [r4, #12]
	movne	r2, r0
	ldr	r1, .L14+16
	ldr	r0, [r4, #4]
	bl	esw_info
	mov	r0, r4
	bl	mlx5_eswitch_event_handlers_unregister
	ldr	r2, [r6]
	ldr	r3, [r4]
	cmp	r3, r2
	beq	.L11
	ldr	r6, .L14+20
	ldr	r2, [r6]
	cmp	r3, r2
	beq	.L12
.L7:
	mov	r0, r4
	bl	esw_destroy_tsar
	ldr	r3, [r5]
	ldr	r0, [r4, #4]
	ldr	r5, [r4]
	str	r3, [r4]
	bl	mlx5_lag_update
	ldr	r3, [r6]
	cmp	r3, r5
	beq	.L13
.L1:
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L13:
	ldr	r3, .L14+24
	ldr	r0, [r4, #4]
	ldr	r1, [r3]
	bl	mlx5_reload_interface
	ldr	r3, .L14+28
	ldr	r0, [r4, #4]
	ldr	r1, [r3]
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, lr}
	b	mlx5_reload_interface
.L11:
	mov	r0, r4
	bl	esw_legacy_disable
	ldr	r6, .L14+20
	b	.L7
.L12:
	mov	r0, r4
	bl	esw_offloads_disable
	b	.L7
.L15:
	.align	2
.L14:
	.word	MLX5_ESWITCH_NONE
	.word	MLX5_ESWITCH_LEGACY
	.word	.LC1
	.word	.LC0
	.word	.LC2
	.word	MLX5_ESWITCH_OFFLOADS
	.word	MLX5_INTERFACE_PROTOCOL_IB
	.word	MLX5_INTERFACE_PROTOCOL_ETH
	.size	mlx5_eswitch_disable, .-mlx5_eswitch_disable
	.comm	MLX5_INTERFACE_PROTOCOL_IB,4,4
	.comm	MLX5_INTERFACE_PROTOCOL_ETH,4,4
	.comm	MLX5_ESWITCH_OFFLOADS,4,4
	.comm	MLX5_ESWITCH_NONE,4,4
	.comm	MLX5_ESWITCH_LEGACY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
