	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rack_calc_thresh_rack
_rack_calc_thresh_rack:                 ## @rack_calc_thresh_rack
	.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
	movl	%esi, %r15d
	movq	%rdi, %r14
	testl	%esi, %esi
	movl	$1, %r13d
	cmovel	%r13d, %r15d
	movl	8(%rdi), %esi
	testl	%esi, %esi
	je	LBB0_6
## %bb.1:
	cmpl	$0, 12(%r14)
	je	LBB0_2
## %bb.3:
	movl	%edx, %r12d
	movl	%edx, %edi
	callq	_SEQ_GEQ
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	subl	8(%r14), %r12d
	movl	$1, %eax
	cmovel	%eax, %r12d
	cmpl	12(%r14), %r12d
	jg	LBB0_5
## %bb.9:
	movl	16(%r14), %ebx
	addl	%r15d, %ebx
	movl	$1, %r13d
	testl	%r12d, %r12d
	jne	LBB0_10
	jmp	LBB0_14
LBB0_2:
	movl	16(%r14), %ebx
	addl	%r15d, %ebx
LBB0_10:
	movl	20(%r14), %ecx
	testl	%ecx, %ecx
	je	LBB0_12
## %bb.11:
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %r15d
	jmp	LBB0_13
LBB0_7:
	cmpl	$0, 12(%r14)
	js	LBB0_5
## %bb.8:
	addl	16(%r14), %r15d
	movl	$1, %r13d
	movl	%r15d, %ebx
	jmp	LBB0_14
LBB0_5:
	movl	$0, 8(%r14)
LBB0_6:
	addl	16(%r14), %r15d
	movl	%r15d, %ebx
	jmp	LBB0_14
LBB0_12:
	sarl	$2, %r15d
LBB0_13:
	movl	%r15d, %r13d
LBB0_14:
	addl	%r13d, %ebx
	movq	(%r14), %rax
	movl	(%rax), %edi
	callq	_TICKS_2_MSEC
	cmpl	%eax, %ebx
	jle	LBB0_16
## %bb.15:
	movq	(%r14), %rax
	movl	(%rax), %edi
	callq	_TICKS_2_MSEC
	movl	%eax, %ebx
LBB0_16:
	movq	_rack_rto_max@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ebx
	cmovll	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_rack_rto_max,4,2               ## @rack_rto_max
	.no_dead_strip	_rack_calc_thresh_rack
.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_rack
_rack_calc_thresh_rack:                 ; @rack_calc_thresh_rack
	.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	x19, x0
	cmp	w1, #0
	csinc	w21, w1, wzr, ne
	ldr	w1, [x0, #8]
	cbz	w1, LBB0_9
; %bb.1:
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_5
; %bb.2:
	mov	x20, x2
	mov	x0, x2
	bl	_SEQ_GEQ
	cbz	x0, LBB0_7
; %bb.3:
	ldp	w8, w10, [x19, #8]
	subs	w8, w20, w8
	csinc	w9, w8, wzr, ne
	cmp	w9, w10
	b.gt	LBB0_8
; %bb.4:
	ldr	w8, [x19, #16]
	add	w8, w8, w21
	cbnz	w9, LBB0_6
	b	LBB0_10
LBB0_5:
	ldr	w8, [x19, #16]
	add	w8, w8, w21
LBB0_6:
	ldr	w9, [x19, #20]
	asr	w10, w21, #2
	asr	w11, w21, w9
	cmp	w9, #0
	csel	w9, w10, w11, eq
	b	LBB0_11
LBB0_7:
	ldr	w8, [x19, #12]
	tbz	w8, #31, LBB0_9
LBB0_8:
	str	wzr, [x19, #8]
LBB0_9:
	ldr	w8, [x19, #16]
	add	w8, w8, w21
LBB0_10:
	mov	w9, #1
LBB0_11:
	add	w20, w9, w8
	ldr	x8, [x19]
	ldr	w0, [x8]
	bl	_TICKS_2_MSEC
	cmp	w20, w0
	b.le	LBB0_13
; %bb.12:
	ldr	x8, [x19]
	ldr	w0, [x8]
	bl	_TICKS_2_MSEC
	mov	x20, x0
LBB0_13:
Lloh0:
	adrp	x8, _rack_rto_max@GOTPAGE
Lloh1:
	ldr	x8, [x8, _rack_rto_max@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w20, w8
	csel	w0, w20, w8, lt
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_rack_rto_max,4,2               ; @rack_rto_max
	.no_dead_strip	_rack_calc_thresh_rack
.subsections_via_symbols
