//
// GJGameLevel::duplicate from 0x1000ce280 to 0x1000ce79c (1308 bytes)
//
// 1 xrefs:
// > LevelCell::recallLevel @ 0x1001363d0
//
// 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 10:58:53 +0000
//
char *__fastcall GJGameLevel::duplicate(__int64 a1)
{
char *v2; // x20
int v3; // w21
float v4; // s0
int v5; // w21
float v6; // s0
int v7; // w21
float v8; // s0
int v9; // w21
float v10; // s0
int v11; // w21
int v12; // w8
int v13; // w21
float v14; // s0
int v15; // w21
float v16; // s0
int v17; // w21
float v18; // s0
int v19; // w21
float v20; // s0
int v21; // w21
float v22; // s0
std::string __p; // [xsp+0h] [xbp-130h] BYREF
std::string v25; // [xsp+20h] [xbp-110h] BYREF
std::string v26; // [xsp+40h] [xbp-F0h] BYREF
std::string v27; // [xsp+60h] [xbp-D0h] BYREF
std::string v28; // [xsp+80h] [xbp-B0h] BYREF
std::string v29; // [xsp+A0h] [xbp-90h] BYREF
std::string __dst; // [xsp+C0h] [xbp-70h] BYREF
std::string __str; // [xsp+E0h] [xbp-50h] BYREF
v2 = (char *)GJGameLevel::create_1();
v3 = *(_DWORD *)(a1 + 328) - *(_DWORD *)(a1 + 332);
*((_DWORD *)v2 + 84) = v3;
v4 = vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0;
*((_DWORD *)v2 + 83) = (int)v4;
*((_DWORD *)v2 + 82) = v3 + (int)v4;
if ( *(char *)(a1 + 367) < 0 )
sub_1000097D0(&__str, *(void **)(a1 + 344), *(_QWORD *)(a1 + 352));
else
__str = *(std::string *)(a1 + 344);
std::string::operator=((std::string *)(v2 + 344), &__str);
if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__str.__r_.__value_.__l.__data_);
*((_DWORD *)v2 + 197) = *(_DWORD *)(a1 + 788);
if ( *(char *)(a1 + 391) < 0 )
sub_1000097D0(&__dst, *(void **)(a1 + 368), *(_QWORD *)(a1 + 376));
else
__dst = *(std::string *)(a1 + 368);
std::string::operator=((std::string *)(v2 + 368), &__dst);
if ( SHIBYTE(__dst.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__dst.__r_.__value_.__l.__data_);
if ( *(char *)(a1 + 415) < 0 )
sub_1000097D0(&v29, *(void **)(a1 + 392), *(_QWORD *)(a1 + 400));
else
v29 = *(std::string *)(a1 + 392);
std::string::operator=((std::string *)(v2 + 392), &v29);
if ( SHIBYTE(v29.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v29.__r_.__value_.__l.__data_);
v5 = *(_DWORD *)(a1 + 576) - *(_DWORD *)(a1 + 580);
*((_DWORD *)v2 + 146) = v5;
v6 = vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0;
*((_DWORD *)v2 + 145) = (int)v6;
*((_DWORD *)v2 + 144) = v5 + (int)v6;
if ( *(char *)(a1 + 439) < 0 )
sub_1000097D0(&v28, *(void **)(a1 + 416), *(_QWORD *)(a1 + 424));
else
v28 = *(std::string *)(a1 + 416);
std::string::operator=((std::string *)(v2 + 416), &v28);
if ( SHIBYTE(v28.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v28.__r_.__value_.__l.__data_);
v7 = *(_DWORD *)(a1 + 588) - *(_DWORD *)(a1 + 592);
*((_DWORD *)v2 + 149) = v7;
v8 = vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0;
*((_DWORD *)v2 + 148) = (int)v8;
*((_DWORD *)v2 + 147) = v7 + (int)v8;
if ( *(char *)(a1 + 463) < 0 )
sub_1000097D0(&v27, *(void **)(a1 + 440), *(_QWORD *)(a1 + 448));
else
v27 = *(std::string *)(a1 + 440);
std::string::operator=((std::string *)(v2 + 440), &v27);
if ( SHIBYTE(v27.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v27.__r_.__value_.__l.__data_);
*((_DWORD *)v2 + 159) = *(_DWORD *)(a1 + 636);
*((_QWORD *)v2 + 80) = *(_QWORD *)(a1 + 640);
*((_DWORD *)v2 + 151) = *(_DWORD *)(a1 + 604);
v2[1000] = *(_BYTE *)(a1 + 1000);
*((_DWORD *)v2 + 198) = *(_DWORD *)(a1 + 792);
*((_DWORD *)v2 + 223) = *(_DWORD *)(a1 + 892);
*((_QWORD *)v2 + 112) = *(_QWORD *)(a1 + 896);
v9 = *(_DWORD *)(a1 + 932) - *(_DWORD *)(a1 + 936);
*((_DWORD *)v2 + 235) = v9;
v10 = vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0;
*((_DWORD *)v2 + 234) = (int)v10;
*((_DWORD *)v2 + 233) = v9 + (int)v10;
*((_DWORD *)v2 + 236) = *(_DWORD *)(a1 + 944);
v11 = *(_DWORD *)(a1 + 948) - *(_DWORD *)(a1 + 952);
*((_DWORD *)v2 + 239) = v11;
v12 = (int)(float)(vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0);
*((_DWORD *)v2 + 238) = v12;
*((_DWORD *)v2 + 237) = v11 + v12;
*((_QWORD *)v2 + 113) = *(_QWORD *)(a1 + 904);
v2[960] = *(_BYTE *)(a1 + 960);
v13 = *(_DWORD *)(a1 + 980) - *(_DWORD *)(a1 + 984);
v14 = vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0;
*((_DWORD *)v2 + 246) = (int)v14;
*((_DWORD *)v2 + 245) = v13 + (int)v14;
v15 = *(_DWORD *)(a1 + 988) - *(_DWORD *)(a1 + 992);
*((_DWORD *)v2 + 249) = v15;
v16 = vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0;
*((_DWORD *)v2 + 248) = (int)v16;
*((_DWORD *)v2 + 247) = v15 + (int)v16;
*((_DWORD *)v2 + 152) = *(_DWORD *)(a1 + 608);
*((_DWORD *)v2 + 241) = *(_DWORD *)(a1 + 964);
v17 = *(_DWORD *)(a1 + 968) - *(_DWORD *)(a1 + 972);
*((_DWORD *)v2 + 244) = v17;
v18 = vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0;
*((_DWORD *)v2 + 243) = (int)v18;
*((_DWORD *)v2 + 242) = v17 + (int)v18;
*((_DWORD *)v2 + 261) = *(_DWORD *)(a1 + 1044);
if ( *(char *)(a1 + 1199) < 0 )
sub_1000097D0(&v26, *(void **)(a1 + 1176), *(_QWORD *)(a1 + 1184));
else
v26 = *(std::string *)(a1 + 1176);
std::string::operator=((std::string *)v2 + 49, &v26);
if ( SHIBYTE(v26.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v26.__r_.__value_.__l.__data_);
v2[768] = *(_BYTE *)(a1 + 768);
v19 = *(_DWORD *)(a1 + 920) - *(_DWORD *)(a1 + 924);
*((_DWORD *)v2 + 232) = v19;
v20 = vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0;
*((_DWORD *)v2 + 231) = (int)v20;
*((_DWORD *)v2 + 230) = v19 + (int)v20;
v2[649] = *(_BYTE *)(a1 + 649);
v21 = *(_DWORD *)(a1 + 620) - *(_DWORD *)(a1 + 624);
*((_DWORD *)v2 + 157) = v21;
v22 = vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0;
*((_DWORD *)v2 + 156) = (int)v22;
*((_DWORD *)v2 + 155) = v21 + (int)v22;
*((_DWORD *)v2 + 163) = *(_DWORD *)(a1 + 652);
*((_DWORD *)v2 + 164) = *(_DWORD *)(a1 + 656);
*((_DWORD *)v2 + 308) = *(_DWORD *)(a1 + 1232);
if ( *(char *)(a1 + 487) < 0 )
sub_1000097D0(&v25, *(void **)(a1 + 464), *(_QWORD *)(a1 + 472));
else
v25 = *(std::string *)(a1 + 464);
std::string::operator=((std::string *)(v2 + 464), &v25);
if ( SHIBYTE(v25.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v25.__r_.__value_.__l.__data_);
if ( *(char *)(a1 + 511) < 0 )
sub_1000097D0(&__p, *(void **)(a1 + 488), *(_QWORD *)(a1 + 496));
else
__p = *(std::string *)(a1 + 488);
std::string::operator=((std::string *)(v2 + 488), &__p);
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
*((_QWORD *)v2 + 64) = *(_QWORD *)(a1 + 512);
std::string::operator=((std::string *)(v2 + 1240), (const std::string *)(a1 + 1240));
std::string::operator=((std::string *)(v2 + 1264), (const std::string *)(a1 + 1264));
*((_DWORD *)v2 + 322) = *(_DWORD *)(a1 + 1288);
*((_DWORD *)v2 + 285) = *(_DWORD *)(a1 + 1140);
return v2;
}