	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nicvf_init_snd_queue
_nicvf_init_snd_queue:                  ## @nicvf_init_snd_queue
	.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	%ecx, %r12d
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	addq	$72, %rsi
	movq	_SND_QUEUE_DESC_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_NICVF_SQ_BASE_ALIGN_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	callq	_nicvf_alloc_q_desc_mem
	testl	%eax, %eax
	jne	LBB0_9
## %bb.1:
	movl	72(%rbx), %eax
	movl	%eax, 76(%rbx)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movl	%r14d, %edi
	movl	$4, %esi
	callq	_kcalloc
	movq	%rax, 64(%rbx)
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 48(%rbx)
	movq	_SND_QUEUE_THRESH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	cmpq	$0, 24(%r15)
	je	LBB0_4
## %bb.3:
	movl	(%r15), %eax
	incl	%eax
	movq	_MAX_SND_QUEUES_PER_QS@GOTPCREL(%rip), %rcx
	imull	(%rcx), %eax
	addl	%eax, %r12d
LBB0_4:
	movq	16(%r15), %rax
	cmpl	(%rax), %r12d
	jge	LBB0_7
## %bb.5:
	movl	(%r13), %edx
	movl	%r14d, %edi
	movl	$4, %esi
	callq	_kcalloc
	movq	%rax, 32(%rbx)
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	$0, 24(%rbx)
	decl	%r14d
	movl	%r14d, (%rbx)
	movl	$1, 4(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_7:
	movq	$0, (%rbx)
	leaq	16(%rbx), %rdi
	leal	-1(%r14), %esi
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rbx)
	callq	_atomic_set
	movq	8(%r15), %rdi
	movq	_TSO_HEADER_SIZE@GOTPCREL(%rip), %rax
	imull	(%rax), %r14d
	leaq	12(%rbx), %rdx
	movl	(%r13), %ecx
	movl	%r14d, %esi
	callq	_dma_alloc_coherent
	movl	%eax, %ecx
	movl	%eax, 8(%rbx)
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jne	LBB0_9
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SND_QUEUE_DESC_SIZE,4,2        ## @SND_QUEUE_DESC_SIZE
	.comm	_NICVF_SQ_BASE_ALIGN_BYTES,4,2  ## @NICVF_SQ_BASE_ALIGN_BYTES
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_SND_QUEUE_THRESH,4,2           ## @SND_QUEUE_THRESH
	.comm	_MAX_SND_QUEUES_PER_QS,4,2      ## @MAX_SND_QUEUES_PER_QS
	.comm	_TSO_HEADER_SIZE,4,2            ## @TSO_HEADER_SIZE
	.no_dead_strip	_nicvf_init_snd_queue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nicvf_init_snd_queue
_nicvf_init_snd_queue:                  ; @nicvf_init_snd_queue
	.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	x20, x2
	mov	x19, x1
	mov	x21, x0
	add	x1, x1, #72
Lloh0:
	adrp	x8, _SND_QUEUE_DESC_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SND_QUEUE_DESC_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
Lloh3:
	adrp	x8, _NICVF_SQ_BASE_ALIGN_BYTES@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NICVF_SQ_BASE_ALIGN_BYTES@GOTPAGEOFF]
Lloh5:
	ldr	w4, [x8]
	bl	_nicvf_alloc_q_desc_mem
	cbnz	w0, LBB0_9
; %bb.1:
	ldr	w8, [x19, #72]
	str	w8, [x19, #76]
Lloh6:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	x0, x20
	mov	w1, #4
	bl	_kcalloc
	str	x0, [x19, #64]
	cbz	x0, LBB0_8
; %bb.2:
	stp	xzr, xzr, [x19, #48]
Lloh8:
	adrp	x8, _SND_QUEUE_THRESH@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SND_QUEUE_THRESH@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x19, #40]
	ldr	x8, [x21, #24]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	w8, [x21]
Lloh11:
	adrp	x9, _MAX_SND_QUEUES_PER_QS@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MAX_SND_QUEUES_PER_QS@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	madd	w8, w9, w8, w9
	add	w22, w8, w22
LBB0_4:
	ldr	x8, [x21, #16]
	ldr	w8, [x8]
	cmp	w22, w8
	b.ge	LBB0_7
; %bb.5:
	ldr	w2, [x23]
	mov	x0, x20
	mov	w1, #4
	bl	_kcalloc
	str	x0, [x19, #32]
	cbz	x0, LBB0_8
; %bb.6:
	mov	w0, #0
	str	xzr, [x19, #24]
	sub	w8, w20, #1
	mov	w9, #1
	stp	w8, w9, [x19]
	b	LBB0_9
LBB0_7:
	str	xzr, [x19]
	add	x0, x19, #16
	sub	w1, w20, #1
	stp	xzr, xzr, [x19, #24]
	bl	_atomic_set
	ldr	x0, [x21, #8]
Lloh14:
	adrp	x8, _TSO_HEADER_SIZE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _TSO_HEADER_SIZE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	mul	w1, w8, w20
	add	x2, x19, #12
	ldr	w3, [x23]
	bl	_dma_alloc_coherent
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19, #8]
	cbnz	w8, LBB0_9
LBB0_8:
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_SND_QUEUE_DESC_SIZE,4,2        ; @SND_QUEUE_DESC_SIZE
	.comm	_NICVF_SQ_BASE_ALIGN_BYTES,4,2  ; @NICVF_SQ_BASE_ALIGN_BYTES
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_SND_QUEUE_THRESH,4,2           ; @SND_QUEUE_THRESH
	.comm	_MAX_SND_QUEUES_PER_QS,4,2      ; @MAX_SND_QUEUES_PER_QS
	.comm	_TSO_HEADER_SIZE,4,2            ; @TSO_HEADER_SIZE
	.no_dead_strip	_nicvf_init_snd_queue
.subsections_via_symbols
