
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

void __regparm3 c_write(Ssh_conflict ssh,char *buf,int len)

{
  char *pcVar1;
  undefined *puVar2;
  
  puVar2 = PTR_stderr_000ccfa4;
  if (((byte)flags & 2) == 0) {
    from_backend(ssh->fn,1,buf,len);
    return;
  }
  pcVar1 = buf + len;
  if (0 < len) {
    do {
      if (*buf != '\r') {
        fputc((int)*buf,*(FILE **)puVar2);
      }
      buf = buf + 1;
    } while (buf != pcVar1);
  }
  return;
}



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

void __regparm3 FUN_000352a0(undefined4 *param_1,char *param_2,int param_3)

{
  char *pcVar1;
  undefined *puVar2;
  
  puVar2 = PTR_stderr_000ccfa4;
  if (((byte)DAT_000cd964 & 2) == 0) {
    FUN_000241e0(*param_1,1,param_2,param_3);
    return;
  }
  pcVar1 = param_2 + param_3;
  if (0 < param_3) {
    do {
      if (*param_2 != '\r') {
        fputc((int)*param_2,*(FILE **)puVar2);
      }
      param_2 = param_2 + 1;
    } while (param_2 != pcVar1);
  }
  return;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000149a0
ADD EBX,0x97ac7
SUB ESP,0xc
LEA ESI,[EBX + 0xbf4]
TEST byte ptr [ESI],0x2
JZ 0x000352f8
MOV ESI,EDX
LEA EDI,[EDX + ECX*0x1]
MOV EBP,dword ptr [EBX + 0x234]
TEST ECX,ECX
JLE 0x000352ed
LEA ESI,[ESI]
MOVSX EAX,byte ptr [ESI]
CMP AL,0xd
JZ 0x000352e6
SUB ESP,0x8
PUSH dword ptr [EBP]
PUSH EAX
CALL 0x000146a0
ADD ESP,0x10
ADD ESI,0x1
CMP ESI,EDI
JNZ 0x000352d0
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
PUSH ECX
PUSH EDX
PUSH 0x1
PUSH dword ptr [EAX]
CALL 0x000241e0
ADD ESP,0x10
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 FUN_000352a0(undefined4 *param_1,char *param_2,int param_3)\n\n{\n  char *pcVar1;\n  undefined *puVar2;\n  \n  puVar2 = PTR_stderr_000ccfa4;\n  if (((byte)DAT_000cd964 & 2) == 0) {\n    FUN_000241e0(*param_1,1,param_2,param_3);\n    return;\n  }\n  pcVar1 = param_2 + param_3;\n  if (0 < param_3) {\n    do {\n      if (*param_2 != '\r') {\n        fputc((int)*param_2,*(FILE **)puVar2);\n      }\n      param_2 = param_2 + 1;\n    } while (param_2 != pcVar1);\n  }\n  return;\n}\n\n" comment (function_definition "void __regparm3 FUN_000352a0(undefined4 *param_1,char *param_2,int param_3)\n\n{\n  char *pcVar1;\n  undefined *puVar2;\n  \n  puVar2 = PTR_stderr_000ccfa4;\n  if (((byte)DAT_000cd964 & 2) == 0) {\n    FUN_000241e0(*param_1,1,param_2,param_3);\n    return;\n  }\n  pcVar1 = param_2 + param_3;\n  if (0 < param_3) {\n    do {\n      if (*param_2 != '\r') {\n        fputc((int)*param_2,*(FILE **)puVar2);\n      }\n      param_2 = param_2 + 1;\n    } while (param_2 != pcVar1);\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_000352a0(undefined4 *param_1,char *param_2,int param_3)" identifier (parameter_list "(undefined4 *param_1,char *param_2,int param_3)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  char *pcVar1;\n  undefined *puVar2;\n  \n  puVar2 = PTR_stderr_000ccfa4;\n  if (((byte)DAT_000cd964 & 2) == 0) {\n    FUN_000241e0(*param_1,1,param_2,param_3);\n    return;\n  }\n  pcVar1 = param_2 + param_3;\n  if (0 < param_3) {\n    do {\n      if (*param_2 != '\r') {\n        fputc((int)*param_2,*(FILE **)puVar2);\n      }\n      param_2 = param_2 + 1;\n    } while (param_2 != pcVar1);\n  }\n  return;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (expression_statement "puVar2 = PTR_stderr_000ccfa4;" (assignment_expression "puVar2 = PTR_stderr_000ccfa4" identifier = identifier) ;) (if_statement "if (((byte)DAT_000cd964 & 2) == 0) {\n    FUN_000241e0(*param_1,1,param_2,param_3);\n    return;\n  }" if (parenthesized_expression "(((byte)DAT_000cd964 & 2) == 0)" ( (binary_expression "((byte)DAT_000cd964 & 2) == 0" (parenthesized_expression "((byte)DAT_000cd964 & 2)" ( (binary_expression "(byte)DAT_000cd964 & 2" (cast_expression "(byte)DAT_000cd964" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) )) == number_literal) )) (compound_statement "{\n    FUN_000241e0(*param_1,1,param_2,param_3);\n    return;\n  }" { (expression_statement "FUN_000241e0(*param_1,1,param_2,param_3);" (call_expression "FUN_000241e0(*param_1,1,param_2,param_3)" identifier (argument_list "(*param_1,1,param_2,param_3)" ( (pointer_expression "*param_1" * identifier) , number_literal , identifier , identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "pcVar1 = param_2 + param_3;" (assignment_expression "pcVar1 = param_2 + param_3" identifier = (binary_expression "param_2 + param_3" identifier + identifier)) ;) (if_statement "if (0 < param_3) {\n    do {\n      if (*param_2 != '\r') {\n        fputc((int)*param_2,*(FILE **)puVar2);\n      }\n      param_2 = param_2 + 1;\n    } while (param_2 != pcVar1);\n  }" if (parenthesized_expression "(0 < param_3)" ( (binary_expression "0 < param_3" number_literal < identifier) )) (compound_statement "{\n    do {\n      if (*param_2 != '\r') {\n        fputc((int)*param_2,*(FILE **)puVar2);\n      }\n      param_2 = param_2 + 1;\n    } while (param_2 != pcVar1);\n  }" { (do_statement "do {\n      if (*param_2 != '\r') {\n        fputc((int)*param_2,*(FILE **)puVar2);\n      }\n      param_2 = param_2 + 1;\n    } while (param_2 != pcVar1);" do (compound_statement "{\n      if (*param_2 != '\r') {\n        fputc((int)*param_2,*(FILE **)puVar2);\n      }\n      param_2 = param_2 + 1;\n    }" { (if_statement "if (*param_2 != '\r') {\n        fputc((int)*param_2,*(FILE **)puVar2);\n      }" if (parenthesized_expression "(*param_2 != '\r')" ( (binary_expression "*param_2 != '\r'" (pointer_expression "*param_2" * identifier) != (char_literal "'\r'" ' escape_sequence ')) )) (compound_statement "{\n        fputc((int)*param_2,*(FILE **)puVar2);\n      }" { (expression_statement "fputc((int)*param_2,*(FILE **)puVar2);" (call_expression "fputc((int)*param_2,*(FILE **)puVar2)" identifier (argument_list "((int)*param_2,*(FILE **)puVar2)" ( (cast_expression "(int)*param_2" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*param_2" * identifier)) , (pointer_expression "*(FILE **)puVar2" * (cast_expression "(FILE **)puVar2" ( (type_descriptor "FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) ))) ;) })) (expression_statement "param_2 = param_2 + 1;" (assignment_expression "param_2 = param_2 + 1" identifier = (binary_expression "param_2 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(param_2 != pcVar1)" ( (binary_expression "param_2 != pcVar1" identifier != identifier) )) ;) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nvoid __regparm3 c_write(Ssh_conflict ssh,char *buf,int len)\n\n{\n  char *pcVar1;\n  undefined *puVar2;\n  \n  puVar2 = PTR_stderr_000ccfa4;\n  if (((byte)flags & 2) == 0) {\n    from_backend(ssh->fn,1,buf,len);\n    return;\n  }\n  pcVar1 = buf + len;\n  if (0 < len) {\n    do {\n      if (*buf != '\r') {\n        fputc((int)*buf,*(FILE **)puVar2);\n      }\n      buf = buf + 1;\n    } while (buf != pcVar1);\n  }\n  return;\n}\n\n" comment comment (function_definition "void __regparm3 c_write(Ssh_conflict ssh,char *buf,int len)\n\n{\n  char *pcVar1;\n  undefined *puVar2;\n  \n  puVar2 = PTR_stderr_000ccfa4;\n  if (((byte)flags & 2) == 0) {\n    from_backend(ssh->fn,1,buf,len);\n    return;\n  }\n  pcVar1 = buf + len;\n  if (0 < len) {\n    do {\n      if (*buf != '\r') {\n        fputc((int)*buf,*(FILE **)puVar2);\n      }\n      buf = buf + 1;\n    } while (buf != pcVar1);\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "c_write(Ssh_conflict ssh,char *buf,int len)" identifier (parameter_list "(Ssh_conflict ssh,char *buf,int len)" ( (parameter_declaration "Ssh_conflict ssh" type_identifier identifier) , (parameter_declaration "char *buf" primitive_type (pointer_declarator "*buf" * identifier)) , (parameter_declaration "int len" primitive_type identifier) ))) (compound_statement "{\n  char *pcVar1;\n  undefined *puVar2;\n  \n  puVar2 = PTR_stderr_000ccfa4;\n  if (((byte)flags & 2) == 0) {\n    from_backend(ssh->fn,1,buf,len);\n    return;\n  }\n  pcVar1 = buf + len;\n  if (0 < len) {\n    do {\n      if (*buf != '\r') {\n        fputc((int)*buf,*(FILE **)puVar2);\n      }\n      buf = buf + 1;\n    } while (buf != pcVar1);\n  }\n  return;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (expression_statement "puVar2 = PTR_stderr_000ccfa4;" (assignment_expression "puVar2 = PTR_stderr_000ccfa4" identifier = identifier) ;) (if_statement "if (((byte)flags & 2) == 0) {\n    from_backend(ssh->fn,1,buf,len);\n    return;\n  }" if (parenthesized_expression "(((byte)flags & 2) == 0)" ( (binary_expression "((byte)flags & 2) == 0" (parenthesized_expression "((byte)flags & 2)" ( (binary_expression "(byte)flags & 2" (cast_expression "(byte)flags" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) )) == number_literal) )) (compound_statement "{\n    from_backend(ssh->fn,1,buf,len);\n    return;\n  }" { (expression_statement "from_backend(ssh->fn,1,buf,len);" (call_expression "from_backend(ssh->fn,1,buf,len)" identifier (argument_list "(ssh->fn,1,buf,len)" ( (field_expression "ssh->fn" identifier -> field_identifier) , number_literal , identifier , identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "pcVar1 = buf + len;" (assignment_expression "pcVar1 = buf + len" identifier = (binary_expression "buf + len" identifier + identifier)) ;) (if_statement "if (0 < len) {\n    do {\n      if (*buf != '\r') {\n        fputc((int)*buf,*(FILE **)puVar2);\n      }\n      buf = buf + 1;\n    } while (buf != pcVar1);\n  }" if (parenthesized_expression "(0 < len)" ( (binary_expression "0 < len" number_literal < identifier) )) (compound_statement "{\n    do {\n      if (*buf != '\r') {\n        fputc((int)*buf,*(FILE **)puVar2);\n      }\n      buf = buf + 1;\n    } while (buf != pcVar1);\n  }" { (do_statement "do {\n      if (*buf != '\r') {\n        fputc((int)*buf,*(FILE **)puVar2);\n      }\n      buf = buf + 1;\n    } while (buf != pcVar1);" do (compound_statement "{\n      if (*buf != '\r') {\n        fputc((int)*buf,*(FILE **)puVar2);\n      }\n      buf = buf + 1;\n    }" { (if_statement "if (*buf != '\r') {\n        fputc((int)*buf,*(FILE **)puVar2);\n      }" if (parenthesized_expression "(*buf != '\r')" ( (binary_expression "*buf != '\r'" (pointer_expression "*buf" * identifier) != (char_literal "'\r'" ' escape_sequence ')) )) (compound_statement "{\n        fputc((int)*buf,*(FILE **)puVar2);\n      }" { (expression_statement "fputc((int)*buf,*(FILE **)puVar2);" (call_expression "fputc((int)*buf,*(FILE **)puVar2)" identifier (argument_list "((int)*buf,*(FILE **)puVar2)" ( (cast_expression "(int)*buf" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*buf" * identifier)) , (pointer_expression "*(FILE **)puVar2" * (cast_expression "(FILE **)puVar2" ( (type_descriptor "FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) ))) ;) })) (expression_statement "buf = buf + 1;" (assignment_expression "buf = buf + 1" identifier = (binary_expression "buf + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(buf != pcVar1)" ( (binary_expression "buf != pcVar1" identifier != identifier) )) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void __regparm3 FUN_000352a0(undefined4 *param_1,char *param_2,int param_3)\n\n{\n  char *pcVar1;\n  undefined *puVar2;\n  \n  puVar2 = PTR_stderr_000ccfa4;\n  if (((byte)DAT_000cd964 & 2) == 0) {\n    FUN_000241e0(*param_1,1,param_2,param_3);\n    return;\n  }\n  pcVar1 = param_2 + param_3;\n  if (0 < param_3) {\n    do {\n      if (*param_2 != '\r') {\n        fputc((int)*param_2,*(FILE **)puVar2);\n      }\n      param_2 = param_2 + 1;\n    } while (param_2 != pcVar1);\n  }\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_000352a0(undefined4 *param_1,char *param_2,int param_3)\n\n{\n  char *pcVar1;\n  undefined *puVar2;\n  \n  puVar2 = PTR_stderr_000ccfa4;\n  if (((byte)DAT_000cd964 & 2) == 0) {\n    FUN_000241e0(*param_1,1,param_2,param_3);\n    return;\n  }\n  pcVar1 = param_2 + param_3;\n  if (0 < param_3) {\n    do {\n      if (*param_2 != '\r') {\n        fputc((int)*param_2,*(FILE **)puVar2);\n      }\n      param_2 = param_2 + 1;\n    } while (param_2 != pcVar1);\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_000352a0(undefined4 *param_1,char *param_2,int param_3)" identifier (parameter_list "(undefined4 *param_1,char *param_2,int param_3)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  char *pcVar1;\n  undefined *puVar2;\n  \n  puVar2 = PTR_stderr_000ccfa4;\n  if (((byte)DAT_000cd964 & 2) == 0) {\n    FUN_000241e0(*param_1,1,param_2,param_3);\n    return;\n  }\n  pcVar1 = param_2 + param_3;\n  if (0 < param_3) {\n    do {\n      if (*param_2 != '\r') {\n        fputc((int)*param_2,*(FILE **)puVar2);\n      }\n      param_2 = param_2 + 1;\n    } while (param_2 != pcVar1);\n  }\n  return;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (expression_statement "puVar2 = PTR_stderr_000ccfa4;" (assignment_expression "puVar2 = PTR_stderr_000ccfa4" identifier = identifier) ;) (if_statement "if (((byte)DAT_000cd964 & 2) == 0) {\n    FUN_000241e0(*param_1,1,param_2,param_3);\n    return;\n  }" if (parenthesized_expression "(((byte)DAT_000cd964 & 2) == 0)" ( (binary_expression "((byte)DAT_000cd964 & 2) == 0" (parenthesized_expression "((byte)DAT_000cd964 & 2)" ( (binary_expression "(byte)DAT_000cd964 & 2" (cast_expression "(byte)DAT_000cd964" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) )) == number_literal) )) (compound_statement "{\n    FUN_000241e0(*param_1,1,param_2,param_3);\n    return;\n  }" { (expression_statement "FUN_000241e0(*param_1,1,param_2,param_3);" (call_expression "FUN_000241e0(*param_1,1,param_2,param_3)" identifier (argument_list "(*param_1,1,param_2,param_3)" ( (pointer_expression "*param_1" * identifier) , number_literal , identifier , identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "pcVar1 = param_2 + param_3;" (assignment_expression "pcVar1 = param_2 + param_3" identifier = (binary_expression "param_2 + param_3" identifier + identifier)) ;) (if_statement "if (0 < param_3) {\n    do {\n      if (*param_2 != '\r') {\n        fputc((int)*param_2,*(FILE **)puVar2);\n      }\n      param_2 = param_2 + 1;\n    } while (param_2 != pcVar1);\n  }" if (parenthesized_expression "(0 < param_3)" ( (binary_expression "0 < param_3" number_literal < identifier) )) (compound_statement "{\n    do {\n      if (*param_2 != '\r') {\n        fputc((int)*param_2,*(FILE **)puVar2);\n      }\n      param_2 = param_2 + 1;\n    } while (param_2 != pcVar1);\n  }" { (do_statement "do {\n      if (*param_2 != '\r') {\n        fputc((int)*param_2,*(FILE **)puVar2);\n      }\n      param_2 = param_2 + 1;\n    } while (param_2 != pcVar1);" do (compound_statement "{\n      if (*param_2 != '\r') {\n        fputc((int)*param_2,*(FILE **)puVar2);\n      }\n      param_2 = param_2 + 1;\n    }" { (if_statement "if (*param_2 != '\r') {\n        fputc((int)*param_2,*(FILE **)puVar2);\n      }" if (parenthesized_expression "(*param_2 != '\r')" ( (binary_expression "*param_2 != '\r'" (pointer_expression "*param_2" * identifier) != (char_literal "'\r'" ' escape_sequence ')) )) (compound_statement "{\n        fputc((int)*param_2,*(FILE **)puVar2);\n      }" { (expression_statement "fputc((int)*param_2,*(FILE **)puVar2);" (call_expression "fputc((int)*param_2,*(FILE **)puVar2)" identifier (argument_list "((int)*param_2,*(FILE **)puVar2)" ( (cast_expression "(int)*param_2" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*param_2" * identifier)) , (pointer_expression "*(FILE **)puVar2" * (cast_expression "(FILE **)puVar2" ( (type_descriptor "FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) ))) ;) })) (expression_statement "param_2 = param_2 + 1;" (assignment_expression "param_2 = param_2 + 1" identifier = (binary_expression "param_2 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(param_2 != pcVar1)" ( (binary_expression "param_2 != pcVar1" identifier != identifier) )) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) & LIT) )) == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , LIT , IDENT , IDENT ))) ;) (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * IDENT)) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) IDENT)) ))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) })) (return_statement return ;) })))
(function_definition "void __regparm3 FUN_000352a0(undefined4 *param_1,char *param_2,int param_3)\n\n{\n  char *pcVar1;\n  undefined *puVar2;\n  \n  puVar2 = PTR_stderr_000ccfa4;\n  if (((byte)DAT_000cd964 & 2) == 0) {\n    FUN_000241e0(*param_1,1,param_2,param_3);\n    return;\n  }\n  pcVar1 = param_2 + param_3;\n  if (0 < param_3) {\n    do {\n      if (*param_2 != '\r') {\n        fputc((int)*param_2,*(FILE **)puVar2);\n      }\n      param_2 = param_2 + 1;\n    } while (param_2 != pcVar1);\n  }\n  return;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_000352a0(undefined4 *param_1,char *param_2,int param_3)" (identifier "FUN_000352a0") (parameter_list "(undefined4 *param_1,char *param_2,int param_3)" (( "(") (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"))) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  char *pcVar1;\n  undefined *puVar2;\n  \n  puVar2 = PTR_stderr_000ccfa4;\n  if (((byte)DAT_000cd964 & 2) == 0) {\n    FUN_000241e0(*param_1,1,param_2,param_3);\n    return;\n  }\n  pcVar1 = param_2 + param_3;\n  if (0 < param_3) {\n    do {\n      if (*param_2 != '\r') {\n        fputc((int)*param_2,*(FILE **)puVar2);\n      }\n      param_2 = param_2 + 1;\n    } while (param_2 != pcVar1);\n  }\n  return;\n}" ({ "{") (declaration "char *pcVar1;" (primitive_type "char") (pointer_declarator "*pcVar1" (* "*") (identifier "pcVar1")) (; ";")) (declaration "undefined *puVar2;" (type_identifier "undefined") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (expression_statement "puVar2 = PTR_stderr_000ccfa4;" (assignment_expression "puVar2 = PTR_stderr_000ccfa4" (identifier "puVar2") (= "=") (identifier "PTR_stderr_000ccfa4")) (; ";")) (if_statement "if (((byte)DAT_000cd964 & 2) == 0) {\n    FUN_000241e0(*param_1,1,param_2,param_3);\n    return;\n  }" (if "if") (parenthesized_expression "(((byte)DAT_000cd964 & 2) == 0)" (( "(") (binary_expression "((byte)DAT_000cd964 & 2) == 0" (parenthesized_expression "((byte)DAT_000cd964 & 2)" (( "(") (binary_expression "(byte)DAT_000cd964 & 2" (cast_expression "(byte)DAT_000cd964" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "DAT_000cd964")) (& "&") (number_literal "2")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    FUN_000241e0(*param_1,1,param_2,param_3);\n    return;\n  }" ({ "{") (expression_statement "FUN_000241e0(*param_1,1,param_2,param_3);" (call_expression "FUN_000241e0(*param_1,1,param_2,param_3)" (identifier "FUN_000241e0") (argument_list "(*param_1,1,param_2,param_3)" (( "(") (pointer_expression "*param_1" (* "*") (identifier "param_1")) (, ",") (number_literal "1") (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "pcVar1 = param_2 + param_3;" (assignment_expression "pcVar1 = param_2 + param_3" (identifier "pcVar1") (= "=") (binary_expression "param_2 + param_3" (identifier "param_2") (+ "+") (identifier "param_3"))) (; ";")) (if_statement "if (0 < param_3) {\n    do {\n      if (*param_2 != '\r') {\n        fputc((int)*param_2,*(FILE **)puVar2);\n      }\n      param_2 = param_2 + 1;\n    } while (param_2 != pcVar1);\n  }" (if "if") (parenthesized_expression "(0 < param_3)" (( "(") (binary_expression "0 < param_3" (number_literal "0") (< "<") (identifier "param_3")) () ")")) (compound_statement "{\n    do {\n      if (*param_2 != '\r') {\n        fputc((int)*param_2,*(FILE **)puVar2);\n      }\n      param_2 = param_2 + 1;\n    } while (param_2 != pcVar1);\n  }" ({ "{") (do_statement "do {\n      if (*param_2 != '\r') {\n        fputc((int)*param_2,*(FILE **)puVar2);\n      }\n      param_2 = param_2 + 1;\n    } while (param_2 != pcVar1);" (do "do") (compound_statement "{\n      if (*param_2 != '\r') {\n        fputc((int)*param_2,*(FILE **)puVar2);\n      }\n      param_2 = param_2 + 1;\n    }" ({ "{") (if_statement "if (*param_2 != '\r') {\n        fputc((int)*param_2,*(FILE **)puVar2);\n      }" (if "if") (parenthesized_expression "(*param_2 != '\r')" (( "(") (binary_expression "*param_2 != '\r'" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (!= "!=") (char_literal "'\r'" (' "'") (escape_sequence "\r") (' "'"))) () ")")) (compound_statement "{\n        fputc((int)*param_2,*(FILE **)puVar2);\n      }" ({ "{") (expression_statement "fputc((int)*param_2,*(FILE **)puVar2);" (call_expression "fputc((int)*param_2,*(FILE **)puVar2)" (identifier "fputc") (argument_list "((int)*param_2,*(FILE **)puVar2)" (( "(") (cast_expression "(int)*param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (, ",") (pointer_expression "*(FILE **)puVar2" (* "*") (cast_expression "(FILE **)puVar2" (( "(") (type_descriptor "FILE **" (type_identifier "FILE") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "puVar2"))) () ")"))) (; ";")) (} "}"))) (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"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(param_2 != pcVar1)" (( "(") (binary_expression "param_2 != pcVar1" (identifier "param_2") (!= "!=") (identifier "pcVar1")) () ")")) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

void __regparm3 function_1(type_1 ssh,char *var_2,int var_3)

{
  char *var_5;
  type_2 *puVar2;
  
  puVar2 = PTR_stderr_000ccfa4;
  if (((type_3)flags & 2) == 0) {
    var_1(ssh->fn,1,var_2,var_3);
    return;
  }
  var_5 = var_2 + var_3;
  if (0 < var_3) {
    do {
      if (*var_2 != '\r') {
        var_4((int)*var_2,*(type_4 **)puVar2);
      }
      var_2 = var_2 + 1;
    } while (var_2 != var_5);
  }
  return;
}


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

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

void __regparm3 MASKED(undefined4 *param_1,char *param_2,int param_3)

{
  char *pcVar1;
  undefined *puVar2;
  
  puVar2 = PTR_stderr_000ccfa4;
  if (((byte)DAT_000cd964 & 2) == 0) {
    FUN_000241e0(*param_1,1,param_2,param_3);
    return;
  }
  pcVar1 = param_2 + param_3;
  if (0 < param_3) {
    do {
      if (*param_2 != '\r') {
        fputc((int)*param_2,*(FILE **)puVar2);
      }
      param_2 = param_2 + 1;
    } while (param_2 != pcVar1);
  }
  return;
}

