{"type": "func", "start": 4677734, "end": 4677842, "name": "GJBaseGameLayer::testInstantCountTrigger", "pseudocode": "// \n// GJBaseGameLayer::testInstantCountTrigger from 0x476066 to 0x4760d2 (108 bytes)\n// \n// 1 xrefs:\n// > CountTriggerGameObject::triggerObject @ 0x3ee930\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 GJBaseGameLayer::testInstantCountTrigger(\n        GJBaseGameLayer *a1,\n        int a2,\n        int a3,\n        int a4,\n        bool a5,\n        int a6,\n        std::vector<int> *const a7,\n        int a8,\n        int a9)\n{\n  int v12; // r0\n  _BOOL4 v13; // r0\n\n  v12 = GJEffectManager::countForItem(a1->m_effectManager, a2);\n  if ( a6 == 1 )\n  {\n    v13 = v12 > a3;\n  }\n  else if ( a6 == 2 )\n  {\n    v13 = v12 < a3;\n  }\n  else\n  {\n    if ( a6 )\n      return;\n    v13 = v12 == a3;\n  }\n  if ( v13 )\n    a1->toggleGroupTriggered(a1, a4, a5, a7, a8, a9);\n}", "assembly": "; \n; GJBaseGameLayer::testInstantCountTrigger from 0x476066 to 0x4760d2 (108 bytes)\n; \n; 1 xrefs:\n; > CountTriggerGameObject::triggerObject @ 0x3ee930\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\nPUSH.W          {R0,R4-R11,LR}                                         ; +0x0, 0x476066\nADD             R6, SP, #4+arg_4                                       ; +0x4, 0x47606a\nMOV             R4, R0                                                 ; +0x6, 0x47606c\nLDR.W           R0, [R0,#0x690]; this                                  ; +0x8, 0x47606e\nLDM.W           R6, {R6,R7,R11}                                        ; +0xc, 0x476072\nMOV             R5, R2                                                 ; +0x10, 0x476076\nMOV             R9, R3                                                 ; +0x12, 0x476078\nLDRB.W          R8, [SP,#4+arg_0]                                      ; +0x14, 0x47607a\nLDR.W           R10, [SP,#4+arg_10]                                    ; +0x18, 0x47607e\nBL              _ZN15GJEffectManager12countForItemEi; GJEffectManager::countForItem(int) ; +0x1c, 0x476082\nCMP             R6, #1                                                 ; +0x20, 0x476086\nBEQ             loc_476098                                             ; +0x22, 0x476088\nCMP             R6, #2                                                 ; +0x24, 0x47608a\nBEQ             loc_4760A2                                             ; +0x26, 0x47608c\nCBNZ            R6, loc_4760CC                                         ; +0x28, 0x47608e\nSUBS            R3, R0, R5                                             ; +0x2a, 0x476090\nNEGS            R0, R3                                                 ; +0x2c, 0x476092\nADCS            R0, R3                                                 ; +0x2e, 0x476094\nB               loc_4760AA                                             ; +0x30, 0x476096\nCMP             R0, R5                                                 ; +0x32, 0x476098\nITE LE                                                                 ; +0x34, 0x47609a\nMOVLE           R0, #0                                                 ; +0x36, 0x47609c\nMOVGT           R0, #1                                                 ; +0x38, 0x47609e\nB               loc_4760AA                                             ; +0x3a, 0x4760a0\nCMP             R0, R5                                                 ; +0x3c, 0x4760a2\nITE GE                                                                 ; +0x3e, 0x4760a4\nMOVGE           R0, #0                                                 ; +0x40, 0x4760a6\nMOVLT           R0, #1                                                 ; +0x42, 0x4760a8\nCBZ             R0, loc_4760CC                                         ; +0x44, 0x4760aa\nLDR             R3, [R4]                                               ; +0x46, 0x4760ac\nMOV             R0, R4                                                 ; +0x48, 0x4760ae\nSTR.W           R11, [SP,#4+arg_0]                                     ; +0x4a, 0x4760b0\nMOV             R1, R9                                                 ; +0x4e, 0x4760b4\nSTR.W           R10, [SP,#4+arg_4]                                     ; +0x50, 0x4760b6\nMOV             R2, R8                                                 ; +0x54, 0x4760ba\nLDR.W           R5, [R3,#0x264]                                        ; +0x56, 0x4760bc\nMOV             R3, R7                                                 ; +0x5a, 0x4760c0\nMOV             R12, R5                                                ; +0x5c, 0x4760c2\nADD             SP, SP, #4                                             ; +0x5e, 0x4760c4\nPOP.W           {R4-R11,LR}                                            ; +0x60, 0x4760c6\nBX              R12                                                    ; +0x64, 0x4760ca\nADD             SP, SP, #4                                             ; +0x66, 0x4760cc\nPOP.W           {R4-R11,PC}                                            ; +0x68, 0x4760ce", "xrefs": ["CountTriggerGameObject::triggerObject @ 0x3ee930"], "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"}