{"type": "func", "start": 4298131952, "end": 4298132148, "name": "GJGarageLayer::onArrow", "pseudocode": "// \n// GJGarageLayer::onArrow from 0x1003049f0 to 0x100304ab4 (196 bytes)\n// \n// 1 xrefs:\n// > GJGarageLayer::setupIconSelect @ 0x1003041a8\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 __fastcall GJGarageLayer::onArrow(GJGarageLayer *a1, cocos2d::CCObject *a2)\n{\n  int v3; // w20\n  GameManager *v4; // x0\n  GameManager *v5; // x0\n  int v6; // w22\n  int v7; // w8\n  int v8; // w10\n  int v9; // w8\n  int v10; // w10\n  int v11; // w1\n  IconType *p_m_iconType; // [xsp+8h] [xbp-28h] BYREF\n\n  v3 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);\n  v4 = GameManager::sharedState();\n  GameManager::activeIconForType(v4, a1->m_iconType);\n  v5 = GameManager::sharedState();\n  v6 = GameManager::countForType(v5, a1->m_iconType);\n  p_m_iconType = &a1->m_iconType;\n  v7 = *((_DWORD *)sub_1001A6048(\n                     (__int64)&a1->m_iconPages,\n                     (int *)&a1->m_iconType,\n                     (__int64)&unk_100644D9D,\n                     (unsigned int **)&p_m_iconType)\n       + 8);\n  if ( v3 == 1 )\n    v8 = 1;\n  else\n    v8 = -1;\n  v9 = v7 + v8;\n  if ( v9 <= v6 / 36 )\n    v10 = v9;\n  else\n    v10 = 0;\n  if ( v9 >= 0 )\n    v11 = v10;\n  else\n    v11 = v6 / 36;\n  GJGarageLayer::setupPage(a1, v11, a1->m_iconType);\n}", "assembly": "; \n; GJGarageLayer::onArrow from 0x1003049f0 to 0x100304ab4 (196 bytes)\n; \n; 1 xrefs:\n; > GJGarageLayer::setupIconSelect @ 0x1003041a8\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, #0x40                                          ; +0x0, 0x1003049f0\nSTP             X22, X21, [SP,#0x30+var_20]                            ; +0x4, 0x1003049f4\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x8, 0x1003049f8\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0xc, 0x1003049fc\nADD             X29, SP, #0x30                                         ; +0x10, 0x100304a00\nMOV             X19, X0                                                ; +0x14, 0x100304a04\nLDR             X8, [X1]                                               ; +0x18, 0x100304a08\nLDR             X8, [X8,#0x40]                                         ; +0x1c, 0x100304a0c\nMOV             X0, X1                                                 ; +0x20, 0x100304a10\nBLR             X8                                                     ; +0x24, 0x100304a14\nMOV             X20, X0                                                ; +0x28, 0x100304a18\nBL              GameManager__sharedState                               ; +0x2c, 0x100304a1c\nADD             X21, X19, #0x204                                       ; +0x30, 0x100304a20\nLDR             W1, [X19,#0x204]                                       ; +0x34, 0x100304a24\nBL              GameManager__activeIconForType                         ; +0x38, 0x100304a28\nBL              GameManager__sharedState                               ; +0x3c, 0x100304a2c\nLDR             W1, [X19,#0x204]                                       ; +0x40, 0x100304a30\nBL              GameManager__countForType                              ; +0x44, 0x100304a34\nMOV             X22, X0                                                ; +0x48, 0x100304a38\nSTR             X21, [SP,#0x30+var_28]                                 ; +0x4c, 0x100304a3c\nADRL            X2, unk_100644D9D                                      ; +0x50, 0x100304a40\nADD             X0, X19, #0x208                                        ; +0x58, 0x100304a48\nADD             X3, SP, #0x30+var_28                                   ; +0x5c, 0x100304a4c\nADD             X4, SP, #0x30+var_29                                   ; +0x60, 0x100304a50\nMOV             X1, X21                                                ; +0x64, 0x100304a54\nBL              sub_1001A6048                                          ; +0x68, 0x100304a58\nLDR             W8, [X0,#0x20]                                         ; +0x6c, 0x100304a5c\nMOV             W9, #0x38E38E39                                        ; +0x70, 0x100304a60\nSMULL           X9, W22, W9                                            ; +0x78, 0x100304a68\nLSR             X10, X9, #0x20 ; ' '                                   ; +0x7c, 0x100304a6c\nLSR             X9, X9, #0x3F ; '?'                                    ; +0x80, 0x100304a70\nADD             W9, W9, W10,ASR#3                                      ; +0x84, 0x100304a74\nCMP             W20, #1                                                ; +0x88, 0x100304a78\nCSINV           W10, W20, WZR, EQ                                      ; +0x8c, 0x100304a7c\nADD             W8, W8, W10                                            ; +0x90, 0x100304a80\nCMP             W8, W9                                                 ; +0x94, 0x100304a84\nCSEL            W10, WZR, W8, GT                                       ; +0x98, 0x100304a88\nCMP             W8, #0                                                 ; +0x9c, 0x100304a8c\nCSEL            W1, W9, W10, LT                                        ; +0xa0, 0x100304a90\nLDR             W2, [X19,#0x204]                                       ; +0xa4, 0x100304a94\nMOV             X0, X19                                                ; +0xa8, 0x100304a98\nBL              GJGarageLayer__setupPage                               ; +0xac, 0x100304a9c\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0xb0, 0x100304aa0\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0xb4, 0x100304aa4\nLDP             X22, X21, [SP,#0x30+var_20]                            ; +0xb8, 0x100304aa8\nADD             SP, SP, #0x40 ; '@'                                    ; +0xbc, 0x100304aac\nRET                                                                    ; +0xc0, 0x100304ab0", "xrefs": ["GJGarageLayer::setupIconSelect @ 0x1003041a8"], "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"}