	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_devlink_eswitch_mode_set  ## -- Begin function mlx5_devlink_eswitch_mode_set
	.p2align	4, 0x90
_mlx5_devlink_eswitch_mode_set:         ## @mlx5_devlink_eswitch_mode_set
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %rbx
	callq	_devlink_priv
	movq	%rax, %r15
	movq	$0, -40(%rbp)
	movq	%rbx, %rdi
	callq	_mlx5_devlink_eswitch_check
	testl	%eax, %eax
	jne	LBB0_8
## %bb.1:
	movq	(%r15), %rax
	movq	(%rax), %rbx
	leaq	-40(%rbp), %rsi
	movq	%r12, %rdi
	callq	_esw_mode_from_devlink
	testq	%rax, %rax
	je	LBB0_2
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_8
LBB0_2:
	xorl	%eax, %eax
	cmpq	-40(%rbp), %rbx
	je	LBB0_8
## %bb.3:
	movq	_DEVLINK_ESWITCH_MODE_SWITCHDEV@GOTPCREL(%rip), %rax
	cmpq	%r12, (%rax)
	jne	LBB0_5
## %bb.4:
	movq	(%r15), %rdi
	movq	%r14, %rsi
	callq	_esw_offloads_start
	jmp	LBB0_8
LBB0_5:
	movq	_DEVLINK_ESWITCH_MODE_LEGACY@GOTPCREL(%rip), %rax
	cmpq	%r12, (%rax)
	jne	LBB0_7
## %bb.6:
	movq	(%r15), %rdi
	movq	%r14, %rsi
	callq	_esw_offloads_stop
LBB0_8:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DEVLINK_ESWITCH_MODE_SWITCHDEV,8,3 ## @DEVLINK_ESWITCH_MODE_SWITCHDEV
	.comm	_DEVLINK_ESWITCH_MODE_LEGACY,8,3 ## @DEVLINK_ESWITCH_MODE_LEGACY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_devlink_eswitch_mode_set  ; -- Begin function mlx5_devlink_eswitch_mode_set
	.p2align	2
_mlx5_devlink_eswitch_mode_set:         ; @mlx5_devlink_eswitch_mode_set
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
	bl	_devlink_priv
	mov	x21, x0
	str	xzr, [sp, #8]
	mov	x0, x22
	bl	_mlx5_devlink_eswitch_check
	cbnz	w0, LBB0_9
; %bb.1:
	ldr	x8, [x21]
	ldr	x22, [x8]
	add	x1, sp, #8
	mov	x0, x20
	bl	_esw_mode_from_devlink
	cbz	x0, LBB0_3
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_3:
	ldr	x8, [sp, #8]
	cmp	x22, x8
	b.ne	LBB0_5
; %bb.4:
	mov	w0, #0
	b	LBB0_9
LBB0_5:
Lloh3:
	adrp	x8, _DEVLINK_ESWITCH_MODE_SWITCHDEV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DEVLINK_ESWITCH_MODE_SWITCHDEV@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x8, x20
	b.ne	LBB0_7
; %bb.6:
	ldr	x0, [x21]
	mov	x1, x19
	bl	_esw_offloads_start
	b	LBB0_9
LBB0_7:
Lloh6:
	adrp	x8, _DEVLINK_ESWITCH_MODE_LEGACY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DEVLINK_ESWITCH_MODE_LEGACY@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x8, x20
	b.ne	LBB0_2
; %bb.8:
	ldr	x0, [x21]
	mov	x1, x19
	bl	_esw_offloads_stop
LBB0_9:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DEVLINK_ESWITCH_MODE_SWITCHDEV,8,3 ; @DEVLINK_ESWITCH_MODE_SWITCHDEV
	.comm	_DEVLINK_ESWITCH_MODE_LEGACY,8,3 ; @DEVLINK_ESWITCH_MODE_LEGACY
.subsections_via_symbols
