;Imports of g_utils_mp:
	extern _Z8MT_Allocii
	extern _Z13Scr_SetStringPtj
	extern _Z13SV_DObjExistsP9gentity_s
	extern _Z19SV_DObjGetBoneIndexPK9gentity_sj
	extern level
	extern _Z22SL_FindLowercaseStringPKc
	extern scr_const
	extern _Z23SV_GetConfigstringConsti
	extern _Z18SetClientViewAngleP9gentity_sPKf
	extern _Z7MT_FreePvi
	extern _Z17G_VehUnlinkPlayerP9gentity_sS0_
	extern _Z9XModelBadPK6XModel
	extern _Z22Com_SafeServerDObjFreei
	extern _Z20Com_ServerDObjCreateP11DObjModel_stP11XAnimTree_si
	extern _Z19DObjSetHidePartBitsP6DObj_sPKj
	extern _Z15SV_UnlinkEntityP9gentity_s
	extern _Z14SV_DObjGetTreeP9gentity_s
	extern _Z14XAnimClearTreeP11XAnimTree_s
	extern _Z12G_FreeTurretP9gentity_s
	extern _Z15G_VehFreeEntityP9gentity_s
	extern _Z19EntHandleDissociateP9gentity_s
	extern _ZN9EntHandle6setEntEP9gentity_s
	extern _Z14Scr_FreeEntityP9gentity_s
	extern memset
	extern _Z17PlayerCorpse_FreeP9gentity_s
	extern _Z31CCS_IsConfigStringIndexConstanti
	extern _Z29CCS_GetConstConfigStringIndexPKc
	extern _Z35CCS_GetConfigStringNumForConstIndexi
	extern _Z12SV_XModelGetPKc
	extern _Z18SV_SetConfigstringiPKc
	extern _Z2vaPKcz
	extern _Z9Scr_ErrorPKc
	extern _Z9Com_Error11errorParm_tPKcz
	extern _Z16Com_PrintWarningiPKcz
	extern _Z13SV_LinkEntityP9gentity_s
	extern _Z12AnglesToAxisPKfPA3_f
	extern _Z15MatrixTransposePA3_KfPA3_f
	extern _Z14MatrixMultiplyPA3_KfS1_PA3_f
	extern _Z25MatrixInverseOrthogonal43PA3_KfPA3_f
	extern _Z16MatrixMultiply43PA3_KfS1_PA3_f
	extern g_entities
	extern _Z17Com_GetServerDObji
	extern _Z24SV_DObjCreateSkelForBoneP6DObj_si
	extern _Z20DObjGetHierarchyBitsPK6DObj_siPi
	extern entityHandlers
	extern _Z12DObjCalcSkelPK6DObj_sPi
	extern _Z25SV_DObjCreateSkelForBonesP6DObj_sPi
	extern _Z12AxisToAnglesPA3_KfPf
	extern _Z8vectoyawPKf
	extern _Z23MatrixTransformVector43PKfPA3_S_Pf
	extern strcpy
	extern _Z8I_strlwrPc
	extern _Z18SL_ConvertToStringj
	extern useFastFile
	extern _Z15DB_ReplaceModelPKcS0_
	extern Hunk_OverrideDataForFile
	extern _Z10Com_PrintfiPKcz
	extern _Z25Missile_FreeAttractorRefsP9gentity_s
	extern _Z9AxisClearPA3_f
	extern _Z21XModelGetStaticBoundsPK6XModelPA3_fPfS4_
	extern _Z12SL_GetStringPKcj
	extern g_scr_data
	extern _Z17Scr_ExecEntThreadP9gentity_sij
	extern _Z14Scr_FreeThreadt
	extern _Z21SV_DObjGetMatrixArrayPK9gentity_s
	extern _Z35BG_AddPredictableEventToPlayerstateijP13playerState_s
	extern _Z23SV_DObjUpdateServerTimeP9gentity_sfi
	extern loc_warnings
	extern loc_warningsAsErrors
	extern _Z13SL_FindStringPKc
	extern _Z7ms_randv
	extern _Z17SV_LocateGameDataP9gentity_siiP13playerState_si

;Exports of g_utils_mp:
	global cached_models
	global _ZZ22G_LocalizedStringIndexPKcE12origErrorMsg
	global _Z19G_EntLinkToInternalP9gentity_sS0_j
	global _Z10G_AddEventP9gentity_sij
	global _Z10G_SetAngleP9gentity_sPKf
	global _Z10G_SetModelP9gentity_sPKc
	global _Z10G_TagIndexPKc
	global _Z11G_EntAttachP9gentity_sPKcji
	global _Z11G_EntDetachP9gentity_sPKcj
	global _Z11G_EntLinkToP9gentity_sS0_j
	global _Z11G_EntUnlinkP9gentity_s
	global _Z11G_ModelNamei
	global _Z11G_SetOriginP9gentity_sPKf
	global _Z11G_XModelBadi
	global _Z12G_DObjUpdateP9gentity_s
	global _Z12G_FreeEntityP9gentity_s
	global _Z12G_ModelIndexPKc
	global _Z12G_TempEntityPKfi
	global _Z13G_CalcTagAxisP9gentity_si
	global _Z13G_EffectIndexPKc
	global _Z13G_GeneralLinkP9gentity_s
	global _Z13G_InitGentityP9gentity_s
	global _Z14G_DObjCalcBonePK9gentity_si
	global _Z14G_DObjCalcPoseP9gentity_sPi
	global _Z14G_EntDetachAllP9gentity_s
	global _Z14G_SafeDObjFreeP9gentity_s
	global _Z14G_SetFixedLinkP9gentity_si
	global _Z15G_MaterialIndexPKc
	global _Z15G_OverrideModeliPKc
	global _Z15G_PrintEntitiesv
	global _Z16G_FreeEntityRefsP9gentity_s
	global _Z16G_GetModelBoundsiPfS_
	global _Z16G_PlaySoundAliasP9gentity_sh
	global _Z16G_SetConstStringPtPKc
	global _Z17G_AnimScriptSoundiP16snd_alias_list_t
	global _Z17G_BroadcastEntityP9gentity_s
	global _Z17G_FreeEntityDelayP9gentity_s
	global _Z17G_ShellShockIndexPKc
	global _Z17G_SoundAliasIndexPKc
	global _Z18G_SpawnPlayerClonev
	global _Z19G_CalcTagParentAxisP9gentity_sPA3_f
	global _Z19G_GetEntityTypeNamePK9gentity_s
	global _Z20G_DObjGetWorldTagPosP9gentity_sjPf
	global _Z21G_AddPredictableEventP9gentity_sij
	global _Z21G_EntLinkToWithOffsetP9gentity_sS0_jPKfS2_
	global _Z22G_DObjUpdateServerTimeP9gentity_si
	global _Z22G_FreeEntityAfterEventP9gentity_s
	global _Z22G_LocalizedStringIndexPKc
	global _Z23G_DObjGetLocalTagMatrixP9gentity_sj
	global _Z23G_DObjGetWorldTagMatrixP9gentity_sjPA3_f
	global _Z23G_FindConfigstringIndexPKciiiS0_
	global _Z26G_DObjGetWorldBoneIndexPosP9gentity_siPf
	global _Z29G_DObjGetLocalBoneIndexMatrixP9gentity_si
	global _Z29G_DObjGetWorldBoneIndexMatrixP9gentity_siPA3_f
	global _Z6G_FindP9gentity_sit
	global _Z6G_randv
	global _Z7G_Spawnv
	global _Z7G_irandii
	global _Z8G_flrandff
	global _Z8G_randomv
	global _Z9G_crandomv


SECTION .text


;G_EntLinkToInternal(gentity_s*, gentity_s*, unsigned int)
_Z19G_EntLinkToInternalP9gentity_sS0_j:
	push ebp
	mov ebp, esp
	push edi
	push esi
	push ebx
	sub esp, 0x2c
	mov esi, eax
	mov [ebp-0x20], edx
	mov edi, ecx
	mov [esp], eax
	call _Z11G_EntUnlinkP9gentity_s
	test edi, edi
	jnz _Z19G_EntLinkToInternalP9gentity_sS0_j_10
	mov dword [ebp-0x1c], 0xffffffff
_Z19G_EntLinkToInternalP9gentity_sS0_j_90:
	cmp esi, [ebp-0x20]
	jz _Z19G_EntLinkToInternalP9gentity_sS0_j_20
	mov ecx, [ebp-0x20]
	mov eax, [ecx+0x218]
	test eax, eax
	jz _Z19G_EntLinkToInternalP9gentity_sS0_j_30
_Z19G_EntLinkToInternalP9gentity_sS0_j_40:
	mov eax, [eax]
	cmp esi, eax
	jz _Z19G_EntLinkToInternalP9gentity_sS0_j_20
	mov eax, [eax+0x218]
	test eax, eax
	jnz _Z19G_EntLinkToInternalP9gentity_sS0_j_40
_Z19G_EntLinkToInternalP9gentity_sS0_j_30:
	mov dword [esp+0x4], 0x11
	mov dword [esp], 0x70
	call _Z8MT_Allocii
	mov ebx, eax
	mov eax, [ebp-0x20]
	mov [ebx], eax
	mov word [ebx+0x8], 0x0
	mov [esp+0x4], edi
	lea eax, [ebx+0x8]
	mov [esp], eax
	call _Z13Scr_SetStringPtj
	mov edx, [ebp-0x20]
	mov eax, [edx+0x21c]
	mov [ebx+0x4], eax
	mov ecx, [ebp-0x1c]
	mov [ebx+0xc], ecx
	lea edi, [ebx+0x10]
	cld
	xor eax, eax
	mov ecx, 0xc
	rep stosd
	mov edx, [ebp-0x20]
	mov [edx+0x21c], esi
	mov [esi+0x218], ebx
	lea edi, [ebx+0x40]
	mov cl, 0xc
	rep stosd
	mov eax, [esi+0x15c]
	test eax, eax
	jz _Z19G_EntLinkToInternalP9gentity_sS0_j_50
	mov edx, [eax+0x4]
	test edx, edx
	jz _Z19G_EntLinkToInternalP9gentity_sS0_j_60
	cmp edx, 0x7
	jz _Z19G_EntLinkToInternalP9gentity_sS0_j_70
_Z19G_EntLinkToInternalP9gentity_sS0_j_50:
	mov eax, 0x1
	add esp, 0x2c
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret
_Z19G_EntLinkToInternalP9gentity_sS0_j_10:
	mov eax, [ebp-0x20]
	mov [esp], eax
	call _Z13SV_DObjExistsP9gentity_s
	test eax, eax
	jnz _Z19G_EntLinkToInternalP9gentity_sS0_j_80
_Z19G_EntLinkToInternalP9gentity_sS0_j_20:
	xor eax, eax
_Z19G_EntLinkToInternalP9gentity_sS0_j_100:
	add esp, 0x2c
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret
_Z19G_EntLinkToInternalP9gentity_sS0_j_60:
	mov dword [eax+0x4], 0x1
	jmp _Z19G_EntLinkToInternalP9gentity_sS0_j_50
_Z19G_EntLinkToInternalP9gentity_sS0_j_80:
	mov [esp+0x4], edi
	mov edx, [ebp-0x20]
	mov [esp], edx
	call _Z19SV_DObjGetBoneIndexPK9gentity_sj
	mov [ebp-0x1c], eax
	test eax, eax
	jns _Z19G_EntLinkToInternalP9gentity_sS0_j_90
	xor eax, eax
	jmp _Z19G_EntLinkToInternalP9gentity_sS0_j_100
_Z19G_EntLinkToInternalP9gentity_sS0_j_70:
	mov dword [eax+0x4], 0x8
	jmp _Z19G_EntLinkToInternalP9gentity_sS0_j_50


;G_AddEvent(gentity_s*, int, unsigned int)
_Z10G_AddEventP9gentity_sij:
	push ebp
	mov ebp, esp
	push esi
	push ebx
	mov ecx, [ebp+0x8]
	mov ebx, [ebp+0xc]
	mov esi, [ebp+0x10]
	mov edx, [ecx+0x15c]
	test edx, edx
	jz _Z10G_AddEventP9gentity_sij_10
	mov eax, [edx+0xb4]
	and eax, 0x3
	mov [edx+eax*4+0xb8], ebx
	mov edx, [ecx+0x15c]
	mov eax, [edx+0xb4]
	and eax, 0x3
	mov [edx+eax*4+0xc8], esi
	mov edx, [ecx+0x15c]
	mov eax, [edx+0xb4]
	add eax, 0x1
	and eax, 0xff
	mov [edx+0xb4], eax
	mov eax, level
	mov edx, [eax+0x1ec]
	mov [ecx+0x184], edx
	mov eax, [eax+0x1ec]
	mov [ecx+0x158], eax
	pop ebx
	pop esi
	pop ebp
	ret
_Z10G_AddEventP9gentity_sij_10:
	mov eax, [ecx+0xa0]
	mov edx, eax
	and edx, 0x3
	mov [ecx+edx*4+0xa4], ebx
	mov [ecx+edx*4+0xb4], esi
	add eax, 0x1
	and eax, 0xff
	mov [ecx+0xa0], eax
	mov eax, level
	mov edx, [eax+0x1ec]
	mov [ecx+0x184], edx
	mov eax, [eax+0x1ec]
	mov [ecx+0x158], eax
	pop ebx
	pop esi
	pop ebp
	ret
	nop


;G_SetAngle(gentity_s*, float const*)
_Z10G_SetAngleP9gentity_sPKf:
	push ebp
	mov ebp, esp
	push ebx
	mov edx, [ebp+0x8]
	mov ebx, [ebp+0xc]
	lea ecx, [edx+0x3c]
	mov eax, [ebx]
	mov [edx+0x3c], eax
	mov eax, [ebx+0x4]
	mov [ecx+0x4], eax
	mov eax, [ebx+0x8]
	mov [ecx+0x8], eax
	mov dword [edx+0x30], 0x0
	mov dword [edx+0x34], 0x0
	mov dword [edx+0x38], 0x0
	lea ecx, [edx+0x48]
	xor eax, eax
	mov [edx+0x48], eax
	mov [ecx+0x4], eax
	mov [ecx+0x8], eax
	lea ecx, [edx+0x148]
	mov eax, [ebx]
	mov [edx+0x148], eax
	mov eax, [ebx+0x4]
	mov [ecx+0x4], eax
	mov eax, [ebx+0x8]
	mov [ecx+0x8], eax
	pop ebx
	pop ebp
	ret


;G_SetModel(gentity_s*, char const*)
_Z10G_SetModelP9gentity_sPKc:
	push ebp
	mov ebp, esp
	push ebx
	sub esp, 0x14
	mov ebx, [ebp+0x8]
	mov eax, [ebp+0xc]
	cmp byte [eax], 0x0
	jnz _Z10G_SetModelP9gentity_sPKc_10
	mov word [ebx+0x168], 0x0
	add esp, 0x14
	pop ebx
	pop ebp
	ret
_Z10G_SetModelP9gentity_sPKc_10:
	mov [esp], eax
	call _Z12G_ModelIndexPKc
	mov [ebx+0x168], ax
	add esp, 0x14
	pop ebx
	pop ebp
	ret
	add [eax], al


