	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alx_alloc_rings
_alx_alloc_rings:                       ## @alx_alloc_rings
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	(%rdi), %eax
	imull	4(%rdi), %eax
	movl	8(%rdi), %ecx
	shll	$2, %eax
	leal	(%rax,%rcx,8), %esi
	movl	%esi, 24(%rdi)
	movq	40(%rdi), %rdi
	leaq	32(%r15), %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_alloc_coherent
	movl	%eax, 28(%r15)
	testl	%eax, %eax
	je	LBB0_9
## %bb.1:
	movl	$4, %edi
	callq	_BUILD_BUG_ON
	movl	$4, %edi
	callq	_BUILD_BUG_ON
	xorl	%r14d, %r14d
	cmpl	$0, 4(%r15)
	movl	$0, %eax
	jle	LBB0_6
## %bb.2:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rcx
	movq	(%rcx,%rbx,8), %rcx
	movl	4(%rcx), %esi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_alx_alloc_tx_ring
	testl	%eax, %eax
	js	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
	movslq	4(%r15), %rcx
	cmpq	%rcx, %rbx
	jl	LBB0_4
LBB0_6:
	movq	16(%r15), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx), %esi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_alx_alloc_rx_ring
	testl	%eax, %eax
	jns	LBB0_10
## %bb.7:
	movl	12(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_8
LBB0_5:
	movl	12(%r15), %edi
	leaq	L_.str(%rip), %rsi
LBB0_8:
	callq	_netdev_err
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_10:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Allocation of tx buffer failed!\n"

L_.str.1:                               ## @.str.1
	.asciz	"Allocation of rx buffer failed!\n"

	.no_dead_strip	_alx_alloc_rings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alx_alloc_rings
_alx_alloc_rings:                       ; @alx_alloc_rings
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldp	w8, w9, [x0]
	mul	w8, w8, w9
	ldr	w9, [x0, #8]
	lsl	w9, w9, #3
	add	w1, w9, w8, lsl #2
	str	w1, [x0, #24]
	ldr	x0, [x0, #40]
	add	x2, x19, #32
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	bl	_dma_alloc_coherent
	str	w0, [x19, #28]
	cbz	w0, LBB0_11
; %bb.1:
	mov	w0, #4
	bl	_BUILD_BUG_ON
	mov	w0, #4
	bl	_BUILD_BUG_ON
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.2:
	mov	x20, #0
	mov	w2, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	x8, [x8, x20, lsl #3]
	ldr	w1, [x8, #4]
	mov	x0, x19
	bl	_alx_alloc_tx_ring
	tbnz	w0, #31, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x2, x0
	add	x20, x20, #1
	ldrsw	x8, [x19, #4]
	cmp	x20, x8
	b.lt	LBB0_3
	b	LBB0_6
LBB0_5:
	mov	w2, #0
LBB0_6:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldr	w1, [x8]
	mov	x0, x19
	bl	_alx_alloc_rx_ring
	tbnz	w0, #31, LBB0_9
; %bb.7:
	mov	w0, #0
	b	LBB0_12
LBB0_8:
	ldr	w0, [x19, #12]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_10
LBB0_9:
	ldr	w0, [x19, #12]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_10:
	bl	_netdev_err
LBB0_11:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Allocation of tx buffer failed!\n"

l_.str.1:                               ; @.str.1
	.asciz	"Allocation of rx buffer failed!\n"

	.no_dead_strip	_alx_alloc_rings
.subsections_via_symbols
