//
// kmMat3Adjugate from 0xadc9dc to 0xadca74 (152 bytes)
//
// 2 xrefs:
// > kmMat3Inverse @ 0xadccc4
// > ??> @ 0x5cd60
//
// 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
//
float __fastcall kmMat3Adjugate(float *a1, float *a2)
{
float v2; // s0
float v3; // s3
float v4; // s1
float v5; // s2
float v6; // s4
float v7; // s5
float v8; // s4
float v9; // s6
float v10; // s2
float v11; // s0
float v12; // s1
float v13; // s0
float v14; // s4
float result; // s0
v2 = a2[5];
v3 = a2[7];
v4 = a2[8];
v5 = a2[4];
*a1 = -(float)((float)(v2 * v3) - (float)(v5 * v4));
v6 = a2[2];
a1[1] = -(float)((float)(v4 * a2[1]) - (float)(v3 * v6));
v7 = a2[1];
a1[2] = -(float)((float)(v5 * v6) - (float)(v2 * v7));
v8 = a2[6];
a1[3] = -(float)((float)(v4 * a2[3]) - (float)(v2 * v8));
v9 = a2[2];
v10 = *a2;
v11 = v2 * *a2;
a1[4] = -(float)((float)(v8 * v9) - (float)(v4 * *a2));
v12 = a2[3];
a1[5] = -(float)(v11 - (float)(v9 * v12));
v13 = a2[4];
v14 = v8 * v13;
result = -(float)((float)(v7 * v12) - (float)(v10 * v13));
a1[8] = result;
a1[6] = -(float)(v14 - (float)(v3 * v12));
return result;
}