	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx4_en_auto_moderation
_mlx4_en_auto_moderation:               ## @mlx4_en_auto_moderation
	.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
	cmpl	$0, 112(%rdi)
	je	LBB0_31
## %bb.1:
	movq	%rdi, %r12
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, %r8
	subq	72(%rdi), %r8
	movq	_HZ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	imulq	(%rdi), %rcx
	cmpq	%rcx, %r8
	jb	LBB0_31
## %bb.2:
	cmpl	$0, 8(%r12)
	jle	LBB0_30
## %bb.3:
	leaq	96(%r12), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_28:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	16(%r12), %rax
	movq	%r15, (%rax,%rbx,8)
	movq	24(%r12), %rax
	movq	%r14, (%rax,%rbx,8)
	incq	%rbx
	movslq	8(%r12), %rax
	addq	$8, %r13
	cmpq	%rax, %rbx
	jge	LBB0_29
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_spin_lock_bh
	movq	104(%r12), %rax
	movq	(%rax,%r13,2), %r15
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rax,%r13,2), %r13
	movq	%r14, %rdi
	callq	_spin_unlock_bh
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	movq	16(%r12), %rax
	movq	(%rax,%rbx,8), %rdi
	movq	%r15, %r9
	movq	%r15, %rsi
	subq	%rdi, %rsi
	movq	_HZ@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	imulq	%rsi, %rax
	movq	%rax, %rcx
	orq	%r8, %rcx
	shrq	$32, %rcx
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	xorl	%edx, %edx
	divq	%r8
	movq	%rax, %rcx
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r8d
	movl	%eax, %ecx
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r13, %r14
	movq	%r9, %r15
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	cmpq	%rdi, %r9
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	xorl	%esi, %esi
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	24(%r12), %rdx
	movq	%r14, %rax
	subq	(%rdx,%rbx,8), %rax
	movq	%rax, %rdx
	orq	%rsi, %rdx
	shrq	$32, %rdx
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	xorl	%edx, %edx
	divq	%rsi
	movq	%rax, %rsi
	jmp	LBB0_12
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%esi
	movl	%eax, %esi
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	_MLX4_EN_RX_RATE_THRESH@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	8(%r12), %rdi
	movq	%rax, %rdx
	orq	%rdi, %rdx
	shrq	$32, %rdx
	je	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=1
	xorl	%edx, %edx
	divq	%rdi
	cmpq	%rax, %rcx
	ja	LBB0_16
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_4 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%edi
                                        ## kill: def $eax killed $eax def $rax
	cmpq	%rax, %rcx
	jbe	LBB0_24
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	_MLX4_EN_AVG_PKT_SMALL@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jbe	LBB0_24
## %bb.17:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	32(%r12), %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	jae	LBB0_18
LBB0_24:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	40(%r12), %eax
LBB0_25:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	64(%r12), %rcx
	cmpl	(%rcx,%rbx,4), %eax
	je	LBB0_28
## %bb.26:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	%eax, (%rcx,%rbx,4)
	movq	88(%r12), %rcx
	leaq	(%rcx,%r13), %rsi
	movl	%eax, (%rcx,%rbx,8)
	movl	80(%r12), %eax
	movl	%eax, 4(%rcx,%rbx,8)
	movq	%r12, %rdi
	callq	_mlx4_en_set_cq_moder
	testl	%eax, %eax
	je	LBB0_28
## %bb.27:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_en_err
	jmp	LBB0_28
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	48(%r12), %rsi
	cmpq	%rsi, %rcx
	jbe	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	56(%r12), %eax
	jmp	LBB0_25
LBB0_20:                                ##   in Loop: Header=BB0_4 Depth=1
	movslq	56(%r12), %rdi
	movslq	40(%r12), %rcx
	subq	%rcx, %rdi
	imulq	%rdi, %rax
	subq	%rdx, %rsi
	movq	%rax, %rdx
	orq	%rsi, %rdx
	shrq	$32, %rdx
	je	LBB0_21
## %bb.22:                              ##   in Loop: Header=BB0_4 Depth=1
	xorl	%edx, %edx
	divq	%rsi
	addl	%ecx, %eax
	jmp	LBB0_25
LBB0_21:                                ##   in Loop: Header=BB0_4 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $eax killed $eax def $rax
	addl	%ecx, %eax
	jmp	LBB0_25
LBB0_29:
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_30:
	movq	%rax, 72(%r12)
