
size_t strnlen1(char *string,size_t maxlen)

{
  void *pvVar1;
  
  pvVar1 = rpl_memchr(string,0,maxlen);
  if (pvVar1 != (void *)0x0) {
    return (int)pvVar1 + (1 - (int)string);
  }
  return maxlen;
}



int strnlen1(int param_1,int param_2)

{
  int iVar1;
  
  iVar1 = rpl_memchr(param_1,0,param_2);
  if (iVar1 != 0) {
    return (iVar1 - param_1) + 1;
  }
  return param_2;
}


lui gp,0x4
addiu gp,gp,-0x3bc0
addu gp,gp,t9
addiu sp,sp,-0x28
lw t9,-0x7e0c(gp)
sw s0,0x1c(sp)
or s0,a1,zero
or a1,zero,zero
sw s1,0x20(sp)
sw gp,0x10(sp)
or a2,s0,zero
sw ra,0x24(sp)
bal 0x00028760
_or s1,a0,zero
beq v0,zero,0x0001ecf8
_lw ra,0x24(sp)
subu v0,v0,s1
lw s0,0x1c(sp)
lw s1,0x20(sp)
addiu v0,v0,0x1
jr ra
_addiu sp,sp,0x28
or v0,s0,zero
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x28
(translation_unit "int strnlen1(int param_1,int param_2)\n\n{\n  int iVar1;\n  \n  iVar1 = rpl_memchr(param_1,0,param_2);\n  if (iVar1 != 0) {\n    return (iVar1 - param_1) + 1;\n  }\n  return param_2;\n}\n\n" (function_definition "int strnlen1(int param_1,int param_2)\n\n{\n  int iVar1;\n  \n  iVar1 = rpl_memchr(param_1,0,param_2);\n  if (iVar1 != 0) {\n    return (iVar1 - param_1) + 1;\n  }\n  return param_2;\n}" primitive_type (function_declarator "strnlen1(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = rpl_memchr(param_1,0,param_2);\n  if (iVar1 != 0) {\n    return (iVar1 - param_1) + 1;\n  }\n  return param_2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = rpl_memchr(param_1,0,param_2);" (assignment_expression "iVar1 = rpl_memchr(param_1,0,param_2)" identifier = (call_expression "rpl_memchr(param_1,0,param_2)" identifier (argument_list "(param_1,0,param_2)" ( identifier , number_literal , identifier )))) ;) (if_statement "if (iVar1 != 0) {\n    return (iVar1 - param_1) + 1;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    return (iVar1 - param_1) + 1;\n  }" { (return_statement "return (iVar1 - param_1) + 1;" return (binary_expression "(iVar1 - param_1) + 1" (parenthesized_expression "(iVar1 - param_1)" ( (binary_expression "iVar1 - param_1" identifier - identifier) )) + number_literal) ;) })) (return_statement "return param_2;" return identifier ;) })))
(translation_unit "size_t strnlen1(char *string,size_t maxlen)\n\n{\n  void *pvVar1;\n  \n  pvVar1 = rpl_memchr(string,0,maxlen);\n  if (pvVar1 != (void *)0x0) {\n    return (int)pvVar1 + (1 - (int)string);\n  }\n  return maxlen;\n}\n\n" (function_definition "size_t strnlen1(char *string,size_t maxlen)\n\n{\n  void *pvVar1;\n  \n  pvVar1 = rpl_memchr(string,0,maxlen);\n  if (pvVar1 != (void *)0x0) {\n    return (int)pvVar1 + (1 - (int)string);\n  }\n  return maxlen;\n}" primitive_type (function_declarator "strnlen1(char *string,size_t maxlen)" identifier (parameter_list "(char *string,size_t maxlen)" ( (parameter_declaration "char *string" primitive_type (pointer_declarator "*string" * identifier)) , (parameter_declaration "size_t maxlen" primitive_type identifier) ))) (compound_statement "{\n  void *pvVar1;\n  \n  pvVar1 = rpl_memchr(string,0,maxlen);\n  if (pvVar1 != (void *)0x0) {\n    return (int)pvVar1 + (1 - (int)string);\n  }\n  return maxlen;\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (expression_statement "pvVar1 = rpl_memchr(string,0,maxlen);" (assignment_expression "pvVar1 = rpl_memchr(string,0,maxlen)" identifier = (call_expression "rpl_memchr(string,0,maxlen)" identifier (argument_list "(string,0,maxlen)" ( identifier , number_literal , identifier )))) ;) (if_statement "if (pvVar1 != (void *)0x0) {\n    return (int)pvVar1 + (1 - (int)string);\n  }" if (parenthesized_expression "(pvVar1 != (void *)0x0)" ( (binary_expression "pvVar1 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return (int)pvVar1 + (1 - (int)string);\n  }" { (return_statement "return (int)pvVar1 + (1 - (int)string);" return (binary_expression "(int)pvVar1 + (1 - (int)string)" (cast_expression "(int)pvVar1" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(1 - (int)string)" ( (binary_expression "1 - (int)string" number_literal - (cast_expression "(int)string" ( (type_descriptor "int" primitive_type) ) identifier)) ))) ;) })) (return_statement "return maxlen;" return identifier ;) })))
(translation_unit "int strnlen1(int param_1,int param_2)\n\n{\n  int iVar1;\n  \n  iVar1 = rpl_memchr(param_1,0,param_2);\n  if (iVar1 != 0) {\n    return (iVar1 - param_1) + 1;\n  }\n  return param_2;\n}\n\n" (function_definition "int strnlen1(int param_1,int param_2)\n\n{\n  int iVar1;\n  \n  iVar1 = rpl_memchr(param_1,0,param_2);\n  if (iVar1 != 0) {\n    return (iVar1 - param_1) + 1;\n  }\n  return param_2;\n}" primitive_type (function_declarator "strnlen1(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = rpl_memchr(param_1,0,param_2);\n  if (iVar1 != 0) {\n    return (iVar1 - param_1) + 1;\n  }\n  return param_2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = rpl_memchr(param_1,0,param_2);" (assignment_expression "iVar1 = rpl_memchr(param_1,0,param_2)" identifier = (call_expression "rpl_memchr(param_1,0,param_2)" identifier (argument_list "(param_1,0,param_2)" ( identifier , number_literal , identifier )))) ;) (if_statement "if (iVar1 != 0) {\n    return (iVar1 - param_1) + 1;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    return (iVar1 - param_1) + 1;\n  }" { (return_statement "return (iVar1 - param_1) + 1;" return (binary_expression "(iVar1 - param_1) + 1" (parenthesized_expression "(iVar1 - param_1)" ( (binary_expression "iVar1 - param_1" identifier - identifier) )) + number_literal) ;) })) (return_statement "return param_2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return (binary_expression (parenthesized_expression ( (binary_expression IDENT - IDENT) )) + LIT) ;) })) (return_statement return IDENT ;) })))
(function_definition "int strnlen1(int param_1,int param_2)\n\n{\n  int iVar1;\n  \n  iVar1 = rpl_memchr(param_1,0,param_2);\n  if (iVar1 != 0) {\n    return (iVar1 - param_1) + 1;\n  }\n  return param_2;\n}" (primitive_type "int") (function_declarator "strnlen1(int param_1,int param_2)" (identifier "strnlen1") (parameter_list "(int param_1,int param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = rpl_memchr(param_1,0,param_2);\n  if (iVar1 != 0) {\n    return (iVar1 - param_1) + 1;\n  }\n  return param_2;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (expression_statement "iVar1 = rpl_memchr(param_1,0,param_2);" (assignment_expression "iVar1 = rpl_memchr(param_1,0,param_2)" (identifier "iVar1") (= "=") (call_expression "rpl_memchr(param_1,0,param_2)" (identifier "rpl_memchr") (argument_list "(param_1,0,param_2)" (( "(") (identifier "param_1") (, ",") (number_literal "0") (, ",") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n    return (iVar1 - param_1) + 1;\n  }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    return (iVar1 - param_1) + 1;\n  }" ({ "{") (return_statement "return (iVar1 - param_1) + 1;" (return "return") (binary_expression "(iVar1 - param_1) + 1" (parenthesized_expression "(iVar1 - param_1)" (( "(") (binary_expression "iVar1 - param_1" (identifier "iVar1") (- "-") (identifier "param_1")) () ")")) (+ "+") (number_literal "1")) (; ";")) (} "}"))) (return_statement "return param_2;" (return "return") (identifier "param_2") (; ";")) (} "}")))

size_t function_1(char *string,size_t maxlen)

{
  void *var_2;
  
  var_2 = var_1(string,0,maxlen);
  if (var_2 != (void *)0x0) {
    return (int)var_2 + (1 - (int)string);
  }
  return maxlen;
}


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

int MASKED(int param_1,int param_2)

{
  int iVar1;
  
  iVar1 = rpl_memchr(param_1,0,param_2);
  if (iVar1 != 0) {
    return (iVar1 - param_1) + 1;
  }
  return param_2;
}

