{"type": "func", "start": 4678032, "end": 4678064, "name": "GJBaseGameLayer::performMathRounding", "pseudocode": "// \n// GJBaseGameLayer::performMathRounding from 0x476190 to 0x4761b0 (32 bytes)\n// \n// 4 xrefs:\n// > GJBaseGameLayer::activateItemCompareTrigger @ 0x4762de\n// > GJBaseGameLayer::activateItemCompareTrigger @ 0x47632e\n// > GJBaseGameLayer::activateItemEditTrigger @ 0x48e7a2\n// > GJBaseGameLayer::activateItemEditTrigger @ 0x48e7e0\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::performMathRounding(GJBaseGameLayer *a1, double a2, int a3)\n{\n  double result; // r0\n\n  result = a2;\n  switch ( a3 )\n  {\n    case 2:\n      return j_floor(a2);\n    case 3:\n      return j_ceil(a2);\n    case 1:\n      LODWORD(result) = j_round();\n      break;\n  }\n  return result;\n}", "assembly": "; \n; GJBaseGameLayer::performMathRounding from 0x476190 to 0x4761b0 (32 bytes)\n; \n; 4 xrefs:\n; > GJBaseGameLayer::activateItemCompareTrigger @ 0x4762de\n; > GJBaseGameLayer::activateItemCompareTrigger @ 0x47632e\n; > GJBaseGameLayer::activateItemEditTrigger @ 0x48e7a2\n; > GJBaseGameLayer::activateItemEditTrigger @ 0x48e7e0\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\nMOV             R1, R3; x                                              ; +0x0, 0x476190\nLDR             R3, [SP,#arg_0]                                        ; +0x2, 0x476192\nMOV             R0, R2; x                                              ; +0x4, 0x476194\nCMP             R3, #2                                                 ; +0x6, 0x476196\nBEQ             loc_4761A6                                             ; +0x8, 0x476198\nCMP             R3, #3                                                 ; +0xa, 0x47619a\nBEQ             loc_4761AA                                             ; +0xc, 0x47619c\nCMP             R3, #1                                                 ; +0xe, 0x47619e\nBNE             locret_4761AE                                          ; +0x10, 0x4761a0\nB.W             j_round                                                ; +0x12, 0x4761a2\nB.W             j_floor                                                ; +0x16, 0x4761a6\nB.W             j_ceil                                                 ; +0x1a, 0x4761aa\nBX              LR                                                     ; +0x1e, 0x4761ae", "xrefs": ["GJBaseGameLayer::activateItemCompareTrigger @ 0x4762de", "GJBaseGameLayer::activateItemCompareTrigger @ 0x47632e", "GJBaseGameLayer::activateItemEditTrigger @ 0x48e7a2", "GJBaseGameLayer::activateItemEditTrigger @ 0x48e7e0"], "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"}