{"type": "func", "start": 4298774272, "end": 4298774468, "name": "GJGarageLayer::onArrow", "pseudocode": "// \n// GJGarageLayer::onArrow from 0x1003a1700 to 0x1003a17c4 (196 bytes)\n// \n// 1 xrefs:\n// > GJGarageLayer::setupIconSelect @ 0x1003a0e98\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:03:46 +0000\n// \n\n__int64 __fastcall GJGarageLayer::onArrow(__int64 a1, __int64 a2)\n{\n  __int64 v3; // x0\n  int v4; // w20\n  __int64 v5; // x0\n  __int64 active; // x0\n  __int64 v7; // x0\n  int v8; // w22\n  int v9; // w8\n  int v10; // w9\n  int v11; // w10\n  int v12; // w8\n  unsigned int v13; // w10\n  __int64 v14; // x1\n  unsigned int *v16; // [xsp+8h] [xbp-28h] BYREF\n\n  v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);\n  v4 = v3;\n  v5 = GameManager::sharedState(v3);\n  active = GameManager::activeIconForType(v5, *(unsigned int *)(a1 + 516));\n  v7 = GameManager::sharedState(active);\n  v8 = GameManager::countForType(v7, *(unsigned int *)(a1 + 516));\n  v16 = (unsigned int *)(a1 + 516);\n  v9 = *((_DWORD *)sub_1001E71D0(a1 + 520, (int *)(a1 + 516), (__int64)&unk_10076DCF5, &v16) + 8);\n  v10 = v8 / 36;\n  if ( v4 == 1 )\n    v11 = 1;\n  else\n    v11 = -1;\n  v12 = v9 + v11;\n  if ( v12 <= v10 )\n    v13 = v12;\n  else\n    v13 = 0;\n  if ( v12 >= 0 )\n    v14 = v13;\n  else\n    v14 = (unsigned int)v10;\n  return GJGarageLayer::setupPage(a1, v14, *(unsigned int *)(a1 + 516));\n}", "assembly": "; \n; GJGarageLayer::onArrow from 0x1003a1700 to 0x1003a17c4 (196 bytes)\n; \n; 1 xrefs:\n; > GJGarageLayer::setupIconSelect @ 0x1003a0e98\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:03:46 +0000\n; \nSUB             SP, SP, #0x40                                          ; +0x0, 0x1003a1700\nSTP             X22, X21, [SP,#0x30+var_20]                            ; +0x4, 0x1003a1704\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x8, 0x1003a1708\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0xc, 0x1003a170c\nADD             X29, SP, #0x30                                         ; +0x10, 0x1003a1710\nMOV             X19, X0                                                ; +0x14, 0x1003a1714\nLDR             X8, [X1]                                               ; +0x18, 0x1003a1718\nLDR             X8, [X8,#0x40]                                         ; +0x1c, 0x1003a171c\nMOV             X0, X1                                                 ; +0x20, 0x1003a1720\nBLR             X8                                                     ; +0x24, 0x1003a1724\nMOV             X20, X0                                                ; +0x28, 0x1003a1728\nBL              GameManager__sharedState                               ; +0x2c, 0x1003a172c\nADD             X21, X19, #0x204                                       ; +0x30, 0x1003a1730\nLDR             W1, [X19,#0x204]                                       ; +0x34, 0x1003a1734\nBL              GameManager__activeIconForType                         ; +0x38, 0x1003a1738\nBL              GameManager__sharedState                               ; +0x3c, 0x1003a173c\nLDR             W1, [X19,#0x204]                                       ; +0x40, 0x1003a1740\nBL              GameManager__countForType                              ; +0x44, 0x1003a1744\nMOV             X22, X0                                                ; +0x48, 0x1003a1748\nSTR             X21, [SP,#0x30+var_28]                                 ; +0x4c, 0x1003a174c\nADRL            X2, unk_10076DCF5                                      ; +0x50, 0x1003a1750\nADD             X0, X19, #0x208                                        ; +0x58, 0x1003a1758\nADD             X3, SP, #0x30+var_28                                   ; +0x5c, 0x1003a175c\nADD             X4, SP, #0x30+var_29                                   ; +0x60, 0x1003a1760\nMOV             X1, X21                                                ; +0x64, 0x1003a1764\nBL              sub_1001E71D0                                          ; +0x68, 0x1003a1768\nLDR             W8, [X0,#0x20]                                         ; +0x6c, 0x1003a176c\nMOV             W9, #0x38E38E39                                        ; +0x70, 0x1003a1770\nSMULL           X9, W22, W9                                            ; +0x78, 0x1003a1778\nLSR             X10, X9, #0x20 ; ' '                                   ; +0x7c, 0x1003a177c\nLSR             X9, X9, #0x3F ; '?'                                    ; +0x80, 0x1003a1780\nADD             W9, W9, W10,ASR#3                                      ; +0x84, 0x1003a1784\nCMP             W20, #1                                                ; +0x88, 0x1003a1788\nCSINV           W10, W20, WZR, EQ                                      ; +0x8c, 0x1003a178c\nADD             W8, W8, W10                                            ; +0x90, 0x1003a1790\nCMP             W8, W9                                                 ; +0x94, 0x1003a1794\nCSEL            W10, WZR, W8, GT                                       ; +0x98, 0x1003a1798\nCMP             W8, #0                                                 ; +0x9c, 0x1003a179c\nCSEL            W1, W9, W10, LT                                        ; +0xa0, 0x1003a17a0\nLDR             W2, [X19,#0x204]                                       ; +0xa4, 0x1003a17a4\nMOV             X0, X19                                                ; +0xa8, 0x1003a17a8\nBL              GJGarageLayer__setupPage                               ; +0xac, 0x1003a17ac\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0xb0, 0x1003a17b0\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0xb4, 0x1003a17b4\nLDP             X22, X21, [SP,#0x30+var_20]                            ; +0xb8, 0x1003a17b8\nADD             SP, SP, #0x40 ; '@'                                    ; +0xbc, 0x1003a17bc\nRET                                                                    ; +0xc0, 0x1003a17c0", "xrefs": ["GJGarageLayer::setupIconSelect @ 0x1003a0e98"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}