	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hfi1_vnic_alloc_rn             ## -- Begin function hfi1_vnic_alloc_rn
	.p2align	4, 0x90
_hfi1_vnic_alloc_rn:                    ## @hfi1_vnic_alloc_rn
	.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	%r9, -48(%rbp)                  ## 8-byte Spill
	movl	%r8d, %r13d
	movq	%rcx, %r12
	movl	%edx, %ebx
	movq	%rsi, %r14
	callq	_dd_from_ibdev
	movl	(%rax), %r9d
	testl	%r9d, %r9d
	je	LBB0_1
## %bb.3:
	testq	%r14, %r14
	je	LBB0_5
## %bb.4:
	movq	%rax, %r15
	cmpq	%r14, 8(%rax)
	jge	LBB0_6
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_6:
	movq	_RDMA_NETDEV_OPA_VNIC@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_7
## %bb.8:
	movl	16(%r15), %r8d
	movzbl	%r13b, %edx
	movl	$44, %edi
	movq	%r12, %rsi
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	callq	_alloc_netdev_mqs
	testq	%rax, %rax
	je	LBB0_1
## %bb.9:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_netdev_priv
	movq	%rax, %r12
	movq	%r14, %rdi
	callq	_opa_vnic_dev_priv
	movq	%rax, %r13
	movq	%r15, 32(%rax)
	movl	16(%r15), %eax
	movl	%eax, 24(%r13)
	movl	(%r15), %eax
	movl	%eax, (%r13)
	movq	%r14, 16(%r13)
	movq	_hfi1_vnic_free_rn@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r12)
	movq	_hfi1_vnic_set_vesw_id@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
	movq	_NETIF_F_HIGHDMA@GOTPCREL(%rip), %rax
	movq	_NETIF_F_SG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, (%r14)
	movl	%ecx, 4(%r14)
	movl	%ecx, 8(%r14)
	movq	_HFI_TX_TIMEOUT_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movl	%eax, 24(%r14)
	movq	_hfi1_netdev_ops@GOTPCREL(%rip), %rax
	movq	%rax, 16(%r14)
	leaq	4(%r13), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_mutex_init
	cmpl	$0, (%r13)
	jle	LBB0_12
## %bb.10:
	movl	$16, %ebx
	xorl	%r12d, %r12d
	movq	_hfi1_vnic_napi@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movl	%r12d, -16(%rax,%rbx)
	movq	%r13, (%rax,%rbx)
	movq	%r14, -8(%rax,%rbx)
	leaq	(%rax,%rbx), %rsi
	addq	$-12, %rsi
	movl	(%r15), %edx
	movq	%r14, %rdi
	movl	$64, %ecx
	callq	_netif_napi_add
	incq	%r12
	movslq	(%r13), %rax
	addq	$24, %rbx
	cmpq	%rax, %r12
	jl	LBB0_11
LBB0_12:
	movq	%r13, %rdi
	callq	_hfi1_vnic_init
	testl	%eax, %eax
	je	LBB0_15
## %bb.13:
	movl	%eax, %ebx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_destroy
	movq	%r14, %rdi
	callq	_free_netdev
	jmp	LBB0_14
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_14:
	movl	%ebx, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_7:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_15:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_RDMA_NETDEV_OPA_VNIC,4,2       ## @RDMA_NETDEV_OPA_VNIC
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_hfi1_vnic_free_rn,4,2          ## @hfi1_vnic_free_rn
	.comm	_hfi1_vnic_set_vesw_id,4,2      ## @hfi1_vnic_set_vesw_id
	.comm	_NETIF_F_HIGHDMA,4,2            ## @NETIF_F_HIGHDMA
	.comm	_NETIF_F_SG,4,2                 ## @NETIF_F_SG
	.comm	_HFI_TX_TIMEOUT_MS,4,2          ## @HFI_TX_TIMEOUT_MS
	.comm	_hfi1_netdev_ops,4,2            ## @hfi1_netdev_ops
	.comm	_hfi1_vnic_napi,4,2             ## @hfi1_vnic_napi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hfi1_vnic_alloc_rn             ; -- Begin function hfi1_vnic_alloc_rn
	.p2align	2
_hfi1_vnic_alloc_rn:                    ; @hfi1_vnic_alloc_rn
	.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	x19, x5
	mov	x20, x4
	mov	x22, x3
	mov	x23, x2
	mov	x24, x1
	bl	_dd_from_ibdev
	ldr	w5, [x0]
	cbz	w5, LBB0_11
