//
// lws_hdr_total_length from 0xe34028 to 0xe34060 (56 bytes)
//
// 24 xrefs:
// > lws_hdr_copy @ 0xe34160
// > sub_E3433C @ 0xe34860
// > sub_E3433C @ 0xe34b5c
// > sub_E35FA0 @ 0xe35fd8
// > sub_E35FA0 @ 0xe360a8
// > sub_E35FA0 @ 0xe360c0
// > sub_E392B4 @ 0xe392f8
// > sub_E392B4 @ 0xe3939c
// > sub_E392B4 @ 0xe393c4
// > sub_E392B4 @ 0xe393dc
// > sub_E392B4 @ 0xe393ec
// > sub_E392B4 @ 0xe39408
// > sub_E392B4 @ 0xe39550
// > sub_E392B4 @ 0xe39560
// > sub_E392B4 @ 0xe39584
// > sub_E395A4 @ 0xe39660
// > sub_E395A4 @ 0xe39670
// > sub_E395A4 @ 0xe396c4
// > lws_extension_server_handshake @ 0xe3a120
// > sub_E3A3A0 @ 0xe3a3d4
// > sub_E3A3A0 @ 0xe3a3e4
// > sub_E3A3A0 @ 0xe3a3f4
// > sub_E3A3A0 @ 0xe3a498
// > ??> @ 0x78628
//
// This function is hookable on this platform (idp: arm, 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 13:09:57 +0000
//
__int64 __fastcall lws_hdr_total_length(__int64 a1, unsigned int a2)
{
__int64 v2; // x3
__int64 v3; // x1
__int64 result; // x0
__int64 v5; // x2
v2 = *(_QWORD *)(a1 + 152);
v3 = *(unsigned __int8 *)(v2 + a2 + 4);
for ( result = 0; (_DWORD)v3; result = (unsigned int)result + *(unsigned __int16 *)(v5 + 8) )
{
v5 = v2 + 6 * v3 + 80;
v3 = *(unsigned __int8 *)(v2 + 6 * v3 + 90);
}
return result;
}