	.file	"extr_be_ai_goal.c_BotFreeGoalState.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"goal state handle %d out of range\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"invalid goal state handle %d\n"
	.text
	.p2align 4
	.globl	BotFreeGoalState
	.type	BotFreeGoalState, @function
BotFreeGoalState:
.LFB0:
	.cfi_startproc
	endbr64
	mov	edx, edi
	test	edi, edi
	jle	.L2
	cmp	DWORD PTR MAX_CLIENTS[rip], edi
	jl	.L2
	mov	rax, QWORD PTR botgoalstates[rip]
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movsx	rbx, edi
	cmp	QWORD PTR [rax+rbx*8], 0
	je	.L8
	call	BotFreeItemWeights@PLT
	mov	rax, QWORD PTR botgoalstates[rip]
	mov	rdi, QWORD PTR [rax+rbx*8]
	call	FreeMemory@PLT
	mov	rax, QWORD PTR botgoalstates[rip]
	mov	QWORD PTR [rax+rbx*8], 0
	pop	rbx
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore 3
	mov	edi, DWORD PTR PRT_FATAL[rip]
	lea	rsi, .LC0[rip]
	jmp	[QWORD PTR botimport[rip]]
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	edi, DWORD PTR PRT_FATAL[rip]
	lea	rsi, .LC1[rip]
	pop	rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 8
	jmp	[QWORD PTR botimport[rip]]
	.cfi_endproc
.LFE0:
	.size	BotFreeGoalState, .-BotFreeGoalState
	.comm	botimport,8,8
	.comm	botgoalstates,8,8
	.comm	PRT_FATAL,4,4
	.comm	MAX_CLIENTS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_be_ai_goal.c_BotFreeGoalState.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"goal state handle %d out of range\012\000"
	.align	2
.LC1:
	.ascii	"invalid goal state handle %d\012\000"
	.text
	.align	2
	.global	BotFreeGoalState
	.syntax unified
	.arm
	.fpu softvfp
	.type	BotFreeGoalState, %function
BotFreeGoalState:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	subs	r4, r0, #0
	ble	.L2
	ldr	r3, .L8
	ldr	r3, [r3]
	cmp	r3, r4
	blt	.L2
	ldr	r5, .L8+4
	ldr	r3, [r5]
	ldr	r3, [r3, r4, lsl #2]
	cmp	r3, #0
	beq	.L7
	bl	BotFreeItemWeights
	ldr	r3, [r5]
	ldr	r0, [r3, r4, lsl #2]
	bl	FreeMemory
	mov	r2, #0
	ldr	r3, [r5]
	str	r2, [r3, r4, lsl #2]
	pop	{r4, r5, r6, pc}
.L2:
	ldr	r1, .L8+8
	ldr	r3, .L8+12
	mov	r2, r4
	pop	{r4, r5, r6, lr}
	ldr	r0, [r1]
	ldr	r3, [r3]
	ldr	r1, .L8+16
	bx	r3
.L7:
	ldr	r1, .L8+8
	ldr	r3, .L8+12
	mov	r2, r4
	pop	{r4, r5, r6, lr}
	ldr	r0, [r1]
	ldr	r3, [r3]
	ldr	r1, .L8+20
	bx	r3
.L9:
	.align	2
.L8:
	.word	MAX_CLIENTS
	.word	botgoalstates
	.word	PRT_FATAL
	.word	botimport
	.word	.LC0
	.word	.LC1
	.size	BotFreeGoalState, .-BotFreeGoalState
	.comm	botimport,4,4
	.comm	botgoalstates,4,4
	.comm	PRT_FATAL,4,4
	.comm	MAX_CLIENTS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
