	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ixgbe_ieee_credits
_ixgbe_ieee_credits:                    ## @ixgbe_ieee_credits
	.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	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movl	%ecx, %eax
	shrl	$31, %eax
	addl	%ecx, %eax
	sarl	%eax
	movq	_DCB_CREDIT_QUANTUM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%ecx, %eax
	decl	%eax
	cltd
	idivl	%ecx
	movl	%eax, %r12d
	movq	_MAX_TRAFFIC_CLASS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%edx, %edx
	jle	LBB0_12
## %bb.1:
	movq	%rdi, %rbx
	leaq	-1(%rdx), %rcx
	movl	%edx, %r8d
	andl	$3, %r8d
	cmpq	$3, %rcx
	jae	LBB0_3
## %bb.2:
	movl	$100, %ecx
	xorl	%esi, %esi
	jmp	LBB0_5
LBB0_3:
	andl	$-4, %edx
	movl	$100, %ecx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx,%rsi,4), %eax
	testl	%eax, %eax
	movl	%eax, %edi
	cmovel	%ecx, %edi
	cmpl	%ecx, %eax
	cmovgel	%ecx, %edi
	movl	4(%rbx,%rsi,4), %eax
	testl	%eax, %eax
	movl	%eax, %ecx
	cmovel	%edi, %ecx
	cmpl	%edi, %eax
	cmovgel	%edi, %ecx
	movl	8(%rbx,%rsi,4), %eax
	testl	%eax, %eax
	movl	%eax, %edi
	cmovel	%ecx, %edi
	cmpl	%ecx, %eax
	cmovgel	%ecx, %edi
	movl	12(%rbx,%rsi,4), %eax
	testl	%eax, %eax
	movl	%eax, %ecx
	cmovel	%edi, %ecx
	cmpl	%edi, %eax
	cmovgel	%edi, %ecx
	addq	$4, %rsi
	cmpq	%rsi, %rdx
	jne	LBB0_4
LBB0_5:
	testq	%r8, %r8
	je	LBB0_8
## %bb.6:
	leaq	(%rbx,%rsi,4), %rdx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rdx,%rsi,4), %eax
	testl	%eax, %eax
	movl	%eax, %edi
	cmovel	%ecx, %edi
	cmpl	%ecx, %eax
	cmovll	%edi, %ecx
	incq	%rsi
	cmpq	%rsi, %r8
	jne	LBB0_7
LBB0_8:
	movl	%r12d, %eax
	cltd
	idivl	%ecx
	movl	%eax, %r13d
	incl	%r13d
	xorl	%r14d, %r14d
	movq	_MAX_CREDIT_REFILL@GOTPCREL(%rip), %r15
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx,%r14,4)
	incq	%r14
	movq	_MAX_TRAFFIC_CLASS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r14
	jge	LBB0_12
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx,%r14,4), %edi
	imull	%r13d, %edi
	movl	(%r15), %esi
	callq	_min
	cmpl	%r12d, %eax
	cmovlel	%r12d, %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx,%r14,4)
	movl	(%rbx,%r14,4), %ecx
	movl	%r12d, %eax
	testl	%ecx, %ecx
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	_MAX_CREDIT@GOTPCREL(%rip), %rax
	imull	(%rax), %ecx
	movslq	%ecx, %rax
	imulq	$1374389535, %rax, %rax         ## imm = 0x51EB851F
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$37, %rax
	addl	%ecx, %eax
	jmp	LBB0_11
LBB0_12:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DCB_CREDIT_QUANTUM,4,2         ## @DCB_CREDIT_QUANTUM
	.comm	_MAX_TRAFFIC_CLASS,4,2          ## @MAX_TRAFFIC_CLASS
	.comm	_MAX_CREDIT_REFILL,4,2          ## @MAX_CREDIT_REFILL
	.comm	_MAX_CREDIT,4,2                 ## @MAX_CREDIT
	.no_dead_strip	_ixgbe_ieee_credits
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ixgbe_ieee_credits
_ixgbe_ieee_credits:                    ; @ixgbe_ieee_credits
	.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
	cmp	w3, #0
	cinc	w9, w3, lt
Lloh0:
	adrp	x22, _MAX_TRAFFIC_CLASS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MAX_TRAFFIC_CLASS@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh2:
	adrp	x10, _DCB_CREDIT_QUANTUM@GOTPAGE
Lloh3:
	ldr	x10, [x10, _DCB_CREDIT_QUANTUM@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x10]
	add	w9, w10, w9, asr #1
	sub	w9, w9, #1
	sdiv	w23, w9, w10
	mov	w9, #100
	mov	x10, x0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10], #4
	cmp	w11, #0
	ccmp	w11, w9, #0, ne
	csel	w9, w9, w11, ge
	subs	x8, x8, #1
	b.ne	LBB0_2
; %bb.3:
	mov	x24, #0
	sdiv	w8, w23, w9
	add	w25, w8, #1
Lloh5:
	adrp	x26, _MAX_CREDIT_REFILL@GOTPAGE
Lloh6:
	ldr	x26, [x26, _MAX_CREDIT_REFILL@GOTPAGEOFF]
	mov	w28, #34079
	movk	w28, #20971, lsl #16
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	str	w8, [x19, x24, lsl #2]
	add	x24, x24, #1
	ldrsw	x8, [x22]
	cmp	x24, x8
	b.ge	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x27, x24, #2
	ldr	w8, [x21, x27]
	mul	w0, w8, w25
	ldr	w1, [x26]
	bl	_min
	cmp	w0, w23
	csel	w8, w0, w23, gt
	str	w8, [x20, x27]
	ldr	w9, [x21, x27]
	mov	x8, x23
	cbz	w9, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh7:
	adrp	x8, _MAX_CREDIT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MAX_CREDIT@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	mul	w8, w8, w9
	smull	x8, w8, w28
	lsr	x9, x8, #63
	asr	x8, x8, #37
	add	w8, w8, w9
	b	LBB0_4
LBB0_7:
	mov	w0, #0
	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	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_DCB_CREDIT_QUANTUM,4,2         ; @DCB_CREDIT_QUANTUM
	.comm	_MAX_TRAFFIC_CLASS,4,2          ; @MAX_TRAFFIC_CLASS
	.comm	_MAX_CREDIT_REFILL,4,2          ; @MAX_CREDIT_REFILL
	.comm	_MAX_CREDIT,4,2                 ; @MAX_CREDIT
	.no_dead_strip	_ixgbe_ieee_credits
.subsections_via_symbols
