	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_netvsc_send                    ## -- Begin function netvsc_send
	.p2align	4, 0x90
_netvsc_send:                           ## @netvsc_send
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r13
	callq	_get_outbound_net_device
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r15
	movq	8(%rax), %r14
	movq	_NVSP_MSG1_TYPE_SEND_RNDIS_PKT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	xorl	%eax, %eax
	cmpq	$0, 24(%r12)
	sete	%al
	movl	%eax, -64(%rbp)
	movl	$-1, -60(%rbp)
	movq	$0, -56(%rbp)
	movq	(%r12), %rdx
	movq	16(%r12), %r9
	testq	%r9, %r9
	cmovneq	%r12, %r9
	movq	(%r13), %rdi
	testq	%rdx, %rdx
	je	LBB0_5
## %bb.4:
	movl	8(%r12), %esi
	leaq	-64(%rbp), %rcx
	movl	$24, %r8d
	callq	_vmbus_sendpacket_pagebuffer
	jmp	LBB0_6
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_5:
	movq	_VM_PKT_DATA_INBAND@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	-64(%rbp), %rsi
	movl	$24, %edx
	movq	%r9, %rcx
	movl	%eax, %r9d
	callq	_vmbus_sendpacket
LBB0_6:
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_7
## %bb.10:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%ebx, %eax
	jne	LBB0_13
## %bb.11:
	movq	%r14, %rdi
	callq	_netif_stop_queue
	movq	%r15, %rdi
	callq	_atomic_read
	testl	%eax, %eax
	jg	LBB0_14
## %bb.12:
	movq	%r14, %rdi
	callq	_netif_wake_queue
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_7:
	movq	%r15, %rdi
	callq	_atomic_inc
	movq	(%r13), %rdi
	callq	_hv_ringbuf_avail_percent
	movq	_RING_AVAIL_PERCENT_LOWATER@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	jge	LBB0_14
## %bb.8:
	movq	%r14, %rdi
	callq	_netif_stop_queue
	movq	%r15, %rdi
	callq	_atomic_read
	testl	%eax, %eax
	jg	LBB0_14
## %bb.9:
	movq	%r14, %rdi
	callq	_netif_wake_queue
	jmp	LBB0_14
LBB0_13:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movq	%r12, %rdx
	movl	%ebx, %ecx
	callq	_netdev_err
LBB0_14:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_NVSP_MSG1_TYPE_SEND_RNDIS_PKT,4,2 ## @NVSP_MSG1_TYPE_SEND_RNDIS_PKT
	.comm	_VM_PKT_DATA_INBAND,4,2         ## @VM_PKT_DATA_INBAND
	.comm	_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED,4,2 ## @VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED
	.comm	_RING_AVAIL_PERCENT_LOWATER,8,3 ## @RING_AVAIL_PERCENT_LOWATER
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to send packet %p ret %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_netvsc_send                    ; -- Begin function netvsc_send
	.p2align	2
_netvsc_send:                           ; @netvsc_send
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x21, x1
	mov	x22, x0
	bl	_get_outbound_net_device
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
	ldr	x19, [x0, #8]
Lloh0:
	adrp	x8, _NVSP_MSG1_TYPE_SEND_RNDIS_PKT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NVSP_MSG1_TYPE_SEND_RNDIS_PKT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	ldp	x9, x8, [x21, #16]
	cmp	x8, #0
	cset	w8, eq
	mov	w10, #-1
	stp	w8, w10, [sp, #8]
	str	xzr, [sp, #16]
	cmp	x9, #0
	csel	x5, xzr, x21, eq
	ldr	x2, [x21]
	ldr	x0, [x22]
	cbz	x2, LBB0_8
; %bb.2:
	ldr	w1, [x21, #8]
	add	x3, sp, #8
	mov	w4, #24
	bl	_vmbus_sendpacket_pagebuffer
	mov	x23, x0
	cbz	w0, LBB0_9
LBB0_3:
Lloh3:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmn	w23, w8
	b.ne	LBB0_13
; %bb.4:
	mov	x0, x19
	bl	_netif_stop_queue
	mov	x0, x20
	bl	_atomic_read
	cmp	w0, #0
	b.gt	LBB0_14
; %bb.5:
	mov	x0, x19
	bl	_netif_wake_queue
Lloh6:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh8:
	adrp	x8, _ENODEV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_14
LBB0_8:
Lloh10:
	adrp	x8, _VM_PKT_DATA_INBAND@GOTPAGE
Lloh11:
	ldr	x8, [x8, _VM_PKT_DATA_INBAND@GOTPAGEOFF]
Lloh12:
	ldr	w4, [x8]
Lloh13:
	adrp	x8, _VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED@GOTPAGE
Lloh14:
	ldr	x8, [x8, _VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	add	x1, sp, #8
	mov	w2, #24
	mov	x3, x5
	mov	x5, x8
	bl	_vmbus_sendpacket
	mov	x23, x0
	cbnz	w0, LBB0_3
LBB0_9:
	mov	x0, x20
	bl	_atomic_inc
	ldr	x0, [x22]
	bl	_hv_ringbuf_avail_percent
Lloh16:
	adrp	x8, _RING_AVAIL_PERCENT_LOWATER@GOTPAGE
Lloh17:
	ldr	x8, [x8, _RING_AVAIL_PERCENT_LOWATER@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ge	LBB0_12
; %bb.10:
	mov	x0, x19
	bl	_netif_stop_queue
	mov	x0, x20
	bl	_atomic_read
	cmp	w0, #0
	b.gt	LBB0_12
; %bb.11:
	mov	x0, x19
	bl	_netif_wake_queue
LBB0_12:
	mov	w23, #0
	b	LBB0_14
LBB0_13:
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	mov	x3, x23
	bl	_netdev_err
LBB0_14:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_NVSP_MSG1_TYPE_SEND_RNDIS_PKT,4,2 ; @NVSP_MSG1_TYPE_SEND_RNDIS_PKT
	.comm	_VM_PKT_DATA_INBAND,4,2         ; @VM_PKT_DATA_INBAND
	.comm	_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED,4,2 ; @VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED
	.comm	_RING_AVAIL_PERCENT_LOWATER,8,3 ; @RING_AVAIL_PERCENT_LOWATER
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to send packet %p ret %d\n"

.subsections_via_symbols
