
/* std::collate<char>::do_hash(char const*, char const*) const */

ulong __thiscall std::collate<char>::do_hash(collate<char> *this,char *param_1,char *param_2)

{
  char cVar1;
  ulong uVar2;
  
  uVar2 = 0;
  if (param_2 <= param_1) {
    return 0;
  }
  do {
    cVar1 = *param_1;
    param_1 = param_1 + 1;
    uVar2 = (uVar2 << 7 | uVar2 >> 0x39) + (long)cVar1;
  } while (param_2 != param_1);
  return uVar2;
}



ulong FUN_0030d400(undefined8 param_1,char *param_2,char *param_3)

{
  char cVar1;
  ulong uVar2;
  
  uVar2 = 0;
  if (param_3 <= param_2) {
    return 0;
  }
  do {
    cVar1 = *param_2;
    param_2 = param_2 + 1;
    uVar2 = (uVar2 << 7 | uVar2 >> 0x39) + (long)cVar1;
  } while (param_3 != param_2);
  return uVar2;
}


XOR EAX,EAX
CMP RSI,RDX
JNC 0x0030d428
NOP word ptr [RAX + RAX*0x1]
MOVSX RCX,byte ptr [RSI]
ROL RAX,0x7
ADD RSI,0x1
ADD RAX,RCX
CMP RDX,RSI
JNZ 0x0030d410
RET
RET
(translation_unit "ulong FUN_0030d400(undefined8 param_1,char *param_2,char *param_3)\n\n{\n  char cVar1;\n  ulong uVar2;\n  \n  uVar2 = 0;\n  if (param_3 <= param_2) {\n    return 0;\n  }\n  do {\n    cVar1 = *param_2;\n    param_2 = param_2 + 1;\n    uVar2 = (uVar2 << 7 | uVar2 >> 0x39) + (long)cVar1;\n  } while (param_3 != param_2);\n  return uVar2;\n}\n\n" (function_definition "ulong FUN_0030d400(undefined8 param_1,char *param_2,char *param_3)\n\n{\n  char cVar1;\n  ulong uVar2;\n  \n  uVar2 = 0;\n  if (param_3 <= param_2) {\n    return 0;\n  }\n  do {\n    cVar1 = *param_2;\n    param_2 = param_2 + 1;\n    uVar2 = (uVar2 << 7 | uVar2 >> 0x39) + (long)cVar1;\n  } while (param_3 != param_2);\n  return uVar2;\n}" type_identifier (function_declarator "FUN_0030d400(undefined8 param_1,char *param_2,char *param_3)" identifier (parameter_list "(undefined8 param_1,char *param_2,char *param_3)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "char *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  char cVar1;\n  ulong uVar2;\n  \n  uVar2 = 0;\n  if (param_3 <= param_2) {\n    return 0;\n  }\n  do {\n    cVar1 = *param_2;\n    param_2 = param_2 + 1;\n    uVar2 = (uVar2 << 7 | uVar2 >> 0x39) + (long)cVar1;\n  } while (param_3 != param_2);\n  return uVar2;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "ulong uVar2;" type_identifier identifier ;) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (if_statement "if (param_3 <= param_2) {\n    return 0;\n  }" if (parenthesized_expression "(param_3 <= param_2)" ( (binary_expression "param_3 <= param_2" identifier <= identifier) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (do_statement "do {\n    cVar1 = *param_2;\n    param_2 = param_2 + 1;\n    uVar2 = (uVar2 << 7 | uVar2 >> 0x39) + (long)cVar1;\n  } while (param_3 != param_2);" do (compound_statement "{\n    cVar1 = *param_2;\n    param_2 = param_2 + 1;\n    uVar2 = (uVar2 << 7 | uVar2 >> 0x39) + (long)cVar1;\n  }" { (expression_statement "cVar1 = *param_2;" (assignment_expression "cVar1 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "param_2 = param_2 + 1;" (assignment_expression "param_2 = param_2 + 1" identifier = (binary_expression "param_2 + 1" identifier + number_literal)) ;) (expression_statement "uVar2 = (uVar2 << 7 | uVar2 >> 0x39) + (long)cVar1;" (assignment_expression "uVar2 = (uVar2 << 7 | uVar2 >> 0x39) + (long)cVar1" identifier = (binary_expression "(uVar2 << 7 | uVar2 >> 0x39) + (long)cVar1" (parenthesized_expression "(uVar2 << 7 | uVar2 >> 0x39)" ( (binary_expression "uVar2 << 7 | uVar2 >> 0x39" (binary_expression "uVar2 << 7" identifier << number_literal) | (binary_expression "uVar2 >> 0x39" identifier >> number_literal)) )) + (cast_expression "(long)cVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier))) ;) }) while (parenthesized_expression "(param_3 != param_2)" ( (binary_expression "param_3 != param_2" identifier != identifier) )) ;) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "/* std::collate<char>::do_hash(char const*, char const*) const */\n\nulong __thiscall std::collate<char>::do_hash(collate<char> *this,char *param_1,char *param_2)\n\n{\n  char cVar1;\n  ulong uVar2;\n  \n  uVar2 = 0;\n  if (param_2 <= param_1) {\n    return 0;\n  }\n  do {\n    cVar1 = *param_1;\n    param_1 = param_1 + 1;\n    uVar2 = (uVar2 << 7 | uVar2 >> 0x39) + (long)cVar1;\n  } while (param_2 != param_1);\n  return uVar2;\n}\n\n" comment (function_definition "ulong __thiscall std::collate<char>::do_hash(collate<char> *this,char *param_1,char *param_2)\n\n{\n  char cVar1;\n  ulong uVar2;\n  \n  uVar2 = 0;\n  if (param_2 <= param_1) {\n    return 0;\n  }\n  do {\n    cVar1 = *param_1;\n    param_1 = param_1 + 1;\n    uVar2 = (uVar2 << 7 | uVar2 >> 0x39) + (long)cVar1;\n  } while (param_2 != param_1);\n  return uVar2;\n}" type_identifier (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::collate<char>::" identifier : : identifier < primitive_type > : :) (function_declarator "do_hash(collate<char> *this,char *param_1,char *param_2)" identifier (parameter_list "(collate<char> *this,char *param_1,char *param_2)" ( (parameter_declaration "collate<char> *this" type_identifier (ERROR "<char>" < primitive_type >) (pointer_declarator "*this" * identifier)) , (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  char cVar1;\n  ulong uVar2;\n  \n  uVar2 = 0;\n  if (param_2 <= param_1) {\n    return 0;\n  }\n  do {\n    cVar1 = *param_1;\n    param_1 = param_1 + 1;\n    uVar2 = (uVar2 << 7 | uVar2 >> 0x39) + (long)cVar1;\n  } while (param_2 != param_1);\n  return uVar2;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "ulong uVar2;" type_identifier identifier ;) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (if_statement "if (param_2 <= param_1) {\n    return 0;\n  }" if (parenthesized_expression "(param_2 <= param_1)" ( (binary_expression "param_2 <= param_1" identifier <= identifier) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (do_statement "do {\n    cVar1 = *param_1;\n    param_1 = param_1 + 1;\n    uVar2 = (uVar2 << 7 | uVar2 >> 0x39) + (long)cVar1;\n  } while (param_2 != param_1);" do (compound_statement "{\n    cVar1 = *param_1;\n    param_1 = param_1 + 1;\n    uVar2 = (uVar2 << 7 | uVar2 >> 0x39) + (long)cVar1;\n  }" { (expression_statement "cVar1 = *param_1;" (assignment_expression "cVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (expression_statement "uVar2 = (uVar2 << 7 | uVar2 >> 0x39) + (long)cVar1;" (assignment_expression "uVar2 = (uVar2 << 7 | uVar2 >> 0x39) + (long)cVar1" identifier = (binary_expression "(uVar2 << 7 | uVar2 >> 0x39) + (long)cVar1" (parenthesized_expression "(uVar2 << 7 | uVar2 >> 0x39)" ( (binary_expression "uVar2 << 7 | uVar2 >> 0x39" (binary_expression "uVar2 << 7" identifier << number_literal) | (binary_expression "uVar2 >> 0x39" identifier >> number_literal)) )) + (cast_expression "(long)cVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier))) ;) }) while (parenthesized_expression "(param_2 != param_1)" ( (binary_expression "param_2 != param_1" identifier != identifier) )) ;) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "ulong FUN_0030d400(undefined8 param_1,char *param_2,char *param_3)\n\n{\n  char cVar1;\n  ulong uVar2;\n  \n  uVar2 = 0;\n  if (param_3 <= param_2) {\n    return 0;\n  }\n  do {\n    cVar1 = *param_2;\n    param_2 = param_2 + 1;\n    uVar2 = (uVar2 << 7 | uVar2 >> 0x39) + (long)cVar1;\n  } while (param_3 != param_2);\n  return uVar2;\n}\n\n" (function_definition "ulong FUN_0030d400(undefined8 param_1,char *param_2,char *param_3)\n\n{\n  char cVar1;\n  ulong uVar2;\n  \n  uVar2 = 0;\n  if (param_3 <= param_2) {\n    return 0;\n  }\n  do {\n    cVar1 = *param_2;\n    param_2 = param_2 + 1;\n    uVar2 = (uVar2 << 7 | uVar2 >> 0x39) + (long)cVar1;\n  } while (param_3 != param_2);\n  return uVar2;\n}" type_identifier (function_declarator "FUN_0030d400(undefined8 param_1,char *param_2,char *param_3)" identifier (parameter_list "(undefined8 param_1,char *param_2,char *param_3)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "char *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  char cVar1;\n  ulong uVar2;\n  \n  uVar2 = 0;\n  if (param_3 <= param_2) {\n    return 0;\n  }\n  do {\n    cVar1 = *param_2;\n    param_2 = param_2 + 1;\n    uVar2 = (uVar2 << 7 | uVar2 >> 0x39) + (long)cVar1;\n  } while (param_3 != param_2);\n  return uVar2;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "ulong uVar2;" type_identifier identifier ;) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (if_statement "if (param_3 <= param_2) {\n    return 0;\n  }" if (parenthesized_expression "(param_3 <= param_2)" ( (binary_expression "param_3 <= param_2" identifier <= identifier) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (do_statement "do {\n    cVar1 = *param_2;\n    param_2 = param_2 + 1;\n    uVar2 = (uVar2 << 7 | uVar2 >> 0x39) + (long)cVar1;\n  } while (param_3 != param_2);" do (compound_statement "{\n    cVar1 = *param_2;\n    param_2 = param_2 + 1;\n    uVar2 = (uVar2 << 7 | uVar2 >> 0x39) + (long)cVar1;\n  }" { (expression_statement "cVar1 = *param_2;" (assignment_expression "cVar1 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "param_2 = param_2 + 1;" (assignment_expression "param_2 = param_2 + 1" identifier = (binary_expression "param_2 + 1" identifier + number_literal)) ;) (expression_statement "uVar2 = (uVar2 << 7 | uVar2 >> 0x39) + (long)cVar1;" (assignment_expression "uVar2 = (uVar2 << 7 | uVar2 >> 0x39) + (long)cVar1" identifier = (binary_expression "(uVar2 << 7 | uVar2 >> 0x39) + (long)cVar1" (parenthesized_expression "(uVar2 << 7 | uVar2 >> 0x39)" ( (binary_expression "uVar2 << 7 | uVar2 >> 0x39" (binary_expression "uVar2 << 7" identifier << number_literal) | (binary_expression "uVar2 >> 0x39" identifier >> number_literal)) )) + (cast_expression "(long)cVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier))) ;) }) while (parenthesized_expression "(param_3 != param_2)" ( (binary_expression "param_3 != param_2" identifier != identifier) )) ;) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (return_statement return LIT ;) })) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression (binary_expression IDENT << LIT) | (binary_expression IDENT >> LIT)) )) + (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT))) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) (return_statement return IDENT ;) })))
(function_definition "ulong FUN_0030d400(undefined8 param_1,char *param_2,char *param_3)\n\n{\n  char cVar1;\n  ulong uVar2;\n  \n  uVar2 = 0;\n  if (param_3 <= param_2) {\n    return 0;\n  }\n  do {\n    cVar1 = *param_2;\n    param_2 = param_2 + 1;\n    uVar2 = (uVar2 << 7 | uVar2 >> 0x39) + (long)cVar1;\n  } while (param_3 != param_2);\n  return uVar2;\n}" (type_identifier "ulong") (function_declarator "FUN_0030d400(undefined8 param_1,char *param_2,char *param_3)" (identifier "FUN_0030d400") (parameter_list "(undefined8 param_1,char *param_2,char *param_3)" (( "(") (parameter_declaration "undefined8 param_1" (type_identifier "undefined8") (identifier "param_1")) (, ",") (parameter_declaration "char *param_2" (primitive_type "char") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "char *param_3" (primitive_type "char") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")"))) (compound_statement "{\n  char cVar1;\n  ulong uVar2;\n  \n  uVar2 = 0;\n  if (param_3 <= param_2) {\n    return 0;\n  }\n  do {\n    cVar1 = *param_2;\n    param_2 = param_2 + 1;\n    uVar2 = (uVar2 << 7 | uVar2 >> 0x39) + (long)cVar1;\n  } while (param_3 != param_2);\n  return uVar2;\n}" ({ "{") (declaration "char cVar1;" (primitive_type "char") (identifier "cVar1") (; ";")) (declaration "ulong uVar2;" (type_identifier "ulong") (identifier "uVar2") (; ";")) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" (identifier "uVar2") (= "=") (number_literal "0")) (; ";")) (if_statement "if (param_3 <= param_2) {\n    return 0;\n  }" (if "if") (parenthesized_expression "(param_3 <= param_2)" (( "(") (binary_expression "param_3 <= param_2" (identifier "param_3") (<= "<=") (identifier "param_2")) () ")")) (compound_statement "{\n    return 0;\n  }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (do_statement "do {\n    cVar1 = *param_2;\n    param_2 = param_2 + 1;\n    uVar2 = (uVar2 << 7 | uVar2 >> 0x39) + (long)cVar1;\n  } while (param_3 != param_2);" (do "do") (compound_statement "{\n    cVar1 = *param_2;\n    param_2 = param_2 + 1;\n    uVar2 = (uVar2 << 7 | uVar2 >> 0x39) + (long)cVar1;\n  }" ({ "{") (expression_statement "cVar1 = *param_2;" (assignment_expression "cVar1 = *param_2" (identifier "cVar1") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (expression_statement "param_2 = param_2 + 1;" (assignment_expression "param_2 = param_2 + 1" (identifier "param_2") (= "=") (binary_expression "param_2 + 1" (identifier "param_2") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "uVar2 = (uVar2 << 7 | uVar2 >> 0x39) + (long)cVar1;" (assignment_expression "uVar2 = (uVar2 << 7 | uVar2 >> 0x39) + (long)cVar1" (identifier "uVar2") (= "=") (binary_expression "(uVar2 << 7 | uVar2 >> 0x39) + (long)cVar1" (parenthesized_expression "(uVar2 << 7 | uVar2 >> 0x39)" (( "(") (binary_expression "uVar2 << 7 | uVar2 >> 0x39" (binary_expression "uVar2 << 7" (identifier "uVar2") (<< "<<") (number_literal "7")) (| "|") (binary_expression "uVar2 >> 0x39" (identifier "uVar2") (>> ">>") (number_literal "0x39"))) () ")")) (+ "+") (cast_expression "(long)cVar1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "cVar1")))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(param_3 != param_2)" (( "(") (binary_expression "param_3 != param_2" (identifier "param_3") (!= "!=") (identifier "param_2")) () ")")) (; ";")) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}")))

/* std::collate<char>::do_hash(char const*, char const*) const */

type_1 __thiscall std::type_2<char>::function_1(type_2<char> *this,char *var_2,char *var_1)

{
  char cVar1;
  type_1 var_3;
  
  var_3 = 0;
  if (var_1 <= var_2) {
    return 0;
  }
  do {
    cVar1 = *var_2;
    var_2 = var_2 + 1;
    var_3 = (var_3 << 7 | var_3 >> 0x39) + (long)cVar1;
  } while (var_1 != var_2);
  return var_3;
}


(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: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (return_statement (number_literal)))) (do_statement body: (compound_statement (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)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal)))) right: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) (return_statement (identifier)))))

ulong MASKED(undefined8 param_1,char *param_2,char *param_3)

{
  char cVar1;
  ulong uVar2;
  
  uVar2 = 0;
  if (param_3 <= param_2) {
    return 0;
  }
  do {
    cVar1 = *param_2;
    param_2 = param_2 + 1;
    uVar2 = (uVar2 << 7 | uVar2 >> 0x39) + (long)cVar1;
  } while (param_3 != param_2);
  return uVar2;
}

