
/* WARNING: Unknown calling convention */

char * back_textlist(textlist *tlist,char *prev)

{
  char *pcVar1;
  char *pcVar2;
  char *pcVar3;
  
  pcVar3 = tlist->string;
  if (prev == (char *)0x0) {
    pcVar1 = tlist->endstring;
  }
  else {
    if (prev <= pcVar3) {
      return (char *)0x0;
    }
    pcVar1 = prev + -1;
  }
  for (; *pcVar1 == '\0'; pcVar1 = pcVar1 + -1) {
  }
  if (pcVar1 <= pcVar3) {
    return (char *)0x0;
  }
  if (pcVar1[-1] == '\0') {
    return pcVar1;
  }
  do {
    pcVar2 = pcVar1 + -1;
    if (pcVar1[-2] == '\0') {
      return pcVar2;
    }
    pcVar1 = pcVar2;
  } while (pcVar3 != pcVar2);
  return pcVar2;
}



char * back_textlist(undefined4 *param_1,char *param_2)

{
  char *pcVar1;
  char *pcVar2;
  
  pcVar2 = (char *)*param_1;
  if (param_2 == (char *)0x0) {
    param_2 = (char *)param_1[1];
  }
  else {
    if (param_2 <= pcVar2) {
      return (char *)0x0;
    }
    param_2 = param_2 + -1;
  }
  for (; *param_2 == '\0'; param_2 = param_2 + -1) {
  }
  if (param_2 <= pcVar2) {
    return (char *)0x0;
  }
  if (param_2[-1] == '\0') {
    return param_2;
  }
  do {
    pcVar1 = param_2 + -1;
    if (param_2[-2] == '\0') {
      return pcVar1;
    }
    param_2 = pcVar1;
  } while (pcVar2 != pcVar1);
  return pcVar1;
}


