	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BotChooseBestFightWeapon       ## -- Begin function BotChooseBestFightWeapon
	.p2align	4, 0x90
_BotChooseBestFightWeapon:              ## @BotChooseBestFightWeapon
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	callq	_BotWeaponStateFromHandle
	xorl	%r15d, %r15d
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movq	%rax, %r12
	movq	_weaponconfig@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	testq	%r13, %r13
	je	LBB0_10
## %bb.2:
	cmpl	$0, 8(%r12)
	je	LBB0_10
## %bb.3:
	cmpl	$0, (%r13)
	jle	LBB0_10
## %bb.4:
	xorl	%ebx, %ebx
	xorps	%xmm0, %xmm0
	movss	%xmm0, -44(%rbp)                ## 4-byte Spill
	xorl	%r15d, %r15d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	movslq	(%r13), %rax
	cmpq	%rax, %rbx
	jge	LBB0_10
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	cmpl	$0, (%rax,%rbx,4)
	je	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r12), %rax
	movl	(%rax,%rbx,4), %edx
	testl	%edx, %edx
	js	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	8(%r12), %esi
	movq	%r14, %rdi
	callq	_FuzzyWeight
	ucomiss	-44(%rbp), %xmm0                ## 4-byte Folded Reload
	jbe	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%ebx, %r15d
	movss	%xmm0, -44(%rbp)                ## 4-byte Spill
	jmp	LBB0_9
LBB0_10:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_weaponconfig,8,3               ## @weaponconfig
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BotChooseBestFightWeapon       ; -- Begin function BotChooseBestFightWeapon
	.p2align	2
_BotChooseBestFightWeapon:              ; @BotChooseBestFightWeapon
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-80]!             ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x1
	bl	_BotWeaponStateFromHandle
	cbz	x0, LBB0_10
; %bb.1:
Lloh0:
	adrp	x8, _weaponconfig@GOTPAGE
Lloh1:
	ldr	x8, [x8, _weaponconfig@GOTPAGEOFF]
Lloh2:
	ldr	x22, [x8]
	cbz	x22, LBB0_10
; %bb.2:
	mov	x20, x0
	ldr	w8, [x0, #8]
	cbz	w8, LBB0_10
; %bb.3:
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.4:
	mov	x23, #0
	mov	w21, #0
	movi	d8, #0000000000000000
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x22]
	cmp	x23, x8
	b.ge	LBB0_11
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #8]
	ldr	w8, [x8, x23, lsl #2]
	cbz	w8, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x20]
	ldr	w2, [x8, x23, lsl #2]
	tbnz	w2, #31, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w1, [x20, #8]
	mov	x0, x19
	bl	_FuzzyWeight
	fcmp	s0, s8
	b.le	LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x21, x23
	fmov	s8, s0
	b	LBB0_5
LBB0_10:
	mov	w21, #0
LBB0_11:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #80               ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_weaponconfig,8,3               ; @weaponconfig
.subsections_via_symbols
