
int ecc_make_key(prng_state *prng,int wprng,int keysize,ecc_key *key)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  int iVar4;
  
  iVar4 = *(int *)PTR_ltc_ecc_sets_001ddeb8;
  if (iVar4 < keysize) {
    if (iVar4 != 0) {
      iVar3 = 0;
      piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8;
      do {
        piVar2 = piVar2 + 0xe;
        iVar4 = *piVar2;
        iVar3 = iVar3 + 1;
        if (keysize <= iVar4) goto LAB_0017d6bc;
      } while (iVar4 != 0);
    }
    return 3;
  }
  iVar3 = 0;
LAB_0017d6bc:
  iVar1 = 3;
  if ((iVar4 < 0x43) && (iVar4 != 0)) {
    iVar1 = ecc_make_key_ex(prng,wprng,key,
                            (ltc_ecc_set_type *)(PTR_ltc_ecc_sets_001ddeb8 + (long)iVar3 * 0x38));
    key->idx = iVar3;
  }
  return iVar1;
}



undefined8 ecc_make_key(undefined8 param_1,undefined8 param_2,int param_3,long param_4)

{
  int iVar1;
  int *piVar2;
  undefined8 uVar3;
  int iVar4;
  
  iVar1 = *(int *)PTR_ltc_ecc_sets_001ddeb8;
  if (iVar1 < param_3) {
    if (iVar1 != 0) {
      iVar4 = 0;
      piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8;
      do {
        piVar2 = piVar2 + 0xe;
        iVar1 = *piVar2;
        iVar4 = iVar4 + 1;
        if (param_3 <= iVar1) goto LAB_0017d6bc;
      } while (iVar1 != 0);
    }
    return 3;
  }
  iVar4 = 0;
LAB_0017d6bc:
  uVar3 = 3;
  if ((iVar1 < 0x43) && (iVar1 != 0)) {
    uVar3 = ecc_make_key_ex(param_1,param_2,param_4,PTR_ltc_ecc_sets_001ddeb8 + (long)iVar4 * 0x38);
    *(int *)(param_4 + 4) = iVar4;
  }
  return uVar3;
}


PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV R9,qword ptr [0x001ddeb8]
MOV R8D,dword ptr [R9]
CMP R8D,EDX
JGE 0x0017d704
TEST R8D,R8D
JZ 0x0017d6f8
LEA RAX,[R9 + 0x38]
XOR EBX,EBX
JMP 0x0017d6b1
ADD RAX,0x38
TEST R8D,R8D
JZ 0x0017d6f8
MOV R8D,dword ptr [RAX]
ADD EBX,0x1
CMP R8D,EDX
JL 0x0017d6a8
MOV EAX,0x3
CMP R8D,0x42
JG 0x0017d6ec
TEST R8D,R8D
JZ 0x0017d6ec
MOVSXD RDX,EBX
MOV RBP,RCX
LEA RCX,[RDX*0x8]
SUB RCX,RDX
MOV RDX,RBP
LEA RCX,[R9 + RCX*0x8]
CALL 0x001137d0
MOV dword ptr [RBP + 0x4],EBX
ADD RSP,0x8
POP RBX
POP RBP
RET
ADD RSP,0x8
MOV EAX,0x3
POP RBX
POP RBP
RET
XOR EBX,EBX
JMP 0x0017d6bc
(translation_unit "undefined8 ecc_make_key(undefined8 param_1,undefined8 param_2,int param_3,long param_4)\n\n{\n  int iVar1;\n  int *piVar2;\n  undefined8 uVar3;\n  int iVar4;\n  \n  iVar1 = *(int *)PTR_ltc_ecc_sets_001ddeb8;\n  if (iVar1 < param_3) {\n    if (iVar1 != 0) {\n      iVar4 = 0;\n      piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8;\n      do {\n        piVar2 = piVar2 + 0xe;\n        iVar1 = *piVar2;\n        iVar4 = iVar4 + 1;\n        if (param_3 <= iVar1) goto LAB_0017d6bc;\n      } while (iVar1 != 0);\n    }\n    return 3;\n  }\n  iVar4 = 0;\nLAB_0017d6bc:\n  uVar3 = 3;\n  if ((iVar1 < 0x43) && (iVar1 != 0)) {\n    uVar3 = ecc_make_key_ex(param_1,param_2,param_4,PTR_ltc_ecc_sets_001ddeb8 + (long)iVar4 * 0x38);\n    *(int *)(param_4 + 4) = iVar4;\n  }\n  return uVar3;\n}\n\n" (function_definition "undefined8 ecc_make_key(undefined8 param_1,undefined8 param_2,int param_3,long param_4)\n\n{\n  int iVar1;\n  int *piVar2;\n  undefined8 uVar3;\n  int iVar4;\n  \n  iVar1 = *(int *)PTR_ltc_ecc_sets_001ddeb8;\n  if (iVar1 < param_3) {\n    if (iVar1 != 0) {\n      iVar4 = 0;\n      piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8;\n      do {\n        piVar2 = piVar2 + 0xe;\n        iVar1 = *piVar2;\n        iVar4 = iVar4 + 1;\n        if (param_3 <= iVar1) goto LAB_0017d6bc;\n      } while (iVar1 != 0);\n    }\n    return 3;\n  }\n  iVar4 = 0;\nLAB_0017d6bc:\n  uVar3 = 3;\n  if ((iVar1 < 0x43) && (iVar1 != 0)) {\n    uVar3 = ecc_make_key_ex(param_1,param_2,param_4,PTR_ltc_ecc_sets_001ddeb8 + (long)iVar4 * 0x38);\n    *(int *)(param_4 + 4) = iVar4;\n  }\n  return uVar3;\n}" type_identifier (function_declarator "ecc_make_key(undefined8 param_1,undefined8 param_2,int param_3,long param_4)" identifier (parameter_list "(undefined8 param_1,undefined8 param_2,int param_3,long param_4)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "undefined8 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "long param_4" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  undefined8 uVar3;\n  int iVar4;\n  \n  iVar1 = *(int *)PTR_ltc_ecc_sets_001ddeb8;\n  if (iVar1 < param_3) {\n    if (iVar1 != 0) {\n      iVar4 = 0;\n      piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8;\n      do {\n        piVar2 = piVar2 + 0xe;\n        iVar1 = *piVar2;\n        iVar4 = iVar4 + 1;\n        if (param_3 <= iVar1) goto LAB_0017d6bc;\n      } while (iVar1 != 0);\n    }\n    return 3;\n  }\n  iVar4 = 0;\nLAB_0017d6bc:\n  uVar3 = 3;\n  if ((iVar1 < 0x43) && (iVar1 != 0)) {\n    uVar3 = ecc_make_key_ex(param_1,param_2,param_4,PTR_ltc_ecc_sets_001ddeb8 + (long)iVar4 * 0x38);\n    *(int *)(param_4 + 4) = iVar4;\n  }\n  return uVar3;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "undefined8 uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "iVar1 = *(int *)PTR_ltc_ecc_sets_001ddeb8;" (assignment_expression "iVar1 = *(int *)PTR_ltc_ecc_sets_001ddeb8" identifier = (pointer_expression "*(int *)PTR_ltc_ecc_sets_001ddeb8" * (cast_expression "(int *)PTR_ltc_ecc_sets_001ddeb8" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (if_statement "if (iVar1 < param_3) {\n    if (iVar1 != 0) {\n      iVar4 = 0;\n      piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8;\n      do {\n        piVar2 = piVar2 + 0xe;\n        iVar1 = *piVar2;\n        iVar4 = iVar4 + 1;\n        if (param_3 <= iVar1) goto LAB_0017d6bc;\n      } while (iVar1 != 0);\n    }\n    return 3;\n  }" if (parenthesized_expression "(iVar1 < param_3)" ( (binary_expression "iVar1 < param_3" identifier < identifier) )) (compound_statement "{\n    if (iVar1 != 0) {\n      iVar4 = 0;\n      piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8;\n      do {\n        piVar2 = piVar2 + 0xe;\n        iVar1 = *piVar2;\n        iVar4 = iVar4 + 1;\n        if (param_3 <= iVar1) goto LAB_0017d6bc;\n      } while (iVar1 != 0);\n    }\n    return 3;\n  }" { (if_statement "if (iVar1 != 0) {\n      iVar4 = 0;\n      piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8;\n      do {\n        piVar2 = piVar2 + 0xe;\n        iVar1 = *piVar2;\n        iVar4 = iVar4 + 1;\n        if (param_3 <= iVar1) goto LAB_0017d6bc;\n      } while (iVar1 != 0);\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      iVar4 = 0;\n      piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8;\n      do {\n        piVar2 = piVar2 + 0xe;\n        iVar1 = *piVar2;\n        iVar4 = iVar4 + 1;\n        if (param_3 <= iVar1) goto LAB_0017d6bc;\n      } while (iVar1 != 0);\n    }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (expression_statement "piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8;" (assignment_expression "piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8" identifier = (cast_expression "(int *)PTR_ltc_ecc_sets_001ddeb8" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) ;) (do_statement "do {\n        piVar2 = piVar2 + 0xe;\n        iVar1 = *piVar2;\n        iVar4 = iVar4 + 1;\n        if (param_3 <= iVar1) goto LAB_0017d6bc;\n      } while (iVar1 != 0);" do (compound_statement "{\n        piVar2 = piVar2 + 0xe;\n        iVar1 = *piVar2;\n        iVar4 = iVar4 + 1;\n        if (param_3 <= iVar1) goto LAB_0017d6bc;\n      }" { (expression_statement "piVar2 = piVar2 + 0xe;" (assignment_expression "piVar2 = piVar2 + 0xe" identifier = (binary_expression "piVar2 + 0xe" identifier + number_literal)) ;) (expression_statement "iVar1 = *piVar2;" (assignment_expression "iVar1 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) ;) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) (if_statement "if (param_3 <= iVar1) goto LAB_0017d6bc;" if (parenthesized_expression "(param_3 <= iVar1)" ( (binary_expression "param_3 <= iVar1" identifier <= identifier) )) (goto_statement "goto LAB_0017d6bc;" goto statement_identifier ;)) }) while (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) ;) })) (return_statement "return 3;" return number_literal ;) })) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (labeled_statement "LAB_0017d6bc:\n  uVar3 = 3;" statement_identifier : (expression_statement "uVar3 = 3;" (assignment_expression "uVar3 = 3" identifier = number_literal) ;)) (if_statement "if ((iVar1 < 0x43) && (iVar1 != 0)) {\n    uVar3 = ecc_make_key_ex(param_1,param_2,param_4,PTR_ltc_ecc_sets_001ddeb8 + (long)iVar4 * 0x38);\n    *(int *)(param_4 + 4) = iVar4;\n  }" if (parenthesized_expression "((iVar1 < 0x43) && (iVar1 != 0))" ( (binary_expression "(iVar1 < 0x43) && (iVar1 != 0)" (parenthesized_expression "(iVar1 < 0x43)" ( (binary_expression "iVar1 < 0x43" identifier < number_literal) )) && (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) ))) )) (compound_statement "{\n    uVar3 = ecc_make_key_ex(param_1,param_2,param_4,PTR_ltc_ecc_sets_001ddeb8 + (long)iVar4 * 0x38);\n    *(int *)(param_4 + 4) = iVar4;\n  }" { (expression_statement "uVar3 = ecc_make_key_ex(param_1,param_2,param_4,PTR_ltc_ecc_sets_001ddeb8 + (long)iVar4 * 0x38);" (assignment_expression "uVar3 = ecc_make_key_ex(param_1,param_2,param_4,PTR_ltc_ecc_sets_001ddeb8 + (long)iVar4 * 0x38)" identifier = (call_expression "ecc_make_key_ex(param_1,param_2,param_4,PTR_ltc_ecc_sets_001ddeb8 + (long)iVar4 * 0x38)" identifier (argument_list "(param_1,param_2,param_4,PTR_ltc_ecc_sets_001ddeb8 + (long)iVar4 * 0x38)" ( identifier , identifier , identifier , (binary_expression "PTR_ltc_ecc_sets_001ddeb8 + (long)iVar4 * 0x38" identifier + (binary_expression "(long)iVar4 * 0x38" (cast_expression "(long)iVar4" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) * number_literal)) )))) ;) (expression_statement "*(int *)(param_4 + 4) = iVar4;" (assignment_expression "*(int *)(param_4 + 4) = iVar4" (pointer_expression "*(int *)(param_4 + 4)" * (cast_expression "(int *)(param_4 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 4)" ( (binary_expression "param_4 + 4" identifier + number_literal) )))) = identifier) ;) })) (return_statement "return uVar3;" return identifier ;) })))
(translation_unit "int ecc_make_key(prng_state *prng,int wprng,int keysize,ecc_key *key)\n\n{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar4 = *(int *)PTR_ltc_ecc_sets_001ddeb8;\n  if (iVar4 < keysize) {\n    if (iVar4 != 0) {\n      iVar3 = 0;\n      piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8;\n      do {\n        piVar2 = piVar2 + 0xe;\n        iVar4 = *piVar2;\n        iVar3 = iVar3 + 1;\n        if (keysize <= iVar4) goto LAB_0017d6bc;\n      } while (iVar4 != 0);\n    }\n    return 3;\n  }\n  iVar3 = 0;\nLAB_0017d6bc:\n  iVar1 = 3;\n  if ((iVar4 < 0x43) && (iVar4 != 0)) {\n    iVar1 = ecc_make_key_ex(prng,wprng,key,\n                            (ltc_ecc_set_type *)(PTR_ltc_ecc_sets_001ddeb8 + (long)iVar3 * 0x38));\n    key->idx = iVar3;\n  }\n  return iVar1;\n}\n\n" (function_definition "int ecc_make_key(prng_state *prng,int wprng,int keysize,ecc_key *key)\n\n{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar4 = *(int *)PTR_ltc_ecc_sets_001ddeb8;\n  if (iVar4 < keysize) {\n    if (iVar4 != 0) {\n      iVar3 = 0;\n      piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8;\n      do {\n        piVar2 = piVar2 + 0xe;\n        iVar4 = *piVar2;\n        iVar3 = iVar3 + 1;\n        if (keysize <= iVar4) goto LAB_0017d6bc;\n      } while (iVar4 != 0);\n    }\n    return 3;\n  }\n  iVar3 = 0;\nLAB_0017d6bc:\n  iVar1 = 3;\n  if ((iVar4 < 0x43) && (iVar4 != 0)) {\n    iVar1 = ecc_make_key_ex(prng,wprng,key,\n                            (ltc_ecc_set_type *)(PTR_ltc_ecc_sets_001ddeb8 + (long)iVar3 * 0x38));\n    key->idx = iVar3;\n  }\n  return iVar1;\n}" primitive_type (function_declarator "ecc_make_key(prng_state *prng,int wprng,int keysize,ecc_key *key)" identifier (parameter_list "(prng_state *prng,int wprng,int keysize,ecc_key *key)" ( (parameter_declaration "prng_state *prng" type_identifier (pointer_declarator "*prng" * identifier)) , (parameter_declaration "int wprng" primitive_type identifier) , (parameter_declaration "int keysize" primitive_type identifier) , (parameter_declaration "ecc_key *key" type_identifier (pointer_declarator "*key" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar4 = *(int *)PTR_ltc_ecc_sets_001ddeb8;\n  if (iVar4 < keysize) {\n    if (iVar4 != 0) {\n      iVar3 = 0;\n      piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8;\n      do {\n        piVar2 = piVar2 + 0xe;\n        iVar4 = *piVar2;\n        iVar3 = iVar3 + 1;\n        if (keysize <= iVar4) goto LAB_0017d6bc;\n      } while (iVar4 != 0);\n    }\n    return 3;\n  }\n  iVar3 = 0;\nLAB_0017d6bc:\n  iVar1 = 3;\n  if ((iVar4 < 0x43) && (iVar4 != 0)) {\n    iVar1 = ecc_make_key_ex(prng,wprng,key,\n                            (ltc_ecc_set_type *)(PTR_ltc_ecc_sets_001ddeb8 + (long)iVar3 * 0x38));\n    key->idx = iVar3;\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "iVar4 = *(int *)PTR_ltc_ecc_sets_001ddeb8;" (assignment_expression "iVar4 = *(int *)PTR_ltc_ecc_sets_001ddeb8" identifier = (pointer_expression "*(int *)PTR_ltc_ecc_sets_001ddeb8" * (cast_expression "(int *)PTR_ltc_ecc_sets_001ddeb8" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (if_statement "if (iVar4 < keysize) {\n    if (iVar4 != 0) {\n      iVar3 = 0;\n      piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8;\n      do {\n        piVar2 = piVar2 + 0xe;\n        iVar4 = *piVar2;\n        iVar3 = iVar3 + 1;\n        if (keysize <= iVar4) goto LAB_0017d6bc;\n      } while (iVar4 != 0);\n    }\n    return 3;\n  }" if (parenthesized_expression "(iVar4 < keysize)" ( (binary_expression "iVar4 < keysize" identifier < identifier) )) (compound_statement "{\n    if (iVar4 != 0) {\n      iVar3 = 0;\n      piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8;\n      do {\n        piVar2 = piVar2 + 0xe;\n        iVar4 = *piVar2;\n        iVar3 = iVar3 + 1;\n        if (keysize <= iVar4) goto LAB_0017d6bc;\n      } while (iVar4 != 0);\n    }\n    return 3;\n  }" { (if_statement "if (iVar4 != 0) {\n      iVar3 = 0;\n      piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8;\n      do {\n        piVar2 = piVar2 + 0xe;\n        iVar4 = *piVar2;\n        iVar3 = iVar3 + 1;\n        if (keysize <= iVar4) goto LAB_0017d6bc;\n      } while (iVar4 != 0);\n    }" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (compound_statement "{\n      iVar3 = 0;\n      piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8;\n      do {\n        piVar2 = piVar2 + 0xe;\n        iVar4 = *piVar2;\n        iVar3 = iVar3 + 1;\n        if (keysize <= iVar4) goto LAB_0017d6bc;\n      } while (iVar4 != 0);\n    }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (expression_statement "piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8;" (assignment_expression "piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8" identifier = (cast_expression "(int *)PTR_ltc_ecc_sets_001ddeb8" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) ;) (do_statement "do {\n        piVar2 = piVar2 + 0xe;\n        iVar4 = *piVar2;\n        iVar3 = iVar3 + 1;\n        if (keysize <= iVar4) goto LAB_0017d6bc;\n      } while (iVar4 != 0);" do (compound_statement "{\n        piVar2 = piVar2 + 0xe;\n        iVar4 = *piVar2;\n        iVar3 = iVar3 + 1;\n        if (keysize <= iVar4) goto LAB_0017d6bc;\n      }" { (expression_statement "piVar2 = piVar2 + 0xe;" (assignment_expression "piVar2 = piVar2 + 0xe" identifier = (binary_expression "piVar2 + 0xe" identifier + number_literal)) ;) (expression_statement "iVar4 = *piVar2;" (assignment_expression "iVar4 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) ;) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (if_statement "if (keysize <= iVar4) goto LAB_0017d6bc;" if (parenthesized_expression "(keysize <= iVar4)" ( (binary_expression "keysize <= iVar4" identifier <= identifier) )) (goto_statement "goto LAB_0017d6bc;" goto statement_identifier ;)) }) while (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) ;) })) (return_statement "return 3;" return number_literal ;) })) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (labeled_statement "LAB_0017d6bc:\n  iVar1 = 3;" statement_identifier : (expression_statement "iVar1 = 3;" (assignment_expression "iVar1 = 3" identifier = number_literal) ;)) (if_statement "if ((iVar4 < 0x43) && (iVar4 != 0)) {\n    iVar1 = ecc_make_key_ex(prng,wprng,key,\n                            (ltc_ecc_set_type *)(PTR_ltc_ecc_sets_001ddeb8 + (long)iVar3 * 0x38));\n    key->idx = iVar3;\n  }" if (parenthesized_expression "((iVar4 < 0x43) && (iVar4 != 0))" ( (binary_expression "(iVar4 < 0x43) && (iVar4 != 0)" (parenthesized_expression "(iVar4 < 0x43)" ( (binary_expression "iVar4 < 0x43" identifier < number_literal) )) && (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) ))) )) (compound_statement "{\n    iVar1 = ecc_make_key_ex(prng,wprng,key,\n                            (ltc_ecc_set_type *)(PTR_ltc_ecc_sets_001ddeb8 + (long)iVar3 * 0x38));\n    key->idx = iVar3;\n  }" { (expression_statement "iVar1 = ecc_make_key_ex(prng,wprng,key,\n                            (ltc_ecc_set_type *)(PTR_ltc_ecc_sets_001ddeb8 + (long)iVar3 * 0x38));" (assignment_expression "iVar1 = ecc_make_key_ex(prng,wprng,key,\n                            (ltc_ecc_set_type *)(PTR_ltc_ecc_sets_001ddeb8 + (long)iVar3 * 0x38))" identifier = (call_expression "ecc_make_key_ex(prng,wprng,key,\n                            (ltc_ecc_set_type *)(PTR_ltc_ecc_sets_001ddeb8 + (long)iVar3 * 0x38))" identifier (argument_list "(prng,wprng,key,\n                            (ltc_ecc_set_type *)(PTR_ltc_ecc_sets_001ddeb8 + (long)iVar3 * 0x38))" ( identifier , identifier , identifier , (cast_expression "(ltc_ecc_set_type *)(PTR_ltc_ecc_sets_001ddeb8 + (long)iVar3 * 0x38)" ( (type_descriptor "ltc_ecc_set_type *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_ltc_ecc_sets_001ddeb8 + (long)iVar3 * 0x38)" ( (binary_expression "PTR_ltc_ecc_sets_001ddeb8 + (long)iVar3 * 0x38" identifier + (binary_expression "(long)iVar3 * 0x38" (cast_expression "(long)iVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) * number_literal)) ))) )))) ;) (expression_statement "key->idx = iVar3;" (assignment_expression "key->idx = iVar3" (field_expression "key->idx" identifier -> field_identifier) = identifier) ;) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "undefined8 ecc_make_key(undefined8 param_1,undefined8 param_2,int param_3,long param_4)\n\n{\n  int iVar1;\n  int *piVar2;\n  undefined8 uVar3;\n  int iVar4;\n  \n  iVar1 = *(int *)PTR_ltc_ecc_sets_001ddeb8;\n  if (iVar1 < param_3) {\n    if (iVar1 != 0) {\n      iVar4 = 0;\n      piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8;\n      do {\n        piVar2 = piVar2 + 0xe;\n        iVar1 = *piVar2;\n        iVar4 = iVar4 + 1;\n        if (param_3 <= iVar1) goto LAB_0017d6bc;\n      } while (iVar1 != 0);\n    }\n    return 3;\n  }\n  iVar4 = 0;\nLAB_0017d6bc:\n  uVar3 = 3;\n  if ((iVar1 < 0x43) && (iVar1 != 0)) {\n    uVar3 = ecc_make_key_ex(param_1,param_2,param_4,PTR_ltc_ecc_sets_001ddeb8 + (long)iVar4 * 0x38);\n    *(int *)(param_4 + 4) = iVar4;\n  }\n  return uVar3;\n}\n\n" (function_definition "undefined8 ecc_make_key(undefined8 param_1,undefined8 param_2,int param_3,long param_4)\n\n{\n  int iVar1;\n  int *piVar2;\n  undefined8 uVar3;\n  int iVar4;\n  \n  iVar1 = *(int *)PTR_ltc_ecc_sets_001ddeb8;\n  if (iVar1 < param_3) {\n    if (iVar1 != 0) {\n      iVar4 = 0;\n      piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8;\n      do {\n        piVar2 = piVar2 + 0xe;\n        iVar1 = *piVar2;\n        iVar4 = iVar4 + 1;\n        if (param_3 <= iVar1) goto LAB_0017d6bc;\n      } while (iVar1 != 0);\n    }\n    return 3;\n  }\n  iVar4 = 0;\nLAB_0017d6bc:\n  uVar3 = 3;\n  if ((iVar1 < 0x43) && (iVar1 != 0)) {\n    uVar3 = ecc_make_key_ex(param_1,param_2,param_4,PTR_ltc_ecc_sets_001ddeb8 + (long)iVar4 * 0x38);\n    *(int *)(param_4 + 4) = iVar4;\n  }\n  return uVar3;\n}" type_identifier (function_declarator "ecc_make_key(undefined8 param_1,undefined8 param_2,int param_3,long param_4)" identifier (parameter_list "(undefined8 param_1,undefined8 param_2,int param_3,long param_4)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "undefined8 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "long param_4" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  undefined8 uVar3;\n  int iVar4;\n  \n  iVar1 = *(int *)PTR_ltc_ecc_sets_001ddeb8;\n  if (iVar1 < param_3) {\n    if (iVar1 != 0) {\n      iVar4 = 0;\n      piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8;\n      do {\n        piVar2 = piVar2 + 0xe;\n        iVar1 = *piVar2;\n        iVar4 = iVar4 + 1;\n        if (param_3 <= iVar1) goto LAB_0017d6bc;\n      } while (iVar1 != 0);\n    }\n    return 3;\n  }\n  iVar4 = 0;\nLAB_0017d6bc:\n  uVar3 = 3;\n  if ((iVar1 < 0x43) && (iVar1 != 0)) {\n    uVar3 = ecc_make_key_ex(param_1,param_2,param_4,PTR_ltc_ecc_sets_001ddeb8 + (long)iVar4 * 0x38);\n    *(int *)(param_4 + 4) = iVar4;\n  }\n  return uVar3;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "undefined8 uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "iVar1 = *(int *)PTR_ltc_ecc_sets_001ddeb8;" (assignment_expression "iVar1 = *(int *)PTR_ltc_ecc_sets_001ddeb8" identifier = (pointer_expression "*(int *)PTR_ltc_ecc_sets_001ddeb8" * (cast_expression "(int *)PTR_ltc_ecc_sets_001ddeb8" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (if_statement "if (iVar1 < param_3) {\n    if (iVar1 != 0) {\n      iVar4 = 0;\n      piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8;\n      do {\n        piVar2 = piVar2 + 0xe;\n        iVar1 = *piVar2;\n        iVar4 = iVar4 + 1;\n        if (param_3 <= iVar1) goto LAB_0017d6bc;\n      } while (iVar1 != 0);\n    }\n    return 3;\n  }" if (parenthesized_expression "(iVar1 < param_3)" ( (binary_expression "iVar1 < param_3" identifier < identifier) )) (compound_statement "{\n    if (iVar1 != 0) {\n      iVar4 = 0;\n      piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8;\n      do {\n        piVar2 = piVar2 + 0xe;\n        iVar1 = *piVar2;\n        iVar4 = iVar4 + 1;\n        if (param_3 <= iVar1) goto LAB_0017d6bc;\n      } while (iVar1 != 0);\n    }\n    return 3;\n  }" { (if_statement "if (iVar1 != 0) {\n      iVar4 = 0;\n      piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8;\n      do {\n        piVar2 = piVar2 + 0xe;\n        iVar1 = *piVar2;\n        iVar4 = iVar4 + 1;\n        if (param_3 <= iVar1) goto LAB_0017d6bc;\n      } while (iVar1 != 0);\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      iVar4 = 0;\n      piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8;\n      do {\n        piVar2 = piVar2 + 0xe;\n        iVar1 = *piVar2;\n        iVar4 = iVar4 + 1;\n        if (param_3 <= iVar1) goto LAB_0017d6bc;\n      } while (iVar1 != 0);\n    }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (expression_statement "piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8;" (assignment_expression "piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8" identifier = (cast_expression "(int *)PTR_ltc_ecc_sets_001ddeb8" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) ;) (do_statement "do {\n        piVar2 = piVar2 + 0xe;\n        iVar1 = *piVar2;\n        iVar4 = iVar4 + 1;\n        if (param_3 <= iVar1) goto LAB_0017d6bc;\n      } while (iVar1 != 0);" do (compound_statement "{\n        piVar2 = piVar2 + 0xe;\n        iVar1 = *piVar2;\n        iVar4 = iVar4 + 1;\n        if (param_3 <= iVar1) goto LAB_0017d6bc;\n      }" { (expression_statement "piVar2 = piVar2 + 0xe;" (assignment_expression "piVar2 = piVar2 + 0xe" identifier = (binary_expression "piVar2 + 0xe" identifier + number_literal)) ;) (expression_statement "iVar1 = *piVar2;" (assignment_expression "iVar1 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) ;) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) (if_statement "if (param_3 <= iVar1) goto LAB_0017d6bc;" if (parenthesized_expression "(param_3 <= iVar1)" ( (binary_expression "param_3 <= iVar1" identifier <= identifier) )) (goto_statement "goto LAB_0017d6bc;" goto statement_identifier ;)) }) while (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) ;) })) (return_statement "return 3;" return number_literal ;) })) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (labeled_statement "LAB_0017d6bc:\n  uVar3 = 3;" statement_identifier : (expression_statement "uVar3 = 3;" (assignment_expression "uVar3 = 3" identifier = number_literal) ;)) (if_statement "if ((iVar1 < 0x43) && (iVar1 != 0)) {\n    uVar3 = ecc_make_key_ex(param_1,param_2,param_4,PTR_ltc_ecc_sets_001ddeb8 + (long)iVar4 * 0x38);\n    *(int *)(param_4 + 4) = iVar4;\n  }" if (parenthesized_expression "((iVar1 < 0x43) && (iVar1 != 0))" ( (binary_expression "(iVar1 < 0x43) && (iVar1 != 0)" (parenthesized_expression "(iVar1 < 0x43)" ( (binary_expression "iVar1 < 0x43" identifier < number_literal) )) && (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) ))) )) (compound_statement "{\n    uVar3 = ecc_make_key_ex(param_1,param_2,param_4,PTR_ltc_ecc_sets_001ddeb8 + (long)iVar4 * 0x38);\n    *(int *)(param_4 + 4) = iVar4;\n  }" { (expression_statement "uVar3 = ecc_make_key_ex(param_1,param_2,param_4,PTR_ltc_ecc_sets_001ddeb8 + (long)iVar4 * 0x38);" (assignment_expression "uVar3 = ecc_make_key_ex(param_1,param_2,param_4,PTR_ltc_ecc_sets_001ddeb8 + (long)iVar4 * 0x38)" identifier = (call_expression "ecc_make_key_ex(param_1,param_2,param_4,PTR_ltc_ecc_sets_001ddeb8 + (long)iVar4 * 0x38)" identifier (argument_list "(param_1,param_2,param_4,PTR_ltc_ecc_sets_001ddeb8 + (long)iVar4 * 0x38)" ( identifier , identifier , identifier , (binary_expression "PTR_ltc_ecc_sets_001ddeb8 + (long)iVar4 * 0x38" identifier + (binary_expression "(long)iVar4 * 0x38" (cast_expression "(long)iVar4" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) * number_literal)) )))) ;) (expression_statement "*(int *)(param_4 + 4) = iVar4;" (assignment_expression "*(int *)(param_4 + 4) = iVar4" (pointer_expression "*(int *)(param_4 + 4)" * (cast_expression "(int *)(param_4 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 4)" ( (binary_expression "param_4 + 4" identifier + number_literal) )))) = identifier) ;) })) (return_statement "return uVar3;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration (sized_type_specifier long) IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (goto_statement goto statement_identifier ;)) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) })) (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < LIT) )) && (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) * LIT)) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) })) (return_statement return IDENT ;) })))
(function_definition "undefined8 ecc_make_key(undefined8 param_1,undefined8 param_2,int param_3,long param_4)\n\n{\n  int iVar1;\n  int *piVar2;\n  undefined8 uVar3;\n  int iVar4;\n  \n  iVar1 = *(int *)PTR_ltc_ecc_sets_001ddeb8;\n  if (iVar1 < param_3) {\n    if (iVar1 != 0) {\n      iVar4 = 0;\n      piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8;\n      do {\n        piVar2 = piVar2 + 0xe;\n        iVar1 = *piVar2;\n        iVar4 = iVar4 + 1;\n        if (param_3 <= iVar1) goto LAB_0017d6bc;\n      } while (iVar1 != 0);\n    }\n    return 3;\n  }\n  iVar4 = 0;\nLAB_0017d6bc:\n  uVar3 = 3;\n  if ((iVar1 < 0x43) && (iVar1 != 0)) {\n    uVar3 = ecc_make_key_ex(param_1,param_2,param_4,PTR_ltc_ecc_sets_001ddeb8 + (long)iVar4 * 0x38);\n    *(int *)(param_4 + 4) = iVar4;\n  }\n  return uVar3;\n}" (type_identifier "undefined8") (function_declarator "ecc_make_key(undefined8 param_1,undefined8 param_2,int param_3,long param_4)" (identifier "ecc_make_key") (parameter_list "(undefined8 param_1,undefined8 param_2,int param_3,long param_4)" (( "(") (parameter_declaration "undefined8 param_1" (type_identifier "undefined8") (identifier "param_1")) (, ",") (parameter_declaration "undefined8 param_2" (type_identifier "undefined8") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "long param_4" (sized_type_specifier "long" (long "long")) (identifier "param_4")) () ")"))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  undefined8 uVar3;\n  int iVar4;\n  \n  iVar1 = *(int *)PTR_ltc_ecc_sets_001ddeb8;\n  if (iVar1 < param_3) {\n    if (iVar1 != 0) {\n      iVar4 = 0;\n      piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8;\n      do {\n        piVar2 = piVar2 + 0xe;\n        iVar1 = *piVar2;\n        iVar4 = iVar4 + 1;\n        if (param_3 <= iVar1) goto LAB_0017d6bc;\n      } while (iVar1 != 0);\n    }\n    return 3;\n  }\n  iVar4 = 0;\nLAB_0017d6bc:\n  uVar3 = 3;\n  if ((iVar1 < 0x43) && (iVar1 != 0)) {\n    uVar3 = ecc_make_key_ex(param_1,param_2,param_4,PTR_ltc_ecc_sets_001ddeb8 + (long)iVar4 * 0x38);\n    *(int *)(param_4 + 4) = iVar4;\n  }\n  return uVar3;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "undefined8 uVar3;" (type_identifier "undefined8") (identifier "uVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (expression_statement "iVar1 = *(int *)PTR_ltc_ecc_sets_001ddeb8;" (assignment_expression "iVar1 = *(int *)PTR_ltc_ecc_sets_001ddeb8" (identifier "iVar1") (= "=") (pointer_expression "*(int *)PTR_ltc_ecc_sets_001ddeb8" (* "*") (cast_expression "(int *)PTR_ltc_ecc_sets_001ddeb8" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_ltc_ecc_sets_001ddeb8")))) (; ";")) (if_statement "if (iVar1 < param_3) {\n    if (iVar1 != 0) {\n      iVar4 = 0;\n      piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8;\n      do {\n        piVar2 = piVar2 + 0xe;\n        iVar1 = *piVar2;\n        iVar4 = iVar4 + 1;\n        if (param_3 <= iVar1) goto LAB_0017d6bc;\n      } while (iVar1 != 0);\n    }\n    return 3;\n  }" (if "if") (parenthesized_expression "(iVar1 < param_3)" (( "(") (binary_expression "iVar1 < param_3" (identifier "iVar1") (< "<") (identifier "param_3")) () ")")) (compound_statement "{\n    if (iVar1 != 0) {\n      iVar4 = 0;\n      piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8;\n      do {\n        piVar2 = piVar2 + 0xe;\n        iVar1 = *piVar2;\n        iVar4 = iVar4 + 1;\n        if (param_3 <= iVar1) goto LAB_0017d6bc;\n      } while (iVar1 != 0);\n    }\n    return 3;\n  }" ({ "{") (if_statement "if (iVar1 != 0) {\n      iVar4 = 0;\n      piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8;\n      do {\n        piVar2 = piVar2 + 0xe;\n        iVar1 = *piVar2;\n        iVar4 = iVar4 + 1;\n        if (param_3 <= iVar1) goto LAB_0017d6bc;\n      } while (iVar1 != 0);\n    }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      iVar4 = 0;\n      piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8;\n      do {\n        piVar2 = piVar2 + 0xe;\n        iVar1 = *piVar2;\n        iVar4 = iVar4 + 1;\n        if (param_3 <= iVar1) goto LAB_0017d6bc;\n      } while (iVar1 != 0);\n    }" ({ "{") (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" (identifier "iVar4") (= "=") (number_literal "0")) (; ";")) (expression_statement "piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8;" (assignment_expression "piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8" (identifier "piVar2") (= "=") (cast_expression "(int *)PTR_ltc_ecc_sets_001ddeb8" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_ltc_ecc_sets_001ddeb8"))) (; ";")) (do_statement "do {\n        piVar2 = piVar2 + 0xe;\n        iVar1 = *piVar2;\n        iVar4 = iVar4 + 1;\n        if (param_3 <= iVar1) goto LAB_0017d6bc;\n      } while (iVar1 != 0);" (do "do") (compound_statement "{\n        piVar2 = piVar2 + 0xe;\n        iVar1 = *piVar2;\n        iVar4 = iVar4 + 1;\n        if (param_3 <= iVar1) goto LAB_0017d6bc;\n      }" ({ "{") (expression_statement "piVar2 = piVar2 + 0xe;" (assignment_expression "piVar2 = piVar2 + 0xe" (identifier "piVar2") (= "=") (binary_expression "piVar2 + 0xe" (identifier "piVar2") (+ "+") (number_literal "0xe"))) (; ";")) (expression_statement "iVar1 = *piVar2;" (assignment_expression "iVar1 = *piVar2" (identifier "iVar1") (= "=") (pointer_expression "*piVar2" (* "*") (identifier "piVar2"))) (; ";")) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" (identifier "iVar4") (= "=") (binary_expression "iVar4 + 1" (identifier "iVar4") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (param_3 <= iVar1) goto LAB_0017d6bc;" (if "if") (parenthesized_expression "(param_3 <= iVar1)" (( "(") (binary_expression "param_3 <= iVar1" (identifier "param_3") (<= "<=") (identifier "iVar1")) () ")")) (goto_statement "goto LAB_0017d6bc;" (goto "goto") (statement_identifier "LAB_0017d6bc") (; ";"))) (} "}")) (while "while") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (; ";")) (} "}"))) (return_statement "return 3;" (return "return") (number_literal "3") (; ";")) (} "}"))) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" (identifier "iVar4") (= "=") (number_literal "0")) (; ";")) (labeled_statement "LAB_0017d6bc:\n  uVar3 = 3;" (statement_identifier "LAB_0017d6bc") (: ":") (expression_statement "uVar3 = 3;" (assignment_expression "uVar3 = 3" (identifier "uVar3") (= "=") (number_literal "3")) (; ";"))) (if_statement "if ((iVar1 < 0x43) && (iVar1 != 0)) {\n    uVar3 = ecc_make_key_ex(param_1,param_2,param_4,PTR_ltc_ecc_sets_001ddeb8 + (long)iVar4 * 0x38);\n    *(int *)(param_4 + 4) = iVar4;\n  }" (if "if") (parenthesized_expression "((iVar1 < 0x43) && (iVar1 != 0))" (( "(") (binary_expression "(iVar1 < 0x43) && (iVar1 != 0)" (parenthesized_expression "(iVar1 < 0x43)" (( "(") (binary_expression "iVar1 < 0x43" (identifier "iVar1") (< "<") (number_literal "0x43")) () ")")) (&& "&&") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    uVar3 = ecc_make_key_ex(param_1,param_2,param_4,PTR_ltc_ecc_sets_001ddeb8 + (long)iVar4 * 0x38);\n    *(int *)(param_4 + 4) = iVar4;\n  }" ({ "{") (expression_statement "uVar3 = ecc_make_key_ex(param_1,param_2,param_4,PTR_ltc_ecc_sets_001ddeb8 + (long)iVar4 * 0x38);" (assignment_expression "uVar3 = ecc_make_key_ex(param_1,param_2,param_4,PTR_ltc_ecc_sets_001ddeb8 + (long)iVar4 * 0x38)" (identifier "uVar3") (= "=") (call_expression "ecc_make_key_ex(param_1,param_2,param_4,PTR_ltc_ecc_sets_001ddeb8 + (long)iVar4 * 0x38)" (identifier "ecc_make_key_ex") (argument_list "(param_1,param_2,param_4,PTR_ltc_ecc_sets_001ddeb8 + (long)iVar4 * 0x38)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "param_4") (, ",") (binary_expression "PTR_ltc_ecc_sets_001ddeb8 + (long)iVar4 * 0x38" (identifier "PTR_ltc_ecc_sets_001ddeb8") (+ "+") (binary_expression "(long)iVar4 * 0x38" (cast_expression "(long)iVar4" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "iVar4")) (* "*") (number_literal "0x38"))) () ")")))) (; ";")) (expression_statement "*(int *)(param_4 + 4) = iVar4;" (assignment_expression "*(int *)(param_4 + 4) = iVar4" (pointer_expression "*(int *)(param_4 + 4)" (* "*") (cast_expression "(int *)(param_4 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_4 + 4)" (( "(") (binary_expression "param_4 + 4" (identifier "param_4") (+ "+") (number_literal "4")) () ")")))) (= "=") (identifier "iVar4")) (; ";")) (} "}"))) (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}")))

int function_1(type_1 *prng,int wprng,int var_2,type_2 *key)

{
  int iVar1;
  int *var_3;
  int var_4;
  int var_1;
  
  var_1 = *(int *)var_6;
  if (var_1 < var_2) {
    if (var_1 != 0) {
      var_4 = 0;
      var_3 = (int *)var_6;
      do {
        var_3 = var_3 + 0xe;
        var_1 = *var_3;
        var_4 = var_4 + 1;
        if (var_2 <= var_1) goto LAB_0017d6bc;
      } while (var_1 != 0);
    }
    return 3;
  }
  var_4 = 0;
LAB_0017d6bc:
  iVar1 = 3;
  if ((var_1 < 0x43) && (var_1 != 0)) {
    iVar1 = var_5(prng,wprng,key,
                            (type_3 *)(var_6 + (long)var_4 * 0x38));
    key->idx = var_4;
  }
  return iVar1;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (sized_type_specifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) 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))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier)))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (goto_statement label: (statement_identifier)))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (binary_expression left: (identifier) right: (binary_expression left: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)) right: (number_literal))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))))) (return_statement (identifier)))))

undefined8 MASKED(undefined8 param_1,undefined8 param_2,int param_3,long param_4)

{
  int iVar1;
  int *piVar2;
  undefined8 uVar3;
  int iVar4;
  
  iVar1 = *(int *)PTR_ltc_ecc_sets_001ddeb8;
  if (iVar1 < param_3) {
    if (iVar1 != 0) {
      iVar4 = 0;
      piVar2 = (int *)PTR_ltc_ecc_sets_001ddeb8;
      do {
        piVar2 = piVar2 + 0xe;
        iVar1 = *piVar2;
        iVar4 = iVar4 + 1;
        if (param_3 <= iVar1) goto LAB_0017d6bc;
      } while (iVar1 != 0);
    }
    return 3;
  }
  iVar4 = 0;
LAB_0017d6bc:
  uVar3 = 3;
  if ((iVar1 < 0x43) && (iVar1 != 0)) {
    uVar3 = MASKED_ex(param_1,param_2,param_4,PTR_ltc_ecc_sets_001ddeb8 + (long)iVar4 * 0x38);
    *(int *)(param_4 + 4) = iVar4;
  }
  return uVar3;
}

