
int montgomery_setup(void *a,void **b)

{
  int iVar1;
  void *pvVar2;
  bool bVar3;
  
  if (a == (void *)0x0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("a != NULL","src/math/ltm_desc.c",0x165);
  }
  if (b != (void **)0x0) {
    pvVar2 = calloc(1,8);
    *b = pvVar2;
    if (pvVar2 != (void *)0x0) {
      iVar1 = mp_montgomery_setup(a,pvVar2);
      if (iVar1 != 0) {
        if (iVar1 == -2) {
          iVar1 = 0xd;
        }
        else {
          bVar3 = iVar1 != -3;
          iVar1 = 0x10;
          if (bVar3) {
            iVar1 = 1;
          }
        }
        free(*b);
      }
      return iVar1;
    }
    return 0xd;
  }
                    /* WARNING: Subroutine does not return */
  crypt_argchk("b != NULL","src/math/ltm_desc.c",0x166);
}



ulong FUN_00161120(long param_1,undefined8 *param_2)

{
  int iVar1;
  uint uVar2;
  void *pvVar3;
  ulong uVar4;
  
  if (param_1 == 0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("a != NULL","src/math/ltm_desc.c",0x165);
  }
  if (param_2 != (undefined8 *)0x0) {
    pvVar3 = calloc(1,8);
    *param_2 = pvVar3;
    if (pvVar3 != (void *)0x0) {
      uVar4 = mp_montgomery_setup(param_1,pvVar3);
      iVar1 = (int)uVar4;
      if (iVar1 != 0) {
        if (iVar1 == -2) {
          uVar2 = 0xd;
        }
        else {
          uVar2 = 0x10;
          if (iVar1 != -3) {
            uVar2 = 1;
          }
        }
        free((void *)*param_2);
        uVar4 = (ulong)uVar2;
      }
      return uVar4;
    }
    return 0xd;
  }
                    /* WARNING: Subroutine does not return */
  crypt_argchk("b != NULL","src/math/ltm_desc.c",0x166);
}


