	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hfi1_vnic_init
_hfi1_vnic_init:                        ## @hfi1_vnic_init
	.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	%rdi, %r15
	movq	8(%rdi), %r12
	movq	_hfi1_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	cmpl	$0, 4(%r12)
	je	LBB0_1
LBB0_2:
	movl	(%r12), %r13d
	movl	(%r15), %ecx
	xorl	%r14d, %r14d
	cmpl	%ecx, %r13d
	jge	LBB0_7
## %bb.3:
	movslq	%r13d, %r13
	movq	8(%r12), %rsi
	leaq	(,%r13,8), %rbx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	addq	%rbx, %rsi
	movq	%r12, %rdi
	callq	_hfi1_vnic_allot_ctxt
	testl	%eax, %eax
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%r12), %rax
	movq	(%rax,%rbx), %rdi
	callq	_hfi1_rcd_get
	movq	8(%r12), %rsi
	movq	(%rsi,%rbx), %rax
	movl	%r13d, (%rax)
	incq	%r13
	movslq	(%r15), %rcx
	addq	$8, %rbx
	cmpq	%rcx, %r13
	jl	LBB0_4
	jmp	LBB0_7
LBB0_1:
	movq	%r12, %rdi
	callq	_hfi1_vnic_txreq_init
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_16
	jmp	LBB0_2
LBB0_5:
	movl	(%r15), %ecx
	movl	%eax, %r14d
LBB0_7:
	movl	(%r12), %eax
	cmpl	%ecx, %r13d
	jge	LBB0_11
## %bb.8:
	cmpl	%eax, %r13d
	jle	LBB0_14
## %bb.9:
	movslq	%r13d, %rbx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	leaq	-1(%rbx), %r15
	movq	8(%r12), %rax
	movq	-8(%rax,%rbx,8), %rsi
	movq	%r12, %rdi
	callq	_deallocate_vnic_ctxt
	movq	8(%r12), %rax
	movq	-8(%rax,%rbx,8), %rdi
	callq	_hfi1_rcd_put
	movq	8(%r12), %rax
	movq	$0, -8(%rax,%rbx,8)
	movslq	(%r12), %rax
	movq	%r15, %rbx
	cmpq	%rax, %r15
	jg	LBB0_10
LBB0_14:
	cmpl	$0, 4(%r12)
	je	LBB0_15
LBB0_16:
	movq	_hfi1_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	cmpl	%r13d, %eax
	je	LBB0_13
## %bb.12:
	movl	%r13d, (%r12)
	movq	%r12, %rdi
	callq	_hfi1_init_vnic_rsm
LBB0_13:
	incl	4(%r12)
	movq	%r15, %rdi
	callq	_hfi1_vnic_sdma_init
	cmpl	$0, 4(%r12)
	jne	LBB0_16
LBB0_15:
	movq	%r12, %rdi
	callq	_hfi1_vnic_txreq_deinit
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_hfi1_mutex,4,2                 ## @hfi1_mutex
	.no_dead_strip	_hfi1_vnic_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hfi1_vnic_init
_hfi1_vnic_init:                        ; @hfi1_vnic_init
	.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	x20, x0
	ldr	x19, [x0, #8]
Lloh0:
	adrp	x0, _hfi1_mutex@GOTPAGE
Lloh1:
	ldr	x0, [x0, _hfi1_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_6
LBB0_1:
	ldr	w22, [x19]
	ldr	w8, [x20]
	cmp	w22, w8
	b.ge	LBB0_5
; %bb.2:
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
	sxtw	x22, w22
	ldr	x9, [x19, #8]
	lsl	x23, x22, #3
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, x9, x23
	mov	x0, x19
	bl	_hfi1_vnic_allot_ctxt
	cbnz	w0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #8]
	ldr	x0, [x8, x23]
	bl	_hfi1_rcd_get
	ldr	x9, [x19, #8]
	ldr	x8, [x9, x23]
	str	w22, [x8]
	add	x22, x22, #1
	ldrsw	x8, [x20]
	add	x23, x23, #8
	cmp	x22, x8
	b.lt	LBB0_3
LBB0_5:
	mov	w21, #0
	b	LBB0_8
LBB0_6:
	mov	x0, x19
	bl	_hfi1_vnic_txreq_init
	mov	x21, x0
	cbnz	w0, LBB0_13
	b	LBB0_1
LBB0_7:
	mov	x21, x0
	ldr	w8, [x20]
LBB0_8:
	ldr	w9, [x19]
	cmp	w22, w8
	b.ge	LBB0_14
; %bb.9:
	cmp	w22, w9
	b.le	LBB0_12
; %bb.10:
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
	sxtw	x8, w22
	sub	x20, x8, #1
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	lsl	x22, x20, #3
	ldr	x1, [x8, x22]
	mov	x0, x19
	bl	_deallocate_vnic_ctxt
	ldr	x8, [x19, #8]
	ldr	x0, [x8, x22]
	bl	_hfi1_rcd_put
	ldr	x8, [x19, #8]
	str	xzr, [x8, x22]
	ldrsw	x8, [x19]
	sub	x9, x20, #1
	cmp	x20, x8
	mov	x20, x9
	b.gt	LBB0_11
LBB0_12:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_17
LBB0_13:
Lloh2:
	adrp	x0, _hfi1_mutex@GOTPAGE
Lloh3:
	ldr	x0, [x0, _hfi1_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	mov	x0, x21
	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_14:
	cmp	w9, w22
	b.eq	LBB0_16
; %bb.15:
	str	w22, [x19]
	mov	x0, x19
	bl	_hfi1_init_vnic_rsm
LBB0_16:
	ldr	w8, [x19, #4]
	add	w8, w8, #1
	str	w8, [x19, #4]
	mov	x0, x20
	bl	_hfi1_vnic_sdma_init
	ldr	w8, [x19, #4]
	cbnz	w8, LBB0_13
LBB0_17:
	mov	x0, x19
	bl	_hfi1_vnic_txreq_deinit
	b	LBB0_13
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_hfi1_mutex,4,2                 ; @hfi1_mutex
	.no_dead_strip	_hfi1_vnic_init
.subsections_via_symbols
