
size_t hash_pjw(void *x,size_t tablesize)

{
  uint uVar1;
  int iVar2;
  char *s;
  
                    /* WARNING: Load size is inaccurate */
  iVar2 = (int)*x;
  uVar1 = 0;
  if (iVar2 != 0) {
    do {
      x = (void *)((int)x + 1);
      uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200;
                    /* WARNING: Load size is inaccurate */
      iVar2 = (int)*x;
    } while (iVar2 != 0);
    if (tablesize == 0) {
      trap(7);
    }
    return uVar1 % tablesize;
  }
  return uVar1;
}



uint hash_pjw(char *param_1,uint param_2)

{
  uint uVar1;
  int iVar2;
  
  iVar2 = (int)*param_1;
  uVar1 = 0;
  if (iVar2 != 0) {
    do {
      param_1 = param_1 + 1;
      uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200;
      iVar2 = (int)*param_1;
    } while (iVar2 != 0);
    if (param_2 == 0) {
      trap(7);
    }
    return uVar1 % param_2;
  }
  return uVar1;
}


lb v1,0x0(a0)
beq v1,zero,0x0001e994
_or v0,zero,zero
addiu a0,a0,0x1
rotr v0,v0,0x17
addu v0,v1,v0
lb v1,0x0(a0)
bne v1,zero,0x0001e96c
_nop
teq a1,zero
divu v0,a1
jr ra
_mfhi v0
jr ra
_nop
(translation_unit "uint hash_pjw(char *param_1,uint param_2)\n\n{\n  uint uVar1;\n  int iVar2;\n  \n  iVar2 = (int)*param_1;\n  uVar1 = 0;\n  if (iVar2 != 0) {\n    do {\n      param_1 = param_1 + 1;\n      uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200;\n      iVar2 = (int)*param_1;\n    } while (iVar2 != 0);\n    if (param_2 == 0) {\n      trap(7);\n    }\n    return uVar1 % param_2;\n  }\n  return uVar1;\n}\n\n" (function_definition "uint hash_pjw(char *param_1,uint param_2)\n\n{\n  uint uVar1;\n  int iVar2;\n  \n  iVar2 = (int)*param_1;\n  uVar1 = 0;\n  if (iVar2 != 0) {\n    do {\n      param_1 = param_1 + 1;\n      uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200;\n      iVar2 = (int)*param_1;\n    } while (iVar2 != 0);\n    if (param_2 == 0) {\n      trap(7);\n    }\n    return uVar1 % param_2;\n  }\n  return uVar1;\n}" type_identifier (function_declarator "hash_pjw(char *param_1,uint param_2)" identifier (parameter_list "(char *param_1,uint param_2)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  \n  iVar2 = (int)*param_1;\n  uVar1 = 0;\n  if (iVar2 != 0) {\n    do {\n      param_1 = param_1 + 1;\n      uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200;\n      iVar2 = (int)*param_1;\n    } while (iVar2 != 0);\n    if (param_2 == 0) {\n      trap(7);\n    }\n    return uVar1 % param_2;\n  }\n  return uVar1;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "iVar2 = (int)*param_1;" (assignment_expression "iVar2 = (int)*param_1" identifier = (cast_expression "(int)*param_1" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" identifier = number_literal) ;) (if_statement "if (iVar2 != 0) {\n    do {\n      param_1 = param_1 + 1;\n      uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200;\n      iVar2 = (int)*param_1;\n    } while (iVar2 != 0);\n    if (param_2 == 0) {\n      trap(7);\n    }\n    return uVar1 % param_2;\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    do {\n      param_1 = param_1 + 1;\n      uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200;\n      iVar2 = (int)*param_1;\n    } while (iVar2 != 0);\n    if (param_2 == 0) {\n      trap(7);\n    }\n    return uVar1 % param_2;\n  }" { (do_statement "do {\n      param_1 = param_1 + 1;\n      uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200;\n      iVar2 = (int)*param_1;\n    } while (iVar2 != 0);" do (compound_statement "{\n      param_1 = param_1 + 1;\n      uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200;\n      iVar2 = (int)*param_1;\n    }" { (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 "uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200;" (assignment_expression "uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200" identifier = (binary_expression "iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200" (binary_expression "iVar2 + (uVar1 >> 0x17)" identifier + (parenthesized_expression "(uVar1 >> 0x17)" ( (binary_expression "uVar1 >> 0x17" identifier >> number_literal) ))) + (binary_expression "uVar1 * 0x200" identifier * number_literal))) ;) (expression_statement "iVar2 = (int)*param_1;" (assignment_expression "iVar2 = (int)*param_1" identifier = (cast_expression "(int)*param_1" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*param_1" * identifier))) ;) }) while (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) ;) (if_statement "if (param_2 == 0) {\n      trap(7);\n    }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n      trap(7);\n    }" { (expression_statement "trap(7);" (call_expression "trap(7)" identifier (argument_list "(7)" ( number_literal ))) ;) })) (return_statement "return uVar1 % param_2;" return (binary_expression "uVar1 % param_2" identifier % identifier) ;) })) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit "size_t hash_pjw(void *x,size_t tablesize)\n\n{\n  uint uVar1;\n  int iVar2;\n  char *s;\n  \n                    /* WARNING: Load size is inaccurate */\n  iVar2 = (int)*x;\n  uVar1 = 0;\n  if (iVar2 != 0) {\n    do {\n      x = (void *)((int)x + 1);\n      uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200;\n                    /* WARNING: Load size is inaccurate */\n      iVar2 = (int)*x;\n    } while (iVar2 != 0);\n    if (tablesize == 0) {\n      trap(7);\n    }\n    return uVar1 % tablesize;\n  }\n  return uVar1;\n}\n\n" (function_definition "size_t hash_pjw(void *x,size_t tablesize)\n\n{\n  uint uVar1;\n  int iVar2;\n  char *s;\n  \n                    /* WARNING: Load size is inaccurate */\n  iVar2 = (int)*x;\n  uVar1 = 0;\n  if (iVar2 != 0) {\n    do {\n      x = (void *)((int)x + 1);\n      uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200;\n                    /* WARNING: Load size is inaccurate */\n      iVar2 = (int)*x;\n    } while (iVar2 != 0);\n    if (tablesize == 0) {\n      trap(7);\n    }\n    return uVar1 % tablesize;\n  }\n  return uVar1;\n}" primitive_type (function_declarator "hash_pjw(void *x,size_t tablesize)" identifier (parameter_list "(void *x,size_t tablesize)" ( (parameter_declaration "void *x" primitive_type (pointer_declarator "*x" * identifier)) , (parameter_declaration "size_t tablesize" primitive_type identifier) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  char *s;\n  \n                    /* WARNING: Load size is inaccurate */\n  iVar2 = (int)*x;\n  uVar1 = 0;\n  if (iVar2 != 0) {\n    do {\n      x = (void *)((int)x + 1);\n      uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200;\n                    /* WARNING: Load size is inaccurate */\n      iVar2 = (int)*x;\n    } while (iVar2 != 0);\n    if (tablesize == 0) {\n      trap(7);\n    }\n    return uVar1 % tablesize;\n  }\n  return uVar1;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "char *s;" primitive_type (pointer_declarator "*s" * identifier) ;) comment (expression_statement "iVar2 = (int)*x;" (assignment_expression "iVar2 = (int)*x" identifier = (cast_expression "(int)*x" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*x" * identifier))) ;) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" identifier = number_literal) ;) (if_statement "if (iVar2 != 0) {\n    do {\n      x = (void *)((int)x + 1);\n      uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200;\n                    /* WARNING: Load size is inaccurate */\n      iVar2 = (int)*x;\n    } while (iVar2 != 0);\n    if (tablesize == 0) {\n      trap(7);\n    }\n    return uVar1 % tablesize;\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    do {\n      x = (void *)((int)x + 1);\n      uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200;\n                    /* WARNING: Load size is inaccurate */\n      iVar2 = (int)*x;\n    } while (iVar2 != 0);\n    if (tablesize == 0) {\n      trap(7);\n    }\n    return uVar1 % tablesize;\n  }" { (do_statement "do {\n      x = (void *)((int)x + 1);\n      uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200;\n                    /* WARNING: Load size is inaccurate */\n      iVar2 = (int)*x;\n    } while (iVar2 != 0);" do (compound_statement "{\n      x = (void *)((int)x + 1);\n      uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200;\n                    /* WARNING: Load size is inaccurate */\n      iVar2 = (int)*x;\n    }" { (expression_statement "x = (void *)((int)x + 1);" (assignment_expression "x = (void *)((int)x + 1)" identifier = (cast_expression "(void *)((int)x + 1)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)x + 1)" ( (binary_expression "(int)x + 1" (cast_expression "(int)x" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) (expression_statement "uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200;" (assignment_expression "uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200" identifier = (binary_expression "iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200" (binary_expression "iVar2 + (uVar1 >> 0x17)" identifier + (parenthesized_expression "(uVar1 >> 0x17)" ( (binary_expression "uVar1 >> 0x17" identifier >> number_literal) ))) + (binary_expression "uVar1 * 0x200" identifier * number_literal))) ;) comment (expression_statement "iVar2 = (int)*x;" (assignment_expression "iVar2 = (int)*x" identifier = (cast_expression "(int)*x" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*x" * identifier))) ;) }) while (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) ;) (if_statement "if (tablesize == 0) {\n      trap(7);\n    }" if (parenthesized_expression "(tablesize == 0)" ( (binary_expression "tablesize == 0" identifier == number_literal) )) (compound_statement "{\n      trap(7);\n    }" { (expression_statement "trap(7);" (call_expression "trap(7)" identifier (argument_list "(7)" ( number_literal ))) ;) })) (return_statement "return uVar1 % tablesize;" return (binary_expression "uVar1 % tablesize" identifier % identifier) ;) })) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit "uint hash_pjw(char *param_1,uint param_2)\n\n{\n  uint uVar1;\n  int iVar2;\n  \n  iVar2 = (int)*param_1;\n  uVar1 = 0;\n  if (iVar2 != 0) {\n    do {\n      param_1 = param_1 + 1;\n      uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200;\n      iVar2 = (int)*param_1;\n    } while (iVar2 != 0);\n    if (param_2 == 0) {\n      trap(7);\n    }\n    return uVar1 % param_2;\n  }\n  return uVar1;\n}\n\n" (function_definition "uint hash_pjw(char *param_1,uint param_2)\n\n{\n  uint uVar1;\n  int iVar2;\n  \n  iVar2 = (int)*param_1;\n  uVar1 = 0;\n  if (iVar2 != 0) {\n    do {\n      param_1 = param_1 + 1;\n      uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200;\n      iVar2 = (int)*param_1;\n    } while (iVar2 != 0);\n    if (param_2 == 0) {\n      trap(7);\n    }\n    return uVar1 % param_2;\n  }\n  return uVar1;\n}" type_identifier (function_declarator "hash_pjw(char *param_1,uint param_2)" identifier (parameter_list "(char *param_1,uint param_2)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  \n  iVar2 = (int)*param_1;\n  uVar1 = 0;\n  if (iVar2 != 0) {\n    do {\n      param_1 = param_1 + 1;\n      uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200;\n      iVar2 = (int)*param_1;\n    } while (iVar2 != 0);\n    if (param_2 == 0) {\n      trap(7);\n    }\n    return uVar1 % param_2;\n  }\n  return uVar1;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "iVar2 = (int)*param_1;" (assignment_expression "iVar2 = (int)*param_1" identifier = (cast_expression "(int)*param_1" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" identifier = number_literal) ;) (if_statement "if (iVar2 != 0) {\n    do {\n      param_1 = param_1 + 1;\n      uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200;\n      iVar2 = (int)*param_1;\n    } while (iVar2 != 0);\n    if (param_2 == 0) {\n      trap(7);\n    }\n    return uVar1 % param_2;\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    do {\n      param_1 = param_1 + 1;\n      uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200;\n      iVar2 = (int)*param_1;\n    } while (iVar2 != 0);\n    if (param_2 == 0) {\n      trap(7);\n    }\n    return uVar1 % param_2;\n  }" { (do_statement "do {\n      param_1 = param_1 + 1;\n      uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200;\n      iVar2 = (int)*param_1;\n    } while (iVar2 != 0);" do (compound_statement "{\n      param_1 = param_1 + 1;\n      uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200;\n      iVar2 = (int)*param_1;\n    }" { (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 "uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200;" (assignment_expression "uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200" identifier = (binary_expression "iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200" (binary_expression "iVar2 + (uVar1 >> 0x17)" identifier + (parenthesized_expression "(uVar1 >> 0x17)" ( (binary_expression "uVar1 >> 0x17" identifier >> number_literal) ))) + (binary_expression "uVar1 * 0x200" identifier * number_literal))) ;) (expression_statement "iVar2 = (int)*param_1;" (assignment_expression "iVar2 = (int)*param_1" identifier = (cast_expression "(int)*param_1" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*param_1" * identifier))) ;) }) while (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) ;) (if_statement "if (param_2 == 0) {\n      trap(7);\n    }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n      trap(7);\n    }" { (expression_statement "trap(7);" (call_expression "trap(7)" identifier (argument_list "(7)" ( number_literal ))) ;) })) (return_statement "return uVar1 % param_2;" return (binary_expression "uVar1 % param_2" identifier % identifier) ;) })) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (parenthesized_expression ( (binary_expression IDENT >> LIT) ))) + (binary_expression IDENT * LIT))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * IDENT))) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;) })) (return_statement return (binary_expression IDENT % IDENT) ;) })) (return_statement return IDENT ;) })))
(function_definition "uint hash_pjw(char *param_1,uint param_2)\n\n{\n  uint uVar1;\n  int iVar2;\n  \n  iVar2 = (int)*param_1;\n  uVar1 = 0;\n  if (iVar2 != 0) {\n    do {\n      param_1 = param_1 + 1;\n      uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200;\n      iVar2 = (int)*param_1;\n    } while (iVar2 != 0);\n    if (param_2 == 0) {\n      trap(7);\n    }\n    return uVar1 % param_2;\n  }\n  return uVar1;\n}" (type_identifier "uint") (function_declarator "hash_pjw(char *param_1,uint param_2)" (identifier "hash_pjw") (parameter_list "(char *param_1,uint param_2)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) () ")"))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  \n  iVar2 = (int)*param_1;\n  uVar1 = 0;\n  if (iVar2 != 0) {\n    do {\n      param_1 = param_1 + 1;\n      uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200;\n      iVar2 = (int)*param_1;\n    } while (iVar2 != 0);\n    if (param_2 == 0) {\n      trap(7);\n    }\n    return uVar1 % param_2;\n  }\n  return uVar1;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (expression_statement "iVar2 = (int)*param_1;" (assignment_expression "iVar2 = (int)*param_1" (identifier "iVar2") (= "=") (cast_expression "(int)*param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" (identifier "uVar1") (= "=") (number_literal "0")) (; ";")) (if_statement "if (iVar2 != 0) {\n    do {\n      param_1 = param_1 + 1;\n      uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200;\n      iVar2 = (int)*param_1;\n    } while (iVar2 != 0);\n    if (param_2 == 0) {\n      trap(7);\n    }\n    return uVar1 % param_2;\n  }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    do {\n      param_1 = param_1 + 1;\n      uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200;\n      iVar2 = (int)*param_1;\n    } while (iVar2 != 0);\n    if (param_2 == 0) {\n      trap(7);\n    }\n    return uVar1 % param_2;\n  }" ({ "{") (do_statement "do {\n      param_1 = param_1 + 1;\n      uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200;\n      iVar2 = (int)*param_1;\n    } while (iVar2 != 0);" (do "do") (compound_statement "{\n      param_1 = param_1 + 1;\n      uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200;\n      iVar2 = (int)*param_1;\n    }" ({ "{") (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" (identifier "param_1") (= "=") (binary_expression "param_1 + 1" (identifier "param_1") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200;" (assignment_expression "uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200" (identifier "uVar1") (= "=") (binary_expression "iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200" (binary_expression "iVar2 + (uVar1 >> 0x17)" (identifier "iVar2") (+ "+") (parenthesized_expression "(uVar1 >> 0x17)" (( "(") (binary_expression "uVar1 >> 0x17" (identifier "uVar1") (>> ">>") (number_literal "0x17")) () ")"))) (+ "+") (binary_expression "uVar1 * 0x200" (identifier "uVar1") (* "*") (number_literal "0x200")))) (; ";")) (expression_statement "iVar2 = (int)*param_1;" (assignment_expression "iVar2 = (int)*param_1" (identifier "iVar2") (= "=") (cast_expression "(int)*param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (; ";")) (if_statement "if (param_2 == 0) {\n      trap(7);\n    }" (if "if") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      trap(7);\n    }" ({ "{") (expression_statement "trap(7);" (call_expression "trap(7)" (identifier "trap") (argument_list "(7)" (( "(") (number_literal "7") () ")"))) (; ";")) (} "}"))) (return_statement "return uVar1 % param_2;" (return "return") (binary_expression "uVar1 % param_2" (identifier "uVar1") (% "%") (identifier "param_2")) (; ";")) (} "}"))) (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}")))

size_t function_1(void *x,size_t var_3)

{
  type_1 var_2;
  int var_1;
  char *s;
  
                    /* WARNING: Load size is inaccurate */
  var_1 = (int)*x;
  var_2 = 0;
  if (var_1 != 0) {
    do {
      x = (void *)((int)x + 1);
      var_2 = var_1 + (var_2 >> 0x17) + var_2 * 0x200;
                    /* WARNING: Load size is inaccurate */
      var_1 = (int)*x;
    } while (var_1 != 0);
    if (var_3 == 0) {
      var_4(7);
    }
    return var_2 % var_3;
  }
  return var_2;
}


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

uint MASKED(char *param_1,uint param_2)

{
  uint uVar1;
  int iVar2;
  
  iVar2 = (int)*param_1;
  uVar1 = 0;
  if (iVar2 != 0) {
    do {
      param_1 = param_1 + 1;
      uVar1 = iVar2 + (uVar1 >> 0x17) + uVar1 * 0x200;
      iVar2 = (int)*param_1;
    } while (iVar2 != 0);
    if (param_2 == 0) {
      trap(7);
    }
    return uVar1 % param_2;
  }
  return uVar1;
}

