	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bbr_calc_thresh_tlp
_bbr_calc_thresh_tlp:                   ## @bbr_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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	testl	%ecx, %ecx
	movl	$1, %r13d
	cmovnel	%ecx, %r13d
	movl	(%rsi), %ecx
	testl	%ecx, %ecx
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	je	LBB0_2
## %bb.1:
	movl	%r13d, %eax
	cltd
	idivl	%ecx
	movl	%eax, %r15d
	addl	%r13d, %r15d
	jmp	LBB0_3
LBB0_2:
	leal	(%r13,%r13), %r15d
LBB0_3:
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	(%rdi), %r14d
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	subl	4(%rsi), %r14d
	movl	(%rbx), %r12d
	subl	4(%rbx), %r12d
	movq	_bbr_head@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_r_tnext@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_TAILQ_PREV
	testq	%rax, %rax
	je	LBB0_9
## %bb.4:
	cmpl	%r14d, %r12d
	jg	LBB0_9
## %bb.5:
	movq	%rax, %rbx
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movslq	8(%r14), %r12
	movslq	8(%rax), %rcx
	movq	16(%r14), %rax
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movl	-4(%rax,%rcx,4), %edi
	movq	16(%rbx), %rax
	movl	-4(%rax,%r12,4), %esi
	callq	_TSTMP_GEQ
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	16(%r14), %rax
	movl	-4(%rax,%r12,4), %eax
	movq	16(%rbx), %rcx
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	subl	-4(%rcx,%rdx,4), %eax
	jmp	LBB0_8
LBB0_9:
	cmpl	%r14d, %r12d
	jg	LBB0_11
## %bb.10:
	movl	%r13d, %eax
	shrl	$31, %eax
	addl	%r13d, %eax
	sarl	%eax
	addl	%r13d, %eax
	movq	_bbr_delayed_ack_time@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	cmpl	%r15d, %eax
	cmovgl	%eax, %r15d
LBB0_11:
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	cmpq	$0, 8(%rcx)
	je	LBB0_13
LBB0_14:
	movl	16(%rcx), %edi
	callq	_TICKS_2_USEC
	movl	%eax, %ebx
	jmp	LBB0_15
LBB0_6:
	xorl	%eax, %eax
LBB0_8:
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	addl	%eax, %r15d
	cmpq	$0, 8(%rcx)
	jne	LBB0_14
LBB0_13:
	movq	_BBR_INITIAL_RTO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_15:
	movq	_BBR_TO_FRM_TLP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%r15d, %edx
	movl	%ebx, %ecx
	movl	%r13d, %r8d
	movq	-72(%rbp), %r9                  ## 8-byte Reload
	callq	_bbr_log_thresh_choice
	cmpl	%ebx, %r15d
	cmovll	%r15d, %ebx
	movq	_USECS_IN_SECOND@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	imull	8(%r14), %eax
	cmpl	%eax, %ebx
	cmovll	%ebx, %eax
	movq	_bbr_tlp_min@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %eax
	cmovlel	%ecx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_bbr_head,4,2                   ## @bbr_head
	.comm	_r_tnext,4,2                    ## @r_tnext
	.comm	_bbr_delayed_ack_time,4,2       ## @bbr_delayed_ack_time
	.comm	_BBR_INITIAL_RTO,4,2            ## @BBR_INITIAL_RTO
	.comm	_BBR_TO_FRM_TLP,4,2             ## @BBR_TO_FRM_TLP
	.comm	_USECS_IN_SECOND,4,2            ## @USECS_IN_SECOND
	.comm	_bbr_tlp_min,4,2                ## @bbr_tlp_min
	.no_dead_strip	_bbr_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 bbr_calc_thresh_tlp
_bbr_calc_thresh_tlp:                   ; @bbr_calc_thresh_tlp
	.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
	mov	x21, x4
	mov	x20, x2
	mov	x19, x1
	mov	x24, x0
	cmp	w3, #0
	csinc	w22, w3, wzr, ne
	lsl	w8, w22, #1
	ldp	w9, w10, [x1]
	sdiv	w11, w22, w9
	add	w11, w11, w22
	cmp	w9, #0
	csel	w23, w8, w11, eq
	ldr	w8, [x0]
	sub	w26, w8, w10
	ldp	w8, w9, [x2]
	sub	w27, w8, w9
