
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

char * chomp(char *str)

{
  int iVar1;
  size_t sVar2;
  size_t sVar3;
  char *pcVar4;
  
  if (str != (char *)0x0) {
    sVar2 = strlen(str);
    pcVar4 = str;
    if (sVar2 != 0) {
      if ((str[sVar2 - 1] == '\r') || (str[sVar2 - 1] == '\n')) {
        do {
          sVar3 = sVar2 - 1;
          if (sVar3 == 0) goto LAB_0001d464;
          iVar1 = sVar2 - 2;
          sVar2 = sVar3;
        } while ((str[iVar1] == '\r') || (str[iVar1] == '\n'));
        pcVar4 = str + sVar3;
      }
      else {
        pcVar4 = str + sVar2;
      }
    }
LAB_0001d464:
    *pcVar4 = '\0';
  }
  return str;
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

char * FUN_0001d410(char *param_1)

{
  int iVar1;
  size_t sVar2;
  size_t sVar3;
  char *pcVar4;
  
  if (param_1 != (char *)0x0) {
    sVar2 = strlen(param_1);
    pcVar4 = param_1;
    if (sVar2 != 0) {
      if ((param_1[sVar2 - 1] == '\r') || (param_1[sVar2 - 1] == '\n')) {
        do {
          sVar3 = sVar2 - 1;
          if (sVar3 == 0) goto LAB_0001d464;
          iVar1 = sVar2 - 2;
          sVar2 = sVar3;
        } while ((param_1[iVar1] == '\r') || (param_1[iVar1] == '\n'));
        pcVar4 = param_1 + sVar3;
      }
      else {
        pcVar4 = param_1 + sVar2;
      }
    }
LAB_0001d464:
    *pcVar4 = '\0';
  }
  return param_1;
}


PUSH ESI
PUSH EBX
CALL 0x000149a0
ADD EBX,0xaf959
SUB ESP,0x4
MOV ESI,dword ptr [ESP + 0x10]
TEST ESI,ESI
JZ 0x0001d467
SUB ESP,0xc
PUSH ESI
CALL 0x00014460
ADD ESP,0x10
MOV EDX,EAX
TEST EAX,EAX
JZ 0x0001d470
MOVZX ECX,byte ptr [ESI + EAX*0x1 + -0x1]
CMP CL,0xd
JZ 0x0001d450
CMP CL,0xa
JNZ 0x0001d474
LEA ESI,[ESI]
SUB EDX,0x1
JZ 0x0001d470
MOVZX EAX,byte ptr [ESI + EDX*0x1 + -0x1]
CMP AL,0xd
JZ 0x0001d450
CMP AL,0xa
JZ 0x0001d450
ADD EDX,ESI
MOV byte ptr [EDX],0x0
ADD ESP,0x4
MOV EAX,ESI
POP EBX
POP ESI
RET
MOV EDX,ESI
JMP 0x0001d464
LEA EDX,[ESI + EAX*0x1]
JMP 0x0001d464
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nchar * FUN_0001d410(char *param_1)\n\n{\n  int iVar1;\n  size_t sVar2;\n  size_t sVar3;\n  char *pcVar4;\n  \n  if (param_1 != (char *)0x0) {\n    sVar2 = strlen(param_1);\n    pcVar4 = param_1;\n    if (sVar2 != 0) {\n      if ((param_1[sVar2 - 1] == '\r') || (param_1[sVar2 - 1] == '\n')) {\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((param_1[iVar1] == '\r') || (param_1[iVar1] == '\n'));\n        pcVar4 = param_1 + sVar3;\n      }\n      else {\n        pcVar4 = param_1 + sVar2;\n      }\n    }\nLAB_0001d464:\n    *pcVar4 = '\0';\n  }\n  return param_1;\n}\n\n" comment (function_definition "char * FUN_0001d410(char *param_1)\n\n{\n  int iVar1;\n  size_t sVar2;\n  size_t sVar3;\n  char *pcVar4;\n  \n  if (param_1 != (char *)0x0) {\n    sVar2 = strlen(param_1);\n    pcVar4 = param_1;\n    if (sVar2 != 0) {\n      if ((param_1[sVar2 - 1] == '\r') || (param_1[sVar2 - 1] == '\n')) {\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((param_1[iVar1] == '\r') || (param_1[iVar1] == '\n'));\n        pcVar4 = param_1 + sVar3;\n      }\n      else {\n        pcVar4 = param_1 + sVar2;\n      }\n    }\nLAB_0001d464:\n    *pcVar4 = '\0';\n  }\n  return param_1;\n}" primitive_type (pointer_declarator "* FUN_0001d410(char *param_1)" * (function_declarator "FUN_0001d410(char *param_1)" identifier (parameter_list "(char *param_1)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) )))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  size_t sVar3;\n  char *pcVar4;\n  \n  if (param_1 != (char *)0x0) {\n    sVar2 = strlen(param_1);\n    pcVar4 = param_1;\n    if (sVar2 != 0) {\n      if ((param_1[sVar2 - 1] == '\r') || (param_1[sVar2 - 1] == '\n')) {\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((param_1[iVar1] == '\r') || (param_1[iVar1] == '\n'));\n        pcVar4 = param_1 + sVar3;\n      }\n      else {\n        pcVar4 = param_1 + sVar2;\n      }\n    }\nLAB_0001d464:\n    *pcVar4 = '\0';\n  }\n  return param_1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (if_statement "if (param_1 != (char *)0x0) {\n    sVar2 = strlen(param_1);\n    pcVar4 = param_1;\n    if (sVar2 != 0) {\n      if ((param_1[sVar2 - 1] == '\r') || (param_1[sVar2 - 1] == '\n')) {\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((param_1[iVar1] == '\r') || (param_1[iVar1] == '\n'));\n        pcVar4 = param_1 + sVar3;\n      }\n      else {\n        pcVar4 = param_1 + sVar2;\n      }\n    }\nLAB_0001d464:\n    *pcVar4 = '\0';\n  }" if (parenthesized_expression "(param_1 != (char *)0x0)" ( (binary_expression "param_1 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    sVar2 = strlen(param_1);\n    pcVar4 = param_1;\n    if (sVar2 != 0) {\n      if ((param_1[sVar2 - 1] == '\r') || (param_1[sVar2 - 1] == '\n')) {\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((param_1[iVar1] == '\r') || (param_1[iVar1] == '\n'));\n        pcVar4 = param_1 + sVar3;\n      }\n      else {\n        pcVar4 = param_1 + sVar2;\n      }\n    }\nLAB_0001d464:\n    *pcVar4 = '\0';\n  }" { (expression_statement "sVar2 = strlen(param_1);" (assignment_expression "sVar2 = strlen(param_1)" identifier = (call_expression "strlen(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "pcVar4 = param_1;" (assignment_expression "pcVar4 = param_1" identifier = identifier) ;) (if_statement "if (sVar2 != 0) {\n      if ((param_1[sVar2 - 1] == '\r') || (param_1[sVar2 - 1] == '\n')) {\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((param_1[iVar1] == '\r') || (param_1[iVar1] == '\n'));\n        pcVar4 = param_1 + sVar3;\n      }\n      else {\n        pcVar4 = param_1 + sVar2;\n      }\n    }" if (parenthesized_expression "(sVar2 != 0)" ( (binary_expression "sVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      if ((param_1[sVar2 - 1] == '\r') || (param_1[sVar2 - 1] == '\n')) {\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((param_1[iVar1] == '\r') || (param_1[iVar1] == '\n'));\n        pcVar4 = param_1 + sVar3;\n      }\n      else {\n        pcVar4 = param_1 + sVar2;\n      }\n    }" { (if_statement "if ((param_1[sVar2 - 1] == '\r') || (param_1[sVar2 - 1] == '\n')) {\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((param_1[iVar1] == '\r') || (param_1[iVar1] == '\n'));\n        pcVar4 = param_1 + sVar3;\n      }\n      else {\n        pcVar4 = param_1 + sVar2;\n      }" if (parenthesized_expression "((param_1[sVar2 - 1] == '\r') || (param_1[sVar2 - 1] == '\n'))" ( (binary_expression "(param_1[sVar2 - 1] == '\r') || (param_1[sVar2 - 1] == '\n')" (parenthesized_expression "(param_1[sVar2 - 1] == '\r')" ( (binary_expression "param_1[sVar2 - 1] == '\r'" (subscript_expression "param_1[sVar2 - 1]" identifier [ (binary_expression "sVar2 - 1" identifier - number_literal) ]) == (char_literal "'\r'" ' escape_sequence ')) )) || (parenthesized_expression "(param_1[sVar2 - 1] == '\n')" ( (binary_expression "param_1[sVar2 - 1] == '\n'" (subscript_expression "param_1[sVar2 - 1]" identifier [ (binary_expression "sVar2 - 1" identifier - number_literal) ]) == (char_literal "'\n'" ' escape_sequence ')) ))) )) (compound_statement "{\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((param_1[iVar1] == '\r') || (param_1[iVar1] == '\n'));\n        pcVar4 = param_1 + sVar3;\n      }" { (do_statement "do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((param_1[iVar1] == '\r') || (param_1[iVar1] == '\n'));" do (compound_statement "{\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        }" { (expression_statement "sVar3 = sVar2 - 1;" (assignment_expression "sVar3 = sVar2 - 1" identifier = (binary_expression "sVar2 - 1" identifier - number_literal)) ;) (if_statement "if (sVar3 == 0) goto LAB_0001d464;" if (parenthesized_expression "(sVar3 == 0)" ( (binary_expression "sVar3 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0001d464;" goto statement_identifier ;)) (expression_statement "iVar1 = sVar2 - 2;" (assignment_expression "iVar1 = sVar2 - 2" identifier = (binary_expression "sVar2 - 2" identifier - number_literal)) ;) (expression_statement "sVar2 = sVar3;" (assignment_expression "sVar2 = sVar3" identifier = identifier) ;) }) while (parenthesized_expression "((param_1[iVar1] == '\r') || (param_1[iVar1] == '\n'))" ( (binary_expression "(param_1[iVar1] == '\r') || (param_1[iVar1] == '\n')" (parenthesized_expression "(param_1[iVar1] == '\r')" ( (binary_expression "param_1[iVar1] == '\r'" (subscript_expression "param_1[iVar1]" identifier [ identifier ]) == (char_literal "'\r'" ' escape_sequence ')) )) || (parenthesized_expression "(param_1[iVar1] == '\n')" ( (binary_expression "param_1[iVar1] == '\n'" (subscript_expression "param_1[iVar1]" identifier [ identifier ]) == (char_literal "'\n'" ' escape_sequence ')) ))) )) ;) (expression_statement "pcVar4 = param_1 + sVar3;" (assignment_expression "pcVar4 = param_1 + sVar3" identifier = (binary_expression "param_1 + sVar3" identifier + identifier)) ;) }) (else_clause "else {\n        pcVar4 = param_1 + sVar2;\n      }" else (compound_statement "{\n        pcVar4 = param_1 + sVar2;\n      }" { (expression_statement "pcVar4 = param_1 + sVar2;" (assignment_expression "pcVar4 = param_1 + sVar2" identifier = (binary_expression "param_1 + sVar2" identifier + identifier)) ;) }))) })) (labeled_statement "LAB_0001d464:\n    *pcVar4 = '\0';" statement_identifier : (expression_statement "*pcVar4 = '\0';" (assignment_expression "*pcVar4 = '\0'" (pointer_expression "*pcVar4" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;)) })) (return_statement "return param_1;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nchar * chomp(char *str)\n\n{\n  int iVar1;\n  size_t sVar2;\n  size_t sVar3;\n  char *pcVar4;\n  \n  if (str != (char *)0x0) {\n    sVar2 = strlen(str);\n    pcVar4 = str;\n    if (sVar2 != 0) {\n      if ((str[sVar2 - 1] == '\r') || (str[sVar2 - 1] == '\n')) {\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((str[iVar1] == '\r') || (str[iVar1] == '\n'));\n        pcVar4 = str + sVar3;\n      }\n      else {\n        pcVar4 = str + sVar2;\n      }\n    }\nLAB_0001d464:\n    *pcVar4 = '\0';\n  }\n  return str;\n}\n\n" comment comment (function_definition "char * chomp(char *str)\n\n{\n  int iVar1;\n  size_t sVar2;\n  size_t sVar3;\n  char *pcVar4;\n  \n  if (str != (char *)0x0) {\n    sVar2 = strlen(str);\n    pcVar4 = str;\n    if (sVar2 != 0) {\n      if ((str[sVar2 - 1] == '\r') || (str[sVar2 - 1] == '\n')) {\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((str[iVar1] == '\r') || (str[iVar1] == '\n'));\n        pcVar4 = str + sVar3;\n      }\n      else {\n        pcVar4 = str + sVar2;\n      }\n    }\nLAB_0001d464:\n    *pcVar4 = '\0';\n  }\n  return str;\n}" primitive_type (pointer_declarator "* chomp(char *str)" * (function_declarator "chomp(char *str)" identifier (parameter_list "(char *str)" ( (parameter_declaration "char *str" primitive_type (pointer_declarator "*str" * identifier)) )))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  size_t sVar3;\n  char *pcVar4;\n  \n  if (str != (char *)0x0) {\n    sVar2 = strlen(str);\n    pcVar4 = str;\n    if (sVar2 != 0) {\n      if ((str[sVar2 - 1] == '\r') || (str[sVar2 - 1] == '\n')) {\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((str[iVar1] == '\r') || (str[iVar1] == '\n'));\n        pcVar4 = str + sVar3;\n      }\n      else {\n        pcVar4 = str + sVar2;\n      }\n    }\nLAB_0001d464:\n    *pcVar4 = '\0';\n  }\n  return str;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (if_statement "if (str != (char *)0x0) {\n    sVar2 = strlen(str);\n    pcVar4 = str;\n    if (sVar2 != 0) {\n      if ((str[sVar2 - 1] == '\r') || (str[sVar2 - 1] == '\n')) {\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((str[iVar1] == '\r') || (str[iVar1] == '\n'));\n        pcVar4 = str + sVar3;\n      }\n      else {\n        pcVar4 = str + sVar2;\n      }\n    }\nLAB_0001d464:\n    *pcVar4 = '\0';\n  }" if (parenthesized_expression "(str != (char *)0x0)" ( (binary_expression "str != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    sVar2 = strlen(str);\n    pcVar4 = str;\n    if (sVar2 != 0) {\n      if ((str[sVar2 - 1] == '\r') || (str[sVar2 - 1] == '\n')) {\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((str[iVar1] == '\r') || (str[iVar1] == '\n'));\n        pcVar4 = str + sVar3;\n      }\n      else {\n        pcVar4 = str + sVar2;\n      }\n    }\nLAB_0001d464:\n    *pcVar4 = '\0';\n  }" { (expression_statement "sVar2 = strlen(str);" (assignment_expression "sVar2 = strlen(str)" identifier = (call_expression "strlen(str)" identifier (argument_list "(str)" ( identifier )))) ;) (expression_statement "pcVar4 = str;" (assignment_expression "pcVar4 = str" identifier = identifier) ;) (if_statement "if (sVar2 != 0) {\n      if ((str[sVar2 - 1] == '\r') || (str[sVar2 - 1] == '\n')) {\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((str[iVar1] == '\r') || (str[iVar1] == '\n'));\n        pcVar4 = str + sVar3;\n      }\n      else {\n        pcVar4 = str + sVar2;\n      }\n    }" if (parenthesized_expression "(sVar2 != 0)" ( (binary_expression "sVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      if ((str[sVar2 - 1] == '\r') || (str[sVar2 - 1] == '\n')) {\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((str[iVar1] == '\r') || (str[iVar1] == '\n'));\n        pcVar4 = str + sVar3;\n      }\n      else {\n        pcVar4 = str + sVar2;\n      }\n    }" { (if_statement "if ((str[sVar2 - 1] == '\r') || (str[sVar2 - 1] == '\n')) {\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((str[iVar1] == '\r') || (str[iVar1] == '\n'));\n        pcVar4 = str + sVar3;\n      }\n      else {\n        pcVar4 = str + sVar2;\n      }" if (parenthesized_expression "((str[sVar2 - 1] == '\r') || (str[sVar2 - 1] == '\n'))" ( (binary_expression "(str[sVar2 - 1] == '\r') || (str[sVar2 - 1] == '\n')" (parenthesized_expression "(str[sVar2 - 1] == '\r')" ( (binary_expression "str[sVar2 - 1] == '\r'" (subscript_expression "str[sVar2 - 1]" identifier [ (binary_expression "sVar2 - 1" identifier - number_literal) ]) == (char_literal "'\r'" ' escape_sequence ')) )) || (parenthesized_expression "(str[sVar2 - 1] == '\n')" ( (binary_expression "str[sVar2 - 1] == '\n'" (subscript_expression "str[sVar2 - 1]" identifier [ (binary_expression "sVar2 - 1" identifier - number_literal) ]) == (char_literal "'\n'" ' escape_sequence ')) ))) )) (compound_statement "{\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((str[iVar1] == '\r') || (str[iVar1] == '\n'));\n        pcVar4 = str + sVar3;\n      }" { (do_statement "do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((str[iVar1] == '\r') || (str[iVar1] == '\n'));" do (compound_statement "{\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        }" { (expression_statement "sVar3 = sVar2 - 1;" (assignment_expression "sVar3 = sVar2 - 1" identifier = (binary_expression "sVar2 - 1" identifier - number_literal)) ;) (if_statement "if (sVar3 == 0) goto LAB_0001d464;" if (parenthesized_expression "(sVar3 == 0)" ( (binary_expression "sVar3 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0001d464;" goto statement_identifier ;)) (expression_statement "iVar1 = sVar2 - 2;" (assignment_expression "iVar1 = sVar2 - 2" identifier = (binary_expression "sVar2 - 2" identifier - number_literal)) ;) (expression_statement "sVar2 = sVar3;" (assignment_expression "sVar2 = sVar3" identifier = identifier) ;) }) while (parenthesized_expression "((str[iVar1] == '\r') || (str[iVar1] == '\n'))" ( (binary_expression "(str[iVar1] == '\r') || (str[iVar1] == '\n')" (parenthesized_expression "(str[iVar1] == '\r')" ( (binary_expression "str[iVar1] == '\r'" (subscript_expression "str[iVar1]" identifier [ identifier ]) == (char_literal "'\r'" ' escape_sequence ')) )) || (parenthesized_expression "(str[iVar1] == '\n')" ( (binary_expression "str[iVar1] == '\n'" (subscript_expression "str[iVar1]" identifier [ identifier ]) == (char_literal "'\n'" ' escape_sequence ')) ))) )) ;) (expression_statement "pcVar4 = str + sVar3;" (assignment_expression "pcVar4 = str + sVar3" identifier = (binary_expression "str + sVar3" identifier + identifier)) ;) }) (else_clause "else {\n        pcVar4 = str + sVar2;\n      }" else (compound_statement "{\n        pcVar4 = str + sVar2;\n      }" { (expression_statement "pcVar4 = str + sVar2;" (assignment_expression "pcVar4 = str + sVar2" identifier = (binary_expression "str + sVar2" identifier + identifier)) ;) }))) })) (labeled_statement "LAB_0001d464:\n    *pcVar4 = '\0';" statement_identifier : (expression_statement "*pcVar4 = '\0';" (assignment_expression "*pcVar4 = '\0'" (pointer_expression "*pcVar4" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;)) })) (return_statement "return str;" return identifier ;) })))
(translation_unit "char * FUN_0001d410(char *param_1)\n\n{\n  int iVar1;\n  size_t sVar2;\n  size_t sVar3;\n  char *pcVar4;\n  \n  if (param_1 != (char *)0x0) {\n    sVar2 = strlen(param_1);\n    pcVar4 = param_1;\n    if (sVar2 != 0) {\n      if ((param_1[sVar2 - 1] == '\r') || (param_1[sVar2 - 1] == '\n')) {\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((param_1[iVar1] == '\r') || (param_1[iVar1] == '\n'));\n        pcVar4 = param_1 + sVar3;\n      }\n      else {\n        pcVar4 = param_1 + sVar2;\n      }\n    }\nLAB_0001d464:\n    *pcVar4 = '\0';\n  }\n  return param_1;\n}\n\n" (function_definition "char * FUN_0001d410(char *param_1)\n\n{\n  int iVar1;\n  size_t sVar2;\n  size_t sVar3;\n  char *pcVar4;\n  \n  if (param_1 != (char *)0x0) {\n    sVar2 = strlen(param_1);\n    pcVar4 = param_1;\n    if (sVar2 != 0) {\n      if ((param_1[sVar2 - 1] == '\r') || (param_1[sVar2 - 1] == '\n')) {\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((param_1[iVar1] == '\r') || (param_1[iVar1] == '\n'));\n        pcVar4 = param_1 + sVar3;\n      }\n      else {\n        pcVar4 = param_1 + sVar2;\n      }\n    }\nLAB_0001d464:\n    *pcVar4 = '\0';\n  }\n  return param_1;\n}" primitive_type (pointer_declarator "* FUN_0001d410(char *param_1)" * (function_declarator "FUN_0001d410(char *param_1)" identifier (parameter_list "(char *param_1)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) )))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  size_t sVar3;\n  char *pcVar4;\n  \n  if (param_1 != (char *)0x0) {\n    sVar2 = strlen(param_1);\n    pcVar4 = param_1;\n    if (sVar2 != 0) {\n      if ((param_1[sVar2 - 1] == '\r') || (param_1[sVar2 - 1] == '\n')) {\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((param_1[iVar1] == '\r') || (param_1[iVar1] == '\n'));\n        pcVar4 = param_1 + sVar3;\n      }\n      else {\n        pcVar4 = param_1 + sVar2;\n      }\n    }\nLAB_0001d464:\n    *pcVar4 = '\0';\n  }\n  return param_1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (if_statement "if (param_1 != (char *)0x0) {\n    sVar2 = strlen(param_1);\n    pcVar4 = param_1;\n    if (sVar2 != 0) {\n      if ((param_1[sVar2 - 1] == '\r') || (param_1[sVar2 - 1] == '\n')) {\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((param_1[iVar1] == '\r') || (param_1[iVar1] == '\n'));\n        pcVar4 = param_1 + sVar3;\n      }\n      else {\n        pcVar4 = param_1 + sVar2;\n      }\n    }\nLAB_0001d464:\n    *pcVar4 = '\0';\n  }" if (parenthesized_expression "(param_1 != (char *)0x0)" ( (binary_expression "param_1 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    sVar2 = strlen(param_1);\n    pcVar4 = param_1;\n    if (sVar2 != 0) {\n      if ((param_1[sVar2 - 1] == '\r') || (param_1[sVar2 - 1] == '\n')) {\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((param_1[iVar1] == '\r') || (param_1[iVar1] == '\n'));\n        pcVar4 = param_1 + sVar3;\n      }\n      else {\n        pcVar4 = param_1 + sVar2;\n      }\n    }\nLAB_0001d464:\n    *pcVar4 = '\0';\n  }" { (expression_statement "sVar2 = strlen(param_1);" (assignment_expression "sVar2 = strlen(param_1)" identifier = (call_expression "strlen(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "pcVar4 = param_1;" (assignment_expression "pcVar4 = param_1" identifier = identifier) ;) (if_statement "if (sVar2 != 0) {\n      if ((param_1[sVar2 - 1] == '\r') || (param_1[sVar2 - 1] == '\n')) {\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((param_1[iVar1] == '\r') || (param_1[iVar1] == '\n'));\n        pcVar4 = param_1 + sVar3;\n      }\n      else {\n        pcVar4 = param_1 + sVar2;\n      }\n    }" if (parenthesized_expression "(sVar2 != 0)" ( (binary_expression "sVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      if ((param_1[sVar2 - 1] == '\r') || (param_1[sVar2 - 1] == '\n')) {\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((param_1[iVar1] == '\r') || (param_1[iVar1] == '\n'));\n        pcVar4 = param_1 + sVar3;\n      }\n      else {\n        pcVar4 = param_1 + sVar2;\n      }\n    }" { (if_statement "if ((param_1[sVar2 - 1] == '\r') || (param_1[sVar2 - 1] == '\n')) {\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((param_1[iVar1] == '\r') || (param_1[iVar1] == '\n'));\n        pcVar4 = param_1 + sVar3;\n      }\n      else {\n        pcVar4 = param_1 + sVar2;\n      }" if (parenthesized_expression "((param_1[sVar2 - 1] == '\r') || (param_1[sVar2 - 1] == '\n'))" ( (binary_expression "(param_1[sVar2 - 1] == '\r') || (param_1[sVar2 - 1] == '\n')" (parenthesized_expression "(param_1[sVar2 - 1] == '\r')" ( (binary_expression "param_1[sVar2 - 1] == '\r'" (subscript_expression "param_1[sVar2 - 1]" identifier [ (binary_expression "sVar2 - 1" identifier - number_literal) ]) == (char_literal "'\r'" ' escape_sequence ')) )) || (parenthesized_expression "(param_1[sVar2 - 1] == '\n')" ( (binary_expression "param_1[sVar2 - 1] == '\n'" (subscript_expression "param_1[sVar2 - 1]" identifier [ (binary_expression "sVar2 - 1" identifier - number_literal) ]) == (char_literal "'\n'" ' escape_sequence ')) ))) )) (compound_statement "{\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((param_1[iVar1] == '\r') || (param_1[iVar1] == '\n'));\n        pcVar4 = param_1 + sVar3;\n      }" { (do_statement "do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((param_1[iVar1] == '\r') || (param_1[iVar1] == '\n'));" do (compound_statement "{\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        }" { (expression_statement "sVar3 = sVar2 - 1;" (assignment_expression "sVar3 = sVar2 - 1" identifier = (binary_expression "sVar2 - 1" identifier - number_literal)) ;) (if_statement "if (sVar3 == 0) goto LAB_0001d464;" if (parenthesized_expression "(sVar3 == 0)" ( (binary_expression "sVar3 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0001d464;" goto statement_identifier ;)) (expression_statement "iVar1 = sVar2 - 2;" (assignment_expression "iVar1 = sVar2 - 2" identifier = (binary_expression "sVar2 - 2" identifier - number_literal)) ;) (expression_statement "sVar2 = sVar3;" (assignment_expression "sVar2 = sVar3" identifier = identifier) ;) }) while (parenthesized_expression "((param_1[iVar1] == '\r') || (param_1[iVar1] == '\n'))" ( (binary_expression "(param_1[iVar1] == '\r') || (param_1[iVar1] == '\n')" (parenthesized_expression "(param_1[iVar1] == '\r')" ( (binary_expression "param_1[iVar1] == '\r'" (subscript_expression "param_1[iVar1]" identifier [ identifier ]) == (char_literal "'\r'" ' escape_sequence ')) )) || (parenthesized_expression "(param_1[iVar1] == '\n')" ( (binary_expression "param_1[iVar1] == '\n'" (subscript_expression "param_1[iVar1]" identifier [ identifier ]) == (char_literal "'\n'" ' escape_sequence ')) ))) )) ;) (expression_statement "pcVar4 = param_1 + sVar3;" (assignment_expression "pcVar4 = param_1 + sVar3" identifier = (binary_expression "param_1 + sVar3" identifier + identifier)) ;) }) (else_clause "else {\n        pcVar4 = param_1 + sVar2;\n      }" else (compound_statement "{\n        pcVar4 = param_1 + sVar2;\n      }" { (expression_statement "pcVar4 = param_1 + sVar2;" (assignment_expression "pcVar4 = param_1 + sVar2" identifier = (binary_expression "param_1 + sVar2" identifier + identifier)) ;) }))) })) (labeled_statement "LAB_0001d464:\n    *pcVar4 = '\0';" statement_identifier : (expression_statement "*pcVar4 = '\0';" (assignment_expression "*pcVar4 = '\0'" (pointer_expression "*pcVar4" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;)) })) (return_statement "return param_1;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * 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 = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ (binary_expression IDENT - LIT) ]) == (char_literal ' escape_sequence ')) )) || (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ (binary_expression IDENT - LIT) ]) == (char_literal ' escape_sequence ')) ))) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ IDENT ]) == (char_literal ' escape_sequence ')) )) || (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ IDENT ]) == (char_literal ' escape_sequence ')) ))) )) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) }))) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * IDENT) = (char_literal ' escape_sequence ')) ;)) })) (return_statement return IDENT ;) })))
(function_definition "char * FUN_0001d410(char *param_1)\n\n{\n  int iVar1;\n  size_t sVar2;\n  size_t sVar3;\n  char *pcVar4;\n  \n  if (param_1 != (char *)0x0) {\n    sVar2 = strlen(param_1);\n    pcVar4 = param_1;\n    if (sVar2 != 0) {\n      if ((param_1[sVar2 - 1] == '\r') || (param_1[sVar2 - 1] == '\n')) {\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((param_1[iVar1] == '\r') || (param_1[iVar1] == '\n'));\n        pcVar4 = param_1 + sVar3;\n      }\n      else {\n        pcVar4 = param_1 + sVar2;\n      }\n    }\nLAB_0001d464:\n    *pcVar4 = '\0';\n  }\n  return param_1;\n}" (primitive_type "char") (pointer_declarator "* FUN_0001d410(char *param_1)" (* "*") (function_declarator "FUN_0001d410(char *param_1)" (identifier "FUN_0001d410") (parameter_list "(char *param_1)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")")))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  size_t sVar3;\n  char *pcVar4;\n  \n  if (param_1 != (char *)0x0) {\n    sVar2 = strlen(param_1);\n    pcVar4 = param_1;\n    if (sVar2 != 0) {\n      if ((param_1[sVar2 - 1] == '\r') || (param_1[sVar2 - 1] == '\n')) {\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((param_1[iVar1] == '\r') || (param_1[iVar1] == '\n'));\n        pcVar4 = param_1 + sVar3;\n      }\n      else {\n        pcVar4 = param_1 + sVar2;\n      }\n    }\nLAB_0001d464:\n    *pcVar4 = '\0';\n  }\n  return param_1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "size_t sVar2;" (primitive_type "size_t") (identifier "sVar2") (; ";")) (declaration "size_t sVar3;" (primitive_type "size_t") (identifier "sVar3") (; ";")) (declaration "char *pcVar4;" (primitive_type "char") (pointer_declarator "*pcVar4" (* "*") (identifier "pcVar4")) (; ";")) (if_statement "if (param_1 != (char *)0x0) {\n    sVar2 = strlen(param_1);\n    pcVar4 = param_1;\n    if (sVar2 != 0) {\n      if ((param_1[sVar2 - 1] == '\r') || (param_1[sVar2 - 1] == '\n')) {\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((param_1[iVar1] == '\r') || (param_1[iVar1] == '\n'));\n        pcVar4 = param_1 + sVar3;\n      }\n      else {\n        pcVar4 = param_1 + sVar2;\n      }\n    }\nLAB_0001d464:\n    *pcVar4 = '\0';\n  }" (if "if") (parenthesized_expression "(param_1 != (char *)0x0)" (( "(") (binary_expression "param_1 != (char *)0x0" (identifier "param_1") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    sVar2 = strlen(param_1);\n    pcVar4 = param_1;\n    if (sVar2 != 0) {\n      if ((param_1[sVar2 - 1] == '\r') || (param_1[sVar2 - 1] == '\n')) {\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((param_1[iVar1] == '\r') || (param_1[iVar1] == '\n'));\n        pcVar4 = param_1 + sVar3;\n      }\n      else {\n        pcVar4 = param_1 + sVar2;\n      }\n    }\nLAB_0001d464:\n    *pcVar4 = '\0';\n  }" ({ "{") (expression_statement "sVar2 = strlen(param_1);" (assignment_expression "sVar2 = strlen(param_1)" (identifier "sVar2") (= "=") (call_expression "strlen(param_1)" (identifier "strlen") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (expression_statement "pcVar4 = param_1;" (assignment_expression "pcVar4 = param_1" (identifier "pcVar4") (= "=") (identifier "param_1")) (; ";")) (if_statement "if (sVar2 != 0) {\n      if ((param_1[sVar2 - 1] == '\r') || (param_1[sVar2 - 1] == '\n')) {\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((param_1[iVar1] == '\r') || (param_1[iVar1] == '\n'));\n        pcVar4 = param_1 + sVar3;\n      }\n      else {\n        pcVar4 = param_1 + sVar2;\n      }\n    }" (if "if") (parenthesized_expression "(sVar2 != 0)" (( "(") (binary_expression "sVar2 != 0" (identifier "sVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      if ((param_1[sVar2 - 1] == '\r') || (param_1[sVar2 - 1] == '\n')) {\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((param_1[iVar1] == '\r') || (param_1[iVar1] == '\n'));\n        pcVar4 = param_1 + sVar3;\n      }\n      else {\n        pcVar4 = param_1 + sVar2;\n      }\n    }" ({ "{") (if_statement "if ((param_1[sVar2 - 1] == '\r') || (param_1[sVar2 - 1] == '\n')) {\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((param_1[iVar1] == '\r') || (param_1[iVar1] == '\n'));\n        pcVar4 = param_1 + sVar3;\n      }\n      else {\n        pcVar4 = param_1 + sVar2;\n      }" (if "if") (parenthesized_expression "((param_1[sVar2 - 1] == '\r') || (param_1[sVar2 - 1] == '\n'))" (( "(") (binary_expression "(param_1[sVar2 - 1] == '\r') || (param_1[sVar2 - 1] == '\n')" (parenthesized_expression "(param_1[sVar2 - 1] == '\r')" (( "(") (binary_expression "param_1[sVar2 - 1] == '\r'" (subscript_expression "param_1[sVar2 - 1]" (identifier "param_1") ([ "[") (binary_expression "sVar2 - 1" (identifier "sVar2") (- "-") (number_literal "1")) (] "]")) (== "==") (char_literal "'\r'" (' "'") (escape_sequence "\r") (' "'"))) () ")")) (|| "||") (parenthesized_expression "(param_1[sVar2 - 1] == '\n')" (( "(") (binary_expression "param_1[sVar2 - 1] == '\n'" (subscript_expression "param_1[sVar2 - 1]" (identifier "param_1") ([ "[") (binary_expression "sVar2 - 1" (identifier "sVar2") (- "-") (number_literal "1")) (] "]")) (== "==") (char_literal "'\n'" (' "'") (escape_sequence "\n") (' "'"))) () ")"))) () ")")) (compound_statement "{\n        do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((param_1[iVar1] == '\r') || (param_1[iVar1] == '\n'));\n        pcVar4 = param_1 + sVar3;\n      }" ({ "{") (do_statement "do {\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        } while ((param_1[iVar1] == '\r') || (param_1[iVar1] == '\n'));" (do "do") (compound_statement "{\n          sVar3 = sVar2 - 1;\n          if (sVar3 == 0) goto LAB_0001d464;\n          iVar1 = sVar2 - 2;\n          sVar2 = sVar3;\n        }" ({ "{") (expression_statement "sVar3 = sVar2 - 1;" (assignment_expression "sVar3 = sVar2 - 1" (identifier "sVar3") (= "=") (binary_expression "sVar2 - 1" (identifier "sVar2") (- "-") (number_literal "1"))) (; ";")) (if_statement "if (sVar3 == 0) goto LAB_0001d464;" (if "if") (parenthesized_expression "(sVar3 == 0)" (( "(") (binary_expression "sVar3 == 0" (identifier "sVar3") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_0001d464;" (goto "goto") (statement_identifier "LAB_0001d464") (; ";"))) (expression_statement "iVar1 = sVar2 - 2;" (assignment_expression "iVar1 = sVar2 - 2" (identifier "iVar1") (= "=") (binary_expression "sVar2 - 2" (identifier "sVar2") (- "-") (number_literal "2"))) (; ";")) (expression_statement "sVar2 = sVar3;" (assignment_expression "sVar2 = sVar3" (identifier "sVar2") (= "=") (identifier "sVar3")) (; ";")) (} "}")) (while "while") (parenthesized_expression "((param_1[iVar1] == '\r') || (param_1[iVar1] == '\n'))" (( "(") (binary_expression "(param_1[iVar1] == '\r') || (param_1[iVar1] == '\n')" (parenthesized_expression "(param_1[iVar1] == '\r')" (( "(") (binary_expression "param_1[iVar1] == '\r'" (subscript_expression "param_1[iVar1]" (identifier "param_1") ([ "[") (identifier "iVar1") (] "]")) (== "==") (char_literal "'\r'" (' "'") (escape_sequence "\r") (' "'"))) () ")")) (|| "||") (parenthesized_expression "(param_1[iVar1] == '\n')" (( "(") (binary_expression "param_1[iVar1] == '\n'" (subscript_expression "param_1[iVar1]" (identifier "param_1") ([ "[") (identifier "iVar1") (] "]")) (== "==") (char_literal "'\n'" (' "'") (escape_sequence "\n") (' "'"))) () ")"))) () ")")) (; ";")) (expression_statement "pcVar4 = param_1 + sVar3;" (assignment_expression "pcVar4 = param_1 + sVar3" (identifier "pcVar4") (= "=") (binary_expression "param_1 + sVar3" (identifier "param_1") (+ "+") (identifier "sVar3"))) (; ";")) (} "}")) (else_clause "else {\n        pcVar4 = param_1 + sVar2;\n      }" (else "else") (compound_statement "{\n        pcVar4 = param_1 + sVar2;\n      }" ({ "{") (expression_statement "pcVar4 = param_1 + sVar2;" (assignment_expression "pcVar4 = param_1 + sVar2" (identifier "pcVar4") (= "=") (binary_expression "param_1 + sVar2" (identifier "param_1") (+ "+") (identifier "sVar2"))) (; ";")) (} "}")))) (} "}"))) (labeled_statement "LAB_0001d464:\n    *pcVar4 = '\0';" (statement_identifier "LAB_0001d464") (: ":") (expression_statement "*pcVar4 = '\0';" (assignment_expression "*pcVar4 = '\0'" (pointer_expression "*pcVar4" (* "*") (identifier "pcVar4")) (= "=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";"))) (} "}"))) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

char * function_1(char *var_1)

{
  int iVar1;
  size_t var_3;
  size_t var_4;
  char *pcVar4;
  
  if (var_1 != (char *)0x0) {
    var_3 = var_2(var_1);
    pcVar4 = var_1;
    if (var_3 != 0) {
      if ((var_1[var_3 - 1] == '\r') || (var_1[var_3 - 1] == '\n')) {
        do {
          var_4 = var_3 - 1;
          if (var_4 == 0) goto LAB_0001d464;
          iVar1 = var_3 - 2;
          var_3 = var_4;
        } while ((var_1[iVar1] == '\r') || (var_1[iVar1] == '\n'));
        pcVar4 = var_1 + var_4;
      }
      else {
        pcVar4 = var_1 + var_3;
      }
    }
LAB_0001d464:
    *pcVar4 = '\0';
  }
  return var_1;
}


(translation_unit (function_definition type: (primitive_type) declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier)))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (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: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (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: (subscript_expression argument: (identifier) index: (binary_expression left: (identifier) right: (number_literal))) right: (char_literal (escape_sequence)))) right: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (binary_expression left: (identifier) right: (number_literal))) right: (char_literal (escape_sequence)))))) consequence: (compound_statement (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: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (identifier)) right: (char_literal (escape_sequence)))) right: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (identifier)) right: (char_literal (escape_sequence))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier))))))))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (char_literal (escape_sequence))))))) (return_statement (identifier)))))

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

char * MASKED(char *param_1)

{
  int iVar1;
  size_t sVar2;
  size_t sVar3;
  char *pcVar4;
  
  if (param_1 != (char *)0x0) {
    sVar2 = strlen(param_1);
    pcVar4 = param_1;
    if (sVar2 != 0) {
      if ((param_1[sVar2 - 1] == '\r') || (param_1[sVar2 - 1] == '\n')) {
        do {
          sVar3 = sVar2 - 1;
          if (sVar3 == 0) goto LAB_0001d464;
          iVar1 = sVar2 - 2;
          sVar2 = sVar3;
        } while ((param_1[iVar1] == '\r') || (param_1[iVar1] == '\n'));
        pcVar4 = param_1 + sVar3;
      }
      else {
        pcVar4 = param_1 + sVar2;
      }
    }
LAB_0001d464:
    *pcVar4 = '\0';
  }
  return param_1;
}

