	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rack_calc_thresh_tlp
_rack_calc_thresh_tlp:                  ## @rack_calc_thresh_tlp
	.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, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r14
	movq	%rdi, %rbx
	testl	%ecx, %ecx
	movl	$1, %r12d
	cmovnel	%ecx, %r12d
	movl	8(%rsi), %ecx
	testl	%ecx, %ecx
	je	LBB0_2
## %bb.1:
	movl	%r12d, %eax
	cltd
	idivl	%ecx
	movl	%eax, %r15d
	addl	%r12d, %r15d
	jmp	LBB0_3
LBB0_2:
	leal	(%r12,%r12), %r15d
LBB0_3:
	movq	%rbx, %rdi
	callq	_ctf_fixed_maxseg
	movl	%eax, %r13d
	movq	_rack_enter_tlp_calc@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_counter_u64_add
	movq	(%r14), %rax
	movq	_TLP_USE_ID@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	jne	LBB0_5
## %bb.4:
	movl	(%rbx), %eax
	movl	4(%rbx), %ecx
	addl	12(%r14), %ecx
	subl	%ecx, %eax
	addl	16(%r14), %eax
	cmpl	%r13d, %eax
	jle	LBB0_16
	jmp	LBB0_18
LBB0_5:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %r14d
	subl	4(%rbx), %r14d
	movq	_TLP_USE_TWO_ONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.6:
	movq	_rack_head@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_r_tnext@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_TAILQ_PREV
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_12
## %bb.7:
	cmpl	%r13d, %r14d
	jg	LBB0_12
## %bb.8:
	movq	_rack_used_tlpmethod@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_counter_u64_add
	movslq	8(%rbx), %r12
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movslq	8(%r13), %r14
	movq	16(%rbx), %rax
	movl	-4(%rax,%r14,4), %edi
	movq	16(%r13), %rax
	movl	-4(%rax,%r12,4), %esi
	callq	_TSTMP_GEQ
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movq	16(%rbx), %rax
	movl	-4(%rax,%r12,4), %eax
	movq	16(%r13), %rcx
	subl	-4(%rcx,%r14,4), %eax
	jmp	LBB0_11
LBB0_14:
	movq	_TLP_USE_TWO_TWO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_18
## %bb.15:
	cmpl	%r13d, %r14d
	jg	LBB0_18
LBB0_16:
	movq	_rack_used_tlpmethod@GOTPCREL(%rip), %rax
LBB0_17:
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_counter_u64_add
	movl	%r12d, %eax
	shrl	$31, %eax
	addl	%r12d, %eax
	sarl	%eax
	addl	%r12d, %eax
	movq	_rack_delayed_ack_time@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	cmpl	%r15d, %eax
	cmovgl	%eax, %r15d
LBB0_18:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_19:
	movl	8(%rbx), %edi
	callq	_TICKS_2_MSEC
	cmpl	%eax, %r15d
	jle	LBB0_21
## %bb.20:
	movl	8(%rbx), %edi
	callq	_TICKS_2_MSEC
	movl	%eax, %r15d
LBB0_21:
	movq	_rack_rto_max@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %r15d
	cmovll	%r15d, %eax
	movq	_rack_tlp_min@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %eax
	cmovlel	%ecx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	cmpl	%r13d, %r14d
	jg	LBB0_18
## %bb.13:
	movq	_rack_used_tlpmethod2@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_9:
	xorl	%eax, %eax
LBB0_11:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	addl	%eax, %r15d
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_rack_enter_tlp_calc,4,2        ## @rack_enter_tlp_calc
	.comm	_TLP_USE_ID,8,3                 ## @TLP_USE_ID
	.comm	_rack_used_tlpmethod,4,2        ## @rack_used_tlpmethod
	.comm	_rack_delayed_ack_time,4,2      ## @rack_delayed_ack_time
	.comm	_TLP_USE_TWO_ONE,8,3            ## @TLP_USE_TWO_ONE
	.comm	_rack_head,4,2                  ## @rack_head
	.comm	_r_tnext,4,2                    ## @r_tnext
	.comm	_rack_used_tlpmethod2,4,2       ## @rack_used_tlpmethod2
	.comm	_TLP_USE_TWO_TWO,8,3            ## @TLP_USE_TWO_TWO
	.comm	_rack_rto_max,4,2               ## @rack_rto_max
	.comm	_rack_tlp_min,4,2               ## @rack_tlp_min
	.no_dead_strip	_rack_calc_thresh_tlp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rack_calc_thresh_tlp
