{"type": "func", "start": 524884, "end": 525160, "name": "sub_80254", "pseudocode": "// \n// sub_80254 from 0x80254 to 0x80368 (276 bytes)\n// \n// 1 xrefs:\n// > sub_80A04 @ 0x80a08\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 12:14:07 +0000\n// \n\n__int64 __fastcall sub_80254(__int64 a1, int a2, float a3)\n{\n  unsigned int v3; // w8\n  int v4; // w8\n  float v5; // s0\n  int v6; // w8\n  float v7; // s0\n  float v8; // s1\n\n  v3 = 31;\n  switch ( a2 )\n  {\n    case 1:\n      *(_DWORD *)(a1 + 676) = (int)fmaxf(fminf(a3, 4.0), 0.0);\n      goto LABEL_11;\n    case 2:\n      v4 = *(unsigned __int8 *)(a1 + 657);\n      v5 = fmaxf(fminf(a3, 1.0e18), 0.0);\n      *(float *)(a1 + 568) = v5;\n      if ( v4 )\n        *(float *)(a1 + 680) = fminf(v5, *(float *)(a1 + 572));\n      goto LABEL_11;\n    case 3:\n      v6 = *(unsigned __int8 *)(a1 + 657);\n      v7 = fmaxf(fminf(a3, 1.0e18), 0.0);\n      *(float *)(a1 + 572) = v7;\n      if ( v6 )\n      {\n        v8 = *(float *)(a1 + 568);\n        *(float *)(a1 + 684) = v7;\n        *(float *)(a1 + 680) = fminf(v8, v7);\n      }\n      goto LABEL_11;\n    case 4:\n      *(_DWORD *)(a1 + 688) = (int)fmaxf(fminf(a3, 2.0), 0.0);\n      goto LABEL_11;\n    case 5:\n      *(float *)(a1 + 692) = fmaxf(fminf(a3, 1.0e18), 0.0);\n      goto LABEL_11;\n    case 6:\n      *(float *)(a1 + 696) = fmaxf(fminf(a3, 360.0), 0.0);\n      goto LABEL_11;\n    case 8:\n      *(float *)(a1 + 712) = a3;\nLABEL_11:\n      v3 = 0;\n      ++*(_DWORD *)(a1 + 644);\n      break;\n    default:\n      return v3;\n  }\n  return v3;\n}", "assembly": "; \n; sub_80254 from 0x80254 to 0x80368 (276 bytes)\n; \n; 1 xrefs:\n; > sub_80A04 @ 0x80a08\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 12:14:07 +0000\n; \nSUB             W9, W1, #1; switch 8 cases                             ; +0x0, 0x80254\nCMP             W9, #7                                                 ; +0x4, 0x80258\nMOV             W8, #0x1F                                              ; +0x8, 0x8025c\nB.HI            def_80278; jumptable 0000000000080278 default case, case 7 ; +0xc, 0x80260\nADRL            X10, jpt_80278                                         ; +0x10, 0x80264\nADR             X11, loc_8027C; jumptable 0000000000080278 case 1      ; +0x18, 0x8026c\nLDRB            W12, [X10,X9]                                          ; +0x1c, 0x80270\nADD             X11, X11, X12,LSL#2                                    ; +0x20, 0x80274\nBR              X11; switch jump                                       ; +0x24, 0x80278\nFMOV            S1, #4.0; jumptable 0000000000080278 case 1            ; +0x28, 0x8027c\nFMINNM          S0, S0, S1                                             ; +0x2c, 0x80280\nFMOV            S1, WZR                                                ; +0x30, 0x80284\nFMAXNM          S0, S0, S1                                             ; +0x34, 0x80288\nFCVTZS          W8, S0                                                 ; +0x38, 0x8028c\nSTR             W8, [X0,#0x2A4]                                        ; +0x3c, 0x80290\nB               loc_80354                                              ; +0x40, 0x80294\nADRP            X8, #dword_2EFA4@PAGE; jumptable 0000000000080278 case 2 ; +0x44, 0x80298\nLDR             S1, [X8,#dword_2EFA4@PAGEOFF]                          ; +0x48, 0x8029c\nLDRB            W8, [X0,#0x291]                                        ; +0x4c, 0x802a0\nFMINNM          S0, S0, S1                                             ; +0x50, 0x802a4\nFMOV            S1, WZR                                                ; +0x54, 0x802a8\nFMAXNM          S0, S0, S1                                             ; +0x58, 0x802ac\nSTR             S0, [X0,#0x238]                                        ; +0x5c, 0x802b0\nCBZ             W8, loc_80354                                          ; +0x60, 0x802b4\nLDR             S1, [X0,#0x23C]                                        ; +0x64, 0x802b8\nFMINNM          S0, S0, S1                                             ; +0x68, 0x802bc\nSTR             S0, [X0,#0x2A8]                                        ; +0x6c, 0x802c0\nB               loc_80354                                              ; +0x70, 0x802c4\nADRP            X8, #dword_2EFA4@PAGE; jumptable 0000000000080278 case 3 ; +0x74, 0x802c8\nLDR             S1, [X8,#dword_2EFA4@PAGEOFF]                          ; +0x78, 0x802cc\nLDRB            W8, [X0,#0x291]                                        ; +0x7c, 0x802d0\nFMINNM          S0, S0, S1                                             ; +0x80, 0x802d4\nFMOV            S1, WZR                                                ; +0x84, 0x802d8\nFMAXNM          S0, S0, S1                                             ; +0x88, 0x802dc\nSTR             S0, [X0,#0x23C]                                        ; +0x8c, 0x802e0\nCBZ             W8, loc_80354                                          ; +0x90, 0x802e4\nLDR             S1, [X0,#0x238]                                        ; +0x94, 0x802e8\nSTR             S0, [X0,#0x2AC]                                        ; +0x98, 0x802ec\nFMINNM          S1, S1, S0                                             ; +0x9c, 0x802f0\nSTR             S1, [X0,#0x2A8]                                        ; +0xa0, 0x802f4\nB               loc_80354                                              ; +0xa4, 0x802f8\nFMOV            S1, #2.0; jumptable 0000000000080278 case 4            ; +0xa8, 0x802fc\nFMINNM          S0, S0, S1                                             ; +0xac, 0x80300\nFMOV            S1, WZR                                                ; +0xb0, 0x80304\nFMAXNM          S0, S0, S1                                             ; +0xb4, 0x80308\nFCVTZS          W8, S0                                                 ; +0xb8, 0x8030c\nSTR             W8, [X0,#0x2B0]                                        ; +0xbc, 0x80310\nB               loc_80354                                              ; +0xc0, 0x80314\nADRP            X8, #dword_2EFA4@PAGE; jumptable 0000000000080278 case 5 ; +0xc4, 0x80318\nLDR             S1, [X8,#dword_2EFA4@PAGEOFF]                          ; +0xc8, 0x8031c\nFMINNM          S0, S0, S1                                             ; +0xcc, 0x80320\nFMOV            S1, WZR                                                ; +0xd0, 0x80324\nFMAXNM          S0, S0, S1                                             ; +0xd4, 0x80328\nSTR             S0, [X0,#0x2B4]                                        ; +0xd8, 0x8032c\nB               loc_80354                                              ; +0xdc, 0x80330\nMOV             W8, #0x43B40000; jumptable 0000000000080278 case 6     ; +0xe0, 0x80334\nFMOV            S1, W8                                                 ; +0xe4, 0x80338\nFMINNM          S0, S0, S1                                             ; +0xe8, 0x8033c\nFMOV            S1, WZR                                                ; +0xec, 0x80340\nFMAXNM          S0, S0, S1                                             ; +0xf0, 0x80344\nSTR             S0, [X0,#0x2B8]                                        ; +0xf4, 0x80348\nB               loc_80354                                              ; +0xf8, 0x8034c\nSTR             S0, [X0,#0x2C8]; jumptable 0000000000080278 case 8     ; +0xfc, 0x80350\nLDR             W9, [X0,#0x284]                                        ; +0x100, 0x80354\nMOV             W8, WZR                                                ; +0x104, 0x80358\nADD             W9, W9, #1                                             ; +0x108, 0x8035c\nSTR             W9, [X0,#0x284]                                        ; +0x10c, 0x80360\nB               loc_80AB4; jumptable 0000000000080278 default case, case 7 ; +0x110, 0x80364", "xrefs": ["sub_80A04 @ 0x80a08"], "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"}