	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function set_link_ipg
LCPI0_0:
	.quad	2147483648                      ## 0x80000000
	.quad	2147483648                      ## 0x80000000
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_set_link_ipg
	.p2align	4, 0x90
_set_link_ipg:                          ## @set_link_ipg
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	16(%rdi), %r14
	callq	_get_cc_state
	testq	%rax, %rax
	je	LBB0_14
## %bb.1:
	movq	_OPA_MAX_SLS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, %ecx
	jle	LBB0_2
## %bb.3:
	movq	8(%r15), %rdx
	cmpl	$4, %ecx
	jae	LBB0_5
## %bb.4:
	xorl	%esi, %esi
	xorl	%edi, %edi
	jmp	LBB0_12
LBB0_14:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	xorl	%edi, %edi
	jmp	LBB0_13
LBB0_5:
	movl	%ecx, %esi
	andl	$-4, %esi
	leaq	-4(%rsi), %rdi
	movq	%rdi, %r8
	shrq	$2, %r8
	incq	%r8
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.7:
	movq	%r8, %rdi
	andq	$-2, %rdi
	pxor	%xmm2, %xmm2
	xorl	%ebx, %ebx
	movdqa	LCPI0_0(%rip), %xmm8            ## xmm8 = [2147483648,2147483648]
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movdqa	%xmm2, %xmm0
	pxor	%xmm8, %xmm0
	movdqu	(%rdx,%rbx,8), %xmm5
	movdqu	16(%rdx,%rbx,8), %xmm6
	movdqu	32(%rdx,%rbx,8), %xmm4
	movdqa	%xmm5, %xmm7
	pxor	%xmm8, %xmm7
	movdqa	%xmm7, %xmm3
	pcmpeqd	%xmm0, %xmm3
	pcmpgtd	%xmm0, %xmm7
	pshufd	$160, %xmm7, %xmm0              ## xmm0 = xmm7[0,0,2,2]
	pand	%xmm3, %xmm0
	por	%xmm7, %xmm0
	blendvpd	%xmm0, %xmm5, %xmm2
	movdqa	%xmm1, %xmm0
	pxor	%xmm8, %xmm0
	movdqa	%xmm6, %xmm3
	pxor	%xmm8, %xmm3
	movdqa	%xmm3, %xmm5
	pcmpeqd	%xmm0, %xmm5
	pcmpgtd	%xmm0, %xmm3
	pshufd	$160, %xmm3, %xmm0              ## xmm0 = xmm3[0,0,2,2]
	pand	%xmm5, %xmm0
	por	%xmm3, %xmm0
	blendvpd	%xmm0, %xmm6, %xmm1
	movapd	%xmm2, %xmm0
	xorpd	%xmm8, %xmm0
	movdqa	%xmm4, %xmm3
	pxor	%xmm8, %xmm3
	movdqa	%xmm3, %xmm5
	pcmpeqd	%xmm0, %xmm5
	pcmpgtd	%xmm0, %xmm3
	pshufd	$160, %xmm3, %xmm0              ## xmm0 = xmm3[0,0,2,2]
	pand	%xmm5, %xmm0
	por	%xmm3, %xmm0
	blendvpd	%xmm0, %xmm4, %xmm2
	movdqu	48(%rdx,%rbx,8), %xmm3
	movapd	%xmm1, %xmm0
	xorpd	%xmm8, %xmm0
	movdqa	%xmm3, %xmm4
	pxor	%xmm8, %xmm4
	movdqa	%xmm4, %xmm5
	pcmpeqd	%xmm0, %xmm5
	pcmpgtd	%xmm0, %xmm4
	pshufd	$160, %xmm4, %xmm0              ## xmm0 = xmm4[0,0,2,2]
	pand	%xmm5, %xmm0
	por	%xmm4, %xmm0
	blendvpd	%xmm0, %xmm3, %xmm1
	addq	$8, %rbx
	addq	$-2, %rdi
	jne	LBB0_8
## %bb.9:
	testb	$1, %r8b
	je	LBB0_11