;G_TagIndex(char const*)
_Z10G_TagIndexPKc:
	push ebp
	mov ebp, esp
	sub esp, 0x28
	mov dword [esp+0x10], 0x0
	mov dword [esp+0xc], 0x1
	mov dword [esp+0x8], 0x20
	mov dword [esp+0x4], 0x8ea
	mov eax, [ebp+0x8]
	mov [esp], eax
	call _Z23G_FindConfigstringIndexPKciiiS0_
	leave
	ret
	nop


;G_EntAttach(gentity_s*, char const*, unsigned int, int)
_Z11G_EntAttachP9gentity_sPKcji:
	push ebp
	mov ebp, esp
	push edi
	push esi
	push ebx
	sub esp, 0x2c
	mov edi, [ebp+0x8]
	mov eax, edi
	xor esi, esi
	mov dword [ebp-0x1c], 0x1
	lea ebx, [edi+0x246]
	jmp _Z11G_EntAttachP9gentity_sPKcji_10
_Z11G_EntAttachP9gentity_sPKcji_30:
	add esi, 0x1
	add ebx, 0x2
	add eax, 0x2
	cmp esi, 0x13
	jz _Z11G_EntAttachP9gentity_sPKcji_20
_Z11G_EntAttachP9gentity_sPKcji_10:
	cmp word [eax+0x220], 0x0
	jnz _Z11G_EntAttachP9gentity_sPKcji_30
	mov eax, [ebp+0xc]
	mov [esp], eax
	call _Z12G_ModelIndexPKc
	test eax, eax
	jnz _Z11G_EntAttachP9gentity_sPKcji_40
_Z11G_EntAttachP9gentity_sPKcji_20:
	xor eax, eax
	add esp, 0x2c
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret
_Z11G_EntAttachP9gentity_sPKcji_40:
	mov [edi+esi*2+0x220], ax
	mov ecx, [ebp+0x10]
	mov [esp+0x4], ecx
	mov [esp], ebx
	call _Z13Scr_SetStringPtj
	mov eax, [ebp+0x14]
	test eax, eax
	jnz _Z11G_EntAttachP9gentity_sPKcji_50
	mov [esp], edi
	call _Z12G_DObjUpdateP9gentity_s
	mov eax, 0x1
_Z11G_EntAttachP9gentity_sPKcji_60:
	add esp, 0x2c
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret
_Z11G_EntAttachP9gentity_sPKcji_50:
	mov ecx, esi
	shl dword [ebp-0x1c], cl
	mov eax, [ebp-0x1c]
	or [edi+0x178], eax
	mov [esp], edi
	call _Z12G_DObjUpdateP9gentity_s
	mov eax, 0x1
	jmp _Z11G_EntAttachP9gentity_sPKcji_60


;G_EntDetach(gentity_s*, char const*, unsigned int)
_Z11G_EntDetachP9gentity_sPKcj:
	push ebp
	mov ebp, esp
	push edi
	push esi
	push ebx
	sub esp, 0x3c
	mov eax, [ebp+0xc]
	mov [esp], eax
	call _Z22SL_FindLowercaseStringPKc
	mov edi, eax
	test eax, eax
	jz _Z11G_EntDetachP9gentity_sPKcj_10
	mov eax, scr_const
	movzx eax, word [eax]
	cmp edi, eax
	jz _Z11G_EntDetachP9gentity_sPKcj_10
	mov ebx, [ebp+0x8]
	xor esi, esi
	jmp _Z11G_EntDetachP9gentity_sPKcj_20
_Z11G_EntDetachP9gentity_sPKcj_30:
	add esi, 0x1
	add ebx, 0x2
	cmp esi, 0x13
	jz _Z11G_EntDetachP9gentity_sPKcj_10
_Z11G_EntDetachP9gentity_sPKcj_20:
	movzx eax, word [ebx+0x246]
	cmp eax, [ebp+0x10]
	jnz _Z11G_EntDetachP9gentity_sPKcj_30
	movzx eax, word [ebx+0x220]
	add eax, 0x33e
	mov [esp], eax
	call _Z23SV_GetConfigstringConsti
	cmp edi, eax
	jnz _Z11G_EntDetachP9gentity_sPKcj_30
	mov eax, [ebp+0x8]
	mov word [eax+esi*2+0x220], 0x0
	lea ebx, [esi+esi]
	lea edi, [ebx+eax+0x246]
	mov dword [esp+0x4], 0x0
	mov [esp], edi
	call _Z13Scr_SetStringPtj
	cmp esi, 0x11
	jg _Z11G_EntDetachP9gentity_sPKcj_40
	mov eax, [ebp+0x8]
	lea eax, [eax+esi*2+0x222]
	mov [ebp-0x2c], eax
	mov edx, [ebp+0x8]
	lea ebx, [ebx+edx+0x220]
	mov [ebp-0x1c], ebx
	sub [ebp-0x1c], eax
	sub edi, eax
	mov [ebp-0x20], edi
	mov ecx, eax
	jmp _Z11G_EntDetachP9gentity_sPKcj_50
_Z11G_EntDetachP9gentity_sPKcj_70:
	mov eax, 0x1
	mov ecx, esi
	shl eax, cl
	or edx, eax
	mov eax, [ebp+0x8]
	mov [eax+0x178], edx
_Z11G_EntDetachP9gentity_sPKcj_80:
	add dword [ebp-0x2c], 0x2
	cmp ebx, 0x12
	jz _Z11G_EntDetachP9gentity_sPKcj_60
	mov esi, ebx
	mov ecx, [ebp-0x2c]
_Z11G_EntDetachP9gentity_sPKcj_50:
	lea ebx, [esi+0x1]
	movzx eax, word [ecx]
	mov edx, [ebp-0x1c]
	mov [ecx+edx], ax
	movzx eax, word [ecx+0x26]
	mov edx, [ebp-0x20]
	mov [ecx+edx], ax
	mov ecx, [ebp+0x8]
	mov edx, [ecx+0x178]
	mov edi, 0x1
	mov ecx, ebx
	shl edi, cl
	test edi, edx
	jnz _Z11G_EntDetachP9gentity_sPKcj_70
	mov eax, 0x1
	mov ecx, esi
	shl eax, cl
	not eax
	and edx, eax
	mov eax, [ebp+0x8]
	mov [eax+0x178], edx
	jmp _Z11G_EntDetachP9gentity_sPKcj_80
_Z11G_EntDetachP9gentity_sPKcj_10:
	xor eax, eax
_Z11G_EntDetachP9gentity_sPKcj_90:
	add esp, 0x3c
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret
_Z11G_EntDetachP9gentity_sPKcj_40:
	mov edi, 0x1
	mov ecx, esi
	shl edi, cl
_Z11G_EntDetachP9gentity_sPKcj_100:
	mov edx, [ebp+0x8]
	mov word [edx+esi*2+0x220], 0x0
	mov word [edx+esi*2+0x246], 0x0
	not edi
	and [edx+0x178], edi
	mov [esp], edx
	call _Z12G_DObjUpdateP9gentity_s
	mov eax, 0x1
	jmp _Z11G_EntDetachP9gentity_sPKcj_90
_Z11G_EntDetachP9gentity_sPKcj_60:
	mov esi, 0x12
	jmp _Z11G_EntDetachP9gentity_sPKcj_100


;G_EntLinkTo(gentity_s*, gentity_s*, unsigned int)
_Z11G_EntLinkToP9gentity_sS0_j:
	push ebp
	mov ebp, esp
	push ebx
	sub esp, 0x14
	mov ebx, [ebp+0x8]
	mov edx, [ebp+0xc]
	mov ecx, [ebp+0x10]
	mov eax, ebx
	call _Z19G_EntLinkToInternalP9gentity_sS0_j
	test eax, eax
	jz _Z11G_EntLinkToP9gentity_sS0_j_10
	mov dword [esp+0x4], 0x0
	mov [esp], ebx
	call _Z13G_CalcTagAxisP9gentity_si
	mov eax, 0x1
_Z11G_EntLinkToP9gentity_sS0_j_10:
	add esp, 0x14
	pop ebx
	pop ebp
	ret


;G_EntUnlink(gentity_s*)
_Z11G_EntUnlinkP9gentity_s:
	push ebp
	mov ebp, esp
	push edi
	push esi
	push ebx
	sub esp, 0x3c
	mov ebx, [ebp+0x8]
	mov eax, [ebx+0x218]
	mov [ebp-0x2c], eax
	test eax, eax
	jz _Z11G_EntUnlinkP9gentity_s_10
	lea edx, [ebx+0x18]
	mov eax, [ebx+0x13c]
	mov [ebx+0x18], eax
	mov eax, [ebx+0x140]
	mov [edx+0x4], eax
	mov eax, [ebx+0x144]
	mov [edx+0x8], eax
	mov dword [ebx+0xc], 0x0
	mov dword [ebx+0x10], 0x0
	mov dword [ebx+0x14], 0x0
	lea eax, [ebx+0x24]
	xor esi, esi
	mov [ebx+0x24], esi
	mov [eax+0x4], esi
	mov [eax+0x8], esi
	lea edx, [ebx+0x3c]
	mov eax, [ebx+0x148]
	mov [ebx+0x3c], eax
	mov eax, [ebx+0x14c]
	mov [edx+0x4], eax
	mov eax, [ebx+0x150]
	mov [edx+0x8], eax
	mov dword [ebx+0x30], 0x0
	mov dword [ebx+0x34], 0x0
	mov dword [ebx+0x38], 0x0
	lea eax, [ebx+0x48]
	mov [ebx+0x48], esi
	mov [eax+0x4], esi
	mov [eax+0x8], esi
	mov edx, [ebp-0x2c]
	mov edi, [edx]
	mov edx, [ebx+0x15c]
	test edx, edx
	jz _Z11G_EntUnlinkP9gentity_s_20
	mov eax, [edx+0x108]
	mov [ebp-0x24], eax
	mov eax, [edx+0x10c]
	mov [ebp-0x20], eax
	mov [ebp-0x1c], esi
	lea eax, [ebp-0x24]
	mov [esp+0x4], eax
	mov [esp], ebx
	call _Z18SetClientViewAngleP9gentity_sPKf
	mov [ebx+0x148], esi
	movzx edx, word [edi+0x170]
	mov eax, scr_const
	cmp dx, [eax+0xf8]
	jz _Z11G_EntUnlinkP9gentity_s_30
_Z11G_EntUnlinkP9gentity_s_20:
	mov eax, [edi+0x21c]
	cmp ebx, eax
	jz _Z11G_EntUnlinkP9gentity_s_40
_Z11G_EntUnlinkP9gentity_s_50:
	mov edx, [eax+0x218]
	mov eax, [edx+0x4]
	cmp ebx, eax
	jnz _Z11G_EntUnlinkP9gentity_s_50
	mov ecx, [ebp-0x2c]
	mov eax, [ecx+0x4]
	mov [edx+0x4], eax
_Z11G_EntUnlinkP9gentity_s_90:
	mov dword [ebx+0x218], 0x0
	mov eax, [ebx+0x15c]
	test eax, eax
	jz _Z11G_EntUnlinkP9gentity_s_60
	mov edx, [eax+0x4]
	cmp edx, 0x1
	jz _Z11G_EntUnlinkP9gentity_s_70
	cmp edx, 0x8
	jz _Z11G_EntUnlinkP9gentity_s_80
_Z11G_EntUnlinkP9gentity_s_60:
	mov dword [esp+0x4], 0x0
	mov eax, [ebp-0x2c]
	add eax, 0x8
	mov [esp], eax
	call _Z13Scr_SetStringPtj
	mov dword [esp+0x4], 0x70
	mov eax, [ebp-0x2c]
	mov [esp], eax
	call _Z7MT_FreePvi
_Z11G_EntUnlinkP9gentity_s_10:
	add esp, 0x3c
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret
_Z11G_EntUnlinkP9gentity_s_70:
	mov dword [eax+0x4], 0x0
	jmp _Z11G_EntUnlinkP9gentity_s_60
_Z11G_EntUnlinkP9gentity_s_80:
	mov dword [eax+0x4], 0x7
	jmp _Z11G_EntUnlinkP9gentity_s_60
_Z11G_EntUnlinkP9gentity_s_30:
	mov [esp+0x4], ebx
	mov [esp], edi
	call _Z17G_VehUnlinkPlayerP9gentity_sS0_
	jmp _Z11G_EntUnlinkP9gentity_s_20
_Z11G_EntUnlinkP9gentity_s_40:
	mov edx, [ebp-0x2c]
	mov eax, [edx+0x4]
	mov [edi+0x21c], eax
	jmp _Z11G_EntUnlinkP9gentity_s_90
	nop


;G_ModelName(int)
_Z11G_ModelNamei:
	push ebp
	mov ebp, esp
	add dword [ebp+0x8], 0x33e
	pop ebp
	jmp _Z23SV_GetConfigstringConsti


;G_SetOrigin(gentity_s*, float const*)
_Z11G_SetOriginP9gentity_sPKf:
	push ebp
	mov ebp, esp
	push ebx
	mov edx, [ebp+0x8]
	mov ebx, [ebp+0xc]
	lea ecx, [edx+0x18]
	mov eax, [ebx]
	mov [edx+0x18], eax
	mov eax, [ebx+0x4]
	mov [ecx+0x4], eax
	mov eax, [ebx+0x8]
	mov [ecx+0x8], eax
	mov dword [edx+0xc], 0x0
	mov dword [edx+0x10], 0x0
	mov dword [edx+0x14], 0x0
	lea ecx, [edx+0x24]
	xor eax, eax
	mov [edx+0x24], eax
	mov [ecx+0x4], eax
	mov [ecx+0x8], eax
	lea ecx, [edx+0x13c]
	mov eax, [ebx]
	mov [edx+0x13c], eax
	mov eax, [ebx+0x4]
	mov [ecx+0x4], eax
	mov eax, [ebx+0x8]
	mov [ecx+0x8], eax
	pop ebx
	pop ebp
	ret


;G_XModelBad(int)
_Z11G_XModelBadi:
	push ebp
	mov ebp, esp
	mov eax, [ebp+0x8]
	mov eax, [eax*4+cached_models]
	mov [ebp+0x8], eax
	pop ebp
	jmp _Z9XModelBadPK6XModel


;G_DObjUpdate(gentity_s*)
_Z12G_DObjUpdateP9gentity_s:
	push ebp
	mov ebp, esp
	push edi
	push esi
	push ebx
	sub esp, 0x12c
	mov eax, [ebp+0x8]
	mov edi, [eax+0x15c]
	test edi, edi
	jz _Z12G_DObjUpdateP9gentity_s_10
_Z12G_DObjUpdateP9gentity_s_40:
	add esp, 0x12c
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret
_Z12G_DObjUpdateP9gentity_s_10:
	mov eax, [eax]
	mov [esp], eax
	call _Z22Com_SafeServerDObjFreei
	mov ecx, [ebp+0x8]
	movzx eax, word [ecx+0x168]
	movzx edx, ax
	test ax, ax
	jnz _Z12G_DObjUpdateP9gentity_s_20
	mov eax, [ecx+0x21c]
	test eax, eax
	jnz _Z12G_DObjUpdateP9gentity_s_30
	jmp _Z12G_DObjUpdateP9gentity_s_40
