	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_usnic_vnic_get_resources       ## -- Begin function usnic_vnic_get_resources
	.p2align	4, 0x90
_usnic_vnic_get_resources:              ## @usnic_vnic_get_resources
	.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	%rcx, %r12
	movl	%edx, %ebx
	movl	%esi, %r15d
	movq	%rdi, %r14
	callq	_usnic_vnic_res_free_cnt
	testq	%r12, %r12
	je	LBB0_12
## %bb.1:
	testl	%ebx, %ebx
	js	LBB0_12
## %bb.2:
	cmpl	%ebx, %eax
	jl	LBB0_12
## %bb.3:
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_17
## %bb.4:
	movq	%rax, %r13
	testl	%ebx, %ebx
	je	LBB0_15
## %bb.5:
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	movl	$8, %esi
	callq	_kcalloc
	movq	%rax, 16(%r13)
	testq	%rax, %rax
	je	LBB0_16
## %bb.6:
	movq	%r14, %rdi
	callq	_spin_lock
	movq	8(%r14), %rcx
	movl	%r15d, %eax
	shlq	$5, %rax
	movl	(%rcx,%rax), %esi
	testl	%esi, %esi
	jle	LBB0_14
## %bb.7:
	leaq	(%rcx,%rax), %r8
	leaq	(%rcx,%rax), %r9
	addq	$16, %r9
	movl	(%r13), %edi
	xorl	%edx, %edx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_9 Depth=1
	incq	%rdx
	movslq	%esi, %rax
	cmpq	%rax, %rdx
	jge	LBB0_14
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%ebx, %edi
	jge	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	(%r9), %rax
	movq	(%rax,%rdx,8), %rax
	cmpq	$0, (%rax)
	jne	LBB0_8
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	decl	8(%r9)
	movq	%r12, (%rax)
	movq	16(%r13), %rsi
	movslq	%edi, %rcx
	incl	%edi
	movl	%edi, (%r13)
	movq	%rax, (%rsi,%rcx,8)
	movl	(%r8), %esi
                                        ## kill: def $edi killed $edi def $rdi
	jmp	LBB0_8
LBB0_12:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_14:
	movq	%r14, %rdi
	callq	_spin_unlock
LBB0_15:
	movl	%r15d, 4(%r13)
	movq	%r14, 8(%r13)
	xorl	%edi, %edi
	cmpl	%ebx, (%r13)
	setne	%dil
	callq	_WARN_ON
	movq	%r13, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	%r13, %rdi
	callq	_kfree
LBB0_17:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_18:
	xorl	%edi, %edi
	subl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_usnic_vnic_get_resources       ; -- Begin function usnic_vnic_get_resources
	.p2align	2
_usnic_vnic_get_resources:              ; @usnic_vnic_get_resources
	.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, x3
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	bl	_usnic_vnic_res_free_cnt
	cbz	x22, LBB0_12
; %bb.1:
	tbnz	w19, #31, LBB0_12
; %bb.2:
	cmp	w0, w19
	b.lt	LBB0_12
; %bb.3:
Lloh0:
	adrp	x24, _GFP_ATOMIC@GOTPAGE
Lloh1:
	ldr	x24, [x24, _GFP_ATOMIC@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	w0, #32
	bl	_kzalloc
	cbz	x0, LBB0_16
; %bb.4:
	mov	x23, x0
	cbz	w19, LBB0_14
; %bb.5:
	ldr	w2, [x24]
	mov	x0, x19
	mov	w1, #8
	bl	_kcalloc
	str	x0, [x23, #16]
	cbz	x0, LBB0_15
; %bb.6:
	mov	x0, x20
	bl	_spin_lock
	ldr	x8, [x20, #8]
	mov	w9, w21
	add	x8, x8, x9, lsl #5
	ldr	w12, [x8]
	cmp	w12, #1
	b.lt	LBB0_13
; %bb.7:
	mov	x9, #0
	add	x10, x8, #16
	add	x11, x8, #24
	ldr	w13, [x23]
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x9, x9, #1
	cmp	x9, w12, sxtw
	b.ge	LBB0_13
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w13, w19
	b.ge	LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x14, [x10]
	ldr	x14, [x14, x9, lsl #3]
	ldr	x15, [x14]
	cbnz	x15, LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w12, [x11]
	sub	w12, w12, #1
	str	w12, [x11]
	str	x22, [x14]
	ldr	x12, [x23, #16]
	str	x14, [x12, w13, sxtw #3]
	add	w13, w13, #1
	str	w13, [x23]
	ldr	w12, [x8]
	b	LBB0_8
LBB0_12:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_17
LBB0_13:
	mov	x0, x20
	bl	_spin_unlock
LBB0_14:
	str	w21, [x23, #4]
	str	x20, [x23, #8]
	ldr	w8, [x23]
	cmp	w8, w19
	cset	w0, ne
	bl	_WARN_ON
	mov	x0, x23
	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_15:
	mov	x0, x23
	bl	_kfree
LBB0_16:
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_17:
	ldr	w8, [x8]
	neg	w0, w8
	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
	b	_ERR_PTR
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