LBB0_10:
	movdqu	(%rdx,%rbx,8), %xmm4
	movdqu	16(%rdx,%rbx,8), %xmm3
	movdqa	LCPI0_0(%rip), %xmm5            ## xmm5 = [2147483648,2147483648]
	movdqa	%xmm2, %xmm0
	pxor	%xmm5, %xmm0
	movdqa	%xmm4, %xmm6
	pxor	%xmm5, %xmm6
	movdqa	%xmm6, %xmm7
	pcmpeqd	%xmm0, %xmm7
	pcmpgtd	%xmm0, %xmm6
	pshufd	$160, %xmm6, %xmm0              ## xmm0 = xmm6[0,0,2,2]
	pand	%xmm7, %xmm0
	por	%xmm6, %xmm0
	blendvpd	%xmm0, %xmm4, %xmm2
	movdqa	%xmm1, %xmm0
	pxor	%xmm5, %xmm0
	pxor	%xmm3, %xmm5
	movdqa	%xmm5, %xmm4
	pcmpeqd	%xmm0, %xmm4
	pcmpgtd	%xmm0, %xmm5
	pshufd	$160, %xmm5, %xmm0              ## xmm0 = xmm5[0,0,2,2]
	pand	%xmm4, %xmm0
	por	%xmm5, %xmm0
	blendvpd	%xmm0, %xmm3, %xmm1
LBB0_11:
	movdqa	LCPI0_0(%rip), %xmm3            ## xmm3 = [2147483648,2147483648]
	movdqa	%xmm1, %xmm0
	pxor	%xmm3, %xmm0
	movdqa	%xmm2, %xmm4
	pxor	%xmm3, %xmm4
	movdqa	%xmm4, %xmm5
	pcmpeqd	%xmm0, %xmm5
	pcmpgtd	%xmm0, %xmm4
	pshufd	$160, %xmm4, %xmm0              ## xmm0 = xmm4[0,0,2,2]
	pand	%xmm5, %xmm0
	por	%xmm4, %xmm0
	blendvpd	%xmm0, %xmm2, %xmm1
	pshufd	$238, %xmm1, %xmm2              ## xmm2 = xmm1[2,3,2,3]
	movdqa	%xmm1, %xmm4
	pxor	%xmm3, %xmm4
	pxor	%xmm2, %xmm3
	movdqa	%xmm4, %xmm5
	pcmpeqd	%xmm3, %xmm5
	pcmpgtd	%xmm3, %xmm4
	pshufd	$160, %xmm4, %xmm0              ## xmm0 = xmm4[0,0,2,2]
	pand	%xmm5, %xmm0
	por	%xmm4, %xmm0
	blendvpd	%xmm0, %xmm1, %xmm2
	movq	%xmm2, %rdi
	cmpq	%rcx, %rsi
	je	LBB0_13
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rdx,%rsi,8), %rbx
	cmpq	%rdi, %rbx
	cmovgq	%rbx, %rdi
	incq	%rsi
	cmpq	%rsi, %rcx
	jne	LBB0_12
LBB0_13:
	movq	(%rax), %rcx
	cmpq	%rcx, %rdi
	cmovlq	%rdi, %rcx
	movq	8(%rax), %rax
	movq	(%rax,%rcx,8), %rbx
	movq	%rbx, %r12
	shrq	$14, %r12
	andl	$16383, %ebx                    ## imm = 0x3FFF
	movq	%r15, %rdi
	callq	_active_egress_rate
	movl	(%r15), %edi
	movq	%rax, %rsi
	callq	_egress_cycles
	andb	$3, %r12b
	movl	%r12d, %ecx
	sarq	%cl, %rax
	imulq	%rax, %rbx
	movq	_SEND_STATIC_RATE_CONTROL_CSR_SRC_RELOAD_SMASK@GOTPCREL(%rip), %rax
	andq	(%rax), %rbx
	movq	_SEND_STATIC_RATE_CONTROL_CSR_SRC_RELOAD_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shlq	%cl, %rbx
	movq	_SEND_STATIC_RATE_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_write_csr                      ## TAILCALL
LBB0_6:
	pxor	%xmm2, %xmm2
	xorl	%ebx, %ebx
	pxor	%xmm1, %xmm1
	testb	$1, %r8b
	jne	LBB0_10
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_OPA_MAX_SLS,4,2                ## @OPA_MAX_SLS
	.comm	_SEND_STATIC_RATE_CONTROL_CSR_SRC_RELOAD_SMASK,8,3 ## @SEND_STATIC_RATE_CONTROL_CSR_SRC_RELOAD_SMASK
	.comm	_SEND_STATIC_RATE_CONTROL_CSR_SRC_RELOAD_SHIFT,8,3 ## @SEND_STATIC_RATE_CONTROL_CSR_SRC_RELOAD_SHIFT
	.comm	_SEND_STATIC_RATE_CONTROL,4,2   ## @SEND_STATIC_RATE_CONTROL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_set_link_ipg                   ; -- Begin function set_link_ipg
	.p2align	2