_Z12G_DObjUpdateP9gentity_s_50:
	mov dword [ecx+0xc], 0xffffffff
_Z12G_DObjUpdateP9gentity_s_60:
	test ebx, ebx
	jz _Z12G_DObjUpdateP9gentity_s_40
	mov eax, ebx
_Z12G_DObjUpdateP9gentity_s_30:
	mov ecx, [eax+0x218]
	mov ebx, [ecx+0x4]
	cmp word [ecx+0x8], 0x0
	jz _Z12G_DObjUpdateP9gentity_s_50
	mov [esp], eax
	call _Z11G_EntUnlinkP9gentity_s
	jmp _Z12G_DObjUpdateP9gentity_s_60
_Z12G_DObjUpdateP9gentity_s_20:
	mov eax, [edx*4+cached_models]
	mov [ebp-0x118], eax
	mov word [ebp-0x114], 0x0
	mov byte [ebp-0x112], 0x0
	mov eax, [ecx+0x4]
	test eax, eax
	jz _Z12G_DObjUpdateP9gentity_s_70
	cmp eax, 0x6
	jz _Z12G_DObjUpdateP9gentity_s_80
	cmp eax, 0xd
	jz _Z12G_DObjUpdateP9gentity_s_80
	cmp eax, 0xb
	jz _Z12G_DObjUpdateP9gentity_s_80
	cmp eax, 0xe
	jz _Z12G_DObjUpdateP9gentity_s_90
	cmp eax, 0xc
	jz _Z12G_DObjUpdateP9gentity_s_90
_Z12G_DObjUpdateP9gentity_s_160:
	mov ebx, [ebp+0x8]
	mov edx, 0x1
	jmp _Z12G_DObjUpdateP9gentity_s_100
_Z12G_DObjUpdateP9gentity_s_120:
	add edx, 0x1
	mov [ebp-0x11c], edx
	shl edx, 0x3
	mov eax, [esi*4+cached_models]
	mov [ebp+edx-0x120], eax
	movzx eax, word [ebx+0x246]
	mov [ebp+edx-0x11c], ax
	mov eax, 0x1
	mov ecx, edi
	shl eax, cl
	mov ecx, [ebp+0x8]
	test [ecx+0x178], eax
	setnz byte [ebp+edx-0x11a]
	mov edx, [ebp-0x11c]
	add ebx, 0x2
	cmp edx, 0x14
	jz _Z12G_DObjUpdateP9gentity_s_110
_Z12G_DObjUpdateP9gentity_s_100:
	lea edi, [edx-0x1]
	movzx eax, word [ebx+0x220]
	movzx esi, ax
	test ax, ax
	jnz _Z12G_DObjUpdateP9gentity_s_120
_Z12G_DObjUpdateP9gentity_s_110:
	mov ecx, [ebp+0x8]
	mov eax, [ecx]
	mov [esp+0xc], eax
	mov dword [esp+0x8], 0x0
	movzx eax, dx
	mov [esp+0x4], eax
	lea eax, [ebp-0x118]
	mov [esp], eax
	call _Z20Com_ServerDObjCreateP11DObjModel_stP11XAnimTree_si
	mov edx, [ebp+0x8]
	add edx, 0xe4
	mov [esp+0x4], edx
	mov [esp], eax
	call _Z19DObjSetHidePartBitsP6DObj_sPKj
	mov edx, [ebp+0x8]
	mov esi, [edx+0x21c]
	test esi, esi
	jnz _Z12G_DObjUpdateP9gentity_s_130
	jmp _Z12G_DObjUpdateP9gentity_s_40
_Z12G_DObjUpdateP9gentity_s_140:
	mov dword [ebx+0xc], 0xffffffff
_Z12G_DObjUpdateP9gentity_s_150:
	test edi, edi
	jz _Z12G_DObjUpdateP9gentity_s_40
	mov esi, edi
_Z12G_DObjUpdateP9gentity_s_130:
	mov ebx, [esi+0x218]
	mov edi, [ebx+0x4]
	movzx eax, word [ebx+0x8]
	test ax, ax
	jz _Z12G_DObjUpdateP9gentity_s_140
	movzx eax, ax
	mov [esp+0x4], eax
	mov eax, [ebx]
	mov [esp], eax
	call _Z19SV_DObjGetBoneIndexPK9gentity_sj
	mov [ebx+0xc], eax
	test eax, eax
	jns _Z12G_DObjUpdateP9gentity_s_150
	mov [esp], esi
	call _Z11G_EntUnlinkP9gentity_s
	jmp _Z12G_DObjUpdateP9gentity_s_150
_Z12G_DObjUpdateP9gentity_s_70:
	mov eax, ecx
_Z12G_DObjUpdateP9gentity_s_170:
	mov [eax+0x88], edx
	jmp _Z12G_DObjUpdateP9gentity_s_160
_Z12G_DObjUpdateP9gentity_s_80:
	mov eax, [ebp+0x8]
	jmp _Z12G_DObjUpdateP9gentity_s_170
_Z12G_DObjUpdateP9gentity_s_90:
	mov ecx, [ebp+0x8]
	mov [ecx+0xd8], edx
	jmp _Z12G_DObjUpdateP9gentity_s_160
	nop


;G_FreeEntity(gentity_s*)
_Z12G_FreeEntityP9gentity_s:
	push ebp
	mov ebp, esp
	push esi
	push ebx
	sub esp, 0x10
	mov ebx, [ebp+0x8]
	mov [esp], ebx
	call _Z11G_EntUnlinkP9gentity_s
	mov eax, [ebx+0x21c]
	test eax, eax
	jz _Z12G_FreeEntityP9gentity_s_10
_Z12G_FreeEntityP9gentity_s_20:
	mov [esp], eax
	call _Z11G_EntUnlinkP9gentity_s
	mov eax, [ebx+0x21c]
	test eax, eax
	jnz _Z12G_FreeEntityP9gentity_s_20
_Z12G_FreeEntityP9gentity_s_10:
	mov [esp], ebx
	call _Z15SV_UnlinkEntityP9gentity_s
	mov [esp], ebx
	call _Z14SV_DObjGetTreeP9gentity_s
	test eax, eax
	jz _Z12G_FreeEntityP9gentity_s_30
	mov [esp], eax
	call _Z14XAnimClearTreeP11XAnimTree_s
_Z12G_FreeEntityP9gentity_s_30:
	mov eax, [ebx]
	mov [esp], eax
	call _Z22Com_SafeServerDObjFreei
	mov [esp], ebx
	call _Z16G_FreeEntityRefsP9gentity_s
	mov esi, [ebx+0x160]
	test esi, esi
	jz _Z12G_FreeEntityP9gentity_s_40
	mov [esp], ebx
	call _Z12G_FreeTurretP9gentity_s
_Z12G_FreeEntityP9gentity_s_40:
	mov ecx, [ebx+0x164]
	test ecx, ecx
	jz _Z12G_FreeEntityP9gentity_s_50
	mov [esp], ebx
	call _Z15G_VehFreeEntityP9gentity_s
_Z12G_FreeEntityP9gentity_s_50:
	cmp dword [ebx+0x4], 0x2
	jz _Z12G_FreeEntityP9gentity_s_60
_Z12G_FreeEntityP9gentity_s_90:
	mov [esp], ebx
	call _Z19EntHandleDissociateP9gentity_s
	mov dword [esp+0x4], 0x0
	lea eax, [ebx+0x154]
	mov [esp], eax
	call _ZN9EntHandle6setEntEP9gentity_s
	mov dword [esp+0x4], 0x0
	lea eax, [ebx+0x198]
	mov [esp], eax
	call _ZN9EntHandle6setEntEP9gentity_s
	mov dword [esp+0x4], 0x0
	lea eax, [ebx+0x214]
	mov [esp], eax
	call _ZN9EntHandle6setEntEP9gentity_s
	mov [esp], ebx
	call _Z14Scr_FreeEntityP9gentity_s
	mov esi, [ebx+0x26c]
	mov dword [esp+0x8], 0x274
	mov dword [esp+0x4], 0x0
	mov [esp], ebx
	call memset
	mov edx, level
	mov eax, [edx+0x1ec]
	mov [ebx+0x184], eax
	mov eax, ebx
	sub eax, [edx+0x4]
	cmp eax, 0xb09f
	jle _Z12G_FreeEntityP9gentity_s_70
	mov eax, [edx+0x14]
	test eax, eax
	jz _Z12G_FreeEntityP9gentity_s_80
	mov [eax+0x270], ebx
_Z12G_FreeEntityP9gentity_s_100:
	mov [edx+0x14], ebx
	mov dword [ebx+0x270], 0x0
_Z12G_FreeEntityP9gentity_s_70:
	lea eax, [esi+0x1]
	mov [ebx+0x26c], eax
	add esp, 0x10
	pop ebx
	pop esi
	pop ebp
	ret
_Z12G_FreeEntityP9gentity_s_60:
	mov [esp], ebx
	call _Z17PlayerCorpse_FreeP9gentity_s
	jmp _Z12G_FreeEntityP9gentity_s_90
_Z12G_FreeEntityP9gentity_s_80:
	mov [edx+0x10], ebx
	jmp _Z12G_FreeEntityP9gentity_s_100
	nop


;G_ModelIndex(char const*)
_Z12G_ModelIndexPKc:
	push ebp
	mov ebp, esp
	push edi
	push esi
	push ebx
	sub esp, 0x1c
	mov eax, [ebp+0x8]
	cmp byte [eax], 0x0
	jnz _Z12G_ModelIndexPKc_10
	xor ebx, ebx
_Z12G_ModelIndexPKc_30:
	mov eax, ebx
	add esp, 0x1c
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret
_Z12G_ModelIndexPKc_10:
	mov [esp], eax
	call _Z22SL_FindLowercaseStringPKc
	mov esi, eax
	mov eax, level
	mov eax, [eax+0x1c]
	test eax, eax
	jnz _Z12G_ModelIndexPKc_20
_Z12G_ModelIndexPKc_100:
	mov ebx, 0x1
_Z12G_ModelIndexPKc_40:
	lea eax, [ebx+0x33e]
	mov [esp], eax
	call _Z23SV_GetConfigstringConsti
	cmp esi, eax
	jz _Z12G_ModelIndexPKc_30
	add ebx, 0x1
	cmp ebx, 0x200
	jnz _Z12G_ModelIndexPKc_40
	mov ebx, level
	mov edi, [ebx+0x1c]
	test edi, edi
	jz _Z12G_ModelIndexPKc_50
_Z12G_ModelIndexPKc_120:
	mov ebx, 0x1
	mov edi, scr_const
	jmp _Z12G_ModelIndexPKc_60
_Z12G_ModelIndexPKc_80:
	add ebx, 0x1
	cmp ebx, 0x200
	jz _Z12G_ModelIndexPKc_70
_Z12G_ModelIndexPKc_60:
	lea esi, [ebx+0x33e]
	mov [esp], esi
	call _Z23SV_GetConfigstringConsti
	movzx edx, word [edi]
	cmp eax, edx
	jnz _Z12G_ModelIndexPKc_80
	mov [esp], esi
	call _Z31CCS_IsConfigStringIndexConstanti
	test eax, eax
	jnz _Z12G_ModelIndexPKc_80
	jmp _Z12G_ModelIndexPKc_90
_Z12G_ModelIndexPKc_20:
	mov eax, [ebp+0x8]
	mov [esp], eax
	call _Z29CCS_GetConstConfigStringIndexPKc
	test eax, eax
	js _Z12G_ModelIndexPKc_100
	mov [esp], eax
	call _Z35CCS_GetConfigStringNumForConstIndexi
	lea ebx, [eax-0x33e]
	cmp ebx, 0x1ff
	ja _Z12G_ModelIndexPKc_100
	mov [esp], eax
	call _Z23SV_GetConfigstringConsti
	cmp esi, eax
	jz _Z12G_ModelIndexPKc_30
_Z12G_ModelIndexPKc_90:
	cmp ebx, 0x200
	jz _Z12G_ModelIndexPKc_110
	lea esi, [ebx+0x33e]
_Z12G_ModelIndexPKc_130:
	mov eax, [ebp+0x8]
	mov [esp], eax
	call _Z12SV_XModelGetPKc
	mov [ebx*4+cached_models], eax
	mov eax, [ebp+0x8]
	mov [esp+0x4], eax
	mov [esp], esi
	call _Z18SV_SetConfigstringiPKc
	jmp _Z12G_ModelIndexPKc_30
_Z12G_ModelIndexPKc_50:
	mov eax, [ebp+0x8]
	mov [esp+0x4], eax
	mov dword [esp], _cstring_model_s_not_prec
	call _Z2vaPKcz
	mov [esp], eax
	call _Z9Scr_ErrorPKc
	mov esi, [ebx+0x1c]
	test esi, esi
	jnz _Z12G_ModelIndexPKc_120
_Z12G_ModelIndexPKc_110:
	mov dword [esp+0x4], _cstring_g_modelindex_ove
	mov dword [esp], 0x2
	call _Z9Com_Error11errorParm_tPKcz
	mov ebx, 0x200
	mov esi, 0x53e
	jmp _Z12G_ModelIndexPKc_130
_Z12G_ModelIndexPKc_70:
	mov eax, [ebp+0x8]
	mov [esp+0x8], eax
	mov dword [esp+0x4], _cstring_warning_abandoni
	mov dword [esp], 0xe
	call _Z16Com_PrintWarningiPKcz
	mov bx, 0x1
	mov edi, scr_const
	jmp _Z12G_ModelIndexPKc_140
_Z12G_ModelIndexPKc_150:
	add ebx, 0x1
	cmp ebx, 0x200
	jz _Z12G_ModelIndexPKc_110
_Z12G_ModelIndexPKc_140:
	lea esi, [ebx+0x33e]
	mov [esp], esi
	call _Z23SV_GetConfigstringConsti
	movzx edx, word [edi]
	cmp eax, edx
	jnz _Z12G_ModelIndexPKc_150
	jmp _Z12G_ModelIndexPKc_130


;G_TempEntity(float const*, int)
_Z12G_TempEntityPKfi:
	push ebp
	mov ebp, esp
	push esi
	push ebx
	sub esp, 0x10
	mov esi, [ebp+0x8]
	call _Z7G_Spawnv
	mov ebx, eax
	mov eax, [ebp+0xc]
	add eax, 0x11
	mov [ebx+0x4], eax
	mov eax, scr_const
	movzx eax, word [eax+0xb6]
	mov [esp+0x4], eax
	lea eax, [ebx+0x170]
	mov [esp], eax
	call _Z13Scr_SetStringPtj
	mov edx, level
	mov eax, [edx+0x1ec]
	mov [ebx+0x184], eax
	mov eax, [edx+0x1ec]
	mov [ebx+0x158], eax
	mov dword [ebx+0x188], 0x1
	cvttss2si eax, [esi]
	cvtsi2ss xmm2, eax
	cvttss2si eax, [esi+0x4]
	cvtsi2ss xmm1, eax
	cvttss2si eax, [esi+0x8]
	cvtsi2ss xmm0, eax
	lea eax, [ebx+0x18]
	movss [ebx+0x18], xmm2
	movss [eax+0x4], xmm1
	movss [eax+0x8], xmm0
	mov dword [ebx+0xc], 0x0
	mov dword [ebx+0x10], 0x0
	mov dword [ebx+0x14], 0x0
	lea edx, [ebx+0x24]
	xor eax, eax
	mov [ebx+0x24], eax
	mov [edx+0x4], eax
	mov [edx+0x8], eax
	lea eax, [ebx+0x13c]
	movss [ebx+0x13c], xmm2
	movss [eax+0x4], xmm1
	movss [eax+0x8], xmm0
	mov [esp], ebx
	call _Z13SV_LinkEntityP9gentity_s
	mov eax, ebx
	add esp, 0x10
	pop ebx
	pop esi
	pop ebp
	ret
	nop
	add [eax], al


