	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function virtnet_receive
_virtnet_receive:                       ## @virtnet_receive
	.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	%rdx, %r12
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	8(%rdi), %rdi
	movq	8(%rdi), %rax
	movq	(%rax), %r14
	movl	$0, -48(%rbp)
	cmpl	$0, 16(%r14)
	je	LBB0_7
## %bb.1:
	cmpq	$0, 8(%r14)
	je	LBB0_2
LBB0_7:
	testl	%r15d, %r15d
	jle	LBB0_12
## %bb.8:
	leaq	-52(%rbp), %rsi
	leaq	-64(%rbp), %rdx
	callq	_virtqueue_get_buf_ctx
	testq	%rax, %rax
	je	LBB0_12
## %bb.9:
	leaq	-64(%rbp), %r13
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	-52(%rbp), %ecx
	movq	-64(%rbp), %r8
	leaq	-48(%rbp), %rdx
	movq	%rdx, (%rsp)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	movq	%r12, %r9
	callq	_receive_buf
	movl	-48(%rbp), %eax
	incl	%eax
	movl	%eax, -48(%rbp)
	cmpl	%r15d, %eax
	jge	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	8(%rbx), %rdi
	leaq	-52(%rbp), %rsi
	movq	%r13, %rdx
	callq	_virtqueue_get_buf_ctx
	testq	%rax, %rax
	jne	LBB0_10
	jmp	LBB0_12
LBB0_2:
	testl	%r15d, %r15d
	jle	LBB0_12
## %bb.3:
	leaq	-52(%rbp), %rsi
	callq	_virtqueue_get_buf
	testq	%rax, %rax
	je	LBB0_12
## %bb.4:
	leaq	-52(%rbp), %r13
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	-52(%rbp), %ecx
	leaq	-48(%rbp), %rdx
	movq	%rdx, (%rsp)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	xorl	%r8d, %r8d
	movq	%r12, %r9
	callq	_receive_buf
	movl	-48(%rbp), %eax
	incl	%eax
	movl	%eax, -48(%rbp)
	cmpl	%r15d, %eax
	jge	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%rbx), %rdi
	movq	%r13, %rsi
	callq	_virtqueue_get_buf
	testq	%rax, %rax
	jne	LBB0_5
LBB0_12:
	movq	8(%rbx), %rdi
	movl	(%rdi), %r12d
	callq	_virtqueue_get_vring_size
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_min
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	cmpl	%ecx, %r12d
	jle	LBB0_15
## %bb.13:
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_try_fill_recv
	testl	%eax, %eax
	jne	LBB0_15
## %bb.14:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_schedule_delayed_work
LBB0_15:
	movq	%rbx, %rdi
	callq	_u64_stats_update_begin
	movq	_VIRTNET_RQ_STATS_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%edx, %edx
	jle	LBB0_23
## %bb.16:
	movq	_virtnet_rq_stats_desc@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	leaq	-1(%rdx), %rsi
	movl	%edx, %r8d
	andl	$3, %r8d
	cmpq	$3, %rsi
	jae	LBB0_18
## %bb.17:
	xorl	%esi, %esi
	jmp	LBB0_20
LBB0_18:
	andl	$-4, %edx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rsi,8), %rdi
	movq	-48(%rbp,%rdi,4), %rax
	addq	%rax, (%rbx,%rdi,4)
	movq	8(%rcx,%rsi,8), %rax
	movq	-48(%rbp,%rax,4), %rdi
	addq	%rdi, (%rbx,%rax,4)
	movq	16(%rcx,%rsi,8), %rax
	movq	-48(%rbp,%rax,4), %rdi
	addq	%rdi, (%rbx,%rax,4)
	movq	24(%rcx,%rsi,8), %rax
	movq	-48(%rbp,%rax,4), %rdi
	addq	%rdi, (%rbx,%rax,4)
	addq	$4, %rsi
	cmpq	%rsi, %rdx
	jne	LBB0_19
LBB0_20:
	testq	%r8, %r8
	je	LBB0_23
## %bb.21:
	leaq	(%rcx,%rsi,8), %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rdx,8), %rax
	movq	-48(%rbp,%rax,4), %rsi
	addq	%rsi, (%rbx,%rax,4)
	incq	%rdx
	cmpq	%rdx, %r8
	jne	LBB0_22
