//
// CreateGuidelinesLayer::recordingDidStop from 0x6e9ec0 to 0x6ea2d4 (1044 bytes)
//
// 2 xrefs:
// > ??> @ 0xf5a70
// > ??> @ 0x14260a8
//
// 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 12:51:45 +0000
//
__int64 __fastcall CreateGuidelinesLayer::recordingDidStop(CreateGuidelinesLayer *this)
{
char *v2; // x21
unsigned __int8 v3; // w0
__int64 v4; // x1
__int64 v5; // x2
__int64 v7; // x2
char v8; // w0
__int64 v9; // x0
size_t v10; // x1
char v11; // w0
char v12; // w0
__int64 v13; // x0
__int64 v14; // x1
__int64 v15; // x21
__int64 *v16; // x0
__int64 v17; // x23
char v18; // w0
size_t v19; // x3
void *v20; // x0
char *v21; // x1
size_t v22; // x2
__int64 v23; // [xsp+40h] [xbp+40h] BYREF
size_t v24; // [xsp+48h] [xbp+48h]
void *v25; // [xsp+50h] [xbp+50h]
__int64 v26; // [xsp+58h] [xbp+58h] BYREF
size_t v27; // [xsp+60h] [xbp+60h]
void *v28; // [xsp+68h] [xbp+68h]
__int64 v29; // [xsp+70h] [xbp+70h] BYREF
size_t v30; // [xsp+78h] [xbp+78h]
void *v31; // [xsp+80h] [xbp+80h]
__int64 v32; // [xsp+88h] [xbp+88h] BYREF
__int64 v33; // [xsp+90h] [xbp+90h]
void *v34; // [xsp+98h] [xbp+98h]
__int64 v35; // [xsp+A0h] [xbp+A0h] BYREF
size_t v36; // [xsp+A8h] [xbp+A8h]
void *v37; // [xsp+B0h] [xbp+B0h]
v2 = (char *)this + 736;
v3 = *((_BYTE *)this + 736);
v4 = v3 >> 1;
if ( (v3 & 1) != 0 )
v4 = *((_QWORD *)v2 + 1);
v5 = *((_QWORD *)this + 88);
if ( !v4 )
{
(*(void (__fastcall **)(_QWORD, char *))(*(_QWORD *)v5 + 928LL))(*((_QWORD *)this + 88), &byte_11B8890);
goto LABEL_5;
}
(*(void (__fastcall **)(_QWORD, const char *))(*(_QWORD *)v5 + 928LL))(*((_QWORD *)this + 88), "Guidelines saved");
v7 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 84) + 24LL))(*((_QWORD *)this + 84)) + 392;
v8 = *(_BYTE *)v7;
v23 = 0;
v24 = 0;
v25 = nullptr;
if ( (v8 & 1) != 0 )
{
std::string::__init(&v23, *(void **)(v7 + 16), *(_QWORD *)(v7 + 8));
}
else
{
v9 = *(_QWORD *)v7;
v10 = *(_QWORD *)(v7 + 8);
v25 = *(void **)(v7 + 16);
v23 = v9;
v24 = v10;
}
if ( (v23 & 1) == 0 )
{
if ( (int)(unsigned __int8)v23 >> 1 )
{
v29 = v23;
v30 = v24;
v12 = *((_BYTE *)this + 736);
v31 = v25;
v32 = 0;
v33 = 0;
v34 = nullptr;
if ( (v12 & 1) != 0 )
goto LABEL_13;
goto LABEL_16;
}
LABEL_32:
v17 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 84) + 24LL))(*((_QWORD *)this + 84));
v18 = *((_BYTE *)this + 736);
v26 = 0;
v27 = 0;
v28 = nullptr;
if ( (v18 & 1) != 0 )
{
std::string::__init(&v26, *((void **)v2 + 2), *((_QWORD *)v2 + 1));
}
else
{
v19 = *((_QWORD *)v2 + 1);
v20 = *((void **)v2 + 2);
v26 = *(_QWORD *)v2;
v27 = v19;
v28 = v20;
}
if ( (__int64 *)(v17 + 392) != &v26 )
{
if ( (v26 & 1) != 0 )
{
v21 = (char *)v28;
v22 = v27;
}
else
{
v22 = (unsigned __int8)v26 >> 1;
v21 = (char *)&v26 + 1;
}
std::string::assign((__int64 *)(v17 + 392), v21, v22);
}
if ( (v26 & 1) != 0 )
operator delete(v28);
*(_BYTE *)((*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 84) + 24LL))(*((_QWORD *)this + 84)) + 416) = 1;
goto LABEL_28;
}
if ( !v24 )
goto LABEL_32;
v29 = 0;
v30 = 0;
v31 = nullptr;
std::string::__init(&v29, v25, v24);
v11 = *((_BYTE *)this + 736);
v32 = 0;
v33 = 0;
v34 = nullptr;
if ( (v11 & 1) != 0 )
{
LABEL_13:
std::string::__init(&v32, *((void **)v2 + 2), *((_QWORD *)v2 + 1));
goto LABEL_17;
}
LABEL_16:
v13 = *(_QWORD *)v2;
v14 = *((_QWORD *)v2 + 1);
v34 = *((void **)v2 + 2);
v32 = v13;
v33 = v14;
LABEL_17:
CreateGuidelinesLayer::getMergedRecordString((__int64)this, (unsigned __int8 *)&v29, (unsigned __int8 *)&v32, &v26);
if ( (v32 & 1) != 0 )
{
operator delete(v34);
if ( (v29 & 1) == 0 )
goto LABEL_19;
LABEL_42:
operator delete(v31);
goto LABEL_19;
}
if ( (v29 & 1) != 0 )
goto LABEL_42;
LABEL_19:
v15 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 84) + 24LL))(*((_QWORD *)this + 84));
v35 = 0;
v36 = 0;
v37 = nullptr;
if ( (v26 & 1) != 0 )
{
std::string::__init(&v35, v28, v27);
}
else
{
v37 = v28;
v35 = v26;
v36 = v27;
}
v16 = (__int64 *)(v15 + 392);
if ( (__int64 *)(v15 + 392) != &v35 )
{
if ( (v35 & 1) != 0 )
std::string::assign(v16, v37, v36);
else
std::string::assign(v16, (char *)&v35 + 1, (unsigned __int8)v35 >> 1);
}
if ( (v35 & 1) != 0 )
operator delete(v37);
*(_BYTE *)((*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 84) + 24LL))(*((_QWORD *)this + 84)) + 416) = 1;
if ( (v26 & 1) != 0 )
operator delete(v28);
LABEL_28:
if ( (v23 & 1) != 0 )
operator delete(v25);
LABEL_5:
if ( *((int *)this + 182) > 1000 )
(*(void (__fastcall **)(_QWORD, const char *))(**((_QWORD **)this + 88) + 928LL))(
*((_QWORD *)this + 88),
"Maximum limit exceeded");
*((_DWORD *)this + 182) = 0;
return _stack_chk_guard;
}