; %bb.1:
	cbz	x24, LBB0_3
; %bb.2:
	mov	x21, x0
	ldr	x8, [x0, #8]
	cmp	x8, x24
	b.ge	LBB0_4
LBB0_3:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_12
LBB0_4:
Lloh2:
	adrp	x8, _RDMA_NETDEV_OPA_VNIC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RDMA_NETDEV_OPA_VNIC@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, w23
	b.ne	LBB0_14
; %bb.5:
	ldr	w4, [x21, #16]
	mov	w0, #44
	mov	x1, x22
	mov	x2, x20
	mov	x3, x19
	bl	_alloc_netdev_mqs
	cbz	x0, LBB0_11
; %bb.6:
	mov	x19, x0
	bl	_netdev_priv
	mov	x22, x0
	mov	x0, x19
	bl	_opa_vnic_dev_priv
	mov	x20, x0
	str	x21, [x0, #32]
	ldr	w8, [x21, #16]
	str	w8, [x0, #24]
	ldr	w8, [x21]
	str	w8, [x0]
	str	x19, [x0, #16]
Lloh5:
	adrp	x8, _hfi1_vnic_free_rn@GOTPAGE
Lloh6:
	ldr	x8, [x8, _hfi1_vnic_free_rn@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _hfi1_vnic_set_vesw_id@GOTPAGE
Lloh9:
	ldr	x9, [x9, _hfi1_vnic_set_vesw_id@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	adrp	x10, _NETIF_F_HIGHDMA@GOTPAGE
Lloh12:
	ldr	x10, [x10, _NETIF_F_HIGHDMA@GOTPAGEOFF]
	stp	w9, w8, [x22]
Lloh13:
	ldr	w8, [x10]
Lloh14:
	adrp	x9, _NETIF_F_SG@GOTPAGE
Lloh15:
	ldr	x9, [x9, _NETIF_F_SG@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w9, w8
	stp	w8, w8, [x19]
	str	w8, [x19, #8]
Lloh17:
	adrp	x8, _HFI_TX_TIMEOUT_MS@GOTPAGE
Lloh18:
	ldr	x8, [x8, _HFI_TX_TIMEOUT_MS@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	str	w0, [x19, #24]
Lloh20:
	adrp	x8, _hfi1_netdev_ops@GOTPAGE
Lloh21:
	ldr	x8, [x8, _hfi1_netdev_ops@GOTPAGEOFF]
	str	x8, [x19, #16]
	add	x21, x20, #4
	mov	x0, x21
	bl	_mutex_init
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.7:
	mov	x22, #0
	mov	x23, #0
Lloh22:
	adrp	x24, _hfi1_vnic_napi@GOTPAGE
Lloh23:
	ldr	x24, [x24, _hfi1_vnic_napi@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	add	x8, x8, x22
	str	w23, [x8]
	stp	x19, x20, [x8, #8]
	add	x1, x8, #4
	ldr	w2, [x24]
	mov	x0, x19
	mov	w3, #64
	bl	_netif_napi_add
	add	x23, x23, #1
	ldrsw	x8, [x20]
	add	x22, x22, #24
	cmp	x23, x8
	b.lt	LBB0_8
LBB0_9:
	mov	x0, x20
	bl	_hfi1_vnic_init
	cbz	w0, LBB0_15
; %bb.10:
	mov	x20, x0
	mov	x0, x21
	bl	_mutex_destroy
	mov	x0, x19
	bl	_free_netdev
	b	LBB0_13
LBB0_11:
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_13:
	mov	x0, x20
	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
LBB0_14:
Lloh26:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_12
LBB0_15:
	mov	x0, x19
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_RDMA_NETDEV_OPA_VNIC,4,2       ; @RDMA_NETDEV_OPA_VNIC
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_hfi1_vnic_free_rn,4,2          ; @hfi1_vnic_free_rn
	.comm	_hfi1_vnic_set_vesw_id,4,2      ; @hfi1_vnic_set_vesw_id
	.comm	_NETIF_F_HIGHDMA,4,2            ; @NETIF_F_HIGHDMA
	.comm	_NETIF_F_SG,4,2                 ; @NETIF_F_SG
	.comm	_HFI_TX_TIMEOUT_MS,4,2          ; @HFI_TX_TIMEOUT_MS
	.comm	_hfi1_netdev_ops,4,2            ; @hfi1_netdev_ops
	.comm	_hfi1_vnic_napi,4,2             ; @hfi1_vnic_napi
.subsections_via_symbols
