// // sub_3D8014 from 0x3d8014 to 0x3d80f6 (226 bytes) // // 2 xrefs: // > sub_3D8014 @ 0x3d80e8 // > GJGameLevel::scoreVectorToString @ 0x3d8194 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // int __fastcall sub_3D8014(int result, int *a2, int a3) { int *v3; // r9 int *v4; // r4 int v7; // r3 int v8; // r6 int i; // r7 int v10; // r3 int v11; // r3 int v12; // r0 int *v13; // r10 int v14; // r2 int *v15; // r6 int *v16; // r1 int v17; // r3 int *v18; // r0 int *j; // r7 int v20; // r1 int *v21; // r6 int *v22; // r3 v3 = (int *)(result + 4); v4 = (int *)result; while ( 1 ) { v7 = (char *)a2 - (char *)v4; if ( (char *)a2 - (char *)v4 <= 67 ) return result; if ( !a3 ) { v8 = v7 >> 2; for ( i = ((v7 >> 2) - 2) >> 1; ; --i ) { result = std::__adjust_heap<__gnu_cxx::__normal_iterator>,int,int,__gnu_cxx::__ops::_Iter_less_iter>( (int)v4, i, v8, v4[i]); if ( !i ) break; } while ( (char *)a2 - (char *)v4 > 7 ) { v10 = *(a2 - 1); *--a2 = *v4; result = std::__adjust_heap<__gnu_cxx::__normal_iterator>,int,int,__gnu_cxx::__ops::_Iter_less_iter>( (int)v4, 0, a2 - v4, v10); } return result; } v11 = v7 >> 3; v12 = v4[1]; --a3; v13 = v3; v14 = v4[v11]; v15 = &v4[v11]; v16 = a2 - 1; v17 = *(a2 - 1); if ( v12 >= v14 ) { if ( v12 < v17 ) { LABEL_16: v18 = v4; v16 = v3; goto LABEL_14; } if ( v14 < v17 ) goto LABEL_13; } else if ( v14 >= v17 ) { if ( v12 >= v17 ) goto LABEL_16; LABEL_13: v18 = v4; goto LABEL_14; } v18 = v4; v16 = v15; LABEL_14: std::iter_swap<__gnu_cxx::__normal_iterator>,__gnu_cxx::__normal_iterator>>( v18, v16); for ( j = a2; ; std::iter_swap<__gnu_cxx::__normal_iterator>,__gnu_cxx::__normal_iterator>>( v21, j) ) { v20 = *v4; do v21 = v13++; while ( *v21 < v20 ); v22 = j - 1; do j = v22--; while ( v20 < *j ); if ( v21 >= j ) break; v13 = v21 + 1; } result = sub_3D8014(v21, a2, a3); a2 = v21; } }
GD Web Decomp Icon

GD Web Decomp

Raw Source