//
// sub_100240E20 from 0x100240e20 to 0x100240f58 (312 bytes)
//
// 2 xrefs:
// > GJThreadCell::loadFromThread @ 0x100232ef0
// > GJThreadCell::loadFromThread @ 0x100233778
//
// 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 12:27:18 +0000
//
__int64 __fastcall sub_100240E20(__int64 a1)
{
__int64 v2; // r14
double v3; // xmm1_8
__int64 v4; // r14
__int64 v5; // rax
__int64 v6; // rbx
_BYTE v8[8]; // [rsp+8h] [rbp-48h] BYREF
_BYTE v9[8]; // [rsp+10h] [rbp-40h] BYREF
float v10[2]; // [rsp+18h] [rbp-38h] BYREF
float v11[2]; // [rsp+20h] [rbp-30h] BYREF
float v12; // [rsp+28h] [rbp-28h]
float v13; // [rsp+2Ch] [rbp-24h]
v2 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 1072LL))(a1);
v13 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v2 + 328LL))(v2);
v13 = (float)((*(float (__fastcall **)(__int64))(*(_QWORD *)v2 + 136LL))(v2) * v13) * 1.4;
v12 = *(float *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v2 + 328LL))(v2) + 4);
*(_QWORD *)&v3 = LODWORD(v12);
*(float *)&v3 = (float)(v12 * (*(float (__fastcall **)(__int64))(*(_QWORD *)v2 + 152LL))(v2)) * 1.4;
sub_100278260(v11, COERCE_DOUBLE((unsigned __int64)LODWORD(v13)), v3);
v4 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 1072LL))(a1);
v5 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 328LL))(a1);
sub_100278630(v10, v5);
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)a1 + 320LL))(a1, v11);
v6 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 192LL))(v4);
sub_100278250(v9, (float)(v11[0] - v10[0]) * 0.5, (float)(v11[1] - v10[1]) * 0.5);
sub_100278350(v8, v6, v9);
return (*(__int64 (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v4 + 184LL))(v4, v8);
}