	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function BotNearestVisibleItem
LCPI0_0:
	.long	0x497423f0                      ## float 999999
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3
LCPI0_1:
	.quad	0x3ff0000000000000              ## double 1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_BotNearestVisibleItem
	.p2align	4, 0x90
_BotNearestVisibleItem:                 ## @BotNearestVisibleItem
	.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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -144(%rbp)                ## 8-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	$-1, %r14d
	movss	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -116(%rbp)               ## 4-byte Spill
	leaq	-128(%rbp), %r12
	leaq	-112(%rbp), %r13
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	testl	%r14d, %r14d
	jle	LBB0_6
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %edi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_trap_BotGetLevelItemGoal
	movl	%eax, %r14d
	movl	-124(%rbp), %edi
	movq	%r13, %rsi
	movl	$64, %edx
	callq	_trap_BotGoalName
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_Q_stricmp
	testq	%rax, %rax
	jne	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	-128(%rbp), %edi
	movl	8(%r15), %esi
	callq	_VectorSubtract
	callq	_VectorLength
	movaps	%xmm0, %xmm1
	movss	-116(%rbp), %xmm0               ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	ucomiss	%xmm1, %xmm0
	jbe	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movss	%xmm1, -132(%rbp)               ## 4-byte Spill
	movl	(%r15), %r9d
	movl	4(%r15), %esi
	movl	-128(%rbp), %r8d
	movq	_CONTENTS_PLAYERCLIP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_CONTENTS_SOLID@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%rsp)
	leaq	-152(%rbp), %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_BotAI_Trace
	movsd	-152(%rbp), %xmm0               ## xmm0 = mem[0],zero
	ucomisd	LCPI0_1(%rip), %xmm0
	jb	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-144(%rbp), %rdi                ## 8-byte Reload
	movq	%r12, %rsi
	movl	$8, %edx
	callq	_memcpy
	movss	-132(%rbp), %xmm0               ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -116(%rbp)               ## 4-byte Spill
	jmp	LBB0_5
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	movss	-116(%rbp), %xmm0               ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_CONTENTS_SOLID,4,2             ## @CONTENTS_SOLID
	.comm	_CONTENTS_PLAYERCLIP,4,2        ## @CONTENTS_PLAYERCLIP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BotNearestVisibleItem          ; -- Begin function BotNearestVisibleItem
	.p2align	2
_BotNearestVisibleItem:                 ; @BotNearestVisibleItem
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	d11, d10, [sp, #96]             ; 16-byte Folded Spill
	stp	d9, d8, [sp, #112]              ; 16-byte Folded Spill
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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 b8, -72
	.cfi_offset b9, -80
	.cfi_offset b10, -88
	.cfi_offset b11, -96
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #88]
	mov	w22, #-1
	mov	w8, #9200
	movk	w8, #18804, lsl #16
	fmov	s8, w8
Lloh3:
	adrp	x23, _CONTENTS_SOLID@GOTPAGE
Lloh4:
	ldr	x23, [x23, _CONTENTS_SOLID@GOTPAGEOFF]
Lloh5:
	adrp	x24, _CONTENTS_PLAYERCLIP@GOTPAGE
Lloh6:
	ldr	x24, [x24, _CONTENTS_PLAYERCLIP@GOTPAGEOFF]
	fmov	d10, #1.00000000
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	cmp	w22, #0
	b.le	LBB0_6
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x2, sp, #16
	mov	x0, x22
	mov	x1, x20
	bl	_trap_BotGetLevelItemGoal
	mov	x22, x0
	ldr	w0, [sp, #20]
	add	x1, sp, #24
	mov	w2, #64
	bl	_trap_BotGoalName
	add	x1, sp, #24
	mov	x0, x20
	bl	_Q_stricmp
	cbnz	x0, LBB0_1
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [sp, #16]
	ldr	w1, [x21, #8]
	bl	_VectorSubtract
	bl	_VectorLength
	fcmp	s0, s8
	b.pl	LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	fmov	s9, s0
	ldr	w4, [sp, #16]
	ldp	w5, w1, [x21]
	ldr	w8, [x23]
	ldr	w9, [x24]
	orr	w6, w9, w8
	add	x0, sp, #8
	mov	x2, #0
	mov	x3, #0
	bl	_BotAI_Trace
	ldr	d0, [sp, #8]
	fcmp	d0, d10
	b.lt	LBB0_1
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x1, sp, #16
	mov	x0, x19
	mov	w2, #8
	bl	_memcpy
	fmov	s8, s9
	b	LBB0_1
LBB0_6:
	ldr	x8, [sp, #88]
Lloh7:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh8:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	fmov	s0, s8
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #112]              ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_CONTENTS_SOLID,4,2             ; @CONTENTS_SOLID
	.comm	_CONTENTS_PLAYERCLIP,4,2        ; @CONTENTS_PLAYERCLIP
.subsections_via_symbols
