//
// FMOD_Thread_SetAttributes from 0xbe4b8 to 0xbe552 (154 bytes)
//
// 1 xrefs:
// > j_FMOD_Thread_SetAttributes @ 0xe1378
//
// 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 FMOD_Thread_SetAttributes(int a1, __int64 a2, int a3, int a4)
{
int v6; // r1
int v7; // r4
char *v8; // r5
char *v9; // r2
if ( a1 > 12 )
return 31;
v6 = a3;
if ( !(HIDWORD(a2) ^ 0x40000000 | (unsigned int)a2) )
{
a2 = 0x4000000000000001LL;
switch ( a1 )
{
case 0:
break;
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 9:
case 10:
case 11:
case 12:
a2 = 0x4000000000000003LL;
break;
case 8:
a2 = 0x4000000000000002LL;
break;
default:
a2 = 0;
break;
}
}
v7 = a4;
v8 = (char *)off_E8000;
*((_QWORD *)off_E8000 + a1 + 7) = a2;
if ( a3 == -32769 )
{
if ( (unsigned int)a1 > 0xC )
v6 = 0;
else
v6 = dword_413F8[a1];
}
v9 = &v8[4 * a1];
*((_DWORD *)v9 + 40) = v6;
if ( !a4 )
{
if ( (unsigned int)a1 > 0xC )
v7 = 0;
else
v7 = dword_4142C[a1];
}
*((_DWORD *)v9 + 53) = v7;
return 0;
}