
/* DWARF original prototype: uint * add(Stringpool_template<unsigned_int> * this, uint * s, bool
   copy, Key * pkey) */

uint * __thiscall
gold::Stringpool_template<unsigned_int>::add
          (Stringpool_template<unsigned_int> *this,uint *s,bool copy,Key *pkey)

{
  size_t length;
  uint *puVar1;
  
  length = *s;
  if (length != 0) {
    length = 0;
    do {
      length = length + 1;
    } while (s[length] != 0);
  }
  puVar1 = add_with_length(this,s,length,copy,pkey);
  return puVar1;
}



void FUN_0014c8c0(undefined4 param_1,int *param_2,undefined1 param_3,undefined4 param_4)

{
  int iVar1;
  
  iVar1 = *param_2;
  if (iVar1 != 0) {
    iVar1 = 0;
    do {
      iVar1 = iVar1 + 1;
    } while (param_2[iVar1] != 0);
  }
  FUN_0014c710(param_1,param_2,iVar1,param_3,param_4);
  return;
}


SUB ESP,0xc
MOV EDX,dword ptr [ESP + 0x14]
MOVZX ECX,byte ptr [ESP + 0x18]
MOV EAX,dword ptr [EDX]
TEST EAX,EAX
JZ 0x0014c8e1
XOR EAX,EAX
LEA ESI,[ESI]
ADD EAX,0x1
CMP dword ptr [EDX + EAX*0x4],0x0
JNZ 0x0014c8d8
SUB ESP,0xc
PUSH dword ptr [ESP + 0x28]
PUSH ECX
PUSH EAX
PUSH EDX
PUSH dword ptr [ESP + 0x2c]
CALL 0x0014c710
ADD ESP,0x2c
RET
(translation_unit "void FUN_0014c8c0(undefined4 param_1,int *param_2,undefined1 param_3,undefined4 param_4)\n\n{\n  int iVar1;\n  \n  iVar1 = *param_2;\n  if (iVar1 != 0) {\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n    } while (param_2[iVar1] != 0);\n  }\n  FUN_0014c710(param_1,param_2,iVar1,param_3,param_4);\n  return;\n}\n\n" (function_definition "void FUN_0014c8c0(undefined4 param_1,int *param_2,undefined1 param_3,undefined4 param_4)\n\n{\n  int iVar1;\n  \n  iVar1 = *param_2;\n  if (iVar1 != 0) {\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n    } while (param_2[iVar1] != 0);\n  }\n  FUN_0014c710(param_1,param_2,iVar1,param_3,param_4);\n  return;\n}" primitive_type (function_declarator "FUN_0014c8c0(undefined4 param_1,int *param_2,undefined1 param_3,undefined4 param_4)" identifier (parameter_list "(undefined4 param_1,int *param_2,undefined1 param_3,undefined4 param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined1 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = *param_2;\n  if (iVar1 != 0) {\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n    } while (param_2[iVar1] != 0);\n  }\n  FUN_0014c710(param_1,param_2,iVar1,param_3,param_4);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = *param_2;" (assignment_expression "iVar1 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (if_statement "if (iVar1 != 0) {\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n    } while (param_2[iVar1] != 0);\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n    } while (param_2[iVar1] != 0);\n  }" { (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (do_statement "do {\n      iVar1 = iVar1 + 1;\n    } while (param_2[iVar1] != 0);" do (compound_statement "{\n      iVar1 = iVar1 + 1;\n    }" { (expression_statement "iVar1 = iVar1 + 1;" (assignment_expression "iVar1 = iVar1 + 1" identifier = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(param_2[iVar1] != 0)" ( (binary_expression "param_2[iVar1] != 0" (subscript_expression "param_2[iVar1]" identifier [ identifier ]) != number_literal) )) ;) })) (expression_statement "FUN_0014c710(param_1,param_2,iVar1,param_3,param_4);" (call_expression "FUN_0014c710(param_1,param_2,iVar1,param_3,param_4)" identifier (argument_list "(param_1,param_2,iVar1,param_3,param_4)" ( identifier , identifier , identifier , identifier , identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* DWARF original prototype: uint * add(Stringpool_template<unsigned_int> * this, uint * s, bool\n   copy, Key * pkey) */\n\nuint * __thiscall\ngold::Stringpool_template<unsigned_int>::add\n          (Stringpool_template<unsigned_int> *this,uint *s,bool copy,Key *pkey)\n\n{\n  size_t length;\n  uint *puVar1;\n  \n  length = *s;\n  if (length != 0) {\n    length = 0;\n    do {\n      length = length + 1;\n    } while (s[length] != 0);\n  }\n  puVar1 = add_with_length(this,s,length,copy,pkey);\n  return puVar1;\n}\n\n" comment (ERROR "uint * __thiscall\ngold::Stringpool_template<unsigned_int>::add\n          (Stringpool_template<unsigned_int> *this,uint *s,bool copy,Key *pkey)" (binary_expression "uint * __thiscall\ngold::Stringpool_template<unsigned_int>::add\n          (Stringpool_template<unsigned_int> *this,uint *s,bool copy,Key *pkey)" (binary_expression "uint * __thiscall\ngold::Stringpool_template<unsigned_int" (binary_expression "uint * __thiscall" identifier * identifier) (ERROR "gold::Stringpool_template" identifier : : identifier) < identifier) > (ERROR "::" : :) (call_expression "add\n          (Stringpool_template<unsigned_int> *this,uint *s,bool copy,Key *pkey)" identifier (argument_list "(Stringpool_template<unsigned_int> *this,uint *s,bool copy,Key *pkey)" ( (binary_expression "Stringpool_template<unsigned_int> *this" (binary_expression "Stringpool_template<unsigned_int" identifier < identifier) > (pointer_expression "*this" * identifier)) , (binary_expression "uint *s" identifier * identifier) , identifier (ERROR "copy" identifier) , (binary_expression "Key *pkey" identifier * identifier) ))))) (compound_statement "{\n  size_t length;\n  uint *puVar1;\n  \n  length = *s;\n  if (length != 0) {\n    length = 0;\n    do {\n      length = length + 1;\n    } while (s[length] != 0);\n  }\n  puVar1 = add_with_length(this,s,length,copy,pkey);\n  return puVar1;\n}" { (declaration "size_t length;" primitive_type identifier ;) (declaration "uint *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (expression_statement "length = *s;" (assignment_expression "length = *s" identifier = (pointer_expression "*s" * identifier)) ;) (if_statement "if (length != 0) {\n    length = 0;\n    do {\n      length = length + 1;\n    } while (s[length] != 0);\n  }" if (parenthesized_expression "(length != 0)" ( (binary_expression "length != 0" identifier != number_literal) )) (compound_statement "{\n    length = 0;\n    do {\n      length = length + 1;\n    } while (s[length] != 0);\n  }" { (expression_statement "length = 0;" (assignment_expression "length = 0" identifier = number_literal) ;) (do_statement "do {\n      length = length + 1;\n    } while (s[length] != 0);" do (compound_statement "{\n      length = length + 1;\n    }" { (expression_statement "length = length + 1;" (assignment_expression "length = length + 1" identifier = (binary_expression "length + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(s[length] != 0)" ( (binary_expression "s[length] != 0" (subscript_expression "s[length]" identifier [ identifier ]) != number_literal) )) ;) })) (expression_statement "puVar1 = add_with_length(this,s,length,copy,pkey);" (assignment_expression "puVar1 = add_with_length(this,s,length,copy,pkey)" identifier = (call_expression "add_with_length(this,s,length,copy,pkey)" identifier (argument_list "(this,s,length,copy,pkey)" ( identifier , identifier , identifier , identifier , identifier )))) ;) (return_statement "return puVar1;" return identifier ;) }))
(translation_unit "void FUN_0014c8c0(undefined4 param_1,int *param_2,undefined1 param_3,undefined4 param_4)\n\n{\n  int iVar1;\n  \n  iVar1 = *param_2;\n  if (iVar1 != 0) {\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n    } while (param_2[iVar1] != 0);\n  }\n  FUN_0014c710(param_1,param_2,iVar1,param_3,param_4);\n  return;\n}\n\n" (function_definition "void FUN_0014c8c0(undefined4 param_1,int *param_2,undefined1 param_3,undefined4 param_4)\n\n{\n  int iVar1;\n  \n  iVar1 = *param_2;\n  if (iVar1 != 0) {\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n    } while (param_2[iVar1] != 0);\n  }\n  FUN_0014c710(param_1,param_2,iVar1,param_3,param_4);\n  return;\n}" primitive_type (function_declarator "FUN_0014c8c0(undefined4 param_1,int *param_2,undefined1 param_3,undefined4 param_4)" identifier (parameter_list "(undefined4 param_1,int *param_2,undefined1 param_3,undefined4 param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined1 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = *param_2;\n  if (iVar1 != 0) {\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n    } while (param_2[iVar1] != 0);\n  }\n  FUN_0014c710(param_1,param_2,iVar1,param_3,param_4);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = *param_2;" (assignment_expression "iVar1 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (if_statement "if (iVar1 != 0) {\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n    } while (param_2[iVar1] != 0);\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n    } while (param_2[iVar1] != 0);\n  }" { (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (do_statement "do {\n      iVar1 = iVar1 + 1;\n    } while (param_2[iVar1] != 0);" do (compound_statement "{\n      iVar1 = iVar1 + 1;\n    }" { (expression_statement "iVar1 = iVar1 + 1;" (assignment_expression "iVar1 = iVar1 + 1" identifier = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(param_2[iVar1] != 0)" ( (binary_expression "param_2[iVar1] != 0" (subscript_expression "param_2[iVar1]" identifier [ identifier ]) != number_literal) )) ;) })) (expression_statement "FUN_0014c710(param_1,param_2,iVar1,param_3,param_4);" (call_expression "FUN_0014c710(param_1,param_2,iVar1,param_3,param_4)" identifier (argument_list "(param_1,param_2,iVar1,param_3,param_4)" ( identifier , identifier , identifier , identifier , identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ IDENT ]) != LIT) )) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT , IDENT ))) ;) (return_statement return ;) })))
(function_definition "void FUN_0014c8c0(undefined4 param_1,int *param_2,undefined1 param_3,undefined4 param_4)\n\n{\n  int iVar1;\n  \n  iVar1 = *param_2;\n  if (iVar1 != 0) {\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n    } while (param_2[iVar1] != 0);\n  }\n  FUN_0014c710(param_1,param_2,iVar1,param_3,param_4);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0014c8c0(undefined4 param_1,int *param_2,undefined1 param_3,undefined4 param_4)" (identifier "FUN_0014c8c0") (parameter_list "(undefined4 param_1,int *param_2,undefined1 param_3,undefined4 param_4)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "int *param_2" (primitive_type "int") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "undefined1 param_3" (type_identifier "undefined1") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 param_4" (type_identifier "undefined4") (identifier "param_4")) () ")"))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = *param_2;\n  if (iVar1 != 0) {\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n    } while (param_2[iVar1] != 0);\n  }\n  FUN_0014c710(param_1,param_2,iVar1,param_3,param_4);\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (expression_statement "iVar1 = *param_2;" (assignment_expression "iVar1 = *param_2" (identifier "iVar1") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (if_statement "if (iVar1 != 0) {\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n    } while (param_2[iVar1] != 0);\n  }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    iVar1 = 0;\n    do {\n      iVar1 = iVar1 + 1;\n    } while (param_2[iVar1] != 0);\n  }" ({ "{") (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" (identifier "iVar1") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n      iVar1 = iVar1 + 1;\n    } while (param_2[iVar1] != 0);" (do "do") (compound_statement "{\n      iVar1 = iVar1 + 1;\n    }" ({ "{") (expression_statement "iVar1 = iVar1 + 1;" (assignment_expression "iVar1 = iVar1 + 1" (identifier "iVar1") (= "=") (binary_expression "iVar1 + 1" (identifier "iVar1") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(param_2[iVar1] != 0)" (( "(") (binary_expression "param_2[iVar1] != 0" (subscript_expression "param_2[iVar1]" (identifier "param_2") ([ "[") (identifier "iVar1") (] "]")) (!= "!=") (number_literal "0")) () ")")) (; ";")) (} "}"))) (expression_statement "FUN_0014c710(param_1,param_2,iVar1,param_3,param_4);" (call_expression "FUN_0014c710(param_1,param_2,iVar1,param_3,param_4)" (identifier "FUN_0014c710") (argument_list "(param_1,param_2,iVar1,param_3,param_4)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "iVar1") (, ",") (identifier "param_3") (, ",") (identifier "param_4") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* DWARF original prototype: uint * add(Stringpool_template<unsigned_int> * this, uint * s, bool
   copy, Key * pkey) */

type_1 * __thiscall
gold::Stringpool_template<unsigned_int>::add
          (Stringpool_template<unsigned_int> *this,type_1 *s,bool copy,Key *pkey)

{
  size_t var_1;
  type_1 *puVar1;
  
  var_1 = *s;
  if (var_1 != 0) {
    var_1 = 0;
    do {
      var_1 = var_1 + 1;
    } while (s[var_1] != 0);
  }
  puVar1 = var_2(this,s,var_1,copy,pkey);
  return puVar1;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (identifier)) right: (number_literal)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (identifier) (identifier)))) (return_statement))))

void MASKED(undefined4 param_1,int *param_2,undefined1 param_3,undefined4 param_4)

{
  int iVar1;
  
  iVar1 = *param_2;
  if (iVar1 != 0) {
    iVar1 = 0;
    do {
      iVar1 = iVar1 + 1;
    } while (param_2[iVar1] != 0);
  }
  FUN_0014c710(param_1,param_2,iVar1,param_3,param_4);
  return;
}