;G_CalcTagAxis(gentity_s*, int)
_Z13G_CalcTagAxisP9gentity_si:
	push ebp
	mov ebp, esp
	push edi
	push esi
	push ebx
	sub esp, 0xbc
	mov esi, [ebp+0x8]
	lea edi, [ebp-0x78]
	mov [esp+0x4], edi
	mov [esp], esi
	call _Z19G_CalcTagParentAxisP9gentity_sPA3_f
	lea eax, [ebp-0x48]
	mov [esp+0x4], eax
	lea eax, [esi+0x148]
	mov [esp], eax
	call _Z12AnglesToAxisPKfPA3_f
	mov eax, [esi+0x218]
	mov [ebp-0xac], eax
	mov ebx, [ebp+0xc]
	test ebx, ebx
	jz _Z13G_CalcTagAxisP9gentity_si_10
	lea ebx, [ebp-0xa8]
	mov [esp+0x4], ebx
	mov [esp], edi
	call _Z15MatrixTransposePA3_KfPA3_f
	mov eax, [ebp-0xac]
	add eax, 0x10
	mov [esp+0x8], eax
	mov [esp+0x4], ebx
	lea eax, [ebp-0x48]
	mov [esp], eax
	call _Z14MatrixMultiplyPA3_KfS1_PA3_f
	add esp, 0xbc
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret
_Z13G_CalcTagAxisP9gentity_si_10:
	lea ebx, [ebp-0xa8]
	mov [esp+0x4], ebx
	mov [esp], edi
	call _Z25MatrixInverseOrthogonal43PA3_KfPA3_f
	lea edx, [esi+0x13c]
	mov eax, [esi+0x13c]
	mov [ebp-0x24], eax
	mov eax, [edx+0x4]
	mov [ebp-0x20], eax
	mov eax, [edx+0x8]
	mov [ebp-0x1c], eax
	mov eax, [ebp-0xac]
	add eax, 0x10
	mov [esp+0x8], eax
	mov [esp+0x4], ebx
	lea eax, [ebp-0x48]
	mov [esp], eax
	call _Z16MatrixMultiply43PA3_KfS1_PA3_f
	add esp, 0xbc
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret
	nop
	add [eax], al


;G_EffectIndex(char const*)
_Z13G_EffectIndexPKc:
	push ebp
	mov ebp, esp
	sub esp, 0x28
	mov dword [esp+0x10], _cstring_effect
	mov eax, level
	mov eax, [eax+0x1c]
	mov [esp+0xc], eax
	mov dword [esp+0x8], 0x64
	mov dword [esp+0x4], 0x63e
	mov eax, [ebp+0x8]
	mov [esp], eax
	call _Z23G_FindConfigstringIndexPKciiiS0_
	leave
	ret
	nop


;G_GeneralLink(gentity_s*)
_Z13G_GeneralLinkP9gentity_s:
	push ebp
	mov ebp, esp
	push ebx
	sub esp, 0x14
	mov ebx, [ebp+0x8]
	mov dword [esp+0x4], 0x0
	mov [esp], ebx
	call _Z14G_SetFixedLinkP9gentity_si
	lea edx, [ebx+0x18]
	mov eax, [ebx+0x13c]
	mov [ebx+0x18], eax
	mov eax, [ebx+0x140]
	mov [edx+0x4], eax
	mov eax, [ebx+0x144]
	mov [edx+0x8], eax
	xor edx, edx
	lea ecx, [ebx+0x3c]
	mov eax, [ebx+0x148]
	mov [ebx+0x3c], eax
	mov eax, [ebx+0x14c]
	mov [ecx+0x4], eax
	mov eax, [ebx+0x150]
	mov [ecx+0x8], eax
	mov dword [ebx+0xc], 0x1
	mov [ebx+0x24], edx
	mov [ebx+0x28], edx
	mov [ebx+0x2c], edx
	mov dword [ebx+0x10], 0x0
	mov dword [ebx+0x14], 0x0
	mov dword [ebx+0x30], 0x1
	mov [ebx+0x48], edx
	mov [ebx+0x4c], edx
	mov [ebx+0x50], edx
	mov dword [ebx+0x34], 0x0
	mov dword [ebx+0x38], 0x0
	mov [ebp+0x8], ebx
	add esp, 0x14
	pop ebx
	pop ebp
	jmp _Z13SV_LinkEntityP9gentity_s
	nop


;G_InitGentity(gentity_s*)
_Z13G_InitGentityP9gentity_s:
	push ebp
	mov ebp, esp
	push ebx
	sub esp, 0x14
	mov ebx, [ebp+0x8]
	mov dword [ebx+0x270], 0x0
	mov byte [ebx+0x100], 0x1
	mov eax, scr_const
	movzx eax, word [eax+0x56]
	mov [esp+0x4], eax
	lea eax, [ebx+0x170]
	mov [esp], eax
	call _Z13Scr_SetStringPtj
	mov eax, ebx
	sub eax, g_entities
	sar eax, 0x2
	imul eax, eax, 0x2c0685b5
	mov [ebx], eax
	mov dword [ebx+0x184], 0x0
	mov dword [ebx+0x188], 0x0
	add esp, 0x14
	pop ebx
	pop ebp
	ret
	nop


;G_DObjCalcBone(gentity_s const*, int)
_Z14G_DObjCalcBonePK9gentity_si:
	push ebp
	mov ebp, esp
	push edi
	push esi
	push ebx
	sub esp, 0x2c
	mov esi, [ebp+0x8]
	mov eax, [esi]
	mov [esp], eax
	call _Z17Com_GetServerDObji
	mov ebx, eax
	mov eax, [ebp+0xc]
	mov [esp+0x4], eax
	mov [esp], ebx
	call _Z24SV_DObjCreateSkelForBoneP6DObj_si
	test eax, eax
	jz _Z14G_DObjCalcBonePK9gentity_si_10
	add esp, 0x2c
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret
_Z14G_DObjCalcBonePK9gentity_si_10:
	lea edi, [ebp-0x28]
	mov [esp+0x8], edi
	mov eax, [ebp+0xc]
	mov [esp+0x4], eax
	mov [esp], ebx
	call _Z20DObjGetHierarchyBitsPK6DObj_siPi
	movzx eax, byte [esi+0x16e]
	lea eax, [eax+eax*4]
	shl eax, 0x3
	add eax, entityHandlers
	mov eax, [eax+0x1c]
	test eax, eax
	jz _Z14G_DObjCalcBonePK9gentity_si_20
	mov [esp+0x4], edi
	mov [esp], esi
	call eax
_Z14G_DObjCalcBonePK9gentity_si_20:
	mov [esp+0x4], edi
	mov [esp], ebx
	call _Z12DObjCalcSkelPK6DObj_sPi
	add esp, 0x2c
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret


;G_DObjCalcPose(gentity_s*, int*)
_Z14G_DObjCalcPoseP9gentity_sPi:
	push ebp
	mov ebp, esp
	push edi
	push esi
	push ebx
	sub esp, 0x1c
	mov ebx, [ebp+0x8]
	mov esi, [ebp+0xc]
	mov eax, [ebx]
	mov [esp], eax
	call _Z17Com_GetServerDObji
	mov edi, eax
	mov [esp+0x4], esi
	mov [esp], eax
	call _Z25SV_DObjCreateSkelForBonesP6DObj_sPi
	test eax, eax
	jnz _Z14G_DObjCalcPoseP9gentity_sPi_10
	movzx eax, byte [ebx+0x16e]
	lea eax, [eax+eax*4]
	shl eax, 0x3
	add eax, entityHandlers
	mov eax, [eax+0x1c]
	test eax, eax
	jz _Z14G_DObjCalcPoseP9gentity_sPi_20
	mov [esp+0x4], esi
	mov [esp], ebx
	call eax
_Z14G_DObjCalcPoseP9gentity_sPi_20:
	mov [ebp+0xc], esi
	mov [ebp+0x8], edi
	add esp, 0x1c
	pop ebx
	pop esi
	pop edi
	pop ebp
	jmp _Z12DObjCalcSkelPK6DObj_sPi
_Z14G_DObjCalcPoseP9gentity_sPi_10:
	add esp, 0x1c
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret


;G_EntDetachAll(gentity_s*)
_Z14G_EntDetachAllP9gentity_s:
	push ebp
	mov ebp, esp
	push edi
	push esi
	push ebx
	sub esp, 0x2c
	mov eax, [ebp+0x8]
	mov [ebp-0x1c], eax
	mov esi, eax
	xor edi, edi
	mov ebx, eax
	add ebx, 0x246
_Z14G_EntDetachAllP9gentity_s_10:
	mov word [esi+0x220], 0x0
	mov dword [esp+0x4], 0x0
	mov [esp], ebx
	call _Z13Scr_SetStringPtj
	add edi, 0x1
	add ebx, 0x2
	add esi, 0x2
	cmp edi, 0x13
	jnz _Z14G_EntDetachAllP9gentity_s_10
	mov eax, [ebp-0x1c]
	mov dword [eax+0x178], 0x0
	mov [ebp+0x8], eax
	add esp, 0x2c
	pop ebx
	pop esi
	pop edi
	pop ebp
	jmp _Z12G_DObjUpdateP9gentity_s


;G_SafeDObjFree(gentity_s*)
_Z14G_SafeDObjFreeP9gentity_s:
	push ebp
	mov ebp, esp
	mov eax, [ebp+0x8]
	mov eax, [eax]
	mov [ebp+0x8], eax
	pop ebp
	jmp _Z22Com_SafeServerDObjFreei
	nop


;G_SetFixedLink(gentity_s*, int)
_Z14G_SetFixedLinkP9gentity_si:
	push ebp
	mov ebp, esp
	push edi
	push esi
	push ebx
	sub esp, 0x7c
	mov esi, [ebp+0x8]
	mov ebx, [ebp+0xc]
	lea edi, [ebp-0x78]
	mov [esp+0x4], edi
	mov [esp], esi
	call _Z19G_CalcTagParentAxisP9gentity_sPA3_f
	mov edx, [esi+0x218]
	cmp ebx, 0x1
	jz _Z14G_SetFixedLinkP9gentity_si_10
	cmp ebx, 0x2
	jz _Z14G_SetFixedLinkP9gentity_si_20
	test ebx, ebx
	jz _Z14G_SetFixedLinkP9gentity_si_30
	add esp, 0x7c
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret
_Z14G_SetFixedLinkP9gentity_si_30:
	lea ebx, [ebp-0x48]
	mov [esp+0x8], ebx
	mov [esp+0x4], edi
	lea eax, [edx+0x10]
	mov [esp], eax
	call _Z16MatrixMultiply43PA3_KfS1_PA3_f
	lea edx, [esi+0x13c]
	mov eax, [ebp-0x24]
	mov [esi+0x13c], eax
	mov eax, [ebp-0x20]
	mov [edx+0x4], eax
	mov eax, [ebp-0x1c]
	mov [edx+0x8], eax
	lea eax, [esi+0x148]
	mov [esp+0x4], eax
	mov [esp], ebx
	call _Z12AxisToAnglesPA3_KfPf
	add esp, 0x7c
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret
_Z14G_SetFixedLinkP9gentity_si_10:
	lea ebx, [ebp-0x48]
	mov [esp+0x8], ebx
	mov [esp+0x4], edi
	lea eax, [edx+0x10]
	mov [esp], eax
	call _Z16MatrixMultiply43PA3_KfS1_PA3_f
	lea edx, [esi+0x13c]
	mov eax, [ebp-0x24]
	mov [esi+0x13c], eax
	mov eax, [ebp-0x20]
	mov [edx+0x4], eax
	mov eax, [ebp-0x1c]
	mov [edx+0x8], eax
	mov [esp], ebx
	call _Z8vectoyawPKf
	fstp dword [esi+0x14c]
	add esp, 0x7c
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret
_Z14G_SetFixedLinkP9gentity_si_20:
	lea eax, [ebp-0x24]
	mov [esp+0x8], eax
	mov [esp+0x4], edi
	lea eax, [edx+0x34]
	mov [esp], eax
	call _Z23MatrixTransformVector43PKfPA3_S_Pf
	lea edx, [esi+0x13c]
	mov eax, [ebp-0x24]
	mov [esi+0x13c], eax
	mov eax, [ebp-0x20]
	mov [edx+0x4], eax
	mov eax, [ebp-0x1c]
	mov [edx+0x8], eax
	add esp, 0x7c
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret
	nop


;G_MaterialIndex(char const*)
_Z15G_MaterialIndexPKc:
	push ebp
	mov ebp, esp
	push ebx
	sub esp, 0x64
	mov eax, [ebp+0x8]
	mov [esp+0x4], eax
	lea ebx, [ebp-0x48]
	mov [esp], ebx
	call strcpy
	mov [esp], ebx
	call _Z8I_strlwrPc
	mov dword [esp+0x10], _cstring_material
	mov eax, level
	mov eax, [eax+0x1c]
	mov [esp+0xc], eax
	mov dword [esp+0x8], 0x100
	mov dword [esp+0x4], 0x7d2
	mov [esp], ebx
	call _Z23G_FindConfigstringIndexPKciiiS0_
	add esp, 0x64
	pop ebx
	pop ebp
	ret
	nop


;G_OverrideModel(int, char const*)
_Z15G_OverrideModeliPKc:
	push ebp
	mov ebp, esp
	push edi
	push esi
	push ebx
	sub esp, 0x1c
	mov esi, [ebp+0x8]
	mov edi, [ebp+0xc]
	lea eax, [esi+0x33e]
	mov [esp], eax
	call _Z23SV_GetConfigstringConsti
	mov [esp], eax
	call _Z18SL_ConvertToStringj
	mov ebx, eax
	mov eax, useFastFile
	mov eax, [eax]
	cmp byte [eax+0xc], 0x0
	jz _Z15G_OverrideModeliPKc_10
	mov [ebp+0xc], edi
	mov [ebp+0x8], ebx
	add esp, 0x1c
	pop ebx
	pop esi
	pop edi
	pop ebp
	jmp _Z15DB_ReplaceModelPKcS0_
_Z15G_OverrideModeliPKc_10:
	mov [esp], edi
	call _Z12SV_XModelGetPKc
	mov [esi*4+cached_models], eax
	mov [esp+0x8], eax
	mov [esp+0x4], ebx
	mov dword [esp], 0x5
	call Hunk_OverrideDataForFile
	add esp, 0x1c
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret
	nop