beq a1,zero,0x00021be0
_lw a2,0x0(a0)
sltu v0,a2,a1
beq v0,zero,0x00021bf0
_nop
b 0x00021b90
_addiu v0,a1,-0x1
addiu v0,v0,-0x1
lb v1,0x0(v0)
beq v1,zero,0x00021b8c
_sltu v1,a2,v0
beq v1,zero,0x00021be8
_nop
lb v1,-0x1(v0)
bne v1,zero,0x00021bc4
_addiu v0,v0,-0x1
jr ra
_addiu v0,v0,0x1
beq a2,v0,0x00021bd8
_nop
addiu v0,v0,-0x1
lb v1,-0x1(v0)
bne v1,zero,0x00021bb8
_nop
jr ra
_nop
jr ra
_nop
b 0x00021b90
_lw v0,0x4(a0)
jr ra
_or v0,zero,zero
jr ra
_or v0,zero,zero
(translation_unit "char * back_textlist(undefined4 *param_1,char *param_2)\n\n{\n  char *pcVar1;\n  char *pcVar2;\n  \n  pcVar2 = (char *)*param_1;\n  if (param_2 == (char *)0x0) {\n    param_2 = (char *)param_1[1];\n  }\n  else {\n    if (param_2 <= pcVar2) {\n      return (char *)0x0;\n    }\n    param_2 = param_2 + -1;\n  }\n  for (; *param_2 == '\0'; param_2 = param_2 + -1) {\n  }\n  if (param_2 <= pcVar2) {\n    return (char *)0x0;\n  }\n  if (param_2[-1] == '\0') {\n    return param_2;\n  }\n  do {\n    pcVar1 = param_2 + -1;\n    if (param_2[-2] == '\0') {\n      return pcVar1;\n    }\n    param_2 = pcVar1;\n  } while (pcVar2 != pcVar1);\n  return pcVar1;\n}\n\n" (function_definition "char * back_textlist(undefined4 *param_1,char *param_2)\n\n{\n  char *pcVar1;\n  char *pcVar2;\n  \n  pcVar2 = (char *)*param_1;\n  if (param_2 == (char *)0x0) {\n    param_2 = (char *)param_1[1];\n  }\n  else {\n    if (param_2 <= pcVar2) {\n      return (char *)0x0;\n    }\n    param_2 = param_2 + -1;\n  }\n  for (; *param_2 == '\0'; param_2 = param_2 + -1) {\n  }\n  if (param_2 <= pcVar2) {\n    return (char *)0x0;\n  }\n  if (param_2[-1] == '\0') {\n    return param_2;\n  }\n  do {\n    pcVar1 = param_2 + -1;\n    if (param_2[-2] == '\0') {\n      return pcVar1;\n    }\n    param_2 = pcVar1;\n  } while (pcVar2 != pcVar1);\n  return pcVar1;\n}" primitive_type (pointer_declarator "* back_textlist(undefined4 *param_1,char *param_2)" * (function_declarator "back_textlist(undefined4 *param_1,char *param_2)" identifier (parameter_list "(undefined4 *param_1,char *param_2)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) )))) (compound_statement "{\n  char *pcVar1;\n  char *pcVar2;\n  \n  pcVar2 = (char *)*param_1;\n  if (param_2 == (char *)0x0) {\n    param_2 = (char *)param_1[1];\n  }\n  else {\n    if (param_2 <= pcVar2) {\n      return (char *)0x0;\n    }\n    param_2 = param_2 + -1;\n  }\n  for (; *param_2 == '\0'; param_2 = param_2 + -1) {\n  }\n  if (param_2 <= pcVar2) {\n    return (char *)0x0;\n  }\n  if (param_2[-1] == '\0') {\n    return param_2;\n  }\n  do {\n    pcVar1 = param_2 + -1;\n    if (param_2[-2] == '\0') {\n      return pcVar1;\n    }\n    param_2 = pcVar1;\n  } while (pcVar2 != pcVar1);\n  return pcVar1;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (expression_statement "pcVar2 = (char *)*param_1;" (assignment_expression "pcVar2 = (char *)*param_1" identifier = (cast_expression "(char *)*param_1" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (if_statement "if (param_2 == (char *)0x0) {\n    param_2 = (char *)param_1[1];\n  }\n  else {\n    if (param_2 <= pcVar2) {\n      return (char *)0x0;\n    }\n    param_2 = param_2 + -1;\n  }" if (parenthesized_expression "(param_2 == (char *)0x0)" ( (binary_expression "param_2 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    param_2 = (char *)param_1[1];\n  }" { (expression_statement "param_2 = (char *)param_1[1];" (assignment_expression "param_2 = (char *)param_1[1]" identifier = (cast_expression "(char *)param_1[1]" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[1]" identifier [ number_literal ]))) ;) }) (else_clause "else {\n    if (param_2 <= pcVar2) {\n      return (char *)0x0;\n    }\n    param_2 = param_2 + -1;\n  }" else (compound_statement "{\n    if (param_2 <= pcVar2) {\n      return (char *)0x0;\n    }\n    param_2 = param_2 + -1;\n  }" { (if_statement "if (param_2 <= pcVar2) {\n      return (char *)0x0;\n    }" if (parenthesized_expression "(param_2 <= pcVar2)" ( (binary_expression "param_2 <= pcVar2" identifier <= identifier) )) (compound_statement "{\n      return (char *)0x0;\n    }" { (return_statement "return (char *)0x0;" return (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "param_2 = param_2 + -1;" (assignment_expression "param_2 = param_2 + -1" identifier = (binary_expression "param_2 + -1" identifier + number_literal)) ;) }))) (for_statement "for (; *param_2 == '\0'; param_2 = param_2 + -1) {\n  }" for ( ; (binary_expression "*param_2 == '\0'" (pointer_expression "*param_2" * identifier) == (char_literal "'\0'" ' escape_sequence ')) ; (assignment_expression "param_2 = param_2 + -1" identifier = (binary_expression "param_2 + -1" identifier + number_literal)) ) (compound_statement "{\n  }" { })) (if_statement "if (param_2 <= pcVar2) {\n    return (char *)0x0;\n  }" if (parenthesized_expression "(param_2 <= pcVar2)" ( (binary_expression "param_2 <= pcVar2" identifier <= identifier) )) (compound_statement "{\n    return (char *)0x0;\n  }" { (return_statement "return (char *)0x0;" return (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (if_statement "if (param_2[-1] == '\0') {\n    return param_2;\n  }" if (parenthesized_expression "(param_2[-1] == '\0')" ( (binary_expression "param_2[-1] == '\0'" (subscript_expression "param_2[-1]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    return param_2;\n  }" { (return_statement "return param_2;" return identifier ;) })) (do_statement "do {\n    pcVar1 = param_2 + -1;\n    if (param_2[-2] == '\0') {\n      return pcVar1;\n    }\n    param_2 = pcVar1;\n  } while (pcVar2 != pcVar1);" do (compound_statement "{\n    pcVar1 = param_2 + -1;\n    if (param_2[-2] == '\0') {\n      return pcVar1;\n    }\n    param_2 = pcVar1;\n  }" { (expression_statement "pcVar1 = param_2 + -1;" (assignment_expression "pcVar1 = param_2 + -1" identifier = (binary_expression "param_2 + -1" identifier + number_literal)) ;) (if_statement "if (param_2[-2] == '\0') {\n      return pcVar1;\n    }" if (parenthesized_expression "(param_2[-2] == '\0')" ( (binary_expression "param_2[-2] == '\0'" (subscript_expression "param_2[-2]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      return pcVar1;\n    }" { (return_statement "return pcVar1;" return identifier ;) })) (expression_statement "param_2 = pcVar1;" (assignment_expression "param_2 = pcVar1" identifier = identifier) ;) }) while (parenthesized_expression "(pcVar2 != pcVar1)" ( (binary_expression "pcVar2 != pcVar1" identifier != identifier) )) ;) (return_statement "return pcVar1;" return identifier ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nchar * back_textlist(textlist *tlist,char *prev)\n\n{\n  char *pcVar1;\n  char *pcVar2;\n  char *pcVar3;\n  \n  pcVar3 = tlist->string;\n  if (prev == (char *)0x0) {\n    pcVar1 = tlist->endstring;\n  }\n  else {\n    if (prev <= pcVar3) {\n      return (char *)0x0;\n    }\n    pcVar1 = prev + -1;\n  }\n  for (; *pcVar1 == '\0'; pcVar1 = pcVar1 + -1) {\n  }\n  if (pcVar1 <= pcVar3) {\n    return (char *)0x0;\n  }\n  if (pcVar1[-1] == '\0') {\n    return pcVar1;\n  }\n  do {\n    pcVar2 = pcVar1 + -1;\n    if (pcVar1[-2] == '\0') {\n      return pcVar2;\n    }\n    pcVar1 = pcVar2;\n  } while (pcVar3 != pcVar2);\n  return pcVar2;\n}\n\n" comment (function_definition "char * back_textlist(textlist *tlist,char *prev)\n\n{\n  char *pcVar1;\n  char *pcVar2;\n  char *pcVar3;\n  \n  pcVar3 = tlist->string;\n  if (prev == (char *)0x0) {\n    pcVar1 = tlist->endstring;\n  }\n  else {\n    if (prev <= pcVar3) {\n      return (char *)0x0;\n    }\n    pcVar1 = prev + -1;\n  }\n  for (; *pcVar1 == '\0'; pcVar1 = pcVar1 + -1) {\n  }\n  if (pcVar1 <= pcVar3) {\n    return (char *)0x0;\n  }\n  if (pcVar1[-1] == '\0') {\n    return pcVar1;\n  }\n  do {\n    pcVar2 = pcVar1 + -1;\n    if (pcVar1[-2] == '\0') {\n      return pcVar2;\n    }\n    pcVar1 = pcVar2;\n  } while (pcVar3 != pcVar2);\n  return pcVar2;\n}" primitive_type (pointer_declarator "* back_textlist(textlist *tlist,char *prev)" * (function_declarator "back_textlist(textlist *tlist,char *prev)" identifier (parameter_list "(textlist *tlist,char *prev)" ( (parameter_declaration "textlist *tlist" type_identifier (pointer_declarator "*tlist" * identifier)) , (parameter_declaration "char *prev" primitive_type (pointer_declarator "*prev" * identifier)) )))) (compound_statement "{\n  char *pcVar1;\n  char *pcVar2;\n  char *pcVar3;\n  \n  pcVar3 = tlist->string;\n  if (prev == (char *)0x0) {\n    pcVar1 = tlist->endstring;\n  }\n  else {\n    if (prev <= pcVar3) {\n      return (char *)0x0;\n    }\n    pcVar1 = prev + -1;\n  }\n  for (; *pcVar1 == '\0'; pcVar1 = pcVar1 + -1) {\n  }\n  if (pcVar1 <= pcVar3) {\n    return (char *)0x0;\n  }\n  if (pcVar1[-1] == '\0') {\n    return pcVar1;\n  }\n  do {\n    pcVar2 = pcVar1 + -1;\n    if (pcVar1[-2] == '\0') {\n      return pcVar2;\n    }\n    pcVar1 = pcVar2;\n  } while (pcVar3 != pcVar2);\n  return pcVar2;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (expression_statement "pcVar3 = tlist->string;" (assignment_expression "pcVar3 = tlist->string" identifier = (field_expression "tlist->string" identifier -> field_identifier)) ;) (if_statement "if (prev == (char *)0x0) {\n    pcVar1 = tlist->endstring;\n  }\n  else {\n    if (prev <= pcVar3) {\n      return (char *)0x0;\n    }\n    pcVar1 = prev + -1;\n  }" if (parenthesized_expression "(prev == (char *)0x0)" ( (binary_expression "prev == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pcVar1 = tlist->endstring;\n  }" { (expression_statement "pcVar1 = tlist->endstring;" (assignment_expression "pcVar1 = tlist->endstring" identifier = (field_expression "tlist->endstring" identifier -> field_identifier)) ;) }) (else_clause "else {\n    if (prev <= pcVar3) {\n      return (char *)0x0;\n    }\n    pcVar1 = prev + -1;\n  }" else (compound_statement "{\n    if (prev <= pcVar3) {\n      return (char *)0x0;\n    }\n    pcVar1 = prev + -1;\n  }" { (if_statement "if (prev <= pcVar3) {\n      return (char *)0x0;\n    }" if (parenthesized_expression "(prev <= pcVar3)" ( (binary_expression "prev <= pcVar3" identifier <= identifier) )) (compound_statement "{\n      return (char *)0x0;\n    }" { (return_statement "return (char *)0x0;" return (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "pcVar1 = prev + -1;" (assignment_expression "pcVar1 = prev + -1" identifier = (binary_expression "prev + -1" identifier + number_literal)) ;) }))) (for_statement "for (; *pcVar1 == '\0'; pcVar1 = pcVar1 + -1) {\n  }" for ( ; (binary_expression "*pcVar1 == '\0'" (pointer_expression "*pcVar1" * identifier) == (char_literal "'\0'" ' escape_sequence ')) ; (assignment_expression "pcVar1 = pcVar1 + -1" identifier = (binary_expression "pcVar1 + -1" identifier + number_literal)) ) (compound_statement "{\n  }" { })) (if_statement "if (pcVar1 <= pcVar3) {\n    return (char *)0x0;\n  }" if (parenthesized_expression "(pcVar1 <= pcVar3)" ( (binary_expression "pcVar1 <= pcVar3" identifier <= identifier) )) (compound_statement "{\n    return (char *)0x0;\n  }" { (return_statement "return (char *)0x0;" return (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (if_statement "if (pcVar1[-1] == '\0') {\n    return pcVar1;\n  }" if (parenthesized_expression "(pcVar1[-1] == '\0')" ( (binary_expression "pcVar1[-1] == '\0'" (subscript_expression "pcVar1[-1]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    return pcVar1;\n  }" { (return_statement "return pcVar1;" return identifier ;) })) (do_statement "do {\n    pcVar2 = pcVar1 + -1;\n    if (pcVar1[-2] == '\0') {\n      return pcVar2;\n    }\n    pcVar1 = pcVar2;\n  } while (pcVar3 != pcVar2);" do (compound_statement "{\n    pcVar2 = pcVar1 + -1;\n    if (pcVar1[-2] == '\0') {\n      return pcVar2;\n    }\n    pcVar1 = pcVar2;\n  }" { (expression_statement "pcVar2 = pcVar1 + -1;" (assignment_expression "pcVar2 = pcVar1 + -1" identifier = (binary_expression "pcVar1 + -1" identifier + number_literal)) ;) (if_statement "if (pcVar1[-2] == '\0') {\n      return pcVar2;\n    }" if (parenthesized_expression "(pcVar1[-2] == '\0')" ( (binary_expression "pcVar1[-2] == '\0'" (subscript_expression "pcVar1[-2]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      return pcVar2;\n    }" { (return_statement "return pcVar2;" return identifier ;) })) (expression_statement "pcVar1 = pcVar2;" (assignment_expression "pcVar1 = pcVar2" identifier = identifier) ;) }) while (parenthesized_expression "(pcVar3 != pcVar2)" ( (binary_expression "pcVar3 != pcVar2" identifier != identifier) )) ;) (return_statement "return pcVar2;" return identifier ;) })))
(translation_unit "char * back_textlist(undefined4 *param_1,char *param_2)\n\n{\n  char *pcVar1;\n  char *pcVar2;\n  \n  pcVar2 = (char *)*param_1;\n  if (param_2 == (char *)0x0) {\n    param_2 = (char *)param_1[1];\n  }\n  else {\n    if (param_2 <= pcVar2) {\n      return (char *)0x0;\n    }\n    param_2 = param_2 + -1;\n  }\n  for (; *param_2 == '\0'; param_2 = param_2 + -1) {\n  }\n  if (param_2 <= pcVar2) {\n    return (char *)0x0;\n  }\n  if (param_2[-1] == '\0') {\n    return param_2;\n  }\n  do {\n    pcVar1 = param_2 + -1;\n    if (param_2[-2] == '\0') {\n      return pcVar1;\n    }\n    param_2 = pcVar1;\n  } while (pcVar2 != pcVar1);\n  return pcVar1;\n}\n\n" (function_definition "char * back_textlist(undefined4 *param_1,char *param_2)\n\n{\n  char *pcVar1;\n  char *pcVar2;\n  \n  pcVar2 = (char *)*param_1;\n  if (param_2 == (char *)0x0) {\n    param_2 = (char *)param_1[1];\n  }\n  else {\n    if (param_2 <= pcVar2) {\n      return (char *)0x0;\n    }\n    param_2 = param_2 + -1;\n  }\n  for (; *param_2 == '\0'; param_2 = param_2 + -1) {\n  }\n  if (param_2 <= pcVar2) {\n    return (char *)0x0;\n  }\n  if (param_2[-1] == '\0') {\n    return param_2;\n  }\n  do {\n    pcVar1 = param_2 + -1;\n    if (param_2[-2] == '\0') {\n      return pcVar1;\n    }\n    param_2 = pcVar1;\n  } while (pcVar2 != pcVar1);\n  return pcVar1;\n}" primitive_type (pointer_declarator "* back_textlist(undefined4 *param_1,char *param_2)" * (function_declarator "back_textlist(undefined4 *param_1,char *param_2)" identifier (parameter_list "(undefined4 *param_1,char *param_2)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) )))) (compound_statement "{\n  char *pcVar1;\n  char *pcVar2;\n  \n  pcVar2 = (char *)*param_1;\n  if (param_2 == (char *)0x0) {\n    param_2 = (char *)param_1[1];\n  }\n  else {\n    if (param_2 <= pcVar2) {\n      return (char *)0x0;\n    }\n    param_2 = param_2 + -1;\n  }\n  for (; *param_2 == '\0'; param_2 = param_2 + -1) {\n  }\n  if (param_2 <= pcVar2) {\n    return (char *)0x0;\n  }\n  if (param_2[-1] == '\0') {\n    return param_2;\n  }\n  do {\n    pcVar1 = param_2 + -1;\n    if (param_2[-2] == '\0') {\n      return pcVar1;\n    }\n    param_2 = pcVar1;\n  } while (pcVar2 != pcVar1);\n  return pcVar1;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (expression_statement "pcVar2 = (char *)*param_1;" (assignment_expression "pcVar2 = (char *)*param_1" identifier = (cast_expression "(char *)*param_1" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (if_statement "if (param_2 == (char *)0x0) {\n    param_2 = (char *)param_1[1];\n  }\n  else {\n    if (param_2 <= pcVar2) {\n      return (char *)0x0;\n    }\n    param_2 = param_2 + -1;\n  }" if (parenthesized_expression "(param_2 == (char *)0x0)" ( (binary_expression "param_2 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    param_2 = (char *)param_1[1];\n  }" { (expression_statement "param_2 = (char *)param_1[1];" (assignment_expression "param_2 = (char *)param_1[1]" identifier = (cast_expression "(char *)param_1[1]" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[1]" identifier [ number_literal ]))) ;) }) (else_clause "else {\n    if (param_2 <= pcVar2) {\n      return (char *)0x0;\n    }\n    param_2 = param_2 + -1;\n  }" else (compound_statement "{\n    if (param_2 <= pcVar2) {\n      return (char *)0x0;\n    }\n    param_2 = param_2 + -1;\n  }" { (if_statement "if (param_2 <= pcVar2) {\n      return (char *)0x0;\n    }" if (parenthesized_expression "(param_2 <= pcVar2)" ( (binary_expression "param_2 <= pcVar2" identifier <= identifier) )) (compound_statement "{\n      return (char *)0x0;\n    }" { (return_statement "return (char *)0x0;" return (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "param_2 = param_2 + -1;" (assignment_expression "param_2 = param_2 + -1" identifier = (binary_expression "param_2 + -1" identifier + number_literal)) ;) }))) (for_statement "for (; *param_2 == '\0'; param_2 = param_2 + -1) {\n  }" for ( ; (binary_expression "*param_2 == '\0'" (pointer_expression "*param_2" * identifier) == (char_literal "'\0'" ' escape_sequence ')) ; (assignment_expression "param_2 = param_2 + -1" identifier = (binary_expression "param_2 + -1" identifier + number_literal)) ) (compound_statement "{\n  }" { })) (if_statement "if (param_2 <= pcVar2) {\n    return (char *)0x0;\n  }" if (parenthesized_expression "(param_2 <= pcVar2)" ( (binary_expression "param_2 <= pcVar2" identifier <= identifier) )) (compound_statement "{\n    return (char *)0x0;\n  }" { (return_statement "return (char *)0x0;" return (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (if_statement "if (param_2[-1] == '\0') {\n    return param_2;\n  }" if (parenthesized_expression "(param_2[-1] == '\0')" ( (binary_expression "param_2[-1] == '\0'" (subscript_expression "param_2[-1]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    return param_2;\n  }" { (return_statement "return param_2;" return identifier ;) })) (do_statement "do {\n    pcVar1 = param_2 + -1;\n    if (param_2[-2] == '\0') {\n      return pcVar1;\n    }\n    param_2 = pcVar1;\n  } while (pcVar2 != pcVar1);" do (compound_statement "{\n    pcVar1 = param_2 + -1;\n    if (param_2[-2] == '\0') {\n      return pcVar1;\n    }\n    param_2 = pcVar1;\n  }" { (expression_statement "pcVar1 = param_2 + -1;" (assignment_expression "pcVar1 = param_2 + -1" identifier = (binary_expression "param_2 + -1" identifier + number_literal)) ;) (if_statement "if (param_2[-2] == '\0') {\n      return pcVar1;\n    }" if (parenthesized_expression "(param_2[-2] == '\0')" ( (binary_expression "param_2[-2] == '\0'" (subscript_expression "param_2[-2]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      return pcVar1;\n    }" { (return_statement "return pcVar1;" return identifier ;) })) (expression_statement "param_2 = pcVar1;" (assignment_expression "param_2 = pcVar1" identifier = identifier) ;) }) while (parenthesized_expression "(pcVar2 != pcVar1)" ( (binary_expression "pcVar2 != pcVar1" identifier != identifier) )) ;) (return_statement "return pcVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }))) (for_statement for ( ; (binary_expression (pointer_expression * IDENT) == (char_literal ' escape_sequence ')) ; (assignment_expression IDENT = (binary_expression IDENT + LIT)) ) (compound_statement { })) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == (char_literal ' escape_sequence ')) )) (compound_statement { (return_statement return IDENT ;) })) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == (char_literal ' escape_sequence ')) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) (return_statement return IDENT ;) })))
(function_definition "char * back_textlist(undefined4 *param_1,char *param_2)\n\n{\n  char *pcVar1;\n  char *pcVar2;\n  \n  pcVar2 = (char *)*param_1;\n  if (param_2 == (char *)0x0) {\n    param_2 = (char *)param_1[1];\n  }\n  else {\n    if (param_2 <= pcVar2) {\n      return (char *)0x0;\n    }\n    param_2 = param_2 + -1;\n  }\n  for (; *param_2 == '\0'; param_2 = param_2 + -1) {\n  }\n  if (param_2 <= pcVar2) {\n    return (char *)0x0;\n  }\n  if (param_2[-1] == '\0') {\n    return param_2;\n  }\n  do {\n    pcVar1 = param_2 + -1;\n    if (param_2[-2] == '\0') {\n      return pcVar1;\n    }\n    param_2 = pcVar1;\n  } while (pcVar2 != pcVar1);\n  return pcVar1;\n}" (primitive_type "char") (pointer_declarator "* back_textlist(undefined4 *param_1,char *param_2)" (* "*") (function_declarator "back_textlist(undefined4 *param_1,char *param_2)" (identifier "back_textlist") (parameter_list "(undefined4 *param_1,char *param_2)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "char *param_2" (primitive_type "char") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")")))) (compound_statement "{\n  char *pcVar1;\n  char *pcVar2;\n  \n  pcVar2 = (char *)*param_1;\n  if (param_2 == (char *)0x0) {\n    param_2 = (char *)param_1[1];\n  }\n  else {\n    if (param_2 <= pcVar2) {\n      return (char *)0x0;\n    }\n    param_2 = param_2 + -1;\n  }\n  for (; *param_2 == '\0'; param_2 = param_2 + -1) {\n  }\n  if (param_2 <= pcVar2) {\n    return (char *)0x0;\n  }\n  if (param_2[-1] == '\0') {\n    return param_2;\n  }\n  do {\n    pcVar1 = param_2 + -1;\n    if (param_2[-2] == '\0') {\n      return pcVar1;\n    }\n    param_2 = pcVar1;\n  } while (pcVar2 != pcVar1);\n  return pcVar1;\n}" ({ "{") (declaration "char *pcVar1;" (primitive_type "char") (pointer_declarator "*pcVar1" (* "*") (identifier "pcVar1")) (; ";")) (declaration "char *pcVar2;" (primitive_type "char") (pointer_declarator "*pcVar2" (* "*") (identifier "pcVar2")) (; ";")) (expression_statement "pcVar2 = (char *)*param_1;" (assignment_expression "pcVar2 = (char *)*param_1" (identifier "pcVar2") (= "=") (cast_expression "(char *)*param_1" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (if_statement "if (param_2 == (char *)0x0) {\n    param_2 = (char *)param_1[1];\n  }\n  else {\n    if (param_2 <= pcVar2) {\n      return (char *)0x0;\n    }\n    param_2 = param_2 + -1;\n  }" (if "if") (parenthesized_expression "(param_2 == (char *)0x0)" (( "(") (binary_expression "param_2 == (char *)0x0" (identifier "param_2") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    param_2 = (char *)param_1[1];\n  }" ({ "{") (expression_statement "param_2 = (char *)param_1[1];" (assignment_expression "param_2 = (char *)param_1[1]" (identifier "param_2") (= "=") (cast_expression "(char *)param_1[1]" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")))) (; ";")) (} "}")) (else_clause "else {\n    if (param_2 <= pcVar2) {\n      return (char *)0x0;\n    }\n    param_2 = param_2 + -1;\n  }" (else "else") (compound_statement "{\n    if (param_2 <= pcVar2) {\n      return (char *)0x0;\n    }\n    param_2 = param_2 + -1;\n  }" ({ "{") (if_statement "if (param_2 <= pcVar2) {\n      return (char *)0x0;\n    }" (if "if") (parenthesized_expression "(param_2 <= pcVar2)" (( "(") (binary_expression "param_2 <= pcVar2" (identifier "param_2") (<= "<=") (identifier "pcVar2")) () ")")) (compound_statement "{\n      return (char *)0x0;\n    }" ({ "{") (return_statement "return (char *)0x0;" (return "return") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}"))) (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"))) (; ";")) (} "}")))) (for_statement "for (; *param_2 == '\0'; param_2 = param_2 + -1) {\n  }" (for "for") (( "(") (; ";") (binary_expression "*param_2 == '\0'" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";") (assignment_expression "param_2 = param_2 + -1" (identifier "param_2") (= "=") (binary_expression "param_2 + -1" (identifier "param_2") (+ "+") (number_literal "-1"))) () ")") (compound_statement "{\n  }" ({ "{") (} "}"))) (if_statement "if (param_2 <= pcVar2) {\n    return (char *)0x0;\n  }" (if "if") (parenthesized_expression "(param_2 <= pcVar2)" (( "(") (binary_expression "param_2 <= pcVar2" (identifier "param_2") (<= "<=") (identifier "pcVar2")) () ")")) (compound_statement "{\n    return (char *)0x0;\n  }" ({ "{") (return_statement "return (char *)0x0;" (return "return") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}"))) (if_statement "if (param_2[-1] == '\0') {\n    return param_2;\n  }" (if "if") (parenthesized_expression "(param_2[-1] == '\0')" (( "(") (binary_expression "param_2[-1] == '\0'" (subscript_expression "param_2[-1]" (identifier "param_2") ([ "[") (number_literal "-1") (] "]")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    return param_2;\n  }" ({ "{") (return_statement "return param_2;" (return "return") (identifier "param_2") (; ";")) (} "}"))) (do_statement "do {\n    pcVar1 = param_2 + -1;\n    if (param_2[-2] == '\0') {\n      return pcVar1;\n    }\n    param_2 = pcVar1;\n  } while (pcVar2 != pcVar1);" (do "do") (compound_statement "{\n    pcVar1 = param_2 + -1;\n    if (param_2[-2] == '\0') {\n      return pcVar1;\n    }\n    param_2 = pcVar1;\n  }" ({ "{") (expression_statement "pcVar1 = param_2 + -1;" (assignment_expression "pcVar1 = param_2 + -1" (identifier "pcVar1") (= "=") (binary_expression "param_2 + -1" (identifier "param_2") (+ "+") (number_literal "-1"))) (; ";")) (if_statement "if (param_2[-2] == '\0') {\n      return pcVar1;\n    }" (if "if") (parenthesized_expression "(param_2[-2] == '\0')" (( "(") (binary_expression "param_2[-2] == '\0'" (subscript_expression "param_2[-2]" (identifier "param_2") ([ "[") (number_literal "-2") (] "]")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n      return pcVar1;\n    }" ({ "{") (return_statement "return pcVar1;" (return "return") (identifier "pcVar1") (; ";")) (} "}"))) (expression_statement "param_2 = pcVar1;" (assignment_expression "param_2 = pcVar1" (identifier "param_2") (= "=") (identifier "pcVar1")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(pcVar2 != pcVar1)" (( "(") (binary_expression "pcVar2 != pcVar1" (identifier "pcVar2") (!= "!=") (identifier "pcVar1")) () ")")) (; ";")) (return_statement "return pcVar1;" (return "return") (identifier "pcVar1") (; ";")) (} "}")))
(translation_unit (function_definition type: (primitive_type) declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier)))))) body: (compound_statement (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal)))))) alternative: (else_clause (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (return_statement (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))))) (for_statement condition: (binary_expression left: (pointer_expression argument: (identifier)) right: (char_literal (escape_sequence))) update: (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))) body: (compound_statement)) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (return_statement (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (char_literal (escape_sequence)))) consequence: (compound_statement (return_statement (identifier)))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (char_literal (escape_sequence)))) consequence: (compound_statement (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) (return_statement (identifier)))))

char * MASKED(undefined4 *param_1,char *param_2)

{
  char *pcVar1;
  char *pcVar2;
  
  pcVar2 = (char *)*param_1;
  if (param_2 == (char *)0x0) {
    param_2 = (char *)param_1[1];
  }
  else {
    if (param_2 <= pcVar2) {
      return (char *)0x0;
    }
    param_2 = param_2 + -1;
  }
  for (; *param_2 == '\0'; param_2 = param_2 + -1) {
  }
  if (param_2 <= pcVar2) {
    return (char *)0x0;
  }
  if (param_2[-1] == '\0') {
    return param_2;
  }
  do {
    pcVar1 = param_2 + -1;
    if (param_2[-2] == '\0') {
      return pcVar1;
    }
    param_2 = pcVar1;
  } while (pcVar2 != pcVar1);
  return pcVar1;
}

