	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BotResetLastAvoidReach         ## -- Begin function BotResetLastAvoidReach
	.p2align	4, 0x90
_BotResetLastAvoidReach:                ## @BotResetLastAvoidReach
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	callq	_BotMoveStateFromHandle
	testq	%rax, %rax
	je	LBB0_11
## %bb.1:
	movq	_MAX_AVOIDREACH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	testl	%r8d, %r8d
	jle	LBB0_11
## %bb.2:
	movq	(%rax), %r10
	leaq	-1(%r8), %rcx
	movl	%r8d, %r11d
	andl	$3, %r11d
	cmpq	$3, %rcx
	jae	LBB0_4
## %bb.3:
	xorl	%edi, %edi
	xorps	%xmm0, %xmm0
	xorl	%ecx, %ecx
	jmp	LBB0_6
LBB0_4:
	movl	%r8d, %r9d
	andl	$-4, %r9d
	xorl	%edi, %edi
	xorps	%xmm0, %xmm0
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movss	(%r10,%rdi,4), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm0, %xmm1
	cmoval	%edi, %ecx
	movss	4(%r10,%rdi,4), %xmm2           ## xmm2 = mem[0],zero,zero,zero
	maxss	%xmm0, %xmm1
	ucomiss	%xmm1, %xmm2
	leal	1(%rdi), %edx
	cmovbel	%ecx, %edx
	maxss	%xmm1, %xmm2
	movss	8(%r10,%rdi,4), %xmm1           ## xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm2, %xmm1
	leal	2(%rdi), %esi
	cmovbel	%edx, %esi
	maxss	%xmm2, %xmm1
	movss	12(%r10,%rdi,4), %xmm0          ## xmm0 = mem[0],zero,zero,zero
	ucomiss	%xmm1, %xmm0
	leal	3(%rdi), %ecx
	cmovbel	%esi, %ecx
	maxss	%xmm1, %xmm0
	addq	$4, %rdi
	cmpq	%r9, %rdi
	jne	LBB0_5
LBB0_6:
	movaps	%xmm0, %xmm1
	testq	%r11, %r11
	je	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movss	(%r10,%rdi,4), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm0, %xmm1
	cmoval	%edi, %ecx
	maxss	%xmm0, %xmm1
	incq	%rdi
	movaps	%xmm1, %xmm0
	decq	%r11
	jne	LBB0_7
LBB0_8:
	xorps	%xmm0, %xmm0
	ucomiss	%xmm0, %xmm1
	jne	LBB0_9
	jnp	LBB0_11
LBB0_9:
	movslq	%ecx, %rcx
	movq	(%rax), %rdx
	movl	$0, (%rdx,%rcx,4)
	movq	8(%rax), %rax
	cmpq	$0, (%rax,%r8,8)
	jle	LBB0_11
## %bb.10:
	decq	(%rax,%rcx,8)
LBB0_11:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_AVOIDREACH,4,2             ## @MAX_AVOIDREACH
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BotResetLastAvoidReach         ; -- Begin function BotResetLastAvoidReach
	.p2align	2
_BotResetLastAvoidReach:                ; @BotResetLastAvoidReach
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	bl	_BotMoveStateFromHandle
	cbz	x0, LBB0_7
; %bb.1:
Lloh0:
	adrp	x8, _MAX_AVOIDREACH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_AVOIDREACH@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.2:
	mov	x10, #0
	mov	w9, #0
	ldr	x11, [x0]
	movi	d0, #0000000000000000
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	s1, [x11, x10, lsl #2]
	fcmp	s1, s0
	csel	w9, w10, w9, gt
	fcsel	s0, s1, s0, gt
	add	x10, x10, #1
	cmp	x8, x10
	b.ne	LBB0_3
; %bb.4:
	fcmp	s0, #0.0
	b.eq	LBB0_7
; %bb.5:
	sxtw	x9, w9
	ldp	x11, x10, [x0]
	str	wzr, [x11, x9, lsl #2]
	ldr	x8, [x10, x8, lsl #3]
	cmp	x8, #1
	b.lt	LBB0_7
; %bb.6:
	lsl	x8, x9, #3
	ldr	x9, [x10, x8]
	sub	x9, x9, #1
	str	x9, [x10, x8]
LBB0_7:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_AVOIDREACH,4,2             ; @MAX_AVOIDREACH
.subsections_via_symbols