;G_PrintEntities()
_Z15G_PrintEntitiesv:
	push ebp
	mov ebp, esp
	push edi
	push esi
	push ebx
	sub esp, 0x5c
	mov eax, level
	mov edx, [eax+0xc]
	test edx, edx
	jle _Z15G_PrintEntitiesv_10
	xor esi, esi
	mov ebx, g_entities
	mov edi, eax
	jmp _Z15G_PrintEntitiesv_20
_Z15G_PrintEntitiesv_30:
	mov eax, _cstring_null
_Z15G_PrintEntitiesv_40:
	movsd xmm0, qword [ebp-0x30]
	movsd [esp+0x20], xmm0
	movsd xmm0, qword [ebp-0x28]
	movsd [esp+0x18], xmm0
	movsd xmm0, qword [ebp-0x20]
	movsd [esp+0x10], xmm0
	mov [esp+0xc], eax
	mov [esp+0x8], esi
	mov dword [esp+0x4], _cstring_4i_s_origin_f_f_
	mov dword [esp], 0xf
	call _Z10Com_PrintfiPKcz
	add esi, 0x1
	add ebx, 0x274
	cmp esi, [edi+0xc]
	jge _Z15G_PrintEntitiesv_10
_Z15G_PrintEntitiesv_20:
	cvtss2sd xmm0, [ebx+0x144]
	movsd [ebp-0x30], xmm0
	cvtss2sd xmm0, [ebx+0x140]
	movsd [ebp-0x28], xmm0
	cvtss2sd xmm0, [ebx+0x13c]
	movsd [ebp-0x20], xmm0
	movzx eax, word [ebx+0x170]
	test ax, ax
	jz _Z15G_PrintEntitiesv_30
	movzx eax, ax
	mov [esp], eax
	call _Z18SL_ConvertToStringj
	jmp _Z15G_PrintEntitiesv_40
_Z15G_PrintEntitiesv_10:
	add esp, 0x5c
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret


;G_FreeEntityRefs(gentity_s*)
_Z16G_FreeEntityRefsP9gentity_s:
	push ebp
	mov ebp, esp
	push edi
	push esi
	push ebx
	sub esp, 0xc
	mov eax, [ebp+0x8]
	mov [ebp-0x14], eax
	mov ebx, [eax]
	mov eax, [eax+0x180]
	mov [ebp-0x18], eax
	test eax, 0x400000
	jz _Z16G_FreeEntityRefsP9gentity_s_10
	mov eax, level
	mov eax, [eax+0xc]
	mov [ebp-0x10], eax
	test eax, eax
	jle _Z16G_FreeEntityRefsP9gentity_s_10
	xor ecx, ecx
	mov edi, g_entities
	xor esi, esi
_Z16G_FreeEntityRefsP9gentity_s_40:
	lea eax, [esi+ecx]
	lea edx, [eax+edi]
	cmp byte [edx+0x100], 0x0
	jz _Z16G_FreeEntityRefsP9gentity_s_20
	cmp word [edx+0x154], 0x0
	jz _Z16G_FreeEntityRefsP9gentity_s_20
	movzx eax, word [edx+0x154]
	sub eax, 0x1
	cmp eax, ebx
	jz _Z16G_FreeEntityRefsP9gentity_s_30
_Z16G_FreeEntityRefsP9gentity_s_20:
	add ecx, 0x1
	add esi, 0x273
	cmp [ebp-0x10], ecx
	jnz _Z16G_FreeEntityRefsP9gentity_s_40
_Z16G_FreeEntityRefsP9gentity_s_10:
	test dword [ebp-0x18], 0x100000
	jz _Z16G_FreeEntityRefsP9gentity_s_50
	mov eax, level
	mov esi, [eax+0xc]
	test esi, esi
	jg _Z16G_FreeEntityRefsP9gentity_s_60
_Z16G_FreeEntityRefsP9gentity_s_50:
	test dword [ebp-0x18], 0x200000
	jz _Z16G_FreeEntityRefsP9gentity_s_70
	xor edx, edx
	mov edi, g_entities
	xor ecx, ecx
	jmp _Z16G_FreeEntityRefsP9gentity_s_80
_Z16G_FreeEntityRefsP9gentity_s_100:
	add edx, 0x1
	add ecx, 0x273
	cmp edx, 0x40
	jz _Z16G_FreeEntityRefsP9gentity_s_90
_Z16G_FreeEntityRefsP9gentity_s_80:
	lea eax, [ecx+edx]
	add eax, edi
	cmp byte [eax+0x100], 0x0
	jz _Z16G_FreeEntityRefsP9gentity_s_100
	mov eax, [eax+0x15c]
	cmp ebx, [eax+0x5a8]
	jnz _Z16G_FreeEntityRefsP9gentity_s_100
	mov dword [eax+0x5a8], 0x3ff
	add edx, 0x1
	add ecx, 0x273
	cmp edx, 0x40
	jnz _Z16G_FreeEntityRefsP9gentity_s_80
_Z16G_FreeEntityRefsP9gentity_s_90:
	mov eax, [ebp-0x14]
	mov eax, [eax+0x180]
	mov [ebp-0x18], eax
_Z16G_FreeEntityRefsP9gentity_s_70:
	test dword [ebp-0x18], 0x800000
	jnz _Z16G_FreeEntityRefsP9gentity_s_110
	add esp, 0xc
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret
_Z16G_FreeEntityRefsP9gentity_s_60:
	xor edx, edx
	mov edi, g_entities
	xor ecx, ecx
	jmp _Z16G_FreeEntityRefsP9gentity_s_120
_Z16G_FreeEntityRefsP9gentity_s_130:
	add edx, 0x1
	add ecx, 0x273
	cmp edx, esi
	jz _Z16G_FreeEntityRefsP9gentity_s_50
_Z16G_FreeEntityRefsP9gentity_s_120:
	lea eax, [ecx+edx]
	add eax, edi
	cmp byte [eax+0x100], 0x0
	jz _Z16G_FreeEntityRefsP9gentity_s_130
	cmp ebx, [eax+0x7c]
	jnz _Z16G_FreeEntityRefsP9gentity_s_130
	mov dword [eax+0x7c], 0x3ff
	jmp _Z16G_FreeEntityRefsP9gentity_s_130
_Z16G_FreeEntityRefsP9gentity_s_110:
	mov eax, [ebp-0x14]
	mov [ebp+0x8], eax
	add esp, 0xc
	pop ebx
	pop esi
	pop edi
	pop ebp
	jmp _Z25Missile_FreeAttractorRefsP9gentity_s
_Z16G_FreeEntityRefsP9gentity_s_30:
	cmp dword [edx+0x4], 0xb
	jnz _Z16G_FreeEntityRefsP9gentity_s_20
	mov byte [edx+0x16c], 0x0
	jmp _Z16G_FreeEntityRefsP9gentity_s_10
	nop


;G_GetModelBounds(int, float*, float*)
_Z16G_GetModelBoundsiPfS_:
	push ebp
	mov ebp, esp
	push esi
	push ebx
	sub esp, 0x40
	mov eax, [ebp+0x8]
	mov esi, [eax*4+cached_models]
	lea ebx, [ebp-0x2c]
	mov [esp], ebx
	call _Z9AxisClearPA3_f
	mov eax, [ebp+0x10]
	mov [esp+0xc], eax
	mov eax, [ebp+0xc]
	mov [esp+0x8], eax
	mov [esp+0x4], ebx
	mov [esp], esi
	call _Z21XModelGetStaticBoundsPK6XModelPA3_fPfS4_
	test eax, eax
	setnz al
	movzx eax, al
	add esp, 0x40
	pop ebx
	pop esi
	pop ebp
	ret


;G_PlaySoundAlias(gentity_s*, unsigned char)
_Z16G_PlaySoundAliasP9gentity_sh:
	push ebp
	mov ebp, esp
	push ebx
	mov ecx, [ebp+0x8]
	movzx eax, byte [ebp+0xc]
	test al, al
	jz _Z16G_PlaySoundAliasP9gentity_sh_10
	movzx ebx, al
	mov edx, [ecx+0x15c]
	test edx, edx
	jz _Z16G_PlaySoundAliasP9gentity_sh_20
	mov eax, [edx+0xb4]
	and eax, 0x3
	mov dword [edx+eax*4+0xb8], 0x3
	mov edx, [ecx+0x15c]
	mov eax, [edx+0xb4]
	and eax, 0x3
	mov [edx+eax*4+0xc8], ebx
	mov edx, [ecx+0x15c]
	mov eax, [edx+0xb4]
	add eax, 0x1
	and eax, 0xff
	mov [edx+0xb4], eax
_Z16G_PlaySoundAliasP9gentity_sh_30:
	mov eax, level
	mov edx, [eax+0x1ec]
	mov [ecx+0x184], edx
	mov eax, [eax+0x1ec]
	mov [ecx+0x158], eax
_Z16G_PlaySoundAliasP9gentity_sh_10:
	pop ebx
	pop ebp
	ret
_Z16G_PlaySoundAliasP9gentity_sh_20:
	mov eax, [ecx+0xa0]
	mov edx, eax
	and edx, 0x3
	mov dword [ecx+edx*4+0xa4], 0x3
	mov [ecx+edx*4+0xb4], ebx
	add eax, 0x1
	and eax, 0xff
	mov [ecx+0xa0], eax
	jmp _Z16G_PlaySoundAliasP9gentity_sh_30
	nop
	add [eax], al


;G_SetConstString(unsigned short*, char const*)
_Z16G_SetConstStringPtPKc:
	push ebp
	mov ebp, esp
	push ebx
	sub esp, 0x14
	mov ebx, [ebp+0x8]
	mov dword [esp+0x4], 0x0
	mov [esp], ebx
	call _Z13Scr_SetStringPtj
	mov dword [esp+0x4], 0x0
	mov eax, [ebp+0xc]
	mov [esp], eax
	call _Z12SL_GetStringPKcj
	mov [ebx], ax
	add esp, 0x14
	pop ebx
	pop ebp
	ret


;G_AnimScriptSound(int, snd_alias_list_t*)
_Z17G_AnimScriptSoundiP16snd_alias_list_t:
	push ebp
	mov ebp, esp
	push ebx
	sub esp, 0x24
	mov ebx, [ebp+0x8]
	mov dword [esp+0x10], 0x0
	mov dword [esp+0xc], 0x1
	mov dword [esp+0x8], 0x100
	mov dword [esp+0x4], 0x53e
	mov eax, [ebp+0xc]
	mov eax, [eax]
	mov [esp], eax
	call _Z23G_FindConfigstringIndexPKciiiS0_
	lea edx, [ebx+ebx*8]
	lea edx, [ebx+edx*2]
	mov ecx, edx
	shl ecx, 0x5
	add edx, ecx
	lea ecx, [edx+ebx]
	add ecx, g_entities
	test al, al
	jz _Z17G_AnimScriptSoundiP16snd_alias_list_t_10
	movzx ebx, al
	mov edx, [ecx+0x15c]
	test edx, edx
	jz _Z17G_AnimScriptSoundiP16snd_alias_list_t_20
	mov eax, [edx+0xb4]
	and eax, 0x3
	mov dword [edx+eax*4+0xb8], 0x3
	mov edx, [ecx+0x15c]
	mov eax, [edx+0xb4]
	and eax, 0x3
	mov [edx+eax*4+0xc8], ebx
	mov edx, [ecx+0x15c]
	mov eax, [edx+0xb4]
	add eax, 0x1
	and eax, 0xff
	mov [edx+0xb4], eax
_Z17G_AnimScriptSoundiP16snd_alias_list_t_30:
	mov eax, level
	mov eax, [eax+0x1ec]
	mov [ecx+0x184], eax
	mov [ecx+0x158], eax
_Z17G_AnimScriptSoundiP16snd_alias_list_t_10:
	xor eax, eax
	add esp, 0x24
	pop ebx
	pop ebp
	ret
_Z17G_AnimScriptSoundiP16snd_alias_list_t_20:
	mov eax, [ecx+0xa0]
	mov edx, eax
	and edx, 0x3
	mov dword [ecx+edx*4+0xa4], 0x3
	mov [ecx+edx*4+0xb4], ebx
	add eax, 0x1
	and eax, 0xff
	mov [ecx+0xa0], eax
	jmp _Z17G_AnimScriptSoundiP16snd_alias_list_t_30


;G_BroadcastEntity(gentity_s*)
_Z17G_BroadcastEntityP9gentity_s:
	push ebp
	mov ebp, esp
	mov eax, [ebp+0x8]
	mov byte [eax+0xf6], 0x8
	pop ebp
	ret
	nop


;G_FreeEntityDelay(gentity_s*)
_Z17G_FreeEntityDelayP9gentity_s:
	push ebp
	mov ebp, esp
	sub esp, 0x18
	mov dword [esp+0x8], 0x0
	mov eax, g_scr_data
	mov eax, [eax+0x10b0]
	mov [esp+0x4], eax
	mov eax, [ebp+0x8]
	mov [esp], eax
	call _Z17Scr_ExecEntThreadP9gentity_sij
	movzx eax, ax
	mov [ebp+0x8], eax
	leave
	jmp _Z14Scr_FreeThreadt


;G_ShellShockIndex(char const*)
_Z17G_ShellShockIndexPKc:
	push ebp
	mov ebp, esp
	sub esp, 0x28
	mov dword [esp+0x10], 0x0
	mov dword [esp+0xc], 0x1
	mov dword [esp+0x8], 0x10
	mov dword [esp+0x4], 0x7a2
	mov eax, [ebp+0x8]
	mov [esp], eax
	call _Z23G_FindConfigstringIndexPKciiiS0_
	leave
	ret
	nop


;G_SoundAliasIndex(char const*)
_Z17G_SoundAliasIndexPKc:
	push ebp
	mov ebp, esp
	sub esp, 0x28
	mov dword [esp+0x10], 0x0
	mov dword [esp+0xc], 0x1
	mov dword [esp+0x8], 0x100
	mov dword [esp+0x4], 0x53e
	mov eax, [ebp+0x8]
	mov [esp], eax
	call _Z23G_FindConfigstringIndexPKciiiS0_
	movzx eax, al
	leave
	ret


;G_SpawnPlayerClone()
_Z18G_SpawnPlayerClonev:
	push ebp
	mov ebp, esp
	push edi
	push esi
	push ebx
	sub esp, 0x1c
	mov edi, level
	mov eax, [edi+0x15d0]
	lea edx, [eax+eax*8]
	lea edx, [eax+edx*2]
	mov ecx, edx
	shl ecx, 0x5
	add edx, ecx
	lea esi, [edx+eax]
	add esi, [edi+0x4]
	lea ebx, [esi+0x9d00]
	add eax, 0x1
	and eax, 0x80000007
	js _Z18G_SpawnPlayerClonev_10
_Z18G_SpawnPlayerClonev_30:
	mov [edi+0x15d0], eax
	mov edi, [ebx+0x8]
	and edi, 0x2
	xor edi, 0x2
	cmp byte [ebx+0x100], 0x0
	jz _Z18G_SpawnPlayerClonev_20
	mov [esp], ebx
	call _Z12G_FreeEntityP9gentity_s
