	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_eswitch_disable           ## -- Begin function mlx5_eswitch_disable
	.p2align	4, 0x90
_mlx5_eswitch_disable:                  ## @mlx5_eswitch_disable
	.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
	callq	_ESW_ALLOWED
	testl	%eax, %eax
	je	LBB0_7
## %bb.1:
	movq	(%rbx), %rax
	movq	_MLX5_ESWITCH_NONE@GOTPCREL(%rip), %r14
	cmpq	(%r14), %rax
	je	LBB0_7
## %bb.2:
	movq	_MLX5_ESWITCH_LEGACY@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str.2(%rip), %rdx
	cmoveq	%rax, %rdx
	movl	16(%rbx), %ecx
	movl	8(%rbx), %edi
	movl	12(%rbx), %r8d
	leaq	L_.str(%rip), %rsi
	callq	_esw_info
	movq	%rbx, %rdi
	callq	_mlx5_eswitch_event_handlers_unregister
	movq	(%rbx), %rax
	cmpq	(%r15), %rax
	jne	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_esw_legacy_disable
	jmp	LBB0_6
LBB0_4:
	movq	_MLX5_ESWITCH_OFFLOADS@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	cmpq	%rcx, %rax
	jne	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_esw_offloads_disable
LBB0_6:
	movq	%rbx, %rdi
	callq	_esw_destroy_tsar
	movq	(%r14), %rax
	movl	(%rbx), %r14d
	movl	8(%rbx), %edi
	movq	%rax, (%rbx)
	callq	_mlx5_lag_update
	movq	_MLX5_ESWITCH_OFFLOADS@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_7
## %bb.8:
	movl	8(%rbx), %edi
	movq	_MLX5_INTERFACE_PROTOCOL_IB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mlx5_reload_interface
	movl	8(%rbx), %edi
	movq	_MLX5_INTERFACE_PROTOCOL_ETH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mlx5_reload_interface          ## TAILCALL
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX5_ESWITCH_NONE,8,3          ## @MLX5_ESWITCH_NONE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Disable: mode(%s), nvfs(%d), active vports(%d)\n"

	.comm	_MLX5_ESWITCH_LEGACY,8,3        ## @MLX5_ESWITCH_LEGACY
L_.str.1:                               ## @.str.1
	.asciz	"LEGACY"

L_.str.2:                               ## @.str.2
	.asciz	"OFFLOADS"

	.comm	_MLX5_ESWITCH_OFFLOADS,4,2      ## @MLX5_ESWITCH_OFFLOADS
	.comm	_MLX5_INTERFACE_PROTOCOL_IB,4,2 ## @MLX5_INTERFACE_PROTOCOL_IB
	.comm	_MLX5_INTERFACE_PROTOCOL_ETH,4,2 ## @MLX5_INTERFACE_PROTOCOL_ETH
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_eswitch_disable           ; -- Begin function mlx5_eswitch_disable
	.p2align	2
_mlx5_eswitch_disable:                  ; @mlx5_eswitch_disable
	.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
	bl	_ESW_ALLOWED
	cbz	w0, LBB0_8
; %bb.1:
	ldr	x8, [x19]
Lloh0:
	adrp	x20, _MLX5_ESWITCH_NONE@GOTPAGE
Lloh1:
	ldr	x20, [x20, _MLX5_ESWITCH_NONE@GOTPAGEOFF]
	ldr	x9, [x20]
	cmp	x8, x9
	b.eq	LBB0_8
; %bb.2:
Lloh2:
	adrp	x21, _MLX5_ESWITCH_LEGACY@GOTPAGE
Lloh3:
	ldr	x21, [x21, _MLX5_ESWITCH_LEGACY@GOTPAGEOFF]
Lloh4:
	adrp	x9, l_.str.2@PAGE
Lloh5:
	add	x9, x9, l_.str.2@PAGEOFF
Lloh6:
	adrp	x10, l_.str.1@PAGE
Lloh7:
	add	x10, x10, l_.str.1@PAGEOFF
	ldr	x11, [x21]
	cmp	x8, x11
	csel	x2, x10, x9, eq
	ldp	w4, w3, [x19, #12]
	ldr	w0, [x19, #8]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_esw_info
	mov	x0, x19
	bl	_mlx5_eswitch_event_handlers_unregister
	ldr	x8, [x19]
	ldr	x9, [x21]
Lloh10:
	adrp	x21, _MLX5_ESWITCH_OFFLOADS@GOTPAGE
Lloh11:
	ldr	x21, [x21, _MLX5_ESWITCH_OFFLOADS@GOTPAGEOFF]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_esw_legacy_disable
	b	LBB0_6
LBB0_4:
	ldrsw	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_esw_offloads_disable
LBB0_6:
	mov	x0, x19
	bl	_esw_destroy_tsar
	ldr	w22, [x19]
	ldr	x8, [x20]
	str	x8, [x19]
	ldr	w0, [x19, #8]
	bl	_mlx5_lag_update
	ldr	w8, [x21]
	cmp	w8, w22
	b.ne	LBB0_8
; %bb.7:
	ldr	w0, [x19, #8]
Lloh12:
	adrp	x8, _MLX5_INTERFACE_PROTOCOL_IB@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MLX5_INTERFACE_PROTOCOL_IB@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_mlx5_reload_interface
	ldr	w0, [x19, #8]
Lloh15:
	adrp	x8, _MLX5_INTERFACE_PROTOCOL_ETH@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MLX5_INTERFACE_PROTOCOL_ETH@GOTPAGEOFF]
Lloh17:
	ldr	w1, [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
	b	_mlx5_reload_interface
LBB0_8:
	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	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX5_ESWITCH_NONE,8,3          ; @MLX5_ESWITCH_NONE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Disable: mode(%s), nvfs(%d), active vports(%d)\n"

	.comm	_MLX5_ESWITCH_LEGACY,8,3        ; @MLX5_ESWITCH_LEGACY
l_.str.1:                               ; @.str.1
	.asciz	"LEGACY"

l_.str.2:                               ; @.str.2
	.asciz	"OFFLOADS"

	.comm	_MLX5_ESWITCH_OFFLOADS,4,2      ; @MLX5_ESWITCH_OFFLOADS
	.comm	_MLX5_INTERFACE_PROTOCOL_IB,4,2 ; @MLX5_INTERFACE_PROTOCOL_IB
	.comm	_MLX5_INTERFACE_PROTOCOL_ETH,4,2 ; @MLX5_INTERFACE_PROTOCOL_ETH
.subsections_via_symbols
