//
// sub_1800228C0 from 0x1800228c0 to 0x180025054 (10132 bytes)
//
// 2 xrefs:
// > sub_180021100 @ 0x180021733
// > ??> @ 0x1801f7548
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 10:52:59 +0000
//
__int64 __fastcall sub_1800228C0(__int64 a1)
{
int v1; // ebp
char v2; // r8
int v4; // r10d
float v5; // xmm8_4
float v6; // xmm11_4
__int64 v7; // rsi
int v8; // ebx
__int64 v9; // rdx
__int64 v10; // r9
float v11; // xmm1_4
__m128i v12; // xmm1
__int64 v13; // rdx
__int64 v14; // r9
char v15; // r8
int v16; // r10d
float v17; // xmm1_4
__m128i v18; // xmm1
__int64 v19; // rdx
__int64 v20; // r10
char v21; // r8
int v22; // r9d
float v23; // xmm1_4
__m128i v24; // xmm1
float v25; // xmm1_4
__int64 v26; // rdx
__int64 v27; // r9
char v28; // r8
int v29; // r10d
float v30; // xmm2_4
float v31; // xmm1_4
int v32; // eax
__m128i v33; // xmm1
__int64 v34; // rdx
__int64 v35; // r9
char v36; // r8
int v37; // r10d
float v38; // xmm2_4
float v39; // xmm1_4
int v40; // eax
__m128i v41; // xmm1
float v42; // xmm0_4
__int64 v43; // rdx
int v44; // ecx
_WORD *v45; // rax
__int64 v46; // r10
char v47; // r8
int v48; // r9d
float v49; // xmm2_4
float v50; // xmm1_4
int v51; // eax
__m128i v52; // xmm1
int v53; // xmm0_4
float v54; // xmm0_4
int v55; // ecx
__int64 v56; // rdx
_WORD *v57; // rax
char v58; // r8
int v59; // r9d
__int64 v60; // r10
float v61; // xmm2_4
float v62; // xmm1_4
int v63; // eax
__m128i v64; // xmm1
int v65; // xmm0_4
float v66; // xmm0_4
int v67; // ecx
__int64 v68; // rdx
_WORD *v69; // rax
char v70; // r8
int v71; // r9d
__int64 v72; // r10
float v73; // xmm2_4
float v74; // xmm1_4
int v75; // eax
__m128i v76; // xmm1
int v77; // xmm0_4
float v78; // xmm0_4
char v79; // r8
int v80; // r9d
__int64 v81; // rdx
__int64 v82; // r10
float v83; // xmm2_4
float v84; // xmm1_4
int v85; // eax
__m128i v86; // xmm1
char v87; // r9
int v88; // r11d
__int64 v89; // r8
__int64 v90; // rdx
__int64 v91; // rbx
__int64 v92; // r10
float v93; // xmm1_4
__m128i v94; // xmm1
int v95; // ecx
_WORD *v96; // rax
int v97; // eax
__int64 v98; // rdx
int v99; // r8d
_WORD *v100; // rcx
char v101; // r9
int v102; // edx
float v103; // xmm1_4
__m128i v104; // xmm1
float v105; // xmm0_4
char v106; // r9
int v107; // r8d
__int64 v108; // r10
float v109; // xmm1_4
__m128i v110; // xmm1
int v111; // xmm0_4
float v112; // xmm0_4
int v113; // r8d
__int64 v114; // rdx
_WORD *v115; // rcx
char v116; // r9
int v117; // r8d
__int64 v118; // r10
float v119; // xmm1_4
__m128i v120; // xmm1
int v121; // xmm0_4
float v122; // xmm0_4
char v123; // r9
__int64 v124; // rdx
__int64 v125; // r8
float v126; // xmm1_4
__m128i v127; // xmm1
__int64 result; // rax
v1 = 0;
*(_QWORD *)(a1 + 600) = 0;
v2 = 0;
*(_QWORD *)(a1 + 608) = 0;
*(_QWORD *)(a1 + 656) = 0;
v4 = 0;
v5 = -96.0;
v6 = 0.0;
*(_QWORD *)(a1 + 648) = 0;
*(_BYTE *)(a1 + 772) = 0;
*(_DWORD *)(a1 + 776) = 12800;
*(_BYTE *)(a1 + 664) = 1;
*(_QWORD *)(a1 + 636) = 0;
*(_DWORD *)(a1 + 616) = -1027604480;
*(_QWORD *)(a1 + 620) = 0;
*(_DWORD *)(a1 + 628) = 0;
*(_DWORD *)(a1 + 632) = -1027604480;
*(_DWORD *)(a1 + 644) = -1027604480;
*(_QWORD *)(a1 + 712) = 1065353216;
*(_BYTE *)(a1 + 720) = 0;
*(_QWORD *)(a1 + 704) = 0;
*(_QWORD *)(a1 + 668) = 0;
*(_QWORD *)(a1 + 676) = 1065353216;
*(_QWORD *)(a1 + 684) = 1065353216;
*(_QWORD *)(a1 + 692) = 0;
*(_DWORD *)(a1 + 700) = 0;
v7 = *(unsigned int *)(a1 + 748);
v8 = v7;
if ( (int)v7 <= 0 )
goto LABEL_20;
v9 = *(_QWORD *)(a1 + 752);
v10 = (unsigned int)v7;
do
{
v11 = 1.0;
if ( *(_WORD *)(v9 + 4) == 1 )
{
switch ( *(_WORD *)v9 )
{
case 0:
case 2:
case 3:
case 4:
case 5:
case 6:
case 0x81:
case 0x87:
case 0x8A:
case 0x8B:
break;
default:
switch ( *(_WORD *)(v9 + 2) )
{
case 0:
case 1:
v11 = 1.0;
break;
case 2:
v12 = _mm_cvtsi32_si128(*(unsigned __int8 *)(a1 + 744));
goto LABEL_13;
case 3:
v12 = _mm_cvtsi32_si128(*(unsigned __int8 *)(a1 + 736));
goto LABEL_13;
case 0x81:
v12 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 872LL));
goto LABEL_13;
case 0x87:
v12 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 876LL));
goto LABEL_13;
case 0x8A:
v12 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 880LL));
goto LABEL_13;
case 0x8B:
v12 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 884LL));
LABEL_13:
v11 = _mm_cvtepi32_ps(v12).m128_f32[0] * 0.0078125;
break;
default:
break;
}
if ( *(_WORD *)(v9 + 6) != 1 )
v4 += (int)(float)((float)*(int *)(v9 + 8) * v11);
v2 = 1;
break;
}
}
v9 += 12;
--v10;
}
while ( v10 );
if ( v2 )
{
*(float *)(a1 + 760) = 1.0 - powf(10.0, (float)((float)v4 * -0.0000015258789) * 0.050000001);
}
else
{
LABEL_20:
if ( (int)v7 <= 0 )
goto LABEL_140;
}
v13 = *(_QWORD *)(a1 + 752);
v14 = v7;
v15 = 0;
v16 = 0;
do
{
v17 = 1.0;
if ( *(_WORD *)(v13 + 4) == 3 )
{
switch ( *(_WORD *)v13 )
{
case 0:
case 2:
case 3:
case 4:
case 5:
case 6:
case 0x81:
case 0x87:
case 0x8A:
case 0x8B:
break;
default:
switch ( *(_WORD *)(v13 + 2) )
{
case 0:
case 1:
v17 = 1.0;
break;
case 2:
v18 = _mm_cvtsi32_si128(*(unsigned __int8 *)(a1 + 744));
goto LABEL_32;
case 3:
v18 = _mm_cvtsi32_si128(*(unsigned __int8 *)(a1 + 736));
goto LABEL_32;
case 0x81:
v18 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 872LL));
goto LABEL_32;
case 0x87:
v18 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 876LL));
goto LABEL_32;
case 0x8A:
v18 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 880LL));
goto LABEL_32;
case 0x8B:
v18 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 884LL));
LABEL_32:
v17 = _mm_cvtepi32_ps(v18).m128_f32[0] * 0.0078125;
break;
default:
break;
}
if ( *(_WORD *)(v13 + 6) != 1 )
v16 += (int)(float)((float)*(int *)(v13 + 8) * v17);
v15 = 1;
break;
}
}
v13 += 12;
--v14;
}
while ( v14 );
if ( v15 )
*(float *)(a1 + 764) = (float)v16 * 0.000015258789;
v19 = *(_QWORD *)(a1 + 752);
v20 = v7;
v21 = 0;
v22 = 0;
do
{
v23 = 1.0;
if ( *(_WORD *)(v19 + 4) == 4 )
{
switch ( *(_WORD *)v19 )
{
case 0:
case 2:
case 3:
case 4:
case 5:
case 6:
case 0x81:
case 0x87:
case 0x8A:
case 0x8B:
break;
default:
switch ( *(_WORD *)(v19 + 2) )
{
case 0:
case 1:
v23 = 1.0;
break;
case 2:
v24 = _mm_cvtsi32_si128(*(unsigned __int8 *)(a1 + 744));
goto LABEL_50;
case 3:
v24 = _mm_cvtsi32_si128(*(unsigned __int8 *)(a1 + 736));
goto LABEL_50;
case 0x81:
v24 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 872LL));
goto LABEL_50;
case 0x87:
v24 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 876LL));
goto LABEL_50;
case 0x8A:
v24 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 880LL));
goto LABEL_50;
case 0x8B:
v24 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 884LL));
LABEL_50:
v23 = _mm_cvtepi32_ps(v24).m128_f32[0] * 0.0078125;
break;
default:
break;
}
if ( *(_WORD *)(v19 + 6) != 1 )
v22 += (int)(float)((float)*(int *)(v19 + 8) * v23);
v21 = 1;
break;
}
}
v19 += 12;
--v20;
}
while ( v20 );
if ( v21 )
{
v25 = -96.0;
if ( v22 != 0x8000000 )
v25 = -96.0 - (float)((float)v22 * -0.0000014648438);
*(float *)(a1 + 768) = v25;
}
v26 = *(_QWORD *)(a1 + 752);
v27 = v7;
v28 = 0;
v29 = 0;
do
{
v30 = 1.0;
v31 = 1.0;
if ( *(_WORD *)(v26 + 4) == 260 )
{
switch ( *(_WORD *)v26 )
{
case 0:
v30 = 1.0;
break;
case 1:
case 4:
case 5:
goto LABEL_78;
case 2:
v32 = *(unsigned __int8 *)(a1 + 744);
goto LABEL_65;
case 3:
v32 = *(unsigned __int8 *)(a1 + 736);
LABEL_65:
v30 = (float)v32 * 0.0078125;
break;
default:
break;
}
switch ( *(_WORD *)(v26 + 2) )
{
case 0:
case 1:
v31 = 1.0;
break;
case 2:
v33 = _mm_cvtsi32_si128(*(unsigned __int8 *)(a1 + 744));
goto LABEL_74;
case 3:
v33 = _mm_cvtsi32_si128(*(unsigned __int8 *)(a1 + 736));
goto LABEL_74;
case 0x81:
v33 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 872LL));
goto LABEL_74;
case 0x87:
v33 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 876LL));
goto LABEL_74;
case 0x8A:
v33 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 880LL));
goto LABEL_74;
case 0x8B:
v33 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 884LL));
LABEL_74:
v31 = _mm_cvtepi32_ps(v33).m128_f32[0] * 0.0078125;
break;
default:
break;
}
if ( *(_WORD *)(v26 + 6) != 1 )
v29 += (int)(float)((float)((float)*(int *)(v26 + 8) * v31) * v30);
v28 = 1;
}
LABEL_78:
v26 += 12;
--v27;
}
while ( v27 );
if ( v28 )
*(float *)(a1 + 608) = powf(2.0, (float)((float)v29 * 0.000000012715658) - 5.75) * 440.0;
v34 = *(_QWORD *)(a1 + 752);
v35 = v7;
v36 = 0;
v37 = 0;
do
{
v38 = 1.0;
v39 = 1.0;
if ( *(_WORD *)(v34 + 4) == 261 )
{
switch ( *(_WORD *)v34 )
{
case 0:
v38 = 1.0;
break;
case 1:
case 4:
case 5:
goto LABEL_100;
case 2:
v40 = *(unsigned __int8 *)(a1 + 744);
goto LABEL_87;
case 3:
v40 = *(unsigned __int8 *)(a1 + 736);
LABEL_87:
v38 = (float)v40 * 0.0078125;
break;
default:
break;
}
switch ( *(_WORD *)(v34 + 2) )
{
case 0:
case 1:
v39 = 1.0;
break;
case 2:
v41 = _mm_cvtsi32_si128(*(unsigned __int8 *)(a1 + 744));
goto LABEL_96;
case 3:
v41 = _mm_cvtsi32_si128(*(unsigned __int8 *)(a1 + 736));
goto LABEL_96;
case 0x81:
v41 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 872LL));
goto LABEL_96;
case 0x87:
v41 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 876LL));
goto LABEL_96;
case 0x8A:
v41 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 880LL));
goto LABEL_96;
case 0x8B:
v41 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 884LL));
LABEL_96:
v39 = _mm_cvtepi32_ps(v41).m128_f32[0] * 0.0078125;
break;
default:
break;
}
if ( *(_WORD *)(v34 + 6) != 1 )
v37 += (int)(float)((float)((float)*(int *)(v34 + 8) * v39) * v38);
v36 = 1;
}
LABEL_100:
v34 += 12;
--v35;
}
while ( v35 );
if ( v36 )
{
if ( v37 == 0x80000000 )
{
*(_DWORD *)(a1 + 600) = 0;
}
else
{
v42 = fmaxf((float)((float)v37 * 0.00000010850695) + 85.333336, 0.0);
if ( v42 >= 128.0 )
v42 = 127.0;
*(_DWORD *)(a1 + 600) = dword_1801A7E20[v42];
}
}
v43 = *(_QWORD *)(a1 + 752);
v44 = 0;
v45 = (_WORD *)v43;
while ( *v45 || v45[2] != 518 )
{
++v44;
v45 += 6;
if ( v44 >= (int)v7 )
goto LABEL_140;
}
v46 = v7;
v47 = 0;
v48 = 0;
do
{
v49 = 1.0;
v50 = 1.0;
if ( *(_WORD *)(v43 + 4) == 518 )
{
switch ( *(_WORD *)v43 )
{
case 0:
v49 = 1.0;
break;
case 1:
case 4:
case 5:
goto LABEL_131;
case 2:
v51 = *(unsigned __int8 *)(a1 + 744);
goto LABEL_118;
case 3:
v51 = *(unsigned __int8 *)(a1 + 736);
LABEL_118:
v49 = (float)v51 * 0.0078125;
break;
default:
break;
}
switch ( *(_WORD *)(v43 + 2) )
{
case 0:
case 1:
v50 = 1.0;
break;
case 2:
v52 = _mm_cvtsi32_si128(*(unsigned __int8 *)(a1 + 744));
goto LABEL_127;
case 3:
v52 = _mm_cvtsi32_si128(*(unsigned __int8 *)(a1 + 736));
goto LABEL_127;
case 0x81:
v52 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 872LL));
goto LABEL_127;
case 0x87:
v52 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 876LL));
goto LABEL_127;
case 0x8A:
v52 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 880LL));
goto LABEL_127;
case 0x8B:
v52 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 884LL));
LABEL_127:
v50 = _mm_cvtepi32_ps(v52).m128_f32[0] * 0.0078125;
break;
default:
break;
}
if ( *(_WORD *)(v43 + 6) != 1 )
v48 += (int)(float)((float)((float)*(int *)(v43 + 8) * v50) * v49);
v47 = 1;
}
LABEL_131:
v43 += 12;
--v46;
}
while ( v46 );
if ( v47 )
{
if ( v48 == 0x80000000 )
{
v53 = 0;
}
else
{
v54 = fmaxf((float)((float)v48 * 0.00000010850695) + 85.333336, 0.0);
if ( v54 >= 128.0 )
v54 = 127.0;
v53 = dword_1801A7E20[v54];
}
*(_DWORD *)(a1 + 612) = v53;
LODWORD(v7) = *(_DWORD *)(a1 + 748);
}
v8 = v7;
LABEL_140:
v55 = 0;
if ( v8 > 0 )
{
v56 = *(_QWORD *)(a1 + 752);
v57 = (_WORD *)v56;
while ( *v57 || v57[2] != 519 )
{
++v55;
v57 += 6;
v8 = v7;
if ( v55 >= (int)v7 )
goto LABEL_174;
}
v58 = 0;
v59 = 0;
if ( v8 > 0 )
{
v60 = (unsigned int)v7;
do
{
v61 = 1.0;
v62 = 1.0;
if ( *(_WORD *)(v56 + 4) == 519 )
{
switch ( *(_WORD *)v56 )
{
case 0:
v61 = 1.0;
break;
case 1:
case 4:
case 5:
goto LABEL_166;
case 2:
v63 = *(unsigned __int8 *)(a1 + 744);
goto LABEL_153;
case 3:
v63 = *(unsigned __int8 *)(a1 + 736);
LABEL_153:
v61 = (float)v63 * 0.0078125;
break;
default:
break;
}
switch ( *(_WORD *)(v56 + 2) )
{
case 0:
case 1:
v62 = 1.0;
break;
case 2:
v64 = _mm_cvtsi32_si128(*(unsigned __int8 *)(a1 + 744));
goto LABEL_162;
case 3:
v64 = _mm_cvtsi32_si128(*(unsigned __int8 *)(a1 + 736));
goto LABEL_162;
case 0x81:
v64 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 872LL));
goto LABEL_162;
case 0x87:
v64 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 876LL));
goto LABEL_162;
case 0x8A:
v64 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 880LL));
goto LABEL_162;
case 0x8B:
v64 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 884LL));
LABEL_162:
v62 = _mm_cvtepi32_ps(v64).m128_f32[0] * 0.0078125;
break;
default:
break;
}
if ( *(_WORD *)(v56 + 6) != 1 )
v59 += (int)(float)((float)((float)*(int *)(v56 + 8) * v62) * v61);
v58 = 1;
}
LABEL_166:
v56 += 12;
--v60;
}
while ( v60 );
v8 = v7;
if ( v58 )
{
if ( v59 == 0x80000000 )
{
v65 = 0;
}
else
{
v66 = fmaxf((float)((float)v59 * 0.00000010850695) + 85.333336, 0.0);
if ( v66 >= 128.0 )
v66 = 127.0;
v65 = dword_1801A7E20[v66];
}
*(_DWORD *)(a1 + 624) = v65;
LODWORD(v7) = *(_DWORD *)(a1 + 748);
v8 = v7;
}
}
}
LABEL_174:
v67 = 0;
if ( v8 > 0 )
{
v68 = *(_QWORD *)(a1 + 752);
v69 = (_WORD *)v68;
while ( *v69 || v69[2] != 521 )
{
++v67;
v69 += 6;
v8 = v7;
if ( v67 >= (int)v7 )
goto LABEL_208;
}
v70 = 0;
v71 = 0;
if ( v8 > 0 )
{
v72 = (unsigned int)v7;
do
{
v73 = 1.0;
v74 = 1.0;
if ( *(_WORD *)(v68 + 4) == 521 )
{
switch ( *(_WORD *)v68 )
{
case 0:
v73 = 1.0;
break;
case 1:
case 4:
case 5:
goto LABEL_200;
case 2:
v75 = *(unsigned __int8 *)(a1 + 744);
goto LABEL_187;
case 3:
v75 = *(unsigned __int8 *)(a1 + 736);
LABEL_187:
v73 = (float)v75 * 0.0078125;
break;
default:
break;
}
switch ( *(_WORD *)(v68 + 2) )
{
case 0:
case 1:
v74 = 1.0;
break;
case 2:
v76 = _mm_cvtsi32_si128(*(unsigned __int8 *)(a1 + 744));
goto LABEL_196;
case 3:
v76 = _mm_cvtsi32_si128(*(unsigned __int8 *)(a1 + 736));
goto LABEL_196;
case 0x81:
v76 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 872LL));
goto LABEL_196;
case 0x87:
v76 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 876LL));
goto LABEL_196;
case 0x8A:
v76 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 880LL));
goto LABEL_196;
case 0x8B:
v76 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 884LL));
LABEL_196:
v74 = _mm_cvtepi32_ps(v76).m128_f32[0] * 0.0078125;
break;
default:
break;
}
if ( *(_WORD *)(v68 + 6) != 1 )
v71 += (int)(float)((float)((float)*(int *)(v68 + 8) * v74) * v73);
v70 = 1;
}
LABEL_200:
v68 += 12;
--v72;
}
while ( v72 );
v8 = v7;
if ( v70 )
{
if ( v71 == 0x80000000 )
{
v77 = 0;
}
else
{
v78 = fmaxf((float)((float)v71 * 0.00000010850695) + 85.333336, 0.0);
if ( v78 >= 128.0 )
v78 = 127.0;
v77 = dword_1801A7E20[v78];
}
*(_DWORD *)(a1 + 636) = v77;
LODWORD(v7) = *(_DWORD *)(a1 + 748);
v8 = v7;
}
}
}
LABEL_208:
v79 = 0;
v80 = 0;
if ( v8 > 0 )
{
v81 = *(_QWORD *)(a1 + 752);
v82 = (unsigned int)v7;
do
{
v83 = 1.0;
v84 = 1.0;
if ( *(_WORD *)(v81 + 4) == 522 )
{
switch ( *(_WORD *)v81 )
{
case 0:
v83 = 1.0;
break;
case 1:
case 4:
case 5:
goto LABEL_228;
case 2:
v85 = *(unsigned __int8 *)(a1 + 744);
goto LABEL_215;
case 3:
v85 = *(unsigned __int8 *)(a1 + 736);
LABEL_215:
v83 = (float)v85 * 0.0078125;
break;
default:
break;
}
switch ( *(_WORD *)(v81 + 2) )
{
case 0:
case 1:
v84 = 1.0;
break;
case 2:
v86 = _mm_cvtsi32_si128(*(unsigned __int8 *)(a1 + 744));
goto LABEL_224;
case 3:
v86 = _mm_cvtsi32_si128(*(unsigned __int8 *)(a1 + 736));
goto LABEL_224;
case 0x81:
v86 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 872LL));
goto LABEL_224;
case 0x87:
v86 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 876LL));
goto LABEL_224;
case 0x8A:
v86 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 880LL));
goto LABEL_224;
case 0x8B:
v86 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 884LL));
LABEL_224:
v84 = _mm_cvtepi32_ps(v86).m128_f32[0] * 0.0078125;
break;
default:
break;
}
if ( *(_WORD *)(v81 + 6) != 1 )
v80 += (int)(float)((float)((float)*(int *)(v81 + 8) * v84) * v83);
v79 = 1;
}
LABEL_228:
v81 += 12;
--v82;
}
while ( v82 );
v8 = v7;
if ( v79 )
{
if ( v80 != 0x8000000 )
v5 = -96.0 - (float)((float)v80 * -0.0000014648438);
*(float *)(a1 + 656) = v5;
}
}
v87 = 0;
v88 = 0;
if ( v8 > 0 )
{
v89 = *(_QWORD *)(a1 + 752);
v90 = v89;
v91 = (unsigned int)v7;
v92 = (unsigned int)v7;
do
{
v93 = 1.0;
if ( *(_WORD *)(v90 + 4) == 3 )
{
switch ( *(_WORD *)v90 )
{
case 0:
case 1:
case 2:
case 3:
case 4:
case 6:
case 0x81:
case 0x87:
case 0x8A:
case 0x8B:
break;
default:
switch ( *(_WORD *)(v90 + 2) )
{
case 0:
case 1:
v93 = 1.0;
break;
case 2:
v94 = _mm_cvtsi32_si128(*(unsigned __int8 *)(a1 + 744));
goto LABEL_245;
case 3:
v94 = _mm_cvtsi32_si128(*(unsigned __int8 *)(a1 + 736));
goto LABEL_245;
case 0x81:
v94 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 872LL));
goto LABEL_245;
case 0x87:
v94 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 876LL));
goto LABEL_245;
case 0x8A:
v94 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 880LL));
goto LABEL_245;
case 0x8B:
v94 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 884LL));
LABEL_245:
v93 = _mm_cvtepi32_ps(v94).m128_f32[0] * 0.0078125;
break;
default:
break;
}
if ( *(_WORD *)(v90 + 6) != 1 )
v88 += (int)(float)((float)*(int *)(v90 + 8) * v93);
v87 = 1;
break;
}
}
v90 += 12;
--v92;
}
while ( v92 );
if ( v87 )
{
v95 = 0;
*(_BYTE *)(a1 + 720) = 1;
*(float *)(a1 + 716) = (float)v88 * 0.000015258789;
if ( (int)v7 > 0 )
{
v96 = (_WORD *)v89;
while ( *v96 || v96[2] != 778 )
{
++v95;
v96 += 6;
if ( v95 >= (int)v7 )
goto LABEL_256;
}
v101 = 0;
v102 = 0;
do
{
v103 = 1.0;
if ( *(_WORD *)(v89 + 4) == 778 )
{
switch ( *(_WORD *)v89 )
{
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 0x81:
case 0x87:
case 0x8A:
case 0x8B:
break;
default:
switch ( *(_WORD *)(v89 + 2) )
{
case 0:
case 1:
v103 = 1.0;
break;
case 2:
v104 = _mm_cvtsi32_si128(*(unsigned __int8 *)(a1 + 744));
goto LABEL_273;
case 3:
v104 = _mm_cvtsi32_si128(*(unsigned __int8 *)(a1 + 736));
goto LABEL_273;
case 0x81:
v104 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 872LL));
goto LABEL_273;
case 0x87:
v104 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 876LL));
goto LABEL_273;
case 0x8A:
v104 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 880LL));
goto LABEL_273;
case 0x8B:
v104 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 884LL));
LABEL_273:
v103 = _mm_cvtepi32_ps(v104).m128_f32[0] * 0.0078125;
break;
default:
break;
}
if ( *(_WORD *)(v89 + 6) != 1 )
v102 += (int)(float)((float)*(int *)(v89 + 8) * v103);
v101 = 1;
break;
}
}
v89 += 12;
--v91;
}
while ( v91 );
if ( !v101 )
{
v97 = v7;
goto LABEL_257;
}
if ( v102 == 0x80000000 )
{
*(_DWORD *)(a1 + 668) = 0;
LODWORD(v7) = *(_DWORD *)(a1 + 748);
}
else
{
v105 = fmaxf((float)((float)v102 * 0.00000010850695) + 85.333336, 0.0);
if ( v105 >= 128.0 )
v105 = 127.0;
*(_DWORD *)(a1 + 668) = dword_1801A7E20[v105];
LODWORD(v7) = *(_DWORD *)(a1 + 748);
}
}
LABEL_256:
v97 = v7;
if ( (int)v7 <= 0 )
{
LABEL_309:
v113 = 0;
if ( v97 > 0 )
{
v114 = *(_QWORD *)(a1 + 752);
v115 = (_WORD *)v114;
while ( *v115 || v115[2] != 781 )
{
++v113;
v115 += 6;
v97 = v7;
if ( v113 >= (int)v7 )
goto LABEL_339;
}
v116 = 0;
v117 = 0;
if ( v97 > 0 )
{
v118 = (unsigned int)v7;
do
{
v119 = 1.0;
if ( *(_WORD *)(v114 + 4) == 781 )
{
switch ( *(_WORD *)v114 )
{
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 0x81:
case 0x87:
case 0x8A:
case 0x8B:
break;
default:
switch ( *(_WORD *)(v114 + 2) )
{
case 0:
case 1:
v119 = 1.0;
break;
case 2:
v120 = _mm_cvtsi32_si128(*(unsigned __int8 *)(a1 + 744));
goto LABEL_327;
case 3:
v120 = _mm_cvtsi32_si128(*(unsigned __int8 *)(a1 + 736));
goto LABEL_327;
case 0x81:
v120 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 872LL));
goto LABEL_327;
case 0x87:
v120 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 876LL));
goto LABEL_327;
case 0x8A:
v120 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 880LL));
goto LABEL_327;
case 0x8B:
v120 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 884LL));
LABEL_327:
v119 = _mm_cvtepi32_ps(v120).m128_f32[0] * 0.0078125;
break;
default:
break;
}
if ( *(_WORD *)(v114 + 6) != 1 )
v117 += (int)(float)((float)*(int *)(v114 + 8) * v119);
v116 = 1;
break;
}
}
v114 += 12;
--v118;
}
while ( v118 );
v97 = v7;
if ( v116 )
{
if ( v117 == 0x80000000 )
{
v121 = 0;
}
else
{
v122 = fmaxf((float)((float)v117 * 0.00000010850695) + 85.333336, 0.0);
if ( v122 >= 128.0 )
v122 = 127.0;
v121 = dword_1801A7E20[v122];
}
*(_DWORD *)(a1 + 692) = v121;
LODWORD(v7) = *(_DWORD *)(a1 + 748);
v97 = v7;
}
}
}
LABEL_339:
v123 = 0;
if ( v97 > 0 )
{
v124 = *(_QWORD *)(a1 + 752);
v125 = (unsigned int)v7;
do
{
v126 = 1.0;
if ( *(_WORD *)(v124 + 4) == 782 )
{
switch ( *(_WORD *)v124 )
{
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 0x81:
case 0x87:
case 0x8A:
case 0x8B:
break;
default:
switch ( *(_WORD *)(v124 + 2) )
{
case 0:
case 1:
v126 = 1.0;
break;
case 2:
v127 = _mm_cvtsi32_si128(*(unsigned __int8 *)(a1 + 744));
goto LABEL_351;
case 3:
v127 = _mm_cvtsi32_si128(*(unsigned __int8 *)(a1 + 736));
goto LABEL_351;
case 0x81:
v127 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 872LL));
goto LABEL_351;
case 0x87:
v127 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 876LL));
goto LABEL_351;
case 0x8A:
v127 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 880LL));
goto LABEL_351;
case 0x8B:
v127 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 884LL));
LABEL_351:
v126 = _mm_cvtepi32_ps(v127).m128_f32[0] * 0.0078125;
break;
default:
break;
}
if ( *(_WORD *)(v124 + 6) != 1 )
v1 += (int)(float)((float)*(int *)(v124 + 8) * v126);
v123 = 1;
break;
}
}
v124 += 12;
--v125;
}
while ( v125 );
if ( v123 )
{
if ( v1 != 0x8000000 )
v6 = (float)v1 * 0.00000001525879;
*(float *)(a1 + 712) = v6;
}
}
goto LABEL_360;
}
LABEL_257:
v98 = *(_QWORD *)(a1 + 752);
v99 = 0;
v100 = (_WORD *)v98;
while ( *v100 || v100[2] != 779 )
{
++v99;
v100 += 6;
v97 = v7;
if ( v99 >= (int)v7 )
goto LABEL_309;
}
v106 = 0;
v107 = 0;
if ( v97 > 0 )
{
v108 = (unsigned int)v7;
do
{
v109 = 1.0;
if ( *(_WORD *)(v98 + 4) == 779 )
{
switch ( *(_WORD *)v98 )
{
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 0x81:
case 0x87:
case 0x8A:
case 0x8B:
break;
default:
switch ( *(_WORD *)(v98 + 2) )
{
case 0:
case 1:
v109 = 1.0;
break;
case 2:
v110 = _mm_cvtsi32_si128(*(unsigned __int8 *)(a1 + 744));
goto LABEL_297;
case 3:
v110 = _mm_cvtsi32_si128(*(unsigned __int8 *)(a1 + 736));
goto LABEL_297;
case 0x81:
v110 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 872LL));
goto LABEL_297;
case 0x87:
v110 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 876LL));
goto LABEL_297;
case 0x8A:
v110 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 880LL));
goto LABEL_297;
case 0x8B:
v110 = _mm_cvtsi32_si128(*(_DWORD *)(*(_QWORD *)(a1 + 792) + 884LL));
LABEL_297:
v109 = _mm_cvtepi32_ps(v110).m128_f32[0] * 0.0078125;
break;
default:
break;
}
if ( *(_WORD *)(v98 + 6) != 1 )
v107 += (int)(float)((float)*(int *)(v98 + 8) * v109);
v106 = 1;
break;
}
}
v98 += 12;
--v108;
}
while ( v108 );
v97 = v7;
if ( v106 )
{
if ( v107 == 0x80000000 )
{
v111 = 0;
}
else
{
v112 = fmaxf((float)((float)v107 * 0.00000010850695) + 85.333336, 0.0);
if ( v112 >= 128.0 )
v112 = 127.0;
v111 = dword_1801A7E20[v112];
}
*(_DWORD *)(a1 + 680) = v111;
LODWORD(v7) = *(_DWORD *)(a1 + 748);
v97 = v7;
}
}
goto LABEL_309;
}
}
LABEL_360:
result = 0;
if ( *(float *)(a1 + 636) < 50.0 )
*(_DWORD *)(a1 + 636) = 1112014848;
return result;
}