LBB0_31:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_HZ,8,3                         ## @HZ
	.comm	_MLX4_EN_RX_RATE_THRESH,8,3     ## @MLX4_EN_RX_RATE_THRESH
	.comm	_MLX4_EN_AVG_PKT_SMALL,8,3      ## @MLX4_EN_AVG_PKT_SMALL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed modifying moderation for cq:%d\n"

	.no_dead_strip	_mlx4_en_auto_moderation
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx4_en_auto_moderation
_mlx4_en_auto_moderation:               ; @mlx4_en_auto_moderation
	.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
	ldr	w8, [x0, #112]
	cbz	w8, LBB0_19
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _jiffies@GOTPAGE
Lloh1:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x9, [x0, #72]
	ldr	x10, [x0]
Lloh3:
	adrp	x24, _HZ@GOTPAGE
Lloh4:
	ldr	x24, [x24, _HZ@GOTPAGEOFF]
	ldr	x11, [x24]
	mul	x10, x11, x10
	sub	x25, x8, x9
	cmp	x25, x10
	b.lo	LBB0_19
; %bb.2:
	ldr	w9, [x19, #8]
	cmp	w9, #1
	b.lt	LBB0_18
; %bb.3:
	mov	x20, #0
	add	x21, x19, #96
Lloh5:
	adrp	x26, _MLX4_EN_RX_RATE_THRESH@GOTPAGE
Lloh6:
	ldr	x26, [x26, _MLX4_EN_RX_RATE_THRESH@GOTPAGEOFF]
Lloh7:
	adrp	x27, _MLX4_EN_AVG_PKT_SMALL@GOTPAGE
Lloh8:
	ldr	x27, [x27, _MLX4_EN_AVG_PKT_SMALL@GOTPAGEOFF]
Lloh9:
	adrp	x22, l_.str@PAGE
Lloh10:
	add	x22, x22, l_.str@PAGEOFF
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	lsl	x8, x20, #3
	ldp	x9, x10, [x19, #16]
	str	x28, [x9, x8]
	str	x23, [x10, x8]
	add	x20, x20, #1
	ldrsw	x8, [x19, #8]
	cmp	x20, x8
	b.ge	LBB0_17
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_spin_lock_bh
	ldr	x8, [x19, #104]
	add	x8, x8, x20, lsl #4
	ldp	x28, x23, [x8]
	mov	x0, x21
	bl	_spin_unlock_bh
	ldr	x8, [x19, #16]
	ldr	x8, [x8, x20, lsl #3]
	subs	x8, x28, x8
	b.ne	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x9, #0
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x19, #24]
	ldr	x9, [x9, x20, lsl #3]
	sub	x9, x23, x9
	udiv	x9, x9, x8
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x10, [x24]
	mul	x8, x8, x10
	udiv	x8, x8, x25
	ldr	x10, [x26]
	ldrsw	x11, [x19, #8]
	ldr	x12, [x27]
	udiv	x10, x10, x11
	cmp	x8, x10
	ccmp	x9, x12, #0, hi
	b.ls	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x19, #32]
	subs	x10, x8, x9
	b.hs	LBB0_14
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x19, #40]
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x19, #64]
	ldr	w10, [x9, x20, lsl #2]
	cmp	w8, w10
	b.eq	LBB0_4
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	str	w8, [x9, x20, lsl #2]
	ldr	x9, [x19, #88]
	ldr	w10, [x19, #80]
	add	x1, x9, x20, lsl #3
	stp	w8, w10, [x1]
	mov	x0, x19
	bl	_mlx4_en_set_cq_moder
	cbz	w0, LBB0_4
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	mov	x1, x22
	mov	x2, x20
	bl	_en_err
	b	LBB0_4
LBB0_14:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x11, [x19, #48]
	cmp	x8, x11
	b.ls	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x19, #56]
	b	LBB0_11
LBB0_16:                                ;   in Loop: Header=BB0_5 Depth=1
	ldrsw	x8, [x19, #56]
	ldrsw	x12, [x19, #40]
	sub	x8, x8, x12
	mul	x8, x10, x8
	sub	x9, x11, x9
	udiv	x8, x8, x9
	add	w8, w12, w8
	b	LBB0_11
LBB0_17:
Lloh11:
	adrp	x8, _jiffies@GOTPAGE
Lloh12:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
LBB0_18:
	str	x8, [x19, #72]
LBB0_19:
	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
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_HZ,8,3                         ; @HZ
	.comm	_MLX4_EN_RX_RATE_THRESH,8,3     ; @MLX4_EN_RX_RATE_THRESH
	.comm	_MLX4_EN_AVG_PKT_SMALL,8,3      ; @MLX4_EN_AVG_PKT_SMALL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed modifying moderation for cq:%d\n"

	.no_dead_strip	_mlx4_en_auto_moderation
.subsections_via_symbols