Lloh0:
	adrp	x8, _bbr_head@GOTPAGE
Lloh1:
	ldr	x8, [x8, _bbr_head@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _r_tnext@GOTPAGE
Lloh4:
	ldr	x8, [x8, _r_tnext@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_TAILQ_PREV
	cmp	x0, #0
	ccmp	w27, w26, #0, ne
	b.le	LBB0_3
; %bb.1:
	cmp	w27, w26
	b.gt	LBB0_5
; %bb.2:
	cmp	w22, #0
	cinc	w8, w22, lt
	add	w8, w22, w8, asr #1
Lloh6:
	adrp	x9, _bbr_delayed_ack_time@GOTPAGE
Lloh7:
	ldr	x9, [x9, _bbr_delayed_ack_time@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	add	w8, w8, w9
	cmp	w8, w23
	csel	w23, w8, w23, gt
	ldr	x8, [x24, #8]
	cbnz	x8, LBB0_6
	b	LBB0_8
LBB0_3:
	mov	x25, x0
	ldrsw	x8, [x20, #8]
	sub	x26, x8, #1
	ldrsw	x8, [x0, #8]
	sub	x27, x8, #1
	ldr	x8, [x20, #16]
	ldr	w0, [x8, x27, lsl #2]
	ldr	x8, [x25, #16]
	ldr	w1, [x8, x26, lsl #2]
	bl	_TSTMP_GEQ
	cbz	x0, LBB0_7
; %bb.4:
	ldr	x8, [x20, #16]
	ldr	w8, [x8, x26, lsl #2]
	ldr	x9, [x25, #16]
	ldr	w9, [x9, x27, lsl #2]
	sub	w8, w8, w9
	add	w23, w8, w23
LBB0_5:
	ldr	x8, [x24, #8]
	cbz	x8, LBB0_8
LBB0_6:
	ldr	w0, [x24, #16]
	bl	_TICKS_2_USEC
	mov	x24, x0
	b	LBB0_9
LBB0_7:
	mov	w8, #0
	add	w23, wzr, w23
	ldr	x8, [x24, #8]
	cbnz	x8, LBB0_6
LBB0_8:
Lloh9:
	adrp	x8, _BBR_INITIAL_RTO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BBR_INITIAL_RTO@GOTPAGEOFF]
Lloh11:
	ldr	w24, [x8]
LBB0_9:
Lloh12:
	adrp	x8, _BBR_TO_FRM_TLP@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BBR_TO_FRM_TLP@GOTPAGEOFF]
Lloh14:
	ldr	w6, [x8]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x23
	mov	x3, x24
	mov	x4, x22
	mov	x5, x20
	bl	_bbr_log_thresh_choice
	cmp	w23, w24
	csel	w8, w23, w24, lt
	ldr	w9, [x19, #8]
Lloh15:
	adrp	x10, _USECS_IN_SECOND@GOTPAGE
Lloh16:
	ldr	x10, [x10, _USECS_IN_SECOND@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	mul	w9, w10, w9
	cmp	w8, w9
	csel	w8, w8, w9, lt
Lloh18:
	adrp	x9, _bbr_tlp_min@GOTPAGE
Lloh19:
	ldr	x9, [x9, _bbr_tlp_min@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	cmp	w8, w9
	csel	w0, w8, w9, gt
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_bbr_head,4,2                   ; @bbr_head
	.comm	_r_tnext,4,2                    ; @r_tnext
	.comm	_bbr_delayed_ack_time,4,2       ; @bbr_delayed_ack_time
	.comm	_BBR_INITIAL_RTO,4,2            ; @BBR_INITIAL_RTO
	.comm	_BBR_TO_FRM_TLP,4,2             ; @BBR_TO_FRM_TLP
	.comm	_USECS_IN_SECOND,4,2            ; @USECS_IN_SECOND
	.comm	_bbr_tlp_min,4,2                ; @bbr_tlp_min
	.no_dead_strip	_bbr_calc_thresh_tlp
.subsections_via_symbols
