	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i40e_fetch_switch_configuration ## -- Begin function i40e_fetch_switch_configuration
	.p2align	4, 0x90
_i40e_fetch_switch_configuration:       ## @i40e_fetch_switch_configuration
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	$0, -64(%rbp)
	movq	_I40E_AQ_LARGE_BUF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r15
	leaq	8(%r14), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, -64(%rbp)
	movq	%r15, %r14
	movq	%rbx, %r15
	movl	%r12d, %ebx
	je	LBB0_12
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	movq	_I40E_AQ_LARGE_BUF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	leaq	-64(%rbp), %rcx
	xorl	%r8d, %r8d
	callq	_i40e_aq_get_switch_config
	testl	%eax, %eax
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	12(%r15), %edi
	callq	_le16_to_cpu
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %r12
	movl	8(%r15), %edi
	callq	_le16_to_cpu
	movl	%ebx, %r13d
	testl	%ebx, %ebx
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%rax, %rcx
	callq	_dev_info
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	movq	%r14, %r15
	movq	%r12, %rbx
	movl	%r13d, %r12d
	jle	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rbx), %rsi
	addq	%r14, %rsi
	movq	%r15, %rdi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	%r12d, %ecx
	callq	_i40e_setup_pf_switch_element
	addq	$4, %r14
	decq	%r13
	jne	LBB0_10
	jmp	LBB0_11
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_12:
	movq	%r15, %rdi
	callq	_kfree
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_5:
	movq	(%r14), %r13
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_i40e_stat_str
	movq	%rax, %r12
	movl	8(%r14), %esi
	movq	%rbx, %rdi
	callq	_i40e_aq_str
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	movq	%r12, %rdx
	movq	%rax, %rcx
	callq	_dev_info
	movq	%r15, %rdi
	callq	_kfree
	movq	_ENOENT@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I40E_AQ_LARGE_BUF,4,2          ## @I40E_AQ_LARGE_BUF
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"get switch config failed err %s aq_err %s\n"

	.comm	_ENOENT,4,2                     ## @ENOENT
L_.str.1:                               ## @.str.1
	.asciz	"header: %d reported %d total\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i40e_fetch_switch_configuration ; -- Begin function i40e_fetch_switch_configuration
	.p2align	2
_i40e_fetch_switch_configuration:       ; @i40e_fetch_switch_configuration
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
	mov	x20, x0
	str	xzr, [sp, #8]
Lloh0:
	adrp	x25, _I40E_AQ_LARGE_BUF@GOTPAGE
Lloh1:
	ldr	x25, [x25, _I40E_AQ_LARGE_BUF@GOTPAGEOFF]
	ldr	w0, [x25]
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_kzalloc
	cbz	x0, LBB0_9
; %bb.1:
	mov	x19, x0
	add	x22, x20, #8
Lloh5:
	adrp	x23, l_.str.1@PAGE
Lloh6:
	add	x23, x23, l_.str.1@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_10
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	ldr	w2, [x25]
	add	x3, sp, #8
	mov	x0, x22
	mov	x1, x19
	mov	x4, #0
	bl	_i40e_aq_get_switch_config
	cbnz	w0, LBB0_11
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x19, #12]
	bl	_le16_to_cpu
	mov	x24, x0
	ldr	w0, [x19, #8]
	bl	_le16_to_cpu
	cbz	w21, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x3, x0
	ldr	x0, [x20]
	mov	x1, x23
	mov	x2, x24
	bl	_dev_info
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	cmp	x24, #1
	b.lt	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x26, #0
	mov	x27, x24
LBB0_8:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19]
	add	x1, x8, x26
	mov	x0, x20
	mov	x2, x24
	mov	x3, x21
	bl	_i40e_setup_pf_switch_element
	add	x26, x26, #4
	subs	x27, x27, #1
	b.ne	LBB0_8
	b	LBB0_2
LBB0_9:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:
	mov	x0, x19
	bl	_kfree
	mov	w0, #0
	b	LBB0_13
LBB0_11:
	mov	x1, x0
	ldr	x21, [x20]
	mov	x0, x22
	bl	_i40e_stat_str
	mov	x23, x0
	ldr	w1, [x20, #8]
	mov	x0, x22
	bl	_i40e_aq_str
	mov	x3, x0
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x23
	bl	_dev_info
	mov	x0, x19
	bl	_kfree
Lloh11:
	adrp	x8, _ENOENT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_I40E_AQ_LARGE_BUF,4,2          ; @I40E_AQ_LARGE_BUF
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"get switch config failed err %s aq_err %s\n"

	.comm	_ENOENT,4,2                     ; @ENOENT
l_.str.1:                               ; @.str.1
	.asciz	"header: %d reported %d total\n"

.subsections_via_symbols
