请仔细阅读和分析下面函数,进行优化后,采用C/C++11标准,完整推导并重构可编译的全部代码
特别注意:
1.保持所有原始逻辑功能不变
2.提高执行效率,降低计算复杂度
3.已经给定的结构体名字和元素不要更改,详细的中文注释
4.自动添加中文注释说明功能逻辑
5.不使用 auto,使用显式 for 循环
6.结构体采用32位定义
7.不要使用小函数,保持原始的函数定义
将 HDDMXng::Chip::Chip
映射为
message Chip
{
optional uint32 numsites = 1;
optional uint32 numrows = 2;
optional uint32 numcols = 3;
optional uint32 rpmgridx = 4;
optional uint32 rpmgridy = 5;
optional sint32 extremaxmin = 6;
optional sint32 extremaxmax = 7;
optional sint32 extremaymin = 8;
optional sint32 extremaymax = 9;
optional string chip = 10;
optional string arch = 11;
}
HDDMDevice *__cdecl HDDMDeviceCache::loadDevice(HDDMDeviceCache *this, const HSTString *a2, const HSTString *a3)
{
void *v3; // ecx
size_t v4; // esi
int i; // edi
HDDMDevice *v6; // ebp
const void *dwordD8; // edx
int *v8; // edi
bool v9; // al
HDDMDevice *v10; // eax
int Env; // edi
unsigned __int16 word4; // si
unsigned __int16 word6; // di
unsigned int v14; // eax
int v15; // ebp
int v16; // edx
int v17; // eax
int v18; // edi
int v19; // ecx
int v20; // esi
int v21; // edx
unsigned int v22; // eax
int v23; // ecx
unsigned int v24; // eax
int v25; // esi
int v26; // edx
int v27; // eax
int v28; // ecx
__int16 v29; // ax
int v30; // esi
int v31; // esi
int v32; // esi
HDDMTilePort *v33; // edi
int v34; // esi
int v35; // esi
int v36; // esi
int v37; // esi
int v38; // esi
int v39; // esi
int v40; // eax
int v41; // eax
int v42; // edi
int v43; // esi
int v44; // eax
int v45; // edi
int v46; // edi
int v47; // edi
int v48; // edi
int v49; // edi
int v50; // edi
int v51; // eax
int v52; // eax
unsigned __int8 *TileType; // edi
unsigned __int16 v54; // ax
int v55; // ecx
int v56; // eax
int v57; // esi
int v58; // edx
unsigned __int8 *v59; // edi
unsigned __int16 v60; // ax
int v61; // ecx
int v62; // eax
int v63; // esi
int v64; // edx
int v66; // edi
int v67; // esi
HDDMOracle *v68; // esi
void *v69; // ebp
_BYTE *v70; // esi
int v71; // eax
int v72; // eax
int v73; // esi
int v74; // edi
char *v75; // eax
int v76; // eax
stlp_std::__malloc_alloc *v77; // edi
_BYTE *v78; // eax
int v79; // eax
_BYTE *v80; // eax
int v81; // edi
void *exception; // esi
HPAParamMgr *s1; // [esp+0h] [ebp-8DCh]
void *s1a; // [esp+0h] [ebp-8DCh]
void *s2b; // [esp+4h] [ebp-8D8h]
const char *s2c; // [esp+4h] [ebp-8D8h]
void *s2; // [esp+4h] [ebp-8D8h]
unsigned int *s2a; // [esp+4h] [ebp-8D8h]
_BYTE *n; // [esp+8h] [ebp-8D4h]
size_t na; // [esp+8h] [ebp-8D4h]
size_t nd; // [esp+8h] [ebp-8D4h]
char *nb; // [esp+8h] [ebp-8D4h]
size_t ne; // [esp+8h] [ebp-8D4h]
char *nc; // [esp+8h] [ebp-8D4h]
HDDMTilePort **v95; // [esp+Ch] [ebp-8D0h]
HDDMTilePort **v96; // [esp+Ch] [ebp-8D0h]
_BYTE *v97; // [esp+10h] [ebp-8CCh]
void *v98; // [esp+14h] [ebp-8C8h]
char v99; // [esp+30h] [ebp-8ACh]
unsigned int j; // [esp+30h] [ebp-8ACh]
void *v101; // [esp+30h] [ebp-8ACh]
int v102; // [esp+38h] [ebp-8A4h]
int v103; // [esp+38h] [ebp-8A4h]
int v104; // [esp+48h] [ebp-894h]
int v105; // [esp+48h] [ebp-894h]
int v106; // [esp+48h] [ebp-894h]
int v107; // [esp+48h] [ebp-894h]
stlp_std::__malloc_alloc *v108; // [esp+4Ch] [ebp-890h]
stlp_std::__malloc_alloc *v109; // [esp+4Ch] [ebp-890h]
stlp_std::__malloc_alloc *v110; // [esp+4Ch] [ebp-890h]
unsigned __int16 v111; // [esp+50h] [ebp-88Ch]
int v112; // [esp+50h] [ebp-88Ch]
HDDMTile **ParamMgr; // [esp+54h] [ebp-888h]
int v114; // [esp+5Ch] [ebp-880h]
int v115; // [esp+60h] [ebp-87Ch]
int v116; // [esp+60h] [ebp-87Ch]
int v117; // [esp+64h] [ebp-878h]
int v118; // [esp+6Ch] [ebp-870h]
int v119; // [esp+6Ch] [ebp-870h]
int v120; // [esp+74h] [ebp-868h]
int v121; // [esp+7Ch] [ebp-860h]
HDDMDevice *Device; // [esp+80h] [ebp-85Ch]
int v123; // [esp+90h] [ebp-84Ch]
char ValueAsBool; // [esp+9Bh] [ebp-841h]
unsigned int v125; // [esp+9Ch] [ebp-840h]
char v126; // [esp+B0h] [ebp-82Ch] BYREF
char v127; // [esp+D0h] [ebp-80Ch] BYREF
char v128; // [esp+DCh] [ebp-800h] BYREF
char v129; // [esp+DDh] [ebp-7FFh] BYREF
char v130; // [esp+DEh] [ebp-7FEh] BYREF
unsigned __int16 v131[8]; // [esp+E0h] [ebp-7FCh] BYREF
unsigned __int16 v132[6]; // [esp+F0h] [ebp-7ECh] BYREF
unsigned __int16 v133; // [esp+FCh] [ebp-7E0h] BYREF
unsigned __int16 v134; // [esp+FEh] [ebp-7DEh] BYREF
HDDMTile *v135; // [esp+100h] [ebp-7DCh] BYREF
HDDMTilePort *v136; // [esp+110h] [ebp-7CCh] BYREF
HDDMTile *v137; // [esp+120h] [ebp-7BCh] BYREF
HDDMTilePort *v138; // [esp+130h] [ebp-7ACh] BYREF
_BYTE v139[16]; // [esp+140h] [ebp-79Ch] BYREF
_BYTE *v140; // [esp+150h] [ebp-78Ch]
unsigned int v141; // [esp+154h] [ebp-788h]
_BYTE v142[16]; // [esp+160h] [ebp-77Ch] BYREF
int v143; // [esp+170h] [ebp-76Ch]
void *v144; // [esp+174h] [ebp-768h]
_BYTE v145[16]; // [esp+180h] [ebp-75Ch] BYREF
int v146; // [esp+190h] [ebp-74Ch]
void *v147; // [esp+194h] [ebp-748h]
_BYTE v148[16]; // [esp+1A0h] [ebp-73Ch] BYREF
int v149; // [esp+1B0h] [ebp-72Ch]
void *v150; // [esp+1B4h] [ebp-728h]
_BYTE v151[16]; // [esp+1C0h] [ebp-71Ch] BYREF
int v152; // [esp+1D0h] [ebp-70Ch]
int v153; // [esp+1D4h] [ebp-708h]
_BYTE v154[16]; // [esp+1E0h] [ebp-6FCh] BYREF
char *v155; // [esp+1F0h] [ebp-6ECh]
int v156; // [esp+1F4h] [ebp-6E8h]
_DWORD v157[4]; // [esp+200h] [ebp-6DCh] BYREF
int v158; // [esp+210h] [ebp-6CCh]
void *v159; // [esp+214h] [ebp-6C8h]
unsigned int v160[4]; // [esp+220h] [ebp-6BCh] BYREF
unsigned int *v161; // [esp+230h] [ebp-6ACh]
unsigned int *v162; // [esp+234h] [ebp-6A8h]
_BYTE v163[16]; // [esp+240h] [ebp-69Ch] BYREF
int v164; // [esp+250h] [ebp-68Ch]
int v165; // [esp+254h] [ebp-688h]
_DWORD v166[4]; // [esp+260h] [ebp-67Ch] BYREF
int v167; // [esp+270h] [ebp-66Ch]
void *v168; // [esp+274h] [ebp-668h]
int v169[4]; // [esp+280h] [ebp-65Ch] BYREF
int *v170; // [esp+290h] [ebp-64Ch]
int *v171; // [esp+294h] [ebp-648h]
_DWORD v172[4]; // [esp+2A0h] [ebp-63Ch] BYREF
char *v173; // [esp+2B0h] [ebp-62Ch]
char *v174; // [esp+2B4h] [ebp-628h]
_BYTE v175[16]; // [esp+2C0h] [ebp-61Ch] BYREF
int v176; // [esp+2D0h] [ebp-60Ch]
int v177; // [esp+2D4h] [ebp-608h]
_DWORD v178[4]; // [esp+2E0h] [ebp-5FCh] BYREF
int v179; // [esp+2F0h] [ebp-5ECh]
void *v180; // [esp+2F4h] [ebp-5E8h]
_BYTE v181[24]; // [esp+300h] [ebp-5DCh] BYREF
_BYTE v182[24]; // [esp+318h] [ebp-5C4h] BYREF
_BYTE v183[24]; // [esp+330h] [ebp-5ACh] BYREF
_BYTE v184[24]; // [esp+348h] [ebp-594h] BYREF
_BYTE v185[24]; // [esp+360h] [ebp-57Ch] BYREF
_BYTE v186[24]; // [esp+378h] [ebp-564h] BYREF
int v187[6]; // [esp+390h] [ebp-54Ch] BYREF
_BYTE v188[16]; // [esp+3D8h] [ebp-504h] BYREF
int v189; // [esp+3E8h] [ebp-4F4h]
void *v190; // [esp+3ECh] [ebp-4F0h]
_BYTE v191[24]; // [esp+3F0h] [ebp-4ECh] BYREF
_BYTE v192[24]; // [esp+408h] [ebp-4D4h] BYREF
_BYTE v193[24]; // [esp+420h] [ebp-4BCh] BYREF
_BYTE v194[24]; // [esp+438h] [ebp-4A4h] BYREF
_BYTE v195[24]; // [esp+450h] [ebp-48Ch] BYREF
_BYTE v196[24]; // [esp+468h] [ebp-474h] BYREF
_BYTE v197[24]; // [esp+480h] [ebp-45Ch] BYREF
_BYTE v198[24]; // [esp+498h] [ebp-444h] BYREF
_BYTE v199[24]; // [esp+4B0h] [ebp-42Ch] BYREF
_BYTE v200[24]; // [esp+4C8h] [ebp-414h] BYREF
_BYTE v201[24]; // [esp+4E0h] [ebp-3FCh] BYREF
_BYTE v202[24]; // [esp+4F8h] [ebp-3E4h] BYREF
_BYTE v203[24]; // [esp+510h] [ebp-3CCh] BYREF
_BYTE v204[24]; // [esp+528h] [ebp-3B4h] BYREF
_BYTE v205[24]; // [esp+540h] [ebp-39Ch] BYREF
_BYTE v206[24]; // [esp+558h] [ebp-384h] BYREF
_BYTE v207[24]; // [esp+570h] [ebp-36Ch] BYREF
_BYTE v208[24]; // [esp+588h] [ebp-354h] BYREF
int v209[4]; // [esp+5A0h] [ebp-33Ch] BYREF
int *v210; // [esp+5B0h] [ebp-32Ch]
int *v211; // [esp+5B4h] [ebp-328h]
_BYTE v212[28]; // [esp+5C4h] [ebp-318h] BYREF
_BYTE v213[40]; // [esp+5E0h] [ebp-2FCh] BYREF
int v214; // [esp+608h] [ebp-2D4h]
int v215; // [esp+60Ch] [ebp-2D0h]
_BYTE v216[8]; // [esp+650h] [ebp-28Ch] BYREF
int v217; // [esp+658h] [ebp-284h] BYREF
_BYTE *v218; // [esp+660h] [ebp-27Ch]
void *v219; // [esp+664h] [ebp-278h]
_BYTE v220[8]; // [esp+668h] [ebp-274h] BYREF
char v221; // [esp+670h] [ebp-26Ch]
_BYTE *v222; // [esp+678h] [ebp-264h]
_BYTE *v223; // [esp+67Ch] [ebp-260h]
__int16 v224; // [esp+680h] [ebp-25Ch]
__int16 v225; // [esp+682h] [ebp-25Ah]
__int16 v226; // [esp+684h] [ebp-258h]
__int16 v227; // [esp+686h] [ebp-256h]
__int16 v228; // [esp+688h] [ebp-254h]
__int16 v229; // [esp+68Ah] [ebp-252h]
int v230[148]; // [esp+68Ch] [ebp-250h] BYREF
HUTRuntime::HUTRuntime((HUTRuntime *)v212, 1);
ParamMgr = (HDDMTile **)HPAParamMgr::getParamMgr(s1);
n = v216;
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(
v181,
"device.trackDeviceDataLoading");
ValueAsBool = HPAParamMgr::getValueAsBool(ParamMgr, v181);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v181);
if ( ValueAsBool )
{
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(
v199,
"trackDeviceDataLoading");
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(v198, "device");
v98 = &locret_1000002;
v97 = v199;
v95 = (HDDMTilePort **)v198;
n = (_BYTE *)(elf_hash_bucket + 454);
ComMsgMgr::sendScopedMsg::eval(2, "device/devmodel/HDDMDevice.cxx");
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v198);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v199);
}
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(v182, (int)a2);
sub_8D7F97(s1a, s2b, n, v95, v97, v98);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v182);
v3 = v219;
v4 = v218 - (_BYTE *)v219;
for ( i = 0; i != 16; ++i )
{
v6 = this->m_devices[i];
if ( v6 )
{
dwordD8 = (const void *)v6->dwordD8;
if ( v4 == v6->dwordD4 - (_DWORD)dwordD8 )
{
v101 = v3;
v51 = memcmp(v3, dwordD8, v4);
v3 = v101;
if ( !v51 )
{
++v6->nCurrDevice;
if ( ValueAsBool )
{
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(
v201,
"trackDeviceDataLoading");
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(
v200,
"device");
ComMsgMgr::sendScopedMsg::eval(2, "device/devmodel/HDDMDevice.cxx");
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v200);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v201);
}
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v216);
goto LABEL_88;
}
}
}
}
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v216);
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(v184, "");
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(v183, "");
Device = (HDDMDevice *)HDDMDeviceCache::createDevice(this, (const HSTString *)v183, (const HSTString *)v184);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v183);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v184);
++Device->nCurrDevice;
v131[0] = 0;
v133 = 0;
HDDMDeviceCache::getFileTypeAndVersion(this, a2, v131, &v133);
if ( (unsigned __int16)(v131[0] - 2) > 1u )
{
exception = __cxa_allocate_exception(0x20u);
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(v186, (int)a2);
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(
v185,
"File is not a chip or device XNG:");
sub_68FB83(v186);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v185);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v186);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'HEXDataException,
(void (*)(void *))HEXDataException::~HEXDataException);
}
v140 = v139;
v141 = (unsigned int)v139;
v139[0] = 0;
v8 = (int *)v142;
v143 = (int)v142;
v144 = v142;
v142[0] = 0;
if ( v131[0] == 2 )
{
isl::iostreams::filtering_stream<boost::iostreams::input,char,stlp_std::char_traits<char>,stlp_std::allocator<char>,boost::iostreams::public_>::filtering_stream(
v216,
*((_DWORD *)a2 + 5),
4,
0);
sub_8D8DC4();
HDDMXng::Chip::Chip((HDDMXng::Chip *)v213);
HDDMDevice::readMessage((int)&v217, (google::protobuf::MessageLite *)v213);
if ( (_BYTE *)v215 != v139 )
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_assign(
(int)v139,
*(void **)(v215 + 20),
*(_DWORD *)(v215 + 16));
if ( (_BYTE *)v214 != v142 )
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_assign(
(int)v142,
*(void **)(v214 + 20),
*(_DWORD *)(v214 + 16));
HDDMXng::Chip::~Chip((HDDMXng::Chip *)v213);
isl::iostreams::filtering_stream<boost::iostreams::input,char,stlp_std::char_traits<char>,stlp_std::allocator<char>,boost::iostreams::public_>::~filtering_stream(v216);
}
else
{
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(v187, (int)a2);
v8 = (int *)v216;
HUBSimpleScanner::HUBSimpleScanner((HUBSimpleScanner *)v216, (int)v187);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v187);
HUBSimpleScanner::scanTargetWord((HUBSimpleScanner *)v216, "xngd", 1);
HUBSimpleScanner::scanInt((HUBSimpleScanner *)v216, 1, "version number");
HUBSimpleScanner::scanWord((HUBSimpleScanner *)v145, (bool)v216, (const char *)&dword_0 + 1);
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_assign((int)v139, v147, v146);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v145);
HUBSimpleScanner::scanWord((HUBSimpleScanner *)v148, (bool)v216, (const char *)&dword_0 + 1);
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_assign((int)v142, v150, v149);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v148);
HUBSimpleScanner::~HUBSimpleScanner((HUBSimpleScanner *)v216);
}
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(v151, (int)a3);
if ( v153 == v152 )
{
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(v154, (int)a2);
v158 = (int)v157;
v159 = v157;
v70 = &v140[-v141 + 5];
if ( &v140[-v141] != (_BYTE *)-5 )
{
if ( (unsigned int)v70 <= 0x10 )
{
v71 = (int)v157;
}
else
{
v71 = stlp_std::__malloc_alloc::allocate((stlp_std::__malloc_alloc *)&v140[-v141 + 5], (unsigned int)s2);
v159 = (void *)v71;
v158 = v71;
v157[0] = &v70[v71];
}
*(_BYTE *)v71 = 0;
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_append(v157, v141, v140);
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_appendT<char const*>(
(int)v157,
".xng",
(int)"");
v108 = (stlp_std::__malloc_alloc *)"/";
v72 = stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::rfind(v154, "/", -1, 1);
if ( v72 != -1 )
{
v104 = v72 + 1;
v73 = v156;
if ( v72 + 1 <= (unsigned int)&v155[-v156] )
{
if ( v158 - (int)v159 > (unsigned int)(-3 - v72) )
{
v66 = sub_68FB2C();
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v73);
v67 = v66;
LABEL_89:
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v151);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v142);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v139);
HUTRuntime::~HUTRuntime((HUTRuntime *)v212);
_Unwind_Resume(v67, s2a, nc, v96);
}
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_replace(
(int)v154,
(void *)(v104 + v156),
v155,
v159,
v158,
0);
v70 = v213;
isl::iostreams::filtering_stream<boost::iostreams::input,char,stlp_std::char_traits<char>,stlp_std::allocator<char>,boost::iostreams::public_>::filtering_stream(
v213,
v156,
4,
0);
if ( (v213[32] & 5) == 0 )
{
LABEL_106:
isl::iostreams::filtering_stream<boost::iostreams::input,char,stlp_std::char_traits<char>,stlp_std::allocator<char>,boost::iostreams::public_>::~filtering_stream(v70);
LABEL_107:
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(
v188,
(int)v154);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v157);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v154);
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_assign(
(int)v151,
v190,
v189);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v188);
goto LABEL_11;
}
v170 = v169;
v171 = v169;
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_allocate_block(
(int)v169,
(stlp_std::__malloc_alloc *)&v140[-v141 + 7]);
*(_BYTE *)v170 = 0;
v96 = (HDDMTilePort **)&v126;
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_appendT<char const*>(
(int)v169,
"../../",
(int)"");
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_append(
v169,
v141,
v140);
v173 = (char *)v172;
v174 = (char *)v172;
v74 = (char *)v170 - (char *)v171 + 2;
if ( (char *)v170 - (char *)v171 == -2 )
{
v81 = sub_68FB2C();
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v169);
LABEL_124:
isl::iostreams::filtering_stream<boost::iostreams::input,char,stlp_std::char_traits<char>,stlp_std::allocator<char>,boost::iostreams::public_>::~filtering_stream(v70);
v67 = v81;
goto LABEL_108;
}
if ( (unsigned int)((char *)v170 - (char *)v171 + 2) <= 0x10 )
{
v75 = (char *)v172;
}
else
{
v75 = (char *)stlp_std::__malloc_alloc::allocate(
(stlp_std::__malloc_alloc *)((char *)v170 - (char *)v171 + 2),
(unsigned int)s2a);
v174 = v75;
v173 = v75;
v172[0] = &v75[v74];
}
*v75 = 0;
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_append(
v172,
v171,
v170);
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_appendT<char const*>(
(int)v172,
"/",
(int)"");
v8 = v209;
v210 = v209;
v211 = v209;
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_allocate_block(
(int)v209,
(stlp_std::__malloc_alloc *)(v173 - v174 + v158 - (_DWORD)v159 + 1));
*(_BYTE *)v210 = 0;
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_append(
v209,
v174,
v173);
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_append(
v209,
v159,
v158);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v172);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v169);
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::replace(
v154,
v104,
-1,
v209);
isl::iostreams::filtering_stream<boost::iostreams::input,char,stlp_std::char_traits<char>,stlp_std::allocator<char>,boost::iostreams::public_>::filtering_stream(
v216,
v156,
4,
0);
if ( (v221 & 5) == 0 )
goto LABEL_105;
LABEL_120:
v161 = v160;
v162 = v160;
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_allocate_block(
(int)v160,
(stlp_std::__malloc_alloc *)&v140[-v141 + 10]);
*(_BYTE *)v161 = 0;
v96 = (HDDMTilePort **)&v127;
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_appendT<char const*>(
(int)v160,
"../../../",
(int)"");
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_append(
v160,
v141,
v140);
nc = (char *)v108;
s2a = v160;
stlp_std::operator+<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>(v163);
v79 = v164 - v165 + v158 - (_DWORD)v159;
v167 = (int)v166;
v168 = v166;
v110 = (stlp_std::__malloc_alloc *)(v79 + 1);
if ( v79 != -1 )
{
if ( (unsigned int)v110 <= 0x10 )
{
v80 = v166;
}
else
{
v80 = (_BYTE *)stlp_std::__malloc_alloc::allocate(v110, (unsigned int)v160);
v168 = v80;
v167 = (int)v80;
v166[0] = (char *)v110 + (_DWORD)v80;
}
*v80 = 0;
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_append(
v166,
v165,
v164);
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_append(
v166,
v159,
v158);
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_assign(
(int)v8,
v168,
v167);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v166);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v163);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v160);
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::replace(
v154,
v104,
-1,
v8);
LABEL_105:
isl::iostreams::filtering_stream<boost::iostreams::input,char,stlp_std::char_traits<char>,stlp_std::allocator<char>,boost::iostreams::public_>::~filtering_stream(v216);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v8);
goto LABEL_106;
}
v103 = sub_68FB2C();
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v160);
isl::iostreams::filtering_stream<boost::iostreams::input,char,stlp_std::char_traits<char>,stlp_std::allocator<char>,boost::iostreams::public_>::~filtering_stream(v216);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v8);
v81 = v103;
goto LABEL_124;
}
stlp_std::__stl_throw_out_of_range((stlp_std *)"basic_string", (const char *)s2a);
}
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_assign(
(int)v154,
v159,
v158);
isl::iostreams::filtering_stream<boost::iostreams::input,char,stlp_std::char_traits<char>,stlp_std::allocator<char>,boost::iostreams::public_>::filtering_stream(
v216,
v156,
4,
0);
if ( (v221 & 5) != 0 )
{
nc = "_";
s2a = (unsigned int *)v139;
stlp_std::operator+<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>(v175);
v76 = *((_DWORD *)a2 + 4) - *((_DWORD *)a2 + 5);
v179 = (int)v178;
v180 = v178;
v77 = (stlp_std::__malloc_alloc *)(v76 + v176 - v177 + 1);
if ( !v77 )
{
v67 = sub_68FB2C();
isl::iostreams::filtering_stream<boost::iostreams::input,char,stlp_std::char_traits<char>,stlp_std::allocator<char>,boost::iostreams::public_>::~filtering_stream(v216);
LABEL_108:
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v157);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v154);
goto LABEL_89;
}
v78 = v178;
if ( (unsigned int)v77 > 0x10 )
{
v78 = (_BYTE *)stlp_std::__malloc_alloc::allocate(v77, (unsigned int)v139);
v180 = v78;
v179 = (int)v78;
v178[0] = (char *)v77 + (_DWORD)v78;
}
*v78 = 0;
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_append(v178, v177, v176);
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_append(
v178,
*((_DWORD *)a2 + 5),
*((_DWORD *)a2 + 4));
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_assign(
(int)v154,
v180,
v179);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v178);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v175);
}
isl::iostreams::filtering_stream<boost::iostreams::input,char,stlp_std::char_traits<char>,stlp_std::allocator<char>,boost::iostreams::public_>::~filtering_stream(v216);
goto LABEL_107;
}
sub_68FB2C();
goto LABEL_120;
}
LABEL_11:
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(v191, (int)v151);
HDDMDevice::setloadpaths(Device, a2, (const HSTString *)v191);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v191);
v134 = 0;
v132[0] = 0;
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(v192, (int)v151);
HDDMDeviceCache::getFileTypeAndVersion(this, (const HSTString *)v192, &v134, v132);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v192);
if ( v134 != 1 )
{
v69 = __cxa_allocate_exception(0x20u);
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(v194, (int)v151);
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(
v193,
"File is not an architecture XNG:");
sub_68FB83(v194);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v193);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v194);
__cxa_throw(
v69,
(struct type_info *)&`typeinfo for'HEXDataException,
(void (*)(void *))HEXDataException::~HEXDataException);
}
HDDMDevice::readarch_pb(Device, (int)v151, v132[0]);
v9 = v131[0] == 3;
Device->byte149 = v131[0] == 3;
if ( v9 )
{
HDDMDevice::readdevice(Device, (int)a2);
}
else
{
v218 = v216;
v219 = v216;
v216[0] = 0;
v222 = v220;
v223 = v220;
v220[0] = 0;
v224 = -1;
v225 = -1;
v226 = -1;
v227 = -1;
v228 = -1;
v229 = -1;
v230[4] = (int)v230;
v230[5] = (int)v230;
LOBYTE(v230[0]) = 0;
memset(&v230[6], 0, 16);
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_assign(
(int)v220,
"chip",
(int)"");
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_assign((int)v216, v144, v143);
if ( a2 != (const HSTString *)v230 )
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::_M_assign(
(int)v230,
*((void **)a2 + 5),
*((_DWORD *)a2 + 4));
v224 = 0;
v225 = 0;
v226 = 0;
v227 = 0;
v228 = 0;
v229 = 0;
HDDMDevice::readchip_pb(Device, (HDDMChipDesc *)v216);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v230);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v220);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v216);
}
v10 = Device;
if ( !Device->dword54 )
{
HDDMDevice::createRPMGrid(Device);
v10 = Device;
}
HDDMDevice::createRoutingDS(v10);
HDDMDevice::setrecursivedeviceid(Device, Device->byte0 & 0xF);
HDDMDevice::postprocess(Device);
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(
v195,
"device.disableTemplateLoading");
v99 = HPAParamMgr::getValueAsBool(ParamMgr, v195);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v195);
if ( !v99 )
{
HDDMTemplateIO::HDDMTemplateIO((HDDMTemplateIO *)v216);
HDDMTemplateIO::loadTemplateData((HDDMTemplateIO *)v216, Device);
HDDMTemplateIO::~HDDMTemplateIO((HDDMTemplateIO *)v216);
}
HDDMNodeAdjuster::HDDMNodeAdjuster((HDDMNodeAdjuster *)v216, Device);
HDDMNodeAdjuster::performAdjustments((HPAParamMgr *)v216, (int)&Device->charC4);
HDDMNodeAdjuster::~HDDMNodeAdjuster((HDDMNodeAdjuster *)v216);
HDDMDevice::suppressCostcodes(Device);
HUTEnv::HUTEnv((HUTEnv *)&v130);
Env = HUTEnv::getEnv((HUTEnv *)"DEVMODEL_CHECKTILEPORTS", s2c);
HUTEnv::~HUTEnv((HUTEnv *)&v130);
if ( Env )
{
sub_8D99FC();
word4 = Device->word4;
if ( !((unsigned __int16)Device->word6 * word4) )
goto LABEL_70;
word6 = Device->word6;
v125 = 0;
v14 = 0;
while ( 1 )
{
v15 = Device->dword9C + 48 * v14;
v16 = *(_DWORD *)(*(_DWORD *)(HDDMDeviceCache::m_devcache[*(_BYTE *)(v15 + 3) >> 4] + 136)
+ 4 * (*(_WORD *)(v15 + 6) >> 6));
v17 = *(_DWORD *)(v16 + 332);
if ( !(unsigned __int16)((*(_DWORD *)(v16 + 336) - v17) >> 2) )
goto LABEL_69;
v18 = *(_DWORD *)(v16 + 336);
v123 = 0;
do
{
v121 = *(_DWORD *)(v17 + 4 * v123);
v19 = *(_DWORD *)(v121 + 32);
v20 = *(_DWORD *)(v121 + 36);
if ( !(unsigned __int16)((v20 - v19) >> 2) )
goto LABEL_67;
v120 = 0;
do
{
v102 = *(_DWORD *)(v19 + 4 * v120);
v21 = *(_DWORD *)(v102 + 32);
v22 = (*(_DWORD *)(v102 + 36) - v21) >> 2;
if ( !v22 )
goto LABEL_65;
for ( j = 0; j < v22; ++j )
{
v33 = 0;
if ( v22 > (unsigned __int16)j )
v33 = *(HDDMTilePort **)(v21 + 4 * (unsigned __int16)j);
v135 = 0;
v136 = 0;
if ( (unsigned __int8)HDDMTile::getMatchingPort((HDDMTile *)v15, v33, &v135, &v136) )
{
v107 = *((_DWORD *)v136 + 1);
v117 = *(_DWORD *)v136 + 8;
HDDMTile::getName((HDDMTile *)v208);
v112 = *((_DWORD *)v33 + 1);
HDDMTile::getName((HDDMTile *)v207);
sub_8D99FC();
v34 = sub_8D9601();
stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v34, ".");
v35 = stlp_std::operator<<<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>(v34, v102 + 8);
stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v35, "[");
v36 = stlp_std::priv::__put_num<char,stlp_std::char_traits<char>,unsigned long>(v35, v112, na);
stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v36, "]");
stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v36, " => ");
v37 = stlp_std::operator<<<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>(v36, v208);
stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v37, ".");
v38 = stlp_std::operator<<<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>(v37, v117);
stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v38, "[");
v39 = stlp_std::priv::__put_num<char,stlp_std::char_traits<char>,unsigned long>(v38, v107, nd);
stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v39, "]");
stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v39, "\n");
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v207);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v208);
v137 = 0;
v138 = 0;
HDDMTile::getMatchingPort(v135, v136, &v137, &v138);
if ( v138 )
v114 = *(_DWORD *)v138;
else
v114 = 0;
if ( (HDDMTile *)v15 != v137 )
{
HDDMTile::getName((HDDMTile *)v206);
if ( v137 )
{
HDDMTile::getName((HDDMTile *)v205);
}
else
{
nb = &v129;
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(
v205,
"NULL");
}
sub_8D99FC();
v118 = sub_8D9601();
stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v118, " should be ");
v40 = stlp_std::operator<<<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>(v118, v206);
stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v40, "\n");
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v205);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v206);
}
if ( v102 != v114 )
{
if ( v114 )
{
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(
v204,
v114 + 8);
}
else
{
nb = &v128;
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(
v204,
"NULL");
}
sub_8D99FC();
v115 = sub_8D9601();
stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v115, " should be ");
v41 = stlp_std::operator<<<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>(v115, v102 + 8);
stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v41, "\n");
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v204);
}
if ( v33 != v138 )
{
v42 = *((_DWORD *)v33 + 1);
sub_8D99FC();
v43 = sub_8D97CB();
stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v43, " should be ");
v44 = stlp_std::priv::__put_num<char,stlp_std::char_traits<char>,unsigned long>(v43, v42, nb);
stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v44, "\n");
v33 = v138;
}
v116 = *((_DWORD *)v33 + 1);
HDDMTile::getName((HDDMTile *)v203);
v119 = *((_DWORD *)v136 + 1);
HDDMTile::getName((HDDMTile *)v202);
sub_8D99FC();
v45 = sub_8D9601();
stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v45, ".");
v46 = stlp_std::operator<<<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>(v45, v117);
stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v46, "[");
v47 = stlp_std::priv::__put_num<char,stlp_std::char_traits<char>,unsigned long>(v46, v119, nb);
stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v47, "]");
stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v47, " => ");
v48 = stlp_std::operator<<<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>(v47, v203);
stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v48, ".");
v49 = stlp_std::operator<<<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>(v48, v114 + 8);
stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v49, "[");
v50 = stlp_std::priv::__put_num<char,stlp_std::char_traits<char>,unsigned long>(v49, v116, ne);
stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v50, "]");
stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v50, "\n");
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v202);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v203);
}
else
{
if ( !v135 )
goto LABEL_34;
v23 = HDDMDeviceCache::m_devcache[*(_BYTE *)(v15 + 3) >> 4];
v24 = -1431655765 * ((v15 - *(_DWORD *)(v23 + 156)) >> 4);
v109 = (stlp_std::__malloc_alloc *)*(unsigned __int16 *)(v23 + 6);
v105 = v24 % (unsigned int)v109;
v25 = *(unsigned __int16 *)(v23 + 4);
v26 = v25 - 1 - v24 / (unsigned int)v109;
v27 = *(_DWORD *)(*(_DWORD *)(v23 + 136) + 4 * (*(_WORD *)(v15 + 6) >> 6));
v28 = *(unsigned __int16 *)(v27 + 24);
v111 = *(_WORD *)(v27 + 26);
v29 = ***(_WORD ***)v33;
if ( v29 == 1 )
{
if ( (stlp_std::__malloc_alloc *)(v105 + v28) != v109 )
goto LABEL_33;
}
else if ( v29 )
{
if ( v29 == 2 )
{
if ( (_WORD)v26 )
goto LABEL_33;
}
else if ( v29 == 3 && (_WORD)v105 )
{
LABEL_33:
v106 = *((_DWORD *)v33 + 1);
HDDMTile::getName((HDDMTile *)v209);
sub_8D99FC();
v30 = sub_8D9601();
stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v30, ".");
v31 = stlp_std::operator<<<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>(v30, v102 + 8);
stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v31, "[");
v32 = stlp_std::priv::__put_num<char,stlp_std::char_traits<char>,unsigned long>(v31, v106, na);
stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v32, "]");
stlp_std::basic_ostream<char,stlp_std::char_traits<char>>::_M_put_nowiden(v32, "\n");
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v209);
}
}
else if ( v111 + (unsigned __int16)v26 != (unsigned __int16)v25 )
{
goto LABEL_33;
}
}
LABEL_34:
v21 = *(_DWORD *)(v102 + 32);
v22 = (*(_DWORD *)(v102 + 36) - v21) >> 2;
}
v19 = *(_DWORD *)(v121 + 32);
v20 = *(_DWORD *)(v121 + 36);
LABEL_65:
++v120;
}
while ( v120 < (unsigned __int16)((v20 - v19) >> 2) );
v52 = *(_DWORD *)(*(_DWORD *)(HDDMDeviceCache::m_devcache[*(_BYTE *)(v15 + 3) >> 4] + 136)
+ 4 * (*(_WORD *)(v15 + 6) >> 6));
v18 = *(_DWORD *)(v52 + 336);
v17 = *(_DWORD *)(v52 + 332);
LABEL_67:
++v123;
}
while ( v123 < (unsigned __int16)((v18 - v17) >> 2) );
word4 = Device->word4;
word6 = Device->word6;
LABEL_69:
v14 = ++v125;
if ( v125 >= word6 * (unsigned int)word4 )
{
LABEL_70:
sub_8D99FC();
break;
}
}
}
if ( !Device->dword1E4 )
{
v68 = (HDDMOracle *)operator new(0x64u);
HDDMOracle::HDDMOracle(v68, Device);
Device->dword1E4 = v68;
}
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(v196, "RCLK_INT_L");
TileType = (unsigned __int8 *)HDDMDevice::getTileType(Device, (const HSTString *)v196);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v196);
if ( TileType )
{
v54 = *((_WORD *)TileType + 1) >> 2;
v55 = (unsigned __int16)(v54 | (*TileType << 14));
if ( v54 | (unsigned __int16)(*TileType << 14) )
{
v56 = 0;
v57 = 0;
do
{
v58 = v56 + *((_DWORD *)TileType + 41);
if ( (*(_BYTE *)(v58 + 3) & 8) != 0 )
*(_BYTE *)(v58 + 1) |= 0x10u;
++v57;
v56 += 24;
}
while ( v55 > v57 );
}
}
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(v197, "RCLK_INT_R");
v59 = (unsigned __int8 *)HDDMDevice::getTileType(Device, (const HSTString *)v197);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v197);
if ( v59 )
{
v60 = *((_WORD *)v59 + 1) >> 2;
v61 = (unsigned __int16)(v60 | (*v59 << 14));
if ( v60 | (unsigned __int16)(*v59 << 14) )
{
v62 = 0;
v63 = 0;
do
{
v64 = v62 + *((_DWORD *)v59 + 41);
if ( (*(_BYTE *)(v64 + 3) & 8) != 0 )
*(_BYTE *)(v64 + 1) |= 0x10u;
++v63;
v62 += 24;
}
while ( v61 > v63 );
}
}
if ( ValueAsBool )
{
HUTRuntime::getWallSecs((HUTRuntime *)v212);
HUTRuntime::getUserSecs((HUTRuntime *)v212);
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(
v216,
"trackDeviceDataLoading");
stlp_std::basic_string<char,stlp_std::char_traits<char>,stlp_std::allocator<char>>::basic_string(v213, "device");
ComMsgMgr::sendScopedMsg::eval(3, "device/devmodel/HDDMDevice.cxx");
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v213);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v216);
}
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v151);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v142);
stlp_std::priv::_String_base<char,stlp_std::allocator<char>>::_M_deallocate_block(v139);
v6 = Device;
LABEL_88:
HUTRuntime::~HUTRuntime((HUTRuntime *)v212);
return v6;
}