C++学习(四七零)std::ofstream

本文介绍了osgDB库中ofstream类的使用方法,包括构造函数、打开文件、写入数据等基本操作。通过示例代码展示了如何创建ofstream对象并进行简单的文件写入。

    osgDB::ofstream out("abc.txt");
    out<<"aaa";
    out.flush();
    out.close();
osgDB/fstream
class ofstream : public std::ofstream
{
public:
    OSGDB_EXPORT ofstream();
    OSGDB_EXPORT explicit ofstream(const char* filename,
        std::ios_base::openmode mode = std::ios_base::out);
    OSGDB_EXPORT ~ofstream();

    void OSGDB_EXPORT open(const char* filename,
        std::ios_base::openmode mode = std::ios_base::out);
};

请仔细阅读和分析下面函数,进行优化后,采用C/C++11标准,完整推导并重构可编译的全部代码 特别注意: 1.保持所有原始功能不变 2.提高执行效率,降低计算复杂度 3.已经给定的结构体名字和元素不要更改,详细的中文注释 4.自动添加中文注释说明功能逻辑 5.不使用 auto,使用显式 for 循环 6.结构体采用32位定义 7.不要使用小函数,保持原始的函数定义 __int64 __fastcall hddp::Driver::parse_file(hddp::Driver *this, const std::string *a2) { std::ostream *v3; // rbx __int64 v4; // rax _BYTE *v5; // rbp char v6; // al std::ostream *v7; // rax __int64 v8; // r15 char *v9; // rbp char *v10; // rax __int64 v11; // rax _BYTE *v12; // r12 char v13; // al std::ostream *v14; // rax __int64 v15; // r12 __int64 v16; // r12 std::ostream *v17; // r12 __int64 v18; // rax _BYTE *v19; // r14 char v20; // al std::ostream *v21; // rax char *v22; // r13 unsigned int v23; // r12d __int64 v24; // rdi __int64 v26; // rax _BYTE *v27; // r12 char v28; // al std::ostream *v29; // rax __int64 v30; // rax _BYTE *v31; // r12 char v32; // al std::ostream *v33; // rax __int64 v34; // rax _BYTE *v35; // r12 char v36; // al std::ostream *v37; // rax __int64 v38; // r12 std::ostream *v39; // r12 _BYTE *v40; // r14 char v41; // al __int64 v42; // rax _BYTE *v43; // r12 char v44; // al std::ostream *v45; // rax unsigned __int16 v46; // r12 std::ostream *v47; // r15 __int64 v48; // rax _BYTE *v49; // r12 char v50; // al std::ostream *v51; // rax __int64 v52; // rsi size_t n; // rdx __int64 v54; // rax _BYTE *v55; // rbp char v56; // al std::ostream *v57; // rax __int64 v58; // rbp std::ostream *v59; // rbp _BYTE *v60; // r12 char v61; // al std::ostream *v62; // rax char *v63; // rdi char *v64; // rdi __int64 v65; // rax _BYTE *v66; // r12 char v67; // al std::ostream *v68; // rax __int64 v69; // r12 unsigned int v70; // r12d __int64 v71; // rax _BYTE *v72; // rbp char v73; // al std::ostream *v74; // rax __int64 v75; // rbp __int64 v76; // rbp __int64 v77; // rax _BYTE *v78; // r12 char v79; // al std::ostream *v80; // rax __int64 *v81; // rax __int64 v82; // rdi char **v83; // rax char **v84; // rax unsigned __int64 v85; // rsi __int64 *v86; // rax char *v87; // rdi char *v88; // rdi __int64 v89; // rdi __int64 v90; // rdi __int64 v91; // rbp __int64 v92; // rax __int64 v93; // rbp __int64 v94; // rax _BYTE *v95; // rbp char v96; // al std::ostream *v97; // rax std::ostream *v98; // r14 __int64 v99; // rax _BYTE *v100; // rbp char v101; // al std::ostream *v102; // rax std::ostream *v103; // r14 __int64 v104; // rax _BYTE *v105; // rbp char v106; // al std::ostream *v107; // rax __int64 v108; // rax _BYTE *v109; // rbp char v110; // al std::ostream *v111; // rax HDDMDevice *Device; // rax __int64 v113; // rdx __int64 v114; // rdx __int64 v115; // rdi __int64 v116; // rdi __int64 v117; // rax _BYTE *v118; // r12 char v119; // al std::ostream *v120; // rax __int64 v121; // r12 int v122; // eax int v123; // eax int v124; // eax int v125; // edx int v126; // edx int v127; // ecx int v128; // esi int v129; // eax int v130; // eax int v131; // ecx int v132; // ecx int v133; // ecx int v134; // esi int v135; // eax int v136; // edx int v137; // eax int v138; // eax int v139; // ecx int v140; // ecx int v141; // edx int v142; // eax int v143; // eax int v144; // edx int v145; // edx char *v146; // [rsp+8h] [rbp-AC0h] char *v148; // [rsp+18h] [rbp-AB0h] __int64 v149; // [rsp+20h] [rbp-AA8h] std::string *Device_1; // [rsp+28h] [rbp-AA0h] std::string *Device_2; // [rsp+28h] [rbp-AA0h] _QWORD v152[2]; // [rsp+60h] [rbp-A68h] BYREF char *v153; // [rsp+70h] [rbp-A58h] BYREF void *s1[2]; // [rsp+80h] [rbp-A48h] BYREF __int64 v155; // [rsp+90h] [rbp-A38h] BYREF _QWORD v156[2]; // [rsp+A0h] [rbp-A28h] BYREF __int64 v157; // [rsp+B0h] [rbp-A18h] BYREF _QWORD v158[2]; // [rsp+C0h] [rbp-A08h] BYREF _QWORD v159[2]; // [rsp+D0h] [rbp-9F8h] BYREF _QWORD v160[2]; // [rsp+E0h] [rbp-9E8h] BYREF _QWORD v161[2]; // [rsp+F0h] [rbp-9D8h] BYREF _BYTE v162[272]; // [rsp+100h] [rbp-9C8h] BYREF char *v163; // [rsp+210h] [rbp-8B8h] BYREF _QWORD v164[7]; // [rsp+218h] [rbp-8B0h] BYREF __int64 v165; // [rsp+250h] [rbp-878h] BYREF __int64 v166; // [rsp+280h] [rbp-848h] BYREF _QWORD v167[28]; // [rsp+308h] [rbp-7C0h] BYREF char v168; // [rsp+3E8h] [rbp-6E0h] char v169; // [rsp+3E9h] [rbp-6DFh] __int64 v170; // [rsp+3F0h] [rbp-6D8h] __int64 v171; // [rsp+3F8h] [rbp-6D0h] __int64 v172; // [rsp+400h] [rbp-6C8h] __int64 v173; // [rsp+408h] [rbp-6C0h] char *v174; // [rsp+410h] [rbp-6B8h] BYREF _QWORD v175[7]; // [rsp+418h] [rbp-6B0h] BYREF __int64 v176; // [rsp+450h] [rbp-678h] BYREF __int64 v177; // [rsp+480h] [rbp-648h] BYREF _QWORD v178[28]; // [rsp+508h] [rbp-5C0h] BYREF char v179; // [rsp+5E8h] [rbp-4E0h] char v180; // [rsp+5E9h] [rbp-4DFh] __int64 v181; // [rsp+5F0h] [rbp-4D8h] __int64 v182; // [rsp+5F8h] [rbp-4D0h] __int64 v183; // [rsp+600h] [rbp-4C8h] __int64 v184; // [rsp+608h] [rbp-4C0h] char *v185; // [rsp+610h] [rbp-4B8h] BYREF __int64 v186; // [rsp+618h] [rbp-4B0h] _QWORD v187[7]; // [rsp+620h] [rbp-4A8h] BYREF __int64 v188; // [rsp+658h] [rbp-470h] BYREF __int64 v189; // [rsp+688h] [rbp-440h] BYREF _QWORD v190[4]; // [rsp+710h] [rbp-3B8h] BYREF int v191; // [rsp+730h] [rbp-398h] __int64 v192; // [rsp+7E8h] [rbp-2E0h] char v193; // [rsp+7F0h] [rbp-2D8h] char v194; // [rsp+7F1h] [rbp-2D7h] __int64 v195; // [rsp+7F8h] [rbp-2D0h] __int64 v196; // [rsp+800h] [rbp-2C8h] __int64 v197; // [rsp+808h] [rbp-2C0h] __int64 v198; // [rsp+810h] [rbp-2B8h] _BYTE v199[680]; // [rsp+820h] [rbp-2A8h] BYREF std::string::string((std::string *)v152, a2); std::string::append((std::string *)v152, ".grid", 5u); std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Parsing ", 8); v3 = (std::ostream *)std::__ostream_insert<char,std::char_traits<char>>( &std::cout, v152[0], *(_QWORD *)(v152[0] - 24LL)); std::__ostream_insert<char,std::char_traits<char>>(v3, " to generate the XNG device files.", 34); v4 = *(_QWORD *)(*(_QWORD *)v3 - 24LL); v5 = *(_BYTE **)((char *)v3 + v4 + 240); if ( !v5 ) std::__throw_bad_cast(); if ( v5[56] ) { v6 = v5[67]; } else { std::ctype<char>::_M_widen_init(*(_QWORD *)((char *)v3 + v4 + 240)); v6 = (*(__int64 (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)v5 + 48LL))(v5, 10); } v7 = (std::ostream *)std::ostream::put(v3, v6); std::ostream::flush(v7); v8 = v152[0]; std::ios_base::ios_base((std::ios_base *)v190); v192 = 0; v193 = 0; v194 = 0; v195 = 0; v196 = 0; v197 = 0; v198 = 0; v190[0] = (char *)&`vtable for'std::ios + 16; v9 = (char *)`VTT for'std::ifstream[1]; v10 = (char *)`VTT for'std::ifstream[2]; v185 = v9; v146 = v10; *(char **)((char *)&v185 + *((_QWORD *)v9 - 3)) = v10; v186 = 0; std::ios::init((char *)&v185 + *((_QWORD *)v185 - 3), 0); v185 = (char *)&`vtable for'std::ifstream + 24; v190[0] = (char *)&`vtable for'std::ifstream + 64; std::filebuf::basic_filebuf(v187); std::ios::init(v190, v187); if ( std::filebuf::open(v187, v8, 8) ) std::ios::clear((char *)&v185 + *((_QWORD *)v185 - 3), 0); else std::ios::clear((char *)&v185 + *((_QWORD *)v185 - 3), *(_DWORD *)((char *)&v185 + *((_QWORD *)v185 - 3) + 32) | 4u); if ( !v191 ) { std::string::assign((hddp::Driver *)((char *)this + 8), (const std::string *)v152); hddp::Scanner::Scanner(v199, &v185, (char *)this + 8, 0); hddp::Scanner::set_debug((hddp::Scanner *)v199, *(_BYTE *)this); if ( getenv("TRACE_HDDPSCANNER") ) hddp::Scanner::set_debug((hddp::Scanner *)v199, 1); *((_QWORD *)this + 2) = v199; hddp::Parser::Parser((hddp::Parser *)v162, this); hddp::Parser::set_debug_level((hddp::Parser *)v162, *((unsigned __int8 *)this + 1)); if ( getenv("TRACE_HDDPPARSER") ) hddp::Parser::set_debug_level((hddp::Parser *)v162, 1); if ( (unsigned int)hddp::Parser::parse((hddp::Parser *)v162) ) { v34 = *(_QWORD *)(std::cerr - 24LL); v35 = *(_BYTE **)((char *)&std::cerr + v34 + 240); if ( !v35 ) std::__throw_bad_cast(); if ( v35[56] ) { v36 = v35[67]; } else { std::ctype<char>::_M_widen_init(*(_QWORD *)((char *)&std::cerr + v34 + 240)); v36 = (*(__int64 (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)v35 + 48LL))(v35, 10); } v37 = (std::ostream *)std::ostream::put((std::ostream *)&std::cerr, v36); v38 = std::ostream::flush(v37); std::__ostream_insert<char,std::char_traits<char>>(v38, "ERROR:", 6); std::__ostream_insert<char,std::char_traits<char>>( v38, "/wrk/2016.3/continuous/2016_09_26_1671147/src/shared/device/devparse/HDDPDriver.cxx", 83); std::__ostream_insert<char,std::char_traits<char>>(v38, ":", 1); v39 = (std::ostream *)std::ostream::operator<<(v38, 547); std::__ostream_insert<char,std::char_traits<char>>(v39, ": ", 2); std::__ostream_insert<char,std::char_traits<char>>(v39, "Parsing failed", 14); v40 = *(_BYTE **)((char *)v39 + *(_QWORD *)(*(_QWORD *)v39 - 24LL) + 240); if ( !v40 ) std::__throw_bad_cast(); } else if ( *((_QWORD *)this + 3) ) { std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Checking ...", 12); v26 = *(_QWORD *)(std::cout - 24LL); v27 = *(_BYTE **)((char *)&std::cout + v26 + 240); if ( !v27 ) std::__throw_bad_cast(); if ( v27[56] ) { v28 = v27[67]; } else { std::ctype<char>::_M_widen_init(*(_QWORD *)((char *)&std::cout + v26 + 240)); v28 = (*(__int64 (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)v27 + 48LL))(v27, 10); } v29 = (std::ostream *)std::ostream::put((std::ostream *)&std::cout, v28); std::ostream::flush(v29); (*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 3) + 24LL))(*((_QWORD *)this + 3), 0); if ( hddp::HDDP_Error::numErrors > 0 ) { std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Semantic errors found ... exiting ... ", 38); v30 = *(_QWORD *)(std::cout - 24LL); v31 = *(_BYTE **)((char *)&std::cout + v30 + 240); if ( !v31 ) std::__throw_bad_cast(); if ( v31[56] ) { v32 = v31[67]; } else { std::ctype<char>::_M_widen_init(*(_QWORD *)((char *)&std::cout + v30 + 240)); v32 = (*(__int64 (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)v31 + 48LL))(v31, 10); } v33 = (std::ostream *)std::ostream::put((std::ostream *)&std::cout, v32); goto LABEL_30; } std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Elaborating ...", 15); v42 = *(_QWORD *)(std::cout - 24LL); v43 = *(_BYTE **)((char *)&std::cout + v42 + 240); if ( !v43 ) std::__throw_bad_cast(); if ( v43[56] ) { v44 = v43[67]; } else { std::ctype<char>::_M_widen_init(*(_QWORD *)((char *)&std::cout + v42 + 240)); v44 = (*(__int64 (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)v43 + 48LL))(v43, 10); } v45 = (std::ostream *)std::ostream::put((std::ostream *)&std::cout, v44); std::ostream::flush(v45); (*(void (__fastcall **)(_QWORD))(**((_QWORD **)this + 3) + 32LL))(*((_QWORD *)this + 3)); v46 = *(_WORD *)(*((_QWORD *)this + 3) + 240LL); std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Parsing completed successfully, version ", 40); v47 = (std::ostream *)std::ostream::_M_insert<unsigned long>(&std::cout, v46); v48 = *(_QWORD *)(*(_QWORD *)v47 - 24LL); v49 = *(_BYTE **)((char *)v47 + v48 + 240); if ( !v49 ) std::__throw_bad_cast(); if ( v49[56] ) { v50 = v49[67]; } else { std::ctype<char>::_M_widen_init(*(_QWORD *)((char *)v47 + v48 + 240)); v50 = (*(__int64 (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)v49 + 48LL))(v49, 10); } v51 = (std::ostream *)std::ostream::put(v47, v50); std::ostream::flush(v51); v52 = *(_QWORD *)(*((_QWORD *)this + 3) + 48LL); *((_QWORD *)this + 4) = v52; if ( v52 ) { std::string::string((std::string *)&v153, (const std::string *)(v52 + 48)); std::string::string((std::string *)s1, (const std::string *)(*((_QWORD *)this + 4) + 56LL)); n = *((_QWORD *)s1[0] - 3); if ( n == *(_QWORD *)(*(_QWORD *)a2 - 24LL) && !memcmp(s1[0], *(const void **)a2, n) ) { if ( !std::filebuf::close(v187) ) std::ios::clear( (char *)&v185 + *((_QWORD *)v185 - 3), *(_DWORD *)((char *)&v185 + *((_QWORD *)v185 - 3) + 32) | 4u); hddp::Driver::annotate_tilenames(this, a2); hddp::Driver::annotate_sites(this, a2); v70 = dword_99305D0; if ( !dword_99305D0 ) { HDDMDevice::setrecursivedeviceid(*((HDDMDevice **)this + 4), **((_BYTE **)this + 4) & 0xF); HDDMDevice::printXdlrc(*((HDDMDevice **)this + 4)); std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Generating XNG file names... ", 29); v77 = *(_QWORD *)(std::cout - 24LL); v78 = *(_BYTE **)((char *)&std::cout + v77 + 240); if ( !v78 ) std::__throw_bad_cast(); if ( v78[56] ) { v79 = v78[67]; } else { std::ctype<char>::_M_widen_init(*(_QWORD *)((char *)&std::cout + v77 + 240)); v79 = (*(__int64 (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)v78 + 48LL))(v78, 10); } v80 = (std::ostream *)std::ostream::put((std::ostream *)&std::cout, v79); std::ostream::flush(v80); std::string::string(v156, ".xng", &v163); v81 = (__int64 *)std::string::insert((std::string *)v156, 0, (const char *)s1[0], *((_QWORD *)s1[0] - 3)); v155 = *v81; *v81 = (__int64)&std::string::_Rep::_S_empty_rep_storage + 24; v82 = v156[0] - 24LL; if ( (_UNKNOWN *)(v156[0] - 24LL) != &std::string::_Rep::_S_empty_rep_storage ) { if ( &_pthread_key_create ) { v135 = _InterlockedExchangeAdd((volatile signed __int32 *)(v156[0] - 8LL), 0xFFFFFFFF); } else { v136 = *(_DWORD *)(v156[0] - 8LL); *(_DWORD *)(v156[0] - 8LL) = v136 - 1; v135 = v136; } if ( v135 <= 0 ) std::string::_Rep::_M_destroy(v82, &v174); } std::string::string(v159, ".xng", v160); std::string::string(v158, "_", v156); v83 = (char **)std::string::insert((std::string *)v158, 0, v153, *((_QWORD *)v153 - 3)); v163 = *v83; *v83 = (char *)&std::string::_Rep::_S_empty_rep_storage + 24; v84 = (char **)std::string::append((std::string *)&v163, (const std::string *)s1); v174 = *v84; *v84 = (char *)&std::string::_Rep::_S_empty_rep_storage + 24; v85 = *(_QWORD *)(v159[0] - 24LL) + *((_QWORD *)v174 - 3); if ( v85 <= *((_QWORD *)v174 - 2) || v85 > *(_QWORD *)(v159[0] - 16LL) ) v86 = (__int64 *)std::string::append((std::string *)&v174, (const std::string *)v159); else v86 = (__int64 *)std::string::insert((std::string *)v159, 0, v174, *((_QWORD *)v174 - 3)); v157 = *v86; *v86 = (__int64)&std::string::_Rep::_S_empty_rep_storage + 24; v87 = v174 - 24; if ( v174 - 24 != (char *)&std::string::_Rep::_S_empty_rep_storage ) { if ( &_pthread_key_create ) { v124 = _InterlockedExchangeAdd((volatile signed __int32 *)v174 - 2, 0xFFFFFFFF); } else { v126 = *((_DWORD *)v174 - 2); *((_DWORD *)v174 - 2) = v126 - 1; v124 = v126; } if ( v124 <= 0 ) std::string::_Rep::_M_destroy(v87, v161); } v88 = v163 - 24; if ( v163 - 24 != (char *)&std::string::_Rep::_S_empty_rep_storage ) { if ( &_pthread_key_create ) { v123 = _InterlockedExchangeAdd((volatile signed __int32 *)v163 - 2, 0xFFFFFFFF); } else { v125 = *((_DWORD *)v163 - 2); *((_DWORD *)v163 - 2) = v125 - 1; v123 = v125; } if ( v123 <= 0 ) std::string::_Rep::_M_destroy(v88, &v174); } v89 = v158[0] - 24LL; if ( (_UNKNOWN *)(v158[0] - 24LL) != &std::string::_Rep::_S_empty_rep_storage ) { if ( &_pthread_key_create ) { v143 = _InterlockedExchangeAdd((volatile signed __int32 *)(v158[0] - 8LL), 0xFFFFFFFF); } else { v145 = *(_DWORD *)(v158[0] - 8LL); *(_DWORD *)(v158[0] - 8LL) = v145 - 1; v143 = v145; } if ( v143 <= 0 ) std::string::_Rep::_M_destroy(v89, &v174); } v90 = v159[0] - 24LL; if ( (_UNKNOWN *)(v159[0] - 24LL) != &std::string::_Rep::_S_empty_rep_storage ) { if ( &_pthread_key_create ) { v142 = _InterlockedExchangeAdd((volatile signed __int32 *)(v159[0] - 8LL), 0xFFFFFFFF); } else { v144 = *(_DWORD *)(v159[0] - 8LL); *(_DWORD *)(v159[0] - 8LL) = v144 - 1; v142 = v144; } if ( v142 <= 0 ) std::string::_Rep::_M_destroy(v90, &v174); } v91 = v155; std::ios_base::ios_base((std::ios_base *)v167); v167[27] = 0; v168 = 0; v169 = 0; v170 = 0; v171 = 0; v172 = 0; v173 = 0; v167[0] = (char *)&`vtable for'std::ios + 16; v92 = `VTT for'std::ofstream[2]; v163 = (char *)`VTT for'std::ofstream[1]; v149 = v92; v148 = v163; *(_QWORD *)((char *)&v164[-1] + *((_QWORD *)v163 - 3)) = v92; std::ios::init((char *)&v164[-1] + *((_QWORD *)v163 - 3), 0); v163 = (char *)&`vtable for'std::ofstream + 24; v167[0] = (char *)&`vtable for'std::ofstream + 64; std::filebuf::basic_filebuf(v164); std::ios::init(v167, v164); if ( std::filebuf::open(v164, v91, 20) ) std::ios::clear((char *)&v164[-1] + *((_QWORD *)v163 - 3), 0); else std::ios::clear( (char *)&v164[-1] + *((_QWORD *)v163 - 3), *(_DWORD *)((char *)&v164[3] + *((_QWORD *)v163 - 3)) | 4u); v93 = v157; std::ios_base::ios_base((std::ios_base *)v178); v178[27] = 0; v179 = 0; v180 = 0; v181 = 0; v182 = 0; v183 = 0; v184 = 0; v178[0] = (char *)&`vtable for'std::ios + 16; v174 = v148; *(_QWORD *)((char *)&v175[-1] + *((_QWORD *)v148 - 3)) = v149; std::ios::init((char *)&v175[-1] + *((_QWORD *)v174 - 3), 0); v174 = (char *)&`vtable for'std::ofstream + 24; v178[0] = (char *)&`vtable for'std::ofstream + 64; std::filebuf::basic_filebuf(v175); std::ios::init(v178, v175); if ( std::filebuf::open(v175, v93, 20) ) std::ios::clear((char *)&v175[-1] + *((_QWORD *)v174 - 3), 0); else std::ios::clear( (char *)&v175[-1] + *((_QWORD *)v174 - 3), *(_DWORD *)((char *)&v175[3] + *((_QWORD *)v174 - 3)) | 4u); std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Writing new-style XNG", 21); v94 = *(_QWORD *)(std::cout - 24LL); v95 = *(_BYTE **)((char *)&std::cout + v94 + 240); if ( !v95 ) std::__throw_bad_cast(); if ( v95[56] ) { v96 = v95[67]; } else { std::ctype<char>::_M_widen_init(*(_QWORD *)((char *)&std::cout + v94 + 240)); v96 = (*(__int64 (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)v95 + 48LL))(v95, 10); } v97 = (std::ostream *)std::ostream::put((std::ostream *)&std::cout, v96); std::ostream::flush(v97); HDDMDevice::writeme_pb( *((_QWORD *)this + 4), (__int64)&v163, (__int64)&v174, *(_WORD *)(*((_QWORD *)this + 3) + 240LL)); if ( !std::filebuf::close(v164) ) std::ios::clear( (char *)&v164[-1] + *((_QWORD *)v163 - 3), *(_DWORD *)((char *)&v164[3] + *((_QWORD *)v163 - 3)) | 4u); if ( !std::filebuf::close(v175) ) std::ios::clear( (char *)&v175[-1] + *((_QWORD *)v174 - 3), *(_DWORD *)((char *)&v175[3] + *((_QWORD *)v174 - 3)) | 4u); std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Wrote part file ", 16); v98 = (std::ostream *)std::__ostream_insert<char,std::char_traits<char>>( &std::cout, v155, *(_QWORD *)(v155 - 24)); v99 = *(_QWORD *)(*(_QWORD *)v98 - 24LL); v100 = *(_BYTE **)((char *)v98 + v99 + 240); if ( !v100 ) std::__throw_bad_cast(); if ( v100[56] ) { v101 = v100[67]; } else { std::ctype<char>::_M_widen_init(*(_QWORD *)((char *)v98 + v99 + 240)); v101 = (*(__int64 (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)v100 + 48LL))(v100, 10); } v102 = (std::ostream *)std::ostream::put(v98, v101); std::ostream::flush(v102); std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Wrote arch file ", 16); v103 = (std::ostream *)std::__ostream_insert<char,std::char_traits<char>>( &std::cout, v157, *(_QWORD *)(v157 - 24)); v104 = *(_QWORD *)(*(_QWORD *)v103 - 24LL); v105 = *(_BYTE **)((char *)v103 + v104 + 240); if ( !v105 ) std::__throw_bad_cast(); if ( v105[56] ) { v106 = v105[67]; } else { std::ctype<char>::_M_widen_init(*(_QWORD *)((char *)v103 + v104 + 240)); v106 = (*(__int64 (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)v105 + 48LL))(v105, 10); } v107 = (std::ostream *)std::ostream::put(v103, v106); std::ostream::flush(v107); std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Writing xdlrc ...", 17); v108 = *(_QWORD *)(std::cout - 24LL); v109 = *(_BYTE **)((char *)&std::cout + v108 + 240); if ( !v109 ) std::__throw_bad_cast(); if ( v109[56] ) { v110 = v109[67]; } else { std::ctype<char>::_M_widen_init(*(_QWORD *)((char *)&std::cout + v108 + 240)); v110 = (*(__int64 (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)v109 + 48LL))(v109, 10); } v111 = (std::ostream *)std::ostream::put((std::ostream *)&std::cout, v110); std::ostream::flush(v111); std::string::string(v161, "", v158); std::string::string(v160, "", v156); Device = HDDMDeviceCache::loadDevice( (HDDMDeviceCache *)HDDMDeviceCache::m_devcache, (const std::string *)&v155, (const std::string *)&v157, (const std::string *)v160, (const std::string *)v161); v113 = v160[0] - 24LL; if ( (_UNKNOWN *)(v160[0] - 24LL) != &std::string::_Rep::_S_empty_rep_storage ) { if ( &_pthread_key_create ) { v127 = _InterlockedExchangeAdd((volatile signed __int32 *)(v160[0] - 8LL), 0xFFFFFFFF); } else { v128 = *(_DWORD *)(v160[0] - 8LL); *(_DWORD *)(v160[0] - 8LL) = v128 - 1; v127 = v128; } if ( v127 <= 0 ) { Device_1 = (std::string *)Device; std::string::_Rep::_M_destroy(v113, v159); Device = (HDDMDevice *)Device_1; } } v114 = v161[0] - 24LL; if ( (_UNKNOWN *)(v161[0] - 24LL) != &std::string::_Rep::_S_empty_rep_storage ) { if ( &_pthread_key_create ) { v131 = _InterlockedExchangeAdd((volatile signed __int32 *)(v161[0] - 8LL), 0xFFFFFFFF); } else { v134 = *(_DWORD *)(v161[0] - 8LL); *(_DWORD *)(v161[0] - 8LL) = v134 - 1; v131 = v134; } if ( v131 <= 0 ) { Device_2 = (std::string *)Device; std::string::_Rep::_M_destroy(v114, v160); Device = (HDDMDevice *)Device_2; } } HDDMDevice::printXdlrc(Device); v175[0] = (char *)&`vtable for'std::filebuf + 16; v174 = (char *)&`vtable for'std::ofstream + 24; v178[0] = (char *)&`vtable for'std::ofstream + 64; std::filebuf::close(v175); std::__basic_file<char>::~__basic_file(&v177); v175[0] = (char *)&`vtable for'std::streambuf + 16; std::locale::~locale((std::locale *)&v176); v174 = v148; *(_QWORD *)((char *)&v175[-1] + *((_QWORD *)v148 - 3)) = v149; v178[0] = (char *)&`vtable for'std::ios + 16; std::ios_base::~ios_base((std::ios_base *)v178); v163 = (char *)&`vtable for'std::ofstream + 24; v167[0] = (char *)&`vtable for'std::ofstream + 64; v164[0] = (char *)&`vtable for'std::filebuf + 16; std::filebuf::close(v164); std::__basic_file<char>::~__basic_file(&v166); v164[0] = (char *)&`vtable for'std::streambuf + 16; std::locale::~locale((std::locale *)&v165); v163 = v148; *(_QWORD *)((char *)&v164[-1] + *((_QWORD *)v148 - 3)) = v149; v167[0] = (char *)&`vtable for'std::ios + 16; std::ios_base::~ios_base((std::ios_base *)v167); v115 = v157 - 24; if ( (_UNKNOWN *)(v157 - 24) != &std::string::_Rep::_S_empty_rep_storage ) { if ( &_pthread_key_create ) { v130 = _InterlockedExchangeAdd((volatile signed __int32 *)(v157 - 8), 0xFFFFFFFF); } else { v133 = *(_DWORD *)(v157 - 8); *(_DWORD *)(v157 - 8) = v133 - 1; v130 = v133; } if ( v130 <= 0 ) std::string::_Rep::_M_destroy(v115, v161); } v116 = v155 - 24; if ( (_UNKNOWN *)(v155 - 24) != &std::string::_Rep::_S_empty_rep_storage ) { if ( &_pthread_key_create ) { v129 = _InterlockedExchangeAdd((volatile signed __int32 *)(v155 - 8), 0xFFFFFFFF); } else { v132 = *(_DWORD *)(v155 - 8); *(_DWORD *)(v155 - 8) = v132 - 1; v129 = v132; } if ( v129 <= 0 ) std::string::_Rep::_M_destroy(v116, v161); } v23 = 1; goto LABEL_61; } v71 = *(_QWORD *)(std::cerr - 24LL); v72 = *(_BYTE **)((char *)&std::cerr + v71 + 240); if ( !v72 ) std::__throw_bad_cast(); if ( v72[56] ) { v73 = v72[67]; } else { std::ctype<char>::_M_widen_init(*(_QWORD *)((char *)&std::cerr + v71 + 240)); v73 = (*(__int64 (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)v72 + 48LL))(v72, 10); } v74 = (std::ostream *)std::ostream::put((std::ostream *)&std::cerr, v73); v75 = std::ostream::flush(v74); std::__ostream_insert<char,std::char_traits<char>>(v75, "ERROR:", 6); std::__ostream_insert<char,std::char_traits<char>>( v75, "/wrk/2016.3/continuous/2016_09_26_1671147/src/shared/device/devparse/HDDPDriver.cxx", 83); std::__ostream_insert<char,std::char_traits<char>>(v75, ":", 1); v76 = std::ostream::operator<<(v75, 608); std::__ostream_insert<char,std::char_traits<char>>(v76, ": ", 2); v59 = (std::ostream *)std::ostream::_M_insert<unsigned long>(v76, v70); std::__ostream_insert<char,std::char_traits<char>>( v59, " parsing errors occurred during annotation, cannot continue.", 60); v60 = *(_BYTE **)((char *)v59 + *(_QWORD *)(*(_QWORD *)v59 - 24LL) + 240); if ( !v60 ) std::__throw_bad_cast(); } else { v54 = *(_QWORD *)(std::cerr - 24LL); v55 = *(_BYTE **)((char *)&std::cerr + v54 + 240); if ( !v55 ) std::__throw_bad_cast(); if ( v55[56] ) { v56 = v55[67]; } else { std::ctype<char>::_M_widen_init(*(_QWORD *)((char *)&std::cerr + v54 + 240)); v56 = (*(__int64 (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)v55 + 48LL))(v55, 10); } v57 = (std::ostream *)std::ostream::put((std::ostream *)&std::cerr, v56); v58 = std::ostream::flush(v57); std::__ostream_insert<char,std::char_traits<char>>(v58, "ERROR:", 6); std::__ostream_insert<char,std::char_traits<char>>( v58, "/wrk/2016.3/continuous/2016_09_26_1671147/src/shared/device/devparse/HDDPDriver.cxx", 83); std::__ostream_insert<char,std::char_traits<char>>(v58, ":", 1); v59 = (std::ostream *)std::ostream::operator<<(v58, 591); std::__ostream_insert<char,std::char_traits<char>>(v59, ": ", 2); std::__ostream_insert<char,std::char_traits<char>>( v59, "PICNAME in grid file should match the name if ${picname}.grid file", 66); v60 = *(_BYTE **)((char *)v59 + *(_QWORD *)(*(_QWORD *)v59 - 24LL) + 240); if ( !v60 ) std::__throw_bad_cast(); } if ( v60[56] ) { v61 = v60[67]; } else { std::ctype<char>::_M_widen_init(v60); v61 = (*(__int64 (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)v60 + 48LL))(v60, 10); } v62 = (std::ostream *)std::ostream::put(v59, v61); std::ostream::flush(v62); v23 = 0; LABEL_61: v63 = (char *)s1[0] - 24; if ( (char *)s1[0] - 24 != (char *)&std::string::_Rep::_S_empty_rep_storage ) { if ( &_pthread_key_create ) { v138 = _InterlockedExchangeAdd((volatile signed __int32 *)s1[0] - 2, 0xFFFFFFFF); } else { v140 = *((_DWORD *)s1[0] - 2); *((_DWORD *)s1[0] - 2) = v140 - 1; v138 = v140; } if ( v138 <= 0 ) std::string::_Rep::_M_destroy(v63, v161); } v64 = v153 - 24; if ( v153 - 24 != (char *)&std::string::_Rep::_S_empty_rep_storage ) { if ( &_pthread_key_create ) { v137 = _InterlockedExchangeAdd((volatile signed __int32 *)v153 - 2, 0xFFFFFFFF); } else { v139 = *((_DWORD *)v153 - 2); *((_DWORD *)v153 - 2) = v139 - 1; v137 = v139; } if ( v137 <= 0 ) std::string::_Rep::_M_destroy(v64, v161); } v9 = (char *)`VTT for'std::ifstream[1]; v22 = (char *)`VTT for'std::ifstream[2]; goto LABEL_31; } v117 = *(_QWORD *)(std::cerr - 24LL); v118 = *(_BYTE **)((char *)&std::cerr + v117 + 240); if ( !v118 ) std::__throw_bad_cast(); if ( v118[56] ) { v119 = v118[67]; } else { std::ctype<char>::_M_widen_init(*(_QWORD *)((char *)&std::cerr + v117 + 240)); v119 = (*(__int64 (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)v118 + 48LL))(v118, 10); } v120 = (std::ostream *)std::ostream::put((std::ostream *)&std::cerr, v119); v121 = std::ostream::flush(v120); std::__ostream_insert<char,std::char_traits<char>>(v121, "ERROR:", 6); std::__ostream_insert<char,std::char_traits<char>>( v121, "/wrk/2016.3/continuous/2016_09_26_1671147/src/shared/device/devparse/HDDPDriver.cxx", 83); std::__ostream_insert<char,std::char_traits<char>>(v121, ":", 1); v39 = (std::ostream *)std::ostream::operator<<(v121, 580); std::__ostream_insert<char,std::char_traits<char>>(v39, ": ", 2); std::__ostream_insert<char,std::char_traits<char>>(v39, "GetFinalDevice operation failed", 31); v40 = *(_BYTE **)((char *)v39 + *(_QWORD *)(*(_QWORD *)v39 - 24LL) + 240); if ( !v40 ) std::__throw_bad_cast(); } else { v65 = *(_QWORD *)(std::cerr - 24LL); v66 = *(_BYTE **)((char *)&std::cerr + v65 + 240); if ( !v66 ) std::__throw_bad_cast(); if ( v66[56] ) { v67 = v66[67]; } else { std::ctype<char>::_M_widen_init(*(_QWORD *)((char *)&std::cerr + v65 + 240)); v67 = (*(__int64 (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)v66 + 48LL))(v66, 10); } v68 = (std::ostream *)std::ostream::put((std::ostream *)&std::cerr, v67); v69 = std::ostream::flush(v68); std::__ostream_insert<char,std::char_traits<char>>(v69, "ERROR:", 6); std::__ostream_insert<char,std::char_traits<char>>( v69, "/wrk/2016.3/continuous/2016_09_26_1671147/src/shared/device/devparse/HDDPDriver.cxx", 83); std::__ostream_insert<char,std::char_traits<char>>(v69, ":", 1); v39 = (std::ostream *)std::ostream::operator<<(v69, 556); std::__ostream_insert<char,std::char_traits<char>>(v39, ": ", 2); std::__ostream_insert<char,std::char_traits<char>>(v39, "XNG Device could not be created successfully", 44); v40 = *(_BYTE **)((char *)v39 + *(_QWORD *)(*(_QWORD *)v39 - 24LL) + 240); if ( !v40 ) std::__throw_bad_cast(); } if ( v40[56] ) { v41 = v40[67]; } else { std::ctype<char>::_M_widen_init(v40); v41 = (*(__int64 (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)v40 + 48LL))(v40, 10); } v33 = (std::ostream *)std::ostream::put(v39, v41); LABEL_30: std::ostream::flush(v33); v22 = v146; v23 = 0; LABEL_31: hddp::Parser::~Parser((hddp::Parser *)v162); hddp::Scanner::~Scanner((hddp::Scanner *)v199); goto LABEL_14; } v11 = *(_QWORD *)(std::cerr - 24LL); v12 = *(_BYTE **)((char *)&std::cerr + v11 + 240); if ( !v12 ) std::__throw_bad_cast(); if ( v12[56] ) { v13 = v12[67]; } else { std::ctype<char>::_M_widen_init(*(_QWORD *)((char *)&std::cerr + v11 + 240)); v13 = (*(__int64 (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)v12 + 48LL))(v12, 10); } v14 = (std::ostream *)std::ostream::put((std::ostream *)&std::cerr, v13); v15 = std::ostream::flush(v14); std::__ostream_insert<char,std::char_traits<char>>(v15, "ERROR:", 6); std::__ostream_insert<char,std::char_traits<char>>( v15, "/wrk/2016.3/continuous/2016_09_26_1671147/src/shared/device/devparse/HDDPDriver.cxx", 83); std::__ostream_insert<char,std::char_traits<char>>(v15, ":", 1); v16 = std::ostream::operator<<(v15, 526); std::__ostream_insert<char,std::char_traits<char>>(v16, ": ", 2); std::__ostream_insert<char,std::char_traits<char>>(v16, "File ", 5); v17 = (std::ostream *)std::__ostream_insert<char,std::char_traits<char>>(v16, v152[0], *(_QWORD *)(v152[0] - 24LL)); std::__ostream_insert<char,std::char_traits<char>>(v17, " could not be opened for parsing", 32); v18 = *(_QWORD *)(*(_QWORD *)v17 - 24LL); v19 = *(_BYTE **)((char *)v17 + v18 + 240); if ( !v19 ) std::__throw_bad_cast(); if ( v19[56] ) { v20 = v19[67]; } else { std::ctype<char>::_M_widen_init(*(_QWORD *)((char *)v17 + v18 + 240)); v20 = (*(__int64 (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)v19 + 48LL))(v19, 10); } v21 = (std::ostream *)std::ostream::put(v17, v20); std::ostream::flush(v21); v22 = v146; v23 = 0; LABEL_14: v185 = (char *)&`vtable for'std::ifstream + 24; v190[0] = (char *)&`vtable for'std::ifstream + 64; v187[0] = (char *)&`vtable for'std::filebuf + 16; std::filebuf::close(v187); std::__basic_file<char>::~__basic_file(&v189); v187[0] = (char *)&`vtable for'std::streambuf + 16; std::locale::~locale((std::locale *)&v188); v185 = v9; *(char **)((char *)&v185 + *((_QWORD *)v9 - 3)) = v22; v186 = 0; v190[0] = (char *)&`vtable for'std::ios + 16; std::ios_base::~ios_base((std::ios_base *)v190); v24 = v152[0] - 24LL; if ( (_UNKNOWN *)(v152[0] - 24LL) != &std::string::_Rep::_S_empty_rep_storage ) { if ( &_pthread_key_create ) { v122 = _InterlockedExchangeAdd((volatile signed __int32 *)(v152[0] - 8LL), 0xFFFFFFFF); } else { v141 = *(_DWORD *)(v152[0] - 8LL); *(_DWORD *)(v152[0] - 8LL) = v141 - 1; v122 = v141; } if ( v122 <= 0 ) std::string::_Rep::_M_destroy(v24, v161); } return v23; }
最新发布
10-08
请仔细阅读和分析下面函数,实现所有逻辑功能,采用C/C++11标准,重构可编译的全部代码。 特别注意: 1.保留所有原始功能 2.提高执行效率,降低计算复杂度 3.已经给定的结构体名字和元素不要更改,详细的中文注释 4.自动添加中文注释说明功能逻辑 5.不使用 auto,使用显式 for 循环 6.结构体采用32位定义 7.不要使用小函数,保持原始的函数定义 HDDMDevice *__cdecl HDDMDeviceCache::loadDevice( HDDMDeviceCache *this, const HSTString *deviceFilePath, const HSTString *archFilePath) { int v3; // ebp _DWORD *v4; // edi int i; // esi HDDMDevice *v6; // ebp _DWORD *v7; // eax int v8; // eax void **v9; // eax HDDMTilePort **v10; // eax volatile signed __int32 *v11; // edi bool v12; // al HDDMDevice *v13; // eax int Env; // edi unsigned __int16 v15; // bp unsigned __int16 v16; // di unsigned int v17; // eax int v18; // esi int v19; // eax int v20; // edx int v21; // ebp int v22; // ecx int v23; // edi int v24; // edx unsigned int v25; // eax int v26; // ecx unsigned int v27; // eax int v28; // ebp int v29; // edx int v30; // eax int v31; // ecx __int16 v32; // ax _WORD **v33; // edi int v34; // esi int v35; // esi int v36; // esi const HDDMTilePort *v37; // edi _DWORD *v38; // ebp int v39; // esi int v40; // eax int v41; // esi int v42; // eax _WORD **v43; // ebp int v44; // esi int v45; // esi int v46; // eax int *v47; // eax unsigned int v48; // edx int *v49; // ecx unsigned int v50; // esi int *v51; // eax int *v52; // ebp _DWORD *v53; // eax int *v54; // esi _BOOL4 v55; // edx int *v56; // eax HDDMTile *v57; // edx int *v58; // ecx unsigned int v59; // esi int *v60; // eax int *v61; // ebp _DWORD *v62; // eax int *v63; // esi _BOOL4 v64; // edx _WORD **v65; // edi int v66; // esi int v67; // esi int v68; // edi int v69; // edi int v70; // edi int v71; // edi int v72; // edi int v73; // eax int v74; // eax unsigned int v75; // esi unsigned int v76; // eax HDDMTile *v77; // ecx int *v78; // eax int *v79; // edx int v80; // edi int v81; // eax int v82; // eax int v83; // eax int v84; // edx int v85; // ebp unsigned int v86; // edi int *v87; // eax int *v88; // esi int *v89; // eax _BOOL4 v90; // ecx int v91; // esi int v92; // eax int v93; // eax int v94; // eax int TileType; // esi int v96; // ecx int v97; // edx int v98; // edi int v99; // eax int v100; // esi int v101; // ecx int v102; // edx int v103; // edi int v104; // eax HDDMOracle *v106; // esi void *v107; // esi void *exception; // edi int (__cdecl ***v109)(int); // eax HDDMTile **v110; // eax _DWORD *v111; // eax HPAParamMgr *s1; // [esp+0h] [ebp-6DCh] const char *s2; // [esp+4h] [ebp-6D8h] google::protobuf::Message *n; // [esp+8h] [ebp-6D4h] HDDMTilePort **v115; // [esp+Ch] [ebp-6D0h] HDDMTilePort **v116; // [esp+Ch] [ebp-6D0h] HDDMTilePort **v117; // [esp+10h] [ebp-6CCh] void *v118; // [esp+14h] [ebp-6C8h] const char *v119; // [esp+18h] [ebp-6C4h] int v120; // [esp+1Ch] [ebp-6C0h] char v121; // [esp+30h] [ebp-6ACh] unsigned int j; // [esp+30h] [ebp-6ACh] int v123; // [esp+38h] [ebp-6A4h] int *v124; // [esp+38h] [ebp-6A4h] unsigned int v125; // [esp+40h] [ebp-69Ch] _DWORD *v126; // [esp+40h] [ebp-69Ch] HPAParamMgr *ParamMgr; // [esp+4Ch] [ebp-690h] HPAParamMgr *v128; // [esp+4Ch] [ebp-690h] HPAParamMgr *v129; // [esp+4Ch] [ebp-690h] unsigned __int16 v130; // [esp+50h] [ebp-68Ch] int v131; // [esp+50h] [ebp-68Ch] _DWORD *v132; // [esp+60h] [ebp-67Ch] int v133; // [esp+64h] [ebp-678h] _WORD **v134; // [esp+68h] [ebp-674h] int v135; // [esp+7Ch] [ebp-660h] HDDMDevice *Device; // [esp+80h] [ebp-65Ch] int v137; // [esp+84h] [ebp-658h] char ValueAsBool; // [esp+8Fh] [ebp-64Dh] unsigned int v139; // [esp+90h] [ebp-64Ch] int *v140; // [esp+94h] [ebp-648h] BYREF int *v141; // [esp+98h] [ebp-644h] BYREF int *v142; // [esp+9Ch] [ebp-640h] char v143; // [esp+ADh] [ebp-62Fh] BYREF char v144; // [esp+AEh] [ebp-62Eh] BYREF char v145; // [esp+AFh] [ebp-62Dh] BYREF char v146; // [esp+B0h] [ebp-62Ch] BYREF char v147; // [esp+B8h] [ebp-624h] BYREF char v148; // [esp+B9h] [ebp-623h] BYREF char v149; // [esp+BAh] [ebp-622h] BYREF unsigned __int16 xng_device_FileType[8]; // [esp+C0h] [ebp-61Ch] BYREF unsigned __int16 v151[6]; // [esp+D0h] [ebp-60Ch] BYREF char xng_device_FileVersion[4]; // [esp+DCh] [ebp-600h] BYREF _DWORD v153[4]; // [esp+E0h] [ebp-5FCh] BYREF int v154[4]; // [esp+F0h] [ebp-5ECh] BYREF _DWORD v155[4]; // [esp+100h] [ebp-5DCh] BYREF _DWORD v156[4]; // [esp+110h] [ebp-5CCh] BYREF int v157[4]; // [esp+120h] [ebp-5BCh] BYREF _DWORD v158[4]; // [esp+130h] [ebp-5ACh] BYREF _DWORD v159[4]; // [esp+140h] [ebp-59Ch] BYREF _DWORD v160[4]; // [esp+150h] [ebp-58Ch] BYREF _DWORD v161[4]; // [esp+160h] [ebp-57Ch] BYREF _DWORD v162[4]; // [esp+170h] [ebp-56Ch] BYREF _DWORD v163[4]; // [esp+190h] [ebp-54Ch] BYREF _DWORD v164[4]; // [esp+1A0h] [ebp-53Ch] BYREF _DWORD v165[4]; // [esp+1B0h] [ebp-52Ch] BYREF _DWORD v166[4]; // [esp+1C0h] [ebp-51Ch] BYREF int v167[4]; // [esp+1D0h] [ebp-50Ch] BYREF _DWORD v168[4]; // [esp+1E0h] [ebp-4FCh] BYREF _DWORD v169[4]; // [esp+1F0h] [ebp-4ECh] BYREF _DWORD v170[4]; // [esp+200h] [ebp-4DCh] BYREF _DWORD v171[4]; // [esp+210h] [ebp-4CCh] BYREF _DWORD v172[4]; // [esp+220h] [ebp-4BCh] BYREF _DWORD v173[4]; // [esp+230h] [ebp-4ACh] BYREF char *v174[4]; // [esp+240h] [ebp-49Ch] BYREF _DWORD v175[4]; // [esp+250h] [ebp-48Ch] BYREF _DWORD v176[4]; // [esp+260h] [ebp-47Ch] BYREF _DWORD v177[4]; // [esp+270h] [ebp-46Ch] BYREF int v178[4]; // [esp+280h] [ebp-45Ch] BYREF int v179[4]; // [esp+290h] [ebp-44Ch] BYREF int v180[4]; // [esp+2A0h] [ebp-43Ch] BYREF int v181[4]; // [esp+2B0h] [ebp-42Ch] BYREF _DWORD v182[4]; // [esp+2C0h] [ebp-41Ch] BYREF _DWORD v183[4]; // [esp+2D0h] [ebp-40Ch] BYREF int v184[4]; // [esp+2E0h] [ebp-3FCh] BYREF int v185[4]; // [esp+2F0h] [ebp-3ECh] BYREF unsigned int *v186; // [esp+300h] [ebp-3DCh] BYREF _DWORD v187[8]; // [esp+310h] [ebp-3CCh] BYREF _DWORD v188[3]; // [esp+330h] [ebp-3ACh] BYREF int v189; // [esp+33Ch] [ebp-3A0h] BYREF unsigned int v190; // [esp+340h] [ebp-39Ch] BYREF HDDMTile *v191[4]; // [esp+350h] [ebp-38Ch] BYREF HDDMTilePort *v192[4]; // [esp+360h] [ebp-37Ch] BYREF HDDMTile *v193[4]; // [esp+370h] [ebp-36Ch] BYREF char v194[4]; // [esp+380h] [ebp-35Ch] BYREF int v195; // [esp+384h] [ebp-358h] BYREF void *v196; // [esp+388h] [ebp-354h] int *v197; // [esp+38Ch] [ebp-350h] int *v198; // [esp+390h] [ebp-34Ch] int v199; // [esp+394h] [ebp-348h] _BYTE v200[28]; // [esp+3A4h] [ebp-338h] BYREF int (__cdecl **v201)(int); // [esp+3C0h] [ebp-31Ch] BYREF int v202; // [esp+3C4h] [ebp-318h] BYREF void *v203; // [esp+3C8h] [ebp-314h] int *v204; // [esp+3CCh] [ebp-310h] int *v205; // [esp+3D0h] [ebp-30Ch] volatile signed __int32 *v206; // [esp+3D4h] [ebp-308h] _DWORD v207[5]; // [esp+3D8h] [ebp-304h] BYREF std::string *v208; // [esp+3ECh] [ebp-2F0h] int v209; // [esp+450h] [ebp-28Ch] void *hddmChipDesc; // [esp+460h] [ebp-27Ch] BYREF char *v211; // [esp+464h] [ebp-278h] BYREF __int16 v212; // [esp+468h] [ebp-274h] BYREF __int16 v213; // [esp+46Ah] [ebp-272h] __int16 v214; // [esp+46Ch] [ebp-270h] __int16 v215; // [esp+46Eh] [ebp-26Eh] __int16 v216; // [esp+470h] [ebp-26Ch] __int16 v217; // [esp+472h] [ebp-26Ah] _DWORD v218[5]; // [esp+474h] [ebp-268h] BYREF int v219; // [esp+488h] [ebp-254h] char v220; // [esp+48Ch] [ebp-250h] HUTRuntime::HUTRuntime((HUTRuntime *)v200, 1); ParamMgr = (HPAParamMgr *)HPAParamMgr::getParamMgr(s1); std::string::string(v153); ValueAsBool = HPAParamMgr::getValueAsBool(ParamMgr, (const std::string *)v153); std::string::_Rep::_M_dispose(v153[0] - 12, &hddmChipDesc); if ( ValueAsBool ) { v3 = *(_DWORD *)deviceFilePath; std::string::string(v192); std::string::string(v171); v120 = v3; v119 = "DEBUG: Request device load: %s, %s\n"; v118 = &loc_1000002; v117 = v192; ComMsgMgr::sendScopedMsg::eval( 2, "/proj/buildscratch/builds/2014.1/continuous/20140404125757/src/shared/device/devmodel/HDDMDevice.cxx", 738, v171); std::string::_Rep::_M_dispose(v171[0] - 12, &v201); std::string::_Rep::_M_dispose((char *)v192[0] - 12, &hddmChipDesc); } std::string::string((std::string *)v154, deviceFilePath); sub_92304C(); std::string::_Rep::_M_dispose(v154[0] - 12, &v201); v4 = hddmChipDesc; for ( i = 0; i != 16; ++i ) { v6 = (HDDMDevice *)*((_DWORD *)this + i); if ( v6 ) { v7 = (_DWORD *)v6->dword9C; if ( *(v4 - 3) == *(v7 - 3) && !memcmp(v4, v7, *(v4 - 3)) ) { ++v6->dword98; if ( ValueAsBool ) { std::string::string(v193); std::string::string(v172); ComMsgMgr::sendScopedMsg::eval( 2, "/proj/buildscratch/builds/2014.1/continuous/20140404125757/src/shared/device/devmodel/HDDMDevice.cxx", 757, v172); std::string::_Rep::_M_dispose(v172[0] - 12, v194); std::string::_Rep::_M_dispose((char *)v193[0] - 12, &v201); v4 = hddmChipDesc; } std::string::_Rep::_M_dispose(v4 - 3, &v201); goto LABEL_177; } } } std::string::_Rep::_M_dispose(v4 - 3, &v201); std::string::string(v156, "", &v143); std::string::string(v155, "", &v144); Device = (HDDMDevice *)HDDMDeviceCache::createDevice(this, (const HSTString *)v155, (const HSTString *)v156); std::string::_Rep::_M_dispose(v155[0] - 12, &hddmChipDesc); std::string::_Rep::_M_dispose(v156[0] - 12, &hddmChipDesc); ++Device->dword98; xng_device_FileType[0] = 0; *(_WORD *)xng_device_FileVersion = 0; HDDMDeviceCache::getFileTypeAndVersion(this, deviceFilePath, xng_device_FileType, xng_device_FileVersion); if ( (unsigned __int16)(xng_device_FileType[0] - 2) > 1u ) { exception = __cxa_allocate_exception(0xCu); std::string::string((std::string *)&v189, deviceFilePath); std::string::string(v157); sub_6A63B6( (std::string *)&v189, (int)"File is not a chip or device XNG:", (int)&v201, (int)v115, (int)v117, (int)v118, (int)v119, v120); std::string::_Rep::_M_dispose(v157[0] - 12, &hddmChipDesc); std::string::_Rep::_M_dispose(v189 - 12, &hddmChipDesc); __cxa_throw( exception, (struct type_info *)&`typeinfo for'HEXDataException, (void (*)(void *))HEXDataException::~HEXDataException); } v158[0] = (char *)&std::string::_Rep::_S_empty_rep_storage + 12; v159[0] = (char *)&std::string::_Rep::_S_empty_rep_storage + 12; if ( xng_device_FileType[0] == 2 ) { isl::iostreams::filtering_stream<boost::iostreams::input,char,std::char_traits<char>,std::allocator<char>,boost::iostreams::public_>::filtering_stream( (int)&hddmChipDesc, *(_DWORD *)deviceFilePath, 4, 0); std::istream::read((std::istream *)&v212, v194, (int)&byte_8); HDDMXng::Chip::Chip((HDDMXng::Chip *)&v201); HDDMDevice::readMessage((HDDMDevice *)&v212, (std::istream *)&v201, n); std::string::assign((std::string *)v158, v208); std::string::assign((std::string *)v159, (const std::string *)v207[4]); HDDMXng::Chip::~Chip((HDDMXng::Chip *)&v201); isl::iostreams::filtering_stream<boost::iostreams::input,char,std::char_traits<char>,std::allocator<char>,boost::iostreams::public_>::~filtering_stream((int)&hddmChipDesc); } else { std::string::string((std::string *)v160, deviceFilePath); HUBSimpleScanner::HUBSimpleScanner(&hddmChipDesc, v160); std::string::_Rep::_M_dispose(v160[0] - 12, &v201); HUBSimpleScanner::scanTargetWord((HUBSimpleScanner *)&hddmChipDesc, "xngd", 1); HUBSimpleScanner::scanInt((HUBSimpleScanner *)&hddmChipDesc, 1, "version number"); HUBSimpleScanner::scanWord((HUBSimpleScanner *)v161, (bool)&hddmChipDesc, (const char *)&dword_0 + 1); std::string::swap((std::string *)v158, (std::string *)v161); std::string::_Rep::_M_dispose(v161[0] - 12, &v201); HUBSimpleScanner::scanWord((HUBSimpleScanner *)v162, (bool)&hddmChipDesc, (const char *)&dword_0 + 1); std::string::swap((std::string *)v159, (std::string *)v162); std::string::_Rep::_M_dispose(v162[0] - 12, &v201); HUBSimpleScanner::~HUBSimpleScanner((HUBSimpleScanner *)&hddmChipDesc); } std::string::string((std::string *)v163, archFilePath); if ( !*(_DWORD *)(v163[0] - 12) ) { std::string::string((std::string *)v173, deviceFilePath); std::string::string((std::string *)v174, (const std::string *)v158); std::string::append((std::string *)v174, ".xng", 4u); v8 = std::string::rfind((std::string *)v173, "/", 0xFFFFFFFF, 1u); if ( v8 == -1 ) { std::string::assign((std::string *)v173, (const std::string *)v174); isl::iostreams::filtering_stream<boost::iostreams::input,char,std::char_traits<char>,std::allocator<char>,boost::iostreams::public_>::filtering_stream( (int)&hddmChipDesc, v173[0], 4, 0); if ( (v220 & 5) != 0 ) { std::string::string((std::string *)v177, (const std::string *)v158); std::string::append((std::string *)v177, "_", 1u); v109 = (int (__cdecl ***)(int))std::string::append((std::string *)v177, deviceFilePath); v201 = *v109; *v109 = (int (__cdecl **)(int))((char *)&std::string::_Rep::_S_empty_rep_storage + 12); std::string::swap((std::string *)v173, (std::string *)&v201); std::string::_Rep::_M_dispose(v201 - 3, v194); std::string::_Rep::_M_dispose(v177[0] - 12, &v201); } isl::iostreams::filtering_stream<boost::iostreams::input,char,std::char_traits<char>,std::allocator<char>,boost::iostreams::public_>::~filtering_stream((int)&hddmChipDesc); } else { v125 = v8 + 1; std::string::replace((std::string *)v173, v8 + 1, 0xFFFFFFFF, v174[0], *((_DWORD *)v174[0] - 3)); isl::iostreams::filtering_stream<boost::iostreams::input,char,std::char_traits<char>,std::allocator<char>,boost::iostreams::public_>::filtering_stream( (int)&v201, v173[0], 4, 0); if ( ((unsigned __int8)v208 & 5) != 0 ) { std::operator+<char>((std::string *)v176); v9 = (void **)std::string::append((std::string *)v176, "/", 1u); hddmChipDesc = *v9; *v9 = (char *)&std::string::_Rep::_S_empty_rep_storage + 12; v10 = (HDDMTilePort **)std::string::append((std::string *)&hddmChipDesc, (const std::string *)v174); v192[0] = *v10; *v10 = (HDDMTilePort *)((char *)&std::string::_Rep::_S_empty_rep_storage + 12); std::string::_Rep::_M_dispose((char *)hddmChipDesc - 12, v194); std::string::_Rep::_M_dispose(v176[0] - 12, &hddmChipDesc); std::string::replace((std::string *)v173, v125, 0xFFFFFFFF, (const char *)v192[0], *((_DWORD *)v192[0] - 3)); isl::iostreams::filtering_stream<boost::iostreams::input,char,std::char_traits<char>,std::allocator<char>,boost::iostreams::public_>::filtering_stream( (int)&hddmChipDesc, v173[0], 4, 0); if ( (v220 & 5) != 0 ) { std::operator+<char>((std::string *)v175); v110 = (HDDMTile **)std::string::append((std::string *)v175, "/", 1u); v193[0] = *v110; *v110 = (HDDMTile *)((char *)&std::string::_Rep::_S_empty_rep_storage + 12); v111 = (_DWORD *)std::string::append((std::string *)v193, (const std::string *)v174); *(_DWORD *)v194 = *v111; *v111 = (char *)&std::string::_Rep::_S_empty_rep_storage + 12; std::string::swap((std::string *)v192, (std::string *)v194); std::string::_Rep::_M_dispose(*(_DWORD *)v194 - 12, v191); std::string::_Rep::_M_dispose((char *)v193[0] - 12, v194); std::string::_Rep::_M_dispose(v175[0] - 12, v194); std::string::replace((std::string *)v173, v125, 0xFFFFFFFF, (const char *)v192[0], *((_DWORD *)v192[0] - 3)); } isl::iostreams::filtering_stream<boost::iostreams::input,char,std::char_traits<char>,std::allocator<char>,boost::iostreams::public_>::~filtering_stream((int)&hddmChipDesc); std::string::_Rep::_M_dispose((char *)v192[0] - 12, v194); } v201 = &off_212594C; v203 = &off_212594C + 6; v207[0] = &off_212594C + 11; if ( (*(_BYTE *)(*(_DWORD *)v202 + 24) & 1) != 0 ) (*(void (__cdecl **)(int))(*(_DWORD *)v209 + 24))(v209); v201 = &off_212590C; v203 = &off_212590C + 6; v207[0] = &off_212590C + 11; v11 = v206; if ( v206 ) { if ( _InterlockedExchangeAdd(v206 + 1, 0xFFFFFFFF) == 1 ) { (*(void (__cdecl **)(volatile signed __int32 *))(*v11 + 8))(v11); if ( _InterlockedExchangeAdd(v11 + 2, 0xFFFFFFFF) == 1 ) (*(void (__cdecl **)(volatile signed __int32 *))(*v11 + 12))(v11); } } v203 = off_21258CC; v204 = 0; v201 = (int (__cdecl **)(int))(&`vtable for'boost::iostreams::detail::chain_client<boost::iostreams::chain<boost::iostreams::input,char,std::char_traits<char>,std::allocator<char>>> + 2); v207[0] = (char *)&`vtable for'std::ios + 8; std::ios_base::~ios_base((std::ios_base *)v207); } std::string::string((std::string *)v164, (const std::string *)v173); std::string::_Rep::_M_dispose(v174[0] - 12, &hddmChipDesc); std::string::_Rep::_M_dispose(v173[0] - 12, &hddmChipDesc); std::string::swap((std::string *)v163, (std::string *)v164); std::string::_Rep::_M_dispose(v164[0] - 12, &hddmChipDesc); } std::string::string((std::string *)v165, (const std::string *)v163); HDDMDevice::setloadpaths(Device, deviceFilePath, (const HSTString *)v165); std::string::_Rep::_M_dispose(v165[0] - 12, &hddmChipDesc); *(_WORD *)&xng_device_FileVersion[2] = 0; v151[0] = 0; std::string::string((std::string *)v166, (const std::string *)v163); HDDMDeviceCache::getFileTypeAndVersion( this, (const HSTString *)v166, (unsigned __int16 *)&xng_device_FileVersion[2], (char *)v151); std::string::_Rep::_M_dispose(v166[0] - 12, &hddmChipDesc); if ( *(_WORD *)&xng_device_FileVersion[2] != 1 ) { v107 = __cxa_allocate_exception(0xCu); std::string::string((std::string *)v191, (const std::string *)v163); std::string::string(v167); sub_6A63B6( (std::string *)v191, (int)"File is not an architecture XNG:", (int)&v201, (int)v116, (int)v117, (int)v118, (int)v119, v120); std::string::_Rep::_M_dispose(v167[0] - 12, &hddmChipDesc); std::string::_Rep::_M_dispose((char *)v191[0] - 12, &hddmChipDesc); __cxa_throw( v107, (struct type_info *)&`typeinfo for'HEXDataException, (void (*)(void *))HEXDataException::~HEXDataException); } HDDMDevice::readarch_pb(Device, (const std::string *)v163, v151[0]); v12 = xng_device_FileType[0] == 3; Device->byteE1 = xng_device_FileType[0] == 3; if ( v12 ) { HDDMDevice::readdevice(Device, deviceFilePath); } else { hddmChipDesc = (char *)&std::string::_Rep::_S_empty_rep_storage + 12; v211 = (char *)&std::string::_Rep::_S_empty_rep_storage + 12; v212 = -1; v213 = -1; v214 = -1; v215 = -1; v216 = -1; v217 = -1; v218[0] = (char *)&std::string::_Rep::_S_empty_rep_storage + 12; memset(&v218[1], 0, 16); v219 = 0; std::string::assign((std::string *)&v211, "chip", 4u); std::string::assign((std::string *)&hddmChipDesc, (const std::string *)v159); std::string::assign((std::string *)v218, deviceFilePath); v212 = 0; v213 = 0; v214 = 0; v215 = 0; v216 = 0; v217 = 0; v219 = 0; v201 = 0; std::vector<HDDMChip *>::_M_fill_assign((int)&Device->dword1A4, 1, (int)&v201); HDDMDevice::readchip_pb(Device, (HDDMChipDesc *)&hddmChipDesc); std::string::_Rep::_M_dispose(v218[0] - 12, &v201); std::string::_Rep::_M_dispose(v211 - 12, &v201); std::string::_Rep::_M_dispose((char *)hddmChipDesc - 12, &v201); } v13 = Device; if ( !Device->dword2C ) { HDDMDevice::createRPMGrid(Device); v13 = Device; } HDDMDevice::createRoutingDS(v13); HDDMDevice::setrecursivedeviceid(Device, Device->byte0 & 0xF); HDDMDevice::postprocess(Device); std::string::string(v168); v121 = HPAParamMgr::getValueAsBool(ParamMgr, (const std::string *)v168); std::string::_Rep::_M_dispose(v168[0] - 12, &hddmChipDesc); if ( !v121 ) { HDDMTemplateIO::HDDMTemplateIO((HDDMTemplateIO *)&hddmChipDesc); HDDMTemplateIO::loadTemplateData((HDDMTemplateIO *)&hddmChipDesc, Device); HDDMTemplateIO::~HDDMTemplateIO((HDDMTemplateIO *)&hddmChipDesc); } HDDMNodeAdjuster::HDDMNodeAdjuster((HDDMNodeAdjuster *)&hddmChipDesc, Device); HDDMNodeAdjuster::performAdjustments((HDDMNodeAdjuster *)&hddmChipDesc, (const std::string *)&Device->dword9C); HDDMNodeAdjuster::~HDDMNodeAdjuster((HDDMNodeAdjuster *)&hddmChipDesc); HDDMDevice::suppressCostcodes(Device); HUTEnv::HUTEnv((HUTEnv *)&v149); Env = HUTEnv::getEnv((HUTEnv *)"DEVMODEL_CHECKTILEPORTS", s2); HUTEnv::~HUTEnv((HUTEnv *)&v149); if ( Env ) { v195 = 0; v196 = 0; v199 = 0; v197 = &v195; v198 = &v195; v202 = 0; v203 = 0; v206 = 0; v204 = &v202; v205 = &v202; std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Begin checking tile ports {\n", 28); if ( !((unsigned __int16)Device->word6 * (unsigned __int16)Device->word4) ) goto LABEL_130; v15 = Device->word6; v16 = Device->word4; v139 = 0; v17 = 0; while ( 1 ) { v18 = Device->dword74 + 28 * v17; v190 = v18; v19 = *(_DWORD *)(*(_DWORD *)(HDDMDeviceCache::m_devcache[*(_BYTE *)(v18 + 3) >> 4] + 96) + 4 * (*(_WORD *)(v18 + 6) >> 6)); v20 = *(_DWORD *)(v19 + 292); if ( !(unsigned __int16)((*(_DWORD *)(v19 + 296) - v20) >> 2) ) goto LABEL_129; v21 = *(_DWORD *)(v19 + 296); v137 = 0; do { v132 = *(_DWORD **)(v20 + 4 * v137); v22 = v132[3]; v23 = v132[4]; if ( !(unsigned __int16)((v23 - v22) >> 2) ) goto LABEL_127; v135 = 0; do { v126 = *(_DWORD **)(v22 + 4 * v135); v24 = v126[3]; v25 = (v126[4] - v24) >> 2; if ( !v25 ) goto LABEL_125; for ( j = 0; j < v25; ++j ) { v37 = 0; if ( (unsigned __int16)j < v25 ) v37 = *(const HDDMTilePort **)(v24 + 4 * (unsigned __int16)j); v191[0] = 0; v192[0] = 0; if ( (unsigned __int8)HDDMTile::getMatchingPort((HDDMTile *)v18, v37, v191, v192) ) { if ( !std::string::compare((std::string *)(v132 + 1), "Z") ) hut::detail::assertion_failed( (hut::detail *)"edge1->getName() != \"Z\"", "void {anonymous}::_checkTilePorts(const HDDMDevice*)", "/proj/buildscratch/builds/2014.1/continuous/20140404125757/src/shared/device/devmodel/HDDMDevice.cxx", (const char *)&elf_hash_bucket[109] + 2, (int)v117); v129 = *(HPAParamMgr **)v192[0]; v193[0] = 0; hddmChipDesc = 0; HDDMTile::getMatchingPort(v191[0], v192[0], v193, (const HDDMTilePort **)&hddmChipDesc); if ( hddmChipDesc ) v38 = *(_DWORD **)hddmChipDesc; else v38 = 0; if ( v193[0] != (HDDMTile *)v190 ) { HDDMTile::getName((HDDMTile *)v184); if ( v193[0] ) HDDMTile::getName((HDDMTile *)v183); else std::string::string(v183, "NULL", &v148); std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Tile3 = ", 8); v39 = std::__ostream_insert<char,std::char_traits<char>>(&std::cout, v183[0], *(_DWORD *)(v183[0] - 12)); std::__ostream_insert<char,std::char_traits<char>>(v39, " should be ", 11); v40 = std::__ostream_insert<char,std::char_traits<char>>(v39, v184[0], *(_DWORD *)(v184[0] - 12)); std::__ostream_insert<char,std::char_traits<char>>(v40, "\n", 1); std::string::_Rep::_M_dispose(v183[0] - 12, &v189); std::string::_Rep::_M_dispose(v184[0] - 12, &v189); if ( v193[0] != (HDDMTile *)v190 ) hut::detail::assertion_failed( (hut::detail *)"tile3 == tile1", "void {anonymous}::_checkTilePorts(const HDDMDevice*)", "/proj/buildscratch/builds/2014.1/continuous/20140404125757/src/shared/device/devmodel/HDDMDevice.cxx", (const char *)&elf_hash_bucket[112] + 2, (int)v117); } if ( v126 != v38 ) { if ( v38 ) std::string::string((std::string *)v182, (const std::string *)(v38 + 2)); else std::string::string(v182, "NULL", &v147); std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Face3 = ", 8); v41 = std::__ostream_insert<char,std::char_traits<char>>(&std::cout, v182[0], *(_DWORD *)(v182[0] - 12)); std::__ostream_insert<char,std::char_traits<char>>(v41, " should be ", 11); v42 = std::__ostream_insert<char,std::char_traits<char>>(v41, v126[2], *(_DWORD *)(v126[2] - 12)); std::__ostream_insert<char,std::char_traits<char>>(v42, "\n", 1); std::string::_Rep::_M_dispose(v182[0] - 12, &v189); } if ( v37 != hddmChipDesc ) { v43 = (_WORD **)*((_DWORD *)v37 + 1); v44 = hddmChipDesc ? *((_DWORD *)hddmChipDesc + 1) : -1; std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Port3 = ", 8); v45 = std::ostream::_M_insert<unsigned long>(&std::cout, v44); std::__ostream_insert<char,std::char_traits<char>>(v45, " should be ", 11); v46 = std::ostream::_M_insert<unsigned long>(v45, v43); std::__ostream_insert<char,std::char_traits<char>>(v46, "\n", 1); if ( v37 != hddmChipDesc ) hut::detail::assertion_failed( (hut::detail *)"port3 == port1", "void {anonymous}::_checkTilePorts(const HDDMDevice*)", "/proj/buildscratch/builds/2014.1/continuous/20140404125757/src/shared/device/devmodel/HDDMDevice.cxx", (const char *)&elf_hash_bucket[115] + 1, (int)v117); } if ( *((_DWORD *)v37 + 2) != *((_DWORD *)v192[0] + 2) ) { v47 = (int *)v196; if ( !v196 ) goto LABEL_76; v48 = v190; v49 = &v195; do { while ( v47[4] >= v190 ) { v49 = v47; v47 = (int *)v47[2]; if ( !v47 ) goto LABEL_74; } v47 = (int *)v47[3]; } while ( v47 ); LABEL_74: if ( v49 == &v195 || v49[4] > v190 ) { LABEL_76: v186 = &v190; v117 = (HDDMTilePort **)&v186; v116 = (HDDMTilePort **)&unk_1BA93B5; std::_Rb_tree<HDDMTile const*,std::pair<HDDMTile const* const,int>,std::_Select1st<std::pair<HDDMTile const* const,int>>,std::less<HDDMTile const*>,std::allocator<std::pair<HDDMTile const* const,int>>>::_M_emplace_hint_unique<std::piecewise_construct_t const&,std::tuple<HDDMTile const* const&>,std::tuple<>>((int)&v140); v48 = v190; v49 = v140; } ++v49[5]; v50 = *(_DWORD *)(*(_DWORD *)(HDDMDeviceCache::m_devcache[*(_BYTE *)(v48 + 3) >> 4] + 96) + 4 * (*(_WORD *)(v48 + 6) >> 6)); v51 = (int *)v203; v52 = &v202; if ( !v203 ) goto LABEL_84; do { while ( v50 <= v51[4] ) { v52 = v51; v51 = (int *)v51[2]; if ( !v51 ) goto LABEL_82; } v51 = (int *)v51[3]; } while ( v51 ); LABEL_82: if ( v52 == &v202 || v50 < v52[4] ) { LABEL_84: v53 = (_DWORD *)operator new(0x18u); v52 = v53; if ( v53 ) { *v53 = 0; v53[1] = 0; v53[2] = 0; v53[3] = 0; v53[4] = v50; v53[5] = 0; } v116 = (HDDMTilePort **)(v53 + 4); std::_Rb_tree<HDDMTileType const*,std::pair<HDDMTileType const* const,int>,std::_Select1st<std::pair<HDDMTileType const* const,int>>,std::less<HDDMTileType const*>,std::allocator<std::pair<HDDMTileType const* const,int>>>::_M_get_insert_hint_unique_pos((int)&v141); v54 = v141; if ( v142 ) { v55 = 1; if ( !v141 && v142 != &v202 ) v55 = v52[4] < (unsigned int)v142[4]; std::_Rb_tree_insert_and_rebalance(v55, v52, v142, &v202); v206 = (volatile signed __int32 *)((char *)v206 + 1); } else { operator delete(v52); v52 = v54; } } ++v52[5]; v56 = (int *)v196; if ( !v196 ) goto LABEL_96; v57 = v191[0]; v58 = &v195; do { while ( (HDDMTile *)v56[4] >= v191[0] ) { v58 = v56; v56 = (int *)v56[2]; if ( !v56 ) goto LABEL_94; } v56 = (int *)v56[3]; } while ( v56 ); LABEL_94: if ( v58 == &v195 || (HDDMTile *)v58[4] > v191[0] ) { LABEL_96: v187[0] = v191; v117 = (HDDMTilePort **)v187; v116 = (HDDMTilePort **)&unk_1BA93B5; std::_Rb_tree<HDDMTile const*,std::pair<HDDMTile const* const,int>,std::_Select1st<std::pair<HDDMTile const* const,int>>,std::less<HDDMTile const*>,std::allocator<std::pair<HDDMTile const* const,int>>>::_M_emplace_hint_unique<std::piecewise_construct_t const&,std::tuple<HDDMTile const* const&>,std::tuple<>>((int)&v140); v57 = v191[0]; v58 = v140; } ++v58[5]; v59 = *(_DWORD *)(*(_DWORD *)(HDDMDeviceCache::m_devcache[*((_BYTE *)v57 + 3) >> 4] + 96) + 4 * (*((_WORD *)v57 + 3) >> 6)); v60 = (int *)v203; v61 = &v202; if ( !v203 ) goto LABEL_104; do { while ( v59 <= v60[4] ) { v61 = v60; v60 = (int *)v60[2]; if ( !v60 ) goto LABEL_102; } v60 = (int *)v60[3]; } while ( v60 ); LABEL_102: if ( v61 == &v202 || v59 < v61[4] ) { LABEL_104: v62 = (_DWORD *)operator new(0x18u); v61 = v62; if ( v62 ) { *v62 = 0; v62[1] = 0; v62[2] = 0; v62[3] = 0; v62[4] = v59; v62[5] = 0; } v116 = (HDDMTilePort **)(v62 + 4); std::_Rb_tree<HDDMTileType const*,std::pair<HDDMTileType const* const,int>,std::_Select1st<std::pair<HDDMTileType const* const,int>>,std::less<HDDMTileType const*>,std::allocator<std::pair<HDDMTileType const* const,int>>>::_M_get_insert_hint_unique_pos((int)&v141); v63 = v141; if ( v142 ) { v64 = 1; if ( !v141 && v142 != &v202 ) v64 = v61[4] < (unsigned int)v142[4]; std::_Rb_tree_insert_and_rebalance(v64, v61, v142, &v202); v206 = (volatile signed __int32 *)((char *)v206 + 1); } else { operator delete(v61); v61 = v63; } } ++v61[5]; v131 = *((_DWORD *)v192[0] + 2); v133 = *((_DWORD *)v192[0] + 1); HDDMTile::getName((HDDMTile *)v181); v134 = (_WORD **)*((_DWORD *)v37 + 2); v65 = (_WORD **)*((_DWORD *)v37 + 1); HDDMTile::getName((HDDMTile *)v180); std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Global mismatch: ", 17); v66 = std::__ostream_insert<char,std::char_traits<char>>(&std::cout, v180[0], *(_DWORD *)(v180[0] - 12)); std::__ostream_insert<char,std::char_traits<char>>(v66, ".", 1); v67 = std::__ostream_insert<char,std::char_traits<char>>(v66, v126[2], *(_DWORD *)(v126[2] - 12)); std::__ostream_insert<char,std::char_traits<char>>(v67, "[", 1); v68 = std::ostream::_M_insert<unsigned long>(v67, v65); std::__ostream_insert<char,std::char_traits<char>>(v68, "] = ", 4); v69 = std::ostream::_M_insert<unsigned long>(v68, v134); std::__ostream_insert<char,std::char_traits<char>>(v69, " ", 1); v70 = std::__ostream_insert<char,std::char_traits<char>>(v69, v181[0], *(_DWORD *)(v181[0] - 12)); std::__ostream_insert<char,std::char_traits<char>>(v70, ".", 1); v71 = std::__ostream_insert<char,std::char_traits<char>>( v70, *((_DWORD *)v129 + 2), *(_DWORD *)(*((_DWORD *)v129 + 2) - 12)); std::__ostream_insert<char,std::char_traits<char>>(v71, "[", 1); v72 = std::ostream::_M_insert<unsigned long>(v71, v133); std::__ostream_insert<char,std::char_traits<char>>(v72, "] = ", 4); v73 = std::ostream::_M_insert<unsigned long>(v72, v131); std::__ostream_insert<char,std::char_traits<char>>(v73, "\n", 1); std::string::_Rep::_M_dispose(v180[0] - 12, &v189); std::string::_Rep::_M_dispose(v181[0] - 12, &v189); } goto LABEL_45; } v18 = v190; if ( !v191[0] ) goto LABEL_46; v26 = HDDMDeviceCache::m_devcache[*(_BYTE *)(v190 + 3) >> 4]; v27 = -1227133513 * ((int)(v190 - *(_DWORD *)(v26 + 116)) >> 2); v128 = (HPAParamMgr *)*(unsigned __int16 *)(v26 + 6); v123 = v27 % (unsigned int)v128; v28 = *(unsigned __int16 *)(v26 + 4); v29 = v28 - 1 - v27 / (unsigned int)v128; v30 = *(_DWORD *)(*(_DWORD *)(v26 + 96) + 4 * (*(_WORD *)(v190 + 6) >> 6)); v31 = *(unsigned __int16 *)(v30 + 24); v130 = *(_WORD *)(v30 + 26); v32 = ***(_WORD ***)v37; if ( v32 == 1 ) { if ( (HPAParamMgr *)(v123 + v31) != v128 ) goto LABEL_44; } else if ( v32 ) { if ( v32 == 2 ) { if ( (_WORD)v29 ) goto LABEL_44; } else if ( v32 == 3 && (_WORD)v123 ) { LABEL_44: v33 = (_WORD **)*((_DWORD *)v37 + 1); HDDMTile::getName((HDDMTile *)v185); std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Missing matching port for ", 26); v34 = std::__ostream_insert<char,std::char_traits<char>>(&std::cout, v185[0], *(_DWORD *)(v185[0] - 12)); std::__ostream_insert<char,std::char_traits<char>>(v34, ".", 1); v35 = std::__ostream_insert<char,std::char_traits<char>>(v34, v126[2], *(_DWORD *)(v126[2] - 12)); std::__ostream_insert<char,std::char_traits<char>>(v35, "[", 1); v36 = std::ostream::_M_insert<unsigned long>(v35, v33); std::__ostream_insert<char,std::char_traits<char>>(v36, "]", 1); std::__ostream_insert<char,std::char_traits<char>>(v36, "\n", 1); std::string::_Rep::_M_dispose(v185[0] - 12, &hddmChipDesc); hut::detail::assertion_failed( (hut::detail *)"false", "void {anonymous}::_checkTilePorts(const HDDMDevice*)", "/proj/buildscratch/builds/2014.1/continuous/20140404125757/src/shared/device/devmodel/HDDMDevice.cxx", (const char *)&elf_hash_bucket[107] + 3, (int)v117); LABEL_45: v18 = v190; } } else if ( v130 + (unsigned __int16)v29 != (unsigned __int16)v28 ) { goto LABEL_44; } LABEL_46: v24 = v126[3]; v25 = (v126[4] - v24) >> 2; } v22 = v132[3]; v23 = v132[4]; LABEL_125: ++v135; } while ( v135 < (unsigned __int16)((v23 - v22) >> 2) ); v74 = *(_DWORD *)(*(_DWORD *)(HDDMDeviceCache::m_devcache[*(_BYTE *)(v18 + 3) >> 4] + 96) + 4 * (*(_WORD *)(v18 + 6) >> 6)); v21 = *(_DWORD *)(v74 + 296); v20 = *(_DWORD *)(v74 + 292); LABEL_127: ++v137; } while ( v137 < (unsigned __int16)((v21 - v20) >> 2) ); v16 = Device->word4; v15 = Device->word6; LABEL_129: v17 = ++v139; if ( v139 >= v15 * (unsigned int)v16 ) { LABEL_130: if ( v199 ) { std::ofstream::basic_ofstream(&hddmChipDesc, "badGlobals.txt", 48, v116); if ( (unsigned __int16)Device->word6 * (unsigned __int16)Device->word4 ) { v75 = 0; v76 = 0; do { v77 = (HDDMTile *)(Device->dword74 + 28 * v76); v193[0] = v77; v78 = (int *)v196; v79 = &v195; if ( !v196 ) goto LABEL_187; do { if ( (unsigned int)v77 > v78[4] ) { v78 = (int *)v78[3]; } else { v79 = v78; v78 = (int *)v78[2]; } } while ( v78 ); if ( v79 == &v195 || (unsigned int)v77 < v79[4] ) { LABEL_187: v187[4] = v193; std::_Rb_tree<HDDMTile const*,std::pair<HDDMTile const* const,int>,std::_Select1st<std::pair<HDDMTile const* const,int>>,std::less<HDDMTile const*>,std::allocator<std::pair<HDDMTile const* const,int>>>::_M_emplace_hint_unique<std::piecewise_construct_t const&,std::tuple<HDDMTile const* const&>,std::tuple<>>((int)&v140); v79 = v140; } v80 = v79[5]; if ( v80 > 0 ) { HDDMTile::getName((HDDMTile *)v179); v81 = std::__ostream_insert<char,std::char_traits<char>>( &hddmChipDesc, v179[0], *(_DWORD *)(v179[0] - 12)); v82 = std::operator<<<std::char_traits<char>>(v81, " "); v83 = std::ostream::operator<<(v82, v80); std::operator<<<std::char_traits<char>>(v83, "\n"); std::string::_Rep::_M_dispose(v179[0] - 12, v192); } v76 = ++v75; } while ( v75 < (unsigned __int16)Device->word6 * (unsigned int)(unsigned __int16)Device->word4 ); } v84 = Device->dword60; if ( (unsigned __int16)((Device->dword64 - v84) >> 2) ) { v85 = 0; do { v86 = *(_DWORD *)(v84 + 4 * v85); v87 = (int *)v203; v88 = &v202; if ( !v203 ) goto LABEL_150; do { if ( v86 > v87[4] ) { v87 = (int *)v87[3]; } else { v88 = v87; v87 = (int *)v87[2]; } } while ( v87 ); if ( v88 == &v202 || v86 < v88[4] ) { LABEL_150: v89 = (int *)operator new(0x18u); if ( v89 ) { *v89 = 0; v89[1] = 0; v89[2] = 0; v89[3] = 0; v89[4] = v86; v89[5] = 0; } v124 = v89; std::_Rb_tree<HDDMTileType const*,std::pair<HDDMTileType const* const,int>,std::_Select1st<std::pair<HDDMTileType const* const,int>>,std::less<HDDMTileType const*>,std::allocator<std::pair<HDDMTileType const* const,int>>>::_M_get_insert_hint_unique_pos((int)&v141); v88 = v141; if ( v142 ) { v90 = 1; if ( !v141 && v142 != &v202 ) v90 = v124[4] < (unsigned int)v142[4]; std::_Rb_tree_insert_and_rebalance(v90, v124, v142, &v202); v206 = (volatile signed __int32 *)((char *)v206 + 1); v88 = v124; } else { operator delete(v124); } } v91 = v88[5]; if ( v91 > 0 ) { HDDMTileType::getName((HDDMTileType *)v178); v92 = std::__ostream_insert<char,std::char_traits<char>>( &hddmChipDesc, v178[0], *(_DWORD *)(v178[0] - 12)); v93 = std::operator<<<std::char_traits<char>>(v92, " "); v94 = std::ostream::operator<<(v93, v91); std::operator<<<std::char_traits<char>>(v94, "\n"); std::string::_Rep::_M_dispose(v178[0] - 12, v193); } ++v85; v84 = Device->dword60; } while ( v85 < (unsigned __int16)((Device->dword64 - v84) >> 2) ); } std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "}\n", 2); std::ofstream::~ofstream(&hddmChipDesc); } std::_Rb_tree<HDDMTileType const*,std::pair<HDDMTileType const* const,int>,std::_Select1st<std::pair<HDDMTileType const* const,int>>,std::less<HDDMTileType const*>,std::allocator<std::pair<HDDMTileType const* const,int>>>::_M_erase( (int)&v201, v203); std::_Rb_tree<HDDMTile const*,std::pair<HDDMTile const* const,int>,std::_Select1st<std::pair<HDDMTile const* const,int>>,std::less<HDDMTile const*>,std::allocator<std::pair<HDDMTile const* const,int>>>::_M_erase( (int)v194, v196); break; } } } if ( !Device->dword17C ) { v106 = (HDDMOracle *)operator new(0x8Cu); HDDMOracle::HDDMOracle(v106, Device); Device->dword17C = v106; } std::string::string(v169, "RCLK_INT_L", &v145); TileType = HDDMDevice::getTileType(Device, (const HSTString *)v169); std::string::_Rep::_M_dispose(v169[0] - 12, &hddmChipDesc); if ( TileType ) { v96 = *(unsigned __int16 *)(TileType + 2); if ( *(_WORD *)(TileType + 2) ) { v97 = 0; v98 = 0; do { v99 = v97 + *(_DWORD *)(TileType + 124); if ( (*(_BYTE *)(v99 + 3) & 8) != 0 ) *(_BYTE *)(v99 + 1) |= 0x10u; ++v98; v97 += 24; } while ( v96 > v98 ); } } std::string::string(v170, "RCLK_INT_R", &v146); v100 = HDDMDevice::getTileType(Device, (const HSTString *)v170); std::string::_Rep::_M_dispose(v170[0] - 12, &hddmChipDesc); if ( v100 ) { v101 = *(unsigned __int16 *)(v100 + 2); if ( *(_WORD *)(v100 + 2) ) { v102 = 0; v103 = 0; do { v104 = v102 + *(_DWORD *)(v100 + 124); if ( (*(_BYTE *)(v104 + 3) & 8) != 0 ) *(_BYTE *)(v104 + 1) |= 0x10u; ++v103; v102 += 24; } while ( v101 > v103 ); } } if ( ValueAsBool ) { HUTRuntime::getWallSecs((HUTRuntime *)v200); HUTRuntime::getUserSecs((HUTRuntime *)v200); std::string::string(&hddmChipDesc); std::string::string(v188); ComMsgMgr::sendScopedMsg::eval( 3, "/proj/buildscratch/builds/2014.1/continuous/20140404125757/src/shared/device/devmodel/HDDMDevice.cxx", 896, v188); std::string::_Rep::_M_dispose(v188[0] - 12, v194); std::string::_Rep::_M_dispose((char *)hddmChipDesc - 12, &v201); } HDDMProto::freeMemory((HDDMProto *)&dword_21701EC); std::string::_Rep::_M_dispose(v163[0] - 12, &hddmChipDesc); std::string::_Rep::_M_dispose(v159[0] - 12, &hddmChipDesc); std::string::_Rep::_M_dispose(v158[0] - 12, &hddmChipDesc); v6 = Device; LABEL_177: HUTRuntime::~HUTRuntime((HUTRuntime *)v200); return v6; }
10-04
请仔细阅读和分析下面函数 1. 保持原始的功能逻辑不变 2. 已经给定的结构体名字和元素不要更改 3. 程序内部错误和异常使用英文, 其他添加中文注释说明 4. 不使用 auto,使用显式 for 循环 5. 结构体采用32位定义 6. 不要使用小函数,使用一个函数进行部署 7. 实现全部功能,完整可编译的代码 8. 提高执行效率,降低计算复杂度 HDDMDevice *__fastcall HDDMDeviceCache::loadDevice( HDDMDeviceCache *this, const std::string *archFilePath, const std::string *deviceFilePath, const std::string *templatePath, const std::string *nodeTemplatePath) { int v6; // eax __int64 v7; // r15 __int64 v8; // r14 __int64 n128; // r13 _QWORD *s1_1; // r14 HDDMDevice *Device_2; // rbx _QWORD *s2_1; // rsi size_t n; // rdx bool v15; // zf HDDMDevice *Device_1; // rax const std::string *p_qword160; // r12 HDConfig *v18; // rbx unsigned __int64 v19; // rbx HEXInternalException *v20; // rbx char isDerived; // al char ValueAsBoolERKSs; // bl char ValueAsBoolERKSs_1; // bl unsigned __int16 word4; // si unsigned __int16 word6; // cx __int64 v26; // rdx unsigned __int64 v27; // rbx __int64 v28; // rdx __int64 v29; // rdi __int64 v30; // rax __int64 v31; // rcx __int64 v32; // rsi _QWORD *v33; // r12 __int64 v34; // rdx unsigned __int64 v35; // rax unsigned int v36; // ebp __int64 v37; // rcx unsigned int v38; // edi int v39; // r8d int v40; // edx int v41; // esi __int64 v42; // rcx int v43; // r9d int v44; // r10d __int16 n3; // cx unsigned int v46; // r14d __int64 v47; // r13 __int64 v48; // r13 __int64 v49; // r13 __int64 v50; // r8 const HDDMTilePort *s1_4; // r13 __int64 v52; // r8 std::string *v53; // rax _QWORD *v54; // r14 __int64 v55; // r15 __int64 v56; // rax __int64 v57; // r8 __int64 v58; // r14 __int64 v59; // rax unsigned int v60; // r15d unsigned int v61; // r14d __int64 v62; // r14 __int64 v63; // rax __int64 v64; // r8 int *insert_hint_unique_pos_3; // rdx int *insert_hint_unique_pos_2; // r15 int *insert_hint_unique_pos_4; // r14 __int64 insert_hint_unique_pos_5; // rax __int64 insert_hint_unique_pos; // rax __int64 v70; // rdx _BOOL8 v71; // rdi unsigned __int64 v72; // r14 int *insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__12; // rdx int *insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__2; // r15 __int64 insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__14; // rax __int64 insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__13; // rax __int64 v77; // rdx _BOOL8 v78; // rdi int *insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__15; // rdx HDDMTile *v80; // rsi int *insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__5; // r15 int *insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__16; // r14 __int64 insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__17; // rax HDDMTile *v84; // rax __int64 insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__3; // rax __int64 v86; // rdx _BOOL8 v87; // rdi unsigned __int64 v88; // r14 int *insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__18; // rdx int *insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__8; // r15 __int64 insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__20; // rax __int64 insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__6; // rax __int64 v93; // rdx _BOOL8 v94; // rdi unsigned int v95; // r14d unsigned int v96; // r15d __int64 v97; // r13 __int64 v98; // r13 __int64 v99; // r13 __int64 v100; // r13 __int64 v101; // r13 __int64 v102; // r13 __int64 v103; // r13 __int64 v104; // rax __int64 v105; // rdx int v106; // eax __int64 v107; // rax int v108; // ecx unsigned int v109; // ebx __int64 v110; // rdx int v111; // ebp __int64 v112; // rax __int64 v113; // rax __int64 v114; // rax __int64 qwordA8; // rdx __int64 v116; // r13 int v117; // r14d int *insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__21; // rax unsigned __int64 v119; // r12 int *insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__10; // rbx __int64 insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__22; // rax int *insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__11; // r15 __int64 insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__9; // rax __int64 v124; // rdx _BOOL8 v125; // rdi int v126; // ebx __int64 v127; // rax __int64 v128; // rax __int64 v129; // rax __int64 TileType; // rbx int v131; // eax __int64 v132; // rdx __int64 v133; // rcx __int64 v134; // rax __int64 TileTypeERKSs; // rbx int v136; // eax __int64 v137; // rdx __int64 v138; // rcx __int64 v139; // rax HPAParamMgr *ParamMgrEv; // rbp char ValueAsBoolERKSs_2; // bl const char *s1_3; // rbp HDDMInactiveExceptionAccess *v143; // rbp char v144; // bl google::protobuf::Message *message; // rdx HEXDataException *v146; // rbp HDDMDevice **v147; // rbx __int64 v148; // rax __int64 v149; // rax HDDMOracle *v150; // rbx HEXDataException *exception; // rbx char *DEBUG:_Request_device_load:_%s__%s_n; // [rsp+0h] [rbp-AC8h] __int64 v153; // [rsp+8h] [rbp-AC0h] int v154; // [rsp+10h] [rbp-AB8h] HDDMTilePort **p_s1; // [rsp+20h] [rbp-AA8h] std::string *v158; // [rsp+30h] [rbp-A98h] std::string *v160; // [rsp+58h] [rbp-A70h] int *insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4_; // [rsp+68h] [rbp-A60h] int *insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__19; // [rsp+68h] [rbp-A60h] unsigned int insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4_a; // [rsp+68h] [rbp-A60h] int *insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__7; // [rsp+68h] [rbp-A60h] int *insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__4; // [rsp+68h] [rbp-A60h] int *insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__1; // [rsp+68h] [rbp-A60h] int *insert_hint_unique_pos_1; // [rsp+68h] [rbp-A60h] unsigned int v168; // [rsp+74h] [rbp-A54h] HDDMDevice *Device; // [rsp+98h] [rbp-A30h] __int64 v170; // [rsp+A0h] [rbp-A28h] __int64 v171; // [rsp+C0h] [rbp-A08h] char ValueAsBool; // [rsp+CBh] [rbp-9FDh] unsigned int v173; // [rsp+CCh] [rbp-9FCh] char v174; // [rsp+E5h] [rbp-9E3h] BYREF char v175; // [rsp+E7h] [rbp-9E1h] BYREF char v176; // [rsp+E9h] [rbp-9DFh] BYREF char v177; // [rsp+EAh] [rbp-9DEh] BYREF char v178; // [rsp+ECh] [rbp-9DCh] BYREF char v179; // [rsp+EDh] [rbp-9DBh] BYREF char v180; // [rsp+EFh] [rbp-9D9h] BYREF unsigned __int16 xngFileType[8]; // [rsp+F0h] [rbp-9D8h] BYREF unsigned __int16 xngFileType_1[8]; // [rsp+100h] [rbp-9C8h] BYREF unsigned __int16 p_xngFileVersion[7]; // [rsp+110h] [rbp-9B8h] BYREF unsigned __int16 xngFileVersion; // [rsp+11Eh] [rbp-9AAh] BYREF _QWORD v185[2]; // [rsp+120h] [rbp-9A8h] BYREF _QWORD v186[2]; // [rsp+130h] [rbp-998h] BYREF _QWORD v187[2]; // [rsp+140h] [rbp-988h] BYREF _QWORD v188[2]; // [rsp+150h] [rbp-978h] BYREF __int64 v189; // [rsp+160h] [rbp-968h] BYREF __int64 v190; // [rsp+170h] [rbp-958h] BYREF int v191[2]; // [rsp+180h] [rbp-948h] BYREF int v192[2]; // [rsp+190h] [rbp-938h] BYREF _QWORD v193[2]; // [rsp+1A0h] [rbp-928h] BYREF _QWORD v194[2]; // [rsp+1B0h] [rbp-918h] BYREF _QWORD v195[2]; // [rsp+1C0h] [rbp-908h] BYREF _QWORD deviceFilePath_1[2]; // [rsp+1F0h] [rbp-8D8h] BYREF _QWORD v197[2]; // [rsp+200h] [rbp-8C8h] BYREF __int64 v198; // [rsp+210h] [rbp-8B8h] BYREF __int64 v199; // [rsp+220h] [rbp-8A8h] BYREF _QWORD v200[2]; // [rsp+230h] [rbp-898h] BYREF _QWORD v201[2]; // [rsp+240h] [rbp-888h] BYREF _QWORD v202[2]; // [rsp+250h] [rbp-878h] BYREF _QWORD v203[2]; // [rsp+260h] [rbp-868h] BYREF _QWORD v204[2]; // [rsp+270h] [rbp-858h] BYREF _QWORD v205[2]; // [rsp+280h] [rbp-848h] BYREF _QWORD v206[2]; // [rsp+2A0h] [rbp-828h] BYREF _QWORD v207[2]; // [rsp+2B0h] [rbp-818h] BYREF _QWORD v208[2]; // [rsp+2C0h] [rbp-808h] BYREF _QWORD v209[2]; // [rsp+2D0h] [rbp-7F8h] BYREF _QWORD v210[2]; // [rsp+2F0h] [rbp-7D8h] BYREF _QWORD v211[2]; // [rsp+300h] [rbp-7C8h] BYREF _QWORD v212[2]; // [rsp+310h] [rbp-7B8h] BYREF _QWORD v213[2]; // [rsp+320h] [rbp-7A8h] BYREF _QWORD v214[2]; // [rsp+330h] [rbp-798h] BYREF _QWORD v215[2]; // [rsp+340h] [rbp-788h] BYREF _QWORD v216[2]; // [rsp+350h] [rbp-778h] BYREF _QWORD v217[2]; // [rsp+360h] [rbp-768h] BYREF _QWORD v218[2]; // [rsp+370h] [rbp-758h] BYREF _QWORD v219[2]; // [rsp+380h] [rbp-748h] BYREF _QWORD v220[2]; // [rsp+390h] [rbp-738h] BYREF unsigned int v221[4]; // [rsp+3A0h] [rbp-728h] BYREF _QWORD v222[2]; // [rsp+3B0h] [rbp-718h] BYREF HDDMTile *v223[2]; // [rsp+3C0h] [rbp-708h] BYREF HDDMTilePort *p_s1_1[2]; // [rsp+3D0h] [rbp-6F8h] BYREF __int64 v225; // [rsp+3E0h] [rbp-6E8h] BYREF __int64 v226; // [rsp+3F0h] [rbp-6D8h] BYREF _QWORD v227[2]; // [rsp+400h] [rbp-6C8h] BYREF _QWORD v228[2]; // [rsp+410h] [rbp-6B8h] BYREF __int64 v229; // [rsp+420h] [rbp-6A8h] BYREF _QWORD v230[2]; // [rsp+430h] [rbp-698h] BYREF _QWORD v231[2]; // [rsp+440h] [rbp-688h] BYREF _QWORD v232[2]; // [rsp+450h] [rbp-678h] BYREF const HDDMTile *v233[2]; // [rsp+460h] [rbp-668h] BYREF __int64 v234; // [rsp+470h] [rbp-658h] BYREF int v235; // [rsp+478h] [rbp-650h] BYREF int *insert_hint_unique_pos_6; // [rsp+480h] [rbp-648h] int *v237; // [rsp+488h] [rbp-640h] int *v238; // [rsp+490h] [rbp-638h] __int64 v239; // [rsp+498h] [rbp-630h] void *s1_2; // [rsp+4A0h] [rbp-628h] BYREF int v241; // [rsp+4A8h] [rbp-620h] BYREF int *insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__23; // [rsp+4B0h] [rbp-618h] int *v243; // [rsp+4B8h] [rbp-610h] int *v244; // [rsp+4C0h] [rbp-608h] __int64 v245; // [rsp+4C8h] [rbp-600h] _BYTE v246[64]; // [rsp+4D0h] [rbp-5F8h] BYREF void *istream[12]; // [rsp+510h] [rbp-5B8h] BYREF _BYTE v248[176]; // [rsp+570h] [rbp-558h] BYREF void *s1; // [rsp+620h] [rbp-4A8h] BYREF char *v250; // [rsp+628h] [rbp-4A0h] BYREF HDDMDevice v251; // [rsp+630h] [rbp-498h] BYREF char v252; // [rsp+A88h] [rbp-40h] std::string::string(&s1, "", &s1_2); std::string::string(istream, "device:loadDevice", &v234); HUTMemWatcher::HUTMemWatcher((HUTMemWatcher *)v248, (const std::string *)istream, (const std::string *)&s1); std::string::_Rep::_M_dispose((char *)istream[0] - 24, v246); std::string::_Rep::_M_dispose((char *)s1 - 24, istream); if ( &_pthread_key_create ) { v6 = pthread_mutex_lock(&mutex_); if ( v6 ) std::__throw_system_error(v6); } HUTRuntime::HUTRuntime((HUTRuntime *)v246, 1); HUTMemory::getUsedMemory((HUTMemory *)v246); p_s1 = (HDDMTilePort **)HPAParamMgr::getParamMgr((HPAParamMgr *)v246); std::string::string(v185, "device.trackDeviceDataLoading", istream); ValueAsBool = HPAParamMgr::getValueAsBool((HPAParamMgr *)p_s1, (const std::string *)v185); std::string::_Rep::_M_dispose(v185[0] - 24LL, &s1); if ( ValueAsBool ) { v7 = *(_QWORD *)archFilePath; v8 = *(_QWORD *)deviceFilePath; std::string::string(v218, "trackDeviceDataLoading", &v175); std::string::string(v217, "device", &s1); v154 = v8; v153 = v7; DEBUG:_Request_device_load:_%s__%s_n = "DEBUG: Request device load: %s, %s\n"; ComMsgMgr::sendScopedMsg::eval( 2, "/proj/rdi-xco/wall/workspaces/wall287/sub/REL/2016.3/src/shared/device/devmodel/HDDMDevice.cxx", 770, v217, v218, 16777218); std::string::_Rep::_M_dispose(v217[0] - 24LL, istream); std::string::_Rep::_M_dispose(v218[0] - 24LL, &s1); } std::string::string((std::string *)v186, archFilePath); sub_2188390(&s1, (const std::string *)v186); n128 = 0; std::string::_Rep::_M_dispose(v186[0] - 24LL, istream); s1_1 = s1; do { Device_2 = *(HDDMDevice **)((char *)&this->qword0 + n128); if ( Device_2 ) { s2_1 = (_QWORD *)Device_2->qword160; n = *(s1_1 - 3); if ( n == *(s2_1 - 3) && !memcmp(s1_1, s2_1, n) ) { ++Device_2->dword158; if ( ValueAsBool ) { std::string::string(v220, "trackDeviceDataLoading", &v176); std::string::string(v219, "device", istream); ComMsgMgr::sendScopedMsg::eval( 3, "/proj/rdi-xco/wall/workspaces/wall287/sub/REL/2016.3/src/shared/device/devmodel/HDDMDevice.cxx", 789, v219, v220, 16777218); std::string::_Rep::_M_dispose(v219[0] - 24LL, &s1_2); std::string::_Rep::_M_dispose(v220[0] - 24LL, istream); s1_1 = s1; } std::string::_Rep::_M_dispose(s1_1 - 3, istream); goto LABEL_13; } } n128 += 8; } while ( n128 != 128 ); std::string::_Rep::_M_dispose(s1_1 - 3, istream); std::string::string(v188, "", istream); std::string::string(v187, "", &s1_2); Device = (HDDMDevice *)HDDMDeviceCache::createDevice(this, (const std::string *)v187, (const std::string *)v188); std::string::_Rep::_M_dispose(v187[0] - 24LL, &s1); std::string::_Rep::_M_dispose(v188[0] - 24LL, &s1); ++Device->dword158; xngFileType[0] = 0; xngFileVersion = 0; HDDMDeviceCache::getFileTypeAndVersion(this, archFilePath, xngFileType, &xngFileVersion); if ( (unsigned __int16)(xngFileType[0] - 2) > 1u ) { exception = (HEXDataException *)__cxa_allocate_exception(0x18u); std::string::string((std::string *)&v190, archFilePath); std::string::string(&v189, "File is not a chip or device XNG:", istream); sub_1E8DC92(exception, (int)DEBUG:_Request_device_load:_%s__%s_n, v153); std::string::_Rep::_M_dispose(v189 - 24, &s1); std::string::_Rep::_M_dispose(v190 - 24, &s1); __cxa_throw(exception, (struct type_info *)&`typeinfo for'HEXDataException, sub_1F4CF30); } *(_QWORD *)v191 = (char *)&std::string::_Rep::_S_empty_rep_storage + 24; *(_QWORD *)v192 = (char *)&std::string::_Rep::_S_empty_rep_storage + 24; if ( xngFileType[0] == 2 ) { sub_1F9A060(&s1, *(_QWORD *)archFilePath, 4, 0); std::istream::read((std::istream *)&v251, (char *)&s1_2, 8); HDDMXng::Chip::Chip((HDDMXng::Chip *)istream); HDDMDevice::readMessage(&v251, (std::istream *)istream, message); std::string::assign((std::string *)v191, (const std::string *)istream[7]); std::string::assign((std::string *)v192, (const std::string *)istream[6]); HDDMXng::Chip::~Chip((HDDMXng::Chip *)istream); sub_1F34A70(&s1); } else // xngd { std::string::string((std::string *)v193, archFilePath); HUBSimpleScanner::HUBSimpleScanner(&s1, v193); std::string::_Rep::_M_dispose(v193[0] - 24LL, istream); HUBSimpleScanner::scanTargetWord((HUBSimpleScanner *)&s1, "xngd", 1); HUBSimpleScanner::scanInt((HUBSimpleScanner *)&s1, 1, "version number"); HUBSimpleScanner::scanWord((HUBSimpleScanner *)v194, (bool)&s1, (const char *)&dword_0 + 1); std::string::swap((std::string *)v191, (std::string *)v194); std::string::_Rep::_M_dispose(v194[0] - 24LL, istream); HUBSimpleScanner::scanWord((HUBSimpleScanner *)v195, (bool)&s1, (const char *)&dword_0 + 1); std::string::swap((std::string *)v192, (std::string *)v195); std::string::_Rep::_M_dispose(v195[0] - 24LL, istream); HUBSimpleScanner::~HUBSimpleScanner((HUBSimpleScanner *)&s1); } std::string::string((std::string *)deviceFilePath_1, deviceFilePath); if ( !*(_QWORD *)(deviceFilePath_1[0] - 24LL) ) { sub_21886D0(v197, archFilePath, v191); std::string::swap((std::string *)deviceFilePath_1, (std::string *)v197); std::string::_Rep::_M_dispose(v197[0] - 24LL, &s1); } HDDMDevice::setloadpaths(Device, archFilePath, (const std::string *)deviceFilePath_1); xngFileType_1[0] = 0; p_xngFileVersion[0] = 0; HDDMDeviceCache::getFileTypeAndVersion(this, (const std::string *)deviceFilePath_1, xngFileType_1, p_xngFileVersion); if ( xngFileType_1[0] != 1 ) { v146 = (HEXDataException *)__cxa_allocate_exception(0x18u); std::string::string((std::string *)&v199, (const std::string *)deviceFilePath_1); std::string::string(&v198, "File is not an architecture XNG:", istream); sub_1E8DC92(v146, (int)DEBUG:_Request_device_load:_%s__%s_n, v153); std::string::_Rep::_M_dispose(v198 - 24, &s1); std::string::_Rep::_M_dispose(v199 - 24, &s1); __cxa_throw(v146, (struct type_info *)&`typeinfo for'HEXDataException, sub_1F4CF30); } HDDMDevice::readarch_pb(Device, (const std::string *)deviceFilePath_1, p_xngFileVersion[0]); v15 = xngFileType[0] != 3; Device->byte1F1 = xngFileType[0] == 3; if ( !v15 ) { HDDMDevice::readdevice(Device, archFilePath); Device_1 = Device; if ( Device->qword40 ) goto LABEL_24; LABEL_29: HDDMDevice::createRPMGrid(Device_1); goto LABEL_24; } v251.word4 = -1; v251.word6 = -1; *(_WORD *)&v251.byte0 = -1; s1 = (char *)&std::string::_Rep::_S_empty_rep_storage + 24; v250 = (char *)&std::string::_Rep::_S_empty_rep_storage + 24; *(_WORD *)&v251.gap1[1] = -1; v251.word8 = -1; v251.wordA = -1; *(_QWORD *)&v251.word10 = (char *)&std::string::_Rep::_S_empty_rep_storage + 24; memset(&v251.dword18, 0, 24); v251.qword30 = 0xFFFFFFFF00000000LL; std::string::assign((std::string *)&v250, "chip", 4u); std::string::assign((std::string *)&s1, (const std::string *)v192); std::string::assign((std::string *)&v251.word10, archFilePath); v251.word6 = 0; *(_WORD *)&v251.byte0 = 0; *(_WORD *)&v251.gap1[1] = 0; v251.word4 = 0; v251.word8 = 0; v251.wordA = 0; v251.qword30 = 0; istream[0] = 0; std::vector<HDDMChip *>::_M_fill_assign(&Device->qword3B8, 1, istream); HDDMDevice::readchip_pb(Device, &s1); std::string::_Rep::_M_dispose(*(_QWORD *)&v251.word10 - 24LL, istream); std::string::_Rep::_M_dispose(v250 - 24, istream); std::string::_Rep::_M_dispose((char *)s1 - 24, istream); Device_1 = Device; if ( !Device->qword40 ) goto LABEL_29; LABEL_24: HDDMDevice::createRoutingDS(Device); HDDMDevice::setrecursivedeviceid(Device, Device->byte0 & 0xF); p_qword160 = (const std::string *)&Device->qword160; std::string::string((std::string *)v200, (const std::string *)&Device->qword160); std::string::string((std::string *)v232, (const std::string *)v200); std::string::_Rep::_M_dispose(v200[0] - 24LL, &s1); std::string::string(v201, "cfg", &v174); boost::filesystem::path::replace_extension((boost::filesystem::path *)v232, (const boost::filesystem::path *)v201); std::string::_Rep::_M_dispose(v201[0] - 24LL, &s1); HUTEnv::getRDIDataDir((HUTEnv *)v202, (const std::string *)v232); std::string::string((std::string *)v233, (const std::string *)v202); std::string::_Rep::_M_dispose(v202[0] - 24LL, &s1); boost::filesystem::path::operator/=(v233, v232); std::string::string((std::string *)&v234, (const std::string *)v233); boost::filesystem::path::stem((boost::filesystem::path *)v203); std::string::string((std::string *)&s1_2, (const std::string *)v203); std::string::_Rep::_M_dispose(v203[0] - 24LL, &s1); std::string::string((std::string *)v204, (const std::string *)&v234); boost::filesystem::detail::status(v221, v204, 0); if ( v221[0] <= 1 ) { std::string::_Rep::_M_dispose(v204[0] - 24LL, &s1); } else { std::string::_Rep::_M_dispose(v204[0] - 24LL, &s1); v18 = (HDConfig *)operator new(0xB0u); HDConfig::HDConfig(v18, 0, 1); *(_QWORD *)Device->gap310 = v18; std::string::string(v205, "", istream); HDConfig::readFile(*(HDConfig **)Device->gap310, (const std::string *)&v234, (const std::string *)v205); std::string::_Rep::_M_dispose(v205[0] - 24LL, &s1); istream[0] = (char *)&std::string::_Rep::_S_empty_rep_storage + 24; std::string::string(v206, "DeviceName", v231); LOBYTE(v18) = sub_1F2E490(*(std::string **)Device->gap310, (HDARPart *)v206, (std::string *)istream); std::string::_Rep::_M_dispose(v206[0] - 24LL, &s1); if ( (_BYTE)v18 ) { v19 = *((_QWORD *)s1_2 - 3); if ( v19 != *((_QWORD *)istream[0] - 3) || memcmp(s1_2, istream[0], *((_QWORD *)s1_2 - 3)) ) { std::string::string(&s1, " Device name does not match configuration name! ", v231); std::string::append((std::string *)&s1, (const std::string *)istream); v20 = (HEXInternalException *)__cxa_allocate_exception(0x18u); HEXInternalException::HEXInternalException(v20, (const std::string *)&s1); __cxa_throw(v20, (struct type_info *)&`typeinfo for'HEXInternalException, sub_1F508A0); } } else { v19 = *((_QWORD *)istream[0] - 3); } std::string::_M_mutate((std::string *)istream, 0, v19, 0); std::string::string(v207, "BaseDevice", v231); v144 = sub_1F2E490(*(std::string **)Device->gap310, (HDARPart *)v207, (std::string *)istream); std::string::_Rep::_M_dispose(v207[0] - 24LL, &s1); if ( v144 ) std::string::assign((std::string *)&Device->gap310[8], (const std::string *)istream); std::string::_Rep::_M_dispose((char *)istream[0] - 24, &s1); } HDConfig::HDConfig((HDConfig *)&s1, 0, 1); std::string::string(v209, "", v231); std::string::string(v208, "specdevice.cfg", v230); HDConfig::readFile((HDConfig *)&s1, (const std::string *)v208, (const std::string *)v209); std::string::_Rep::_M_dispose(v208[0] - 24LL, istream); std::string::_Rep::_M_dispose(v209[0] - 24LL, istream); std::string::string(istream, "specialDevice.", v231); std::string::append((std::string *)istream, (const std::string *)&s1_2); if ( (unsigned __int8)HDConfig::exists((HDConfig *)&s1, (const std::string *)istream, 0) ) { if ( !*(_QWORD *)Device->gap310 ) sub_2035550( (unsigned int)"/proj/rdi-xco/wall/workspaces/wall287/sub/REL/2016.3/src/shared/device/devmodel/HDDMDevice.cxx", 932, (unsigned int)"device", 0x20000000, (unsigned int)"@21-424@%s", (_DWORD)s1_2, (_DWORD)DEBUG:_Request_device_load:_%s__%s_n, v153, v154); } else if ( *(_QWORD *)Device->gap310 ) { s1_3 = (const char *)s1_2; std::string::string(v222, "device", &v177); ComMsgMgr::sendMsg::eval( 1, "/proj/rdi-xco/wall/workspaces/wall287/sub/REL/2016.3/src/shared/device/devmodel/HDDMDevice.cxx", 938, v222, &unk_8000000, "@21-425@%s", s1_3); std::string::_Rep::_M_dispose(v222[0] - 24LL, v231); } std::string::_Rep::_M_dispose((char *)istream[0] - 24, v231); HDConfig::~HDConfig((HDConfig *)&s1); std::string::_Rep::_M_dispose((char *)s1_2 - 24, &s1); std::string::_Rep::_M_dispose(v234 - 24, &s1); std::string::_Rep::_M_dispose((char *)v233[0] - 24, &s1); std::string::_Rep::_M_dispose(v232[0] - 24LL, &s1); HDDMDerived::HDDMDerived((HDDMDerived *)istream, Device); isDerived = HDDMDerived::isDerived((HDDMDerived *)istream); Device->byte321 = isDerived; if ( isDerived ) { HDDMDerived::buildTileList((HDDMDerived *)istream); HDDMDerived::buildSiteList((HDDMDerived *)istream); if ( Device->byte321 ) HDDMDerived::updateDevice((HDDMDerived *)istream); } HDDMDevice::postprocess(Device); std::string::string(v210, "device.disableTemplateLoading", &s1_2); ValueAsBoolERKSs = HPAParamMgr::getValueAsBool((HPAParamMgr *)p_s1, (const std::string *)v210); std::string::_Rep::_M_dispose(v210[0] - 24LL, &s1); if ( !ValueAsBoolERKSs ) { HDDMTemplateIO::HDDMTemplateIO((HDDMTemplateIO *)&s1); std::string::string(v211, "device.loadAllNodeTemplates", &v234); ValueAsBoolERKSs_1 = HPAParamMgr::getValueAsBool((HPAParamMgr *)p_s1, (const std::string *)v211); std::string::_Rep::_M_dispose(v211[0] - 24LL, &s1_2); if ( ValueAsBoolERKSs_1 ) v252 = 1; std::string::string((std::string *)v213, nodeTemplatePath); std::string::string((std::string *)v212, templatePath); HDDMTemplateIO::loadTemplateData(&s1, Device, v212, v213); std::string::_Rep::_M_dispose(v212[0] - 24LL, &s1_2); std::string::_Rep::_M_dispose(v213[0] - 24LL, &s1_2); HDDMTemplateIO::~HDDMTemplateIO((HDDMTemplateIO *)&s1); } HDDMNodeAdjuster::HDDMNodeAdjuster((HDDMNodeAdjuster *)&s1, Device); HDDMNodeAdjuster::performAdjustments((HDDMNodeAdjuster *)&s1, p_qword160); HDDMNodeAdjuster::~HDDMNodeAdjuster((HDDMNodeAdjuster *)&s1); HDDMDevice::suppressCostcodes(Device); if ( !HUTEnv::getEnv((HUTEnv *)"DEVMODEL_CHECKTILEPORTS", (const char *)p_qword160) ) goto LABEL_184; v235 = 0; insert_hint_unique_pos_6 = 0; v239 = 0; v241 = 0; insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__23 = 0; v245 = 0; v237 = &v235; v238 = &v235; v243 = &v241; v244 = &v241; std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Begin checking tile ports {\n", 28); word4 = Device->word4; word6 = Device->word6; if ( !(word6 * word4) ) goto LABEL_159; v173 = 0; v26 = 0; do { v27 = *(_QWORD *)(Device->qwordF8 + 8 * v26); v28 = *(_QWORD *)(*(_QWORD *)(HDDMDeviceCache::m_devcache[(*(_WORD *)v27 >> 6) & 0xF] + 168LL) + 8LL * (*(_WORD *)(v27 + 4) & 0x3FF)); v29 = *(_QWORD *)(v28 + 560); v30 = *(_QWORD *)(v28 + 552); if ( !(unsigned __int16)((v29 - v30) >> 3) ) goto LABEL_158; v171 = 0; do { v160 = *(std::string **)(v30 + 8 * v171); v31 = *((_QWORD *)v160 + 3); v32 = *((_QWORD *)v160 + 4); if ( !(unsigned __int16)((v32 - v31) >> 3) ) goto LABEL_156; v170 = 0; while ( 1 ) { v33 = *(_QWORD **)(v31 + 8 * v170); v34 = v33[3]; v35 = (v33[4] - v34) >> 3; if ( (_DWORD)v35 ) { v36 = 0; while ( 1 ) { s1_4 = 0; if ( (unsigned __int16)v36 < v35 ) s1_4 = *(const HDDMTilePort **)(v34 + 8LL * (unsigned __int16)v36); v223[0] = 0; p_s1_1[0] = 0; if ( (unsigned __int8)HDDMTile::getMatchingPort((HDDMTile *)v27, s1_4, v223, p_s1_1) ) { if ( !(unsigned int)std::string::compare((std::string *)((char *)v160 + 8), "Z") ) hut::detail::assertion_failed( (hut::detail *)"edge1->getName() != \"Z\"", "void {anonymous}::_checkTilePorts(const HDDMDevice*)", "/proj/rdi-xco/wall/workspaces/wall287/sub/REL/2016.3/src/shared/device/devmodel/HDDMDevice.cxx", (const char *)&elf_hash_bucket[82], v52); v53 = *(std::string **)p_s1_1[0]; v233[0] = 0; s1 = 0; v158 = v53; HDDMTile::getMatchingPort(v223[0], p_s1_1[0], v233, (const HDDMTilePort **)&s1); if ( s1 ) v54 = *(_QWORD **)s1; else v54 = 0; if ( (const HDDMTile *)v27 != v233[0] ) { HDDMTile::getName((HDDMTile *)&v229); if ( v233[0] ) HDDMTile::getName((HDDMTile *)v228); else std::string::string(v228, "NULL", &v179); std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Tile3 = ", 8); v55 = std::__ostream_insert<char,std::char_traits<char>>( &std::cout, v228[0], *(_QWORD *)(v228[0] - 24LL)); std::__ostream_insert<char,std::char_traits<char>>(v55, " should be ", 11); v56 = std::__ostream_insert<char,std::char_traits<char>>(v55, v229, *(_QWORD *)(v229 - 24)); std::__ostream_insert<char,std::char_traits<char>>(v56, "\n", 1); std::string::_Rep::_M_dispose(v228[0] - 24LL, v232); std::string::_Rep::_M_dispose(v229 - 24, v232); if ( (const HDDMTile *)v27 != v233[0] ) hut::detail::assertion_failed( (hut::detail *)"tile3 == tile1", "void {anonymous}::_checkTilePorts(const HDDMDevice*)", "/proj/rdi-xco/wall/workspaces/wall287/sub/REL/2016.3/src/shared/device/devmodel/HDDMDevice.cxx", (const char *)&elf_hash_bucket[85], v57); } if ( v33 != v54 ) { if ( v54 ) std::string::string((std::string *)v227, (const std::string *)(v54 + 2)); else std::string::string(v227, "NULL", &v178); std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Face3 = ", 8); v58 = std::__ostream_insert<char,std::char_traits<char>>( &std::cout, v227[0], *(_QWORD *)(v227[0] - 24LL)); std::__ostream_insert<char,std::char_traits<char>>(v58, " should be ", 11); v59 = std::__ostream_insert<char,std::char_traits<char>>(v58, v33[2], *(_QWORD *)(v33[2] - 24LL)); std::__ostream_insert<char,std::char_traits<char>>(v59, "\n", 1); std::string::_Rep::_M_dispose(v227[0] - 24LL, v232); } if ( s1_4 != s1 ) { v60 = *((_DWORD *)s1_4 + 2); v61 = -1; if ( s1 ) v61 = *((_DWORD *)s1 + 2); std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Port3 = ", 8); v62 = std::ostream::_M_insert<unsigned long>(&std::cout, v61); std::__ostream_insert<char,std::char_traits<char>>(v62, " should be ", 11); v63 = std::ostream::_M_insert<unsigned long>(v62, v60); std::__ostream_insert<char,std::char_traits<char>>(v63, "\n", 1); if ( s1_4 != s1 ) hut::detail::assertion_failed( (hut::detail *)"port3 == port1", "void {anonymous}::_checkTilePorts(const HDDMDevice*)", "/proj/rdi-xco/wall/workspaces/wall287/sub/REL/2016.3/src/shared/device/devmodel/HDDMDevice.cxx", (const char *)&elf_hash_bucket[87] + 3, v64); } if ( *((_DWORD *)s1_4 + 3) != *((_DWORD *)p_s1_1[0] + 3) ) { insert_hint_unique_pos_3 = insert_hint_unique_pos_6; insert_hint_unique_pos_2 = &v235; if ( !insert_hint_unique_pos_6 ) goto LABEL_86; do { while ( v27 <= *((_QWORD *)insert_hint_unique_pos_3 + 4) ) { insert_hint_unique_pos_2 = insert_hint_unique_pos_3; insert_hint_unique_pos_3 = (int *)*((_QWORD *)insert_hint_unique_pos_3 + 2); if ( !insert_hint_unique_pos_3 ) goto LABEL_84; } insert_hint_unique_pos_3 = (int *)*((_QWORD *)insert_hint_unique_pos_3 + 3); } while ( insert_hint_unique_pos_3 ); LABEL_84: if ( insert_hint_unique_pos_2 == &v235 || v27 < *((_QWORD *)insert_hint_unique_pos_2 + 4) ) { LABEL_86: insert_hint_unique_pos_4 = insert_hint_unique_pos_2; insert_hint_unique_pos_5 = operator new(0x30u); insert_hint_unique_pos_2 = (int *)insert_hint_unique_pos_5; if ( insert_hint_unique_pos_5 ) { *(_DWORD *)insert_hint_unique_pos_5 = 0; *(_QWORD *)(insert_hint_unique_pos_5 + 8) = 0; *(_QWORD *)(insert_hint_unique_pos_5 + 16) = 0; *(_QWORD *)(insert_hint_unique_pos_5 + 24) = 0; *(_QWORD *)(insert_hint_unique_pos_5 + 32) = v27; *(_DWORD *)(insert_hint_unique_pos_5 + 40) = 0; } insert_hint_unique_pos = std::_Rb_tree<HDDMTile const*,std::pair<HDDMTile const* const,int>,std::_Select1st<std::pair<HDDMTile const* const,int>>,std::less<HDDMTile const*>,std::allocator<std::pair<HDDMTile const* const,int>>>::_M_get_insert_hint_unique_pos( &v234, insert_hint_unique_pos_4, insert_hint_unique_pos_5 + 32); if ( v70 ) { v71 = 1; if ( !insert_hint_unique_pos && (int *)v70 != &v235 ) v71 = *((_QWORD *)insert_hint_unique_pos_2 + 4) < *(_QWORD *)(v70 + 32); std::_Rb_tree_insert_and_rebalance(v71, insert_hint_unique_pos_2, v70, &v235); ++v239; } else { insert_hint_unique_pos_1 = (int *)insert_hint_unique_pos; operator delete(insert_hint_unique_pos_2); insert_hint_unique_pos_2 = insert_hint_unique_pos_1; } } ++insert_hint_unique_pos_2[10]; v72 = *(_QWORD *)(*(_QWORD *)(HDDMDeviceCache::m_devcache[(*(_WORD *)v27 >> 6) & 0xF] + 168LL) + 8LL * (*(_WORD *)(v27 + 4) & 0x3FF)); insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__12 = insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__23; insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__2 = &v241; if ( !insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__23 ) goto LABEL_98; do { while ( v72 <= *((_QWORD *)insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__12 + 4) ) { insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__2 = insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__12; insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__12 = (int *)*((_QWORD *)insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__12 + 2); if ( !insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__12 ) goto LABEL_96; } insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__12 = (int *)*((_QWORD *)insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__12 + 3); } while ( insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__12 ); LABEL_96: if ( insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__2 == &v241 || v72 < *((_QWORD *)insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__2 + 4) ) { LABEL_98: insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4_ = insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__2; insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__14 = operator new(0x30u); insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__2 = (int *)insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__14; if ( insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__14 ) { *(_DWORD *)insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__14 = 0; *(_QWORD *)(insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__14 + 8) = 0; *(_QWORD *)(insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__14 + 16) = 0; *(_QWORD *)(insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__14 + 24) = 0; *(_QWORD *)(insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__14 + 32) = v72; *(_DWORD *)(insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__14 + 40) = 0; } insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__13 = std::_Rb_tree<HDDMTileType const*,std::pair<HDDMTileType const* const,int>,std::_Select1st<std::pair<HDDMTileType const* const,int>>,std::less<HDDMTileType const*>,std::allocator<std::pair<HDDMTileType const* const,int>>>::_M_get_insert_hint_unique_pos( &s1_2, insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4_, insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__14 + 32); if ( v77 ) { v78 = 1; if ( !insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__13 && (int *)v77 != &v241 ) v78 = *((_QWORD *)insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__2 + 4) < *(_QWORD *)(v77 + 32); std::_Rb_tree_insert_and_rebalance( v78, insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__2, v77, &v241); ++v245; } else { insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__1 = (int *)insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__13; operator delete(insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__2); insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__2 = insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__1; } } ++insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__2[10]; insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__15 = insert_hint_unique_pos_6; if ( insert_hint_unique_pos_6 ) { v80 = v223[0]; insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__5 = &v235; do { while ( (HDDMTile *)*((_QWORD *)insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__15 + 4) >= v223[0] ) { insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__5 = insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__15; insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__15 = (int *)*((_QWORD *)insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__15 + 2); if ( !insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__15 ) goto LABEL_108; } insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__15 = (int *)*((_QWORD *)insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__15 + 3); } while ( insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__15 ); LABEL_108: if ( insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__5 == &v235 || (HDDMTile *)*((_QWORD *)insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__5 + 4) > v223[0] ) { LABEL_110: insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__16 = insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__5; insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__17 = operator new(0x30u); insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__5 = (int *)insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__17; if ( insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__17 ) { *(_DWORD *)insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__17 = 0; *(_QWORD *)(insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__17 + 8) = 0; *(_QWORD *)(insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__17 + 16) = 0; *(_QWORD *)(insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__17 + 24) = 0; v84 = v223[0]; insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__5[10] = 0; *((_QWORD *)insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__5 + 4) = v84; } insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__3 = std::_Rb_tree<HDDMTile const*,std::pair<HDDMTile const* const,int>,std::_Select1st<std::pair<HDDMTile const* const,int>>,std::less<HDDMTile const*>,std::allocator<std::pair<HDDMTile const* const,int>>>::_M_get_insert_hint_unique_pos( &v234, insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__16, insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__5 + 8); if ( v86 ) { v87 = 1; if ( !insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__3 && (int *)v86 != &v235 ) v87 = *((_QWORD *)insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__5 + 4) < *(_QWORD *)(v86 + 32); std::_Rb_tree_insert_and_rebalance( v87, insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__5, v86, &v235); ++v239; } else { insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__4 = (int *)insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__3; operator delete(insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__5); insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__5 = insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__4; } v80 = v223[0]; } ++insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__5[10]; v88 = *(_QWORD *)(*(_QWORD *)(HDDMDeviceCache::m_devcache[(*(_WORD *)v80 >> 6) & 0xF] + 168LL) + 8LL * (*((_WORD *)v80 + 2) & 0x3FF)); insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__18 = insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__23; insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__8 = &v241; if ( !insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__23 ) goto LABEL_123; do { while ( v88 <= *((_QWORD *)insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__18 + 4) ) { insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__8 = insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__18; insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__18 = (int *)*((_QWORD *)insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__18 + 2); if ( !insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__18 ) goto LABEL_121; } insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__18 = (int *)*((_QWORD *)insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__18 + 3); } while ( insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__18 ); LABEL_121: if ( insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__8 == &v241 || v88 < *((_QWORD *)insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__8 + 4) ) { LABEL_123: insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__19 = insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__8; insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__20 = operator new(0x30u); insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__8 = (int *)insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__20; if ( insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__20 ) { *(_DWORD *)insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__20 = 0; *(_QWORD *)(insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__20 + 8) = 0; *(_QWORD *)(insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__20 + 16) = 0; *(_QWORD *)(insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__20 + 24) = 0; *(_QWORD *)(insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__20 + 32) = v88; *(_DWORD *)(insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__20 + 40) = 0; } insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__6 = std::_Rb_tree<HDDMTileType const*,std::pair<HDDMTileType const* const,int>,std::_Select1st<std::pair<HDDMTileType const* const,int>>,std::less<HDDMTileType const*>,std::allocator<std::pair<HDDMTileType const* const,int>>>::_M_get_insert_hint_unique_pos( &s1_2, insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__19, insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__20 + 32); if ( v93 ) { v94 = 1; if ( !insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__6 && (int *)v93 != &v241 ) v94 = *((_QWORD *)insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__8 + 4) < *(_QWORD *)(v93 + 32); std::_Rb_tree_insert_and_rebalance( v94, insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__8, v93, &v241); ++v245; } else { insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__7 = (int *)insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__6; operator delete(insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__8); insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__8 = insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__7; } } ++insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__8[10]; insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4_a = *((_DWORD *)p_s1_1[0] + 3); v168 = *((_DWORD *)p_s1_1[0] + 2); HDDMTile::getName((HDDMTile *)&v226); v95 = *((_DWORD *)s1_4 + 3); v96 = *((_DWORD *)s1_4 + 2); HDDMTile::getName((HDDMTile *)&v225); std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Global mismatch: ", 17); v97 = std::__ostream_insert<char,std::char_traits<char>>(&std::cout, v225, *(_QWORD *)(v225 - 24)); std::__ostream_insert<char,std::char_traits<char>>(v97, ".", 1); v98 = std::__ostream_insert<char,std::char_traits<char>>(v97, v33[2], *(_QWORD *)(v33[2] - 24LL)); std::__ostream_insert<char,std::char_traits<char>>(v98, "[", 1); v99 = std::ostream::_M_insert<unsigned long>(v98, v96); std::__ostream_insert<char,std::char_traits<char>>(v99, "] = ", 4); v100 = std::ostream::_M_insert<unsigned long>(v99, v95); std::__ostream_insert<char,std::char_traits<char>>(v100, " ", 1); v101 = std::__ostream_insert<char,std::char_traits<char>>(v100, v226, *(_QWORD *)(v226 - 24)); std::__ostream_insert<char,std::char_traits<char>>(v101, ".", 1); v102 = std::__ostream_insert<char,std::char_traits<char>>( v101, *((_QWORD *)v158 + 2), *(_QWORD *)(*((_QWORD *)v158 + 2) - 24LL)); std::__ostream_insert<char,std::char_traits<char>>(v102, "[", 1); v103 = std::ostream::_M_insert<unsigned long>(v102, v168); std::__ostream_insert<char,std::char_traits<char>>(v103, "] = ", 4); v104 = std::ostream::_M_insert<unsigned long>( v103, insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4_a); std::__ostream_insert<char,std::char_traits<char>>(v104, "\n", 1); std::string::_Rep::_M_dispose(v225 - 24, v232); std::string::_Rep::_M_dispose(v226 - 24, v232); goto LABEL_56; } insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__5 = &v235; goto LABEL_110; } } else if ( v223[0] ) { if ( (*(_BYTE *)v27 & 0x20) != 0 ) { v143 = (HDDMInactiveExceptionAccess *)__cxa_allocate_exception(0x18u); HDDMTile::getRawName((HDDMTile *)v231); std::string::string(v232, "Tile", v233); HDDMInactiveExceptionAccess::HDDMInactiveExceptionAccess( v143, (const std::string *)v232, (const std::string *)v231); std::string::_Rep::_M_dispose(v232[0] - 24LL, &s1); std::string::_Rep::_M_dispose(v231[0] - 24LL, &s1); __cxa_throw(v143, (struct type_info *)&`typeinfo for'HDDMInactiveExceptionAccess, sub_1ED58B0); } v37 = HDDMDeviceCache::m_devcache[(*(_WORD *)v27 >> 6) & 0xF]; v38 = *(unsigned __int16 *)(v37 + 6); v39 = *(unsigned __int16 *)(v37 + 4); v40 = *(_DWORD *)(v27 + 40) % v38; v41 = v39 - 1 - *(_DWORD *)(v27 + 40) / v38; v42 = *(_QWORD *)(*(_QWORD *)(v37 + 168) + 8LL * (*(_WORD *)(v27 + 4) & 0x3FF)); v43 = *(unsigned __int16 *)(v42 + 24); v44 = *(unsigned __int16 *)(v42 + 26); n3 = ***(_WORD ***)s1_4; if ( n3 == 1 ) { if ( v43 + v40 == v38 ) goto LABEL_56; } else if ( n3 ) { if ( n3 == 2 ) { if ( !(_WORD)v41 ) goto LABEL_56; } else if ( n3 != 3 || !(_WORD)v40 ) { goto LABEL_56; } } else if ( v44 + (unsigned __int16)v41 == v39 ) { goto LABEL_56; } v46 = *((_DWORD *)s1_4 + 2); HDDMTile::getName((HDDMTile *)v230); std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Missing matching port for ", 26); v47 = std::__ostream_insert<char,std::char_traits<char>>(&std::cout, v230[0], *(_QWORD *)(v230[0] - 24LL)); std::__ostream_insert<char,std::char_traits<char>>(v47, ".", 1); v48 = std::__ostream_insert<char,std::char_traits<char>>(v47, v33[2], *(_QWORD *)(v33[2] - 24LL)); std::__ostream_insert<char,std::char_traits<char>>(v48, "[", 1); v49 = std::ostream::_M_insert<unsigned long>(v48, v46); std::__ostream_insert<char,std::char_traits<char>>(v49, "]", 1); std::__ostream_insert<char,std::char_traits<char>>(v49, "\n", 1); std::string::_Rep::_M_dispose(v230[0] - 24LL, &s1); hut::detail::assertion_failed( (hut::detail *)"false", "void {anonymous}::_checkTilePorts(const HDDMDevice*)", "/proj/rdi-xco/wall/workspaces/wall287/sub/REL/2016.3/src/shared/device/devmodel/HDDMDevice.cxx", (const char *)&elf_hash_bucket[80] + 1, v50); } LABEL_56: v34 = v33[3]; ++v36; v35 = (v33[4] - v34) >> 3; if ( v36 >= (unsigned int)v35 ) { v105 = *((_QWORD *)v160 + 3); v32 = *((_QWORD *)v160 + 4); goto LABEL_139; } } } v105 = v31; LABEL_139: v106 = v170++; if ( (unsigned __int16)((v32 - v105) >> 3) <= v106 + 1 ) break; v31 = v105; } v107 = *(_QWORD *)(*(_QWORD *)(HDDMDeviceCache::m_devcache[(*(_WORD *)v27 >> 6) & 0xF] + 168LL) + 8LL * (*(_WORD *)(v27 + 4) & 0x3FF)); v29 = *(_QWORD *)(v107 + 560); v30 = *(_QWORD *)(v107 + 552); LABEL_156: v108 = v171++; } while ( v108 + 1 < (unsigned __int16)((v29 - v30) >> 3) ); word4 = Device->word4; word6 = Device->word6; LABEL_158: v26 = ++v173; } while ( v173 < word6 * (unsigned int)word4 ); LABEL_159: if ( v239 ) { std::ofstream::basic_ofstream(&s1, "badGlobals.txt", 48); if ( (unsigned __int16)Device->word6 * (unsigned __int16)Device->word4 ) { v109 = 0; v110 = 0; do { v233[0] = *(const HDDMTile **)(Device->qwordF8 + 8 * v110); v111 = *(_DWORD *)std::map<HDDMTile const*,int>::operator[](&v234, v233); if ( v111 > 0 ) { HDDMTile::getName((HDDMTile *)p_s1_1); v112 = std::__ostream_insert<char,std::char_traits<char>>(&s1, p_s1_1[0], *((_QWORD *)p_s1_1[0] - 3)); v113 = std::operator<<<std::char_traits<char>>(v112, " "); v114 = std::ostream::operator<<(v113, (unsigned int)v111); std::operator<<<std::char_traits<char>>(v114, "\n"); std::string::_Rep::_M_dispose((char *)p_s1_1[0] - 24, v232); } v110 = ++v109; } while ( v109 < (unsigned __int16)Device->word6 * (unsigned int)(unsigned __int16)Device->word4 ); } qwordA8 = Device->qwordA8; if ( (unsigned __int16)((Device->qwordB0 - qwordA8) >> 3) ) { v116 = 0; v117 = 0; do { insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__21 = insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__23; v119 = *(_QWORD *)(qwordA8 + v116); insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__10 = &v241; if ( !insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__23 ) goto LABEL_174; do { while ( v119 <= *((_QWORD *)insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__21 + 4) ) { insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__10 = insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__21; insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__21 = (int *)*((_QWORD *)insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__21 + 2); if ( !insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__21 ) goto LABEL_172; } insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__21 = (int *)*((_QWORD *)insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__21 + 3); } while ( insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__21 ); LABEL_172: if ( insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__10 == &v241 || v119 < *((_QWORD *)insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__10 + 4) ) { LABEL_174: insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__22 = operator new(0x30u); insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__11 = (int *)insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__22; if ( insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__22 ) { *(_DWORD *)insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__22 = 0; *(_QWORD *)(insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__22 + 8) = 0; *(_QWORD *)(insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__22 + 16) = 0; *(_QWORD *)(insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__22 + 24) = 0; *(_QWORD *)(insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__22 + 32) = v119; *(_DWORD *)(insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__22 + 40) = 0; } insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__9 = std::_Rb_tree<HDDMTileType const*,std::pair<HDDMTileType const* const,int>,std::_Select1st<std::pair<HDDMTileType const* const,int>>,std::less<HDDMTileType const*>,std::allocator<std::pair<HDDMTileType const* const,int>>>::_M_get_insert_hint_unique_pos( &s1_2, insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__10, insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__22 + 32); insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__10 = (int *)insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__9; if ( v124 ) { v125 = 1; if ( !insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__9 && (int *)v124 != &v241 ) v125 = *((_QWORD *)insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__11 + 4) < *(_QWORD *)(v124 + 32); insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__10 = insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__11; std::_Rb_tree_insert_and_rebalance( v125, insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__11, v124, &v241); ++v245; } else { operator delete(insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__11); } } v126 = insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__10[10]; if ( v126 > 0 ) { HDDMTileType::getName((HDDMTileType *)v223); v127 = std::__ostream_insert<char,std::char_traits<char>>(&s1, v223[0], *((_QWORD *)v223[0] - 3)); v128 = std::operator<<<std::char_traits<char>>(v127, " "); v129 = std::ostream::operator<<(v128, (unsigned int)v126); std::operator<<<std::char_traits<char>>(v129, "\n"); std::string::_Rep::_M_dispose((char *)v223[0] - 24, v233); } ++v117; v116 += 8; qwordA8 = Device->qwordA8; } while ( v117 < (unsigned __int16)((Device->qwordB0 - qwordA8) >> 3) ); } std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "}\n", 2); std::ofstream::~ofstream(&s1); } std::_Rb_tree<HDDMTileType const*,std::pair<HDDMTileType const* const,int>,std::_Select1st<std::pair<HDDMTileType const* const,int>>,std::less<HDDMTileType const*>,std::allocator<std::pair<HDDMTileType const* const,int>>>::_M_erase( &s1_2, insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4__23); std::_Rb_tree<HDDMTile const*,std::pair<HDDMTile const* const,int>,std::_Select1st<std::pair<HDDMTile const* const,int>>,std::less<HDDMTile const*>,std::allocator<std::pair<HDDMTile const* const,int>>>::_M_erase( &v234, insert_hint_unique_pos_6); LABEL_184: if ( !*(_QWORD *)&Device->gap329[7] ) { v150 = (HDDMOracle *)operator new(0x138u); HDDMOracle::HDDMOracle(v150, Device); *(_QWORD *)&Device->gap329[7] = v150; } std::string::string(v214, "RCLK_INT_L", &s1_2); TileType = HDDMDevice::getTileType(Device, (const std::string *)v214); std::string::_Rep::_M_dispose(v214[0] - 24LL, &s1); if ( TileType ) { v131 = *(unsigned __int16 *)(TileType + 2); if ( (_WORD)v131 ) { v132 = 0; v133 = 8 * (3LL * (unsigned int)(v131 - 1) + 3); do { v134 = *(_QWORD *)(TileType + 216) + v132; if ( (*(_BYTE *)(v134 + 1) & 8) != 0 ) *(_BYTE *)(v134 + 2) |= 0x10u; v132 += 24; } while ( v132 != v133 ); } } std::string::string(v215, "RCLK_INT_R", &s1_2); TileTypeERKSs = HDDMDevice::getTileType(Device, (const std::string *)v215); std::string::_Rep::_M_dispose(v215[0] - 24LL, &s1); if ( TileTypeERKSs ) { v136 = *(unsigned __int16 *)(TileTypeERKSs + 2); if ( (_WORD)v136 ) { v137 = 0; v138 = 8 * (3LL * (unsigned int)(v136 - 1) + 3); do { v139 = *(_QWORD *)(TileTypeERKSs + 216) + v137; if ( (*(_BYTE *)(v139 + 1) & 8) != 0 ) *(_BYTE *)(v139 + 2) |= 0x10u; v137 += 24; } while ( v137 != v138 ); } } HDDMResourceLimits::HDDMResourceLimits((HDDMResourceLimits *)&s1, Device, 0); *(&Device->byte321 + 1) = HDDMResourceLimits::isDeviceLimited((HDDMResourceLimits *)&s1); HDDMResourceLimits::~HDDMResourceLimits((HDDMResourceLimits *)&s1); if ( ValueAsBool ) { HUTMemory::getUsedMemory((HUTMemory *)&s1); HUTRuntime::getWallSecs((HUTRuntime *)v246); HUTRuntime::getUserSecs((HUTRuntime *)v246); std::string::string(&s1, "trackDeviceDataLoading", &v180); std::string::string(v233, "device", &s1_2); ComMsgMgr::sendScopedMsg::eval( 4, "/proj/rdi-xco/wall/workspaces/wall287/sub/REL/2016.3/src/shared/device/devmodel/HDDMDevice.cxx", 1045, v233, &s1, 16777218); std::string::_Rep::_M_dispose((char *)v233[0] - 24, &v234); std::string::_Rep::_M_dispose((char *)s1 - 24, &s1_2); } HDDMProto::freeMemory((HDDMProto *)&qword_992E0F0); ParamMgrEv = (HPAParamMgr *)HPAParamMgr::getParamMgr((HPAParamMgr *)&qword_992E0F0); std::string::string(v216, "arch.regenRpmGrid", &s1_2); ValueAsBoolERKSs_2 = HPAParamMgr::getValueAsBool(ParamMgrEv, (const std::string *)v216); std::string::_Rep::_M_dispose(v216[0] - 24LL, &s1); if ( ValueAsBoolERKSs_2 ) { HDDMSiteRPMHack::HDDMSiteRPMHack((HDDMSiteRPMHack *)&s1, Device); HDDMSiteRPMHack::regenRPMGrid((HDDMSiteRPMHack *)&s1); HDDMDevice::createRPMGrid(Device); HDDMSiteRPMHack::~HDDMSiteRPMHack((HDDMSiteRPMHack *)&s1); } if ( !*(_QWORD *)&Device->gap329[15] ) { v147 = (HDDMDevice **)operator new(0x20u); v147[1] = 0; v147[2] = 0; v147[3] = 0; *v147 = Device; v148 = Device->qword98 - Device->qword90; s1 = 0; v149 = v148 >> 3; if ( (_WORD)v149 ) std::vector<HDDMConnectionDB *>::_M_fill_insert(v147 + 1, 0, (unsigned __int16)v149, &s1); *(_QWORD *)&Device->gap329[15] = v147; } HDDMDerived::~HDDMDerived((HDDMDerived *)istream); std::string::_Rep::_M_dispose(deviceFilePath_1[0] - 24LL, &s1); std::string::_Rep::_M_dispose(*(_QWORD *)v192 - 24LL, &s1); std::string::_Rep::_M_dispose(*(_QWORD *)v191 - 24LL, &s1); Device_2 = Device; LABEL_13: HUTRuntime::~HUTRuntime((HUTRuntime *)v246); if ( &_pthread_key_create ) pthread_mutex_unlock(&mutex_); HUTMemWatcher::~HUTMemWatcher((HUTMemWatcher *)v248); return Device_2; }
09-29
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值