//
// EditorSoundsLayer::setupTabs from 0x14019d680 to 0x14019d988 (776 bytes)
//
// 2 xrefs:
// > EditorSoundsLayer::init @ 0x14019ce37
// > ??> @ 0x140919778
//
// 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 11:27:47 +0000
//
// Hidden C++ exception states: #wind=1
__int64 __fastcall EditorSoundsLayer::setupTabs(__int64 a1)
{
void *v2; // rcx
void *v3; // rcx
void *v4; // rcx
void *v5; // rcx
void *v6; // rcx
void *v7; // rcx
void *Block[2]; // [rsp+30h] [rbp-30h] BYREF
__m128i si128; // [rsp+40h] [rbp-20h]
*(_OWORD *)Block = 0;
si128 = _mm_load_si128((const __m128i *)&xmmword_140836570);
strcpy((char *)Block, "Object");
TabbedPopupLayer::addTab(a1, Block, 0);
if ( si128.m128i_i64[1] > 0xFuLL )
{
v2 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v2 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v2 - 8) > 0x1F )
goto LABEL_24;
}
j_j_free(v2);
}
Block[1] = (void *)109;
si128 = _mm_load_si128((const __m128i *)&xmmword_1408365A0);
Block[0] = (void *)0x726F66736E617254LL;
TabbedPopupLayer::addTab(a1, Block, 0);
if ( si128.m128i_i64[1] > 0xFuLL )
{
v3 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v3 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v3 - 8) > 0x1F )
goto LABEL_24;
}
j_j_free(v3);
}
*(_OWORD *)Block = 0;
si128 = _mm_load_si128((const __m128i *)&xmmword_140836550);
strcpy((char *)Block, "View");
TabbedPopupLayer::addTab(a1, Block, 0);
if ( si128.m128i_i64[1] > 0xFuLL )
{
v4 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v4 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v4 - 8) > 0x1F )
goto LABEL_24;
}
j_j_free(v4);
}
Block[1] = nullptr;
si128 = _mm_load_si128((const __m128i *)&xmmword_140836580);
Block[0] = (void *)0x736E6F69746341LL;
TabbedPopupLayer::addTab(a1, Block, 0);
if ( si128.m128i_i64[1] > 0xFuLL )
{
v5 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v5 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v5 - 8) > 0x1F )
goto LABEL_24;
}
j_j_free(v5);
}
Block[1] = nullptr;
si128 = _mm_load_si128((const __m128i *)&xmmword_140836590);
Block[0] = (void *)0x79616C70656D6147LL;
TabbedPopupLayer::addTab(a1, Block, 0);
if ( si128.m128i_i64[1] <= 0xFuLL )
goto LABEL_21;
v6 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v6 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v6 - 8) > 0x1F )
LABEL_24:
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v6);
LABEL_21:
*(_OWORD *)Block = 0;
si128 = _mm_load_si128((const __m128i *)&xmmword_140836520);
LOWORD(Block[0]) = 83;
*(_DWORD *)(a1 + 1136) = TabbedPopupLayer::addTab(a1, Block, "searchIcon_001.png");
if ( si128.m128i_i64[1] > 0xFuLL )
{
v7 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v7 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v7 - 8) > 0x1F )
goto LABEL_24;
}
j_j_free(v7);
}
return TabbedPopupLayer::createTabButtons_1(a1);
}