	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ice_vsi_alloc
_ice_vsi_alloc:                         ## @ice_vsi_alloc
	.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
	movl	%edx, %r12d
	movl	%esi, %r13d
	movq	%rdi, %rbx
	leaq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_ICE_NO_VSI@GOTPCREL(%rip), %rax
	movq	(%rbx), %rcx
	movq	16(%rbx), %rdi
	cmpq	(%rax), %rcx
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	jmp	LBB0_13
LBB0_2:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$32, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_13
## %bb.3:
	movq	%rax, %r15
	movl	%r13d, (%rax)
	movq	%rbx, 24(%rax)
	movq	___ICE_DOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	20(%r15), %esi
	callq	_set_bit
	movq	(%rbx), %rax
	movq	%rax, 8(%r15)
	cmpl	$128, %r13d
	je	LBB0_5
## %bb.4:
	movq	_ICE_INVAL_VFID@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_5:
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_ice_vsi_set_num_qs
	movl	(%r15), %edx
	cmpl	$128, %edx
	je	LBB0_11
## %bb.6:
	cmpl	$130, %edx
	je	LBB0_11
## %bb.7:
	cmpl	$129, %edx
	jne	LBB0_15
## %bb.8:
	movq	%r15, %rdi
	callq	_ice_vsi_alloc_arrays
	testl	%eax, %eax
	jne	LBB0_12
## %bb.9:
	movq	_ice_msix_clean_rings@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
	jmp	LBB0_10
LBB0_11:
	movq	%r15, %rdi
	callq	_ice_vsi_alloc_arrays
	testl	%eax, %eax
	je	LBB0_10
LBB0_12:
	movq	16(%rbx), %rdi
	movq	%r15, %rsi
	callq	_devm_kfree
LBB0_13:
	xorl	%r15d, %r15d
LBB0_14:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	(%rbx), %rdx
	movq	32(%rbx), %rax
	movq	%r15, (%rax,%rdx,8)
	movq	32(%rbx), %rdi
	movl	24(%rbx), %esi
	callq	_ice_get_free_slot
	movq	%rax, (%rbx)
	jmp	LBB0_14
LBB0_15:
	movq	16(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_warn
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_ICE_NO_VSI,8,3                 ## @ICE_NO_VSI
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"out of VSI slots!\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	___ICE_DOWN,4,2                 ## @__ICE_DOWN
	.comm	_ICE_INVAL_VFID,4,2             ## @ICE_INVAL_VFID
	.comm	_ice_msix_clean_rings,4,2       ## @ice_msix_clean_rings
L_.str.1:                               ## @.str.1
	.asciz	"Unknown VSI type %d\n"

	.no_dead_strip	_ice_vsi_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ice_vsi_alloc
_ice_vsi_alloc:                         ; @ice_vsi_alloc
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x2
	mov	x23, x1
	mov	x21, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _ICE_NO_VSI@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ICE_NO_VSI@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	x0, [x21, #16]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	b	LBB0_10
LBB0_2:
Lloh5:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	w1, #32
	bl	_devm_kzalloc
	mov	x20, x0
	cbz	x0, LBB0_11
; %bb.3:
	str	w23, [x20]
	str	x21, [x20, #24]
Lloh8:
	adrp	x8, ___ICE_DOWN@GOTPAGE
Lloh9:
	ldr	x8, [x8, ___ICE_DOWN@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	ldr	w1, [x20, #20]
	bl	_set_bit
	ldr	x8, [x21]
	str	x8, [x20, #8]
Lloh11:
	adrp	x8, _ICE_INVAL_VFID@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ICE_INVAL_VFID@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w23, #128
	csel	w1, w22, w8, eq
	mov	x0, x20
	bl	_ice_vsi_set_num_qs
	ldr	w2, [x20]
	cmp	w2, #128
	b.eq	LBB0_8
; %bb.4:
	cmp	w2, #130
	b.eq	LBB0_8
; %bb.5:
	cmp	w2, #129
	b.ne	LBB0_13
; %bb.6:
	mov	x0, x20
	bl	_ice_vsi_alloc_arrays
	cbnz	w0, LBB0_9
; %bb.7:
Lloh14:
	adrp	x8, _ice_msix_clean_rings@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ice_msix_clean_rings@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [x20, #16]
	b	LBB0_12
LBB0_8:
	mov	x0, x20
	bl	_ice_vsi_alloc_arrays
	cbz	w0, LBB0_12
LBB0_9:
	ldr	x0, [x21, #16]
	mov	x1, x20
	bl	_devm_kfree
LBB0_10:
	mov	x20, #0
LBB0_11:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_12:
	ldr	x8, [x21, #32]
	ldr	x2, [x21]
	str	x20, [x8, x2, lsl #3]
	ldr	x0, [x21, #32]
	ldr	w1, [x21, #24]
	bl	_ice_get_free_slot
	str	x0, [x21]
	b	LBB0_11
LBB0_13:
	ldr	x0, [x21, #16]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_warn
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_ICE_NO_VSI,8,3                 ; @ICE_NO_VSI
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"out of VSI slots!\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	___ICE_DOWN,4,2                 ; @__ICE_DOWN
	.comm	_ICE_INVAL_VFID,4,2             ; @ICE_INVAL_VFID
	.comm	_ice_msix_clean_rings,4,2       ; @ice_msix_clean_rings
l_.str.1:                               ; @.str.1
	.asciz	"Unknown VSI type %d\n"

	.no_dead_strip	_ice_vsi_alloc
.subsections_via_symbols
