{"type": "func", "start": 4677952, "end": 4678020, "name": "GJBaseGameLayer::performMathOperation", "pseudocode": "// \n// GJBaseGameLayer::performMathOperation from 0x476140 to 0x476184 (68 bytes)\n// \n// 5 xrefs:\n// > GJBaseGameLayer::activateItemCompareTrigger @ 0x4762ca\n// > GJBaseGameLayer::activateItemCompareTrigger @ 0x476314\n// > GJBaseGameLayer::activateItemEditTrigger @ 0x48e772\n// > GJBaseGameLayer::activateItemEditTrigger @ 0x48e78e\n// > GJBaseGameLayer::activateItemEditTrigger @ 0x48e7cc\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\ndouble GJBaseGameLayer::performMathOperation(GJBaseGameLayer *a1, double a2, double a3, int a4)\n{\n  double v4; // d7\n\n  switch ( a4 )\n  {\n    case 1:\n      v4 = a2 + a3;\n      break;\n    case 2:\n      v4 = a2 - a3;\n      break;\n    case 3:\n      v4 = a2 * a3;\n      break;\n    case 4:\n      if ( a3 == 0.0 )\n        goto LABEL_7;\n      v4 = a2 / a3;\n      break;\n    default:\nLABEL_7:\n      v4 = 0.0;\n      break;\n  }\n  return v4;\n}", "assembly": "; \n; GJBaseGameLayer::performMathOperation from 0x476140 to 0x476184 (68 bytes)\n; \n; 5 xrefs:\n; > GJBaseGameLayer::activateItemCompareTrigger @ 0x4762ca\n; > GJBaseGameLayer::activateItemCompareTrigger @ 0x476314\n; > GJBaseGameLayer::activateItemEditTrigger @ 0x48e772\n; > GJBaseGameLayer::activateItemEditTrigger @ 0x48e78e\n; > GJBaseGameLayer::activateItemEditTrigger @ 0x48e7cc\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\nVMOV            D7, R2, R3                                             ; +0x0, 0x476140\nLDR             R3, [SP,#arg_8]                                        ; +0x4, 0x476144\nSUBS            R3, #1; switch 4 cases                                 ; +0x6, 0x476146\nVLDR            D6, [SP,#arg_0]                                        ; +0x8, 0x476148\nCMP             R3, #3                                                 ; +0xc, 0x47614c\nBHI             def_476150; jumptable 00476150 default case            ; +0xe, 0x47614e\nTBB.W           [PC,R3]; switch jump                                   ; +0x10, 0x476150\nDCB 2; jump table for switch statement                                 ; +0x14, 0x476154\nDCB 5                                                                  ; +0x15, 0x476155\nDCB 8                                                                  ; +0x16, 0x476156\nDCB 0xB                                                                ; +0x17, 0x476157\nVADD.F64        D7, D7, D6; jumptable 00476150 case 1                  ; +0x18, 0x476158\nB               loc_47617E                                             ; +0x1c, 0x47615c\nVSUB.F64        D7, D7, D6; jumptable 00476150 case 2                  ; +0x1e, 0x47615e\nB               loc_47617E                                             ; +0x22, 0x476162\nVMUL.F64        D7, D7, D6; jumptable 00476150 case 3                  ; +0x24, 0x476164\nB               loc_47617E                                             ; +0x28, 0x476168\nVCMP.F64        D6, #0.0; jumptable 00476150 case 4                    ; +0x2a, 0x47616a\nVMRS            APSR_nzcv, FPSCR                                       ; +0x2e, 0x47616e\nBEQ             def_476150; jumptable 00476150 default case            ; +0x32, 0x476172\nVDIV.F64        D7, D7, D6                                             ; +0x34, 0x476174\nB               loc_47617E                                             ; +0x38, 0x476178\nVLDR            D7, =0.0; jumptable 00476150 default case              ; +0x3a, 0x47617a\nVMOV            R0, R1, D7                                             ; +0x3e, 0x47617e\nBX              LR                                                     ; +0x42, 0x476182", "xrefs": ["GJBaseGameLayer::activateItemCompareTrigger @ 0x4762ca", "GJBaseGameLayer::activateItemCompareTrigger @ 0x476314", "GJBaseGameLayer::activateItemEditTrigger @ 0x48e772", "GJBaseGameLayer::activateItemEditTrigger @ 0x48e78e", "GJBaseGameLayer::activateItemEditTrigger @ 0x48e7cc"], "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"}