{"type": "func", "start": 14789932, "end": 14791780, "name": "BN_mod_sqrt", "pseudocode": "// \n// BN_mod_sqrt from 0xe1ad2c to 0xe1b464 (1848 bytes)\n// \n// 2 xrefs:\n// > ec_GFp_simple_set_compressed_coordinates @ 0xd98758\n// > <???> @ 0xaf8d8\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\nunsigned __int64 *__fastcall BN_mod_sqrt(__int64 a1, __int64 a2, __int64 a3, int32x2_t *a4)\n{\n  int is_bit_set; // w0\n  __int64 v10; // x19\n  int v11; // w0\n  int is_one; // w0\n  unsigned __int64 *v13; // x19\n  __int64 *v14; // x28\n  __int64 **v15; // d9\n  __int64 v16; // x26\n  __int64 *v17; // x27\n  __int64 **v18; // d8\n  __int64 **v19; // x25\n  int i; // w22\n  int v21; // s10\n  unsigned __int64 v22; // x24\n  int v23; // w0\n  unsigned __int64 *v24; // x0\n  int v25; // w0\n  int v26; // w0\n  int v28; // w22\n  int v29; // w24\n\n  if ( (unsigned int)BN_is_odd(a3) && !(unsigned int)BN_abs_is_word(a3, 1) )\n  {\n    if ( BN_is_zero(a2) || (unsigned int)BN_is_one(a2) )\n    {\n      if ( a1 )\n      {\n        is_one = BN_is_one(a2);\n        if ( !(unsigned int)BN_set_word(a1, is_one) )\n          return nullptr;\n        return (unsigned __int64 *)a1;\n      }\n      v10 = BN_new();\n      if ( v10 )\n      {\n        v11 = BN_is_one(a2);\n        if ( (unsigned int)BN_set_word(v10, v11) )\n          return (unsigned __int64 *)v10;\n        goto LABEL_9;\n      }\n      goto LABEL_16;\n    }\n    BN_CTX_start((unsigned __int64)a4);\n    v14 = (__int64 *)BN_CTX_get(a4);\n    v15 = (__int64 **)BN_CTX_get(a4);\n    v16 = BN_CTX_get(a4);\n    v17 = (__int64 *)BN_CTX_get(a4);\n    v18 = (__int64 **)BN_CTX_get(a4);\n    v19 = (__int64 **)BN_CTX_get(a4);\n    if ( !v19 )\n      goto LABEL_16;\n    if ( a1 )\n    {\n      v13 = (unsigned __int64 *)a1;\n      if ( !(unsigned int)BN_nnmod((__int64)v14, a2, a3, a4) )\n        goto LABEL_16;\n    }\n    else\n    {\n      v13 = (unsigned __int64 *)BN_new();\n      if ( !v13 )\n        goto LABEL_16;\n      if ( !(unsigned int)BN_nnmod((__int64)v14, a2, a3, a4) )\n        goto LABEL_36;\n    }\n    for ( i = 1; !(unsigned int)BN_is_bit_set(a3, i); ++i )\n      ;\n    v21 = i;\n    if ( i == 1 )\n    {\n      if ( !(unsigned int)BN_rshift(v16, a3, 2) )\n        goto LABEL_35;\n      *(_DWORD *)(v16 + 16) = 0;\n      if ( !(unsigned int)BN_add_word(v16, 1u) || !(unsigned int)BN_mod_exp((__int64)v13, (__int64)v14, v16, a3, a4) )\n        goto LABEL_35;\n      goto LABEL_47;\n    }\n    if ( i == 2 )\n    {\n      if ( !(unsigned int)BN_mod_lshift1_quick(v17, v14, (__int64 *)a3) )\n        goto LABEL_35;\n      if ( !(unsigned int)BN_rshift(v16, a3, 3) )\n        goto LABEL_35;\n      *(_DWORD *)(v16 + 16) = 0;\n      if ( !(unsigned int)BN_mod_exp((__int64)v15, (__int64)v17, v16, a3, a4)\n        || !(unsigned int)BN_mod_sqr((__int64)v19, v15, a3, a4)\n        || !BN_mod_mul((__int64)v17, (__int64 **)v17, v19, a3, a4)\n        || !(unsigned int)BN_sub_word((__int64)v17, 1u)\n        || !BN_mod_mul((__int64)v18, (__int64 **)v14, v15, a3, a4)\n        || !BN_mod_mul((__int64)v18, v18, (__int64 **)v17, a3, a4) )\n      {\n        goto LABEL_35;\n      }\n      goto LABEL_46;\n    }\n    if ( !BN_copy((unsigned __int64 *)v16, a3) )\n      goto LABEL_35;\n    *(_DWORD *)(v16 + 16) = 0;\n    v22 = 2;\n    while ( 1 )\n    {\n      if ( v22 <= 0x15 )\n        goto LABEL_104;\n      v26 = BN_num_bits(a3);\n      if ( !(unsigned int)BN_pseudo_rand((__int64)v19, v26, 0, 0) )\n        goto LABEL_35;\n      if ( (BN_ucmp((__int64 *)v19, (__int64 *)a3) & 0x80000000) == 0\n        && !(*(_DWORD *)(a3 + 16)\n           ? (unsigned int)BN_add((__int64)v19, (__int64)v19, a3)\n           : BN_sub((__int64)v19, (__int64)v19, a3)) )\n      {\n        goto LABEL_35;\n      }\n      if ( BN_is_zero((__int64)v19) )\n      {\nLABEL_104:\n        if ( !(unsigned int)BN_set_word((__int64)v19, v22) )\n          goto LABEL_35;\n      }\n      v23 = BN_kronecker((__int64)v19, v16, a4);\n      if ( v23 < -1 )\n        goto LABEL_35;\n      if ( !v23 )\n      {\n        ERR_put_error(3, 121, 112, (__int64)\"crypto/bn/bn_sqrt.c\", 199);\n        goto LABEL_35;\n      }\n      if ( v23 != 1 )\n        break;\n      if ( ++v22 == 82 )\n        goto LABEL_57;\n    }\n    if ( v23 != -1 )\n    {\nLABEL_57:\n      ERR_put_error(3, 121, 113, (__int64)\"crypto/bn/bn_sqrt.c\", 211);\n      goto LABEL_35;\n    }\n    if ( !(unsigned int)BN_rshift(v16, v16, i) || !(unsigned int)BN_mod_exp((__int64)v19, (__int64)v19, v16, a3, a4) )\n      goto LABEL_35;\n    if ( (unsigned int)BN_is_one((__int64)v19) )\n    {\n      ERR_put_error(3, 121, 112, (__int64)\"crypto/bn/bn_sqrt.c\", 226);\n      goto LABEL_35;\n    }\n    if ( !(unsigned int)BN_rshift1((__int64)v17, v16) )\n      goto LABEL_35;\n    if ( BN_is_zero((__int64)v17) )\n    {\n      if ( !(unsigned int)BN_nnmod((__int64)v17, (__int64)v14, a3, a4) )\n        goto LABEL_35;\n      if ( !BN_is_zero((__int64)v17) )\n      {\n        if ( !(unsigned int)BN_set_word((__int64)v18, 1) )\n          goto LABEL_35;\nLABEL_78:\n        if ( !(unsigned int)BN_mod_sqr((__int64)v15, v18, a3, a4)\n          || !BN_mod_mul((__int64)v15, v15, (__int64 **)v14, a3, a4)\n          || !BN_mod_mul((__int64)v18, v18, (__int64 **)v14, a3, a4) )\n        {\n          goto LABEL_35;\n        }\n        while ( !(unsigned int)BN_is_one((__int64)v15) )\n        {\n          if ( !(unsigned int)BN_mod_sqr((__int64)v17, v15, a3, a4) )\n            goto LABEL_35;\n          v28 = 1;\n          while ( !(unsigned int)BN_is_one((__int64)v17) )\n          {\n            if ( ++v28 == v21 )\n            {\n              ERR_put_error(3, 121, 111, (__int64)\"crypto/bn/bn_sqrt.c\", 310);\n              goto LABEL_35;\n            }\n            if ( !BN_mod_mul((__int64)v17, (__int64 **)v17, (__int64 **)v17, a3, a4) )\n              goto LABEL_35;\n          }\n          if ( !BN_copy((unsigned __int64 *)v17, (__int64)v19) )\n            goto LABEL_35;\n          v29 = v21 - v28 - 1;\n          while ( v29-- > 0 )\n          {\n            if ( !(unsigned int)BN_mod_sqr((__int64)v17, (__int64 **)v17, a3, a4) )\n              goto LABEL_35;\n          }\n          if ( !BN_mod_mul((__int64)v19, (__int64 **)v17, (__int64 **)v17, a3, a4)\n            || !BN_mod_mul((__int64)v18, v18, (__int64 **)v17, a3, a4)\n            || !BN_mod_mul((__int64)v15, v15, v19, a3, a4) )\n          {\n            goto LABEL_35;\n          }\n          v21 = v28;\n        }\nLABEL_46:\n        if ( !BN_copy(v13, (__int64)v18) )\n          goto LABEL_35;\nLABEL_47:\n        if ( (unsigned int)BN_mod_sqr((__int64)v18, (__int64 **)v13, a3, a4) )\n        {\n          if ( !(unsigned int)BN_cmp((__int64 *)v18, v14) )\n            goto LABEL_17;\n          ERR_put_error(3, 121, 111, (__int64)\"crypto/bn/bn_sqrt.c\", 344);\n        }\nLABEL_35:\n        if ( (unsigned __int64 *)a1 != v13 )\n        {\nLABEL_36:\n          v24 = v13;\n          v13 = nullptr;\n          BN_clear_free(v24);\n          goto LABEL_17;\n        }\nLABEL_16:\n        v13 = nullptr;\nLABEL_17:\n        BN_CTX_end((__int64)a4);\n        return v13;\n      }\n    }\n    else\n    {\n      if ( !(unsigned int)BN_mod_exp((__int64)v18, (__int64)v14, (__int64)v17, a3, a4) )\n        goto LABEL_35;\n      if ( !BN_is_zero((__int64)v18) )\n        goto LABEL_78;\n    }\n    BN_set_word((__int64)v13, 0);\n    goto LABEL_17;\n  }\n  if ( !(unsigned int)BN_abs_is_word(a3, 2) )\n  {\n    ERR_put_error(3, 121, 112, (__int64)\"crypto/bn/bn_sqrt.c\", 41);\n    return nullptr;\n  }\n  if ( a1 )\n  {\n    is_bit_set = BN_is_bit_set(a2, 0);\n    if ( !(unsigned int)BN_set_word(a1, is_bit_set) )\n      return nullptr;\n    return (unsigned __int64 *)a1;\n  }\n  v10 = BN_new();\n  if ( !v10 )\n    goto LABEL_16;\n  v25 = BN_is_bit_set(a2, 0);\n  if ( !(unsigned int)BN_set_word(v10, v25) )\n  {\nLABEL_9:\n    BN_free(v10);\n    return (unsigned __int64 *)a1;\n  }\n  return (unsigned __int64 *)v10;\n}", "assembly": "; \n; BN_mod_sqrt from 0xe1ad2c to 0xe1b464 (1848 bytes)\n; \n; 2 xrefs:\n; > ec_GFp_simple_set_compressed_coordinates @ 0xd98758\n; > <???> @ 0xaf8d8\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             X29, X30, [SP,#var_80]!                                ; +0x0, 0xe1ad2c\nMOV             X29, SP                                                ; +0x4, 0xe1ad30\nSTP             X21, X22, [SP,#0x80+var_60]                            ; +0x8, 0xe1ad34\nSTP             D8, D9, [SP,#0x80+var_20]                              ; +0xc, 0xe1ad38\nMOV             X21, X0                                                ; +0x10, 0xe1ad3c\nMOV             X0, X2                                                 ; +0x14, 0xe1ad40\nSTP             X19, X20, [SP,#0x80+var_70]                            ; +0x18, 0xe1ad44\nSTP             X23, X24, [SP,#0x80+var_50]                            ; +0x1c, 0xe1ad48\nSTP             X25, X26, [SP,#0x80+var_40]                            ; +0x20, 0xe1ad4c\nSTP             X27, X28, [SP,#0x80+var_30]                            ; +0x24, 0xe1ad50\nSTR             D10, [SP,#0x80+var_10]                                 ; +0x28, 0xe1ad54\nMOV             X20, X2                                                ; +0x2c, 0xe1ad58\nMOV             X22, X1                                                ; +0x30, 0xe1ad5c\nMOV             X23, X3                                                ; +0x34, 0xe1ad60\nBL              BN_is_odd                                              ; +0x38, 0xe1ad64\nCBZ             W0, loc_E1AD7C                                         ; +0x3c, 0xe1ad68\nMOV             X0, X20                                                ; +0x40, 0xe1ad6c\nMOV             X1, #1                                                 ; +0x44, 0xe1ad70\nBL              BN_abs_is_word                                         ; +0x48, 0xe1ad74\nCBZ             W0, loc_E1AE08                                         ; +0x4c, 0xe1ad78\nMOV             X0, X20                                                ; +0x50, 0xe1ad7c\nMOV             X1, #2                                                 ; +0x54, 0xe1ad80\nBL              BN_abs_is_word                                         ; +0x58, 0xe1ad84\nCBZ             W0, loc_E1AF84                                         ; +0x5c, 0xe1ad88\nCBZ             X21, loc_E1AE38                                        ; +0x60, 0xe1ad8c\nMOV             W1, #0                                                 ; +0x64, 0xe1ad90\nMOV             X0, X22                                                ; +0x68, 0xe1ad94\nBL              BN_is_bit_set                                          ; +0x6c, 0xe1ad98\nSXTW            X1, W0                                                 ; +0x70, 0xe1ad9c\nMOV             X0, X21                                                ; +0x74, 0xe1ada0\nBL              BN_set_word                                            ; +0x78, 0xe1ada4\nCBNZ            W0, loc_E1ADE0                                         ; +0x7c, 0xe1ada8\nMOV             X0, #0                                                 ; +0x80, 0xe1adac\nB               loc_E1ADE4                                             ; +0x84, 0xe1adb0\nBL              BN_new                                                 ; +0x88, 0xe1adb4\nMOV             X19, X0                                                ; +0x8c, 0xe1adb8\nCBZ             X0, loc_E1AE44                                         ; +0x90, 0xe1adbc\nMOV             X0, X22                                                ; +0x94, 0xe1adc0\nBL              BN_is_one                                              ; +0x98, 0xe1adc4\nSXTW            X1, W0                                                 ; +0x9c, 0xe1adc8\nMOV             X0, X19                                                ; +0xa0, 0xe1adcc\nBL              BN_set_word                                            ; +0xa4, 0xe1add0\nCBNZ            W0, loc_E1B1F4                                         ; +0xa8, 0xe1add4\nMOV             X0, X19                                                ; +0xac, 0xe1add8\nBL              BN_free                                                ; +0xb0, 0xe1addc\nMOV             X0, X21                                                ; +0xb4, 0xe1ade0\nLDP             X19, X20, [SP,#0x80+var_70]                            ; +0xb8, 0xe1ade4\nLDP             D8, D9, [SP,#0x80+var_20]                              ; +0xbc, 0xe1ade8\nLDP             X21, X22, [SP,#0x80+var_60]                            ; +0xc0, 0xe1adec\nLDP             X23, X24, [SP,#0x80+var_50]                            ; +0xc4, 0xe1adf0\nLDP             X25, X26, [SP,#0x80+var_40]                            ; +0xc8, 0xe1adf4\nLDP             X27, X28, [SP,#0x80+var_30]                            ; +0xcc, 0xe1adf8\nLDR             D10, [SP,#0x80+var_10]                                 ; +0xd0, 0xe1adfc\nLDP             X29, X30, [SP+0x80+var_80],#0x80                       ; +0xd4, 0xe1ae00\nRET                                                                    ; +0xd8, 0xe1ae04\nMOV             X0, X22                                                ; +0xdc, 0xe1ae08\nBL              BN_is_zero                                             ; +0xe0, 0xe1ae0c\nCBZ             W0, loc_E1AE58                                         ; +0xe4, 0xe1ae10\nCBZ             X21, loc_E1ADB4                                        ; +0xe8, 0xe1ae14\nMOV             X0, X22                                                ; +0xec, 0xe1ae18\nBL              BN_is_one                                              ; +0xf0, 0xe1ae1c\nSXTW            X1, W0                                                 ; +0xf4, 0xe1ae20\nMOV             X0, X21                                                ; +0xf8, 0xe1ae24\nBL              BN_set_word                                            ; +0xfc, 0xe1ae28\nCBNZ            W0, loc_E1ADE0                                         ; +0x100, 0xe1ae2c\nMOV             X0, #0                                                 ; +0x104, 0xe1ae30\nB               loc_E1ADE4                                             ; +0x108, 0xe1ae34\nBL              BN_new                                                 ; +0x10c, 0xe1ae38\nMOV             X19, X0                                                ; +0x110, 0xe1ae3c\nCBNZ            X0, loc_E1B1D8                                         ; +0x114, 0xe1ae40\nMOV             X19, #0                                                ; +0x118, 0xe1ae44\nMOV             X0, X23                                                ; +0x11c, 0xe1ae48\nBL              BN_CTX_end                                             ; +0x120, 0xe1ae4c\nMOV             X0, X19                                                ; +0x124, 0xe1ae50\nB               loc_E1ADE4                                             ; +0x128, 0xe1ae54\nMOV             X0, X22                                                ; +0x12c, 0xe1ae58\nBL              BN_is_one                                              ; +0x130, 0xe1ae5c\nCBNZ            W0, loc_E1AE14                                         ; +0x134, 0xe1ae60\nMOV             X0, X23                                                ; +0x138, 0xe1ae64\nBL              BN_CTX_start                                           ; +0x13c, 0xe1ae68\nMOV             X0, X23                                                ; +0x140, 0xe1ae6c\nBL              BN_CTX_get                                             ; +0x144, 0xe1ae70\nMOV             X28, X0                                                ; +0x148, 0xe1ae74\nMOV             X0, X23                                                ; +0x14c, 0xe1ae78\nBL              BN_CTX_get                                             ; +0x150, 0xe1ae7c\nFMOV            D9, X0                                                 ; +0x154, 0xe1ae80\nMOV             X0, X23                                                ; +0x158, 0xe1ae84\nBL              BN_CTX_get                                             ; +0x15c, 0xe1ae88\nMOV             X26, X0                                                ; +0x160, 0xe1ae8c\nMOV             X0, X23                                                ; +0x164, 0xe1ae90\nBL              BN_CTX_get                                             ; +0x168, 0xe1ae94\nMOV             X27, X0                                                ; +0x16c, 0xe1ae98\nMOV             X0, X23                                                ; +0x170, 0xe1ae9c\nBL              BN_CTX_get                                             ; +0x174, 0xe1aea0\nFMOV            D8, X0                                                 ; +0x178, 0xe1aea4\nMOV             X0, X23                                                ; +0x17c, 0xe1aea8\nBL              BN_CTX_get                                             ; +0x180, 0xe1aeac\nMOV             X25, X0                                                ; +0x184, 0xe1aeb0\nCBZ             X0, loc_E1AE44                                         ; +0x188, 0xe1aeb4\nCBZ             X21, loc_E1B0C4                                        ; +0x18c, 0xe1aeb8\nMOV             X0, X28                                                ; +0x190, 0xe1aebc\nMOV             X1, X22                                                ; +0x194, 0xe1aec0\nMOV             X2, X20                                                ; +0x198, 0xe1aec4\nMOV             X3, X23                                                ; +0x19c, 0xe1aec8\nMOV             X19, X21                                               ; +0x1a0, 0xe1aecc\nBL              BN_nnmod                                               ; +0x1a4, 0xe1aed0\nCBZ             W0, loc_E1AE44                                         ; +0x1a8, 0xe1aed4\nMOV             W22, #1                                                ; +0x1ac, 0xe1aed8\nB               loc_E1AEE4                                             ; +0x1b0, 0xe1aedc\nADD             W22, W22, #1                                           ; +0x1b4, 0xe1aee0\nMOV             W1, W22                                                ; +0x1b8, 0xe1aee4\nMOV             X0, X20                                                ; +0x1bc, 0xe1aee8\nBL              BN_is_bit_set                                          ; +0x1c0, 0xe1aeec\nCBZ             W0, loc_E1AEE0                                         ; +0x1c4, 0xe1aef0\nCMP             W22, #1                                                ; +0x1c8, 0xe1aef4\nFMOV            S10, W22                                               ; +0x1cc, 0xe1aef8\nB.EQ            loc_E1B0EC                                             ; +0x1d0, 0xe1aefc\nCMP             W22, #2                                                ; +0x1d4, 0xe1af00\nB.EQ            loc_E1AFA8                                             ; +0x1d8, 0xe1af04\nMOV             X0, X26                                                ; +0x1dc, 0xe1af08\nMOV             X1, X20                                                ; +0x1e0, 0xe1af0c\nBL              BN_copy                                                ; +0x1e4, 0xe1af10\nCBZ             X0, loc_E1AF6C                                         ; +0x1e8, 0xe1af14\nSTR             WZR, [X26,#0x10]                                       ; +0x1ec, 0xe1af18\nMOV             X24, #2                                                ; +0x1f0, 0xe1af1c\nB               loc_E1AF54                                             ; +0x1f4, 0xe1af20\nMOV             X0, X25                                                ; +0x1f8, 0xe1af24\nMOV             X1, X26                                                ; +0x1fc, 0xe1af28\nMOV             X2, X23                                                ; +0x200, 0xe1af2c\nBL              BN_kronecker                                           ; +0x204, 0xe1af30\nCMN             W0, #1                                                 ; +0x208, 0xe1af34\nB.LT            loc_E1AF6C                                             ; +0x20c, 0xe1af38\nCBZ             W0, loc_E1B1B8                                         ; +0x210, 0xe1af3c\nCMP             W0, #1                                                 ; +0x214, 0xe1af40\nB.NE            loc_E1B154                                             ; +0x218, 0xe1af44\nADD             X24, X24, #1                                           ; +0x21c, 0xe1af48\nCMP             X24, #0x52 ; 'R'                                       ; +0x220, 0xe1af4c\nB.EQ            loc_E1B134                                             ; +0x224, 0xe1af50\nCMP             X24, #0x15                                             ; +0x228, 0xe1af54\nB.HI            loc_E1B1FC                                             ; +0x22c, 0xe1af58\nMOV             X0, X25                                                ; +0x230, 0xe1af5c\nMOV             X1, X24                                                ; +0x234, 0xe1af60\nBL              BN_set_word                                            ; +0x238, 0xe1af64\nCBNZ            W0, loc_E1AF24                                         ; +0x23c, 0xe1af68\nCMP             X21, X19                                               ; +0x240, 0xe1af6c\nB.EQ            loc_E1AE44                                             ; +0x244, 0xe1af70\nMOV             X0, X19                                                ; +0x248, 0xe1af74\nMOV             X19, #0                                                ; +0x24c, 0xe1af78\nBL              BN_clear_free                                          ; +0x250, 0xe1af7c\nB               loc_E1AE48                                             ; +0x254, 0xe1af80\nADRP            X3, #aCryptoBnBnSqrt@PAGE; \"crypto/bn/bn_sqrt.c\"       ; +0x258, 0xe1af84\nMOV             W0, #3                                                 ; +0x25c, 0xe1af88\nMOV             W1, #0x79 ; 'y'                                        ; +0x260, 0xe1af8c\nMOV             W2, #0x70 ; 'p'                                        ; +0x264, 0xe1af90\nADD             X3, X3, #aCryptoBnBnSqrt@PAGEOFF; \"crypto/bn/bn_sqrt.c\" ; +0x268, 0xe1af94\nMOV             W4, #0x29 ; ')'                                        ; +0x26c, 0xe1af98\nBL              ERR_put_error                                          ; +0x270, 0xe1af9c\nMOV             X0, #0                                                 ; +0x274, 0xe1afa0\nB               loc_E1ADE4                                             ; +0x278, 0xe1afa4\nMOV             X0, X27                                                ; +0x27c, 0xe1afa8\nMOV             X1, X28                                                ; +0x280, 0xe1afac\nMOV             X2, X20                                                ; +0x284, 0xe1afb0\nBL              BN_mod_lshift1_quick                                   ; +0x288, 0xe1afb4\nCBZ             W0, loc_E1AF6C                                         ; +0x28c, 0xe1afb8\nMOV             X0, X26                                                ; +0x290, 0xe1afbc\nMOV             X1, X20                                                ; +0x294, 0xe1afc0\nMOV             W2, #3                                                 ; +0x298, 0xe1afc4\nBL              BN_rshift                                              ; +0x29c, 0xe1afc8\nCBZ             W0, loc_E1AF6C                                         ; +0x2a0, 0xe1afcc\nFMOV            X0, D9                                                 ; +0x2a4, 0xe1afd0\nSTR             WZR, [X26,#0x10]                                       ; +0x2a8, 0xe1afd4\nMOV             X1, X27                                                ; +0x2ac, 0xe1afd8\nMOV             X2, X26                                                ; +0x2b0, 0xe1afdc\nMOV             X3, X20                                                ; +0x2b4, 0xe1afe0\nMOV             X4, X23                                                ; +0x2b8, 0xe1afe4\nBL              BN_mod_exp                                             ; +0x2bc, 0xe1afe8\nCBZ             W0, loc_E1AF6C                                         ; +0x2c0, 0xe1afec\nFMOV            X1, D9                                                 ; +0x2c4, 0xe1aff0\nMOV             X0, X25                                                ; +0x2c8, 0xe1aff4\nMOV             X2, X20                                                ; +0x2cc, 0xe1aff8\nMOV             X3, X23                                                ; +0x2d0, 0xe1affc\nBL              BN_mod_sqr                                             ; +0x2d4, 0xe1b000\nCBZ             W0, loc_E1AF6C                                         ; +0x2d8, 0xe1b004\nMOV             X0, X27                                                ; +0x2dc, 0xe1b008\nMOV             X1, X27                                                ; +0x2e0, 0xe1b00c\nMOV             X2, X25                                                ; +0x2e4, 0xe1b010\nMOV             X3, X20                                                ; +0x2e8, 0xe1b014\nMOV             X4, X23                                                ; +0x2ec, 0xe1b018\nBL              BN_mod_mul                                             ; +0x2f0, 0xe1b01c\nCBZ             W0, loc_E1AF6C                                         ; +0x2f4, 0xe1b020\nMOV             X0, X27                                                ; +0x2f8, 0xe1b024\nMOV             X1, #1                                                 ; +0x2fc, 0xe1b028\nBL              BN_sub_word                                            ; +0x300, 0xe1b02c\nCBZ             W0, loc_E1AF6C                                         ; +0x304, 0xe1b030\nFMOV            X0, D8                                                 ; +0x308, 0xe1b034\nMOV             X1, X28                                                ; +0x30c, 0xe1b038\nFMOV            X2, D9                                                 ; +0x310, 0xe1b03c\nMOV             X3, X20                                                ; +0x314, 0xe1b040\nMOV             X4, X23                                                ; +0x318, 0xe1b044\nBL              BN_mod_mul                                             ; +0x31c, 0xe1b048\nCBZ             W0, loc_E1AF6C                                         ; +0x320, 0xe1b04c\nFMOV            X1, D8                                                 ; +0x324, 0xe1b050\nMOV             X2, X27                                                ; +0x328, 0xe1b054\nFMOV            X0, D8                                                 ; +0x32c, 0xe1b058\nMOV             X3, X20                                                ; +0x330, 0xe1b05c\nMOV             X4, X23                                                ; +0x334, 0xe1b060\nBL              BN_mod_mul                                             ; +0x338, 0xe1b064\nCBZ             W0, loc_E1AF6C                                         ; +0x33c, 0xe1b068\nFMOV            X1, D8                                                 ; +0x340, 0xe1b06c\nMOV             X0, X19                                                ; +0x344, 0xe1b070\nBL              BN_copy                                                ; +0x348, 0xe1b074\nCBZ             X0, loc_E1AF6C                                         ; +0x34c, 0xe1b078\nFMOV            X0, D8                                                 ; +0x350, 0xe1b07c\nMOV             X1, X19                                                ; +0x354, 0xe1b080\nMOV             X2, X20                                                ; +0x358, 0xe1b084\nMOV             X3, X23                                                ; +0x35c, 0xe1b088\nBL              BN_mod_sqr                                             ; +0x360, 0xe1b08c\nCBZ             W0, loc_E1AF6C                                         ; +0x364, 0xe1b090\nFMOV            X0, D8                                                 ; +0x368, 0xe1b094\nMOV             X1, X28                                                ; +0x36c, 0xe1b098\nBL              BN_cmp                                                 ; +0x370, 0xe1b09c\nCBZ             W0, loc_E1AE48                                         ; +0x374, 0xe1b0a0\nADRP            X3, #aCryptoBnBnSqrt@PAGE; \"crypto/bn/bn_sqrt.c\"       ; +0x378, 0xe1b0a4\nMOV             W0, #3                                                 ; +0x37c, 0xe1b0a8\nMOV             W1, #0x79 ; 'y'                                        ; +0x380, 0xe1b0ac\nMOV             W2, #0x6F ; 'o'                                        ; +0x384, 0xe1b0b0\nADD             X3, X3, #aCryptoBnBnSqrt@PAGEOFF; \"crypto/bn/bn_sqrt.c\" ; +0x388, 0xe1b0b4\nMOV             W4, #0x158                                             ; +0x38c, 0xe1b0b8\nBL              ERR_put_error                                          ; +0x390, 0xe1b0bc\nB               loc_E1AF6C                                             ; +0x394, 0xe1b0c0\nBL              BN_new                                                 ; +0x398, 0xe1b0c4\nMOV             X19, X0                                                ; +0x39c, 0xe1b0c8\nCBZ             X0, loc_E1AE44                                         ; +0x3a0, 0xe1b0cc\nMOV             X0, X28                                                ; +0x3a4, 0xe1b0d0\nMOV             X1, X22                                                ; +0x3a8, 0xe1b0d4\nMOV             X2, X20                                                ; +0x3ac, 0xe1b0d8\nMOV             X3, X23                                                ; +0x3b0, 0xe1b0dc\nBL              BN_nnmod                                               ; +0x3b4, 0xe1b0e0\nCBZ             W0, loc_E1AF74                                         ; +0x3b8, 0xe1b0e4\nB               loc_E1AED8                                             ; +0x3bc, 0xe1b0e8\nMOV             X0, X26                                                ; +0x3c0, 0xe1b0ec\nMOV             X1, X20                                                ; +0x3c4, 0xe1b0f0\nMOV             W2, #2                                                 ; +0x3c8, 0xe1b0f4\nBL              BN_rshift                                              ; +0x3cc, 0xe1b0f8\nCBZ             W0, loc_E1AF6C                                         ; +0x3d0, 0xe1b0fc\nSTR             WZR, [X26,#0x10]                                       ; +0x3d4, 0xe1b100\nMOV             X0, X26                                                ; +0x3d8, 0xe1b104\nMOV             X1, #1                                                 ; +0x3dc, 0xe1b108\nBL              BN_add_word                                            ; +0x3e0, 0xe1b10c\nCBZ             W0, loc_E1AF6C                                         ; +0x3e4, 0xe1b110\nMOV             X0, X19                                                ; +0x3e8, 0xe1b114\nMOV             X1, X28                                                ; +0x3ec, 0xe1b118\nMOV             X2, X26                                                ; +0x3f0, 0xe1b11c\nMOV             X3, X20                                                ; +0x3f4, 0xe1b120\nMOV             X4, X23                                                ; +0x3f8, 0xe1b124\nBL              BN_mod_exp                                             ; +0x3fc, 0xe1b128\nCBZ             W0, loc_E1AF6C                                         ; +0x400, 0xe1b12c\nB               loc_E1B07C                                             ; +0x404, 0xe1b130\nADRP            X3, #aCryptoBnBnSqrt@PAGE; \"crypto/bn/bn_sqrt.c\"       ; +0x408, 0xe1b134\nMOV             W0, #3                                                 ; +0x40c, 0xe1b138\nMOV             W1, #0x79 ; 'y'                                        ; +0x410, 0xe1b13c\nMOV             W2, #0x71 ; 'q'                                        ; +0x414, 0xe1b140\nADD             X3, X3, #aCryptoBnBnSqrt@PAGEOFF; \"crypto/bn/bn_sqrt.c\" ; +0x418, 0xe1b144\nMOV             W4, #0xD3                                              ; +0x41c, 0xe1b148\nBL              ERR_put_error                                          ; +0x420, 0xe1b14c\nB               loc_E1AF6C                                             ; +0x424, 0xe1b150\nCMN             W0, #1                                                 ; +0x428, 0xe1b154\nB.NE            loc_E1B134                                             ; +0x42c, 0xe1b158\nMOV             X0, X26                                                ; +0x430, 0xe1b15c\nMOV             X1, X26                                                ; +0x434, 0xe1b160\nMOV             W2, W22                                                ; +0x438, 0xe1b164\nBL              BN_rshift                                              ; +0x43c, 0xe1b168\nCBZ             W0, loc_E1AF6C                                         ; +0x440, 0xe1b16c\nMOV             X0, X25                                                ; +0x444, 0xe1b170\nMOV             X1, X25                                                ; +0x448, 0xe1b174\nMOV             X2, X26                                                ; +0x44c, 0xe1b178\nMOV             X3, X20                                                ; +0x450, 0xe1b17c\nMOV             X4, X23                                                ; +0x454, 0xe1b180\nBL              BN_mod_exp                                             ; +0x458, 0xe1b184\nCBZ             W0, loc_E1AF6C                                         ; +0x45c, 0xe1b188\nMOV             X0, X25                                                ; +0x460, 0xe1b18c\nBL              BN_is_one                                              ; +0x464, 0xe1b190\nCBZ             W0, loc_E1B260                                         ; +0x468, 0xe1b194\nADRP            X3, #aCryptoBnBnSqrt@PAGE; \"crypto/bn/bn_sqrt.c\"       ; +0x46c, 0xe1b198\nMOV             W0, #3                                                 ; +0x470, 0xe1b19c\nMOV             W1, #0x79 ; 'y'                                        ; +0x474, 0xe1b1a0\nMOV             W2, #0x70 ; 'p'                                        ; +0x478, 0xe1b1a4\nADD             X3, X3, #aCryptoBnBnSqrt@PAGEOFF; \"crypto/bn/bn_sqrt.c\" ; +0x47c, 0xe1b1a8\nMOV             W4, #0xE2                                              ; +0x480, 0xe1b1ac\nBL              ERR_put_error                                          ; +0x484, 0xe1b1b0\nB               loc_E1AF6C                                             ; +0x488, 0xe1b1b4\nADRP            X3, #aCryptoBnBnSqrt@PAGE; \"crypto/bn/bn_sqrt.c\"       ; +0x48c, 0xe1b1b8\nMOV             W0, #3                                                 ; +0x490, 0xe1b1bc\nMOV             W1, #0x79 ; 'y'                                        ; +0x494, 0xe1b1c0\nMOV             W2, #0x70 ; 'p'                                        ; +0x498, 0xe1b1c4\nADD             X3, X3, #aCryptoBnBnSqrt@PAGEOFF; \"crypto/bn/bn_sqrt.c\" ; +0x49c, 0xe1b1c8\nMOV             W4, #0xC7                                              ; +0x4a0, 0xe1b1cc\nBL              ERR_put_error                                          ; +0x4a4, 0xe1b1d0\nB               loc_E1AF6C                                             ; +0x4a8, 0xe1b1d4\nMOV             W1, W21                                                ; +0x4ac, 0xe1b1d8\nMOV             X0, X22                                                ; +0x4b0, 0xe1b1dc\nBL              BN_is_bit_set                                          ; +0x4b4, 0xe1b1e0\nSXTW            X1, W0                                                 ; +0x4b8, 0xe1b1e4\nMOV             X0, X19                                                ; +0x4bc, 0xe1b1e8\nBL              BN_set_word                                            ; +0x4c0, 0xe1b1ec\nCBZ             W0, loc_E1ADD8                                         ; +0x4c4, 0xe1b1f0\nMOV             X0, X19                                                ; +0x4c8, 0xe1b1f4\nB               loc_E1ADE4                                             ; +0x4cc, 0xe1b1f8\nMOV             X0, X20                                                ; +0x4d0, 0xe1b1fc\nBL              BN_num_bits                                            ; +0x4d4, 0xe1b200\nMOV             W1, W0                                                 ; +0x4d8, 0xe1b204\nMOV             W2, #0                                                 ; +0x4dc, 0xe1b208\nMOV             X0, X25                                                ; +0x4e0, 0xe1b20c\nMOV             W3, W2                                                 ; +0x4e4, 0xe1b210\nBL              BN_pseudo_rand                                         ; +0x4e8, 0xe1b214\nCBZ             W0, loc_E1AF6C                                         ; +0x4ec, 0xe1b218\nMOV             X0, X25                                                ; +0x4f0, 0xe1b21c\nMOV             X1, X20                                                ; +0x4f4, 0xe1b220\nBL              BN_ucmp                                                ; +0x4f8, 0xe1b224\nTBNZ            W0, #0x1F, loc_E1B250                                  ; +0x4fc, 0xe1b228\nLDR             W0, [X20,#0x10]                                        ; +0x500, 0xe1b22c\nCBNZ            W0, loc_E1B364                                         ; +0x504, 0xe1b230\nADRP            X0, #BN_sub_ptr@PAGE                                   ; +0x508, 0xe1b234\nLDR             X3, [X0,#BN_sub_ptr@PAGEOFF]; BN_sub                   ; +0x50c, 0xe1b238\nMOV             X0, X25                                                ; +0x510, 0xe1b23c\nMOV             X1, X25                                                ; +0x514, 0xe1b240\nMOV             X2, X20                                                ; +0x518, 0xe1b244\nBLR             X3 ; BN_add BN_sub                                     ; +0x51c, 0xe1b248\nCBZ             W0, loc_E1AF6C                                         ; +0x520, 0xe1b24c\nMOV             X0, X25                                                ; +0x524, 0xe1b250\nBL              BN_is_zero                                             ; +0x528, 0xe1b254\nCBZ             W0, loc_E1AF24                                         ; +0x52c, 0xe1b258\nB               loc_E1AF5C                                             ; +0x530, 0xe1b25c\nMOV             X0, X27                                                ; +0x534, 0xe1b260\nMOV             X1, X26                                                ; +0x538, 0xe1b264\nBL              BN_rshift1                                             ; +0x53c, 0xe1b268\nCBZ             W0, loc_E1AF6C                                         ; +0x540, 0xe1b26c\nMOV             X0, X27                                                ; +0x544, 0xe1b270\nBL              BN_is_zero                                             ; +0x548, 0xe1b274\nCBZ             W0, loc_E1B3D4                                         ; +0x54c, 0xe1b278\nMOV             X0, X27                                                ; +0x550, 0xe1b27c\nMOV             X1, X28                                                ; +0x554, 0xe1b280\nMOV             X2, X20                                                ; +0x558, 0xe1b284\nMOV             X3, X23                                                ; +0x55c, 0xe1b288\nBL              BN_nnmod                                               ; +0x560, 0xe1b28c\nCBZ             W0, loc_E1AF6C                                         ; +0x564, 0xe1b290\nMOV             X0, X27                                                ; +0x568, 0xe1b294\nBL              BN_is_zero                                             ; +0x56c, 0xe1b298\nCBNZ            W0, loc_E1B3FC                                         ; +0x570, 0xe1b29c\nFMOV            X0, D8                                                 ; +0x574, 0xe1b2a0\nMOV             X1, #1                                                 ; +0x578, 0xe1b2a4\nBL              BN_set_word                                            ; +0x57c, 0xe1b2a8\nCBZ             W0, loc_E1AF6C                                         ; +0x580, 0xe1b2ac\nFMOV            X0, D9                                                 ; +0x584, 0xe1b2b0\nMOV             X2, X20                                                ; +0x588, 0xe1b2b4\nFMOV            X1, D8                                                 ; +0x58c, 0xe1b2b8\nMOV             X3, X23                                                ; +0x590, 0xe1b2bc\nBL              BN_mod_sqr                                             ; +0x594, 0xe1b2c0\nCBZ             W0, loc_E1AF6C                                         ; +0x598, 0xe1b2c4\nFMOV            X1, D9                                                 ; +0x59c, 0xe1b2c8\nMOV             X2, X28                                                ; +0x5a0, 0xe1b2cc\nFMOV            X0, D9                                                 ; +0x5a4, 0xe1b2d0\nMOV             X3, X20                                                ; +0x5a8, 0xe1b2d4\nMOV             X4, X23                                                ; +0x5ac, 0xe1b2d8\nBL              BN_mod_mul                                             ; +0x5b0, 0xe1b2dc\nCBZ             W0, loc_E1AF6C                                         ; +0x5b4, 0xe1b2e0\nFMOV            X1, D8                                                 ; +0x5b8, 0xe1b2e4\nMOV             X2, X28                                                ; +0x5bc, 0xe1b2e8\nFMOV            X0, D8                                                 ; +0x5c0, 0xe1b2ec\nMOV             X3, X20                                                ; +0x5c4, 0xe1b2f0\nMOV             X4, X23                                                ; +0x5c8, 0xe1b2f4\nBL              BN_mod_mul                                             ; +0x5cc, 0xe1b2f8\nCBZ             W0, loc_E1AF6C                                         ; +0x5d0, 0xe1b2fc\nFMOV            X0, D9                                                 ; +0x5d4, 0xe1b300\nBL              BN_is_one                                              ; +0x5d8, 0xe1b304\nCBNZ            W0, loc_E1B06C                                         ; +0x5dc, 0xe1b308\nFMOV            X1, D9                                                 ; +0x5e0, 0xe1b30c\nMOV             X0, X27                                                ; +0x5e4, 0xe1b310\nMOV             X2, X20                                                ; +0x5e8, 0xe1b314\nMOV             X3, X23                                                ; +0x5ec, 0xe1b318\nBL              BN_mod_sqr                                             ; +0x5f0, 0xe1b31c\nCBZ             W0, loc_E1AF6C                                         ; +0x5f4, 0xe1b320\nMOV             W22, #1                                                ; +0x5f8, 0xe1b324\nMOV             X0, X27                                                ; +0x5fc, 0xe1b328\nBL              BN_is_one                                              ; +0x600, 0xe1b32c\nMOV             X1, X27                                                ; +0x604, 0xe1b330\nMOV             X2, X27                                                ; +0x608, 0xe1b334\nMOV             X3, X20                                                ; +0x60c, 0xe1b338\nMOV             X4, X23                                                ; +0x610, 0xe1b33c\nCBNZ            W0, loc_E1B390                                         ; +0x614, 0xe1b340\nFMOV            W5, S10                                                ; +0x618, 0xe1b344\nADD             W22, W22, #1                                           ; +0x61c, 0xe1b348\nMOV             X0, X27                                                ; +0x620, 0xe1b34c\nCMP             W22, W5                                                ; +0x624, 0xe1b350\nB.EQ            loc_E1B370                                             ; +0x628, 0xe1b354\nBL              BN_mod_mul                                             ; +0x62c, 0xe1b358\nCBNZ            W0, loc_E1B328                                         ; +0x630, 0xe1b35c\nB               loc_E1AF6C                                             ; +0x634, 0xe1b360\nADRP            X0, #BN_add_ptr@PAGE                                   ; +0x638, 0xe1b364\nLDR             X3, [X0,#BN_add_ptr@PAGEOFF]; BN_add                   ; +0x63c, 0xe1b368\nB               loc_E1B23C                                             ; +0x640, 0xe1b36c\nADRP            X3, #aCryptoBnBnSqrt@PAGE; \"crypto/bn/bn_sqrt.c\"       ; +0x644, 0xe1b370\nMOV             W0, #3                                                 ; +0x648, 0xe1b374\nMOV             W1, #0x79 ; 'y'                                        ; +0x64c, 0xe1b378\nMOV             W2, #0x6F ; 'o'                                        ; +0x650, 0xe1b37c\nADD             X3, X3, #aCryptoBnBnSqrt@PAGEOFF; \"crypto/bn/bn_sqrt.c\" ; +0x654, 0xe1b380\nMOV             W4, #0x136                                             ; +0x658, 0xe1b384\nBL              ERR_put_error                                          ; +0x65c, 0xe1b388\nB               loc_E1AF6C                                             ; +0x660, 0xe1b38c\nMOV             X0, X27                                                ; +0x664, 0xe1b390\nMOV             X1, X25                                                ; +0x668, 0xe1b394\nBL              BN_copy                                                ; +0x66c, 0xe1b398\nCBZ             X0, loc_E1AF6C                                         ; +0x670, 0xe1b39c\nFMOV            W0, S10                                                ; +0x674, 0xe1b3a0\nSUB             W24, W0, W22                                           ; +0x678, 0xe1b3a4\nSUB             W24, W24, #1                                           ; +0x67c, 0xe1b3a8\nCMP             W24, WZR                                               ; +0x680, 0xe1b3ac\nMOV             X0, X27                                                ; +0x684, 0xe1b3b0\nMOV             X1, X27                                                ; +0x688, 0xe1b3b4\nMOV             X2, X20                                                ; +0x68c, 0xe1b3b8\nMOV             X3, X23                                                ; +0x690, 0xe1b3bc\nSUB             W24, W24, #1                                           ; +0x694, 0xe1b3c0\nB.LE            loc_E1B40C                                             ; +0x698, 0xe1b3c4\nBL              BN_mod_sqr                                             ; +0x69c, 0xe1b3c8\nCBNZ            W0, loc_E1B3AC                                         ; +0x6a0, 0xe1b3cc\nB               loc_E1AF6C                                             ; +0x6a4, 0xe1b3d0\nFMOV            X0, D8                                                 ; +0x6a8, 0xe1b3d4\nMOV             X1, X28                                                ; +0x6ac, 0xe1b3d8\nMOV             X2, X27                                                ; +0x6b0, 0xe1b3dc\nMOV             X3, X20                                                ; +0x6b4, 0xe1b3e0\nMOV             X4, X23                                                ; +0x6b8, 0xe1b3e4\nBL              BN_mod_exp                                             ; +0x6bc, 0xe1b3e8\nCBZ             W0, loc_E1AF6C                                         ; +0x6c0, 0xe1b3ec\nFMOV            X0, D8                                                 ; +0x6c4, 0xe1b3f0\nBL              BN_is_zero                                             ; +0x6c8, 0xe1b3f4\nCBZ             W0, loc_E1B2B0                                         ; +0x6cc, 0xe1b3f8\nMOV             X0, X19                                                ; +0x6d0, 0xe1b3fc\nMOV             X1, #0                                                 ; +0x6d4, 0xe1b400\nBL              BN_set_word                                            ; +0x6d8, 0xe1b404\nB               loc_E1AE48                                             ; +0x6dc, 0xe1b408\nMOV             X0, X25                                                ; +0x6e0, 0xe1b40c\nMOV             X2, X27                                                ; +0x6e4, 0xe1b410\nMOV             X3, X20                                                ; +0x6e8, 0xe1b414\nMOV             X4, X23                                                ; +0x6ec, 0xe1b418\nBL              BN_mod_mul                                             ; +0x6f0, 0xe1b41c\nCBZ             W0, loc_E1AF6C                                         ; +0x6f4, 0xe1b420\nFMOV            X1, D8                                                 ; +0x6f8, 0xe1b424\nMOV             X2, X27                                                ; +0x6fc, 0xe1b428\nFMOV            X0, D8                                                 ; +0x700, 0xe1b42c\nMOV             X3, X20                                                ; +0x704, 0xe1b430\nMOV             X4, X23                                                ; +0x708, 0xe1b434\nBL              BN_mod_mul                                             ; +0x70c, 0xe1b438\nCBZ             W0, loc_E1AF6C                                         ; +0x710, 0xe1b43c\nFMOV            X1, D9                                                 ; +0x714, 0xe1b440\nMOV             X2, X25                                                ; +0x718, 0xe1b444\nFMOV            X0, D9                                                 ; +0x71c, 0xe1b448\nMOV             X3, X20                                                ; +0x720, 0xe1b44c\nMOV             X4, X23                                                ; +0x724, 0xe1b450\nBL              BN_mod_mul                                             ; +0x728, 0xe1b454\nCBZ             W0, loc_E1AF6C                                         ; +0x72c, 0xe1b458\nFMOV            S10, W22                                               ; +0x730, 0xe1b45c\nB               loc_E1B300                                             ; +0x734, 0xe1b460", "xrefs": ["ec_GFp_simple_set_compressed_coordinates @ 0xd98758", "<???> @ 0xaf8d8"], "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"}