	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function seeq_init_ring
_seeq_init_ring:                        ## @seeq_init_ring
	.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
	callq	_netdev_priv
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_netif_stop_queue
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%r14)
	movups	%xmm0, 32(%r14)
	movq	%rbx, %r13
	movq	%rbx, %rdi
	callq	___sgiseeq_set_mac_address
	movq	_SEEQ_TX_BUFFERS@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_TCNTINFO_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%r14), %rsi
	movl	%eax, 16(%rsi,%rbx)
	addq	%rbx, %rsi
	movq	%r13, %rdi
	callq	_dma_sync_desc_dev
	incq	%r12
	movslq	(%r15), %rax
	addq	$24, %rbx
	cmpq	%rax, %r12
	jl	LBB0_2
LBB0_3:
	movq	_SEEQ_RX_BUFFERS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_4
## %bb.5:
	movq	$-1, %r12
	xorl	%ebx, %ebx
	movq	_PKT_BUF_SZ@GOTPCREL(%rip), %rcx
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	_RCNTINFO_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsi,%rbx)
	addq	%rbx, %rsi
	movq	%r13, %rdi
	movq	%rcx, %r15
	callq	_dma_sync_desc_dev
	movq	_SEEQ_RX_BUFFERS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rcx
	leaq	1(%r12), %rax
	addq	$24, %rbx
	addq	$2, %r12
	cmpq	%rcx, %r12
	movq	%r15, %rcx
	movq	%rax, %r12
	jge	LBB0_11
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rsi
	cmpq	$0, 8(%rsi,%rbx)
	jne	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r13, %r15
	movl	(%rcx), %esi
	movq	%r13, %rdi
	movq	%rcx, %r14
	callq	_netdev_alloc_skb
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%rax, %r13
	movq	%rax, %rdi
	movl	$2, %esi
	callq	_skb_reserve
	movl	(%r15), %edi
	movq	(%r13), %rsi
	addq	$-2, %rsi
	movl	(%r14), %edx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_map_single
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	(%r14), %rsi
	movq	%r13, 8(%rsi,%rbx)
	movl	%eax, 4(%rsi,%rbx)
	movq	%r15, %r13
	movq	_PKT_BUF_SZ@GOTPCREL(%rip), %rcx
	jmp	LBB0_10
LBB0_4:
	movq	$-1, %rax
LBB0_11:
	movq	_HPCDMA_EOR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	(%r14), %rdx
	leaq	(%rax,%rax,2), %rax
	leaq	(%rdx,%rax,8), %rsi
	orl	%ecx, (%rdx,%rax,8)
	movq	%r13, %rdi
	callq	_dma_sync_desc_dev
	xorl	%eax, %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_SEEQ_TX_BUFFERS,4,2            ## @SEEQ_TX_BUFFERS
	.comm	_TCNTINFO_INIT,4,2              ## @TCNTINFO_INIT
	.comm	_SEEQ_RX_BUFFERS,4,2            ## @SEEQ_RX_BUFFERS
	.comm	_PKT_BUF_SZ,4,2                 ## @PKT_BUF_SZ
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_RCNTINFO_INIT,4,2              ## @RCNTINFO_INIT
	.comm	_HPCDMA_EOR,4,2                 ## @HPCDMA_EOR
	.no_dead_strip	_seeq_init_ring
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function seeq_init_ring
_seeq_init_ring:                        ; @seeq_init_ring
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	bl	_netdev_priv
	mov	x20, x0
	mov	x0, x19
	bl	_netif_stop_queue
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [x20, #16]
	mov	x0, x19
	bl	___sgiseeq_set_mac_address
Lloh0:
	adrp	x21, _SEEQ_TX_BUFFERS@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SEEQ_TX_BUFFERS@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x22, #0
	mov	x23, #0
Lloh2:
	adrp	x24, _TCNTINFO_INIT@GOTPAGE
Lloh3:
	ldr	x24, [x24, _TCNTINFO_INIT@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x24]
	ldr	x9, [x20, #8]
	add	x1, x9, x22
	str	w8, [x1, #16]
	mov	x0, x19
	bl	_dma_sync_desc_dev
	add	x23, x23, #1
	ldrsw	x8, [x21]
	add	x22, x22, #24
	cmp	x23, x8
	b.lt	LBB0_2
LBB0_3:
Lloh4:
	adrp	x22, _SEEQ_RX_BUFFERS@GOTPAGE
Lloh5:
	ldr	x22, [x22, _SEEQ_RX_BUFFERS@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.4:
	mov	x23, #0
	mov	x24, #-1
Lloh6:
	adrp	x25, _PKT_BUF_SZ@GOTPAGE
Lloh7:
	ldr	x25, [x25, _PKT_BUF_SZ@GOTPAGEOFF]
Lloh8:
	adrp	x26, _DMA_FROM_DEVICE@GOTPAGE
Lloh9:
	ldr	x26, [x26, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh10:
	adrp	x27, _RCNTINFO_INIT@GOTPAGE
Lloh11:
	ldr	x27, [x27, _RCNTINFO_INIT@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w9, [x27]
	add	x1, x8, x23
	str	w9, [x1]
	mov	x0, x19
	bl	_dma_sync_desc_dev
	ldrsw	x9, [x22]
	add	x8, x24, #1
	add	x23, x23, #24
	add	x10, x24, #2
	mov	x24, x8
	cmp	x10, x9
	b.ge	LBB0_10
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	add	x9, x8, x23
	ldr	x9, [x9, #8]
	cbnz	x9, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w1, [x25]
	mov	x0, x19
	bl	_netdev_alloc_skb
	cbz	x0, LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x21, x0
	mov	w1, #2
	bl	_skb_reserve
	ldr	w0, [x19]
	ldr	x8, [x21]
	sub	x1, x8, #2
	ldr	w2, [x25]
	ldr	w3, [x26]
	bl	_dma_map_single
	ldr	x8, [x20]
	add	x9, x8, x23
	str	x21, [x9, #8]
	str	w0, [x9, #4]
	b	LBB0_5
LBB0_9:
	mov	x8, #-1
LBB0_10:
Lloh12:
	adrp	x9, _HPCDMA_EOR@GOTPAGE
Lloh13:
	ldr	x9, [x9, _HPCDMA_EOR@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	ldr	x10, [x20]
	mov	w11, #24
	madd	x1, x8, x11, x10
	ldr	w8, [x1]
	orr	w8, w8, w9
	str	w8, [x1]
	mov	x0, x19
	bl	_dma_sync_desc_dev
	mov	w0, #0
LBB0_11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_12:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_SEEQ_TX_BUFFERS,4,2            ; @SEEQ_TX_BUFFERS
	.comm	_TCNTINFO_INIT,4,2              ; @TCNTINFO_INIT
	.comm	_SEEQ_RX_BUFFERS,4,2            ; @SEEQ_RX_BUFFERS
	.comm	_PKT_BUF_SZ,4,2                 ; @PKT_BUF_SZ
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_RCNTINFO_INIT,4,2              ; @RCNTINFO_INIT
	.comm	_HPCDMA_EOR,4,2                 ; @HPCDMA_EOR
	.no_dead_strip	_seeq_init_ring
.subsections_via_symbols
