	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xennet_init_queue
_xennet_init_queue:                     ## @xennet_init_queue
	.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, %r15
	addq	$88, %rdi
	callq	_spin_lock_init
	leaq	84(%r15), %rdi
	callq	_spin_lock_init
	leaq	80(%r15), %rdi
	movq	_rx_refill_timeout@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r13d, %r13d
	xorl	%edx, %edx
	callq	_timer_setup
	movq	72(%r15), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	movl	$47, %esi
	callq	_strrchr
	leaq	1(%rax), %rcx
	movl	(%r15), %r8d
	movl	64(%r15), %edi
	leaq	L_.str(%rip), %rdx
	movl	$4, %esi
	callq	_snprintf
	movq	$0, 56(%r15)
	movq	_NET_TX_RING_SIZE@GOTPCREL(%rip), %rax
	cmpw	$0, (%rax)
	je	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	movq	_GRANT_INVALID_REF@GOTPCREL(%rip), %r12
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	48(%r15), %rdi
	addq	%rbx, %rdi
	incq	%r14
	movzwl	%r14w, %esi
	movq	%rax, %r13
	callq	_skb_entry_set_link
	movq	(%r12), %rax
	movq	40(%r15), %rcx
	movq	%rax, (%rcx,%rbx,2)
	movq	32(%r15), %rax
	movq	$0, (%rax,%rbx,2)
	movq	%r13, %rax
	movzwl	(%r13), %r13d
	addq	$4, %rbx
	cmpq	%r13, %r14
	jb	LBB0_2
LBB0_3:
	movq	_NET_RX_RING_SIZE@GOTPCREL(%rip), %r12
	movzwl	(%r12), %eax
	testq	%rax, %rax
	je	LBB0_10
## %bb.4:
	cmpw	$1, %ax
	jne	LBB0_6
## %bb.5:
	xorl	%ecx, %ecx
	jmp	LBB0_8
LBB0_6:
	movl	%eax, %edx
	andl	$-2, %edx
	xorl	%ecx, %ecx
	movq	_GRANT_INVALID_REF@GOTPCREL(%rip), %rsi
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r15), %rdi
	movq	$0, (%rdi,%rcx,8)
	movq	(%rsi), %rdi
	movq	16(%r15), %rbx
	movq	%rdi, (%rbx,%rcx,8)
	movq	24(%r15), %rdi
	movq	$0, 8(%rdi,%rcx,8)
	movq	(%rsi), %rdi
	movq	16(%r15), %rbx
	movq	%rdi, 8(%rbx,%rcx,8)
	addq	$2, %rcx
	cmpq	%rcx, %rdx
	jne	LBB0_7
LBB0_8:
	testb	$1, %al
	je	LBB0_10
## %bb.9:
	movq	24(%r15), %rax
	movq	$0, (%rax,%rcx,8)
	movq	_GRANT_INVALID_REF@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	16(%r15), %rdx
	movq	%rax, (%rdx,%rcx,8)
LBB0_10:
	leaq	4(%r15), %r14
	movzwl	%r13w, %edi
	movq	%r14, %rsi
	callq	_gnttab_alloc_grant_references
	testq	%rax, %rax
	js	LBB0_11
## %bb.12:
	movzwl	(%r12), %edi
	addq	$8, %r15
	movq	%r15, %rsi
	callq	_gnttab_alloc_grant_references
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jns	LBB0_15
## %bb.13:
	leaq	L_.str.2(%rip), %rdi
	callq	_pr_alert
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	(%r14), %edi
	callq	_gnttab_free_grant_references
	jmp	LBB0_14
LBB0_11:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_alert
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_14:
	negl	%ebx
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_rx_refill_timeout,4,2          ## @rx_refill_timeout
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vif%s-q%u"

	.comm	_NET_TX_RING_SIZE,2,1           ## @NET_TX_RING_SIZE
	.comm	_GRANT_INVALID_REF,8,3          ## @GRANT_INVALID_REF
	.comm	_NET_RX_RING_SIZE,2,1           ## @NET_RX_RING_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"can't alloc tx grant refs\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.2:                               ## @.str.2
	.asciz	"can't alloc rx grant refs\n"

	.no_dead_strip	_xennet_init_queue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xennet_init_queue
