{"type": "func", "start": 805040, "end": 805216, "name": "sub_C48B0", "pseudocode": "// \n// sub_C48B0 from 0xc48b0 to 0xc4960 (176 bytes)\n// \n// 2 xrefs:\n// > sub_C3E48 @ 0xc3f3c\n// > sub_C4210 @ 0xc4268\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\n__int64 __fastcall sub_C48B0(float a1, float a2, float a3, __int64 a4, int *a5)\n{\n  float v5; // s3\n  int v7; // s0\n  float v8; // s9\n  float v9; // s1\n  float v10; // s1\n\n  v5 = fminf(a1, 1.0);\n  v7 = 0;\n  if ( v5 == 1.0\n    || (v8 = (float)(v5 * v5) + -1.0,\n        v9 = 2.0 - (float)((float)((float)(v5 * v5) + (float)(v5 * v5)) * cosf((float)(a2 * 6.2832) / a3)),\n        v7 = 0,\n        v10 = (float)(sqrtf(fmaxf((float)(v8 * (float)(v8 * -4.0)) + (float)(v9 * v9), 0.0)) - v9) / (float)(v8 + v8),\n        *(float *)a5 = v10,\n        v10 < 0.0)\n    || (v7 = 1065185444, v10 > 0.99) )\n  {\n    *a5 = v7;\n  }\n  return 0;\n}", "assembly": "; \n; sub_C48B0 from 0xc48b0 to 0xc4960 (176 bytes)\n; \n; 2 xrefs:\n; > sub_C3E48 @ 0xc3f3c\n; > sub_C4210 @ 0xc4268\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\nSTP             D9, D8, [SP,#-0x10+var_20]!                            ; +0x0, 0xc48b0\nFMOV            S4, #1.0                                               ; +0x4, 0xc48b4\nFMINNM          S3, S0, S4                                             ; +0x8, 0xc48b8\nSTR             X19, [SP,#0x20+var_10]                                 ; +0xc, 0xc48bc\nMOV             X19, X1                                                ; +0x10, 0xc48c0\nFCMP            S3, S4                                                 ; +0x14, 0xc48c4\nFMOV            S0, WZR                                                ; +0x18, 0xc48c8\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x1c, 0xc48cc\nADD             X29, SP, #0x20                                         ; +0x20, 0xc48d0\nB.EQ            loc_C4948                                              ; +0x24, 0xc48d4\nADRP            X8, #dword_2EF58@PAGE                                  ; +0x28, 0xc48d8\nLDR             S0, [X8,#dword_2EF58@PAGEOFF]                          ; +0x2c, 0xc48dc\nFMUL            S8, S3, S3                                             ; +0x30, 0xc48e0\nFMOV            S3, #-1.0                                              ; +0x34, 0xc48e4\nFADD            S9, S8, S3                                             ; +0x38, 0xc48e8\nFMUL            S0, S1, S0                                             ; +0x3c, 0xc48ec\nFDIV            S0, S0, S2; x                                          ; +0x40, 0xc48f0\nBL              .cosf                                                  ; +0x44, 0xc48f4\nFADD            S1, S8, S8                                             ; +0x48, 0xc48f8\nFMOV            S2, #2.0                                               ; +0x4c, 0xc48fc\nFMSUB           S1, S1, S0, S2                                         ; +0x50, 0xc4900\nFMOV            S2, #-4.0                                              ; +0x54, 0xc4904\nFMUL            S2, S9, S2                                             ; +0x58, 0xc4908\nFMUL            S2, S9, S2                                             ; +0x5c, 0xc490c\nFMOV            S0, WZR                                                ; +0x60, 0xc4910\nFMADD           S2, S1, S1, S2                                         ; +0x64, 0xc4914\nFMAXNM          S2, S2, S0                                             ; +0x68, 0xc4918\nFSQRT           S2, S2                                                 ; +0x6c, 0xc491c\nFSUB            S1, S2, S1                                             ; +0x70, 0xc4920\nFADD            S2, S9, S9                                             ; +0x74, 0xc4924\nFDIV            S1, S1, S2                                             ; +0x78, 0xc4928\nFCMP            S1, #0.0                                               ; +0x7c, 0xc492c\nSTR             S1, [X19]                                              ; +0x80, 0xc4930\nB.LT            loc_C4948                                              ; +0x84, 0xc4934\nADRP            X8, #dword_2EF70@PAGE                                  ; +0x88, 0xc4938\nLDR             S0, [X8,#dword_2EF70@PAGEOFF]                          ; +0x8c, 0xc493c\nFCMP            S1, S0                                                 ; +0x90, 0xc4940\nB.LE            loc_C494C                                              ; +0x94, 0xc4944\nSTR             S0, [X19]                                              ; +0x98, 0xc4948\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x9c, 0xc494c\nLDR             X19, [SP,#0x20+var_10]                                 ; +0xa0, 0xc4950\nMOV             W0, WZR                                                ; +0xa4, 0xc4954\nLDP             D9, D8, [SP+0x20+var_20],#0x30                         ; +0xa8, 0xc4958\nRET                                                                    ; +0xac, 0xc495c", "xrefs": ["sub_C3E48 @ 0xc3f3c", "sub_C4210 @ 0xc4268"], "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"}