_Z18G_SpawnPlayerClonev_20:
	mov dword [ebx+0x270], 0x0
	mov byte [ebx+0x100], 0x1
	mov eax, scr_const
	movzx eax, word [eax+0x56]
	mov [esp+0x4], eax
	lea eax, [esi+0x9e70]
	mov [esp], eax
	call _Z13Scr_SetStringPtj
	mov eax, ebx
	sub eax, g_entities
	sar eax, 0x2
	imul eax, eax, 0x2c0685b5
	mov [esi+0x9d00], eax
	mov dword [ebx+0x184], 0x0
	mov dword [ebx+0x188], 0x0
	mov [ebx+0x8], edi
	mov eax, ebx
	add esp, 0x1c
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret
_Z18G_SpawnPlayerClonev_10:
	sub eax, 0x1
	or eax, 0xfffffff8
	add eax, 0x1
	jmp _Z18G_SpawnPlayerClonev_30


;G_CalcTagParentAxis(gentity_s*, float (*) [3])
_Z19G_CalcTagParentAxisP9gentity_sPA3_f:
	push ebp
	mov ebp, esp
	push edi
	push esi
	push ebx
	sub esp, 0x9c
	mov eax, [ebp+0x8]
	mov edi, [eax+0x218]
	mov esi, [edi]
	mov ecx, [edi+0xc]
	test ecx, ecx
	js _Z19G_CalcTagParentAxisP9gentity_sPA3_f_10
	lea ebx, [ebp-0x6c]
	mov [esp+0x4], ebx
	lea eax, [esi+0x148]
	mov [esp], eax
	call _Z12AnglesToAxisPKfPA3_f
	lea edx, [esi+0x13c]
	mov eax, [esi+0x13c]
	mov [ebp-0x48], eax
	mov eax, [edx+0x4]
	mov [ebp-0x44], eax
	mov eax, [edx+0x8]
	mov [ebp-0x40], eax
	mov eax, [edi+0xc]
	mov [esp+0x4], eax
	mov [esp], esi
	call _Z14G_DObjCalcBonePK9gentity_si
	mov [esp], esi
	call _Z21SV_DObjGetMatrixArrayPK9gentity_s
	mov edx, eax
	mov eax, [edi+0xc]
	shl eax, 0x5
	lea esi, [edx+eax]
	movss xmm1, dword [esi+0x1c]
	movaps xmm4, xmm1
	mulss xmm4, [esi]
	movaps xmm6, xmm1
	mulss xmm6, [esi+0x4]
	mulss xmm1, [esi+0x8]
	movaps xmm0, xmm4
	mulss xmm0, [esi]
	movss [ebp-0x84], xmm0
	movss xmm3, dword [esi+0x4]
	movaps xmm5, xmm4
	mulss xmm5, xmm3
	movss xmm2, dword [esi+0x8]
	movaps xmm0, xmm4
	mulss xmm0, xmm2
	movss [ebp-0x80], xmm0
	movss xmm0, dword [esi+0xc]
	mulss xmm4, xmm0
	mulss xmm3, xmm6
	movss [ebp-0x7c], xmm3
	movaps xmm7, xmm6
	mulss xmm7, xmm2
	mulss xmm6, xmm0
	movaps xmm3, xmm1
	mulss xmm3, xmm2
	mulss xmm1, xmm0
	movss [ebp-0x8c], xmm1
	movss xmm0, dword [ebp-0x7c]
	addss xmm0, xmm3
	movss xmm2, dword [_float_1_00000000]
	movaps xmm1, xmm2
	subss xmm1, xmm0
	movss [ebp-0x3c], xmm1
	movss xmm0, dword [ebp-0x8c]
	addss xmm0, xmm5
	movss [ebp-0x38], xmm0
	movss xmm0, dword [ebp-0x80]
	subss xmm0, xmm6
	movss [ebp-0x34], xmm0
	subss xmm5, [ebp-0x8c]
	movss [ebp-0x30], xmm5
	addss xmm3, [ebp-0x84]
	movaps xmm0, xmm2
	subss xmm0, xmm3
	movss [ebp-0x2c], xmm0
	movaps xmm0, xmm4
	addss xmm0, xmm7
	movss [ebp-0x28], xmm0
	addss xmm6, [ebp-0x80]
	movss [ebp-0x24], xmm6
	subss xmm7, xmm4
	movss [ebp-0x20], xmm7
	movss xmm1, dword [ebp-0x84]
	addss xmm1, [ebp-0x7c]
	subss xmm2, xmm1
	movss [ebp-0x1c], xmm2
	mov eax, [ebp+0xc]
	mov [esp+0x8], eax
	mov [esp+0x4], ebx
	lea eax, [ebp-0x3c]
	mov [esp], eax
	call _Z14MatrixMultiplyPA3_KfS1_PA3_f
	mov eax, [ebp+0xc]
	add eax, 0x24
	mov [esp+0x8], eax
	mov [esp+0x4], ebx
	lea eax, [esi+0x10]
	mov [esp], eax
	call _Z23MatrixTransformVector43PKfPA3_S_Pf
	add esp, 0x9c
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret
_Z19G_CalcTagParentAxisP9gentity_sPA3_f_10:
	mov ebx, [ebp+0xc]
	mov [esp+0x4], ebx
	lea eax, [esi+0x148]
	mov [esp], eax
	call _Z12AnglesToAxisPKfPA3_f
	mov ecx, ebx
	add ecx, 0x24
	lea edx, [esi+0x13c]
	mov eax, [esi+0x13c]
	mov [ebx+0x24], eax
	mov eax, [edx+0x4]
	mov [ecx+0x4], eax
	mov eax, [edx+0x8]
	mov [ecx+0x8], eax
	add esp, 0x9c
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret
	nop


;G_GetEntityTypeName(gentity_s const*)
_Z19G_GetEntityTypeNamePK9gentity_s:
	push ebp
	mov ebp, esp
	mov eax, [ebp+0x8]
	mov eax, [eax+0x4]
	mov eax, [eax*4+entityTypeNames]
	pop ebp
	ret


;G_DObjGetWorldTagPos(gentity_s*, unsigned int, float*)
_Z20G_DObjGetWorldTagPosP9gentity_sjPf:
	push ebp
	mov ebp, esp
	push edi
	push esi
	push ebx
	sub esp, 0x4c
	mov esi, [ebp+0x8]
	mov eax, [ebp+0xc]
	mov [esp+0x4], eax
	mov [esp], esi
	call _Z19SV_DObjGetBoneIndexPK9gentity_sj
	mov ebx, eax
	test eax, eax
	js _Z20G_DObjGetWorldTagPosP9gentity_sjPf_10
	mov [esp+0x4], eax
	mov [esp], esi
	call _Z14G_DObjCalcBonePK9gentity_si
	mov [esp], esi
	call _Z21SV_DObjGetMatrixArrayPK9gentity_s
	shl ebx, 0x5
	mov edi, eax
	add edi, ebx
	jz _Z20G_DObjGetWorldTagPosP9gentity_sjPf_10
	lea ebx, [ebp-0x48]
	mov [esp+0x4], ebx
	lea eax, [esi+0x148]
	mov [esp], eax
	call _Z12AnglesToAxisPKfPA3_f
	lea edx, [esi+0x13c]
	mov eax, [esi+0x13c]
	mov [ebp-0x24], eax
	mov eax, [edx+0x4]
	mov [ebp-0x20], eax
	mov eax, [edx+0x8]
	mov [ebp-0x1c], eax
	mov eax, [ebp+0x10]
	mov [esp+0x8], eax
	mov [esp+0x4], ebx
	lea eax, [edi+0x10]
	mov [esp], eax
	call _Z23MatrixTransformVector43PKfPA3_S_Pf
	mov eax, 0x1
	add esp, 0x4c
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret
_Z20G_DObjGetWorldTagPosP9gentity_sjPf_10:
	xor eax, eax
	add esp, 0x4c
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret
	add [eax], al


;G_AddPredictableEvent(gentity_s*, int, unsigned int)
_Z21G_AddPredictableEventP9gentity_sij:
	push ebp
	mov ebp, esp
	mov ecx, [ebp+0xc]
	mov edx, [ebp+0x10]
	mov eax, [ebp+0x8]
	mov eax, [eax+0x15c]
	test eax, eax
	jz _Z21G_AddPredictableEventP9gentity_sij_10
	mov [ebp+0x10], eax
	mov [ebp+0xc], edx
	mov [ebp+0x8], ecx
	pop ebp
	jmp _Z35BG_AddPredictableEventToPlayerstateijP13playerState_s
_Z21G_AddPredictableEventP9gentity_sij_10:
	pop ebp
	ret
	nop


;G_EntLinkToWithOffset(gentity_s*, gentity_s*, unsigned int, float const*, float const*)
_Z21G_EntLinkToWithOffsetP9gentity_sS0_jPKfS2_:
	push ebp
	mov ebp, esp
	push esi
	push ebx
	sub esp, 0x10
	mov ebx, [ebp+0x8]
	mov edx, [ebp+0xc]
	mov ecx, [ebp+0x10]
	mov esi, [ebp+0x14]
	mov eax, ebx
	call _Z19G_EntLinkToInternalP9gentity_sS0_j
	test eax, eax
	jz _Z21G_EntLinkToWithOffsetP9gentity_sS0_jPKfS2__10
	mov ebx, [ebx+0x218]
	lea eax, [ebx+0x10]
	mov [esp+0x4], eax
	mov eax, [ebp+0x18]
	mov [esp], eax
	call _Z12AnglesToAxisPKfPA3_f
	lea edx, [ebx+0x34]
	mov eax, [esi]
	mov [ebx+0x34], eax
	mov eax, [esi+0x4]
	mov [edx+0x4], eax
	mov eax, [esi+0x8]
	mov [edx+0x8], eax
	mov eax, 0x1
_Z21G_EntLinkToWithOffsetP9gentity_sS0_jPKfS2__10:
	add esp, 0x10
	pop ebx
	pop esi
	pop ebp
	ret
	nop


;G_DObjUpdateServerTime(gentity_s*, int)
_Z22G_DObjUpdateServerTimeP9gentity_si:
	push ebp
	mov ebp, esp
	sub esp, 0x18
	mov eax, [ebp+0xc]
	mov [esp+0x8], eax
	mov eax, level
	cvtsi2ss xmm0, dword [eax+0x1f4]
	mulss xmm0, [_float_0_00100000]
	movss [esp+0x4], xmm0
	mov eax, [ebp+0x8]
	mov [esp], eax
	call _Z23SV_DObjUpdateServerTimeP9gentity_sfi
	leave
	ret
	nop


;G_FreeEntityAfterEvent(gentity_s*)
_Z22G_FreeEntityAfterEventP9gentity_s:
	push ebp
	mov ebp, esp
	mov eax, [ebp+0x8]
	mov dword [eax+0x188], 0x1
	pop ebp
	ret


;G_LocalizedStringIndex(char const*)
_Z22G_LocalizedStringIndexPKc:
	push ebp
	mov ebp, esp
	push edi
	push esi
	push ebx
	sub esp, 0x2c
	mov edi, [ebp+0x8]
	cmp byte [edi], 0x0
	jz _Z22G_LocalizedStringIndexPKc_10
	mov eax, level
	mov esi, [eax+0x1c]
	mov edx, [_ZZ22G_LocalizedStringIndexPKcE12origErrorMsg]
	test esi, esi
	jz _Z22G_LocalizedStringIndexPKc_20
_Z22G_LocalizedStringIndexPKc_60:
	mov [esp+0x10], edx
	mov [esp+0xc], esi
	mov dword [esp+0x8], 0x200
	mov dword [esp+0x4], 0x135
	mov [esp], edi
	call _Z23G_FindConfigstringIndexPKciiiS0_
	mov ebx, eax
	test eax, eax
	jnz _Z22G_LocalizedStringIndexPKc_30
	test esi, esi
	jnz _Z22G_LocalizedStringIndexPKc_10
	mov eax, loc_warnings
	mov eax, [eax]
	cmp byte [eax+0xc], 0x0
	jz _Z22G_LocalizedStringIndexPKc_10
	mov eax, loc_warningsAsErrors
	mov eax, [eax]
	cmp byte [eax+0xc], 0x0
	jz _Z22G_LocalizedStringIndexPKc_40
_Z22G_LocalizedStringIndexPKc_10:
	xor ebx, ebx
_Z22G_LocalizedStringIndexPKc_30:
	mov eax, ebx
	add esp, 0x2c
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret
_Z22G_LocalizedStringIndexPKc_20:
	mov eax, loc_warnings
	mov eax, [eax]
	cmp byte [eax+0xc], 0x0
	jz _Z22G_LocalizedStringIndexPKc_50
	mov eax, loc_warningsAsErrors
	mov eax, [eax]
	cmp byte [eax+0xc], 0x0
	cmovz edx, esi
	jmp _Z22G_LocalizedStringIndexPKc_60
_Z22G_LocalizedStringIndexPKc_50:
	mov si, 0x1
	jmp _Z22G_LocalizedStringIndexPKc_60
_Z22G_LocalizedStringIndexPKc_40:
	mov eax, [_ZZ22G_LocalizedStringIndexPKcE12origErrorMsg]
	mov [esp+0x10], eax
	mov dword [esp+0xc], 0x1
	mov dword [esp+0x8], 0x200
	mov dword [esp+0x4], 0x135
	mov [esp], edi
	call _Z23G_FindConfigstringIndexPKciiiS0_
	mov ebx, eax
	test eax, eax
	jz _Z22G_LocalizedStringIndexPKc_30
	mov [esp+0xc], edi
	mov eax, [_ZZ22G_LocalizedStringIndexPKcE12origErrorMsg]
	mov [esp+0x8], eax
	mov dword [esp+0x4], _cstring_warning_s_s_not_
	mov dword [esp], 0x18
	call _Z16Com_PrintWarningiPKcz
	jmp _Z22G_LocalizedStringIndexPKc_30


;G_DObjGetLocalTagMatrix(gentity_s*, unsigned int)
_Z23G_DObjGetLocalTagMatrixP9gentity_sj:
	push ebp
	mov ebp, esp
	push esi
	push ebx
	sub esp, 0x10
	mov esi, [ebp+0x8]
	mov eax, [ebp+0xc]
	mov [esp+0x4], eax
	mov [esp], esi
	call _Z19SV_DObjGetBoneIndexPK9gentity_sj
	mov ebx, eax
	test eax, eax
	js _Z23G_DObjGetLocalTagMatrixP9gentity_sj_10
	mov [esp+0x4], eax
	mov [esp], esi
	call _Z14G_DObjCalcBonePK9gentity_si
	mov [esp], esi
	call _Z21SV_DObjGetMatrixArrayPK9gentity_s
	shl ebx, 0x5
	add eax, ebx
	add esp, 0x10
	pop ebx
	pop esi
	pop ebp
	ret
_Z23G_DObjGetLocalTagMatrixP9gentity_sj_10:
	xor eax, eax
	add esp, 0x10
	pop ebx
	pop esi
	pop ebp
	ret
	nop


