	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BotFreeWeaponState             ## -- Begin function BotFreeWeaponState
	.p2align	4, 0x90
_BotFreeWeaponState:                    ## @BotFreeWeaponState
	.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	%edi, %edx
	testl	%edi, %edi
	jle	LBB0_2
## %bb.1:
	movq	_MAX_CLIENTS@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jl	LBB0_2
## %bb.4:
	movq	_botweaponstates@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movl	%edx, %ebx
	cmpq	$0, (%rax,%rbx,8)
	je	LBB0_5
## %bb.6:
	movl	%edx, %edi
	callq	_BotFreeWeaponWeights
	movq	(%r14), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_FreeMemory
	movq	(%r14), %rax
	movq	$0, (%rax,%rbx,8)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	movq	_botimport@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_PRT_FATAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_3
LBB0_5:
	movq	_botimport@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_PRT_FATAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str.1(%rip), %rsi
LBB0_3:
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_CLIENTS,4,2                ## @MAX_CLIENTS
	.comm	_botimport,8,3                  ## @botimport
	.comm	_PRT_FATAL,4,2                  ## @PRT_FATAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"move state handle %d out of range\n"

	.comm	_botweaponstates,8,3            ## @botweaponstates
L_.str.1:                               ## @.str.1
	.asciz	"invalid move state %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BotFreeWeaponState             ; -- Begin function BotFreeWeaponState
	.p2align	2
_BotFreeWeaponState:                    ; @BotFreeWeaponState
	.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	x2, x0
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _MAX_CLIENTS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_CLIENTS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w2
	b.lt	LBB0_4
; %bb.2:
Lloh3:
	adrp	x19, _botweaponstates@GOTPAGE
Lloh4:
	ldr	x19, [x19, _botweaponstates@GOTPAGEOFF]
	ldr	x8, [x19]
	ldr	x8, [x8, w2, uxtw #3]
	cbz	x8, LBB0_5
; %bb.3:
	mov	w20, w2
	mov	x0, x2
	bl	_BotFreeWeaponWeights
	ldr	x8, [x19]
	lsl	x20, x20, #3
	ldr	x0, [x8, x20]
	bl	_FreeMemory
	ldr	x8, [x19]
	str	xzr, [x8, x20]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
Lloh5:
	adrp	x8, _botimport@GOTPAGE
Lloh6:
	ldr	x8, [x8, _botimport@GOTPAGEOFF]
Lloh7:
	ldr	x3, [x8]
Lloh8:
	adrp	x8, _PRT_FATAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PRT_FATAL@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_5:
Lloh13:
	adrp	x8, _botimport@GOTPAGE
Lloh14:
	ldr	x8, [x8, _botimport@GOTPAGEOFF]
Lloh15:
	ldr	x3, [x8]
Lloh16:
	adrp	x8, _PRT_FATAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PRT_FATAL@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	br	x3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_CLIENTS,4,2                ; @MAX_CLIENTS
	.comm	_botimport,8,3                  ; @botimport
	.comm	_PRT_FATAL,4,2                  ; @PRT_FATAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"move state handle %d out of range\n"

	.comm	_botweaponstates,8,3            ; @botweaponstates
l_.str.1:                               ; @.str.1
	.asciz	"invalid move state %d\n"

.subsections_via_symbols
