	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vnic_wq_alloc_bufs
_vnic_wq_alloc_bufs:                    ## @vnic_wq_alloc_bufs
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	24(%rdi), %ebx
	movl	%ebx, %edi
	callq	_VNIC_WQ_BUF_BLKS_NEEDED
	testl	%eax, %eax
	je	LBB0_14
## %bb.1:
	movl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_VNIC_WQ_BUF_BLK_SZ
	movl	(%r12), %esi
	movl	%eax, %edi
	callq	_kzalloc
	movq	(%r14), %rcx
	movq	%rax, (%rcx,%r15,8)
	movq	(%r14), %rax
	cmpq	$0, (%rax,%r15,8)
	je	LBB0_16
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%r15
	cmpq	%r15, -48(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_2
## %bb.4:
	movl	$1, %eax
	subl	%ebx, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r14), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r15)
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpq	-48(%rbp), %rax                 ## 8-byte Folded Reload
	je	LBB0_14
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	movq	%rax, %r12
	movq	(%r14), %rax
	movq	(%rax,%r12,8), %r15
	movl	%ebx, %edi
	callq	_VNIC_WQ_BUF_BLK_ENTRIES
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	leaq	1(%r12), %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	testl	%eax, %eax
	je	LBB0_13
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	xorl	%r12d, %r12d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=2
	leaq	24(%r15), %rax
	movq	%rax, %r13
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=2
	movq	%rax, 8(%r15)
	movl	%ebx, %edi
	callq	_VNIC_WQ_BUF_BLK_ENTRIES
	movq	%r13, %r15
	cmpl	%eax, %r12d
	jae	LBB0_13
LBB0_7:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%ebx, %edi
	callq	_VNIC_WQ_BUF_BLK_ENTRIES
                                        ## kill: def $eax killed $eax def $rax
	imull	-72(%rbp), %eax                 ## 4-byte Folded Reload
	leal	(%r12,%rax), %ecx
	movl	%ecx, (%r15)
	imull	28(%r14), %ecx
	shlq	$2, %rcx
	addq	32(%r14), %rcx
	movq	%rcx, 16(%r15)
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	addl	%r12d, %ecx
	addl	%ecx, %eax
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=2
	incl	%r12d
	movl	%ebx, %edi
	callq	_VNIC_WQ_BUF_BLK_ENTRIES
	cmpl	%eax, %r12d
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=2
	movq	(%r14), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rax,%rcx,8), %rax
	movq	%r15, %r13
	jmp	LBB0_12
LBB0_14:
	movq	(%r14), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r14)
	movq	%rax, 16(%r14)
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_16:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_15:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_vnic_wq_alloc_bufs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vnic_wq_alloc_bufs
_vnic_wq_alloc_bufs:                    ; @vnic_wq_alloc_bufs
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x0
	ldr	w20, [x0, #24]
	mov	x0, x20
	bl	_VNIC_WQ_BUF_BLKS_NEEDED
	cbz	w0, LBB0_14
; %bb.1:
	mov	x22, #0
	mov	w21, w0
	lsl	x23, x21, #3
Lloh0:
	adrp	x24, _GFP_ATOMIC@GOTPAGE
Lloh1:
	ldr	x24, [x24, _GFP_ATOMIC@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_VNIC_WQ_BUF_BLK_SZ
	ldr	w1, [x24]
	bl	_kzalloc
	ldr	x8, [x19]
	str	x0, [x8, x22]
	ldr	x8, [x19]
	ldr	x8, [x8, x22]
	cbz	x8, LBB0_15
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x22, x22, #8
	cmp	x23, x22
	b.ne	LBB0_2
; %bb.4:
	mov	w22, #0
	mov	x23, #0
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x19]
	ldr	x8, [x8]
	str	x8, [x25, #8]
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	sub	w22, w22, #1
	cmp	x23, x21
	b.eq	LBB0_14
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
	mov	x24, x23
	ldr	x8, [x19]
	ldr	x25, [x8, x23, lsl #3]
	mov	x0, x20
	bl	_VNIC_WQ_BUF_BLK_ENTRIES
	add	x23, x23, #1
	cbz	w0, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	w26, #1
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=2
	add	x8, x25, #24
	mov	x27, x8
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=2
	str	x8, [x25, #8]
	mov	x0, x20
	bl	_VNIC_WQ_BUF_BLK_ENTRIES
	add	w8, w26, #1
	mov	x25, x27
	cmp	w26, w0
	mov	x26, x8
	b.hs	LBB0_6
LBB0_11:                                ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x20
	bl	_VNIC_WQ_BUF_BLK_ENTRIES
	madd	w8, w24, w0, w26
	sub	w8, w8, #1
	str	w8, [x25]
	ldr	x9, [x19, #32]
	ldr	w10, [x19, #28]
	mul	w8, w10, w8
	add	x8, x9, w8, uxtw #2
	str	x8, [x25, #16]
	madd	w8, w22, w0, w20
	cmp	w8, w26
	b.eq	LBB0_5
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=2
	mov	x0, x20
	bl	_VNIC_WQ_BUF_BLK_ENTRIES
	cmp	w26, w0
	b.ne	LBB0_9
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=2
	ldr	x8, [x19]
	ldr	x8, [x8, x23, lsl #3]
	mov	x27, x25
	b	LBB0_10
LBB0_14:
	mov	w0, #0
	ldr	x8, [x19]
	ldr	x8, [x8]
	stp	x8, x8, [x19, #8]
	b	LBB0_16
LBB0_15:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_16:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_vnic_wq_alloc_bufs
.subsections_via_symbols
