	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BotLoadWeaponWeights           ## -- Begin function BotLoadWeaponWeights
	.p2align	4, 0x90
_BotLoadWeaponWeights:                  ## @BotLoadWeaponWeights
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	%edi, %ebx
	callq	_BotWeaponStateFromHandle
	movq	_BLERR_CANNOTLOADWEAPONWEIGHTS@GOTPCREL(%rip), %r12
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %r15
	movl	%ebx, %edi
	callq	_BotFreeWeaponWeights
	movq	%r14, %rdi
	callq	_ReadWeightConfig
	movl	%eax, (%r15)
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movq	_weaponconfig@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	testl	%esi, %esi
	je	LBB0_4
## %bb.5:
	movl	%eax, %edi
	callq	_WeaponWeightIndex
	movl	%eax, 4(%r15)
	movq	_BLERR_NOERROR@GOTPCREL(%rip), %r12
	jmp	LBB0_6
LBB0_2:
	movq	_botimport@GOTPCREL(%rip), %rax
	movq	_PRT_FATAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	callq	*(%rax)
	jmp	LBB0_6
LBB0_4:
	movq	_BLERR_CANNOTLOADWEAPONCONFIG@GOTPCREL(%rip), %r12
LBB0_6:
	movl	(%r12), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BLERR_CANNOTLOADWEAPONWEIGHTS,4,2 ## @BLERR_CANNOTLOADWEAPONWEIGHTS
	.comm	_botimport,8,3                  ## @botimport
	.comm	_PRT_FATAL,4,2                  ## @PRT_FATAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"couldn't load weapon config %s\n"

	.comm	_weaponconfig,4,2               ## @weaponconfig
	.comm	_BLERR_CANNOTLOADWEAPONCONFIG,4,2 ## @BLERR_CANNOTLOADWEAPONCONFIG
	.comm	_BLERR_NOERROR,4,2              ## @BLERR_NOERROR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BotLoadWeaponWeights           ; -- Begin function BotLoadWeaponWeights
	.p2align	2
_BotLoadWeaponWeights:                  ; @BotLoadWeaponWeights
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x21, x0
	bl	_BotWeaponStateFromHandle
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
	mov	x0, x21
	bl	_BotFreeWeaponWeights
	mov	x0, x19
	bl	_ReadWeightConfig
	str	w0, [x20]
	cbz	w0, LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _weaponconfig@GOTPAGE
Lloh1:
	ldr	x8, [x8, _weaponconfig@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	cbz	w1, LBB0_6
; %bb.3:
	bl	_WeaponWeightIndex
	str	w0, [x20, #4]
Lloh3:
	adrp	x8, _BLERR_NOERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BLERR_NOERROR@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:
Lloh5:
	adrp	x8, _botimport@GOTPAGE
Lloh6:
	ldr	x8, [x8, _botimport@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
Lloh8:
	adrp	x9, _PRT_FATAL@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PRT_FATAL@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x9]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	blr	x8
LBB0_5:
Lloh13:
	adrp	x8, _BLERR_CANNOTLOADWEAPONWEIGHTS@GOTPAGE
Lloh14:
	ldr	x8, [x8, _BLERR_CANNOTLOADWEAPONWEIGHTS@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh15:
	adrp	x8, _BLERR_CANNOTLOADWEAPONCONFIG@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BLERR_CANNOTLOADWEAPONCONFIG@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_BLERR_CANNOTLOADWEAPONWEIGHTS,4,2 ; @BLERR_CANNOTLOADWEAPONWEIGHTS
	.comm	_botimport,8,3                  ; @botimport
	.comm	_PRT_FATAL,4,2                  ; @PRT_FATAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"couldn't load weapon config %s\n"

	.comm	_weaponconfig,4,2               ; @weaponconfig
	.comm	_BLERR_CANNOTLOADWEAPONCONFIG,4,2 ; @BLERR_CANNOTLOADWEAPONCONFIG
	.comm	_BLERR_NOERROR,4,2              ; @BLERR_NOERROR
.subsections_via_symbols
