	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_netvsc_device_add              ## -- Begin function netvsc_device_add
	.p2align	4, 0x90
_netvsc_device_add:                     ## @netvsc_device_add
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r14
	callq	_hv_get_drvdata
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_netdev_priv
	movq	%rax, %r12
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_alloc_net_device
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	%rax, %r13
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	_VRSS_SEND_TAB_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%esi, %esi
	jle	LBB0_3
## %bb.2:
	movq	8(%r12), %rdi
	shlq	$3, %rsi
	callq	___bzero
LBB0_3:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movl	(%r14), %edi
	movq	_HV_CALL_ISR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_set_channel_read_mode
	movq	_VRSS_CHANNEL_MAX@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	movq	%r14, %rbx
	jle	LBB0_6
## %bb.4:
	movl	$24, %r12d
	xorl	%r15d, %r15d
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %r14
	movl	(%rbx), %eax
	movl	%eax, (%r14,%r12)
	movq	%r13, -8(%r14,%r12)
	leaq	(%r14,%r12), %rdi
	addq	$-16, %rdi
	movq	%rcx, %rbx
	callq	_u64_stats_init
	leaq	(%r14,%r12), %rdi
	addq	$-20, %rdi
	callq	_u64_stats_init
	movq	%rbx, %rcx
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	incq	%r15
	movslq	(%rcx), %rax
	addq	$32, %r12
	cmpq	%rax, %r15
	jl	LBB0_5
LBB0_6:
	movq	8(%r13), %rsi
	movq	_netvsc_poll@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_NAPI_POLL_WEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_netif_napi_add
	movl	(%rbx), %edi
	movq	_netvsc_ring_bytes@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_netvsc_channel_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	8(%r13), %rax
	movq	%rax, (%rsp)
	movl	%edx, %esi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_vmbus_open
	testl	%eax, %eax
	je	LBB0_10
## %bb.7:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_netdev_err
	jmp	LBB0_12
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movl	%ebx, %edi
	jmp	LBB0_9
LBB0_10:
	movq	%rbx, %r14
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_netdev_dbg
	movq	8(%r13), %rdi
	callq	_napi_enable
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_netvsc_connect_vsp
	testl	%eax, %eax
	je	LBB0_13
## %bb.11:
	movl	%eax, %r15d
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_netdev_err
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_RCU_INIT_POINTER
	movq	8(%r13), %rdi
	callq	_napi_disable
	movl	(%r14), %edi
	callq	_vmbus_close
LBB0_12:
	movq	8(%r13), %rdi
	callq	_netif_napi_del
	movq	%r13, %rdi
	callq	_free_netvsc_device
	movl	%r15d, %edi
LBB0_9:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_13:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	%r13, %rsi
	callq	_rcu_assign_pointer
	movq	%r13, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_VRSS_SEND_TAB_SIZE,4,2         ## @VRSS_SEND_TAB_SIZE
	.comm	_HV_CALL_ISR,4,2                ## @HV_CALL_ISR
	.comm	_VRSS_CHANNEL_MAX,4,2           ## @VRSS_CHANNEL_MAX
	.comm	_netvsc_poll,4,2                ## @netvsc_poll
	.comm	_NAPI_POLL_WEIGHT,4,2           ## @NAPI_POLL_WEIGHT
	.comm	_netvsc_ring_bytes,4,2          ## @netvsc_ring_bytes
	.comm	_netvsc_channel_cb,4,2          ## @netvsc_channel_cb
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to open channel: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"hv_netvsc channel opened successfully\n"

L_.str.2:                               ## @.str.2
	.asciz	"unable to connect to NetVSP - %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_netvsc_device_add              ; -- Begin function netvsc_device_add
	.p2align	2