_xennet_init_queue:                     ; @xennet_init_queue
	.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
	add	x0, x0, #88
	bl	_spin_lock_init
	add	x0, x19, #84
	bl	_spin_lock_init
	add	x0, x19, #80
Lloh0:
	adrp	x8, _rx_refill_timeout@GOTPAGE
Lloh1:
	ldr	x8, [x8, _rx_refill_timeout@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_timer_setup
	ldr	x8, [x19, #72]
	ldr	x8, [x8]
	ldr	w0, [x8]
	mov	w1, #47
	bl	_strrchr
	add	x3, x0, #1
	ldr	w0, [x19, #64]
	ldr	w4, [x19]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #4
	bl	_snprintf
	str	xzr, [x19, #56]
Lloh5:
	adrp	x21, _NET_TX_RING_SIZE@GOTPAGE
Lloh6:
	ldr	x21, [x21, _NET_TX_RING_SIZE@GOTPAGEOFF]
	ldrh	w8, [x21]
Lloh7:
	adrp	x20, _GRANT_INVALID_REF@GOTPAGE
Lloh8:
	ldr	x20, [x20, _GRANT_INVALID_REF@GOTPAGEOFF]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x22, #0
	mov	x23, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #48]
	add	x0, x8, x22
	add	x24, x23, #1
	and	w1, w24, #0xffff
	bl	_skb_entry_set_link
	ldr	x8, [x20]
	ldr	x9, [x19, #40]
	lsl	x10, x23, #3
	str	x8, [x9, x10]
	ldr	x8, [x19, #32]
	str	xzr, [x8, x10]
	ldrh	w0, [x21]
	add	x22, x22, #4
	mov	x23, x24
	cmp	x24, x0
	b.lo	LBB0_2
	b	LBB0_4
LBB0_3:
	mov	w0, #0
LBB0_4:
Lloh9:
	adrp	x21, _NET_RX_RING_SIZE@GOTPAGE
Lloh10:
	ldr	x21, [x21, _NET_RX_RING_SIZE@GOTPAGEOFF]
	ldrh	w9, [x21]
	cbz	x9, LBB0_7
; %bb.5:
	mov	x8, #0
	lsl	x9, x9, #3
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x19, #24]
	str	xzr, [x10, x8]
	ldr	x10, [x20]
	ldr	x11, [x19, #16]
	str	x10, [x11, x8]
	add	x8, x8, #8
	cmp	x9, x8
	b.ne	LBB0_6
LBB0_7:
	add	x20, x19, #4
                                        ; kill: def $w0 killed $w0 killed $x0
	mov	x1, x20
	bl	_gnttab_alloc_grant_references
	tbnz	x0, #63, LBB0_10
; %bb.8:
	ldrh	w0, [x21]
	add	x1, x19, #8
	bl	_gnttab_alloc_grant_references
	tbnz	x0, #63, LBB0_11
; %bb.9:
	mov	w0, #0
	b	LBB0_13
LBB0_10:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_alert
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w19, [x8]
	b	LBB0_12
LBB0_11:
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_alert
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh20:
	ldr	w19, [x8]
	ldr	w0, [x20]
	bl	_gnttab_free_grant_references
LBB0_12:
	neg	w0, w19
LBB0_13:
	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
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_rx_refill_timeout,4,2          ; @rx_refill_timeout
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vif%s-q%u"

	.comm	_NET_TX_RING_SIZE,2,1           ; @NET_TX_RING_SIZE
	.comm	_GRANT_INVALID_REF,8,3          ; @GRANT_INVALID_REF
	.comm	_NET_RX_RING_SIZE,2,1           ; @NET_RX_RING_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"can't alloc tx grant refs\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.2:                               ; @.str.2
	.asciz	"can't alloc rx grant refs\n"

	.no_dead_strip	_xennet_init_queue
.subsections_via_symbols
