	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function allocate_vnic_ctxt
_allocate_vnic_ctxt:                    ## @allocate_vnic_ctxt
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_HFI1_FROZEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_3
## %bb.1:
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_3:
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	4(%rdi), %esi
	movl	8(%rdi), %edi
	leaq	-40(%rbp), %rdx
	callq	_hfi1_create_ctxtdata
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movq	_MULTI_PKT_EGR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_HFI1_CAP_KGET
	movl	%eax, %r15d
	movq	_NODROP_RHQ_FULL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_HFI1_CAP_KGET
	movl	%eax, %r12d
	orl	%r15d, %r12d
	movq	_NODROP_EGR_FULL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_HFI1_CAP_KGET
	movl	%eax, %r15d
	movq	_DMA_RTAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_HFI1_CAP_KGET
	orl	%r15d, %eax
	orl	%r12d, %eax
	movq	-40(%rbp), %rdi
	movl	%eax, (%rdi)
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, 4(%rdi)
	callq	_msix_request_rcd_irq
	movq	_hfi1_stats@GOTPCREL(%rip), %rax
	incl	(%rax)
	movq	-40(%rbp), %rax
	movl	12(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dd_dev_dbg
	movq	-40(%rbp), %rax
	movq	%rax, (%r14)
	xorl	%eax, %eax
LBB0_6:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dd_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_HFI1_FROZEN,4,2                ## @HFI1_FROZEN
	.comm	_EIO,4,2                        ## @EIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to create ctxtdata, failing open\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MULTI_PKT_EGR,4,2              ## @MULTI_PKT_EGR
	.comm	_NODROP_RHQ_FULL,4,2            ## @NODROP_RHQ_FULL
	.comm	_NODROP_EGR_FULL,4,2            ## @NODROP_EGR_FULL
	.comm	_DMA_RTAIL,4,2                  ## @DMA_RTAIL
	.comm	_hfi1_stats,4,2                 ## @hfi1_stats
L_.str.1:                               ## @.str.1
	.asciz	"created vnic context %d\n"

	.no_dead_strip	_allocate_vnic_ctxt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function allocate_vnic_ctxt
_allocate_vnic_ctxt:                    ; @allocate_vnic_ctxt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _HFI1_FROZEN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HFI1_FROZEN@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _EIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_3:
	mov	x19, x1
	mov	x20, x0
	ldr	w0, [x0, #8]
	ldr	w1, [x20, #4]
	add	x2, sp, #8
	bl	_hfi1_create_ctxtdata
	tbnz	w0, #31, LBB0_6
; %bb.4:
Lloh5:
	adrp	x8, _MULTI_PKT_EGR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MULTI_PKT_EGR@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_HFI1_CAP_KGET
	mov	x21, x0
Lloh8:
	adrp	x8, _NODROP_RHQ_FULL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _NODROP_RHQ_FULL@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_HFI1_CAP_KGET
	orr	w21, w0, w21
Lloh11:
	adrp	x8, _NODROP_EGR_FULL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _NODROP_EGR_FULL@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_HFI1_CAP_KGET
	orr	w21, w21, w0
Lloh14:
	adrp	x8, _DMA_RTAIL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DMA_RTAIL@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_HFI1_CAP_KGET
	orr	w8, w21, w0
	ldr	x0, [sp, #8]
	str	w8, [x0]
	movi.2s	v0, #1
	stur	d0, [x0, #4]
	bl	_msix_request_rcd_irq
Lloh17:
	adrp	x8, _hfi1_stats@GOTPAGE
Lloh18:
	ldr	x8, [x8, _hfi1_stats@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	ldr	x8, [sp, #8]
	ldr	w2, [x8, #12]
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dd_dev_dbg
	mov	w0, #0
	ldr	x8, [sp, #8]
	str	x8, [x19]
LBB0_5:
	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
	add	sp, sp, #64
	ret
LBB0_6:
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dd_dev_err
Lloh23:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_HFI1_FROZEN,4,2                ; @HFI1_FROZEN
	.comm	_EIO,4,2                        ; @EIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to create ctxtdata, failing open\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MULTI_PKT_EGR,4,2              ; @MULTI_PKT_EGR
	.comm	_NODROP_RHQ_FULL,4,2            ; @NODROP_RHQ_FULL
	.comm	_NODROP_EGR_FULL,4,2            ; @NODROP_EGR_FULL
	.comm	_DMA_RTAIL,4,2                  ; @DMA_RTAIL
	.comm	_hfi1_stats,4,2                 ; @hfi1_stats
l_.str.1:                               ; @.str.1
	.asciz	"created vnic context %d\n"

	.no_dead_strip	_allocate_vnic_ctxt
.subsections_via_symbols