_netvsc_device_add:                     ; @netvsc_device_add
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x1
	mov	x20, x0
	bl	_hv_get_drvdata
	mov	x21, x0
	bl	_netdev_priv
	mov	x22, x0
	bl	_alloc_net_device
	cbz	x0, LBB0_8
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _VRSS_SEND_TAB_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VRSS_SEND_TAB_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.2:
	ldr	x0, [x22, #8]
	lsl	x1, x8, #3
	bl	_bzero
LBB0_3:
	ldr	w0, [x20]
Lloh3:
	adrp	x8, _HV_CALL_ISR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HV_CALL_ISR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_set_channel_read_mode
Lloh6:
	adrp	x24, _VRSS_CHANNEL_MAX@GOTPAGE
Lloh7:
	ldr	x24, [x24, _VRSS_CHANNEL_MAX@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x25, #0
	mov	x26, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	w9, [x20]
	add	x27, x8, x25
	str	w9, [x27, #24]
	str	x19, [x27, #16]
	add	x0, x27, #8
	bl	_u64_stats_init
	add	x0, x27, #4
	bl	_u64_stats_init
	add	x26, x26, #1
	ldrsw	x8, [x24]
	add	x25, x25, #32
	cmp	x26, x8
	b.lt	LBB0_5
LBB0_6:
	ldr	x1, [x19, #8]
Lloh8:
	adrp	x8, _netvsc_poll@GOTPAGE
Lloh9:
	ldr	x8, [x8, _netvsc_poll@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
Lloh11:
	adrp	x8, _NAPI_POLL_WEIGHT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _NAPI_POLL_WEIGHT@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	mov	x0, x21
	bl	_netif_napi_add
Lloh14:
	adrp	x8, _netvsc_ring_bytes@GOTPAGE
Lloh15:
	ldr	x8, [x8, _netvsc_ring_bytes@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x8, _netvsc_channel_cb@GOTPAGE
Lloh18:
	ldr	x8, [x8, _netvsc_channel_cb@GOTPAGEOFF]
Lloh19:
	ldr	w5, [x8]
	ldr	x6, [x19, #8]
	mov	x2, x1
	mov	x3, #0
	mov	w4, #0
	bl	_vmbus_open
	cbz	w0, LBB0_9
; %bb.7:
	mov	x24, x0
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x24
	bl	_netdev_err
	b	LBB0_11
LBB0_8:
Lloh22:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_9:
Lloh25:
	adrp	x1, l_.str.1@PAGE
Lloh26:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_netdev_dbg
	ldr	x0, [x19, #8]
	bl	_napi_enable
	mov	x0, x20
	mov	x1, x19
	mov	x2, x23
	bl	_netvsc_connect_vsp
	cbz	w0, LBB0_13
; %bb.10:
	mov	x24, x0
Lloh27:
	adrp	x1, l_.str.2@PAGE
Lloh28:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	mov	x2, x24
	bl	_netdev_err
	ldr	w0, [x22]
	mov	x1, #0
	bl	_RCU_INIT_POINTER
	ldr	x0, [x19, #8]
	bl	_napi_disable
	ldr	w0, [x20]
	bl	_vmbus_close
LBB0_11:
	ldr	x0, [x19, #8]
	bl	_netif_napi_del
	mov	x0, x19
	bl	_free_netvsc_device
	mov	x0, x24
LBB0_12:
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_ERR_PTR
LBB0_13:
	ldr	w0, [x22]
	mov	x1, x19
	bl	_rcu_assign_pointer
	mov	x0, x19
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_VRSS_SEND_TAB_SIZE,4,2         ; @VRSS_SEND_TAB_SIZE
	.comm	_HV_CALL_ISR,4,2                ; @HV_CALL_ISR
	.comm	_VRSS_CHANNEL_MAX,4,2           ; @VRSS_CHANNEL_MAX
	.comm	_netvsc_poll,4,2                ; @netvsc_poll
	.comm	_NAPI_POLL_WEIGHT,4,2           ; @NAPI_POLL_WEIGHT
	.comm	_netvsc_ring_bytes,4,2          ; @netvsc_ring_bytes
	.comm	_netvsc_channel_cb,4,2          ; @netvsc_channel_cb
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to open channel: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"hv_netvsc channel opened successfully\n"

l_.str.2:                               ; @.str.2
	.asciz	"unable to connect to NetVSP - %d\n"

.subsections_via_symbols