;G_DObjGetWorldTagMatrix(gentity_s*, unsigned int, float (*) [3])
_Z23G_DObjGetWorldTagMatrixP9gentity_sjPA3_f:
	push ebp
	mov ebp, esp
	push edi
	push esi
	push ebx
	sub esp, 0x9c
	mov edi, [ebp+0x8]
	mov eax, [ebp+0xc]
	mov [esp+0x4], eax
	mov [esp], edi
	call _Z19SV_DObjGetBoneIndexPK9gentity_sj
	mov ebx, eax
	test eax, eax
	js _Z23G_DObjGetWorldTagMatrixP9gentity_sjPA3_f_10
	mov [esp+0x4], eax
	mov [esp], edi
	call _Z14G_DObjCalcBonePK9gentity_si
	mov [esp], edi
	call _Z21SV_DObjGetMatrixArrayPK9gentity_s
	shl ebx, 0x5
	mov esi, eax
	add esi, ebx
	jz _Z23G_DObjGetWorldTagMatrixP9gentity_sjPA3_f_10
	lea ebx, [ebp-0x6c]
	mov [esp+0x4], ebx
	lea eax, [edi+0x148]
	mov [esp], eax
	call _Z12AnglesToAxisPKfPA3_f
	lea edx, [edi+0x13c]
	mov eax, [edi+0x13c]
	mov [ebp-0x48], eax
	mov eax, [edx+0x4]
	mov [ebp-0x44], eax
	mov eax, [edx+0x8]
	mov [ebp-0x40], eax
	movss xmm1, dword [esi+0x1c]
	movaps xmm4, xmm1
	mulss xmm4, [esi]
	movaps xmm6, xmm1
	mulss xmm6, [esi+0x4]
	mulss xmm1, [esi+0x8]
	movaps xmm0, xmm4
	mulss xmm0, [esi]
	movss [ebp-0x84], xmm0
	movss xmm3, dword [esi+0x4]
	movaps xmm5, xmm4
	mulss xmm5, xmm3
	movss xmm2, dword [esi+0x8]
	movaps xmm0, xmm4
	mulss xmm0, xmm2
	movss [ebp-0x80], xmm0
	movss xmm0, dword [esi+0xc]
	mulss xmm4, xmm0
	mulss xmm3, xmm6
	movss [ebp-0x7c], xmm3
	movaps xmm7, xmm6
	mulss xmm7, xmm2
	mulss xmm6, xmm0
	movaps xmm3, xmm1
	mulss xmm3, xmm2
	mulss xmm1, xmm0
	movss [ebp-0x8c], xmm1
	movss xmm0, dword [ebp-0x7c]
	addss xmm0, xmm3
	movss xmm2, dword [_float_1_00000000]
	movaps xmm1, xmm2
	subss xmm1, xmm0
	movss [ebp-0x3c], xmm1
	movss xmm0, dword [ebp-0x8c]
	addss xmm0, xmm5
	movss [ebp-0x38], xmm0
	movss xmm0, dword [ebp-0x80]
	subss xmm0, xmm6
	movss [ebp-0x34], xmm0
	subss xmm5, [ebp-0x8c]
	movss [ebp-0x30], xmm5
	addss xmm3, [ebp-0x84]
	movaps xmm0, xmm2
	subss xmm0, xmm3
	movss [ebp-0x2c], xmm0
	movaps xmm0, xmm4
	addss xmm0, xmm7
	movss [ebp-0x28], xmm0
	addss xmm6, [ebp-0x80]
	movss [ebp-0x24], xmm6
	subss xmm7, xmm4
	movss [ebp-0x20], xmm7
	movss xmm1, dword [ebp-0x84]
	addss xmm1, [ebp-0x7c]
	subss xmm2, xmm1
	movss [ebp-0x1c], xmm2
	mov eax, [ebp+0x10]
	mov [esp+0x8], eax
	mov [esp+0x4], ebx
	lea eax, [ebp-0x3c]
	mov [esp], eax
	call _Z14MatrixMultiplyPA3_KfS1_PA3_f
	mov eax, [ebp+0x10]
	add eax, 0x24
	mov [esp+0x8], eax
	mov [esp+0x4], ebx
	lea eax, [esi+0x10]
	mov [esp], eax
	call _Z23MatrixTransformVector43PKfPA3_S_Pf
	mov eax, 0x1
	add esp, 0x9c
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret
_Z23G_DObjGetWorldTagMatrixP9gentity_sjPA3_f_10:
	xor eax, eax
	add esp, 0x9c
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret


;G_FindConfigstringIndex(char const*, int, int, int, char const*)
_Z23G_FindConfigstringIndexPKciiiS0_:
	push ebp
	mov ebp, esp
	push edi
	push esi
	push ebx
	sub esp, 0x1c
	mov edi, [ebp+0x10]
	mov ebx, [ebp+0x8]
	test ebx, ebx
	jz _Z23G_FindConfigstringIndexPKciiiS0__10
	mov eax, [ebp+0x8]
	cmp byte [eax], 0x0
	jz _Z23G_FindConfigstringIndexPKciiiS0__10
	cmp dword [ebp+0xc], 0x334
	jle _Z23G_FindConfigstringIndexPKciiiS0__20
	mov [esp], eax
	call _Z22SL_FindLowercaseStringPKc
	mov esi, eax
	mov ecx, [ebp+0x14]
	test ecx, ecx
	jnz _Z23G_FindConfigstringIndexPKciiiS0__30
_Z23G_FindConfigstringIndexPKciiiS0__60:
	cmp edi, 0x1
	jg _Z23G_FindConfigstringIndexPKciiiS0__40
_Z23G_FindConfigstringIndexPKciiiS0__150:
	mov edx, [ebp+0x14]
	test edx, edx
	jnz _Z23G_FindConfigstringIndexPKciiiS0__50
	mov eax, [ebp+0x18]
	test eax, eax
	jz _Z23G_FindConfigstringIndexPKciiiS0__10
	mov ecx, [ebp+0x8]
	mov [esp+0x8], ecx
	mov eax, [ebp+0x18]
	mov [esp+0x4], eax
	mov dword [esp], _cstring_s_s_not_precache
	call _Z2vaPKcz
	mov [esp], eax
	call _Z9Scr_ErrorPKc
	xor ebx, ebx
_Z23G_FindConfigstringIndexPKciiiS0__80:
	mov eax, ebx
	add esp, 0x1c
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret
_Z23G_FindConfigstringIndexPKciiiS0__20:
	mov edx, [ebp+0x8]
	mov [esp], edx
	call _Z13SL_FindStringPKc
	mov esi, eax
	mov ecx, [ebp+0x14]
	test ecx, ecx
	jz _Z23G_FindConfigstringIndexPKciiiS0__60
_Z23G_FindConfigstringIndexPKciiiS0__30:
	mov ecx, [ebp+0x8]
	mov [esp], ecx
	call _Z29CCS_GetConstConfigStringIndexPKc
	test eax, eax
	js _Z23G_FindConfigstringIndexPKciiiS0__60
	mov [esp], eax
	call _Z35CCS_GetConfigStringNumForConstIndexi
	mov ebx, eax
	cmp [ebp+0xc], eax
	jg _Z23G_FindConfigstringIndexPKciiiS0__60
	mov eax, [ebp+0xc]
	add eax, edi
	cmp ebx, eax
	jge _Z23G_FindConfigstringIndexPKciiiS0__60
	mov [esp], ebx
	call _Z23SV_GetConfigstringConsti
	cmp esi, eax
	jz _Z23G_FindConfigstringIndexPKciiiS0__70
	mov eax, [ebp+0x8]
	mov [esp+0x4], eax
	mov [esp], ebx
	call _Z18SV_SetConfigstringiPKc
_Z23G_FindConfigstringIndexPKciiiS0__70:
	sub ebx, [ebp+0xc]
	jmp _Z23G_FindConfigstringIndexPKciiiS0__80
_Z23G_FindConfigstringIndexPKciiiS0__10:
	xor ebx, ebx
	mov eax, ebx
	add esp, 0x1c
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret
_Z23G_FindConfigstringIndexPKciiiS0__50:
	cmp edi, 0x1
	jg _Z23G_FindConfigstringIndexPKciiiS0__90
	mov ebx, 0x1
_Z23G_FindConfigstringIndexPKciiiS0__130:
	cmp edi, ebx
	jz _Z23G_FindConfigstringIndexPKciiiS0__100
_Z23G_FindConfigstringIndexPKciiiS0__170:
	mov ecx, [ebp+0x8]
	mov [esp+0x4], ecx
	mov edx, [ebp+0xc]
	lea eax, [ebx+edx]
	mov [esp], eax
	call _Z18SV_SetConfigstringiPKc
	mov eax, ebx
	add esp, 0x1c
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret
_Z23G_FindConfigstringIndexPKciiiS0__90:
	mov ebx, 0x1
	jmp _Z23G_FindConfigstringIndexPKciiiS0__110
_Z23G_FindConfigstringIndexPKciiiS0__120:
	add ebx, 0x1
	cmp edi, ebx
	jz _Z23G_FindConfigstringIndexPKciiiS0__100
_Z23G_FindConfigstringIndexPKciiiS0__110:
	mov edx, [ebp+0xc]
	lea esi, [ebx+edx]
	mov [esp], esi
	call _Z23SV_GetConfigstringConsti
	mov ecx, scr_const
	movzx edx, word [ecx]
	cmp eax, edx
	jnz _Z23G_FindConfigstringIndexPKciiiS0__120
	mov [esp], esi
	call _Z31CCS_IsConfigStringIndexConstanti
	test eax, eax
	jnz _Z23G_FindConfigstringIndexPKciiiS0__120
	jmp _Z23G_FindConfigstringIndexPKciiiS0__130
_Z23G_FindConfigstringIndexPKciiiS0__40:
	mov ebx, 0x1
_Z23G_FindConfigstringIndexPKciiiS0__140:
	mov edx, [ebp+0xc]
	lea eax, [ebx+edx]
	mov [esp], eax
	call _Z23SV_GetConfigstringConsti
	cmp esi, eax
	jz _Z23G_FindConfigstringIndexPKciiiS0__80
	add ebx, 0x1
	cmp edi, ebx
	jnz _Z23G_FindConfigstringIndexPKciiiS0__140
	jmp _Z23G_FindConfigstringIndexPKciiiS0__150
_Z23G_FindConfigstringIndexPKciiiS0__100:
	mov eax, [ebp+0x8]
	mov [esp+0x8], eax
	mov dword [esp+0x4], _cstring_warning_abandoni
	mov dword [esp], 0xe
	call _Z16Com_PrintWarningiPKcz
	cmp edi, 0x1
	jg _Z23G_FindConfigstringIndexPKciiiS0__160
	mov ebx, 0x1
_Z23G_FindConfigstringIndexPKciiiS0__190:
	cmp edi, ebx
	jnz _Z23G_FindConfigstringIndexPKciiiS0__170
_Z23G_FindConfigstringIndexPKciiiS0__210:
	mov dword [esp+0x4], _cstring_g_findconfigstri
	mov dword [esp], 0xf
	call _Z10Com_PrintfiPKcz
	mov [esp+0x8], edi
	mov dword [esp+0x4], _cstring_dumping_these_i_
	mov dword [esp], 0xf
	call _Z10Com_PrintfiPKcz
	cmp edi, 0x1
	jg _Z23G_FindConfigstringIndexPKciiiS0__180
	mov ebx, 0x1
_Z23G_FindConfigstringIndexPKciiiS0__230:
	mov eax, [ebp+0x8]
	mov [esp+0x8], eax
	mov edx, [ebp+0xc]
	mov [esp+0x4], edx
	mov dword [esp], _cstring_g_findconfigstri1
	call _Z2vaPKcz
	mov [esp+0x4], eax
	mov dword [esp], 0x2
	call _Z9Com_Error11errorParm_tPKcz
	jmp _Z23G_FindConfigstringIndexPKciiiS0__170
_Z23G_FindConfigstringIndexPKciiiS0__160:
	mov ebx, 0x1
	mov esi, scr_const
_Z23G_FindConfigstringIndexPKciiiS0__200:
	mov edx, [ebp+0xc]
	lea eax, [ebx+edx]
	mov [esp], eax
	call _Z23SV_GetConfigstringConsti
	movzx edx, word [esi]
	cmp eax, edx
	jz _Z23G_FindConfigstringIndexPKciiiS0__190
	add ebx, 0x1
	cmp edi, ebx
	jnz _Z23G_FindConfigstringIndexPKciiiS0__200
	jmp _Z23G_FindConfigstringIndexPKciiiS0__210
_Z23G_FindConfigstringIndexPKciiiS0__180:
	mov ebx, 0x1
_Z23G_FindConfigstringIndexPKciiiS0__220:
	mov ecx, [ebp+0xc]
	lea eax, [ebx+ecx]
	mov [esp], eax
	call _Z23SV_GetConfigstringConsti
	mov [esp], eax
	call _Z18SL_ConvertToStringj
	mov [esp+0xc], eax
	mov [esp+0x8], ebx
	mov dword [esp+0x4], _cstring_i_s
	mov dword [esp], 0xf
	call _Z10Com_PrintfiPKcz
	add ebx, 0x1
	cmp edi, ebx
	jnz _Z23G_FindConfigstringIndexPKciiiS0__220
	mov ebx, edi
	jmp _Z23G_FindConfigstringIndexPKciiiS0__230
	nop


;G_DObjGetWorldBoneIndexPos(gentity_s*, int, float*)
_Z26G_DObjGetWorldBoneIndexPosP9gentity_siPf:
	push ebp
	mov ebp, esp
	push edi
	push esi
	push ebx
	sub esp, 0x4c
	mov ebx, [ebp+0x8]
	mov esi, [ebp+0xc]
	mov [esp+0x4], esi
	mov [esp], ebx
	call _Z14G_DObjCalcBonePK9gentity_si
	mov [esp], ebx
	call _Z21SV_DObjGetMatrixArrayPK9gentity_s
	mov edi, eax
	lea eax, [ebp-0x48]
	mov [esp+0x4], eax
	lea eax, [ebx+0x148]
	mov [esp], eax
	call _Z12AnglesToAxisPKfPA3_f
	lea edx, [ebx+0x13c]
	mov eax, [ebx+0x13c]
	mov [ebp-0x24], eax
	mov eax, [edx+0x4]
	mov [ebp-0x20], eax
	mov eax, [edx+0x8]
	mov [ebp-0x1c], eax
	mov eax, [ebp+0x10]
	mov [esp+0x8], eax
	lea eax, [ebp-0x48]
	mov [esp+0x4], eax
	shl esi, 0x5
	lea eax, [edi+esi+0x10]
	mov [esp], eax
	call _Z23MatrixTransformVector43PKfPA3_S_Pf
	add esp, 0x4c
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret


;G_DObjGetLocalBoneIndexMatrix(gentity_s*, int)
_Z29G_DObjGetLocalBoneIndexMatrixP9gentity_si:
	push ebp
	mov ebp, esp
	push esi
	push ebx
	sub esp, 0x10
	mov esi, [ebp+0x8]
	mov ebx, [ebp+0xc]
	mov [esp+0x4], ebx
	mov [esp], esi
	call _Z14G_DObjCalcBonePK9gentity_si
	mov [esp], esi
	call _Z21SV_DObjGetMatrixArrayPK9gentity_s
	shl ebx, 0x5
	add eax, ebx
	add esp, 0x10
	pop ebx
	pop esi
	pop ebp
	ret


