	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i40e_vsi_mem_alloc
_i40e_vsi_mem_alloc:                    ## @i40e_vsi_mem_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
	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, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r15
	movq	_ENODEV@GOTPCREL(%rip), %r13
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	subl	(%r13), %r12d
	leaq	12(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	(%r15), %ecx
	movslq	4(%r15), %rax
	cmpl	%eax, %ecx
	jge	LBB0_4
## %bb.1:
	movslq	%ecx, %rsi
	leaq	(,%rsi,8), %rdx
	addq	16(%r15), %rdx
	movq	%rax, %rdi
	subq	%rsi, %rdi
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rdx,%rsi,8)
	je	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rsi
	cmpq	%rsi, %rdi
	jne	LBB0_2
LBB0_4:
	testl	%ecx, %ecx
	jle	LBB0_10
## %bb.5:
	movq	16(%r15), %rdx
	movl	%ecx, %esi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rdx,%rbx,8)
	je	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%rbx
	cmpq	%rbx, %rsi
	jne	LBB0_6
	jmp	LBB0_9
LBB0_8:
	addl	%esi, %ecx
LBB0_9:
	movl	%ecx, %ebx
LBB0_10:
	cmpl	%eax, %ebx
	jge	LBB0_23
## %bb.11:
	movq	16(%r15), %rax
	movslq	%ebx, %rcx
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_12
LBB0_23:
	xorl	%ebx, %ebx
	subl	(%r13), %ebx
LBB0_22:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	leal	1(%rbx), %eax
	movl	%eax, (%r15)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$72, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_13
## %bb.14:
	movq	%rax, %r13
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r13)
	movq	%r15, 64(%r13)
	movq	___I40E_VSI_DOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	56(%r13), %esi
	callq	_set_bit
	movl	%ebx, 4(%r13)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 40(%r13)
	movslq	(%r13), %rcx
	movq	_I40E_VSI_MAIN@GOTPCREL(%rip), %rdx
	movl	$64, %eax
	cmpq	%rcx, (%rdx)
	jne	LBB0_16
## %bb.15:
	movl	8(%r15), %eax
LBB0_16:
	movl	%eax, 8(%r13)
	movl	$0, 12(%r13)
	movq	_I40E_DEFAULT_IRQ_WORK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r13)
	movl	28(%r13), %edi
	callq	_hash_init
	movl	$0, 16(%r13)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movq	_I40E_VSI_MAIN@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	jne	LBB0_18
## %bb.17:
	movl	24(%r15), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_bitmap_zalloc
	movl	%eax, 20(%r13)
	testl	%eax, %eax
	je	LBB0_21
LBB0_18:
	movq	%r13, %rdi
	callq	_i40e_set_num_rings_in_vsi
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_21
## %bb.19:
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_i40e_vsi_alloc_arrays
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_20
LBB0_21:
	movl	20(%r13), %edi
	callq	_bitmap_free
	movl	%ebx, (%r15)
	movq	%r13, %rdi
	callq	_kfree
	movl	%r12d, %ebx
	jmp	LBB0_22
LBB0_13:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_22
LBB0_20:
	movq	_i40e_msix_clean_rings@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_i40e_vsi_setup_irqhandler
	movq	%r13, %rdi
	addq	$24, %rdi
	callq	_spin_lock_init
	movq	16(%r15), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%r13, (%rax,%rcx,8)
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	___I40E_VSI_DOWN,4,2            ## @__I40E_VSI_DOWN
	.comm	_I40E_VSI_MAIN,8,3              ## @I40E_VSI_MAIN
	.comm	_I40E_DEFAULT_IRQ_WORK,4,2      ## @I40E_DEFAULT_IRQ_WORK
	.comm	_i40e_msix_clean_rings,4,2      ## @i40e_msix_clean_rings
	.no_dead_strip	_i40e_vsi_mem_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i40e_vsi_mem_alloc
_i40e_vsi_mem_alloc:                    ; @i40e_vsi_mem_alloc
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x23, _ENODEV@GOTPAGE
Lloh1:
	ldr	x23, [x23, _ENODEV@GOTPAGEOFF]
	ldr	w24, [x23]
	add	x19, x0, #12
	mov	x0, x19
	bl	_mutex_lock
	ldp	w9, w8, [x20]
                                        ; kill: def $w8 killed $w8 def $x8
	sxtw	x8, w8
	cmp	w9, w8
	b.ge	LBB0_4
