	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function netvsc_init_recv_buf
_netvsc_init_recv_buf:                  ## @netvsc_init_recv_buf
	.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	%rdi, %r12
	callq	_get_outbound_net_device
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	(%rax), %rdi
	movq	72(%rax), %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	movq	___GFP_ZERO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	orl	(%r13), %ebx
	callq	_get_order
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	___get_free_pages
	movq	%rax, 64(%r15)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movl	(%r12), %edi
	movq	(%r15), %rdx
	leaq	28(%r15), %rcx
	movq	%rax, %rsi
	callq	_vmbus_establish_gpadl
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_6
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_18
LBB0_3:
	movq	(%r15), %rdx
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_netdev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_16:
	subl	(%rax), %ebx
	jmp	LBB0_17
LBB0_7:
	leaq	32(%r15), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movq	_NVSP_MSG1_TYPE_SEND_RECV_BUF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%r15)
	movl	28(%r15), %eax
	movl	%eax, 52(%r15)
	movq	_NETVSC_RECEIVE_BUFFER_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%r15)
	movl	(%r12), %edi
	movq	_VM_PKT_DATA_INBAND@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%rbx, %rsi
	movl	$32, %edx
	movq	%rbx, %rcx
	callq	_vmbus_sendpacket
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
LBB0_6:
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_netdev_err
LBB0_17:
	movq	%r15, %rdi
	callq	_netvsc_destroy_recv_buf
LBB0_18:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r15, %rdi
	addq	$24, %rdi
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	(%rax,%rax,4), %esi
	callq	_wait_for_completion_timeout
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_BUG_ON
	movq	32(%r15), %rdx
	movq	_NVSP_STAT_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jne	LBB0_10
## %bb.11:
	movl	40(%r15), %esi
	movl	44(%r15), %edi
	movl	%esi, 8(%r15)
	shll	$2, %esi
	movl	(%r13), %edx
	callq	_kmemdup
	movq	%rax, 16(%r15)
	testq	%rax, %rax
	je	LBB0_15
## %bb.12:
	cmpl	$1, 8(%r15)
	jne	LBB0_15
