//
// __common_scos_cout_rare from 0x180123ec0 to 0x180123f30 (112 bytes)
//
// 4 xrefs:
// > _sse2_cosf4 @ 0x1801220e9
// > _sse4_cosf4 @ 0x180122a44
// > ??> @ 0x180202624
// > ??> @ 0x180202630
//
// 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:54:54 +0000
//
__int64 __fastcall _common_scos_cout_rare(__int64 a1, float *a2)
{
__int64 result; // rax
float v3; // xmm0_4
float v4; // [rsp+20h] [rbp-8h]
v4 = *(float *)a1;
if ( (*(_WORD *)(a1 + 2) & 0x7F80) != 0x7F80 )
return 0;
HIBYTE(v4) = HIBYTE(*(_DWORD *)a1) & 0x7F;
if ( v4 == INFINITY )
{
result = 1;
v3 = *(float *)a1 * 0.0;
}
else
{
result = 0;
v3 = *(float *)a1 * *(float *)a1;
}
*a2 = v3;
return result;
}