
void strip_trailing(char *string,int len,int newlines_only)

{
  char cVar1;
  char *pcVar2;
  
  if (-1 < len) {
    pcVar2 = string + len;
    do {
      cVar1 = *pcVar2;
      if (newlines_only == 0) {
        if ((cVar1 != ' ') && (cVar1 != '\t')) break;
      }
      else if (cVar1 != '\n') break;
      len = len + -1;
      pcVar2 = string + len;
      if (len == -1) {
        *string = '\0';
        return;
      }
    } while( true );
  }
  string[len + 1] = '\0';
  return;
}



void strip_trailing(undefined1 *param_1,int param_2,int param_3)

{
  char cVar1;
  char *pcVar2;
  
  if (-1 < param_2) {
    pcVar2 = param_1 + param_2;
    do {
      cVar1 = *pcVar2;
      if (param_3 == 0) {
        if ((cVar1 != ' ') && (cVar1 != '\t')) break;
      }
      else if (cVar1 != '\n') break;
      param_2 = param_2 + -1;
      pcVar2 = param_1 + param_2;
      if (param_2 == -1) {
        *param_1 = 0;
        return;
      }
    } while( true );
  }
  param_1[param_2 + 1] = 0;
  return;
}


bltz a1,0x000a4164
_or v1,a1,zero
li t0,0x20
li t1,0x9
li t2,0xa
li a3,-0x1
addu v0,a0,a1
or v1,a1,zero
beq a2,zero,0x000a4170
_lb v0,0x0(v0)
beq v0,t2,0x000a4180
_nop
addu a0,a0,v1
jr ra
_sb zero,0x1(a0)
beq v0,t0,0x000a4180
_nop
bne v0,t1,0x000a4164
_nop
addiu a1,a1,-0x1
bne a1,a3,0x000a4150
_addu v0,a0,a1
li v1,-0x1
addu a0,a0,v1
jr ra
_sb zero,0x1(a0)
(translation_unit "void strip_trailing(undefined1 *param_1,int param_2,int param_3)\n\n{\n  char cVar1;\n  char *pcVar2;\n  \n  if (-1 < param_2) {\n    pcVar2 = param_1 + param_2;\n    do {\n      cVar1 = *pcVar2;\n      if (param_3 == 0) {\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }\n      else if (cVar1 != '\n') break;\n      param_2 = param_2 + -1;\n      pcVar2 = param_1 + param_2;\n      if (param_2 == -1) {\n        *param_1 = 0;\n        return;\n      }\n    } while( true );\n  }\n  param_1[param_2 + 1] = 0;\n  return;\n}\n\n" (function_definition "void strip_trailing(undefined1 *param_1,int param_2,int param_3)\n\n{\n  char cVar1;\n  char *pcVar2;\n  \n  if (-1 < param_2) {\n    pcVar2 = param_1 + param_2;\n    do {\n      cVar1 = *pcVar2;\n      if (param_3 == 0) {\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }\n      else if (cVar1 != '\n') break;\n      param_2 = param_2 + -1;\n      pcVar2 = param_1 + param_2;\n      if (param_2 == -1) {\n        *param_1 = 0;\n        return;\n      }\n    } while( true );\n  }\n  param_1[param_2 + 1] = 0;\n  return;\n}" primitive_type (function_declarator "strip_trailing(undefined1 *param_1,int param_2,int param_3)" identifier (parameter_list "(undefined1 *param_1,int param_2,int param_3)" ( (parameter_declaration "undefined1 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  char cVar1;\n  char *pcVar2;\n  \n  if (-1 < param_2) {\n    pcVar2 = param_1 + param_2;\n    do {\n      cVar1 = *pcVar2;\n      if (param_3 == 0) {\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }\n      else if (cVar1 != '\n') break;\n      param_2 = param_2 + -1;\n      pcVar2 = param_1 + param_2;\n      if (param_2 == -1) {\n        *param_1 = 0;\n        return;\n      }\n    } while( true );\n  }\n  param_1[param_2 + 1] = 0;\n  return;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (if_statement "if (-1 < param_2) {\n    pcVar2 = param_1 + param_2;\n    do {\n      cVar1 = *pcVar2;\n      if (param_3 == 0) {\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }\n      else if (cVar1 != '\n') break;\n      param_2 = param_2 + -1;\n      pcVar2 = param_1 + param_2;\n      if (param_2 == -1) {\n        *param_1 = 0;\n        return;\n      }\n    } while( true );\n  }" if (parenthesized_expression "(-1 < param_2)" ( (binary_expression "-1 < param_2" number_literal < identifier) )) (compound_statement "{\n    pcVar2 = param_1 + param_2;\n    do {\n      cVar1 = *pcVar2;\n      if (param_3 == 0) {\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }\n      else if (cVar1 != '\n') break;\n      param_2 = param_2 + -1;\n      pcVar2 = param_1 + param_2;\n      if (param_2 == -1) {\n        *param_1 = 0;\n        return;\n      }\n    } while( true );\n  }" { (expression_statement "pcVar2 = param_1 + param_2;" (assignment_expression "pcVar2 = param_1 + param_2" identifier = (binary_expression "param_1 + param_2" identifier + identifier)) ;) (do_statement "do {\n      cVar1 = *pcVar2;\n      if (param_3 == 0) {\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }\n      else if (cVar1 != '\n') break;\n      param_2 = param_2 + -1;\n      pcVar2 = param_1 + param_2;\n      if (param_2 == -1) {\n        *param_1 = 0;\n        return;\n      }\n    } while( true );" do (compound_statement "{\n      cVar1 = *pcVar2;\n      if (param_3 == 0) {\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }\n      else if (cVar1 != '\n') break;\n      param_2 = param_2 + -1;\n      pcVar2 = param_1 + param_2;\n      if (param_2 == -1) {\n        *param_1 = 0;\n        return;\n      }\n    }" { (expression_statement "cVar1 = *pcVar2;" (assignment_expression "cVar1 = *pcVar2" identifier = (pointer_expression "*pcVar2" * identifier)) ;) (if_statement "if (param_3 == 0) {\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }\n      else if (cVar1 != '\n') break;" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }" { (if_statement "if ((cVar1 != ' ') && (cVar1 != '\t')) break;" if (parenthesized_expression "((cVar1 != ' ') && (cVar1 != '\t'))" ( (binary_expression "(cVar1 != ' ') && (cVar1 != '\t')" (parenthesized_expression "(cVar1 != ' ')" ( (binary_expression "cVar1 != ' '" identifier != (char_literal "' '" ' character ')) )) && (parenthesized_expression "(cVar1 != '\t')" ( (binary_expression "cVar1 != '\t'" identifier != (char_literal "'\t'" ' escape_sequence ')) ))) )) (break_statement "break;" break ;)) }) (else_clause "else if (cVar1 != '\n') break;" else (if_statement "if (cVar1 != '\n') break;" if (parenthesized_expression "(cVar1 != '\n')" ( (binary_expression "cVar1 != '\n'" identifier != (char_literal "'\n'" ' escape_sequence ')) )) (break_statement "break;" break ;)))) (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 "pcVar2 = param_1 + param_2;" (assignment_expression "pcVar2 = param_1 + param_2" identifier = (binary_expression "param_1 + param_2" identifier + identifier)) ;) (if_statement "if (param_2 == -1) {\n        *param_1 = 0;\n        return;\n      }" if (parenthesized_expression "(param_2 == -1)" ( (binary_expression "param_2 == -1" identifier == number_literal) )) (compound_statement "{\n        *param_1 = 0;\n        return;\n      }" { (expression_statement "*param_1 = 0;" (assignment_expression "*param_1 = 0" (pointer_expression "*param_1" * identifier) = number_literal) ;) (return_statement "return;" return ;) })) }) while (parenthesized_expression "( true )" ( true )) ;) })) (expression_statement "param_1[param_2 + 1] = 0;" (assignment_expression "param_1[param_2 + 1] = 0" (subscript_expression "param_1[param_2 + 1]" identifier [ (binary_expression "param_2 + 1" identifier + number_literal) ]) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "void strip_trailing(char *string,int len,int newlines_only)\n\n{\n  char cVar1;\n  char *pcVar2;\n  \n  if (-1 < len) {\n    pcVar2 = string + len;\n    do {\n      cVar1 = *pcVar2;\n      if (newlines_only == 0) {\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }\n      else if (cVar1 != '\n') break;\n      len = len + -1;\n      pcVar2 = string + len;\n      if (len == -1) {\n        *string = '\0';\n        return;\n      }\n    } while( true );\n  }\n  string[len + 1] = '\0';\n  return;\n}\n\n" (function_definition "void strip_trailing(char *string,int len,int newlines_only)\n\n{\n  char cVar1;\n  char *pcVar2;\n  \n  if (-1 < len) {\n    pcVar2 = string + len;\n    do {\n      cVar1 = *pcVar2;\n      if (newlines_only == 0) {\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }\n      else if (cVar1 != '\n') break;\n      len = len + -1;\n      pcVar2 = string + len;\n      if (len == -1) {\n        *string = '\0';\n        return;\n      }\n    } while( true );\n  }\n  string[len + 1] = '\0';\n  return;\n}" primitive_type (function_declarator "strip_trailing(char *string,int len,int newlines_only)" identifier (parameter_list "(char *string,int len,int newlines_only)" ( (parameter_declaration "char *string" primitive_type (pointer_declarator "*string" * identifier)) , (parameter_declaration "int len" primitive_type identifier) , (parameter_declaration "int newlines_only" primitive_type identifier) ))) (compound_statement "{\n  char cVar1;\n  char *pcVar2;\n  \n  if (-1 < len) {\n    pcVar2 = string + len;\n    do {\n      cVar1 = *pcVar2;\n      if (newlines_only == 0) {\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }\n      else if (cVar1 != '\n') break;\n      len = len + -1;\n      pcVar2 = string + len;\n      if (len == -1) {\n        *string = '\0';\n        return;\n      }\n    } while( true );\n  }\n  string[len + 1] = '\0';\n  return;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (if_statement "if (-1 < len) {\n    pcVar2 = string + len;\n    do {\n      cVar1 = *pcVar2;\n      if (newlines_only == 0) {\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }\n      else if (cVar1 != '\n') break;\n      len = len + -1;\n      pcVar2 = string + len;\n      if (len == -1) {\n        *string = '\0';\n        return;\n      }\n    } while( true );\n  }" if (parenthesized_expression "(-1 < len)" ( (binary_expression "-1 < len" number_literal < identifier) )) (compound_statement "{\n    pcVar2 = string + len;\n    do {\n      cVar1 = *pcVar2;\n      if (newlines_only == 0) {\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }\n      else if (cVar1 != '\n') break;\n      len = len + -1;\n      pcVar2 = string + len;\n      if (len == -1) {\n        *string = '\0';\n        return;\n      }\n    } while( true );\n  }" { (expression_statement "pcVar2 = string + len;" (assignment_expression "pcVar2 = string + len" identifier = (binary_expression "string + len" identifier + identifier)) ;) (do_statement "do {\n      cVar1 = *pcVar2;\n      if (newlines_only == 0) {\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }\n      else if (cVar1 != '\n') break;\n      len = len + -1;\n      pcVar2 = string + len;\n      if (len == -1) {\n        *string = '\0';\n        return;\n      }\n    } while( true );" do (compound_statement "{\n      cVar1 = *pcVar2;\n      if (newlines_only == 0) {\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }\n      else if (cVar1 != '\n') break;\n      len = len + -1;\n      pcVar2 = string + len;\n      if (len == -1) {\n        *string = '\0';\n        return;\n      }\n    }" { (expression_statement "cVar1 = *pcVar2;" (assignment_expression "cVar1 = *pcVar2" identifier = (pointer_expression "*pcVar2" * identifier)) ;) (if_statement "if (newlines_only == 0) {\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }\n      else if (cVar1 != '\n') break;" if (parenthesized_expression "(newlines_only == 0)" ( (binary_expression "newlines_only == 0" identifier == number_literal) )) (compound_statement "{\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }" { (if_statement "if ((cVar1 != ' ') && (cVar1 != '\t')) break;" if (parenthesized_expression "((cVar1 != ' ') && (cVar1 != '\t'))" ( (binary_expression "(cVar1 != ' ') && (cVar1 != '\t')" (parenthesized_expression "(cVar1 != ' ')" ( (binary_expression "cVar1 != ' '" identifier != (char_literal "' '" ' character ')) )) && (parenthesized_expression "(cVar1 != '\t')" ( (binary_expression "cVar1 != '\t'" identifier != (char_literal "'\t'" ' escape_sequence ')) ))) )) (break_statement "break;" break ;)) }) (else_clause "else if (cVar1 != '\n') break;" else (if_statement "if (cVar1 != '\n') break;" if (parenthesized_expression "(cVar1 != '\n')" ( (binary_expression "cVar1 != '\n'" identifier != (char_literal "'\n'" ' escape_sequence ')) )) (break_statement "break;" break ;)))) (expression_statement "len = len + -1;" (assignment_expression "len = len + -1" identifier = (binary_expression "len + -1" identifier + number_literal)) ;) (expression_statement "pcVar2 = string + len;" (assignment_expression "pcVar2 = string + len" identifier = (binary_expression "string + len" identifier + identifier)) ;) (if_statement "if (len == -1) {\n        *string = '\0';\n        return;\n      }" if (parenthesized_expression "(len == -1)" ( (binary_expression "len == -1" identifier == number_literal) )) (compound_statement "{\n        *string = '\0';\n        return;\n      }" { (expression_statement "*string = '\0';" (assignment_expression "*string = '\0'" (pointer_expression "*string" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (return_statement "return;" return ;) })) }) while (parenthesized_expression "( true )" ( true )) ;) })) (expression_statement "string[len + 1] = '\0';" (assignment_expression "string[len + 1] = '\0'" (subscript_expression "string[len + 1]" identifier [ (binary_expression "len + 1" identifier + number_literal) ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (return_statement "return;" return ;) })))
(translation_unit "void strip_trailing(undefined1 *param_1,int param_2,int param_3)\n\n{\n  char cVar1;\n  char *pcVar2;\n  \n  if (-1 < param_2) {\n    pcVar2 = param_1 + param_2;\n    do {\n      cVar1 = *pcVar2;\n      if (param_3 == 0) {\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }\n      else if (cVar1 != '\n') break;\n      param_2 = param_2 + -1;\n      pcVar2 = param_1 + param_2;\n      if (param_2 == -1) {\n        *param_1 = 0;\n        return;\n      }\n    } while( true );\n  }\n  param_1[param_2 + 1] = 0;\n  return;\n}\n\n" (function_definition "void strip_trailing(undefined1 *param_1,int param_2,int param_3)\n\n{\n  char cVar1;\n  char *pcVar2;\n  \n  if (-1 < param_2) {\n    pcVar2 = param_1 + param_2;\n    do {\n      cVar1 = *pcVar2;\n      if (param_3 == 0) {\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }\n      else if (cVar1 != '\n') break;\n      param_2 = param_2 + -1;\n      pcVar2 = param_1 + param_2;\n      if (param_2 == -1) {\n        *param_1 = 0;\n        return;\n      }\n    } while( true );\n  }\n  param_1[param_2 + 1] = 0;\n  return;\n}" primitive_type (function_declarator "strip_trailing(undefined1 *param_1,int param_2,int param_3)" identifier (parameter_list "(undefined1 *param_1,int param_2,int param_3)" ( (parameter_declaration "undefined1 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  char cVar1;\n  char *pcVar2;\n  \n  if (-1 < param_2) {\n    pcVar2 = param_1 + param_2;\n    do {\n      cVar1 = *pcVar2;\n      if (param_3 == 0) {\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }\n      else if (cVar1 != '\n') break;\n      param_2 = param_2 + -1;\n      pcVar2 = param_1 + param_2;\n      if (param_2 == -1) {\n        *param_1 = 0;\n        return;\n      }\n    } while( true );\n  }\n  param_1[param_2 + 1] = 0;\n  return;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (if_statement "if (-1 < param_2) {\n    pcVar2 = param_1 + param_2;\n    do {\n      cVar1 = *pcVar2;\n      if (param_3 == 0) {\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }\n      else if (cVar1 != '\n') break;\n      param_2 = param_2 + -1;\n      pcVar2 = param_1 + param_2;\n      if (param_2 == -1) {\n        *param_1 = 0;\n        return;\n      }\n    } while( true );\n  }" if (parenthesized_expression "(-1 < param_2)" ( (binary_expression "-1 < param_2" number_literal < identifier) )) (compound_statement "{\n    pcVar2 = param_1 + param_2;\n    do {\n      cVar1 = *pcVar2;\n      if (param_3 == 0) {\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }\n      else if (cVar1 != '\n') break;\n      param_2 = param_2 + -1;\n      pcVar2 = param_1 + param_2;\n      if (param_2 == -1) {\n        *param_1 = 0;\n        return;\n      }\n    } while( true );\n  }" { (expression_statement "pcVar2 = param_1 + param_2;" (assignment_expression "pcVar2 = param_1 + param_2" identifier = (binary_expression "param_1 + param_2" identifier + identifier)) ;) (do_statement "do {\n      cVar1 = *pcVar2;\n      if (param_3 == 0) {\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }\n      else if (cVar1 != '\n') break;\n      param_2 = param_2 + -1;\n      pcVar2 = param_1 + param_2;\n      if (param_2 == -1) {\n        *param_1 = 0;\n        return;\n      }\n    } while( true );" do (compound_statement "{\n      cVar1 = *pcVar2;\n      if (param_3 == 0) {\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }\n      else if (cVar1 != '\n') break;\n      param_2 = param_2 + -1;\n      pcVar2 = param_1 + param_2;\n      if (param_2 == -1) {\n        *param_1 = 0;\n        return;\n      }\n    }" { (expression_statement "cVar1 = *pcVar2;" (assignment_expression "cVar1 = *pcVar2" identifier = (pointer_expression "*pcVar2" * identifier)) ;) (if_statement "if (param_3 == 0) {\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }\n      else if (cVar1 != '\n') break;" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }" { (if_statement "if ((cVar1 != ' ') && (cVar1 != '\t')) break;" if (parenthesized_expression "((cVar1 != ' ') && (cVar1 != '\t'))" ( (binary_expression "(cVar1 != ' ') && (cVar1 != '\t')" (parenthesized_expression "(cVar1 != ' ')" ( (binary_expression "cVar1 != ' '" identifier != (char_literal "' '" ' character ')) )) && (parenthesized_expression "(cVar1 != '\t')" ( (binary_expression "cVar1 != '\t'" identifier != (char_literal "'\t'" ' escape_sequence ')) ))) )) (break_statement "break;" break ;)) }) (else_clause "else if (cVar1 != '\n') break;" else (if_statement "if (cVar1 != '\n') break;" if (parenthesized_expression "(cVar1 != '\n')" ( (binary_expression "cVar1 != '\n'" identifier != (char_literal "'\n'" ' escape_sequence ')) )) (break_statement "break;" break ;)))) (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 "pcVar2 = param_1 + param_2;" (assignment_expression "pcVar2 = param_1 + param_2" identifier = (binary_expression "param_1 + param_2" identifier + identifier)) ;) (if_statement "if (param_2 == -1) {\n        *param_1 = 0;\n        return;\n      }" if (parenthesized_expression "(param_2 == -1)" ( (binary_expression "param_2 == -1" identifier == number_literal) )) (compound_statement "{\n        *param_1 = 0;\n        return;\n      }" { (expression_statement "*param_1 = 0;" (assignment_expression "*param_1 = 0" (pointer_expression "*param_1" * identifier) = number_literal) ;) (return_statement "return;" return ;) })) }) while (parenthesized_expression "( true )" ( true )) ;) })) (expression_statement "param_1[param_2 + 1] = 0;" (assignment_expression "param_1[param_2 + 1] = 0" (subscript_expression "param_1[param_2 + 1]" identifier [ (binary_expression "param_2 + 1" identifier + number_literal) ]) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (char_literal ' character ')) )) && (parenthesized_expression ( (binary_expression IDENT != (char_literal ' escape_sequence ')) ))) )) (break_statement break ;)) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT != (char_literal ' escape_sequence ')) )) (break_statement break ;)))) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (return_statement return ;) })) }) while (parenthesized_expression ( BOOL )) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ (binary_expression IDENT + LIT) ]) = LIT) ;) (return_statement return ;) })))
(function_definition "void strip_trailing(undefined1 *param_1,int param_2,int param_3)\n\n{\n  char cVar1;\n  char *pcVar2;\n  \n  if (-1 < param_2) {\n    pcVar2 = param_1 + param_2;\n    do {\n      cVar1 = *pcVar2;\n      if (param_3 == 0) {\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }\n      else if (cVar1 != '\n') break;\n      param_2 = param_2 + -1;\n      pcVar2 = param_1 + param_2;\n      if (param_2 == -1) {\n        *param_1 = 0;\n        return;\n      }\n    } while( true );\n  }\n  param_1[param_2 + 1] = 0;\n  return;\n}" (primitive_type "void") (function_declarator "strip_trailing(undefined1 *param_1,int param_2,int param_3)" (identifier "strip_trailing") (parameter_list "(undefined1 *param_1,int param_2,int param_3)" (( "(") (parameter_declaration "undefined1 *param_1" (type_identifier "undefined1") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  char cVar1;\n  char *pcVar2;\n  \n  if (-1 < param_2) {\n    pcVar2 = param_1 + param_2;\n    do {\n      cVar1 = *pcVar2;\n      if (param_3 == 0) {\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }\n      else if (cVar1 != '\n') break;\n      param_2 = param_2 + -1;\n      pcVar2 = param_1 + param_2;\n      if (param_2 == -1) {\n        *param_1 = 0;\n        return;\n      }\n    } while( true );\n  }\n  param_1[param_2 + 1] = 0;\n  return;\n}" ({ "{") (declaration "char cVar1;" (primitive_type "char") (identifier "cVar1") (; ";")) (declaration "char *pcVar2;" (primitive_type "char") (pointer_declarator "*pcVar2" (* "*") (identifier "pcVar2")) (; ";")) (if_statement "if (-1 < param_2) {\n    pcVar2 = param_1 + param_2;\n    do {\n      cVar1 = *pcVar2;\n      if (param_3 == 0) {\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }\n      else if (cVar1 != '\n') break;\n      param_2 = param_2 + -1;\n      pcVar2 = param_1 + param_2;\n      if (param_2 == -1) {\n        *param_1 = 0;\n        return;\n      }\n    } while( true );\n  }" (if "if") (parenthesized_expression "(-1 < param_2)" (( "(") (binary_expression "-1 < param_2" (number_literal "-1") (< "<") (identifier "param_2")) () ")")) (compound_statement "{\n    pcVar2 = param_1 + param_2;\n    do {\n      cVar1 = *pcVar2;\n      if (param_3 == 0) {\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }\n      else if (cVar1 != '\n') break;\n      param_2 = param_2 + -1;\n      pcVar2 = param_1 + param_2;\n      if (param_2 == -1) {\n        *param_1 = 0;\n        return;\n      }\n    } while( true );\n  }" ({ "{") (expression_statement "pcVar2 = param_1 + param_2;" (assignment_expression "pcVar2 = param_1 + param_2" (identifier "pcVar2") (= "=") (binary_expression "param_1 + param_2" (identifier "param_1") (+ "+") (identifier "param_2"))) (; ";")) (do_statement "do {\n      cVar1 = *pcVar2;\n      if (param_3 == 0) {\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }\n      else if (cVar1 != '\n') break;\n      param_2 = param_2 + -1;\n      pcVar2 = param_1 + param_2;\n      if (param_2 == -1) {\n        *param_1 = 0;\n        return;\n      }\n    } while( true );" (do "do") (compound_statement "{\n      cVar1 = *pcVar2;\n      if (param_3 == 0) {\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }\n      else if (cVar1 != '\n') break;\n      param_2 = param_2 + -1;\n      pcVar2 = param_1 + param_2;\n      if (param_2 == -1) {\n        *param_1 = 0;\n        return;\n      }\n    }" ({ "{") (expression_statement "cVar1 = *pcVar2;" (assignment_expression "cVar1 = *pcVar2" (identifier "cVar1") (= "=") (pointer_expression "*pcVar2" (* "*") (identifier "pcVar2"))) (; ";")) (if_statement "if (param_3 == 0) {\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }\n      else if (cVar1 != '\n') break;" (if "if") (parenthesized_expression "(param_3 == 0)" (( "(") (binary_expression "param_3 == 0" (identifier "param_3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        if ((cVar1 != ' ') && (cVar1 != '\t')) break;\n      }" ({ "{") (if_statement "if ((cVar1 != ' ') && (cVar1 != '\t')) break;" (if "if") (parenthesized_expression "((cVar1 != ' ') && (cVar1 != '\t'))" (( "(") (binary_expression "(cVar1 != ' ') && (cVar1 != '\t')" (parenthesized_expression "(cVar1 != ' ')" (( "(") (binary_expression "cVar1 != ' '" (identifier "cVar1") (!= "!=") (char_literal "' '" (' "'") (character " ") (' "'"))) () ")")) (&& "&&") (parenthesized_expression "(cVar1 != '\t')" (( "(") (binary_expression "cVar1 != '\t'" (identifier "cVar1") (!= "!=") (char_literal "'\t'" (' "'") (escape_sequence "\t") (' "'"))) () ")"))) () ")")) (break_statement "break;" (break "break") (; ";"))) (} "}")) (else_clause "else if (cVar1 != '\n') break;" (else "else") (if_statement "if (cVar1 != '\n') break;" (if "if") (parenthesized_expression "(cVar1 != '\n')" (( "(") (binary_expression "cVar1 != '\n'" (identifier "cVar1") (!= "!=") (char_literal "'\n'" (' "'") (escape_sequence "\n") (' "'"))) () ")")) (break_statement "break;" (break "break") (; ";"))))) (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 "pcVar2 = param_1 + param_2;" (assignment_expression "pcVar2 = param_1 + param_2" (identifier "pcVar2") (= "=") (binary_expression "param_1 + param_2" (identifier "param_1") (+ "+") (identifier "param_2"))) (; ";")) (if_statement "if (param_2 == -1) {\n        *param_1 = 0;\n        return;\n      }" (if "if") (parenthesized_expression "(param_2 == -1)" (( "(") (binary_expression "param_2 == -1" (identifier "param_2") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n        *param_1 = 0;\n        return;\n      }" ({ "{") (expression_statement "*param_1 = 0;" (assignment_expression "*param_1 = 0" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (number_literal "0")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (} "}")) (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (; ";")) (} "}"))) (expression_statement "param_1[param_2 + 1] = 0;" (assignment_expression "param_1[param_2 + 1] = 0" (subscript_expression "param_1[param_2 + 1]" (identifier "param_1") ([ "[") (binary_expression "param_2 + 1" (identifier "param_2") (+ "+") (number_literal "1")) (] "]")) (= "=") (number_literal "0")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))
(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (do_statement body: (compound_statement (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 (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (character)))) right: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))))) consequence: (break_statement))) alternative: (else_clause (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))) consequence: (break_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: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (return_statement)))) condition: (parenthesized_expression (true))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) (return_statement))))

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

{
  char cVar1;
  char *pcVar2;
  
  if (-1 < param_2) {
    pcVar2 = param_1 + param_2;
    do {
      cVar1 = *pcVar2;
      if (param_3 == 0) {
        if ((cVar1 != ' ') && (cVar1 != '\t')) break;
      }
      else if (cVar1 != '\n') break;
      param_2 = param_2 + -1;
      pcVar2 = param_1 + param_2;
      if (param_2 == -1) {
        *param_1 = 0;
        return;
      }
    } while( true );
  }
  param_1[param_2 + 1] = 0;
  return;
}

