	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alloc_ring
_alloc_ring:                            ## @alloc_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, %r12
	movq	_RX_RING_SIZE@GOTPCREL(%rip), %rax
	movq	_TX_RING_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	addl	(%rax), %esi
	movq	(%rbx), %r14
	shll	$2, %esi
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	callq	_dma_alloc_coherent
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r15
	movq	_rqRhineI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_6
## %bb.4:
	movq	_PKT_BUF_SZ@GOTPCREL(%rip), %rax
	movq	_TX_RING_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	imull	(%rax), %esi
	movq	%r12, %rdx
	addq	$8, %rdx
	movl	(%r13), %ecx
	movq	%r14, %rdi
	callq	_dma_alloc_coherent
	movq	%rax, 48(%r12)
	testq	%rax, %rax
	je	LBB0_5
LBB0_6:
	movq	%r15, 40(%r12)
	movq	_RX_RING_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	leaq	(%r15,%rax,4), %rcx
	movq	%rcx, 32(%r12)
	movq	-48(%rbp), %rcx
	movq	%rcx, 24(%r12)
	leaq	(%rcx,%rax,4), %rax
	movq	%rax, 16(%r12)
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_netdev_err
	jmp	LBB0_2
LBB0_5:
	movq	_TX_RING_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RX_RING_SIZE@GOTPCREL(%rip), %rax
	addl	(%rax), %esi
	shll	$2, %esi
	movq	-48(%rbp), %rcx
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_dma_free_coherent
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RX_RING_SIZE,4,2               ## @RX_RING_SIZE
	.comm	_TX_RING_SIZE,4,2               ## @TX_RING_SIZE
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not allocate DMA memory\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_rqRhineI,4,2                   ## @rqRhineI
	.comm	_PKT_BUF_SZ,4,2                 ## @PKT_BUF_SZ
	.no_dead_strip	_alloc_ring
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alloc_ring
_alloc_ring:                            ; @alloc_ring
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x22, x0
	bl	_netdev_priv
	mov	x19, x0
	ldr	x20, [x22]
Lloh0:
	adrp	x23, _RX_RING_SIZE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _RX_RING_SIZE@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh2:
	adrp	x24, _TX_RING_SIZE@GOTPAGE
Lloh3:
	ldr	x24, [x24, _TX_RING_SIZE@GOTPAGEOFF]
	ldr	w9, [x24]
	add	w8, w9, w8
	lsl	w1, w8, #2
Lloh4:
	adrp	x25, _GFP_ATOMIC@GOTPAGE
Lloh5:
	ldr	x25, [x25, _GFP_ATOMIC@GOTPAGEOFF]
	ldr	w3, [x25]
	add	x2, sp, #8
	mov	x0, x20
	bl	_dma_alloc_coherent
	cbz	x0, LBB0_4
; %bb.1:
	mov	x21, x0
	ldr	w8, [x19]
Lloh6:
	adrp	x9, _rqRhineI@GOTPAGE
Lloh7:
	ldr	x9, [x9, _rqRhineI@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
Lloh9:
	adrp	x8, _PKT_BUF_SZ@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PKT_BUF_SZ@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	w9, [x24]
	mul	w1, w9, w8
	add	x2, x19, #8
	ldr	w3, [x25]
	mov	x0, x20
	bl	_dma_alloc_coherent
	str	x0, [x19, #48]
	cbz	x0, LBB0_5
LBB0_3:
	mov	w0, #0
	ldrsw	x8, [x23]
	lsl	x8, x8, #2
	add	x9, x21, x8
	stp	x9, x21, [x19, #32]
	ldr	x9, [sp, #8]
	add	x8, x9, x8
	stp	x8, x9, [x19, #16]
	b	LBB0_7
LBB0_4:
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_netdev_err
	b	LBB0_6
LBB0_5:
	ldr	w8, [x23]
	ldr	w9, [x24]
	add	w8, w9, w8
	lsl	w1, w8, #2
	ldr	x3, [sp, #8]
	mov	x0, x20
	mov	x2, x21
	bl	_dma_free_coherent
LBB0_6:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_RX_RING_SIZE,4,2               ; @RX_RING_SIZE
	.comm	_TX_RING_SIZE,4,2               ; @TX_RING_SIZE
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not allocate DMA memory\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_rqRhineI,4,2                   ; @rqRhineI
	.comm	_PKT_BUF_SZ,4,2                 ; @PKT_BUF_SZ
	.no_dead_strip	_alloc_ring
.subsections_via_symbols