; %bb.1:
	mov	x10, x9
	sxtw	x11, w10
	ldr	x10, [x20, #16]
	add	x10, x10, x11, lsl #3
	sub	x11, x8, x11
	mov	x21, x9
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x10]
	cbz	x12, LBB0_9
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w21, w21, #1
	add	x10, x10, #8
	subs	x11, x11, #1
	b.ne	LBB0_2
LBB0_4:
	cmp	w9, #1
	b.lt	LBB0_10
; %bb.5:
	mov	x21, #0
	ldr	x10, [x20, #16]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x10, x21, lsl #3]
	cbz	x11, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x21, x21, #1
	cmp	x9, x21
	b.ne	LBB0_6
; %bb.8:
	mov	x21, x9
LBB0_9:
	cmp	w21, w8
	b.lt	LBB0_11
	b	LBB0_12
LBB0_10:
	mov	w21, #0
	cmp	w21, w8
	b.ge	LBB0_12
LBB0_11:
	ldr	x8, [x20, #16]
	ldr	x8, [x8, w21, sxtw #3]
	cbz	x8, LBB0_15
LBB0_12:
	ldr	w8, [x23]
LBB0_13:
	neg	w21, w8
LBB0_14:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_15:
	add	w8, w21, #1
	str	w8, [x20]
Lloh2:
	adrp	x25, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x25, [x25, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	w0, #72
	bl	_kzalloc
	cbz	x0, LBB0_18
; %bb.16:
	mov	x23, x0
	str	w22, [x0]
	str	x20, [x0, #64]
Lloh4:
	adrp	x8, ___I40E_VSI_DOWN@GOTPAGE
Lloh5:
	ldr	x8, [x8, ___I40E_VSI_DOWN@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	ldr	w1, [x23, #56]
	bl	_set_bit
	str	w21, [x23, #4]
	stp	xzr, xzr, [x23, #40]
	ldrsw	x8, [x23]
Lloh7:
	adrp	x26, _I40E_VSI_MAIN@GOTPAGE
Lloh8:
	ldr	x26, [x26, _I40E_VSI_MAIN@GOTPAGEOFF]
	ldr	x9, [x26]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.17:
	ldr	w8, [x20, #8]
	b	LBB0_20
LBB0_18:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	b	LBB0_13
LBB0_19:
	mov	w8, #64
LBB0_20:
	stp	w8, wzr, [x23, #8]
Lloh12:
	adrp	x8, _I40E_DEFAULT_IRQ_WORK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _I40E_DEFAULT_IRQ_WORK@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x23, #32]
	ldr	w0, [x23, #28]
	bl	_hash_init
	str	wzr, [x23, #16]
	ldr	x8, [x26]
	cmp	x8, w22, uxtw
	b.ne	LBB0_22
; %bb.21:
	ldr	w0, [x20, #24]
	ldr	w1, [x25]
	bl	_bitmap_zalloc
	str	w0, [x23, #20]
	cbz	w0, LBB0_25
LBB0_22:
	mov	x0, x23
	bl	_i40e_set_num_rings_in_vsi
	mov	x22, x0
	cbnz	w0, LBB0_26
; %bb.23:
	mov	x0, x23
	mov	w1, #1
	bl	_i40e_vsi_alloc_arrays
	mov	x22, x0
	cbnz	w0, LBB0_26
; %bb.24:
	mov	x8, x21
	sxtw	x22, w8
Lloh15:
	adrp	x8, _i40e_msix_clean_rings@GOTPAGE
Lloh16:
	ldr	x8, [x8, _i40e_msix_clean_rings@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_i40e_vsi_setup_irqhandler
	add	x0, x23, #24
	bl	_spin_lock_init
	ldr	x8, [x20, #16]
	str	x23, [x8, x22, lsl #3]
	b	LBB0_14
LBB0_25:
	neg	w22, w24
LBB0_26:
	ldr	w0, [x23, #20]
	bl	_bitmap_free
	str	w21, [x20]
	mov	x0, x23
	bl	_kfree
	mov	x21, x22
	b	LBB0_14
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	___I40E_VSI_DOWN,4,2            ; @__I40E_VSI_DOWN
	.comm	_I40E_VSI_MAIN,8,3              ; @I40E_VSI_MAIN
	.comm	_I40E_DEFAULT_IRQ_WORK,4,2      ; @I40E_DEFAULT_IRQ_WORK
	.comm	_i40e_msix_clean_rings,4,2      ; @i40e_msix_clean_rings
	.no_dead_strip	_i40e_vsi_mem_alloc
.subsections_via_symbols
