	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function mlx4_en_activate_rx_rings
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_mlx4_en_activate_rx_rings
	.p2align	4, 0x90
_mlx4_en_activate_rx_rings:             ## @mlx4_en_activate_rx_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	_DS_SIZE@GOTPCREL(%rip), %rax
	movl	(%rdi), %edi
	imull	(%rax), %edi
	addl	$4, %edi
	callq	_roundup_pow_of_two
	cmpl	$0, 4(%r12)
	jle	LBB0_17
## %bb.1:
	movl	%eax, %edx
	xorl	%ecx, %ecx
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movq	8(%r12), %rbx
	movq	%rcx, %r14
	shlq	$6, %r14
	leaq	(%rbx,%r14), %r13
	movq	$0, 16(%rbx,%r14)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 48(%rbx,%r14)
	movq	16(%r12), %rax
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	(%rax,%rcx,4), %eax
	movl	%eax, 40(%rbx,%r14)
	movl	%edx, (%rbx,%r14)
	movq	_TXBB_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jg	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	addl	%eax, 4(%rbx,%r14)
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%edx, %edi
	callq	_ffs
	decq	%rax
	movq	%rax, 32(%rbx,%r14)
	movl	(%r13), %edx
	imull	12(%rbx,%r14), %edx
	movl	%edx, 8(%rbx,%r14)
	movl	4(%rbx,%r14), %edi
	xorl	%esi, %esi
	callq	_memset
	movq	%r13, %rdi
	callq	_mlx4_en_update_rx_prod_db
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	cmpl	$0, 12(%rbx,%r14)
	jle	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r14), %r15
	addq	$12, %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	%ebx, %edx
	callq	_mlx4_en_init_rx_desc
	incl	%ebx
	cmpl	(%r15), %ebx
	jl	LBB0_6
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_mlx4_en_init_allocator
	testl	%eax, %eax
	jne	LBB0_8
## %bb.16:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	incq	%rcx
	movslq	4(%r12), %rax
	cmpq	%rax, %rcx
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	jl	LBB0_2
LBB0_17:
	movq	%r12, %rdi
	callq	_mlx4_en_fill_rx_buffers
	movl	%eax, %r15d
	movl	4(%r12), %eax
	testl	%r15d, %r15d
	je	LBB0_21
## %bb.18:
	testl	%eax, %eax
	jle	LBB0_24
## %bb.19:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rsi
	addq	%r14, %rsi
	movq	%r12, %rdi
	callq	_mlx4_en_free_rx_buf
	incq	%rbx
	movslq	4(%r12), %rax
	addq	$64, %r14
	cmpq	%rax, %rbx
	jl	LBB0_20
## %bb.11:
	testl	%eax, %eax
	jg	LBB0_12
	jmp	LBB0_24
LBB0_8:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_en_err
	movq	_TXBB_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, (%r13)
	jg	LBB0_10
## %bb.9:
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	addq	%r14, %rcx
	addq	$4, %rcx
	subl	%eax, (%rcx)
LBB0_10:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	testl	%eax, %eax
	jle	LBB0_24
LBB0_12:
	movl	%eax, %ebx
	incq	%rbx
	movq	_TXBB_SIZE@GOTPCREL(%rip), %r14
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=1
	addq	%rax, %rsi
	movq	%r12, %rdi
	callq	_mlx4_en_destroy_allocator
	decq	%rbx
	cmpq	$1, %rbx
	jbe	LBB0_24
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	leal	-2(%rbx), %eax
	movq	8(%r12), %rsi
	shlq	$6, %rax
	movl	(%r14), %ecx
	cmpl	%ecx, (%rsi,%rax)
	jg	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	subl	%ecx, 4(%rsi,%rax)
	jmp	LBB0_15
LBB0_21:
	xorl	%r15d, %r15d
	testl	%eax, %eax
	jle	LBB0_24
## %bb.22:
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	leaq	(%rax,%rbx), %rdi
	movq	16(%rax,%rbx), %rcx
	decq	%rcx
	movq	%rcx, 24(%rax,%rbx)
	callq	_mlx4_en_update_rx_prod_db
	incq	%r14
	movslq	4(%r12), %rax
	addq	$64, %rbx
	cmpq	%rax, %r14
	jl	LBB0_23
LBB0_24:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DS_SIZE,4,2                    ## @DS_SIZE
	.comm	_TXBB_SIZE,4,2                  ## @TXBB_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed initializing ring allocator\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_en_activate_rx_rings      ; -- Begin function mlx4_en_activate_rx_rings
	.p2align	2
