//
// ScrollableContentLayer::setViewSize from 0x100524b34 to 0x100524bc8 (148 bytes)
//
// 5 xrefs:
// > KeybindingsLayer::showTab @ 0x10002538c
// > sub_1001FB968 @ 0x1001fb9b0
// > EditorSoundsLayer::showTab @ 0x1004d83c8
// > EditorWindowPopup::applyWindowSize @ 0x1004d9978
// > sub_1004F9F68 @ 0x1004fa1d8
//
// 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 11:07:14 +0000
//
__int64 __fastcall ScrollableContentLayer::setViewSize(__int64 a1, double *a2)
{
double v4; // d0
float v5; // s0
float v6; // s1
__int64 v7; // x8
v4 = sub_100026450((_QWORD *)(a1 + 424), a2);
(*(void (__fastcall **)(__int64, double *, double))(*(_QWORD *)a1 + 320LL))(a1, a2, v4);
v5 = *(float *)(a1 + 436);
v6 = 0.0;
if ( v5 < 0.0 )
goto LABEL_7;
v7 = 428;
if ( *(_BYTE *)(a1 + 584) )
v7 = 424;
v6 = *(float *)(a1 + 432) - *(float *)(a1 + v7);
if ( v6 < 0.0 )
v6 = 0.0;
if ( v5 > v6 )
{
LABEL_7:
*(float *)(a1 + 436) = v6;
*(_DWORD *)(a1 + 472) = 0;
}
ScrollableContentLayer::ensureScrollThumb(a1);
return ScrollableContentLayer::applyContentPosition(a1);
}