;G_DObjGetWorldBoneIndexMatrix(gentity_s*, int, float (*) [3])
_Z29G_DObjGetWorldBoneIndexMatrixP9gentity_siPA3_f:
	push ebp
	mov ebp, esp
	push edi
	push esi
	push ebx
	sub esp, 0x9c
	mov esi, [ebp+0x8]
	mov ebx, [ebp+0xc]
	mov edi, [ebp+0x10]
	mov [esp+0x4], ebx
	mov [esp], esi
	call _Z14G_DObjCalcBonePK9gentity_si
	mov [esp], esi
	call _Z21SV_DObjGetMatrixArrayPK9gentity_s
	shl ebx, 0x5
	lea ebx, [eax+ebx]
	mov [ebp-0x88], ebx
	lea ebx, [ebp-0x6c]
	mov [esp+0x4], ebx
	lea eax, [esi+0x148]
	mov [esp], eax
	call _Z12AnglesToAxisPKfPA3_f
	lea edx, [esi+0x13c]
	mov eax, [esi+0x13c]
	mov [ebp-0x48], eax
	mov eax, [edx+0x4]
	mov [ebp-0x44], eax
	mov eax, [edx+0x8]
	mov [ebp-0x40], eax
	mov eax, [ebp-0x88]
	movss xmm1, dword [eax+0x1c]
	movaps xmm4, xmm1
	mulss xmm4, [eax]
	movaps xmm6, xmm1
	mulss xmm6, [eax+0x4]
	mulss xmm1, [eax+0x8]
	movaps xmm0, xmm4
	mulss xmm0, [eax]
	movss [ebp-0x84], xmm0
	movss xmm3, dword [eax+0x4]
	movaps xmm5, xmm4
	mulss xmm5, xmm3
	movss xmm2, dword [eax+0x8]
	movaps xmm0, xmm4
	mulss xmm0, xmm2
	movss [ebp-0x80], xmm0
	movss xmm0, dword [eax+0xc]
	mulss xmm4, xmm0
	mulss xmm3, xmm6
	movss [ebp-0x7c], xmm3
	movaps xmm7, xmm6
	mulss xmm7, xmm2
	mulss xmm6, xmm0
	movaps xmm3, xmm1
	mulss xmm3, xmm2
	mulss xmm1, xmm0
	movss [ebp-0x8c], xmm1
	movss xmm0, dword [ebp-0x7c]
	addss xmm0, xmm3
	movss xmm2, dword [_float_1_00000000]
	movaps xmm1, xmm2
	subss xmm1, xmm0
	movss [ebp-0x3c], xmm1
	movss xmm0, dword [ebp-0x8c]
	addss xmm0, xmm5
	movss [ebp-0x38], xmm0
	movss xmm0, dword [ebp-0x80]
	subss xmm0, xmm6
	movss [ebp-0x34], xmm0
	subss xmm5, [ebp-0x8c]
	movss [ebp-0x30], xmm5
	addss xmm3, [ebp-0x84]
	movaps xmm0, xmm2
	subss xmm0, xmm3
	movss [ebp-0x2c], xmm0
	movaps xmm0, xmm4
	addss xmm0, xmm7
	movss [ebp-0x28], xmm0
	addss xmm6, [ebp-0x80]
	movss [ebp-0x24], xmm6
	subss xmm7, xmm4
	movss [ebp-0x20], xmm7
	movss xmm1, dword [ebp-0x84]
	addss xmm1, [ebp-0x7c]
	subss xmm2, xmm1
	movss [ebp-0x1c], xmm2
	mov [esp+0x8], edi
	mov [esp+0x4], ebx
	lea eax, [ebp-0x3c]
	mov [esp], eax
	call _Z14MatrixMultiplyPA3_KfS1_PA3_f
	add edi, 0x24
	mov [esp+0x8], edi
	mov [esp+0x4], ebx
	mov eax, [ebp-0x88]
	add eax, 0x10
	mov [esp], eax
	call _Z23MatrixTransformVector43PKfPA3_S_Pf
	add esp, 0x9c
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret


;G_Find(gentity_s*, int, unsigned short)
_Z6G_FindP9gentity_sit:
	push ebp
	mov ebp, esp
	push edi
	push esi
	push ebx
	mov eax, [ebp+0x8]
	movzx esi, word [ebp+0x10]
	test eax, eax
	jz _Z6G_FindP9gentity_sit_10
	lea ebx, [eax+0x274]
	mov edi, g_entities
_Z6G_FindP9gentity_sit_60:
	mov eax, level
	mov edx, [eax+0xc]
	lea eax, [edx+edx*8]
	lea eax, [edx+eax*2]
	mov ecx, eax
	shl ecx, 0x5
	add eax, ecx
	add eax, edx
	add eax, edi
	cmp ebx, eax
	jae _Z6G_FindP9gentity_sit_20
	mov ecx, ebx
	add ecx, [ebp+0xc]
_Z6G_FindP9gentity_sit_50:
	cmp byte [ebx+0x100], 0x0
	jz _Z6G_FindP9gentity_sit_30
	movzx edx, word [ecx]
	test dx, dx
	jz _Z6G_FindP9gentity_sit_30
	cmp dx, si
	jz _Z6G_FindP9gentity_sit_40
_Z6G_FindP9gentity_sit_30:
	add ebx, 0x274
	add ecx, 0x274
	cmp ebx, eax
	jb _Z6G_FindP9gentity_sit_50
_Z6G_FindP9gentity_sit_20:
	xor ebx, ebx
_Z6G_FindP9gentity_sit_40:
	mov eax, ebx
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret
_Z6G_FindP9gentity_sit_10:
	mov ebx, g_entities
	mov edi, ebx
	jmp _Z6G_FindP9gentity_sit_60
	add [eax], al


;G_rand()
_Z6G_randv:
	push ebp
	mov ebp, esp
	pop ebp
	jmp _Z7ms_randv
	nop


;G_Spawn()
_Z7G_Spawnv:
	push ebp
	mov ebp, esp
	push edi
	push esi
	push ebx
	sub esp, 0x5c
	mov esi, level
	mov ebx, [esi+0x10]
	test ebx, ebx
	jz _Z7G_Spawnv_10
	mov eax, [esi+0x1ec]
	sub eax, [ebx+0x184]
	cmp eax, 0x1f3
	jle _Z7G_Spawnv_20
_Z7G_Spawnv_50:
	mov eax, [ebx+0x270]
	mov [esi+0x10], eax
	test eax, eax
	jz _Z7G_Spawnv_30
_Z7G_Spawnv_120:
	mov dword [ebx+0x270], 0x0
	jmp _Z7G_Spawnv_40
_Z7G_Spawnv_20:
	cmp dword [esi+0xc], 0x3fd
	jg _Z7G_Spawnv_50
_Z7G_Spawnv_10:
	cmp dword [esi+0xc], 0x3fe
	jz _Z7G_Spawnv_60
_Z7G_Spawnv_110:
	mov edx, [esi+0xc]
	lea eax, [edx+edx*8]
	lea eax, [edx+eax*2]
	mov ecx, eax
	shl ecx, 0x5
	add eax, ecx
	lea ebx, [eax+edx]
	add ebx, [esi+0x4]
	add edx, 0x1
	mov [esi+0xc], edx
	mov dword [esp+0x10], 0x3184
	mov eax, [esi]
	mov [esp+0xc], eax
	mov dword [esp+0x8], 0x274
	mov [esp+0x4], edx
	mov eax, [esi+0x4]
	mov [esp], eax
	call _Z17SV_LocateGameDataP9gentity_siiP13playerState_si
_Z7G_Spawnv_40:
	mov dword [ebx+0x270], 0x0
	mov byte [ebx+0x100], 0x1
	mov eax, scr_const
	movzx eax, word [eax+0x56]
	mov [esp+0x4], eax
	lea eax, [ebx+0x170]
	mov [esp], eax
	call _Z13Scr_SetStringPtj
	mov eax, ebx
	sub eax, g_entities
	sar eax, 0x2
	imul eax, eax, 0x2c0685b5
	mov [ebx], eax
	mov dword [ebx+0x184], 0x0
	mov dword [ebx+0x188], 0x0
	mov eax, ebx
	add esp, 0x5c
	pop ebx
	pop esi
	pop edi
	pop ebp
	ret
_Z7G_Spawnv_60:
	xor edi, edi
	mov ebx, g_entities
	jmp _Z7G_Spawnv_70
_Z7G_Spawnv_90:
	mov eax, _cstring_null
_Z7G_Spawnv_100:
	movsd xmm0, qword [ebp-0x30]
	movsd [esp+0x20], xmm0
	movsd xmm0, qword [ebp-0x28]
	movsd [esp+0x18], xmm0
	movsd xmm0, qword [ebp-0x20]
	movsd [esp+0x10], xmm0
	mov [esp+0xc], eax
	mov [esp+0x8], edi
	mov dword [esp+0x4], _cstring_4i_s_origin_f_f_
	mov dword [esp], 0xf
	call _Z10Com_PrintfiPKcz
	add edi, 0x1
	add ebx, 0x274
	cmp edi, [esi+0xc]
	jge _Z7G_Spawnv_80
_Z7G_Spawnv_70:
	cvtss2sd xmm0, [ebx+0x144]
	movsd [ebp-0x30], xmm0
	cvtss2sd xmm0, [ebx+0x140]
	movsd [ebp-0x28], xmm0
	cvtss2sd xmm0, [ebx+0x13c]
	movsd [ebp-0x20], xmm0
	movzx eax, word [ebx+0x170]
	test ax, ax
	jz _Z7G_Spawnv_90
	movzx eax, ax
	mov [esp], eax
	call _Z18SL_ConvertToStringj
	jmp _Z7G_Spawnv_100
_Z7G_Spawnv_80:
	mov dword [esp+0x4], _cstring_g_spawn_no_free_
	mov dword [esp], 0x2
	call _Z9Com_Error11errorParm_tPKcz
	jmp _Z7G_Spawnv_110
_Z7G_Spawnv_30:
	mov dword [esi+0x14], 0x0
	jmp _Z7G_Spawnv_120


;G_irand(int, int)
_Z7G_irandii:
	push ebp
	mov ebp, esp
	push esi
	push ebx
	mov esi, [ebp+0x8]
	mov ebx, [ebp+0xc]
	call _Z7ms_randv
	sub ebx, esi
	imul eax, ebx
	lea edx, [eax+0x7fff]
	cmp eax, 0xffffffff
	cmovle eax, edx
	sar eax, 0xf
	lea eax, [esi+eax]
	pop ebx
	pop esi
	pop ebp
	ret
	nop


;G_flrand(float, float)
_Z8G_flrandff:
	push ebp
	mov ebp, esp
	sub esp, 0x28
	movss xmm1, dword [ebp+0x8]
	movss [ebp-0x18], xmm1
	call _Z7ms_randv
	cvtsi2ss xmm0, eax
	movss xmm1, dword [ebp-0x18]
	movss xmm2, dword [ebp+0xc]
	subss xmm2, xmm1
	mulss xmm0, xmm2
	mulss xmm0, [_float_0_00003052]
	addss xmm1, xmm0
	movss [ebp-0x1c], xmm1
	fld dword [ebp-0x1c]
	leave
	ret
	nop


;G_random()
_Z8G_randomv:
	push ebp
	mov ebp, esp
	sub esp, 0x18
	call _Z7ms_randv
	cvtsi2ss xmm0, eax
	mulss xmm0, [_float_0_00003052]
	movss [ebp-0xc], xmm0
	fld dword [ebp-0xc]
	leave
	ret
	nop


;G_crandom()
_Z9G_crandomv:
	push ebp
	mov ebp, esp
	sub esp, 0x18
	call _Z7ms_randv
	cvtsi2ss xmm0, eax
	mulss xmm0, [_float_0_00003052]
	addss xmm0, xmm0
	subss xmm0, [_float_1_00000000]
	movss [ebp-0xc], xmm0
	fld dword [ebp-0xc]
	leave
	ret
	nop


;Initialized global or static variables of g_utils_mp:
SECTION .data
_ZZ22G_LocalizedStringIndexPKcE12origErrorMsg: dd _cstring_localized_string, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0
entityTypeNames: dd _cstring_et_general, _cstring_et_player, _cstring_et_player_corpse, _cstring_et_item, _cstring_et_missile, _cstring_et_invisible, _cstring_et_scriptmover, _cstring_et_sound_blend, _cstring_et_fx, _cstring_et_loop_fx, _cstring_et_primary_light, _cstring_et_mg42, _cstring_et_helicopter, _cstring_et_plane, _cstring_et_vehicle, _cstring_et_vehicle_collm, _cstring_et_vehicle_corps


;Initialized constant data of g_utils_mp:
SECTION .rdata


;Zero initialized global or static variables of g_utils_mp:
SECTION .bss
cached_models: resb 0x800


;All cstrings:
SECTION .rdata
_cstring_model_s_not_prec:		db "model ",27h,"%s",27h," not precached",0
_cstring_g_modelindex_ove:		db 015h,"G_ModelIndex: overflow",0
_cstring_warning_abandoni:		db "Warning: abandoning const config string model slot for string %s",0ah,0
_cstring_effect:		db "effect",0
_cstring_material:		db "material",0
_cstring_null:		db 0
_cstring_4i_s_origin_f_f_:		db "%4i: ",27h,"%s",27h,", origin: %f %f %f",0ah,0
_cstring_warning_s_s_not_:		db "WARNING: %s ",22h,"%s",22h," not precached",0ah,0
_cstring_s_s_not_precache:		db "%s ",22h,"%s",22h," not precached",0
_cstring_g_findconfigstri:		db "G_FindConfigstringIndex: overflow...",0ah,0
_cstring_dumping_these_i_:		db "Dumping these %i Config Strings:",0ah,0
_cstring_g_findconfigstri1:		db 015h,"G_FindConfigstringIndex: overflow (%d): ",27h,"%s",27h,0
_cstring_i_s:		db "%i: %s",0ah,0
_cstring_g_spawn_no_free_:		db 015h,"G_Spawn: no free entities",0
_cstring_localized_string:		db "localized string",0
_cstring_et_general:		db "ET_GENERAL",0
_cstring_et_player:		db "ET_PLAYER",0
_cstring_et_player_corpse:		db "ET_PLAYER_CORPSE",0
_cstring_et_item:		db "ET_ITEM",0
_cstring_et_missile:		db "ET_MISSILE",0
_cstring_et_invisible:		db "ET_INVISIBLE",0
_cstring_et_scriptmover:		db "ET_SCRIPTMOVER",0
_cstring_et_sound_blend:		db "ET_SOUND_BLEND",0
_cstring_et_fx:		db "ET_FX",0
_cstring_et_loop_fx:		db "ET_LOOP_FX",0
_cstring_et_primary_light:		db "ET_PRIMARY_LIGHT",0
_cstring_et_mg42:		db "ET_MG42",0
_cstring_et_helicopter:		db "ET_HELICOPTER",0
_cstring_et_plane:		db "ET_PLANE",0
_cstring_et_vehicle:		db "ET_VEHICLE",0
_cstring_et_vehicle_collm:		db "ET_VEHICLE_COLLMAP",0
_cstring_et_vehicle_corps:		db "ET_VEHICLE_CORPSE",0



;All constant floats and doubles:
SECTION .rdata
_float_1_00000000:		dd 0x3f800000	; 1
_float_0_00100000:		dd 0x3a83126f	; 0.001
_float_0_00003052:		dd 0x38000000	; 3.05176e-05

