{"type": "func", "start": 6443710552, "end": 6443710676, "name": "_ctrlfp", "pseudocode": "// \n// _ctrlfp from 0x180133858 to 0x1801338d4 (124 bytes)\n// \n// 11 xrefs:\n// > ldexp @ 0x18012750a\n// > ldexp @ 0x180127553\n// > _except2 @ 0x18013312b\n// > _umatherr @ 0x1801337fb\n// > _umatherr @ 0x18013381d\n// > _call_matherr @ 0x180133947\n// > _handle_error @ 0x180133a67\n// > _handle_error @ 0x180133b26\n// > _handle_errorf @ 0x180133b8f\n// > _handle_errorf @ 0x180133c5a\n// > <???> @ 0x18020317c\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 ctrlfp(int a1, int a2)\n{\n  unsigned int fpsr; // esi\n  __int64 v5; // rcx\n\n  fpsr = get_fpsr();\n  v5 = a2 & a1 | fpsr & (~(_WORD)a2 | 0xFFFF807F);\n  if ( byte_1801B1864 && (((unsigned __int8)(a2 & a1) | fpsr & ((unsigned __int8)~(_BYTE)a2 | 0x7F)) & 0x40) != 0 )\n    set_fpsr(v5);\n  else\n    set_fpsr((unsigned int)v5 & 0xFFFFFFBF);\n  return fpsr;\n}", "assembly": "; \n; _ctrlfp from 0x180133858 to 0x1801338d4 (124 bytes)\n; \n; 11 xrefs:\n; > ldexp @ 0x18012750a\n; > ldexp @ 0x180127553\n; > _except2 @ 0x18013312b\n; > _umatherr @ 0x1801337fb\n; > _umatherr @ 0x18013381d\n; > _call_matherr @ 0x180133947\n; > _handle_error @ 0x180133a67\n; > _handle_error @ 0x180133b26\n; > _handle_errorf @ 0x180133b8f\n; > _handle_errorf @ 0x180133c5a\n; > <???> @ 0x18020317c\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     [rsp+arg_10], rbx                                              ; +0x0, 0x180133858\nmov     [rsp+arg_18], rsi                                              ; +0x5, 0x18013385d\npush    rdi                                                            ; +0xa, 0x180133862\nsub     rsp, 20h                                                       ; +0xb, 0x180133863\nmov     rbx, rdx                                                       ; +0xf, 0x180133867\nmov     rdi, rcx                                                       ; +0x12, 0x18013386a\ncall    _get_fpsr                                                      ; +0x15, 0x18013386d\nmov     esi, eax                                                       ; +0x1a, 0x180133872\nmov     [rsp+28h+arg_8], eax                                           ; +0x1c, 0x180133874\nmov     ecx, ebx                                                       ; +0x20, 0x180133878\nnot     ecx                                                            ; +0x22, 0x18013387a\nor      ecx, 0FFFF807Fh                                                ; +0x24, 0x18013387c\nand     ecx, eax                                                       ; +0x2a, 0x180133882\nand     edi, ebx                                                       ; +0x2c, 0x180133884\nor      ecx, edi                                                       ; +0x2e, 0x180133886\nmov     [rsp+28h+arg_0], ecx                                           ; +0x30, 0x180133888\ncmp     cs:byte_1801B1864, 0                                           ; +0x34, 0x18013388c\njz      short loc_1801338BA                                            ; +0x3b, 0x180133893\ntest    cl, 40h                                                        ; +0x3d, 0x180133895\njz      short loc_1801338BA                                            ; +0x40, 0x180133898\ncall    _set_fpsr                                                      ; +0x42, 0x18013389a\njmp     short loc_1801338C2                                            ; +0x47, 0x18013389f\nmov     cs:byte_1801B1864, 0                                           ; +0x49, 0x1801338a1\nmov     ecx, [rsp+28h+arg_0]                                           ; +0x50, 0x1801338a8\nand     ecx, 0FFFFFFBFh                                                ; +0x54, 0x1801338ac\ncall    _set_fpsr                                                      ; +0x57, 0x1801338af\nmov     esi, [rsp+28h+arg_8]                                           ; +0x5c, 0x1801338b4\njmp     short loc_1801338C2                                            ; +0x60, 0x1801338b8\nand     ecx, 0FFFFFFBFh                                                ; +0x62, 0x1801338ba\ncall    _set_fpsr                                                      ; +0x65, 0x1801338bd\nmov     eax, esi                                                       ; +0x6a, 0x1801338c2\nmov     rbx, [rsp+28h+arg_10]                                          ; +0x6c, 0x1801338c4\nmov     rsi, [rsp+28h+arg_18]                                          ; +0x71, 0x1801338c9\nadd     rsp, 20h                                                       ; +0x76, 0x1801338ce\npop     rdi                                                            ; +0x7a, 0x1801338d2\nretn                                                                   ; +0x7b, 0x1801338d3", "xrefs": ["ldexp @ 0x18012750a", "ldexp @ 0x180127553", "_except2 @ 0x18013312b", "_umatherr @ 0x1801337fb", "_umatherr @ 0x18013381d", "_call_matherr @ 0x180133947", "_handle_error @ 0x180133a67", "_handle_error @ 0x180133b26", "_handle_errorf @ 0x180133b8f", "_handle_errorf @ 0x180133c5a", "<???> @ 0x18020317c"], "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"}