	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_eswitch_enable            ## -- Begin function mlx5_eswitch_enable
	.p2align	4, 0x90
_mlx5_eswitch_enable:                   ## @mlx5_eswitch_enable
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	callq	_ESW_ALLOWED
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	4(%r15), %edi
	movq	_ft_support@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_MLX5_CAP_ESW_FLOWTABLE_FDB
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movl	4(%r15), %edi
	movl	(%rbx), %esi
	callq	_MLX5_CAP_ESW_INGRESS_ACL
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	movl	4(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_esw_warn
LBB0_5:
	movl	4(%r15), %edi
	movl	(%rbx), %esi
	callq	_MLX5_CAP_ESW_EGRESS_ACL
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movl	4(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_esw_warn
LBB0_7:
	movq	%r15, %rdi
	callq	_esw_create_tsar
	movl	%r14d, (%r15)
	movl	4(%r15), %edi
	callq	_mlx5_lag_update
	movq	_MLX5_ESWITCH_LEGACY@GOTPCREL(%rip), %r12
	cmpl	%r14d, (%r12)
	jne	LBB0_9
## %bb.8:
	movq	%r15, %rdi
	callq	_esw_legacy_enable
	jmp	LBB0_10
LBB0_2:
	movl	4(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_esw_warn
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_9:
	movl	4(%r15), %edi
	movq	_MLX5_INTERFACE_PROTOCOL_ETH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mlx5_reload_interface
	movl	4(%r15), %edi
	movq	_MLX5_INTERFACE_PROTOCOL_IB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mlx5_reload_interface
	movq	%r15, %rdi
	callq	_esw_offloads_enable
LBB0_10:
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_11
## %bb.12:
	movq	_MLX5_ESWITCH_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	movq	_MLX5_ESWITCH_OFFLOADS@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_14
## %bb.13:
	movl	4(%r15), %edi
	movq	_MLX5_INTERFACE_PROTOCOL_IB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mlx5_reload_interface
	movl	4(%r15), %edi
	movq	_MLX5_INTERFACE_PROTOCOL_ETH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mlx5_reload_interface
	jmp	LBB0_14
LBB0_11:
	movq	%r15, %rdi
	callq	_mlx5_eswitch_event_handlers_register
	cmpl	%r14d, (%r12)
	leaq	L_.str.4(%rip), %rax
	leaq	L_.str.5(%rip), %rdx
	cmoveq	%rax, %rdx
	movl	12(%r15), %ecx
	movl	4(%r15), %edi
	movl	8(%r15), %r8d
	leaq	L_.str.3(%rip), %rsi
	callq	_esw_info
	xorl	%ebx, %ebx
LBB0_14:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ft_support,4,2                 ## @ft_support
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FDB is not supported, aborting ...\n"

	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
L_.str.1:                               ## @.str.1
	.asciz	"ingress ACL is not supported by FW\n"

L_.str.2:                               ## @.str.2
	.asciz	"engress ACL is not supported by FW\n"

	.comm	_MLX5_ESWITCH_LEGACY,4,2        ## @MLX5_ESWITCH_LEGACY
	.comm	_MLX5_INTERFACE_PROTOCOL_ETH,4,2 ## @MLX5_INTERFACE_PROTOCOL_ETH
	.comm	_MLX5_INTERFACE_PROTOCOL_IB,4,2 ## @MLX5_INTERFACE_PROTOCOL_IB
L_.str.3:                               ## @.str.3
	.asciz	"Enable: mode(%s), nvfs(%d), active vports(%d)\n"

L_.str.4:                               ## @.str.4
	.asciz	"LEGACY"

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

	.comm	_MLX5_ESWITCH_NONE,4,2          ## @MLX5_ESWITCH_NONE
	.comm	_MLX5_ESWITCH_OFFLOADS,4,2      ## @MLX5_ESWITCH_OFFLOADS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_eswitch_enable            ; -- Begin function mlx5_eswitch_enable
	.p2align	2
_mlx5_eswitch_enable:                   ; @mlx5_eswitch_enable
	.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	x20, x1
	mov	x19, x0
	bl	_ESW_ALLOWED
	cbz	w0, LBB0_10
; %bb.1:
	ldr	w0, [x19, #4]
Lloh0:
	adrp	x21, _ft_support@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ft_support@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_MLX5_CAP_ESW_FLOWTABLE_FDB
	cbz	w0, LBB0_10
; %bb.2:
	ldr	w0, [x19, #4]
	ldr	w1, [x21]
	bl	_MLX5_CAP_ESW_INGRESS_ACL
	cbnz	w0, LBB0_4
; %bb.3:
	ldr	w0, [x19, #4]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_esw_warn
LBB0_4:
	ldr	w0, [x19, #4]
	ldr	w1, [x21]
	bl	_MLX5_CAP_ESW_EGRESS_ACL
	cbnz	w0, LBB0_6
; %bb.5:
	ldr	w0, [x19, #4]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_esw_warn
LBB0_6:
	mov	x0, x19
	bl	_esw_create_tsar
	str	w20, [x19]
	ldr	w0, [x19, #4]
	bl	_mlx5_lag_update
Lloh6:
	adrp	x22, _MLX5_ESWITCH_LEGACY@GOTPAGE
Lloh7:
	ldr	x22, [x22, _MLX5_ESWITCH_LEGACY@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, w20
	b.ne	LBB0_11
; %bb.7:
	mov	x0, x19
	bl	_esw_legacy_enable
	mov	x21, x0
	cbz	w0, LBB0_12
LBB0_8:
Lloh8:
	adrp	x8, _MLX5_ESWITCH_NONE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MLX5_ESWITCH_NONE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x19]
Lloh11:
	adrp	x8, _MLX5_ESWITCH_OFFLOADS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MLX5_ESWITCH_OFFLOADS@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_13
; %bb.9:
	ldr	w0, [x19, #4]
Lloh14:
	adrp	x8, _MLX5_INTERFACE_PROTOCOL_IB@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MLX5_INTERFACE_PROTOCOL_IB@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_mlx5_reload_interface
	ldr	w0, [x19, #4]
Lloh17:
	adrp	x8, _MLX5_INTERFACE_PROTOCOL_ETH@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MLX5_INTERFACE_PROTOCOL_ETH@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	bl	_mlx5_reload_interface
	b	LBB0_13
LBB0_10:
	ldr	w0, [x19, #4]
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	bl	_esw_warn
Lloh22:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_13
LBB0_11:
	ldr	w0, [x19, #4]
Lloh25:
	adrp	x8, _MLX5_INTERFACE_PROTOCOL_ETH@GOTPAGE
Lloh26:
	ldr	x8, [x8, _MLX5_INTERFACE_PROTOCOL_ETH@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	bl	_mlx5_reload_interface
	ldr	w0, [x19, #4]
Lloh28:
	adrp	x8, _MLX5_INTERFACE_PROTOCOL_IB@GOTPAGE
Lloh29:
	ldr	x8, [x8, _MLX5_INTERFACE_PROTOCOL_IB@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	bl	_mlx5_reload_interface
	mov	x0, x19
	bl	_esw_offloads_enable
	mov	x21, x0
	cbnz	w0, LBB0_8
LBB0_12:
	mov	x0, x19
	bl	_mlx5_eswitch_event_handlers_register
Lloh31:
	adrp	x8, l_.str.5@PAGE
Lloh32:
	add	x8, x8, l_.str.5@PAGEOFF
Lloh33:
	adrp	x9, l_.str.4@PAGE
Lloh34:
	add	x9, x9, l_.str.4@PAGEOFF
	ldr	w10, [x22]
	cmp	w10, w20
	csel	x2, x9, x8, eq
	ldp	w4, w3, [x19, #8]
	ldr	w0, [x19, #4]
Lloh35:
	adrp	x1, l_.str.3@PAGE
Lloh36:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_esw_info
LBB0_13:
	mov	x0, x21
	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 AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_ft_support,4,2                 ; @ft_support
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FDB is not supported, aborting ...\n"

	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
l_.str.1:                               ; @.str.1
	.asciz	"ingress ACL is not supported by FW\n"

l_.str.2:                               ; @.str.2
	.asciz	"engress ACL is not supported by FW\n"

	.comm	_MLX5_ESWITCH_LEGACY,4,2        ; @MLX5_ESWITCH_LEGACY
	.comm	_MLX5_INTERFACE_PROTOCOL_ETH,4,2 ; @MLX5_INTERFACE_PROTOCOL_ETH
	.comm	_MLX5_INTERFACE_PROTOCOL_IB,4,2 ; @MLX5_INTERFACE_PROTOCOL_IB
l_.str.3:                               ; @.str.3
	.asciz	"Enable: mode(%s), nvfs(%d), active vports(%d)\n"

l_.str.4:                               ; @.str.4
	.asciz	"LEGACY"

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

	.comm	_MLX5_ESWITCH_NONE,4,2          ; @MLX5_ESWITCH_NONE
	.comm	_MLX5_ESWITCH_OFFLOADS,4,2      ; @MLX5_ESWITCH_OFFLOADS
.subsections_via_symbols