_set_link_ipg:                          ; @set_link_ipg
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x0
	ldr	x19, [x0, #16]
	bl	_get_cc_state
	cbz	x0, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _OPA_MAX_SLS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OPA_MAX_SLS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.2:
	ldr	x9, [x20, #8]
	cmp	w8, #8
	b.hs	LBB0_6
; %bb.3:
	mov	x10, #0
	mov	x11, #0
	b	LBB0_9
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
	mov	x11, #0
	b	LBB0_11
LBB0_6:
	and	x10, x8, #0xfffffff8
	add	x11, x9, #32
	movi.2d	v0, #0000000000000000
	mov	x12, x10
	movi.2d	v3, #0000000000000000
	movi.2d	v2, #0000000000000000
	movi.2d	v1, #0000000000000000
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q4, q5, [x11, #-32]
	ldp	q6, q7, [x11], #64
	cmgt.2d	v16, v4, v0
	bit.16b	v0, v4, v16
	cmgt.2d	v4, v5, v3
	bit.16b	v3, v5, v4
	cmgt.2d	v4, v6, v2
	bit.16b	v2, v6, v4
	cmgt.2d	v4, v7, v1
	bit.16b	v1, v7, v4
	subs	x12, x12, #8
	b.ne	LBB0_7
; %bb.8:
	cmgt.2d	v4, v0, v3
	bif.16b	v0, v3, v4
	cmgt.2d	v3, v0, v2
	bif.16b	v0, v2, v3
	cmgt.2d	v2, v0, v1
	bif.16b	v0, v1, v2
	ext.16b	v1, v0, v0, #8
	cmgt	d2, d0, d1
	bif.8b	v0, v1, v2
	fmov	x11, d0
	cmp	x10, x8
	b.eq	LBB0_11
LBB0_9:
	add	x9, x9, x10, lsl #3
	sub	x8, x8, x10
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9], #8
	cmp	x10, x11
	csel	x11, x10, x11, gt
	subs	x8, x8, #1
	b.ne	LBB0_10
LBB0_11:
	ldp	x8, x9, [x0]
	cmp	x11, x8
	csel	x8, x11, x8, lt
	ldr	x8, [x9, x8, lsl #3]
	ubfx	x21, x8, #14, #2
	and	x22, x8, #0x3fff
	mov	x0, x20
	bl	_active_egress_rate
	mov	x1, x0
	ldr	w0, [x20]
	bl	_egress_cycles
	asr	x8, x0, x21
	mul	x8, x8, x22
Lloh3:
	adrp	x9, _SEND_STATIC_RATE_CONTROL_CSR_SRC_RELOAD_SMASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SEND_STATIC_RATE_CONTROL_CSR_SRC_RELOAD_SMASK@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	and	x8, x8, x9
Lloh6:
	adrp	x9, _SEND_STATIC_RATE_CONTROL_CSR_SRC_RELOAD_SHIFT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SEND_STATIC_RATE_CONTROL_CSR_SRC_RELOAD_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	lsl	x2, x8, x9
Lloh9:
	adrp	x8, _SEND_STATIC_RATE_CONTROL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SEND_STATIC_RATE_CONTROL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_write_csr
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_OPA_MAX_SLS,4,2                ; @OPA_MAX_SLS
	.comm	_SEND_STATIC_RATE_CONTROL_CSR_SRC_RELOAD_SMASK,8,3 ; @SEND_STATIC_RATE_CONTROL_CSR_SRC_RELOAD_SMASK
	.comm	_SEND_STATIC_RATE_CONTROL_CSR_SRC_RELOAD_SHIFT,8,3 ; @SEND_STATIC_RATE_CONTROL_CSR_SRC_RELOAD_SHIFT
	.comm	_SEND_STATIC_RATE_CONTROL,4,2   ; @SEND_STATIC_RATE_CONTROL
.subsections_via_symbols
