	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function netvsc_connect_vsp
_netvsc_connect_vsp:                    ## @netvsc_connect_vsp
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_get_outbound_net_device
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rbx
	movq	%rax, %r15
	addq	$8, %r15
	movq	_NVSP_PROTOCOL_VERSION_2@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	movq	%r14, %rdi
	movq	%rax, %rsi
	movq	%r15, %rdx
	callq	_negotiate_nvsp_ver
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	_NVSP_PROTOCOL_VERSION_1@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_negotiate_nvsp_ver
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_EPROTO@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_6:
	movq	(%r12), %rsi
	movq	%rsi, (%rbx)
	leaq	L_.str(%rip), %rdi
	callq	_pr_debug
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$12, %edx
	callq	_memset
	movq	_NVSP_MSG1_TYPE_SEND_NDIS_VER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movabsq	$4294967301, %rax               ## imm = 0x100000005
	movq	%rax, 8(%rbx)
	movl	(%r14), %edi
	movq	_VM_PKT_DATA_INBAND@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rsi
	movl	$12, %edx
	movq	%r15, %rcx
	xorl	%r9d, %r9d
	callq	_vmbus_sendpacket
	testl	%eax, %eax
	je	LBB0_8
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_netvsc_init_recv_buf           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_NVSP_PROTOCOL_VERSION_2,8,3    ## @NVSP_PROTOCOL_VERSION_2
	.comm	_NVSP_PROTOCOL_VERSION_1,8,3    ## @NVSP_PROTOCOL_VERSION_1
	.comm	_EPROTO,4,2                     ## @EPROTO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Negotiated NVSP version:%x\n"

	.comm	_NVSP_MSG1_TYPE_SEND_NDIS_VER,4,2 ## @NVSP_MSG1_TYPE_SEND_NDIS_VER
	.comm	_VM_PKT_DATA_INBAND,4,2         ## @VM_PKT_DATA_INBAND
	.no_dead_strip	_netvsc_connect_vsp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function netvsc_connect_vsp
lCPI0_0:
	.long	5                               ; 0x5
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_netvsc_connect_vsp:                    ; @netvsc_connect_vsp
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	bl	_get_outbound_net_device
	cbz	x0, LBB0_4
; %bb.1:
	mov	x21, x0
	add	x20, x0, #8
Lloh0:
	adrp	x22, _NVSP_PROTOCOL_VERSION_2@GOTPAGE
Lloh1:
	ldr	x22, [x22, _NVSP_PROTOCOL_VERSION_2@GOTPAGEOFF]
	ldr	x3, [x22]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_negotiate_nvsp_ver
	cbz	x0, LBB0_6
; %bb.2:
Lloh2:
	adrp	x22, _NVSP_PROTOCOL_VERSION_1@GOTPAGE
Lloh3:
	ldr	x22, [x22, _NVSP_PROTOCOL_VERSION_1@GOTPAGEOFF]
	ldr	x3, [x22]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_negotiate_nvsp_ver
	cbz	x0, LBB0_6
; %bb.3:
Lloh4:
	adrp	x8, _EPROTO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EPROTO@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh6:
	adrp	x8, _ENODEV@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_6:
	ldr	x1, [x22]
	str	x1, [x21]
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	mov	x0, x20
	mov	w1, #0
	mov	w2, #12
	bl	_memset
Lloh10:
	adrp	x8, _NVSP_MSG1_TYPE_SEND_NDIS_VER@GOTPAGE
Lloh11:
	ldr	x8, [x8, _NVSP_MSG1_TYPE_SEND_NDIS_VER@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	str	w8, [x21, #16]
Lloh13:
	adrp	x8, lCPI0_0@PAGE
Lloh14:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x21, #8]
	ldr	w0, [x19]
Lloh15:
	adrp	x8, _VM_PKT_DATA_INBAND@GOTPAGE
Lloh16:
	ldr	x8, [x8, _VM_PKT_DATA_INBAND@GOTPAGEOFF]
Lloh17:
	ldr	w4, [x8]
	mov	x1, x20
	mov	w2, #12
	mov	x3, x20
	mov	w5, #0
	bl	_vmbus_sendpacket
	cbz	w0, LBB0_8
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_netvsc_init_recv_buf
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdrp	Lloh13, Lloh15
	.loh AdrpLdr	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_NVSP_PROTOCOL_VERSION_2,8,3    ; @NVSP_PROTOCOL_VERSION_2
	.comm	_NVSP_PROTOCOL_VERSION_1,8,3    ; @NVSP_PROTOCOL_VERSION_1
	.comm	_EPROTO,4,2                     ; @EPROTO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Negotiated NVSP version:%x\n"

	.comm	_NVSP_MSG1_TYPE_SEND_NDIS_VER,4,2 ; @NVSP_MSG1_TYPE_SEND_NDIS_VER
	.comm	_VM_PKT_DATA_INBAND,4,2         ; @VM_PKT_DATA_INBAND
	.no_dead_strip	_netvsc_connect_vsp
.subsections_via_symbols