PUSH RBP
PUSH RBX
SUB RSP,0x18
TEST RDI,RDI
JZ 0x001611bf
MOV RBX,RSI
TEST RSI,RSI
JZ 0x001611a7
MOV RBP,RDI
MOV ESI,0x8
MOV EDI,0x1
CALL 0x00113d60
MOV qword ptr [RBX],RAX
TEST RAX,RAX
JZ 0x00161190
MOV RSI,RAX
MOV RDI,RBP
CALL 0x00113350
TEST EAX,EAX
JZ 0x00161185
CMP EAX,-0x2
JZ 0x001611a0
CMP EAX,-0x3
MOV EDX,0x1
MOV EAX,0x10
CMOVNZ EAX,EDX
MOV RDI,qword ptr [RBX]
MOV dword ptr [RSP + 0xc],EAX
CALL 0x00113130
MOV EAX,dword ptr [RSP + 0xc]
ADD RSP,0x18
POP RBX
POP RBP
RET
ADD RSP,0x18
MOV EAX,0xd
POP RBX
POP RBP
RET
MOV EAX,0xd
JMP 0x00161175
MOV EDX,0x166
LEA RSI,[0x1bdba1]
LEA RDI,[0x1c07ee]
CALL 0x00114270
MOV EDX,0x165
LEA RSI,[0x1bdba1]
LEA RDI,[0x1aa70e]
CALL 0x00114270
(translation_unit "ulong FUN_00161120(long param_1,undefined8 *param_2)\n\n{\n  int iVar1;\n  uint uVar2;\n  void *pvVar3;\n  ulong uVar4;\n  \n  if (param_1 == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("a != NULL","src/math/ltm_desc.c",0x165);\n  }\n  if (param_2 != (undefined8 *)0x0) {\n    pvVar3 = calloc(1,8);\n    *param_2 = pvVar3;\n    if (pvVar3 != (void *)0x0) {\n      uVar4 = mp_montgomery_setup(param_1,pvVar3);\n      iVar1 = (int)uVar4;\n      if (iVar1 != 0) {\n        if (iVar1 == -2) {\n          uVar2 = 0xd;\n        }\n        else {\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }\n        free((void *)*param_2);\n        uVar4 = (ulong)uVar2;\n      }\n      return uVar4;\n    }\n    return 0xd;\n  }\n                    /* WARNING: Subroutine does not return */\n  crypt_argchk("b != NULL","src/math/ltm_desc.c",0x166);\n}\n\n" (function_definition "ulong FUN_00161120(long param_1,undefined8 *param_2)\n\n{\n  int iVar1;\n  uint uVar2;\n  void *pvVar3;\n  ulong uVar4;\n  \n  if (param_1 == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("a != NULL","src/math/ltm_desc.c",0x165);\n  }\n  if (param_2 != (undefined8 *)0x0) {\n    pvVar3 = calloc(1,8);\n    *param_2 = pvVar3;\n    if (pvVar3 != (void *)0x0) {\n      uVar4 = mp_montgomery_setup(param_1,pvVar3);\n      iVar1 = (int)uVar4;\n      if (iVar1 != 0) {\n        if (iVar1 == -2) {\n          uVar2 = 0xd;\n        }\n        else {\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }\n        free((void *)*param_2);\n        uVar4 = (ulong)uVar2;\n      }\n      return uVar4;\n    }\n    return 0xd;\n  }\n                    /* WARNING: Subroutine does not return */\n  crypt_argchk("b != NULL","src/math/ltm_desc.c",0x166);\n}" type_identifier (function_declarator "FUN_00161120(long param_1,undefined8 *param_2)" identifier (parameter_list "(long param_1,undefined8 *param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined8 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  void *pvVar3;\n  ulong uVar4;\n  \n  if (param_1 == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("a != NULL","src/math/ltm_desc.c",0x165);\n  }\n  if (param_2 != (undefined8 *)0x0) {\n    pvVar3 = calloc(1,8);\n    *param_2 = pvVar3;\n    if (pvVar3 != (void *)0x0) {\n      uVar4 = mp_montgomery_setup(param_1,pvVar3);\n      iVar1 = (int)uVar4;\n      if (iVar1 != 0) {\n        if (iVar1 == -2) {\n          uVar2 = 0xd;\n        }\n        else {\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }\n        free((void *)*param_2);\n        uVar4 = (ulong)uVar2;\n      }\n      return uVar4;\n    }\n    return 0xd;\n  }\n                    /* WARNING: Subroutine does not return */\n  crypt_argchk("b != NULL","src/math/ltm_desc.c",0x166);\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "void *pvVar3;" primitive_type (pointer_declarator "*pvVar3" * identifier) ;) (declaration "ulong uVar4;" type_identifier identifier ;) (if_statement "if (param_1 == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("a != NULL","src/math/ltm_desc.c",0x165);\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("a != NULL","src/math/ltm_desc.c",0x165);\n  }" { comment (expression_statement "crypt_argchk("a != NULL","src/math/ltm_desc.c",0x165);" (call_expression "crypt_argchk("a != NULL","src/math/ltm_desc.c",0x165)" identifier (argument_list "("a != NULL","src/math/ltm_desc.c",0x165)" ( (string_literal ""a != NULL"" " string_content ") , (string_literal ""src/math/ltm_desc.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (param_2 != (undefined8 *)0x0) {\n    pvVar3 = calloc(1,8);\n    *param_2 = pvVar3;\n    if (pvVar3 != (void *)0x0) {\n      uVar4 = mp_montgomery_setup(param_1,pvVar3);\n      iVar1 = (int)uVar4;\n      if (iVar1 != 0) {\n        if (iVar1 == -2) {\n          uVar2 = 0xd;\n        }\n        else {\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }\n        free((void *)*param_2);\n        uVar4 = (ulong)uVar2;\n      }\n      return uVar4;\n    }\n    return 0xd;\n  }" if (parenthesized_expression "(param_2 != (undefined8 *)0x0)" ( (binary_expression "param_2 != (undefined8 *)0x0" identifier != (cast_expression "(undefined8 *)0x0" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pvVar3 = calloc(1,8);\n    *param_2 = pvVar3;\n    if (pvVar3 != (void *)0x0) {\n      uVar4 = mp_montgomery_setup(param_1,pvVar3);\n      iVar1 = (int)uVar4;\n      if (iVar1 != 0) {\n        if (iVar1 == -2) {\n          uVar2 = 0xd;\n        }\n        else {\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }\n        free((void *)*param_2);\n        uVar4 = (ulong)uVar2;\n      }\n      return uVar4;\n    }\n    return 0xd;\n  }" { (expression_statement "pvVar3 = calloc(1,8);" (assignment_expression "pvVar3 = calloc(1,8)" identifier = (call_expression "calloc(1,8)" identifier (argument_list "(1,8)" ( number_literal , number_literal )))) ;) (expression_statement "*param_2 = pvVar3;" (assignment_expression "*param_2 = pvVar3" (pointer_expression "*param_2" * identifier) = identifier) ;) (if_statement "if (pvVar3 != (void *)0x0) {\n      uVar4 = mp_montgomery_setup(param_1,pvVar3);\n      iVar1 = (int)uVar4;\n      if (iVar1 != 0) {\n        if (iVar1 == -2) {\n          uVar2 = 0xd;\n        }\n        else {\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }\n        free((void *)*param_2);\n        uVar4 = (ulong)uVar2;\n      }\n      return uVar4;\n    }" if (parenthesized_expression "(pvVar3 != (void *)0x0)" ( (binary_expression "pvVar3 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      uVar4 = mp_montgomery_setup(param_1,pvVar3);\n      iVar1 = (int)uVar4;\n      if (iVar1 != 0) {\n        if (iVar1 == -2) {\n          uVar2 = 0xd;\n        }\n        else {\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }\n        free((void *)*param_2);\n        uVar4 = (ulong)uVar2;\n      }\n      return uVar4;\n    }" { (expression_statement "uVar4 = mp_montgomery_setup(param_1,pvVar3);" (assignment_expression "uVar4 = mp_montgomery_setup(param_1,pvVar3)" identifier = (call_expression "mp_montgomery_setup(param_1,pvVar3)" identifier (argument_list "(param_1,pvVar3)" ( identifier , identifier )))) ;) (expression_statement "iVar1 = (int)uVar4;" (assignment_expression "iVar1 = (int)uVar4" identifier = (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (if_statement "if (iVar1 != 0) {\n        if (iVar1 == -2) {\n          uVar2 = 0xd;\n        }\n        else {\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }\n        free((void *)*param_2);\n        uVar4 = (ulong)uVar2;\n      }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n        if (iVar1 == -2) {\n          uVar2 = 0xd;\n        }\n        else {\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }\n        free((void *)*param_2);\n        uVar4 = (ulong)uVar2;\n      }" { (if_statement "if (iVar1 == -2) {\n          uVar2 = 0xd;\n        }\n        else {\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }" if (parenthesized_expression "(iVar1 == -2)" ( (binary_expression "iVar1 == -2" identifier == number_literal) )) (compound_statement "{\n          uVar2 = 0xd;\n        }" { (expression_statement "uVar2 = 0xd;" (assignment_expression "uVar2 = 0xd" identifier = number_literal) ;) }) (else_clause "else {\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }" else (compound_statement "{\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }" { (expression_statement "uVar2 = 0x10;" (assignment_expression "uVar2 = 0x10" identifier = number_literal) ;) (if_statement "if (iVar1 != -3) {\n            uVar2 = 1;\n          }" if (parenthesized_expression "(iVar1 != -3)" ( (binary_expression "iVar1 != -3" identifier != number_literal) )) (compound_statement "{\n            uVar2 = 1;\n          }" { (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" identifier = number_literal) ;) })) }))) (expression_statement "free((void *)*param_2);" (call_expression "free((void *)*param_2)" identifier (argument_list "((void *)*param_2)" ( (cast_expression "(void *)*param_2" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier)) ))) ;) (expression_statement "uVar4 = (ulong)uVar2;" (assignment_expression "uVar4 = (ulong)uVar2" identifier = (cast_expression "(ulong)uVar2" ( (type_descriptor "ulong" type_identifier) ) identifier)) ;) })) (return_statement "return uVar4;" return identifier ;) })) (return_statement "return 0xd;" return number_literal ;) })) comment (expression_statement "crypt_argchk("b != NULL","src/math/ltm_desc.c",0x166);" (call_expression "crypt_argchk("b != NULL","src/math/ltm_desc.c",0x166)" identifier (argument_list "("b != NULL","src/math/ltm_desc.c",0x166)" ( (string_literal ""b != NULL"" " string_content ") , (string_literal ""src/math/ltm_desc.c"" " string_content ") , number_literal ))) ;) })))
(translation_unit "int montgomery_setup(void *a,void **b)\n\n{\n  int iVar1;\n  void *pvVar2;\n  bool bVar3;\n  \n  if (a == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("a != NULL","src/math/ltm_desc.c",0x165);\n  }\n  if (b != (void **)0x0) {\n    pvVar2 = calloc(1,8);\n    *b = pvVar2;\n    if (pvVar2 != (void *)0x0) {\n      iVar1 = mp_montgomery_setup(a,pvVar2);\n      if (iVar1 != 0) {\n        if (iVar1 == -2) {\n          iVar1 = 0xd;\n        }\n        else {\n          bVar3 = iVar1 != -3;\n          iVar1 = 0x10;\n          if (bVar3) {\n            iVar1 = 1;\n          }\n        }\n        free(*b);\n      }\n      return iVar1;\n    }\n    return 0xd;\n  }\n                    /* WARNING: Subroutine does not return */\n  crypt_argchk("b != NULL","src/math/ltm_desc.c",0x166);\n}\n\n" (function_definition "int montgomery_setup(void *a,void **b)\n\n{\n  int iVar1;\n  void *pvVar2;\n  bool bVar3;\n  \n  if (a == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("a != NULL","src/math/ltm_desc.c",0x165);\n  }\n  if (b != (void **)0x0) {\n    pvVar2 = calloc(1,8);\n    *b = pvVar2;\n    if (pvVar2 != (void *)0x0) {\n      iVar1 = mp_montgomery_setup(a,pvVar2);\n      if (iVar1 != 0) {\n        if (iVar1 == -2) {\n          iVar1 = 0xd;\n        }\n        else {\n          bVar3 = iVar1 != -3;\n          iVar1 = 0x10;\n          if (bVar3) {\n            iVar1 = 1;\n          }\n        }\n        free(*b);\n      }\n      return iVar1;\n    }\n    return 0xd;\n  }\n                    /* WARNING: Subroutine does not return */\n  crypt_argchk("b != NULL","src/math/ltm_desc.c",0x166);\n}" primitive_type (function_declarator "montgomery_setup(void *a,void **b)" identifier (parameter_list "(void *a,void **b)" ( (parameter_declaration "void *a" primitive_type (pointer_declarator "*a" * identifier)) , (parameter_declaration "void **b" primitive_type (pointer_declarator "**b" * (pointer_declarator "*b" * identifier))) ))) (compound_statement "{\n  int iVar1;\n  void *pvVar2;\n  bool bVar3;\n  \n  if (a == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("a != NULL","src/math/ltm_desc.c",0x165);\n  }\n  if (b != (void **)0x0) {\n    pvVar2 = calloc(1,8);\n    *b = pvVar2;\n    if (pvVar2 != (void *)0x0) {\n      iVar1 = mp_montgomery_setup(a,pvVar2);\n      if (iVar1 != 0) {\n        if (iVar1 == -2) {\n          iVar1 = 0xd;\n        }\n        else {\n          bVar3 = iVar1 != -3;\n          iVar1 = 0x10;\n          if (bVar3) {\n            iVar1 = 1;\n          }\n        }\n        free(*b);\n      }\n      return iVar1;\n    }\n    return 0xd;\n  }\n                    /* WARNING: Subroutine does not return */\n  crypt_argchk("b != NULL","src/math/ltm_desc.c",0x166);\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "void *pvVar2;" primitive_type (pointer_declarator "*pvVar2" * identifier) ;) (declaration "bool bVar3;" primitive_type identifier ;) (if_statement "if (a == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("a != NULL","src/math/ltm_desc.c",0x165);\n  }" if (parenthesized_expression "(a == (void *)0x0)" ( (binary_expression "a == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("a != NULL","src/math/ltm_desc.c",0x165);\n  }" { comment (expression_statement "crypt_argchk("a != NULL","src/math/ltm_desc.c",0x165);" (call_expression "crypt_argchk("a != NULL","src/math/ltm_desc.c",0x165)" identifier (argument_list "("a != NULL","src/math/ltm_desc.c",0x165)" ( (string_literal ""a != NULL"" " string_content ") , (string_literal ""src/math/ltm_desc.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (b != (void **)0x0) {\n    pvVar2 = calloc(1,8);\n    *b = pvVar2;\n    if (pvVar2 != (void *)0x0) {\n      iVar1 = mp_montgomery_setup(a,pvVar2);\n      if (iVar1 != 0) {\n        if (iVar1 == -2) {\n          iVar1 = 0xd;\n        }\n        else {\n          bVar3 = iVar1 != -3;\n          iVar1 = 0x10;\n          if (bVar3) {\n            iVar1 = 1;\n          }\n        }\n        free(*b);\n      }\n      return iVar1;\n    }\n    return 0xd;\n  }" if (parenthesized_expression "(b != (void **)0x0)" ( (binary_expression "b != (void **)0x0" identifier != (cast_expression "(void **)0x0" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) )) (compound_statement "{\n    pvVar2 = calloc(1,8);\n    *b = pvVar2;\n    if (pvVar2 != (void *)0x0) {\n      iVar1 = mp_montgomery_setup(a,pvVar2);\n      if (iVar1 != 0) {\n        if (iVar1 == -2) {\n          iVar1 = 0xd;\n        }\n        else {\n          bVar3 = iVar1 != -3;\n          iVar1 = 0x10;\n          if (bVar3) {\n            iVar1 = 1;\n          }\n        }\n        free(*b);\n      }\n      return iVar1;\n    }\n    return 0xd;\n  }" { (expression_statement "pvVar2 = calloc(1,8);" (assignment_expression "pvVar2 = calloc(1,8)" identifier = (call_expression "calloc(1,8)" identifier (argument_list "(1,8)" ( number_literal , number_literal )))) ;) (expression_statement "*b = pvVar2;" (assignment_expression "*b = pvVar2" (pointer_expression "*b" * identifier) = identifier) ;) (if_statement "if (pvVar2 != (void *)0x0) {\n      iVar1 = mp_montgomery_setup(a,pvVar2);\n      if (iVar1 != 0) {\n        if (iVar1 == -2) {\n          iVar1 = 0xd;\n        }\n        else {\n          bVar3 = iVar1 != -3;\n          iVar1 = 0x10;\n          if (bVar3) {\n            iVar1 = 1;\n          }\n        }\n        free(*b);\n      }\n      return iVar1;\n    }" if (parenthesized_expression "(pvVar2 != (void *)0x0)" ( (binary_expression "pvVar2 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar1 = mp_montgomery_setup(a,pvVar2);\n      if (iVar1 != 0) {\n        if (iVar1 == -2) {\n          iVar1 = 0xd;\n        }\n        else {\n          bVar3 = iVar1 != -3;\n          iVar1 = 0x10;\n          if (bVar3) {\n            iVar1 = 1;\n          }\n        }\n        free(*b);\n      }\n      return iVar1;\n    }" { (expression_statement "iVar1 = mp_montgomery_setup(a,pvVar2);" (assignment_expression "iVar1 = mp_montgomery_setup(a,pvVar2)" identifier = (call_expression "mp_montgomery_setup(a,pvVar2)" identifier (argument_list "(a,pvVar2)" ( identifier , identifier )))) ;) (if_statement "if (iVar1 != 0) {\n        if (iVar1 == -2) {\n          iVar1 = 0xd;\n        }\n        else {\n          bVar3 = iVar1 != -3;\n          iVar1 = 0x10;\n          if (bVar3) {\n            iVar1 = 1;\n          }\n        }\n        free(*b);\n      }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n        if (iVar1 == -2) {\n          iVar1 = 0xd;\n        }\n        else {\n          bVar3 = iVar1 != -3;\n          iVar1 = 0x10;\n          if (bVar3) {\n            iVar1 = 1;\n          }\n        }\n        free(*b);\n      }" { (if_statement "if (iVar1 == -2) {\n          iVar1 = 0xd;\n        }\n        else {\n          bVar3 = iVar1 != -3;\n          iVar1 = 0x10;\n          if (bVar3) {\n            iVar1 = 1;\n          }\n        }" if (parenthesized_expression "(iVar1 == -2)" ( (binary_expression "iVar1 == -2" identifier == number_literal) )) (compound_statement "{\n          iVar1 = 0xd;\n        }" { (expression_statement "iVar1 = 0xd;" (assignment_expression "iVar1 = 0xd" identifier = number_literal) ;) }) (else_clause "else {\n          bVar3 = iVar1 != -3;\n          iVar1 = 0x10;\n          if (bVar3) {\n            iVar1 = 1;\n          }\n        }" else (compound_statement "{\n          bVar3 = iVar1 != -3;\n          iVar1 = 0x10;\n          if (bVar3) {\n            iVar1 = 1;\n          }\n        }" { (expression_statement "bVar3 = iVar1 != -3;" (assignment_expression "bVar3 = iVar1 != -3" identifier = (binary_expression "iVar1 != -3" identifier != number_literal)) ;) (expression_statement "iVar1 = 0x10;" (assignment_expression "iVar1 = 0x10" identifier = number_literal) ;) (if_statement "if (bVar3) {\n            iVar1 = 1;\n          }" if (parenthesized_expression "(bVar3)" ( identifier )) (compound_statement "{\n            iVar1 = 1;\n          }" { (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" identifier = number_literal) ;) })) }))) (expression_statement "free(*b);" (call_expression "free(*b)" identifier (argument_list "(*b)" ( (pointer_expression "*b" * identifier) ))) ;) })) (return_statement "return iVar1;" return identifier ;) })) (return_statement "return 0xd;" return number_literal ;) })) comment (expression_statement "crypt_argchk("b != NULL","src/math/ltm_desc.c",0x166);" (call_expression "crypt_argchk("b != NULL","src/math/ltm_desc.c",0x166)" identifier (argument_list "("b != NULL","src/math/ltm_desc.c",0x166)" ( (string_literal ""b != NULL"" " string_content ") , (string_literal ""src/math/ltm_desc.c"" " string_content ") , number_literal ))) ;) })))
(translation_unit "ulong FUN_00161120(long param_1,undefined8 *param_2)\n\n{\n  int iVar1;\n  uint uVar2;\n  void *pvVar3;\n  ulong uVar4;\n  \n  if (param_1 == 0) {\n                    \n    crypt_argchk("a != NULL","src/math/ltm_desc.c",0x165);\n  }\n  if (param_2 != (undefined8 *)0x0) {\n    pvVar3 = calloc(1,8);\n    *param_2 = pvVar3;\n    if (pvVar3 != (void *)0x0) {\n      uVar4 = mp_montgomery_setup(param_1,pvVar3);\n      iVar1 = (int)uVar4;\n      if (iVar1 != 0) {\n        if (iVar1 == -2) {\n          uVar2 = 0xd;\n        }\n        else {\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }\n        free((void *)*param_2);\n        uVar4 = (ulong)uVar2;\n      }\n      return uVar4;\n    }\n    return 0xd;\n  }\n                    \n  crypt_argchk("b != NULL","src/math/ltm_desc.c",0x166);\n}\n\n" (function_definition "ulong FUN_00161120(long param_1,undefined8 *param_2)\n\n{\n  int iVar1;\n  uint uVar2;\n  void *pvVar3;\n  ulong uVar4;\n  \n  if (param_1 == 0) {\n                    \n    crypt_argchk("a != NULL","src/math/ltm_desc.c",0x165);\n  }\n  if (param_2 != (undefined8 *)0x0) {\n    pvVar3 = calloc(1,8);\n    *param_2 = pvVar3;\n    if (pvVar3 != (void *)0x0) {\n      uVar4 = mp_montgomery_setup(param_1,pvVar3);\n      iVar1 = (int)uVar4;\n      if (iVar1 != 0) {\n        if (iVar1 == -2) {\n          uVar2 = 0xd;\n        }\n        else {\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }\n        free((void *)*param_2);\n        uVar4 = (ulong)uVar2;\n      }\n      return uVar4;\n    }\n    return 0xd;\n  }\n                    \n  crypt_argchk("b != NULL","src/math/ltm_desc.c",0x166);\n}" type_identifier (function_declarator "FUN_00161120(long param_1,undefined8 *param_2)" identifier (parameter_list "(long param_1,undefined8 *param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined8 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  void *pvVar3;\n  ulong uVar4;\n  \n  if (param_1 == 0) {\n                    \n    crypt_argchk("a != NULL","src/math/ltm_desc.c",0x165);\n  }\n  if (param_2 != (undefined8 *)0x0) {\n    pvVar3 = calloc(1,8);\n    *param_2 = pvVar3;\n    if (pvVar3 != (void *)0x0) {\n      uVar4 = mp_montgomery_setup(param_1,pvVar3);\n      iVar1 = (int)uVar4;\n      if (iVar1 != 0) {\n        if (iVar1 == -2) {\n          uVar2 = 0xd;\n        }\n        else {\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }\n        free((void *)*param_2);\n        uVar4 = (ulong)uVar2;\n      }\n      return uVar4;\n    }\n    return 0xd;\n  }\n                    \n  crypt_argchk("b != NULL","src/math/ltm_desc.c",0x166);\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "void *pvVar3;" primitive_type (pointer_declarator "*pvVar3" * identifier) ;) (declaration "ulong uVar4;" type_identifier identifier ;) (if_statement "if (param_1 == 0) {\n                    \n    crypt_argchk("a != NULL","src/math/ltm_desc.c",0x165);\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n                    \n    crypt_argchk("a != NULL","src/math/ltm_desc.c",0x165);\n  }" { (expression_statement "crypt_argchk("a != NULL","src/math/ltm_desc.c",0x165);" (call_expression "crypt_argchk("a != NULL","src/math/ltm_desc.c",0x165)" identifier (argument_list "("a != NULL","src/math/ltm_desc.c",0x165)" ( (string_literal ""a != NULL"" " string_content ") , (string_literal ""src/math/ltm_desc.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (param_2 != (undefined8 *)0x0) {\n    pvVar3 = calloc(1,8);\n    *param_2 = pvVar3;\n    if (pvVar3 != (void *)0x0) {\n      uVar4 = mp_montgomery_setup(param_1,pvVar3);\n      iVar1 = (int)uVar4;\n      if (iVar1 != 0) {\n        if (iVar1 == -2) {\n          uVar2 = 0xd;\n        }\n        else {\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }\n        free((void *)*param_2);\n        uVar4 = (ulong)uVar2;\n      }\n      return uVar4;\n    }\n    return 0xd;\n  }" if (parenthesized_expression "(param_2 != (undefined8 *)0x0)" ( (binary_expression "param_2 != (undefined8 *)0x0" identifier != (cast_expression "(undefined8 *)0x0" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pvVar3 = calloc(1,8);\n    *param_2 = pvVar3;\n    if (pvVar3 != (void *)0x0) {\n      uVar4 = mp_montgomery_setup(param_1,pvVar3);\n      iVar1 = (int)uVar4;\n      if (iVar1 != 0) {\n        if (iVar1 == -2) {\n          uVar2 = 0xd;\n        }\n        else {\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }\n        free((void *)*param_2);\n        uVar4 = (ulong)uVar2;\n      }\n      return uVar4;\n    }\n    return 0xd;\n  }" { (expression_statement "pvVar3 = calloc(1,8);" (assignment_expression "pvVar3 = calloc(1,8)" identifier = (call_expression "calloc(1,8)" identifier (argument_list "(1,8)" ( number_literal , number_literal )))) ;) (expression_statement "*param_2 = pvVar3;" (assignment_expression "*param_2 = pvVar3" (pointer_expression "*param_2" * identifier) = identifier) ;) (if_statement "if (pvVar3 != (void *)0x0) {\n      uVar4 = mp_montgomery_setup(param_1,pvVar3);\n      iVar1 = (int)uVar4;\n      if (iVar1 != 0) {\n        if (iVar1 == -2) {\n          uVar2 = 0xd;\n        }\n        else {\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }\n        free((void *)*param_2);\n        uVar4 = (ulong)uVar2;\n      }\n      return uVar4;\n    }" if (parenthesized_expression "(pvVar3 != (void *)0x0)" ( (binary_expression "pvVar3 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      uVar4 = mp_montgomery_setup(param_1,pvVar3);\n      iVar1 = (int)uVar4;\n      if (iVar1 != 0) {\n        if (iVar1 == -2) {\n          uVar2 = 0xd;\n        }\n        else {\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }\n        free((void *)*param_2);\n        uVar4 = (ulong)uVar2;\n      }\n      return uVar4;\n    }" { (expression_statement "uVar4 = mp_montgomery_setup(param_1,pvVar3);" (assignment_expression "uVar4 = mp_montgomery_setup(param_1,pvVar3)" identifier = (call_expression "mp_montgomery_setup(param_1,pvVar3)" identifier (argument_list "(param_1,pvVar3)" ( identifier , identifier )))) ;) (expression_statement "iVar1 = (int)uVar4;" (assignment_expression "iVar1 = (int)uVar4" identifier = (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (if_statement "if (iVar1 != 0) {\n        if (iVar1 == -2) {\n          uVar2 = 0xd;\n        }\n        else {\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }\n        free((void *)*param_2);\n        uVar4 = (ulong)uVar2;\n      }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n        if (iVar1 == -2) {\n          uVar2 = 0xd;\n        }\n        else {\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }\n        free((void *)*param_2);\n        uVar4 = (ulong)uVar2;\n      }" { (if_statement "if (iVar1 == -2) {\n          uVar2 = 0xd;\n        }\n        else {\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }" if (parenthesized_expression "(iVar1 == -2)" ( (binary_expression "iVar1 == -2" identifier == number_literal) )) (compound_statement "{\n          uVar2 = 0xd;\n        }" { (expression_statement "uVar2 = 0xd;" (assignment_expression "uVar2 = 0xd" identifier = number_literal) ;) }) (else_clause "else {\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }" else (compound_statement "{\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }" { (expression_statement "uVar2 = 0x10;" (assignment_expression "uVar2 = 0x10" identifier = number_literal) ;) (if_statement "if (iVar1 != -3) {\n            uVar2 = 1;\n          }" if (parenthesized_expression "(iVar1 != -3)" ( (binary_expression "iVar1 != -3" identifier != number_literal) )) (compound_statement "{\n            uVar2 = 1;\n          }" { (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" identifier = number_literal) ;) })) }))) (expression_statement "free((void *)*param_2);" (call_expression "free((void *)*param_2)" identifier (argument_list "((void *)*param_2)" ( (cast_expression "(void *)*param_2" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier)) ))) ;) (expression_statement "uVar4 = (ulong)uVar2;" (assignment_expression "uVar4 = (ulong)uVar2" identifier = (cast_expression "(ulong)uVar2" ( (type_descriptor "ulong" type_identifier) ) identifier)) ;) })) (return_statement "return uVar4;" return identifier ;) })) (return_statement "return 0xd;" return number_literal ;) })) (expression_statement "crypt_argchk("b != NULL","src/math/ltm_desc.c",0x166);" (call_expression "crypt_argchk("b != NULL","src/math/ltm_desc.c",0x166)" identifier (argument_list "("b != NULL","src/math/ltm_desc.c",0x166)" ( (string_literal ""b != NULL"" " string_content ") , (string_literal ""src/math/ltm_desc.c"" " string_content ") , number_literal ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , LIT )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) }))) (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT)) ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) })) (return_statement return IDENT ;) })) (return_statement return LIT ;) })) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT ))) ;) })))
(function_definition "ulong FUN_00161120(long param_1,undefined8 *param_2)\n\n{\n  int iVar1;\n  uint uVar2;\n  void *pvVar3;\n  ulong uVar4;\n  \n  if (param_1 == 0) {\n                    \n    crypt_argchk("a != NULL","src/math/ltm_desc.c",0x165);\n  }\n  if (param_2 != (undefined8 *)0x0) {\n    pvVar3 = calloc(1,8);\n    *param_2 = pvVar3;\n    if (pvVar3 != (void *)0x0) {\n      uVar4 = mp_montgomery_setup(param_1,pvVar3);\n      iVar1 = (int)uVar4;\n      if (iVar1 != 0) {\n        if (iVar1 == -2) {\n          uVar2 = 0xd;\n        }\n        else {\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }\n        free((void *)*param_2);\n        uVar4 = (ulong)uVar2;\n      }\n      return uVar4;\n    }\n    return 0xd;\n  }\n                    \n  crypt_argchk("b != NULL","src/math/ltm_desc.c",0x166);\n}" (type_identifier "ulong") (function_declarator "FUN_00161120(long param_1,undefined8 *param_2)" (identifier "FUN_00161120") (parameter_list "(long param_1,undefined8 *param_2)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "undefined8 *param_2" (type_identifier "undefined8") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  void *pvVar3;\n  ulong uVar4;\n  \n  if (param_1 == 0) {\n                    \n    crypt_argchk("a != NULL","src/math/ltm_desc.c",0x165);\n  }\n  if (param_2 != (undefined8 *)0x0) {\n    pvVar3 = calloc(1,8);\n    *param_2 = pvVar3;\n    if (pvVar3 != (void *)0x0) {\n      uVar4 = mp_montgomery_setup(param_1,pvVar3);\n      iVar1 = (int)uVar4;\n      if (iVar1 != 0) {\n        if (iVar1 == -2) {\n          uVar2 = 0xd;\n        }\n        else {\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }\n        free((void *)*param_2);\n        uVar4 = (ulong)uVar2;\n      }\n      return uVar4;\n    }\n    return 0xd;\n  }\n                    \n  crypt_argchk("b != NULL","src/math/ltm_desc.c",0x166);\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "void *pvVar3;" (primitive_type "void") (pointer_declarator "*pvVar3" (* "*") (identifier "pvVar3")) (; ";")) (declaration "ulong uVar4;" (type_identifier "ulong") (identifier "uVar4") (; ";")) (if_statement "if (param_1 == 0) {\n                    \n    crypt_argchk("a != NULL","src/math/ltm_desc.c",0x165);\n  }" (if "if") (parenthesized_expression "(param_1 == 0)" (( "(") (binary_expression "param_1 == 0" (identifier "param_1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n                    \n    crypt_argchk("a != NULL","src/math/ltm_desc.c",0x165);\n  }" ({ "{") (expression_statement "crypt_argchk("a != NULL","src/math/ltm_desc.c",0x165);" (call_expression "crypt_argchk("a != NULL","src/math/ltm_desc.c",0x165)" (identifier "crypt_argchk") (argument_list "("a != NULL","src/math/ltm_desc.c",0x165)" (( "(") (string_literal ""a != NULL"" (" """) (string_content "a != NULL") (" """)) (, ",") (string_literal ""src/math/ltm_desc.c"" (" """) (string_content "src/math/ltm_desc.c") (" """)) (, ",") (number_literal "0x165") () ")"))) (; ";")) (} "}"))) (if_statement "if (param_2 != (undefined8 *)0x0) {\n    pvVar3 = calloc(1,8);\n    *param_2 = pvVar3;\n    if (pvVar3 != (void *)0x0) {\n      uVar4 = mp_montgomery_setup(param_1,pvVar3);\n      iVar1 = (int)uVar4;\n      if (iVar1 != 0) {\n        if (iVar1 == -2) {\n          uVar2 = 0xd;\n        }\n        else {\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }\n        free((void *)*param_2);\n        uVar4 = (ulong)uVar2;\n      }\n      return uVar4;\n    }\n    return 0xd;\n  }" (if "if") (parenthesized_expression "(param_2 != (undefined8 *)0x0)" (( "(") (binary_expression "param_2 != (undefined8 *)0x0" (identifier "param_2") (!= "!=") (cast_expression "(undefined8 *)0x0" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    pvVar3 = calloc(1,8);\n    *param_2 = pvVar3;\n    if (pvVar3 != (void *)0x0) {\n      uVar4 = mp_montgomery_setup(param_1,pvVar3);\n      iVar1 = (int)uVar4;\n      if (iVar1 != 0) {\n        if (iVar1 == -2) {\n          uVar2 = 0xd;\n        }\n        else {\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }\n        free((void *)*param_2);\n        uVar4 = (ulong)uVar2;\n      }\n      return uVar4;\n    }\n    return 0xd;\n  }" ({ "{") (expression_statement "pvVar3 = calloc(1,8);" (assignment_expression "pvVar3 = calloc(1,8)" (identifier "pvVar3") (= "=") (call_expression "calloc(1,8)" (identifier "calloc") (argument_list "(1,8)" (( "(") (number_literal "1") (, ",") (number_literal "8") () ")")))) (; ";")) (expression_statement "*param_2 = pvVar3;" (assignment_expression "*param_2 = pvVar3" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (identifier "pvVar3")) (; ";")) (if_statement "if (pvVar3 != (void *)0x0) {\n      uVar4 = mp_montgomery_setup(param_1,pvVar3);\n      iVar1 = (int)uVar4;\n      if (iVar1 != 0) {\n        if (iVar1 == -2) {\n          uVar2 = 0xd;\n        }\n        else {\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }\n        free((void *)*param_2);\n        uVar4 = (ulong)uVar2;\n      }\n      return uVar4;\n    }" (if "if") (parenthesized_expression "(pvVar3 != (void *)0x0)" (( "(") (binary_expression "pvVar3 != (void *)0x0" (identifier "pvVar3") (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      uVar4 = mp_montgomery_setup(param_1,pvVar3);\n      iVar1 = (int)uVar4;\n      if (iVar1 != 0) {\n        if (iVar1 == -2) {\n          uVar2 = 0xd;\n        }\n        else {\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }\n        free((void *)*param_2);\n        uVar4 = (ulong)uVar2;\n      }\n      return uVar4;\n    }" ({ "{") (expression_statement "uVar4 = mp_montgomery_setup(param_1,pvVar3);" (assignment_expression "uVar4 = mp_montgomery_setup(param_1,pvVar3)" (identifier "uVar4") (= "=") (call_expression "mp_montgomery_setup(param_1,pvVar3)" (identifier "mp_montgomery_setup") (argument_list "(param_1,pvVar3)" (( "(") (identifier "param_1") (, ",") (identifier "pvVar3") () ")")))) (; ";")) (expression_statement "iVar1 = (int)uVar4;" (assignment_expression "iVar1 = (int)uVar4" (identifier "iVar1") (= "=") (cast_expression "(int)uVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar4"))) (; ";")) (if_statement "if (iVar1 != 0) {\n        if (iVar1 == -2) {\n          uVar2 = 0xd;\n        }\n        else {\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }\n        free((void *)*param_2);\n        uVar4 = (ulong)uVar2;\n      }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        if (iVar1 == -2) {\n          uVar2 = 0xd;\n        }\n        else {\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }\n        free((void *)*param_2);\n        uVar4 = (ulong)uVar2;\n      }" ({ "{") (if_statement "if (iVar1 == -2) {\n          uVar2 = 0xd;\n        }\n        else {\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }" (if "if") (parenthesized_expression "(iVar1 == -2)" (( "(") (binary_expression "iVar1 == -2" (identifier "iVar1") (== "==") (number_literal "-2")) () ")")) (compound_statement "{\n          uVar2 = 0xd;\n        }" ({ "{") (expression_statement "uVar2 = 0xd;" (assignment_expression "uVar2 = 0xd" (identifier "uVar2") (= "=") (number_literal "0xd")) (; ";")) (} "}")) (else_clause "else {\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }" (else "else") (compound_statement "{\n          uVar2 = 0x10;\n          if (iVar1 != -3) {\n            uVar2 = 1;\n          }\n        }" ({ "{") (expression_statement "uVar2 = 0x10;" (assignment_expression "uVar2 = 0x10" (identifier "uVar2") (= "=") (number_literal "0x10")) (; ";")) (if_statement "if (iVar1 != -3) {\n            uVar2 = 1;\n          }" (if "if") (parenthesized_expression "(iVar1 != -3)" (( "(") (binary_expression "iVar1 != -3" (identifier "iVar1") (!= "!=") (number_literal "-3")) () ")")) (compound_statement "{\n            uVar2 = 1;\n          }" ({ "{") (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" (identifier "uVar2") (= "=") (number_literal "1")) (; ";")) (} "}"))) (} "}")))) (expression_statement "free((void *)*param_2);" (call_expression "free((void *)*param_2)" (identifier "free") (argument_list "((void *)*param_2)" (( "(") (cast_expression "(void *)*param_2" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) () ")"))) (; ";")) (expression_statement "uVar4 = (ulong)uVar2;" (assignment_expression "uVar4 = (ulong)uVar2" (identifier "uVar4") (= "=") (cast_expression "(ulong)uVar2" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "uVar2"))) (; ";")) (} "}"))) (return_statement "return uVar4;" (return "return") (identifier "uVar4") (; ";")) (} "}"))) (return_statement "return 0xd;" (return "return") (number_literal "0xd") (; ";")) (} "}"))) (expression_statement "crypt_argchk("b != NULL","src/math/ltm_desc.c",0x166);" (call_expression "crypt_argchk("b != NULL","src/math/ltm_desc.c",0x166)" (identifier "crypt_argchk") (argument_list "("b != NULL","src/math/ltm_desc.c",0x166)" (( "(") (string_literal ""b != NULL"" (" """) (string_content "b != NULL") (" """)) (, ",") (string_literal ""src/math/ltm_desc.c"" (" """) (string_content "src/math/ltm_desc.c") (" """)) (, ",") (number_literal "0x166") () ")"))) (; ";")) (} "}")))

int function_1(void *var_1,void **var_3)

{
  int var_7;
  void *var_5;
  bool bVar3;
  
  if (var_1 == (void *)0x0) {
                    /* WARNING: Subroutine does not return */
    var_2("a != NULL","src/math/ltm_desc.c",0x165);
  }
  if (var_3 != (void **)0x0) {
    var_5 = var_4(1,8);
    *var_3 = var_5;
    if (var_5 != (void *)0x0) {
      var_7 = var_6(var_1,var_5);
      if (var_7 != 0) {
        if (var_7 == -2) {
          var_7 = 0xd;
        }
        else {
          bVar3 = var_7 != -3;
          var_7 = 0x10;
          if (bVar3) {
            var_7 = 1;
          }
        }
        var_8(*var_3);
      }
      return var_7;
    }
    return 0xd;
  }
                    /* WARNING: Subroutine does not return */
  var_2("b != NULL","src/math/ltm_desc.c",0x166);
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (sized_type_specifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (string_literal (string_content)) (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal) (number_literal))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)))))) (return_statement (identifier)))) (return_statement (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (string_literal (string_content)) (number_literal)))))))

ulong MASKED(long param_1,undefined8 *param_2)

{
  int iVar1;
  uint uVar2;
  void *pvVar3;
  ulong uVar4;
  
  if (param_1 == 0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("a != NULL","src/math/ltm_desc.c",0x165);
  }
  if (param_2 != (undefined8 *)0x0) {
    pvVar3 = calloc(1,8);
    *param_2 = pvVar3;
    if (pvVar3 != (void *)0x0) {
      uVar4 = mp_montgomery_setup(param_1,pvVar3);
      iVar1 = (int)uVar4;
      if (iVar1 != 0) {
        if (iVar1 == -2) {
          uVar2 = 0xd;
        }
        else {
          uVar2 = 0x10;
          if (iVar1 != -3) {
            uVar2 = 1;
          }
        }
        free((void *)*param_2);
        uVar4 = (ulong)uVar2;
      }
      return uVar4;
    }
    return 0xd;
  }
                    /* WARNING: Subroutine does not return */
  crypt_argchk("b != NULL","src/math/ltm_desc.c",0x166);
}

