	.file	"extr_be_ai_weap.c_BotLoadWeaponWeights.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"couldn't load weapon config %s\n"
	.text
	.p2align 4
	.globl	BotLoadWeaponWeights
	.type	BotLoadWeaponWeights, @function
BotLoadWeaponWeights:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	ebp, edi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	BotWeaponStateFromHandle@PLT
	test	rax, rax
	je	.L7
	mov	edi, ebp
	mov	rbx, rax
	call	BotFreeWeaponWeights@PLT
	mov	rdi, r12
	call	ReadWeightConfig@PLT
	mov	DWORD PTR [rbx], eax
	test	eax, eax
	je	.L9
	mov	esi, DWORD PTR weaponconfig[rip]
	test	esi, esi
	jne	.L5
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, DWORD PTR BLERR_CANNOTLOADWEAPONCONFIG[rip]
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	edi, DWORD PTR PRT_FATAL[rip]
	mov	rdx, r12
	lea	rsi, .LC0[rip]
	call	[QWORD PTR botimport[rip]]
.L7:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, DWORD PTR BLERR_CANNOTLOADWEAPONWEIGHTS[rip]
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	edi, eax
	call	WeaponWeightIndex@PLT
	mov	DWORD PTR 4[rbx], eax
	mov	eax, DWORD PTR BLERR_NOERROR[rip]
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	BotLoadWeaponWeights, .-BotLoadWeaponWeights
	.comm	weaponconfig,4,4
	.comm	botimport,8,8
	.comm	PRT_FATAL,4,4
	.comm	BLERR_NOERROR,4,4
	.comm	BLERR_CANNOTLOADWEAPONWEIGHTS,4,4
	.comm	BLERR_CANNOTLOADWEAPONCONFIG,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_weap.c_BotLoadWeaponWeights.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"couldn't load weapon config %s\012\000"
	.text
	.align	2
	.global	BotLoadWeaponWeights
	.syntax unified
	.arm
	.fpu softvfp
	.type	BotLoadWeaponWeights, %function
BotLoadWeaponWeights:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r6, r1
	mov	r5, r0
	bl	BotWeaponStateFromHandle
	subs	r4, r0, #0
	beq	.L7
	mov	r0, r5
	bl	BotFreeWeaponWeights
	mov	r0, r6
	bl	ReadWeightConfig
	cmp	r0, #0
	str	r0, [r4]
	beq	.L9
	ldr	r3, .L10
	ldr	r1, [r3]
	cmp	r1, #0
	bne	.L5
	ldr	r3, .L10+4
	ldr	r0, [r3]
	pop	{r4, r5, r6, pc}
.L9:
	ldr	r1, .L10+8
	ldr	r3, .L10+12
	ldr	r0, [r1]
	mov	r2, r6
	ldr	r3, [r3]
	ldr	r1, .L10+16
	blx	r3
.L7:
	ldr	r3, .L10+20
	ldr	r0, [r3]
	pop	{r4, r5, r6, pc}
.L5:
	bl	WeaponWeightIndex
	ldr	r3, .L10+24
	str	r0, [r4, #4]
	ldr	r0, [r3]
	pop	{r4, r5, r6, pc}
.L11:
	.align	2
.L10:
	.word	weaponconfig
	.word	BLERR_CANNOTLOADWEAPONCONFIG
	.word	PRT_FATAL
	.word	botimport
	.word	.LC0
	.word	BLERR_CANNOTLOADWEAPONWEIGHTS
	.word	BLERR_NOERROR
	.size	BotLoadWeaponWeights, .-BotLoadWeaponWeights
	.comm	weaponconfig,4,4
	.comm	botimport,4,4
	.comm	PRT_FATAL,4,4
	.comm	BLERR_NOERROR,4,4
	.comm	BLERR_CANNOTLOADWEAPONWEIGHTS,4,4
	.comm	BLERR_CANNOTLOADWEAPONCONFIG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
