	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hv_pkt_iter_close              ## -- Begin function hv_pkt_iter_close
	.p2align	4, 0x90
_hv_pkt_iter_close:                     ## @hv_pkt_iter_close
	.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, %rbx
	xorl	%eax, %eax
	callq	_virt_rmb
	movq	8(%rbx), %rax
	movq	16(%rbx), %rcx
	movq	(%rcx), %r14
	movq	%rax, (%rcx)
	cmpl	$0, 12(%rcx)
	je	LBB0_4
## %bb.1:
	xorl	%eax, %eax
	callq	_virt_mb
	movq	16(%rbx), %rax
	movl	8(%rax), %edi
	callq	_READ_ONCE
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	%rax, %r15
	leaq	8(%rbx), %r13
	xorl	%eax, %eax
	callq	_virt_rmb
	movq	%r13, %rdi
	callq	_hv_get_bytes_to_write
	movq	%rax, %r12
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_hv_pkt_iter_bytes_read
	cmpq	%r15, %r12
	jle	LBB0_4
## %bb.3:
	subq	%rax, %r12
	cmpq	%r15, %r12
	jg	LBB0_4
## %bb.5:
	incl	(%rbx)
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vmbus_setevent                 ## TAILCALL
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hv_pkt_iter_close              ; -- Begin function hv_pkt_iter_close
	.p2align	2
_hv_pkt_iter_close:                     ; @hv_pkt_iter_close
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x0
	bl	_virt_rmb
	mov	x20, x19
	ldp	x8, x9, [x20, #8]!
	ldr	x21, [x9]
	str	x8, [x9]
	ldr	w8, [x9, #12]
	cbz	w8, LBB0_3
; %bb.1:
	bl	_virt_mb
	ldr	x8, [x19, #16]
	ldr	w0, [x8, #8]
	bl	_READ_ONCE
	cbz	x0, LBB0_3
; %bb.2:
	mov	x22, x0
	bl	_virt_rmb
	mov	x0, x20
	bl	_hv_get_bytes_to_write
	mov	x23, x0
	mov	x0, x20
	mov	x1, x21
	bl	_hv_pkt_iter_bytes_read
	sub	x8, x23, x0
	cmp	x23, x22
	ccmp	x8, x22, #0, gt
	b.le	LBB0_4
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_4:
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_vmbus_setevent
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
