	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx4_en_fill_rx_buffers
_mlx4_en_fill_rx_buffers:               ## @mlx4_en_fill_rx_buffers
	.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	16(%rdi), %rcx
	cmpl	$0, (%rcx)
	jle	LBB0_16
## %bb.1:
	movq	%rdi, %r14
	movl	(%rdi), %eax
	xorl	%r15d, %r15d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	incl	%r15d
	cmpl	(%rcx), %r15d
	jge	LBB0_16
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	testl	%eax, %eax
	jle	LBB0_15
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%r14), %rax
	movq	(%rax,%r13,8), %rbx
	movl	(%rbx), %edx
	movl	(%r12), %ecx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_mlx4_en_prepare_rx_desc
	movl	(%rbx), %edi
	testq	%rax, %rax
	jne	LBB0_5
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=2
	incl	%edi
	movl	%edi, (%rbx)
	incl	4(%rbx)
	incq	%r13
	movslq	(%r14), %rax
	cmpq	%rax, %r13
	jl	LBB0_4
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%r14), %rcx
	jmp	LBB0_15
LBB0_5:
	movq	_MLX4_EN_MIN_RX_SIZE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edi
	jge	LBB0_7
## %bb.6:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_en_err
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_17
LBB0_7:
	callq	_rounddown_pow_of_two
	movl	%eax, %r15d
	movl	(%rbx), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %ecx
	callq	_en_warn
	movl	(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_16
## %bb.8:
	xorl	%r12d, %r12d
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	incq	%r12
	movslq	%eax, %rcx
	cmpq	%rcx, %r12
	jge	LBB0_16
LBB0_9:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	movq	8(%r14), %rcx
	movq	(%rcx,%r12,8), %rbx
	movl	(%rbx), %edx
	cmpl	%r15d, %edx
	jle	LBB0_12
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_9 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	decl	%edx
	movl	%edx, (%rbx)
	decl	4(%rbx)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_mlx4_en_free_rx_desc
	movl	(%rbx), %edx
	cmpl	%r15d, %edx
	jg	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	(%r14), %eax
	jmp	LBB0_12
LBB0_16:
	xorl	%eax, %eax
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_MLX4_EN_MIN_RX_SIZE,4,2        ## @MLX4_EN_MIN_RX_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate enough rx buffers\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"Only %d buffers allocated reducing ring size to %d\n"

	.no_dead_strip	_mlx4_en_fill_rx_buffers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx4_en_fill_rx_buffers
_mlx4_en_fill_rx_buffers:               ; @mlx4_en_fill_rx_buffers
	.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
	ldr	x9, [x0, #16]
	ldr	w8, [x9]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.1:
	mov	x19, x0
	mov	w20, #0
	ldr	w8, [x0]
Lloh0:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w20, w20, #1
	ldr	w10, [x9]
	cmp	w20, w10
	b.ge	LBB0_16
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x23, #0
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19, #8]
	ldr	x21, [x8, x23, lsl #3]
	ldr	w2, [x21]
	ldr	w3, [x22]
	mov	x0, x19
	mov	x1, x21
	bl	_mlx4_en_prepare_rx_desc
	mov	x8, x0
	ldr	w0, [x21]
	cbnz	x8, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	add	w8, w0, #1
	ldr	w9, [x21, #4]
	add	w9, w9, #1
	stp	w8, w9, [x21]
	add	x23, x23, #1
	ldrsw	x8, [x19]
	cmp	x23, x8
	b.lt	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [x19, #16]
	b	LBB0_2
LBB0_8:
Lloh2:
	adrp	x8, _MLX4_EN_MIN_RX_SIZE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MLX4_EN_MIN_RX_SIZE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ge	LBB0_10
; %bb.9:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_en_err
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_17
LBB0_10:
	bl	_rounddown_pow_of_two
	mov	x20, x0
	ldr	w2, [x21]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x3, x20
	bl	_en_warn
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.11:
	mov	x22, #0
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	add	x22, x22, #1
	cmp	x22, w8, sxtw
	b.ge	LBB0_16
LBB0_13:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_14 Depth 2
	ldr	x9, [x19, #8]
	ldr	x21, [x9, x22, lsl #3]
	ldr	w9, [x21]
	cmp	w9, w20
	b.le	LBB0_12
LBB0_14:                                ;   Parent Loop BB0_13 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sub	w2, w9, #1
	ldr	w8, [x21, #4]
	sub	w8, w8, #1
	stp	w2, w8, [x21]
	mov	x0, x19
	mov	x1, x21
	bl	_mlx4_en_free_rx_desc
	ldr	w9, [x21]
	cmp	w9, w20
	b.gt	LBB0_14
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	w8, [x19]
	b	LBB0_12
LBB0_16:
	mov	w0, #0
LBB0_17:
	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	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_MLX4_EN_MIN_RX_SIZE,4,2        ; @MLX4_EN_MIN_RX_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate enough rx buffers\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"Only %d buffers allocated reducing ring size to %d\n"

	.no_dead_strip	_mlx4_en_fill_rx_buffers
.subsections_via_symbols
