{"type": "func", "start": 4294995404, "end": 4294995936, "name": "GJSmartTemplate::flipKey", "pseudocode": "// \n// GJSmartTemplate::flipKey from 0x100006dcc to 0x100006fe0 (532 bytes)\n// \n// 4 xrefs:\n// > GJSmartTemplate::scanForPrefab @ 0x100005abc\n// > GJSmartTemplate::scanForPrefab @ 0x100005b8c\n// > GJSmartTemplate::scanForPrefab @ 0x100005c64\n// > GJSmartTemplate::scanForPrefab @ 0x100005c78\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid __usercall GJSmartTemplate::flipKey(\n        std::string *__return_ptr a1@<X8>,\n        std::string *this@<X0>,\n        bool a3@<W1>,\n        bool a4@<W2>)\n{\n  SmartBlockType v7; // w24\n  SmartBlockType v8; // w25\n  SmartBlockType v9; // w27\n  SmartBlockType v10; // w28\n  SmartBlockType v11; // w19\n  SmartBlockType v12; // w23\n  SmartBlockType v13; // w26\n  SmartBlockType v14; // w8\n  SmartBlockType v15; // w9\n  SmartBlockType v16; // w22\n  SmartBlockType v17; // w28\n  SmartBlockType v18; // w9\n  SmartBlockType v19; // w8\n  std::string::value_type v20; // w24\n  std::string::value_type v21; // w25\n  std::string::value_type v22; // w26\n  std::string::value_type v23; // w27\n  std::string::value_type v24; // w28\n  std::string::value_type v25; // w23\n  std::string::value_type v26; // w22\n  std::string::value_type v27; // w0\n  SmartBlockType v28; // [xsp+Ch] [xbp-64h]\n  SmartBlockType v29; // [xsp+10h] [xbp-60h]\n  SmartBlockType v30; // [xsp+14h] [xbp-5Ch]\n  std::string::value_type v31; // [xsp+14h] [xbp-5Ch]\n\n  if ( a3 || a4 )\n  {\n    v30 = *std::string::at(this, 0);\n    v7 = *std::string::at(this, 1u);\n    v8 = *std::string::at(this, 2u);\n    v9 = *std::string::at(this, 3u);\n    v10 = *std::string::at(this, 4u);\n    v11 = *std::string::at(this, 5u);\n    v12 = *std::string::at(this, 6u);\n    v13 = *std::string::at(this, 7u);\n    v14 = *std::string::at(this, 8u);\n    v15 = v7;\n    if ( a3 )\n    {\n      v16 = v10;\n    }\n    else\n    {\n      v7 = v8;\n      v8 = v15;\n      v16 = v9;\n    }\n    if ( a3 )\n    {\n      v17 = v12;\n    }\n    else\n    {\n      v9 = v10;\n      v17 = v13;\n    }\n    if ( a3 )\n      v18 = v11;\n    else\n      v18 = v14;\n    if ( a3 )\n    {\n      v11 = v14;\n      v19 = v13;\n    }\n    else\n    {\n      v19 = v12;\n    }\n    v28 = v18;\n    v29 = v19;\n    v31 = GJSmartTemplate::flipBlockType(v30, a3, a4);\n    v20 = GJSmartTemplate::flipBlockType(v7, a3, a4);\n    v21 = GJSmartTemplate::flipBlockType(v8, a3, a4);\n    v22 = GJSmartTemplate::flipBlockType(v16, a3, a4);\n    v23 = GJSmartTemplate::flipBlockType(v9, a3, a4);\n    v24 = GJSmartTemplate::flipBlockType(v17, a3, a4);\n    v25 = GJSmartTemplate::flipBlockType(v28, a3, a4);\n    v26 = GJSmartTemplate::flipBlockType(v11, a3, a4);\n    v27 = GJSmartTemplate::flipBlockType(v29, a3, a4);\n    GJSmartTemplate::keyFromNeighbors_1(v31, v20, v21, v22, v23, v24, v25, v26, a1, v27);\n  }\n  else\n  {\n    *a1 = *this;\n    *(_OWORD *)&this->__r_.__value_.__r.__words[1] = 0u;\n    this->__r_.__value_.__r.__words[0] = 0;\n  }\n}", "assembly": "; \n; GJSmartTemplate::flipKey from 0x100006dcc to 0x100006fe0 (532 bytes)\n; \n; 4 xrefs:\n; > GJSmartTemplate::scanForPrefab @ 0x100005abc\n; > GJSmartTemplate::scanForPrefab @ 0x100005b8c\n; > GJSmartTemplate::scanForPrefab @ 0x100005c64\n; > GJSmartTemplate::scanForPrefab @ 0x100005c78\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nSUB             SP, SP, #0x80                                          ; +0x0, 0x100006dcc\nSTP             X28, X27, [SP,#0x70+var_50]                            ; +0x4, 0x100006dd0\nSTP             X26, X25, [SP,#0x70+var_40]                            ; +0x8, 0x100006dd4\nSTP             X24, X23, [SP,#0x70+var_30]                            ; +0xc, 0x100006dd8\nSTP             X22, X21, [SP,#0x70+var_20]                            ; +0x10, 0x100006ddc\nSTP             X20, X19, [SP,#0x70+var_10]                            ; +0x14, 0x100006de0\nSTP             X29, X30, [SP,#0x70+var_s0]                            ; +0x18, 0x100006de4\nADD             X29, SP, #0x70                                         ; +0x1c, 0x100006de8\nMOV             X20, X2                                                ; +0x20, 0x100006dec\nMOV             X21, X1                                                ; +0x24, 0x100006df0\nMOV             X22, X0                                                ; +0x28, 0x100006df4\nTBNZ            W1, #0, loc_100006E1C                                  ; +0x2c, 0x100006df8\nTBNZ            W20, #0, loc_100006E1C                                 ; +0x30, 0x100006dfc\nLDR             Q0, [X22]                                              ; +0x34, 0x100006e00\nSTR             Q0, [X8]                                               ; +0x38, 0x100006e04\nLDR             X9, [X22,#0x10]                                        ; +0x3c, 0x100006e08\nSTR             X9, [X8,#0x10]                                         ; +0x40, 0x100006e0c\nSTP             XZR, XZR, [X22,#8]                                     ; +0x44, 0x100006e10\nSTR             XZR, [X22]                                             ; +0x48, 0x100006e14\nB               loc_100006FC0                                          ; +0x4c, 0x100006e18\nMOV             X0, X22; this                                          ; +0x50, 0x100006e1c\nMOV             X1, #0; __n                                            ; +0x54, 0x100006e20\nSTR             X8, [SP,#0x70+var_58]                                  ; +0x58, 0x100006e24\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm; std::string::at(ulong) ; +0x5c, 0x100006e28\nLDRSB           W8, [X0]                                               ; +0x60, 0x100006e2c\nSTR             W8, [SP,#0x70+var_5C]                                  ; +0x64, 0x100006e30\nMOV             X0, X22; this                                          ; +0x68, 0x100006e34\nMOV             W1, #1; __n                                            ; +0x6c, 0x100006e38\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm; std::string::at(ulong) ; +0x70, 0x100006e3c\nLDRSB           W24, [X0]                                              ; +0x74, 0x100006e40\nMOV             X0, X22; this                                          ; +0x78, 0x100006e44\nMOV             W1, #2; __n                                            ; +0x7c, 0x100006e48\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm; std::string::at(ulong) ; +0x80, 0x100006e4c\nLDRSB           W25, [X0]                                              ; +0x84, 0x100006e50\nMOV             X0, X22; this                                          ; +0x88, 0x100006e54\nMOV             W1, #3; __n                                            ; +0x8c, 0x100006e58\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm; std::string::at(ulong) ; +0x90, 0x100006e5c\nLDRSB           W27, [X0]                                              ; +0x94, 0x100006e60\nMOV             X0, X22; this                                          ; +0x98, 0x100006e64\nMOV             W1, #4; __n                                            ; +0x9c, 0x100006e68\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm; std::string::at(ulong) ; +0xa0, 0x100006e6c\nLDRSB           W28, [X0]                                              ; +0xa4, 0x100006e70\nMOV             X0, X22; this                                          ; +0xa8, 0x100006e74\nMOV             W1, #5; __n                                            ; +0xac, 0x100006e78\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm; std::string::at(ulong) ; +0xb0, 0x100006e7c\nLDRSB           W19, [X0]                                              ; +0xb4, 0x100006e80\nMOV             X0, X22; this                                          ; +0xb8, 0x100006e84\nMOV             W1, #6; __n                                            ; +0xbc, 0x100006e88\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm; std::string::at(ulong) ; +0xc0, 0x100006e8c\nLDRSB           W23, [X0]                                              ; +0xc4, 0x100006e90\nMOV             X0, X22; this                                          ; +0xc8, 0x100006e94\nMOV             W1, #7; __n                                            ; +0xcc, 0x100006e98\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm; std::string::at(ulong) ; +0xd0, 0x100006e9c\nLDRSB           W26, [X0]                                              ; +0xd4, 0x100006ea0\nMOV             X0, X22; this                                          ; +0xd8, 0x100006ea4\nMOV             W1, #8; __n                                            ; +0xdc, 0x100006ea8\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm; std::string::at(ulong) ; +0xe0, 0x100006eac\nTST             W21, #1                                                ; +0xe4, 0x100006eb0\nLDRSB           W8, [X0]                                               ; +0xe8, 0x100006eb4\nMOV             X9, X24                                                ; +0xec, 0x100006eb8\nCSEL            W24, W24, W25, NE                                      ; +0xf0, 0x100006ebc\nCSEL            W25, W25, W9, NE                                       ; +0xf4, 0x100006ec0\nCSEL            W22, W28, W27, NE                                      ; +0xf8, 0x100006ec4\nCSEL            W27, W27, W28, NE                                      ; +0xfc, 0x100006ec8\nCSEL            W28, W23, W26, NE                                      ; +0x100, 0x100006ecc\nTST             W21, #1                                                ; +0x104, 0x100006ed0\nCSEL            W9, W19, W8, NE                                        ; +0x108, 0x100006ed4\nCSEL            W19, W8, W19, NE                                       ; +0x10c, 0x100006ed8\nCSEL            W8, W26, W23, NE                                       ; +0x110, 0x100006edc\nSTP             W9, W8, [SP,#0x70+var_64]                              ; +0x114, 0x100006ee0\nLDR             W0, [SP,#0x70+var_5C]                                  ; +0x118, 0x100006ee4\nMOV             X1, X21                                                ; +0x11c, 0x100006ee8\nMOV             X2, X20                                                ; +0x120, 0x100006eec\nBL              GJSmartTemplate__flipBlockType                         ; +0x124, 0x100006ef0\nSTR             W0, [SP,#0x70+var_5C]                                  ; +0x128, 0x100006ef4\nMOV             X0, X24                                                ; +0x12c, 0x100006ef8\nMOV             X1, X21                                                ; +0x130, 0x100006efc\nMOV             X2, X20                                                ; +0x134, 0x100006f00\nBL              GJSmartTemplate__flipBlockType                         ; +0x138, 0x100006f04\nMOV             X24, X0                                                ; +0x13c, 0x100006f08\nMOV             X0, X25                                                ; +0x140, 0x100006f0c\nMOV             X1, X21                                                ; +0x144, 0x100006f10\nMOV             X2, X20                                                ; +0x148, 0x100006f14\nBL              GJSmartTemplate__flipBlockType                         ; +0x14c, 0x100006f18\nMOV             X25, X0                                                ; +0x150, 0x100006f1c\nMOV             X0, X22                                                ; +0x154, 0x100006f20\nMOV             X1, X21                                                ; +0x158, 0x100006f24\nMOV             X2, X20                                                ; +0x15c, 0x100006f28\nBL              GJSmartTemplate__flipBlockType                         ; +0x160, 0x100006f2c\nMOV             X26, X0                                                ; +0x164, 0x100006f30\nMOV             X0, X27                                                ; +0x168, 0x100006f34\nMOV             X1, X21                                                ; +0x16c, 0x100006f38\nMOV             X2, X20                                                ; +0x170, 0x100006f3c\nBL              GJSmartTemplate__flipBlockType                         ; +0x174, 0x100006f40\nMOV             X27, X0                                                ; +0x178, 0x100006f44\nMOV             X0, X28                                                ; +0x17c, 0x100006f48\nMOV             X1, X21                                                ; +0x180, 0x100006f4c\nMOV             X2, X20                                                ; +0x184, 0x100006f50\nBL              GJSmartTemplate__flipBlockType                         ; +0x188, 0x100006f54\nMOV             X28, X0                                                ; +0x18c, 0x100006f58\nLDR             W0, [SP,#0x70+var_64]                                  ; +0x190, 0x100006f5c\nMOV             X1, X21                                                ; +0x194, 0x100006f60\nMOV             X2, X20                                                ; +0x198, 0x100006f64\nBL              GJSmartTemplate__flipBlockType                         ; +0x19c, 0x100006f68\nMOV             X23, X0                                                ; +0x1a0, 0x100006f6c\nMOV             X0, X19                                                ; +0x1a4, 0x100006f70\nMOV             X1, X21                                                ; +0x1a8, 0x100006f74\nMOV             X2, X20                                                ; +0x1ac, 0x100006f78\nBL              GJSmartTemplate__flipBlockType                         ; +0x1b0, 0x100006f7c\nMOV             X22, X0                                                ; +0x1b4, 0x100006f80\nLDR             W0, [SP,#0x70+var_60]                                  ; +0x1b8, 0x100006f84\nMOV             X1, X21                                                ; +0x1bc, 0x100006f88\nMOV             X2, X20                                                ; +0x1c0, 0x100006f8c\nBL              GJSmartTemplate__flipBlockType                         ; +0x1c4, 0x100006f90\nSTR             W0, [SP,#0x70+var_70]; int                             ; +0x1c8, 0x100006f94\nLDR             X8, [SP,#0x70+var_58]                                  ; +0x1cc, 0x100006f98\nLDR             W0, [SP,#0x70+var_5C]; int                             ; +0x1d0, 0x100006f9c\nMOV             X1, X24; int                                           ; +0x1d4, 0x100006fa0\nMOV             X2, X25; int                                           ; +0x1d8, 0x100006fa4\nMOV             X3, X26; int                                           ; +0x1dc, 0x100006fa8\nMOV             X4, X27; int                                           ; +0x1e0, 0x100006fac\nMOV             X5, X28; int                                           ; +0x1e4, 0x100006fb0\nMOV             X6, X23; int                                           ; +0x1e8, 0x100006fb4\nMOV             X7, X22; int                                           ; +0x1ec, 0x100006fb8\nBL              GJSmartTemplate__keyFromNeighbors_1                    ; +0x1f0, 0x100006fbc\nLDP             X29, X30, [SP,#0x70+var_s0]                            ; +0x1f4, 0x100006fc0\nLDP             X20, X19, [SP,#0x70+var_10]                            ; +0x1f8, 0x100006fc4\nLDP             X22, X21, [SP,#0x70+var_20]                            ; +0x1fc, 0x100006fc8\nLDP             X24, X23, [SP,#0x70+var_30]                            ; +0x200, 0x100006fcc\nLDP             X26, X25, [SP,#0x70+var_40]                            ; +0x204, 0x100006fd0\nLDP             X28, X27, [SP,#0x70+var_50]                            ; +0x208, 0x100006fd4\nADD             SP, SP, #0x80                                          ; +0x20c, 0x100006fd8\nRET                                                                    ; +0x210, 0x100006fdc", "xrefs": ["GJSmartTemplate::scanForPrefab @ 0x100005abc", "GJSmartTemplate::scanForPrefab @ 0x100005b8c", "GJSmartTemplate::scanForPrefab @ 0x100005c64", "GJSmartTemplate::scanForPrefab @ 0x100005c78"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}