	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ikcp_update_ack
_ikcp_update_ack:                       ## @ikcp_update_ack
	.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
	movl	%esi, %ebx
	movq	%rdi, %r14
	movl	(%rdi), %eax
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%ebx, %ecx
	subl	%eax, %ecx
	movl	%ecx, %edx
	negl	%edx
	cmovsl	%ecx, %edx
	movslq	4(%r14), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	leaq	(%rdx,%rcx), %rsi
	addq	$3, %rsi
	addq	%rdx, %rcx
	cmovnsq	%rcx, %rsi
	shrq	$2, %rsi
	movl	%esi, 4(%r14)
	leal	(,%rax,8), %ecx
	subl	%eax, %ecx
	addl	%ebx, %ecx
	movl	$1, %ebx
	cmpl	$8, %ecx
	jl	LBB0_4
## %bb.3:
	leal	7(%rcx), %ebx
	testl	%ecx, %ecx
	cmovnsl	%ecx, %ebx
	sarl	$3, %ebx
LBB0_4:
	movl	%ebx, (%r14)
	jmp	LBB0_5
LBB0_1:
	movl	%ebx, (%r14)
	movl	%ebx, %esi
	shrl	$31, %esi
	addl	%ebx, %esi
	sarl	%esi
	movl	%esi, 4(%r14)
LBB0_5:
	movl	16(%r14), %edi
	shll	$2, %esi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	__imax_
	addl	%eax, %ebx
	movl	8(%r14), %edi
	movq	_IKCP_RTO_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %esi
	callq	__ibound_
	movl	%eax, 12(%r14)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IKCP_RTO_MAX,4,2               ## @IKCP_RTO_MAX
	.no_dead_strip	_ikcp_update_ack
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ikcp_update_ack
_ikcp_update_ack:                       ; @ikcp_update_ack
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	w9, [x0]
	cbz	w9, LBB0_2
; %bb.1:
	subs	w8, w20, w9
	cneg	w8, w8, mi
	ldrsw	x10, [x19, #4]
	add	x10, x10, x10, lsl #1
	add	x8, x10, x8
	add	x10, x8, #3
	cmp	x8, #0
	csel	x8, x10, x8, lt
	lsr	x8, x8, #2
	lsl	w10, w9, #3
	sub	w9, w10, w9
	add	w9, w9, w20
	add	w10, w9, #7
	cmp	w9, #0
	csel	w10, w10, w9, lt
	asr	w10, w10, #3
	cmp	w9, #8
	csinc	w20, w10, wzr, ge
	b	LBB0_3
LBB0_2:
	cmp	w20, #0
	cinc	w8, w20, lt
	asr	w8, w8, #1
LBB0_3:
	stp	w20, w8, [x19]
	ldr	w0, [x19, #16]
	lsl	w1, w8, #2
	bl	__imax_
	add	w1, w0, w20
	ldr	w0, [x19, #8]
Lloh0:
	adrp	x8, _IKCP_RTO_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IKCP_RTO_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	bl	__ibound_
	str	w0, [x19, #12]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_IKCP_RTO_MAX,4,2               ; @IKCP_RTO_MAX
	.no_dead_strip	_ikcp_update_ack
.subsections_via_symbols