_rack_calc_thresh_tlp:                  ; @rack_calc_thresh_tlp
	.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	x21, x2
	mov	x23, x1
	mov	x19, x0
	cmp	w3, #0
	csinc	w24, w3, wzr, ne
	ldr	w8, [x1, #8]
	lsl	w9, w24, #1
	sdiv	w10, w24, w8
	add	w10, w10, w24
	cmp	w8, #0
	csel	w20, w9, w10, eq
	bl	_ctf_fixed_maxseg
	mov	x22, x0
Lloh0:
	adrp	x8, _rack_enter_tlp_calc@GOTPAGE
Lloh1:
	ldr	x8, [x8, _rack_enter_tlp_calc@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	w1, #1
	bl	_counter_u64_add
	ldr	x8, [x23]
Lloh3:
	adrp	x9, _TLP_USE_ID@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TLP_USE_ID@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldp	w8, w9, [x19]
	ldp	w10, w11, [x23, #12]
	add	w9, w9, w10
	sub	w8, w8, w9
	add	w8, w8, w11
	cmp	w8, w22
	b.le	LBB0_7
	b	LBB0_9
LBB0_2:
	ldp	w9, w10, [x21]
	sub	w25, w9, w10
Lloh6:
	adrp	x9, _TLP_USE_TWO_ONE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TLP_USE_TWO_ONE@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.3:
Lloh9:
	adrp	x8, _rack_head@GOTPAGE
Lloh10:
	ldr	x8, [x8, _rack_head@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _r_tnext@GOTPAGE
Lloh13:
	ldr	x8, [x8, _r_tnext@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_TAILQ_PREV
	cmp	x0, #0
	ccmp	w25, w22, #0, ne
	b.le	LBB0_12
; %bb.4:
	cmp	w25, w22
	b.gt	LBB0_9
; %bb.5:
Lloh15:
	adrp	x8, _rack_used_tlpmethod2@GOTPAGE
Lloh16:
	ldr	x8, [x8, _rack_used_tlpmethod2@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
Lloh17:
	adrp	x9, _TLP_USE_TWO_TWO@GOTPAGE
Lloh18:
	ldr	x9, [x9, _TLP_USE_TWO_TWO@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x8, x9
	ccmp	w25, w22, #0, eq
	b.gt	LBB0_9
LBB0_7:
Lloh20:
	adrp	x8, _rack_used_tlpmethod@GOTPAGE
Lloh21:
	ldr	x8, [x8, _rack_used_tlpmethod@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
	mov	w1, #1
	bl	_counter_u64_add
	cmp	w24, #0
	cinc	w8, w24, lt
	add	w8, w24, w8, asr #1
Lloh22:
	adrp	x9, _rack_delayed_ack_time@GOTPAGE
Lloh23:
	ldr	x9, [x9, _rack_delayed_ack_time@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	add	w8, w8, w9
	cmp	w8, w20
	csel	w20, w8, w20, gt
LBB0_9:
	ldr	w0, [x19, #8]
	bl	_TICKS_2_MSEC
	cmp	w20, w0
	b.le	LBB0_11
; %bb.10:
	ldr	w0, [x19, #8]
	bl	_TICKS_2_MSEC
	mov	x20, x0
LBB0_11:
Lloh25:
	adrp	x8, _rack_rto_max@GOTPAGE
Lloh26:
	ldr	x8, [x8, _rack_rto_max@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	cmp	w20, w8
	csel	w8, w20, w8, lt
Lloh28:
	adrp	x9, _rack_tlp_min@GOTPAGE
Lloh29:
	ldr	x9, [x9, _rack_tlp_min@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	cmp	w8, w9
	csel	w0, w8, w9, gt
	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
LBB0_12:
	mov	x23, x0
Lloh31:
	adrp	x8, _rack_used_tlpmethod@GOTPAGE
Lloh32:
	ldr	x8, [x8, _rack_used_tlpmethod@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	mov	w1, #1
	bl	_counter_u64_add
	ldrsw	x8, [x21, #8]
	sub	x22, x8, #1
	ldrsw	x8, [x23, #8]
	sub	x24, x8, #1
	ldr	x8, [x21, #16]
	ldr	w0, [x8, x24, lsl #2]
	ldr	x8, [x23, #16]
	ldr	w1, [x8, x22, lsl #2]
	bl	_TSTMP_GEQ
	cbz	x0, LBB0_14
; %bb.13:
	ldr	x8, [x21, #16]
	ldr	w8, [x8, x22, lsl #2]
	ldr	x9, [x23, #16]
	ldr	w9, [x9, x24, lsl #2]
	sub	w8, w8, w9
	add	w20, w8, w20
	b	LBB0_9
LBB0_14:
	mov	w8, #0
	add	w20, wzr, w20
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_rack_enter_tlp_calc,4,2        ; @rack_enter_tlp_calc
	.comm	_TLP_USE_ID,8,3                 ; @TLP_USE_ID
	.comm	_rack_used_tlpmethod,4,2        ; @rack_used_tlpmethod
	.comm	_rack_delayed_ack_time,4,2      ; @rack_delayed_ack_time
	.comm	_TLP_USE_TWO_ONE,8,3            ; @TLP_USE_TWO_ONE
	.comm	_rack_head,4,2                  ; @rack_head
	.comm	_r_tnext,4,2                    ; @r_tnext
	.comm	_rack_used_tlpmethod2,4,2       ; @rack_used_tlpmethod2
	.comm	_TLP_USE_TWO_TWO,8,3            ; @TLP_USE_TWO_TWO
	.comm	_rack_rto_max,4,2               ; @rack_rto_max
	.comm	_rack_tlp_min,4,2               ; @rack_tlp_min
	.no_dead_strip	_rack_calc_thresh_tlp
.subsections_via_symbols