## %bb.13:
	cmpq	$0, (%rax)
	je	LBB0_14
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_16
LBB0_10:
	leaq	L_.str.3(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_netdev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_14:
	xorl	%ebx, %ebx
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	___GFP_ZERO,4,2                 ## @__GFP_ZERO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to allocate receive buffer of size %d\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"unable to establish receive buffer's gpadl\n"

	.comm	_NVSP_MSG1_TYPE_SEND_RECV_BUF,4,2 ## @NVSP_MSG1_TYPE_SEND_RECV_BUF
	.comm	_NETVSC_RECEIVE_BUFFER_ID,4,2   ## @NETVSC_RECEIVE_BUFFER_ID
	.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
L_.str.2:                               ## @.str.2
	.asciz	"unable to send receive buffer's gpadl to netvsp\n"

	.comm	_HZ,4,2                         ## @HZ
	.comm	_NVSP_STAT_SUCCESS,8,3          ## @NVSP_STAT_SUCCESS
L_.str.3:                               ## @.str.3
	.asciz	"Unable to complete receive buffer initialization with NetVsp - status %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_netvsc_init_recv_buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function netvsc_init_recv_buf
_netvsc_init_recv_buf:                  ; @netvsc_init_recv_buf
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x0
	bl	_get_outbound_net_device
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	x20, [x0, #72]
Lloh0:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh2:
	adrp	x9, ___GFP_ZERO@GOTPAGE
Lloh3:
	ldr	x9, [x9, ___GFP_ZERO@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	orr	w22, w9, w8
	ldr	x0, [x0]
	bl	_get_order
	mov	x1, x0
	mov	x0, x22
	bl	___get_free_pages
	str	x0, [x19, #64]
	cbz	x0, LBB0_5
; %bb.2:
	mov	x1, x0
	ldr	w0, [x21]
	mov	x3, x19
	ldr	x2, [x3], #28
	bl	_vmbus_establish_gpadl
	cbz	w0, LBB0_7
; %bb.3:
	mov	x22, x0
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_4:
Lloh7:
	adrp	x8, _ENODEV@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_11
LBB0_5:
	ldr	x8, [x19]
	str	x8, [sp]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_netdev_err
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_10
LBB0_7:
	add	x22, x19, #32
	mov	x0, x22
	mov	w1, #0
	mov	w2, #32
	bl	_memset
Lloh14:
	adrp	x8, _NVSP_MSG1_TYPE_SEND_RECV_BUF@GOTPAGE
Lloh15:
	ldr	x8, [x8, _NVSP_MSG1_TYPE_SEND_RECV_BUF@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [x19, #56]
	ldr	w8, [x19, #28]
Lloh17:
	adrp	x9, _NETVSC_RECEIVE_BUFFER_ID@GOTPAGE
Lloh18:
	ldr	x9, [x9, _NETVSC_RECEIVE_BUFFER_ID@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #48]
	ldr	w0, [x21]
Lloh20:
	adrp	x8, _VM_PKT_DATA_INBAND@GOTPAGE
Lloh21:
	ldr	x8, [x8, _VM_PKT_DATA_INBAND@GOTPAGEOFF]
Lloh22:
	ldr	w4, [x8]
Lloh23:
	adrp	x8, _VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED@GOTPAGE
Lloh24:
	ldr	x8, [x8, _VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED@GOTPAGEOFF]
Lloh25:
	ldr	w5, [x8]
	mov	x1, x22
	mov	w2, #32
	mov	x3, x22
	bl	_vmbus_sendpacket
	cbz	w0, LBB0_12
; %bb.8:
	mov	x22, x0
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_9:
	mov	x0, x20
	bl	_netdev_err
LBB0_10:
	mov	x0, x19
	bl	_netvsc_destroy_recv_buf
LBB0_11:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_12:
	add	x0, x19, #24
Lloh28:
	adrp	x8, _HZ@GOTPAGE
Lloh29:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	add	w1, w8, w8, lsl #2
	bl	_wait_for_completion_timeout
	cmp	w0, #0
	cset	w0, eq
	bl	_BUG_ON
	ldr	x8, [x19, #32]
Lloh31:
	adrp	x9, _NVSP_STAT_SUCCESS@GOTPAGE
Lloh32:
	ldr	x9, [x9, _NVSP_STAT_SUCCESS@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.13:
	ldp	w8, w0, [x19, #40]
	str	w8, [x19, #8]
	lsl	w1, w8, #2
	ldr	w2, [x23]
	bl	_kmemdup
	str	x0, [x19, #16]
	cbz	x0, LBB0_18
; %bb.14:
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.ne	LBB0_18
; %bb.15:
	ldr	x8, [x0]
	cbnz	x8, LBB0_18
; %bb.16:
	mov	w22, #0
	b	LBB0_11
LBB0_17:
	str	x8, [sp]
Lloh34:
	adrp	x1, l_.str.3@PAGE
Lloh35:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_netdev_err
LBB0_18:
Lloh36:
	adrp	x8, _EINVAL@GOTPAGE
Lloh37:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	___GFP_ZERO,4,2                 ; @__GFP_ZERO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to allocate receive buffer of size %d\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"unable to establish receive buffer's gpadl\n"

	.comm	_NVSP_MSG1_TYPE_SEND_RECV_BUF,4,2 ; @NVSP_MSG1_TYPE_SEND_RECV_BUF
	.comm	_NETVSC_RECEIVE_BUFFER_ID,4,2   ; @NETVSC_RECEIVE_BUFFER_ID
	.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
l_.str.2:                               ; @.str.2
	.asciz	"unable to send receive buffer's gpadl to netvsp\n"

	.comm	_HZ,4,2                         ; @HZ
	.comm	_NVSP_STAT_SUCCESS,8,3          ; @NVSP_STAT_SUCCESS
l_.str.3:                               ; @.str.3
	.asciz	"Unable to complete receive buffer initialization with NetVsp - status %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_netvsc_init_recv_buf
.subsections_via_symbols