_mlx4_en_activate_rx_rings:             ; @mlx4_en_activate_rx_rings
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
Lloh0:
	adrp	x8, _DS_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DS_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x0]
	orr	w10, wzr, #0x4
	madd	w0, w9, w8, w10
	bl	_roundup_pow_of_two
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.1:
	mov	x21, x0
	mov	x23, #0
Lloh3:
	adrp	x24, _TXBB_SIZE@GOTPAGE
Lloh4:
	ldr	x24, [x24, _TXBB_SIZE@GOTPAGEOFF]
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldr	x8, [x19, #8]
	add	x22, x8, x23, lsl #6
	str	xzr, [x22, #16]
	stp	xzr, xzr, [x22, #48]
	ldr	x8, [x19, #16]
	ldr	w8, [x8, x23, lsl #2]
	str	w8, [x22, #40]
	str	w21, [x22]
	ldr	w8, [x24]
	cmp	w21, w8
	b.gt	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w9, [x22, #4]
	add	w8, w9, w8
	str	w8, [x22, #4]
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	bl	_ffs
	sub	x8, x0, #1
	mov	x26, x22
	ldr	w9, [x26, #12]!
	stur	x8, [x26, #20]
	ldr	w8, [x22]
	mul	w2, w8, w9
	stur	w2, [x26, #-4]
	mov	x25, x26
	ldr	w0, [x25, #-8]!
	mov	w1, #0
	bl	_memset
	mov	x0, x22
	bl	_mlx4_en_update_rx_prod_db
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w20, #0
LBB0_6:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x19
	mov	x1, x22
	mov	x2, x20
	bl	_mlx4_en_init_rx_desc
	add	w20, w20, #1
	ldr	w8, [x26]
	cmp	w20, w8
	b.lt	LBB0_6
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_mlx4_en_init_allocator
	cbnz	w0, LBB0_14
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x19, #4]
	cmp	x23, x8
	b.lt	LBB0_2
LBB0_9:
	mov	x0, x19
	bl	_mlx4_en_fill_rx_buffers
	ldr	w8, [x19, #4]
	cbz	w0, LBB0_21
; %bb.10:
	mov	x20, x0
	cmp	w8, #1
	b.lt	LBB0_25
; %bb.11:
	mov	x21, #0
	mov	x22, #0
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	add	x1, x8, x21
	mov	x0, x19
	bl	_mlx4_en_free_rx_buf
	add	x22, x22, #1
	ldrsw	x23, [x19, #4]
	add	x21, x21, #64
	cmp	x22, x23
	b.lt	LBB0_12
; %bb.13:
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
	b	LBB0_16
LBB0_14:
	mov	x20, x0
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_en_err
	ldr	w9, [x22]
	ldr	w8, [x24]
	cmp	w9, w8
	b.gt	LBB0_16
; %bb.15:
	ldr	w9, [x25]
	sub	w8, w9, w8
	str	w8, [x25]
LBB0_16:
	cmp	w23, #1
	b.lt	LBB0_25
; %bb.17:
	mov	w8, w23
	add	x21, x8, #1
Lloh7:
	adrp	x22, _TXBB_SIZE@GOTPAGE
Lloh8:
	ldr	x22, [x22, _TXBB_SIZE@GOTPAGEOFF]
	b	LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=1
	add	x1, x9, x8, lsl #6
	mov	x0, x19
	bl	_mlx4_en_destroy_allocator
	sub	x21, x21, #1
	cmp	x21, #1
	b.ls	LBB0_25
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	sub	w8, w21, #2
	ldr	x9, [x19, #8]
	lsl	x10, x8, #6
	ldr	w11, [x9, x10]
	ldr	w10, [x22]
	cmp	w11, w10
	b.gt	LBB0_18
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	add	x11, x9, x8, lsl #6
	ldr	w12, [x11, #4]
	sub	w10, w12, w10
	str	w10, [x11, #4]
	b	LBB0_18
LBB0_21:
	cmp	w8, #1
	b.lt	LBB0_24
; %bb.22:
	mov	x20, #0
	mov	x21, #0
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	add	x0, x8, x20
	ldr	x8, [x0, #16]
	sub	x8, x8, #1
	str	x8, [x0, #24]
	bl	_mlx4_en_update_rx_prod_db
	add	x21, x21, #1
	ldrsw	x8, [x19, #4]
	add	x20, x20, #64
	cmp	x21, x8
	b.lt	LBB0_23
LBB0_24:
	mov	w20, #0
LBB0_25:
	mov	x0, x20
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_DS_SIZE,4,2                    ; @DS_SIZE
	.comm	_TXBB_SIZE,4,2                  ; @TXBB_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed initializing ring allocator\n"

.subsections_via_symbols
