	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function netvsc_wait_until_empty
_netvsc_wait_until_empty:               ## @netvsc_wait_until_empty
	.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
	movl	(%rdi), %eax
	testl	%eax, %eax
	jle	LBB0_11
## %bb.1:
	movq	%rdi, %r14
	xorl	%r15d, %r15d
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=2
	movl	(%r14), %eax
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=2
	incq	%r13
	movslq	%eax, %rcx
	addq	$16, %r12
	cmpq	%rcx, %r13
	jge	LBB0_11
LBB0_3:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%r14), %rdi
	movq	8(%rdi,%r12), %rbx
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=2
	addq	%r12, %rdi
	callq	_napi_synchronize
	leaq	4(%rbx), %rdi
	callq	_hv_get_bytes_to_read
	testq	%rax, %rax
	jne	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=2
	movq	%rbx, %rdi
	callq	_hv_get_bytes_to_read
	testq	%rax, %rax
	je	LBB0_6
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%r15d
	movq	_RETRY_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	ja	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_RETRY_US_LO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_RETRY_US_HI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_usleep_range
	movl	(%r14), %eax
	testl	%eax, %eax
	jg	LBB0_2
LBB0_11:
	xorl	%eax, %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_RETRY_MAX,4,2                  ## @RETRY_MAX
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_RETRY_US_LO,4,2                ## @RETRY_US_LO
	.comm	_RETRY_US_HI,4,2                ## @RETRY_US_HI
	.no_dead_strip	_netvsc_wait_until_empty
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function netvsc_wait_until_empty
_netvsc_wait_until_empty:               ; @netvsc_wait_until_empty
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.1:
	mov	x19, x0
	mov	w21, #0
Lloh0:
	adrp	x22, _RETRY_MAX@GOTPAGE
Lloh1:
	ldr	x22, [x22, _RETRY_MAX@GOTPAGEOFF]
Lloh2:
	adrp	x23, _RETRY_US_LO@GOTPAGE
Lloh3:
	ldr	x23, [x23, _RETRY_US_LO@GOTPAGEOFF]
Lloh4:
	adrp	x24, _RETRY_US_HI@GOTPAGE
Lloh5:
	ldr	x24, [x24, _RETRY_US_HI@GOTPAGEOFF]
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	mov	x25, #0
	mov	w26, #8
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=2
	ldr	w8, [x19]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=2
	add	x25, x25, #1
	add	x26, x26, #16
	cmp	x25, w8, sxtw
	b.ge	LBB0_10
LBB0_5:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x9, [x19, #8]
	ldr	x20, [x9, x26]
	cbz	x20, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	add	x8, x9, x26
	sub	x0, x8, #8
	bl	_napi_synchronize
	add	x0, x20, #4
	bl	_hv_get_bytes_to_read
	cbnz	x0, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=2
	mov	x0, x20
	bl	_hv_get_bytes_to_read
	cbz	x0, LBB0_3
LBB0_8:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	w21, w21, #1
	ldr	w8, [x22]
	cmp	w21, w8
	b.hi	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x23]
	ldr	w1, [x24]
	bl	_usleep_range
	ldr	w8, [x19]
	cmp	w8, #0
	b.gt	LBB0_2
LBB0_10:
	mov	w0, #0
LBB0_11:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_12:
Lloh6:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_RETRY_MAX,4,2                  ; @RETRY_MAX
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_RETRY_US_LO,4,2                ; @RETRY_US_LO
	.comm	_RETRY_US_HI,4,2                ; @RETRY_US_HI
	.no_dead_strip	_netvsc_wait_until_empty
.subsections_via_symbols
