	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i40e_validate_and_set_switch_mode
_i40e_validate_and_set_switch_mode:     ## @i40e_validate_and_set_switch_mode
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r15
	movq	_i40e_aqc_opc_list_dev_capabilities@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_i40e_get_capabilities
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_2:
	subl	(%rax), %ebx
LBB0_3:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movslq	24(%r15), %rdx
	testq	%rdx, %rdx
	je	LBB0_6
## %bb.5:
	movq	_I40E_SWITCH_MODE_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	andq	%rdx, %rax
	movq	_I40E_CLOUD_FILTER_MODE1@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_10
LBB0_6:
	leaq	16(%r15), %r14
	movq	_I40E_AQ_SET_SWITCH_BIT7_VALID@GOTPCREL(%rip), %rax
	movq	_I40E_AQ_SET_SWITCH_L4_TYPE_TCP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_I40E_AQ_SET_SWITCH_MODE_NON_TUNNEL@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	8(%r15), %edx
	movl	12(%r15), %esi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%r8d, %r8d
	callq	_i40e_aq_set_switch_config
	testl	%eax, %eax
	je	LBB0_3
## %bb.7:
	movl	%eax, %r12d
	movq	(%r14), %rax
	movq	_I40E_AQ_RC_ESRCH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_9
## %bb.8:
	movq	(%r15), %r13
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_i40e_stat_str
	movslq	%eax, %rbx
	movq	16(%r15), %rsi
	movq	%r14, %rdi
	callq	_i40e_aq_str
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	movq	%rbx, %rdx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_9:
	movl	%r12d, %ebx
	jmp	LBB0_3
LBB0_10:
	movq	_I40E_CLOUD_FILTER_MODE2@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.11:
	movq	(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_i40e_aqc_opc_list_dev_capabilities,4,2 ## @i40e_aqc_opc_list_dev_capabilities
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_I40E_SWITCH_MODE_MASK,8,3      ## @I40E_SWITCH_MODE_MASK
	.comm	_I40E_CLOUD_FILTER_MODE1,8,3    ## @I40E_CLOUD_FILTER_MODE1
	.comm	_I40E_CLOUD_FILTER_MODE2,8,3    ## @I40E_CLOUD_FILTER_MODE2
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid switch_mode (%d), only non-tunneled mode for cloud filter is supported\n"

	.comm	_I40E_AQ_SET_SWITCH_BIT7_VALID,4,2 ## @I40E_AQ_SET_SWITCH_BIT7_VALID
	.comm	_I40E_AQ_SET_SWITCH_L4_TYPE_TCP,4,2 ## @I40E_AQ_SET_SWITCH_L4_TYPE_TCP
	.comm	_I40E_AQ_SET_SWITCH_MODE_NON_TUNNEL,4,2 ## @I40E_AQ_SET_SWITCH_MODE_NON_TUNNEL
	.comm	_I40E_AQ_RC_ESRCH,8,3           ## @I40E_AQ_RC_ESRCH
L_.str.1:                               ## @.str.1
	.asciz	"couldn't set switch config bits, err %s aq_err %s\n"

	.no_dead_strip	_i40e_validate_and_set_switch_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i40e_validate_and_set_switch_mode
_i40e_validate_and_set_switch_mode:     ; @i40e_validate_and_set_switch_mode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	x19, [x0]
Lloh0:
	adrp	x8, _i40e_aqc_opc_list_dev_capabilities@GOTPAGE
Lloh1:
	ldr	x8, [x8, _i40e_aqc_opc_list_dev_capabilities@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_i40e_get_capabilities
	cbz	w0, LBB0_3
LBB0_1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_2:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_3:
	ldrsw	x2, [x19, #24]
	cbz	w2, LBB0_5
; %bb.4:
Lloh6:
	adrp	x8, _I40E_SWITCH_MODE_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _I40E_SWITCH_MODE_MASK@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	and	x8, x8, x2
Lloh9:
	adrp	x9, _I40E_CLOUD_FILTER_MODE1@GOTPAGE
Lloh10:
	ldr	x9, [x9, _I40E_CLOUD_FILTER_MODE1@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_8
LBB0_5:
Lloh12:
	adrp	x8, _I40E_AQ_SET_SWITCH_BIT7_VALID@GOTPAGE
Lloh13:
	ldr	x8, [x8, _I40E_AQ_SET_SWITCH_BIT7_VALID@GOTPAGEOFF]
	add	x21, x19, #16
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _I40E_AQ_SET_SWITCH_L4_TYPE_TCP@GOTPAGE
Lloh16:
	ldr	x9, [x9, _I40E_AQ_SET_SWITCH_L4_TYPE_TCP@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh18:
	adrp	x9, _I40E_AQ_SET_SWITCH_MODE_NON_TUNNEL@GOTPAGE
Lloh19:
	ldr	x9, [x9, _I40E_AQ_SET_SWITCH_MODE_NON_TUNNEL@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w3, w8, w9
	ldp	w2, w1, [x19, #8]
	mov	x0, x21
	mov	x4, #0
	bl	_i40e_aq_set_switch_config
	mov	x20, x0
	cbz	w0, LBB0_2
; %bb.6:
	ldr	x8, [x21]
Lloh21:
	adrp	x9, _I40E_AQ_RC_ESRCH@GOTPAGE
Lloh22:
	ldr	x9, [x9, _I40E_AQ_RC_ESRCH@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.7:
	ldr	x22, [x19]
	mov	x0, x21
	mov	x1, x20
	bl	_i40e_stat_str
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x23, w0
	ldr	x1, [x19, #16]
	mov	x0, x21
	bl	_i40e_aq_str
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh24:
	adrp	x1, l_.str.1@PAGE
Lloh25:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	mov	x2, x23
	bl	_dev_err
	b	LBB0_2
LBB0_8:
Lloh26:
	adrp	x9, _I40E_CLOUD_FILTER_MODE2@GOTPAGE
Lloh27:
	ldr	x9, [x9, _I40E_CLOUD_FILTER_MODE2@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.9:
	mov	w20, #0
	b	LBB0_2
LBB0_10:
	ldr	x0, [x19]
Lloh29:
	adrp	x1, l_.str@PAGE
Lloh30:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_i40e_aqc_opc_list_dev_capabilities,4,2 ; @i40e_aqc_opc_list_dev_capabilities
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_I40E_SWITCH_MODE_MASK,8,3      ; @I40E_SWITCH_MODE_MASK
	.comm	_I40E_CLOUD_FILTER_MODE1,8,3    ; @I40E_CLOUD_FILTER_MODE1
	.comm	_I40E_CLOUD_FILTER_MODE2,8,3    ; @I40E_CLOUD_FILTER_MODE2
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid switch_mode (%d), only non-tunneled mode for cloud filter is supported\n"

	.comm	_I40E_AQ_SET_SWITCH_BIT7_VALID,4,2 ; @I40E_AQ_SET_SWITCH_BIT7_VALID
	.comm	_I40E_AQ_SET_SWITCH_L4_TYPE_TCP,4,2 ; @I40E_AQ_SET_SWITCH_L4_TYPE_TCP
	.comm	_I40E_AQ_SET_SWITCH_MODE_NON_TUNNEL,4,2 ; @I40E_AQ_SET_SWITCH_MODE_NON_TUNNEL
	.comm	_I40E_AQ_RC_ESRCH,8,3           ; @I40E_AQ_RC_ESRCH
l_.str.1:                               ; @.str.1
	.asciz	"couldn't set switch config bits, err %s aq_err %s\n"

	.no_dead_strip	_i40e_validate_and_set_switch_mode
.subsections_via_symbols