LBB0_23:
	movq	%rbx, %rdi
	callq	_u64_stats_update_end
	movl	-48(%rbp), %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_VIRTNET_RQ_STATS_LEN,4,2       ## @VIRTNET_RQ_STATS_LEN
	.comm	_virtnet_rq_stats_desc,8,3      ## @virtnet_rq_stats_desc
	.no_dead_strip	_virtnet_receive
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function virtnet_receive
_virtnet_receive:                       ; @virtnet_receive
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x0, [x0, #8]
	ldr	x8, [x0, #8]
	ldr	x20, [x8]
	str	wzr, [sp, #24]
	ldr	w8, [x20, #16]
	cbz	w8, LBB0_2
; %bb.1:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_7
LBB0_2:
	cmp	w21, #1
	b.lt	LBB0_12
; %bb.3:
	add	x1, sp, #20
	add	x2, sp, #8
	bl	_virtqueue_get_buf_ctx
	cbz	x0, LBB0_12
; %bb.4:
	mov	x2, x0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w3, [sp, #20]
	ldr	x4, [sp, #8]
	add	x6, sp, #24
	mov	x0, x20
	mov	x1, x19
	mov	x5, x22
	bl	_receive_buf
	ldr	w8, [sp, #24]
	add	w8, w8, #1
	str	w8, [sp, #24]
	cmp	w8, w21
	b.ge	LBB0_12
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [x19, #8]
	add	x1, sp, #20
	add	x2, sp, #8
	bl	_virtqueue_get_buf_ctx
	mov	x2, x0
	cbnz	x0, LBB0_5
	b	LBB0_12
LBB0_7:
	cmp	w21, #1
	b.lt	LBB0_12
; %bb.8:
	add	x1, sp, #20
	bl	_virtqueue_get_buf
	cbz	x0, LBB0_12
; %bb.9:
	mov	x2, x0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w3, [sp, #20]
	add	x6, sp, #24
	mov	x0, x20
	mov	x1, x19
	mov	x4, #0
	mov	x5, x22
	bl	_receive_buf
	ldr	w8, [sp, #24]
	add	w8, w8, #1
	str	w8, [sp, #24]
	cmp	w8, w21
	b.ge	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x0, [x19, #8]
	add	x1, sp, #20
	bl	_virtqueue_get_buf
	mov	x2, x0
	cbnz	x0, LBB0_10
LBB0_12:
	ldr	x0, [x19, #8]
	ldr	w22, [x0]
	bl	_virtqueue_get_vring_size
	mov	x1, x0
	mov	x0, x21
	bl	_min
	cmp	w0, #0
	cinc	w8, w0, lt
	cmp	w22, w8, asr #1
	b.le	LBB0_15
; %bb.13:
Lloh0:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_try_fill_recv
	cbnz	w0, LBB0_15
; %bb.14:
	mov	x0, x20
	mov	w1, #0
	bl	_schedule_delayed_work
LBB0_15:
	mov	x0, x19
	bl	_u64_stats_update_begin
Lloh3:
	adrp	x8, _VIRTNET_RQ_STATS_LEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VIRTNET_RQ_STATS_LEN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.16:
Lloh6:
	adrp	x9, _virtnet_rq_stats_desc@GOTPAGE
Lloh7:
	ldr	x9, [x9, _virtnet_rq_stats_desc@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x10, sp, #24
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x9], #8
	lsl	x11, x11, #2
	ldr	x12, [x10, x11]
	ldr	x13, [x19, x11]
	add	x12, x13, x12
	str	x12, [x19, x11]
	subs	x8, x8, #1
	b.ne	LBB0_17
LBB0_18:
	mov	x0, x19
	bl	_u64_stats_update_end
	ldr	w0, [sp, #24]
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_VIRTNET_RQ_STATS_LEN,4,2       ; @VIRTNET_RQ_STATS_LEN
	.comm	_virtnet_rq_stats_desc,8,3      ; @virtnet_rq_stats_desc
	.no_dead_strip	_virtnet_receive
.subsections_via_symbols
