	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sctp_calculate_rto             ## -- Begin function sctp_calculate_rto
	.p2align	4, 0x90
_sctp_calculate_rto:                    ## @sctp_calculate_rto
	.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
	movl	%r8d, %r15d
	movq	%rcx, %rbx
	movq	%rdx, %r12
	movq	%rsi, %r13
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	cmpq	$0, 16(%rdi)
	je	LBB0_2
## %bb.1:
	leaq	-56(%rbp), %rdi
	callq	_SCTP_GETPTIME_TIMEVAL
	jmp	LBB0_3
LBB0_2:
	leaq	-56(%rbp), %rdi
	callq	_SCTP_GETTIME_TIMEVAL
LBB0_3:
	movq	(%rbx), %rax
	xorl	%r14d, %r14d
	cmpq	-56(%rbp), %rax
	jg	LBB0_29
## %bb.4:
	leaq	-56(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_timevalsub
	imull	$1000000, -56(%rbp), %eax       ## imm = 0xF4240
	addl	-48(%rbp), %eax
	movq	_SCTP_RTO_UPPER_BOUND@GOTPCREL(%rip), %rcx
	imull	$1000, (%rcx), %ecx             ## imm = 0x3E8
	cmpl	%ecx, %eax
	jg	LBB0_29
## %bb.5:
	movl	%eax, (%r12)
	cltq
	imulq	$274877907, %rax, %r14          ## imm = 0x10624DD3
	movq	%r14, %rdx
	shrq	$63, %rdx
	movq	%r14, %rbx
	sarq	$38, %rbx
	movq	(%r13), %rcx
	movq	_SCTP_RTT_FROM_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testq	%rcx, %rcx
	je	LBB0_8
## %bb.6:
	cmpl	%r15d, %eax
	jne	LBB0_8
## %bb.7:
	movq	%rdx, %r13
	leaq	-56(%rbp), %rdx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	*%rcx
	movq	%r13, %rdx
	movq	_SCTP_RTT_FROM_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_8:
	cmpl	%r15d, %eax
	jne	LBB0_14
## %bb.9:
	movq	8(%r12), %rax
	movq	_SCTP_LAN_UNKNOWN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.10:
	movl	(%r12), %eax
	movq	_SCTP_LOCAL_LAN_RTT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jle	LBB0_11
## %bb.12:
	movq	_SCTP_LAN_INTERNET@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_11:
	movq	_SCTP_LAN_LOCAL@GOTPCREL(%rip), %rax
LBB0_13:
	movq	(%rax), %rax
	movq	%rax, 8(%r12)
LBB0_14:
	addl	%edx, %ebx
	movl	16(%r12), %r15d
	testl	%r15d, %r15d
	je	LBB0_17
## %bb.15:
	movq	_SCTP_RTT_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	20(%r12), %eax
	movl	24(%r12), %edx
	movl	%eax, %esi
	sarl	%cl, %esi
	subl	%esi, %ebx
	addl	%ebx, %eax
	movl	%eax, 20(%r12)
	movl	%ebx, %eax
	negl	%eax
	cmovsl	%ebx, %eax
	movq	_SCTP_RTT_VAR_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	addl	%edx, %eax
	sarl	%cl, %edx
	subl	%edx, %eax
	movl	%eax, 24(%r12)
	movq	_sctp_logging_level@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SCTP_BASE_SYSCTL
	movq	_SCTP_RTTVAR_LOGGING_ENABLE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_20
## %bb.16:
	movq	_SCTP_LOG_RTTVAR@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_17:
	movl	$1, 16(%r12)
	movq	_SCTP_RTT_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	movl	%ebx, 20(%r12)
	sarq	$39, %r14
	addl	%edx, %r14d
	movq	_SCTP_RTT_VAR_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r14d
	movl	%r14d, 24(%r12)
	movq	_sctp_logging_level@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SCTP_BASE_SYSCTL
	movq	_SCTP_RTTVAR_LOGGING_ENABLE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_20
## %bb.18:
	movq	_SCTP_LOG_INITIAL_RTT@GOTPCREL(%rip), %rax
LBB0_19:
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_rto_logging
LBB0_20:
	movl	24(%r12), %edx
	testl	%edx, %edx
	jne	LBB0_22
## %bb.21:
	movq	_SCTP_CLOCK_GRANULARITY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%edx, 24(%r12)
LBB0_22:
	movl	20(%r12), %eax
	movq	_SCTP_RTT_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	addl	%edx, %eax
	movq	_SCTP_SAT_NETWORK_MIN@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	jle	LBB0_25
## %bb.23:
	cmpl	$0, (%rdx)
	je	LBB0_24
LBB0_25:
	testl	%r15d, %r15d
	je	LBB0_28
## %bb.26:
	cmpl	$0, 4(%rdx)
	je	LBB0_28
## %bb.27:
	movq	$1, (%rdx)
	jmp	LBB0_28
LBB0_24:
	movl	$1, 4(%rdx)
LBB0_28:
	movl	8(%rdx), %ecx
	movl	12(%rdx), %edx
	cmpl	%ecx, %eax
	cmovgl	%eax, %ecx
	cmpl	%edx, %ecx
	cmovgel	%edx, %ecx
	movl	%ecx, 28(%r12)
	movl	$1, %r14d
LBB0_29:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SCTP_RTO_UPPER_BOUND,4,2       ## @SCTP_RTO_UPPER_BOUND
	.comm	_SCTP_RTT_FROM_DATA,4,2         ## @SCTP_RTT_FROM_DATA
	.comm	_SCTP_LAN_UNKNOWN,8,3           ## @SCTP_LAN_UNKNOWN
	.comm	_SCTP_LOCAL_LAN_RTT,4,2         ## @SCTP_LOCAL_LAN_RTT
	.comm	_SCTP_LAN_INTERNET,8,3          ## @SCTP_LAN_INTERNET
	.comm	_SCTP_LAN_LOCAL,8,3             ## @SCTP_LAN_LOCAL
	.comm	_SCTP_RTT_SHIFT,4,2             ## @SCTP_RTT_SHIFT
	.comm	_SCTP_RTT_VAR_SHIFT,4,2         ## @SCTP_RTT_VAR_SHIFT
	.comm	_sctp_logging_level,4,2         ## @sctp_logging_level
	.comm	_SCTP_RTTVAR_LOGGING_ENABLE,4,2 ## @SCTP_RTTVAR_LOGGING_ENABLE
	.comm	_SCTP_LOG_RTTVAR,4,2            ## @SCTP_LOG_RTTVAR
	.comm	_SCTP_LOG_INITIAL_RTT,4,2       ## @SCTP_LOG_INITIAL_RTT
	.comm	_SCTP_CLOCK_GRANULARITY,4,2     ## @SCTP_CLOCK_GRANULARITY
	.comm	_SCTP_SAT_NETWORK_MIN,4,2       ## @SCTP_SAT_NETWORK_MIN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function sctp_calculate_rto
lCPI0_0:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_sctp_calculate_rto
	.p2align	2
_sctp_calculate_rto:                    ; @sctp_calculate_rto
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x21, x4
	mov	x23, x3
	mov	x19, x2
	mov	x22, x1
	mov	x20, x0
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, sp
	bl	_SCTP_GETPTIME_TIMEVAL
	b	LBB0_3
LBB0_2:
	mov	x0, sp
	bl	_SCTP_GETTIME_TIMEVAL
LBB0_3:
	ldr	x8, [x23]
	ldr	x9, [sp]
	cmp	x8, x9
	b.gt	LBB0_5
; %bb.4:
	mov	x0, sp
	mov	x1, x23
	bl	_timevalsub
	mov	w8, #16960
	movk	w8, #15, lsl #16
	ldr	w9, [sp]
	ldr	w10, [sp, #8]
	madd	w23, w9, w8, w10
Lloh0:
	adrp	x8, _SCTP_RTO_UPPER_BOUND@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SCTP_RTO_UPPER_BOUND@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mov	w9, #1000
	mul	w8, w8, w9
	cmp	w23, w8
	b.le	LBB0_6
LBB0_5:
	mov	w0, #0
	b	LBB0_27
LBB0_6:
	str	w23, [x19]
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	smull	x8, w23, w8
	lsr	x24, x8, #63
	asr	x25, x8, #38
	ldr	x9, [x22]
Lloh3:
	adrp	x22, _SCTP_RTT_FROM_DATA@GOTPAGE
Lloh4:
	ldr	x22, [x22, _SCTP_RTT_FROM_DATA@GOTPAGEOFF]
	ldr	w8, [x22]
	cbz	x9, LBB0_9
; %bb.7:
	cmp	w8, w21
	b.ne	LBB0_9
; %bb.8:
	mov	x2, sp
	mov	x0, x20
	mov	x1, x19
	blr	x9
	ldr	w8, [x22]
LBB0_9:
	cmp	w8, w21
	b.ne	LBB0_12
; %bb.10:
	ldr	x8, [x19, #8]
Lloh5:
	adrp	x9, _SCTP_LAN_UNKNOWN@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SCTP_LAN_UNKNOWN@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.11:
	ldr	w8, [x19]
Lloh8:
	adrp	x9, _SCTP_LOCAL_LAN_RTT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SCTP_LOCAL_LAN_RTT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	adrp	x10, _SCTP_LAN_INTERNET@GOTPAGE
Lloh12:
	ldr	x10, [x10, _SCTP_LAN_INTERNET@GOTPAGEOFF]
Lloh13:
	adrp	x11, _SCTP_LAN_LOCAL@GOTPAGE
Lloh14:
	ldr	x11, [x11, _SCTP_LAN_LOCAL@GOTPAGEOFF]
	cmp	w8, w9
	csel	x8, x10, x11, gt
	ldr	x8, [x8]
	str	x8, [x19, #8]
LBB0_12:
	add	w8, w25, w24
	ldr	w21, [x19, #16]
Lloh15:
	adrp	x22, _SCTP_RTT_SHIFT@GOTPAGE
Lloh16:
	ldr	x22, [x22, _SCTP_RTT_SHIFT@GOTPAGEOFF]
	cbz	w21, LBB0_15
; %bb.13:
	ldr	w9, [x22]
	ldp	w10, w11, [x19, #20]
	asr	w9, w10, w9
	subs	w8, w8, w9
	add	w9, w8, w10
	cneg	w8, w8, mi
Lloh17:
	adrp	x10, _SCTP_RTT_VAR_SHIFT@GOTPAGE
Lloh18:
	ldr	x10, [x10, _SCTP_RTT_VAR_SHIFT@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
	asr	w10, w11, w10
	add	w8, w8, w11
	sub	w8, w8, w10
	stp	w9, w8, [x19, #20]
Lloh20:
	adrp	x8, _sctp_logging_level@GOTPAGE
Lloh21:
	ldr	x8, [x8, _sctp_logging_level@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	bl	_SCTP_BASE_SYSCTL
Lloh23:
	adrp	x8, _SCTP_RTTVAR_LOGGING_ENABLE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SCTP_RTTVAR_LOGGING_ENABLE@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_18
; %bb.14:
Lloh26:
	adrp	x8, _SCTP_LOG_RTTVAR@GOTPAGE
Lloh27:
	ldr	x8, [x8, _SCTP_LOG_RTTVAR@GOTPAGEOFF]
	b	LBB0_17
LBB0_15:
	ldr	w9, [x22]
	lsl	w8, w8, w9
	mov	w9, #1
	stp	w9, w8, [x19, #16]
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	smull	x8, w23, w8
	lsr	x9, x8, #63
	asr	x8, x8, #39
	add	w8, w8, w9
Lloh28:
	adrp	x9, _SCTP_RTT_VAR_SHIFT@GOTPAGE
Lloh29:
	ldr	x9, [x9, _SCTP_RTT_VAR_SHIFT@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	str	w8, [x19, #24]
Lloh31:
	adrp	x8, _sctp_logging_level@GOTPAGE
Lloh32:
	ldr	x8, [x8, _sctp_logging_level@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	bl	_SCTP_BASE_SYSCTL
Lloh34:
	adrp	x8, _SCTP_RTTVAR_LOGGING_ENABLE@GOTPAGE
Lloh35:
	ldr	x8, [x8, _SCTP_RTTVAR_LOGGING_ENABLE@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_18
; %bb.16:
Lloh37:
	adrp	x8, _SCTP_LOG_INITIAL_RTT@GOTPAGE
Lloh38:
	ldr	x8, [x8, _SCTP_LOG_INITIAL_RTT@GOTPAGEOFF]
LBB0_17:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rto_logging
LBB0_18:
	ldr	w8, [x19, #24]
	cbnz	w8, LBB0_20
; %bb.19:
Lloh39:
	adrp	x8, _SCTP_CLOCK_GRANULARITY@GOTPAGE
Lloh40:
	ldr	x8, [x8, _SCTP_CLOCK_GRANULARITY@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	str	w8, [x19, #24]
LBB0_20:
	ldr	w9, [x19, #20]
	ldr	w10, [x22]
	asr	w9, w9, w10
Lloh42:
	adrp	x10, _SCTP_SAT_NETWORK_MIN@GOTPAGE
Lloh43:
	ldr	x10, [x10, _SCTP_SAT_NETWORK_MIN@GOTPAGEOFF]
Lloh44:
	ldr	w10, [x10]
	add	w8, w9, w8
	cmp	w8, w10
	b.le	LBB0_22
; %bb.21:
	ldr	w9, [x20]
	cbz	w9, LBB0_25
LBB0_22:
	cbz	w21, LBB0_26
; %bb.23:
	ldr	w9, [x20, #4]
	cbz	w9, LBB0_26
; %bb.24:
Lloh45:
	adrp	x9, lCPI0_0@PAGE
Lloh46:
	ldr	d0, [x9, lCPI0_0@PAGEOFF]
	str	d0, [x20]
	b	LBB0_26
LBB0_25:
	mov	w9, #1
	str	w9, [x20, #4]
LBB0_26:
	ldp	w9, w10, [x20, #8]
	cmp	w8, w9
	csel	w8, w8, w9, gt
	cmp	w8, w10
	csel	w8, w8, w10, lt
	str	w8, [x19, #28]
	mov	w0, #1
LBB0_27:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdr	Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.comm	_SCTP_RTO_UPPER_BOUND,4,2       ; @SCTP_RTO_UPPER_BOUND
	.comm	_SCTP_RTT_FROM_DATA,4,2         ; @SCTP_RTT_FROM_DATA
	.comm	_SCTP_LAN_UNKNOWN,8,3           ; @SCTP_LAN_UNKNOWN
	.comm	_SCTP_LOCAL_LAN_RTT,4,2         ; @SCTP_LOCAL_LAN_RTT
	.comm	_SCTP_LAN_INTERNET,8,3          ; @SCTP_LAN_INTERNET
	.comm	_SCTP_LAN_LOCAL,8,3             ; @SCTP_LAN_LOCAL
	.comm	_SCTP_RTT_SHIFT,4,2             ; @SCTP_RTT_SHIFT
	.comm	_SCTP_RTT_VAR_SHIFT,4,2         ; @SCTP_RTT_VAR_SHIFT
	.comm	_sctp_logging_level,4,2         ; @sctp_logging_level
	.comm	_SCTP_RTTVAR_LOGGING_ENABLE,4,2 ; @SCTP_RTTVAR_LOGGING_ENABLE
	.comm	_SCTP_LOG_RTTVAR,4,2            ; @SCTP_LOG_RTTVAR
	.comm	_SCTP_LOG_INITIAL_RTT,4,2       ; @SCTP_LOG_INITIAL_RTT
	.comm	_SCTP_CLOCK_GRANULARITY,4,2     ; @SCTP_CLOCK_GRANULARITY
	.comm	_SCTP_SAT_NETWORK_MIN,4,2       ; @SCTP_SAT_NETWORK_MIN
.subsections_via_symbols
