	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ax25_calculate_rtt             ## -- Begin function ax25_calculate_rtt
	.p2align	4, 0x90
_ax25_calculate_rtt:                    ## @ax25_calculate_rtt
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	cmpq	$0, (%rdi)
	je	LBB0_8
## %bb.1:
	movq	%rdi, %rbx
	callq	_ax25_t1timer_running
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	cmpq	$0, 8(%rbx)
	jne	LBB0_4
## %bb.3:
	movl	16(%rbx), %eax
	leal	(%rax,%rax,8), %r14d
	addl	20(%rbx), %r14d
	leaq	24(%rbx), %rdi
	callq	_ax25_display_timer
	subl	%eax, %r14d
	movslq	%r14d, %rax
	imulq	$1717986919, %rax, %rax         ## imm = 0x66666667
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$34, %rax
	addl	%ecx, %eax
	movl	%eax, 16(%rbx)
LBB0_4:
	movl	16(%rbx), %eax
	movq	_AX25_T1CLAMPLO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %eax
	jge	LBB0_6
## %bb.5:
	movl	%ecx, 16(%rbx)
	movl	%ecx, %eax
LBB0_6:
	movq	_AX25_T1CLAMPHI@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %eax
	jle	LBB0_8
## %bb.7:
	movl	%ecx, 16(%rbx)
LBB0_8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AX25_T1CLAMPLO,4,2             ## @AX25_T1CLAMPLO
	.comm	_AX25_T1CLAMPHI,4,2             ## @AX25_T1CLAMPHI
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ax25_calculate_rtt             ; -- Begin function ax25_calculate_rtt
	.p2align	2
_ax25_calculate_rtt:                    ; @ax25_calculate_rtt
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0]
	cbz	x8, LBB0_8
; %bb.1:
	mov	x19, x0
	bl	_ax25_t1timer_running
	cbz	x0, LBB0_4
; %bb.2:
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_4
; %bb.3:
	ldp	w8, w9, [x19, #16]
	add	w8, w8, w8, lsl #3
	add	w20, w8, w9
	add	x0, x19, #24
	bl	_ax25_display_timer
	sub	w8, w20, w0
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #34
	add	w8, w8, w9
	str	w8, [x19, #16]
LBB0_4:
	ldr	w8, [x19, #16]
Lloh0:
	adrp	x9, _AX25_T1CLAMPLO@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AX25_T1CLAMPLO@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_6
; %bb.5:
	str	w9, [x19, #16]
	mov	x8, x9
LBB0_6:
Lloh3:
	adrp	x9, _AX25_T1CLAMPHI@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AX25_T1CLAMPHI@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.le	LBB0_8
; %bb.7:
	str	w9, [x19, #16]
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_AX25_T1CLAMPLO,4,2             ; @AX25_T1CLAMPLO
	.comm	_AX25_T1CLAMPHI,4,2             ; @AX25_T1CLAMPHI
.subsections_via_symbols
