
size_t png_safecat(png_charp buffer,size_t bufsize,size_t pos,png_const_charp string)

{
  bool bVar1;
  size_t sVar2;
  size_t sVar3;
  uint uVar4;
  char cVar5;
  
  sVar2 = pos;
  if ((buffer != (png_charp)0x0) && (pos < bufsize)) {
    if (string != (png_const_charp)0x0) {
      cVar5 = *string;
      uVar4 = bufsize - 1;
      if ((cVar5 != '\0') && (pos < uVar4)) {
        sVar3 = pos + 1;
        do {
          buffer[sVar3 - 1] = cVar5;
          cVar5 = string[sVar3 - pos];
          sVar2 = sVar3;
          if (cVar5 == '\0') break;
          bVar1 = sVar3 != uVar4;
          sVar3 = sVar3 + 1;
          sVar2 = uVar4;
        } while (bVar1);
      }
    }
    buffer[sVar2] = '\0';
  }
  return sVar2;
}



void FUN_00019db4(int param_1,uint param_2,uint param_3,char *param_4)

{
  bool bVar1;
  uint uVar2;
  uint uVar3;
  char cVar4;
  
  if ((param_1 != 0) && (param_3 < param_2)) {
    uVar2 = param_3;
    if (param_4 != (char *)0x0) {
      cVar4 = *param_4;
      param_2 = param_2 - 1;
      if ((cVar4 != '\0') && (param_3 < param_2)) {
        uVar3 = param_3 + 1;
        do {
          *(char *)(param_1 + uVar3 + -1) = cVar4;
          cVar4 = param_4[uVar3 - param_3];
          uVar2 = uVar3;
          if (cVar4 == '\0') break;
          bVar1 = uVar3 != param_2;
          uVar3 = uVar3 + 1;
          uVar2 = param_2;
        } while (bVar1);
      }
    }
    *(undefined1 *)(param_1 + uVar2) = 0;
  }
  return;
}


beq a0,zero,0x00019e28
_or v0,a2,zero
sltu v1,a2,a1
beq v1,zero,0x00019e28
_nop
beq a3,zero,0x00019e20
_nop
lb t0,0x0(a3)
beq t0,zero,0x00019e20
_addiu a1,a1,-0x1
sltu v1,a2,a1
beq v1,zero,0x00019e20
_or v1,a2,zero
addiu v1,v1,0x1
addu a2,a0,v1
sb t0,-0x1(a2)
subu t0,v1,v0
addu t0,a3,t0
lb t0,0x0(t0)
beq t0,zero,0x00019e1c
_nop
bne v1,a1,0x00019dec
_addiu v1,v1,0x1
addiu v1,v1,-0x1
b 0x00019e20
_or v0,a1,zero
or v0,v1,zero
addu a0,a0,v0
sb zero,0x0(a0)
jr ra
_nop
(translation_unit "void FUN_00019db4(int param_1,uint param_2,uint param_3,char *param_4)\n\n{\n  bool bVar1;\n  uint uVar2;\n  uint uVar3;\n  char cVar4;\n  \n  if ((param_1 != 0) && (param_3 < param_2)) {\n    uVar2 = param_3;\n    if (param_4 != (char *)0x0) {\n      cVar4 = *param_4;\n      param_2 = param_2 - 1;\n      if ((cVar4 != '\0') && (param_3 < param_2)) {\n        uVar3 = param_3 + 1;\n        do {\n          *(char *)(param_1 + uVar3 + -1) = cVar4;\n          cVar4 = param_4[uVar3 - param_3];\n          uVar2 = uVar3;\n          if (cVar4 == '\0') break;\n          bVar1 = uVar3 != param_2;\n          uVar3 = uVar3 + 1;\n          uVar2 = param_2;\n        } while (bVar1);\n      }\n    }\n    *(undefined1 *)(param_1 + uVar2) = 0;\n  }\n  return;\n}\n\n" (function_definition "void FUN_00019db4(int param_1,uint param_2,uint param_3,char *param_4)\n\n{\n  bool bVar1;\n  uint uVar2;\n  uint uVar3;\n  char cVar4;\n  \n  if ((param_1 != 0) && (param_3 < param_2)) {\n    uVar2 = param_3;\n    if (param_4 != (char *)0x0) {\n      cVar4 = *param_4;\n      param_2 = param_2 - 1;\n      if ((cVar4 != '\0') && (param_3 < param_2)) {\n        uVar3 = param_3 + 1;\n        do {\n          *(char *)(param_1 + uVar3 + -1) = cVar4;\n          cVar4 = param_4[uVar3 - param_3];\n          uVar2 = uVar3;\n          if (cVar4 == '\0') break;\n          bVar1 = uVar3 != param_2;\n          uVar3 = uVar3 + 1;\n          uVar2 = param_2;\n        } while (bVar1);\n      }\n    }\n    *(undefined1 *)(param_1 + uVar2) = 0;\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00019db4(int param_1,uint param_2,uint param_3,char *param_4)" identifier (parameter_list "(int param_1,uint param_2,uint param_3,char *param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "char *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  bool bVar1;\n  uint uVar2;\n  uint uVar3;\n  char cVar4;\n  \n  if ((param_1 != 0) && (param_3 < param_2)) {\n    uVar2 = param_3;\n    if (param_4 != (char *)0x0) {\n      cVar4 = *param_4;\n      param_2 = param_2 - 1;\n      if ((cVar4 != '\0') && (param_3 < param_2)) {\n        uVar3 = param_3 + 1;\n        do {\n          *(char *)(param_1 + uVar3 + -1) = cVar4;\n          cVar4 = param_4[uVar3 - param_3];\n          uVar2 = uVar3;\n          if (cVar4 == '\0') break;\n          bVar1 = uVar3 != param_2;\n          uVar3 = uVar3 + 1;\n          uVar2 = param_2;\n        } while (bVar1);\n      }\n    }\n    *(undefined1 *)(param_1 + uVar2) = 0;\n  }\n  return;\n}" { (declaration "bool bVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "char cVar4;" primitive_type identifier ;) (if_statement "if ((param_1 != 0) && (param_3 < param_2)) {\n    uVar2 = param_3;\n    if (param_4 != (char *)0x0) {\n      cVar4 = *param_4;\n      param_2 = param_2 - 1;\n      if ((cVar4 != '\0') && (param_3 < param_2)) {\n        uVar3 = param_3 + 1;\n        do {\n          *(char *)(param_1 + uVar3 + -1) = cVar4;\n          cVar4 = param_4[uVar3 - param_3];\n          uVar2 = uVar3;\n          if (cVar4 == '\0') break;\n          bVar1 = uVar3 != param_2;\n          uVar3 = uVar3 + 1;\n          uVar2 = param_2;\n        } while (bVar1);\n      }\n    }\n    *(undefined1 *)(param_1 + uVar2) = 0;\n  }" if (parenthesized_expression "((param_1 != 0) && (param_3 < param_2))" ( (binary_expression "(param_1 != 0) && (param_3 < param_2)" (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) && (parenthesized_expression "(param_3 < param_2)" ( (binary_expression "param_3 < param_2" identifier < identifier) ))) )) (compound_statement "{\n    uVar2 = param_3;\n    if (param_4 != (char *)0x0) {\n      cVar4 = *param_4;\n      param_2 = param_2 - 1;\n      if ((cVar4 != '\0') && (param_3 < param_2)) {\n        uVar3 = param_3 + 1;\n        do {\n          *(char *)(param_1 + uVar3 + -1) = cVar4;\n          cVar4 = param_4[uVar3 - param_3];\n          uVar2 = uVar3;\n          if (cVar4 == '\0') break;\n          bVar1 = uVar3 != param_2;\n          uVar3 = uVar3 + 1;\n          uVar2 = param_2;\n        } while (bVar1);\n      }\n    }\n    *(undefined1 *)(param_1 + uVar2) = 0;\n  }" { (expression_statement "uVar2 = param_3;" (assignment_expression "uVar2 = param_3" identifier = identifier) ;) (if_statement "if (param_4 != (char *)0x0) {\n      cVar4 = *param_4;\n      param_2 = param_2 - 1;\n      if ((cVar4 != '\0') && (param_3 < param_2)) {\n        uVar3 = param_3 + 1;\n        do {\n          *(char *)(param_1 + uVar3 + -1) = cVar4;\n          cVar4 = param_4[uVar3 - param_3];\n          uVar2 = uVar3;\n          if (cVar4 == '\0') break;\n          bVar1 = uVar3 != param_2;\n          uVar3 = uVar3 + 1;\n          uVar2 = param_2;\n        } while (bVar1);\n      }\n    }" if (parenthesized_expression "(param_4 != (char *)0x0)" ( (binary_expression "param_4 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      cVar4 = *param_4;\n      param_2 = param_2 - 1;\n      if ((cVar4 != '\0') && (param_3 < param_2)) {\n        uVar3 = param_3 + 1;\n        do {\n          *(char *)(param_1 + uVar3 + -1) = cVar4;\n          cVar4 = param_4[uVar3 - param_3];\n          uVar2 = uVar3;\n          if (cVar4 == '\0') break;\n          bVar1 = uVar3 != param_2;\n          uVar3 = uVar3 + 1;\n          uVar2 = param_2;\n        } while (bVar1);\n      }\n    }" { (expression_statement "cVar4 = *param_4;" (assignment_expression "cVar4 = *param_4" identifier = (pointer_expression "*param_4" * identifier)) ;) (expression_statement "param_2 = param_2 - 1;" (assignment_expression "param_2 = param_2 - 1" identifier = (binary_expression "param_2 - 1" identifier - number_literal)) ;) (if_statement "if ((cVar4 != '\0') && (param_3 < param_2)) {\n        uVar3 = param_3 + 1;\n        do {\n          *(char *)(param_1 + uVar3 + -1) = cVar4;\n          cVar4 = param_4[uVar3 - param_3];\n          uVar2 = uVar3;\n          if (cVar4 == '\0') break;\n          bVar1 = uVar3 != param_2;\n          uVar3 = uVar3 + 1;\n          uVar2 = param_2;\n        } while (bVar1);\n      }" if (parenthesized_expression "((cVar4 != '\0') && (param_3 < param_2))" ( (binary_expression "(cVar4 != '\0') && (param_3 < param_2)" (parenthesized_expression "(cVar4 != '\0')" ( (binary_expression "cVar4 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "(param_3 < param_2)" ( (binary_expression "param_3 < param_2" identifier < identifier) ))) )) (compound_statement "{\n        uVar3 = param_3 + 1;\n        do {\n          *(char *)(param_1 + uVar3 + -1) = cVar4;\n          cVar4 = param_4[uVar3 - param_3];\n          uVar2 = uVar3;\n          if (cVar4 == '\0') break;\n          bVar1 = uVar3 != param_2;\n          uVar3 = uVar3 + 1;\n          uVar2 = param_2;\n        } while (bVar1);\n      }" { (expression_statement "uVar3 = param_3 + 1;" (assignment_expression "uVar3 = param_3 + 1" identifier = (binary_expression "param_3 + 1" identifier + number_literal)) ;) (do_statement "do {\n          *(char *)(param_1 + uVar3 + -1) = cVar4;\n          cVar4 = param_4[uVar3 - param_3];\n          uVar2 = uVar3;\n          if (cVar4 == '\0') break;\n          bVar1 = uVar3 != param_2;\n          uVar3 = uVar3 + 1;\n          uVar2 = param_2;\n        } while (bVar1);" do (compound_statement "{\n          *(char *)(param_1 + uVar3 + -1) = cVar4;\n          cVar4 = param_4[uVar3 - param_3];\n          uVar2 = uVar3;\n          if (cVar4 == '\0') break;\n          bVar1 = uVar3 != param_2;\n          uVar3 = uVar3 + 1;\n          uVar2 = param_2;\n        }" { (expression_statement "*(char *)(param_1 + uVar3 + -1) = cVar4;" (assignment_expression "*(char *)(param_1 + uVar3 + -1) = cVar4" (pointer_expression "*(char *)(param_1 + uVar3 + -1)" * (cast_expression "(char *)(param_1 + uVar3 + -1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + uVar3 + -1)" ( (binary_expression "param_1 + uVar3 + -1" (binary_expression "param_1 + uVar3" identifier + identifier) + number_literal) )))) = identifier) ;) (expression_statement "cVar4 = param_4[uVar3 - param_3];" (assignment_expression "cVar4 = param_4[uVar3 - param_3]" identifier = (subscript_expression "param_4[uVar3 - param_3]" identifier [ (binary_expression "uVar3 - param_3" identifier - identifier) ])) ;) (expression_statement "uVar2 = uVar3;" (assignment_expression "uVar2 = uVar3" identifier = identifier) ;) (if_statement "if (cVar4 == '\0') break;" if (parenthesized_expression "(cVar4 == '\0')" ( (binary_expression "cVar4 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (break_statement "break;" break ;)) (expression_statement "bVar1 = uVar3 != param_2;" (assignment_expression "bVar1 = uVar3 != param_2" identifier = (binary_expression "uVar3 != param_2" identifier != identifier)) ;) (expression_statement "uVar3 = uVar3 + 1;" (assignment_expression "uVar3 = uVar3 + 1" identifier = (binary_expression "uVar3 + 1" identifier + number_literal)) ;) (expression_statement "uVar2 = param_2;" (assignment_expression "uVar2 = param_2" identifier = identifier) ;) }) while (parenthesized_expression "(bVar1)" ( identifier )) ;) })) })) (expression_statement "*(undefined1 *)(param_1 + uVar2) = 0;" (assignment_expression "*(undefined1 *)(param_1 + uVar2) = 0" (pointer_expression "*(undefined1 *)(param_1 + uVar2)" * (cast_expression "(undefined1 *)(param_1 + uVar2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + uVar2)" ( (binary_expression "param_1 + uVar2" identifier + identifier) )))) = number_literal) ;) })) (return_statement "return;" return ;) })))
(translation_unit "size_t png_safecat(png_charp buffer,size_t bufsize,size_t pos,png_const_charp string)\n\n{\n  bool bVar1;\n  size_t sVar2;\n  size_t sVar3;\n  uint uVar4;\n  char cVar5;\n  \n  sVar2 = pos;\n  if ((buffer != (png_charp)0x0) && (pos < bufsize)) {\n    if (string != (png_const_charp)0x0) {\n      cVar5 = *string;\n      uVar4 = bufsize - 1;\n      if ((cVar5 != '\0') && (pos < uVar4)) {\n        sVar3 = pos + 1;\n        do {\n          buffer[sVar3 - 1] = cVar5;\n          cVar5 = string[sVar3 - pos];\n          sVar2 = sVar3;\n          if (cVar5 == '\0') break;\n          bVar1 = sVar3 != uVar4;\n          sVar3 = sVar3 + 1;\n          sVar2 = uVar4;\n        } while (bVar1);\n      }\n    }\n    buffer[sVar2] = '\0';\n  }\n  return sVar2;\n}\n\n" (function_definition "size_t png_safecat(png_charp buffer,size_t bufsize,size_t pos,png_const_charp string)\n\n{\n  bool bVar1;\n  size_t sVar2;\n  size_t sVar3;\n  uint uVar4;\n  char cVar5;\n  \n  sVar2 = pos;\n  if ((buffer != (png_charp)0x0) && (pos < bufsize)) {\n    if (string != (png_const_charp)0x0) {\n      cVar5 = *string;\n      uVar4 = bufsize - 1;\n      if ((cVar5 != '\0') && (pos < uVar4)) {\n        sVar3 = pos + 1;\n        do {\n          buffer[sVar3 - 1] = cVar5;\n          cVar5 = string[sVar3 - pos];\n          sVar2 = sVar3;\n          if (cVar5 == '\0') break;\n          bVar1 = sVar3 != uVar4;\n          sVar3 = sVar3 + 1;\n          sVar2 = uVar4;\n        } while (bVar1);\n      }\n    }\n    buffer[sVar2] = '\0';\n  }\n  return sVar2;\n}" primitive_type (function_declarator "png_safecat(png_charp buffer,size_t bufsize,size_t pos,png_const_charp string)" identifier (parameter_list "(png_charp buffer,size_t bufsize,size_t pos,png_const_charp string)" ( (parameter_declaration "png_charp buffer" type_identifier identifier) , (parameter_declaration "size_t bufsize" primitive_type identifier) , (parameter_declaration "size_t pos" primitive_type identifier) , (parameter_declaration "png_const_charp string" type_identifier identifier) ))) (compound_statement "{\n  bool bVar1;\n  size_t sVar2;\n  size_t sVar3;\n  uint uVar4;\n  char cVar5;\n  \n  sVar2 = pos;\n  if ((buffer != (png_charp)0x0) && (pos < bufsize)) {\n    if (string != (png_const_charp)0x0) {\n      cVar5 = *string;\n      uVar4 = bufsize - 1;\n      if ((cVar5 != '\0') && (pos < uVar4)) {\n        sVar3 = pos + 1;\n        do {\n          buffer[sVar3 - 1] = cVar5;\n          cVar5 = string[sVar3 - pos];\n          sVar2 = sVar3;\n          if (cVar5 == '\0') break;\n          bVar1 = sVar3 != uVar4;\n          sVar3 = sVar3 + 1;\n          sVar2 = uVar4;\n        } while (bVar1);\n      }\n    }\n    buffer[sVar2] = '\0';\n  }\n  return sVar2;\n}" { (declaration "bool bVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "char cVar5;" primitive_type identifier ;) (expression_statement "sVar2 = pos;" (assignment_expression "sVar2 = pos" identifier = identifier) ;) (if_statement "if ((buffer != (png_charp)0x0) && (pos < bufsize)) {\n    if (string != (png_const_charp)0x0) {\n      cVar5 = *string;\n      uVar4 = bufsize - 1;\n      if ((cVar5 != '\0') && (pos < uVar4)) {\n        sVar3 = pos + 1;\n        do {\n          buffer[sVar3 - 1] = cVar5;\n          cVar5 = string[sVar3 - pos];\n          sVar2 = sVar3;\n          if (cVar5 == '\0') break;\n          bVar1 = sVar3 != uVar4;\n          sVar3 = sVar3 + 1;\n          sVar2 = uVar4;\n        } while (bVar1);\n      }\n    }\n    buffer[sVar2] = '\0';\n  }" if (parenthesized_expression "((buffer != (png_charp)0x0) && (pos < bufsize))" ( (binary_expression "(buffer != (png_charp)0x0) && (pos < bufsize)" (parenthesized_expression "(buffer != (png_charp)0x0)" ( (binary_expression "buffer != (png_charp)0x0" identifier != (cast_expression "(png_charp)0x0" ( (type_descriptor "png_charp" type_identifier) ) number_literal)) )) && (parenthesized_expression "(pos < bufsize)" ( (binary_expression "pos < bufsize" identifier < identifier) ))) )) (compound_statement "{\n    if (string != (png_const_charp)0x0) {\n      cVar5 = *string;\n      uVar4 = bufsize - 1;\n      if ((cVar5 != '\0') && (pos < uVar4)) {\n        sVar3 = pos + 1;\n        do {\n          buffer[sVar3 - 1] = cVar5;\n          cVar5 = string[sVar3 - pos];\n          sVar2 = sVar3;\n          if (cVar5 == '\0') break;\n          bVar1 = sVar3 != uVar4;\n          sVar3 = sVar3 + 1;\n          sVar2 = uVar4;\n        } while (bVar1);\n      }\n    }\n    buffer[sVar2] = '\0';\n  }" { (if_statement "if (string != (png_const_charp)0x0) {\n      cVar5 = *string;\n      uVar4 = bufsize - 1;\n      if ((cVar5 != '\0') && (pos < uVar4)) {\n        sVar3 = pos + 1;\n        do {\n          buffer[sVar3 - 1] = cVar5;\n          cVar5 = string[sVar3 - pos];\n          sVar2 = sVar3;\n          if (cVar5 == '\0') break;\n          bVar1 = sVar3 != uVar4;\n          sVar3 = sVar3 + 1;\n          sVar2 = uVar4;\n        } while (bVar1);\n      }\n    }" if (parenthesized_expression "(string != (png_const_charp)0x0)" ( (binary_expression "string != (png_const_charp)0x0" identifier != (cast_expression "(png_const_charp)0x0" ( (type_descriptor "png_const_charp" type_identifier) ) number_literal)) )) (compound_statement "{\n      cVar5 = *string;\n      uVar4 = bufsize - 1;\n      if ((cVar5 != '\0') && (pos < uVar4)) {\n        sVar3 = pos + 1;\n        do {\n          buffer[sVar3 - 1] = cVar5;\n          cVar5 = string[sVar3 - pos];\n          sVar2 = sVar3;\n          if (cVar5 == '\0') break;\n          bVar1 = sVar3 != uVar4;\n          sVar3 = sVar3 + 1;\n          sVar2 = uVar4;\n        } while (bVar1);\n      }\n    }" { (expression_statement "cVar5 = *string;" (assignment_expression "cVar5 = *string" identifier = (pointer_expression "*string" * identifier)) ;) (expression_statement "uVar4 = bufsize - 1;" (assignment_expression "uVar4 = bufsize - 1" identifier = (binary_expression "bufsize - 1" identifier - number_literal)) ;) (if_statement "if ((cVar5 != '\0') && (pos < uVar4)) {\n        sVar3 = pos + 1;\n        do {\n          buffer[sVar3 - 1] = cVar5;\n          cVar5 = string[sVar3 - pos];\n          sVar2 = sVar3;\n          if (cVar5 == '\0') break;\n          bVar1 = sVar3 != uVar4;\n          sVar3 = sVar3 + 1;\n          sVar2 = uVar4;\n        } while (bVar1);\n      }" if (parenthesized_expression "((cVar5 != '\0') && (pos < uVar4))" ( (binary_expression "(cVar5 != '\0') && (pos < uVar4)" (parenthesized_expression "(cVar5 != '\0')" ( (binary_expression "cVar5 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "(pos < uVar4)" ( (binary_expression "pos < uVar4" identifier < identifier) ))) )) (compound_statement "{\n        sVar3 = pos + 1;\n        do {\n          buffer[sVar3 - 1] = cVar5;\n          cVar5 = string[sVar3 - pos];\n          sVar2 = sVar3;\n          if (cVar5 == '\0') break;\n          bVar1 = sVar3 != uVar4;\n          sVar3 = sVar3 + 1;\n          sVar2 = uVar4;\n        } while (bVar1);\n      }" { (expression_statement "sVar3 = pos + 1;" (assignment_expression "sVar3 = pos + 1" identifier = (binary_expression "pos + 1" identifier + number_literal)) ;) (do_statement "do {\n          buffer[sVar3 - 1] = cVar5;\n          cVar5 = string[sVar3 - pos];\n          sVar2 = sVar3;\n          if (cVar5 == '\0') break;\n          bVar1 = sVar3 != uVar4;\n          sVar3 = sVar3 + 1;\n          sVar2 = uVar4;\n        } while (bVar1);" do (compound_statement "{\n          buffer[sVar3 - 1] = cVar5;\n          cVar5 = string[sVar3 - pos];\n          sVar2 = sVar3;\n          if (cVar5 == '\0') break;\n          bVar1 = sVar3 != uVar4;\n          sVar3 = sVar3 + 1;\n          sVar2 = uVar4;\n        }" { (expression_statement "buffer[sVar3 - 1] = cVar5;" (assignment_expression "buffer[sVar3 - 1] = cVar5" (subscript_expression "buffer[sVar3 - 1]" identifier [ (binary_expression "sVar3 - 1" identifier - number_literal) ]) = identifier) ;) (expression_statement "cVar5 = string[sVar3 - pos];" (assignment_expression "cVar5 = string[sVar3 - pos]" identifier = (subscript_expression "string[sVar3 - pos]" identifier [ (binary_expression "sVar3 - pos" identifier - identifier) ])) ;) (expression_statement "sVar2 = sVar3;" (assignment_expression "sVar2 = sVar3" identifier = identifier) ;) (if_statement "if (cVar5 == '\0') break;" if (parenthesized_expression "(cVar5 == '\0')" ( (binary_expression "cVar5 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (break_statement "break;" break ;)) (expression_statement "bVar1 = sVar3 != uVar4;" (assignment_expression "bVar1 = sVar3 != uVar4" identifier = (binary_expression "sVar3 != uVar4" identifier != identifier)) ;) (expression_statement "sVar3 = sVar3 + 1;" (assignment_expression "sVar3 = sVar3 + 1" identifier = (binary_expression "sVar3 + 1" identifier + number_literal)) ;) (expression_statement "sVar2 = uVar4;" (assignment_expression "sVar2 = uVar4" identifier = identifier) ;) }) while (parenthesized_expression "(bVar1)" ( identifier )) ;) })) })) (expression_statement "buffer[sVar2] = '\0';" (assignment_expression "buffer[sVar2] = '\0'" (subscript_expression "buffer[sVar2]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) })) (return_statement "return sVar2;" return identifier ;) })))
(translation_unit "void FUN_00019db4(int param_1,uint param_2,uint param_3,char *param_4)\n\n{\n  bool bVar1;\n  uint uVar2;\n  uint uVar3;\n  char cVar4;\n  \n  if ((param_1 != 0) && (param_3 < param_2)) {\n    uVar2 = param_3;\n    if (param_4 != (char *)0x0) {\n      cVar4 = *param_4;\n      param_2 = param_2 - 1;\n      if ((cVar4 != '\0') && (param_3 < param_2)) {\n        uVar3 = param_3 + 1;\n        do {\n          *(char *)(param_1 + uVar3 + -1) = cVar4;\n          cVar4 = param_4[uVar3 - param_3];\n          uVar2 = uVar3;\n          if (cVar4 == '\0') break;\n          bVar1 = uVar3 != param_2;\n          uVar3 = uVar3 + 1;\n          uVar2 = param_2;\n        } while (bVar1);\n      }\n    }\n    *(undefined1 *)(param_1 + uVar2) = 0;\n  }\n  return;\n}\n\n" (function_definition "void FUN_00019db4(int param_1,uint param_2,uint param_3,char *param_4)\n\n{\n  bool bVar1;\n  uint uVar2;\n  uint uVar3;\n  char cVar4;\n  \n  if ((param_1 != 0) && (param_3 < param_2)) {\n    uVar2 = param_3;\n    if (param_4 != (char *)0x0) {\n      cVar4 = *param_4;\n      param_2 = param_2 - 1;\n      if ((cVar4 != '\0') && (param_3 < param_2)) {\n        uVar3 = param_3 + 1;\n        do {\n          *(char *)(param_1 + uVar3 + -1) = cVar4;\n          cVar4 = param_4[uVar3 - param_3];\n          uVar2 = uVar3;\n          if (cVar4 == '\0') break;\n          bVar1 = uVar3 != param_2;\n          uVar3 = uVar3 + 1;\n          uVar2 = param_2;\n        } while (bVar1);\n      }\n    }\n    *(undefined1 *)(param_1 + uVar2) = 0;\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00019db4(int param_1,uint param_2,uint param_3,char *param_4)" identifier (parameter_list "(int param_1,uint param_2,uint param_3,char *param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "char *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  bool bVar1;\n  uint uVar2;\n  uint uVar3;\n  char cVar4;\n  \n  if ((param_1 != 0) && (param_3 < param_2)) {\n    uVar2 = param_3;\n    if (param_4 != (char *)0x0) {\n      cVar4 = *param_4;\n      param_2 = param_2 - 1;\n      if ((cVar4 != '\0') && (param_3 < param_2)) {\n        uVar3 = param_3 + 1;\n        do {\n          *(char *)(param_1 + uVar3 + -1) = cVar4;\n          cVar4 = param_4[uVar3 - param_3];\n          uVar2 = uVar3;\n          if (cVar4 == '\0') break;\n          bVar1 = uVar3 != param_2;\n          uVar3 = uVar3 + 1;\n          uVar2 = param_2;\n        } while (bVar1);\n      }\n    }\n    *(undefined1 *)(param_1 + uVar2) = 0;\n  }\n  return;\n}" { (declaration "bool bVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "char cVar4;" primitive_type identifier ;) (if_statement "if ((param_1 != 0) && (param_3 < param_2)) {\n    uVar2 = param_3;\n    if (param_4 != (char *)0x0) {\n      cVar4 = *param_4;\n      param_2 = param_2 - 1;\n      if ((cVar4 != '\0') && (param_3 < param_2)) {\n        uVar3 = param_3 + 1;\n        do {\n          *(char *)(param_1 + uVar3 + -1) = cVar4;\n          cVar4 = param_4[uVar3 - param_3];\n          uVar2 = uVar3;\n          if (cVar4 == '\0') break;\n          bVar1 = uVar3 != param_2;\n          uVar3 = uVar3 + 1;\n          uVar2 = param_2;\n        } while (bVar1);\n      }\n    }\n    *(undefined1 *)(param_1 + uVar2) = 0;\n  }" if (parenthesized_expression "((param_1 != 0) && (param_3 < param_2))" ( (binary_expression "(param_1 != 0) && (param_3 < param_2)" (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) && (parenthesized_expression "(param_3 < param_2)" ( (binary_expression "param_3 < param_2" identifier < identifier) ))) )) (compound_statement "{\n    uVar2 = param_3;\n    if (param_4 != (char *)0x0) {\n      cVar4 = *param_4;\n      param_2 = param_2 - 1;\n      if ((cVar4 != '\0') && (param_3 < param_2)) {\n        uVar3 = param_3 + 1;\n        do {\n          *(char *)(param_1 + uVar3 + -1) = cVar4;\n          cVar4 = param_4[uVar3 - param_3];\n          uVar2 = uVar3;\n          if (cVar4 == '\0') break;\n          bVar1 = uVar3 != param_2;\n          uVar3 = uVar3 + 1;\n          uVar2 = param_2;\n        } while (bVar1);\n      }\n    }\n    *(undefined1 *)(param_1 + uVar2) = 0;\n  }" { (expression_statement "uVar2 = param_3;" (assignment_expression "uVar2 = param_3" identifier = identifier) ;) (if_statement "if (param_4 != (char *)0x0) {\n      cVar4 = *param_4;\n      param_2 = param_2 - 1;\n      if ((cVar4 != '\0') && (param_3 < param_2)) {\n        uVar3 = param_3 + 1;\n        do {\n          *(char *)(param_1 + uVar3 + -1) = cVar4;\n          cVar4 = param_4[uVar3 - param_3];\n          uVar2 = uVar3;\n          if (cVar4 == '\0') break;\n          bVar1 = uVar3 != param_2;\n          uVar3 = uVar3 + 1;\n          uVar2 = param_2;\n        } while (bVar1);\n      }\n    }" if (parenthesized_expression "(param_4 != (char *)0x0)" ( (binary_expression "param_4 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      cVar4 = *param_4;\n      param_2 = param_2 - 1;\n      if ((cVar4 != '\0') && (param_3 < param_2)) {\n        uVar3 = param_3 + 1;\n        do {\n          *(char *)(param_1 + uVar3 + -1) = cVar4;\n          cVar4 = param_4[uVar3 - param_3];\n          uVar2 = uVar3;\n          if (cVar4 == '\0') break;\n          bVar1 = uVar3 != param_2;\n          uVar3 = uVar3 + 1;\n          uVar2 = param_2;\n        } while (bVar1);\n      }\n    }" { (expression_statement "cVar4 = *param_4;" (assignment_expression "cVar4 = *param_4" identifier = (pointer_expression "*param_4" * identifier)) ;) (expression_statement "param_2 = param_2 - 1;" (assignment_expression "param_2 = param_2 - 1" identifier = (binary_expression "param_2 - 1" identifier - number_literal)) ;) (if_statement "if ((cVar4 != '\0') && (param_3 < param_2)) {\n        uVar3 = param_3 + 1;\n        do {\n          *(char *)(param_1 + uVar3 + -1) = cVar4;\n          cVar4 = param_4[uVar3 - param_3];\n          uVar2 = uVar3;\n          if (cVar4 == '\0') break;\n          bVar1 = uVar3 != param_2;\n          uVar3 = uVar3 + 1;\n          uVar2 = param_2;\n        } while (bVar1);\n      }" if (parenthesized_expression "((cVar4 != '\0') && (param_3 < param_2))" ( (binary_expression "(cVar4 != '\0') && (param_3 < param_2)" (parenthesized_expression "(cVar4 != '\0')" ( (binary_expression "cVar4 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "(param_3 < param_2)" ( (binary_expression "param_3 < param_2" identifier < identifier) ))) )) (compound_statement "{\n        uVar3 = param_3 + 1;\n        do {\n          *(char *)(param_1 + uVar3 + -1) = cVar4;\n          cVar4 = param_4[uVar3 - param_3];\n          uVar2 = uVar3;\n          if (cVar4 == '\0') break;\n          bVar1 = uVar3 != param_2;\n          uVar3 = uVar3 + 1;\n          uVar2 = param_2;\n        } while (bVar1);\n      }" { (expression_statement "uVar3 = param_3 + 1;" (assignment_expression "uVar3 = param_3 + 1" identifier = (binary_expression "param_3 + 1" identifier + number_literal)) ;) (do_statement "do {\n          *(char *)(param_1 + uVar3 + -1) = cVar4;\n          cVar4 = param_4[uVar3 - param_3];\n          uVar2 = uVar3;\n          if (cVar4 == '\0') break;\n          bVar1 = uVar3 != param_2;\n          uVar3 = uVar3 + 1;\n          uVar2 = param_2;\n        } while (bVar1);" do (compound_statement "{\n          *(char *)(param_1 + uVar3 + -1) = cVar4;\n          cVar4 = param_4[uVar3 - param_3];\n          uVar2 = uVar3;\n          if (cVar4 == '\0') break;\n          bVar1 = uVar3 != param_2;\n          uVar3 = uVar3 + 1;\n          uVar2 = param_2;\n        }" { (expression_statement "*(char *)(param_1 + uVar3 + -1) = cVar4;" (assignment_expression "*(char *)(param_1 + uVar3 + -1) = cVar4" (pointer_expression "*(char *)(param_1 + uVar3 + -1)" * (cast_expression "(char *)(param_1 + uVar3 + -1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + uVar3 + -1)" ( (binary_expression "param_1 + uVar3 + -1" (binary_expression "param_1 + uVar3" identifier + identifier) + number_literal) )))) = identifier) ;) (expression_statement "cVar4 = param_4[uVar3 - param_3];" (assignment_expression "cVar4 = param_4[uVar3 - param_3]" identifier = (subscript_expression "param_4[uVar3 - param_3]" identifier [ (binary_expression "uVar3 - param_3" identifier - identifier) ])) ;) (expression_statement "uVar2 = uVar3;" (assignment_expression "uVar2 = uVar3" identifier = identifier) ;) (if_statement "if (cVar4 == '\0') break;" if (parenthesized_expression "(cVar4 == '\0')" ( (binary_expression "cVar4 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (break_statement "break;" break ;)) (expression_statement "bVar1 = uVar3 != param_2;" (assignment_expression "bVar1 = uVar3 != param_2" identifier = (binary_expression "uVar3 != param_2" identifier != identifier)) ;) (expression_statement "uVar3 = uVar3 + 1;" (assignment_expression "uVar3 = uVar3 + 1" identifier = (binary_expression "uVar3 + 1" identifier + number_literal)) ;) (expression_statement "uVar2 = param_2;" (assignment_expression "uVar2 = param_2" identifier = identifier) ;) }) while (parenthesized_expression "(bVar1)" ( identifier )) ;) })) })) (expression_statement "*(undefined1 *)(param_1 + uVar2) = 0;" (assignment_expression "*(undefined1 *)(param_1 + uVar2) = 0" (pointer_expression "*(undefined1 *)(param_1 + uVar2)" * (cast_expression "(undefined1 *)(param_1 + uVar2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + uVar2)" ( (binary_expression "param_1 + uVar2" identifier + identifier) )))) = number_literal) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) && (parenthesized_expression ( (binary_expression IDENT < IDENT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = 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 = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (char_literal ' escape_sequence ')) )) && (parenthesized_expression ( (binary_expression IDENT < IDENT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ (binary_expression IDENT - IDENT) ])) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT != IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( IDENT )) ;) })) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) = LIT) ;) })) (return_statement return ;) })))
(function_definition "void FUN_00019db4(int param_1,uint param_2,uint param_3,char *param_4)\n\n{\n  bool bVar1;\n  uint uVar2;\n  uint uVar3;\n  char cVar4;\n  \n  if ((param_1 != 0) && (param_3 < param_2)) {\n    uVar2 = param_3;\n    if (param_4 != (char *)0x0) {\n      cVar4 = *param_4;\n      param_2 = param_2 - 1;\n      if ((cVar4 != '\0') && (param_3 < param_2)) {\n        uVar3 = param_3 + 1;\n        do {\n          *(char *)(param_1 + uVar3 + -1) = cVar4;\n          cVar4 = param_4[uVar3 - param_3];\n          uVar2 = uVar3;\n          if (cVar4 == '\0') break;\n          bVar1 = uVar3 != param_2;\n          uVar3 = uVar3 + 1;\n          uVar2 = param_2;\n        } while (bVar1);\n      }\n    }\n    *(undefined1 *)(param_1 + uVar2) = 0;\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00019db4(int param_1,uint param_2,uint param_3,char *param_4)" (identifier "FUN_00019db4") (parameter_list "(int param_1,uint param_2,uint param_3,char *param_4)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) (, ",") (parameter_declaration "char *param_4" (primitive_type "char") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) () ")"))) (compound_statement "{\n  bool bVar1;\n  uint uVar2;\n  uint uVar3;\n  char cVar4;\n  \n  if ((param_1 != 0) && (param_3 < param_2)) {\n    uVar2 = param_3;\n    if (param_4 != (char *)0x0) {\n      cVar4 = *param_4;\n      param_2 = param_2 - 1;\n      if ((cVar4 != '\0') && (param_3 < param_2)) {\n        uVar3 = param_3 + 1;\n        do {\n          *(char *)(param_1 + uVar3 + -1) = cVar4;\n          cVar4 = param_4[uVar3 - param_3];\n          uVar2 = uVar3;\n          if (cVar4 == '\0') break;\n          bVar1 = uVar3 != param_2;\n          uVar3 = uVar3 + 1;\n          uVar2 = param_2;\n        } while (bVar1);\n      }\n    }\n    *(undefined1 *)(param_1 + uVar2) = 0;\n  }\n  return;\n}" ({ "{") (declaration "bool bVar1;" (primitive_type "bool") (identifier "bVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "char cVar4;" (primitive_type "char") (identifier "cVar4") (; ";")) (if_statement "if ((param_1 != 0) && (param_3 < param_2)) {\n    uVar2 = param_3;\n    if (param_4 != (char *)0x0) {\n      cVar4 = *param_4;\n      param_2 = param_2 - 1;\n      if ((cVar4 != '\0') && (param_3 < param_2)) {\n        uVar3 = param_3 + 1;\n        do {\n          *(char *)(param_1 + uVar3 + -1) = cVar4;\n          cVar4 = param_4[uVar3 - param_3];\n          uVar2 = uVar3;\n          if (cVar4 == '\0') break;\n          bVar1 = uVar3 != param_2;\n          uVar3 = uVar3 + 1;\n          uVar2 = param_2;\n        } while (bVar1);\n      }\n    }\n    *(undefined1 *)(param_1 + uVar2) = 0;\n  }" (if "if") (parenthesized_expression "((param_1 != 0) && (param_3 < param_2))" (( "(") (binary_expression "(param_1 != 0) && (param_3 < param_2)" (parenthesized_expression "(param_1 != 0)" (( "(") (binary_expression "param_1 != 0" (identifier "param_1") (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(param_3 < param_2)" (( "(") (binary_expression "param_3 < param_2" (identifier "param_3") (< "<") (identifier "param_2")) () ")"))) () ")")) (compound_statement "{\n    uVar2 = param_3;\n    if (param_4 != (char *)0x0) {\n      cVar4 = *param_4;\n      param_2 = param_2 - 1;\n      if ((cVar4 != '\0') && (param_3 < param_2)) {\n        uVar3 = param_3 + 1;\n        do {\n          *(char *)(param_1 + uVar3 + -1) = cVar4;\n          cVar4 = param_4[uVar3 - param_3];\n          uVar2 = uVar3;\n          if (cVar4 == '\0') break;\n          bVar1 = uVar3 != param_2;\n          uVar3 = uVar3 + 1;\n          uVar2 = param_2;\n        } while (bVar1);\n      }\n    }\n    *(undefined1 *)(param_1 + uVar2) = 0;\n  }" ({ "{") (expression_statement "uVar2 = param_3;" (assignment_expression "uVar2 = param_3" (identifier "uVar2") (= "=") (identifier "param_3")) (; ";")) (if_statement "if (param_4 != (char *)0x0) {\n      cVar4 = *param_4;\n      param_2 = param_2 - 1;\n      if ((cVar4 != '\0') && (param_3 < param_2)) {\n        uVar3 = param_3 + 1;\n        do {\n          *(char *)(param_1 + uVar3 + -1) = cVar4;\n          cVar4 = param_4[uVar3 - param_3];\n          uVar2 = uVar3;\n          if (cVar4 == '\0') break;\n          bVar1 = uVar3 != param_2;\n          uVar3 = uVar3 + 1;\n          uVar2 = param_2;\n        } while (bVar1);\n      }\n    }" (if "if") (parenthesized_expression "(param_4 != (char *)0x0)" (( "(") (binary_expression "param_4 != (char *)0x0" (identifier "param_4") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      cVar4 = *param_4;\n      param_2 = param_2 - 1;\n      if ((cVar4 != '\0') && (param_3 < param_2)) {\n        uVar3 = param_3 + 1;\n        do {\n          *(char *)(param_1 + uVar3 + -1) = cVar4;\n          cVar4 = param_4[uVar3 - param_3];\n          uVar2 = uVar3;\n          if (cVar4 == '\0') break;\n          bVar1 = uVar3 != param_2;\n          uVar3 = uVar3 + 1;\n          uVar2 = param_2;\n        } while (bVar1);\n      }\n    }" ({ "{") (expression_statement "cVar4 = *param_4;" (assignment_expression "cVar4 = *param_4" (identifier "cVar4") (= "=") (pointer_expression "*param_4" (* "*") (identifier "param_4"))) (; ";")) (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"))) (; ";")) (if_statement "if ((cVar4 != '\0') && (param_3 < param_2)) {\n        uVar3 = param_3 + 1;\n        do {\n          *(char *)(param_1 + uVar3 + -1) = cVar4;\n          cVar4 = param_4[uVar3 - param_3];\n          uVar2 = uVar3;\n          if (cVar4 == '\0') break;\n          bVar1 = uVar3 != param_2;\n          uVar3 = uVar3 + 1;\n          uVar2 = param_2;\n        } while (bVar1);\n      }" (if "if") (parenthesized_expression "((cVar4 != '\0') && (param_3 < param_2))" (( "(") (binary_expression "(cVar4 != '\0') && (param_3 < param_2)" (parenthesized_expression "(cVar4 != '\0')" (( "(") (binary_expression "cVar4 != '\0'" (identifier "cVar4") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (&& "&&") (parenthesized_expression "(param_3 < param_2)" (( "(") (binary_expression "param_3 < param_2" (identifier "param_3") (< "<") (identifier "param_2")) () ")"))) () ")")) (compound_statement "{\n        uVar3 = param_3 + 1;\n        do {\n          *(char *)(param_1 + uVar3 + -1) = cVar4;\n          cVar4 = param_4[uVar3 - param_3];\n          uVar2 = uVar3;\n          if (cVar4 == '\0') break;\n          bVar1 = uVar3 != param_2;\n          uVar3 = uVar3 + 1;\n          uVar2 = param_2;\n        } while (bVar1);\n      }" ({ "{") (expression_statement "uVar3 = param_3 + 1;" (assignment_expression "uVar3 = param_3 + 1" (identifier "uVar3") (= "=") (binary_expression "param_3 + 1" (identifier "param_3") (+ "+") (number_literal "1"))) (; ";")) (do_statement "do {\n          *(char *)(param_1 + uVar3 + -1) = cVar4;\n          cVar4 = param_4[uVar3 - param_3];\n          uVar2 = uVar3;\n          if (cVar4 == '\0') break;\n          bVar1 = uVar3 != param_2;\n          uVar3 = uVar3 + 1;\n          uVar2 = param_2;\n        } while (bVar1);" (do "do") (compound_statement "{\n          *(char *)(param_1 + uVar3 + -1) = cVar4;\n          cVar4 = param_4[uVar3 - param_3];\n          uVar2 = uVar3;\n          if (cVar4 == '\0') break;\n          bVar1 = uVar3 != param_2;\n          uVar3 = uVar3 + 1;\n          uVar2 = param_2;\n        }" ({ "{") (expression_statement "*(char *)(param_1 + uVar3 + -1) = cVar4;" (assignment_expression "*(char *)(param_1 + uVar3 + -1) = cVar4" (pointer_expression "*(char *)(param_1 + uVar3 + -1)" (* "*") (cast_expression "(char *)(param_1 + uVar3 + -1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + uVar3 + -1)" (( "(") (binary_expression "param_1 + uVar3 + -1" (binary_expression "param_1 + uVar3" (identifier "param_1") (+ "+") (identifier "uVar3")) (+ "+") (number_literal "-1")) () ")")))) (= "=") (identifier "cVar4")) (; ";")) (expression_statement "cVar4 = param_4[uVar3 - param_3];" (assignment_expression "cVar4 = param_4[uVar3 - param_3]" (identifier "cVar4") (= "=") (subscript_expression "param_4[uVar3 - param_3]" (identifier "param_4") ([ "[") (binary_expression "uVar3 - param_3" (identifier "uVar3") (- "-") (identifier "param_3")) (] "]"))) (; ";")) (expression_statement "uVar2 = uVar3;" (assignment_expression "uVar2 = uVar3" (identifier "uVar2") (= "=") (identifier "uVar3")) (; ";")) (if_statement "if (cVar4 == '\0') break;" (if "if") (parenthesized_expression "(cVar4 == '\0')" (( "(") (binary_expression "cVar4 == '\0'" (identifier "cVar4") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "bVar1 = uVar3 != param_2;" (assignment_expression "bVar1 = uVar3 != param_2" (identifier "bVar1") (= "=") (binary_expression "uVar3 != param_2" (identifier "uVar3") (!= "!=") (identifier "param_2"))) (; ";")) (expression_statement "uVar3 = uVar3 + 1;" (assignment_expression "uVar3 = uVar3 + 1" (identifier "uVar3") (= "=") (binary_expression "uVar3 + 1" (identifier "uVar3") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "uVar2 = param_2;" (assignment_expression "uVar2 = param_2" (identifier "uVar2") (= "=") (identifier "param_2")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(bVar1)" (( "(") (identifier "bVar1") () ")")) (; ";")) (} "}"))) (} "}"))) (expression_statement "*(undefined1 *)(param_1 + uVar2) = 0;" (assignment_expression "*(undefined1 *)(param_1 + uVar2) = 0" (pointer_expression "*(undefined1 *)(param_1 + uVar2)" (* "*") (cast_expression "(undefined1 *)(param_1 + uVar2)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + uVar2)" (( "(") (binary_expression "param_1 + uVar2" (identifier "param_1") (+ "+") (identifier "uVar2")) () ")")))) (= "=") (number_literal "0")) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

size_t function_1(type_1 var_1,size_t var_3,size_t var_2,type_2 var_4)

{
  bool bVar1;
  size_t sVar2;
  size_t var_7;
  type_3 var_6;
  char var_5;
  
  sVar2 = var_2;
  if ((var_1 != (type_1)0x0) && (var_2 < var_3)) {
    if (var_4 != (type_2)0x0) {
      var_5 = *var_4;
      var_6 = var_3 - 1;
      if ((var_5 != '\0') && (var_2 < var_6)) {
        var_7 = var_2 + 1;
        do {
          var_1[var_7 - 1] = var_5;
          var_5 = var_4[var_7 - var_2];
          sVar2 = var_7;
          if (var_5 == '\0') break;
          bVar1 = var_7 != var_6;
          var_7 = var_7 + 1;
          sVar2 = var_6;
        } while (bVar1);
      }
    }
    var_1[sVar2] = '\0';
  }
  return sVar2;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (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: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (number_literal))))) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (binary_expression left: (identifier) right: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (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 (identifier))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))) right: (number_literal))))) (return_statement))))

void MASKED(int param_1,uint param_2,uint param_3,char *param_4)

{
  bool bVar1;
  uint uVar2;
  uint uVar3;
  char cVar4;
  
  if ((param_1 != 0) && (param_3 < param_2)) {
    uVar2 = param_3;
    if (param_4 != (char *)0x0) {
      cVar4 = *param_4;
      param_2 = param_2 - 1;
      if ((cVar4 != '\0') && (param_3 < param_2)) {
        uVar3 = param_3 + 1;
        do {
          *(char *)(param_1 + uVar3 + -1) = cVar4;
          cVar4 = param_4[uVar3 - param_3];
          uVar2 = uVar3;
          if (cVar4 == '\0') break;
          bVar1 = uVar3 != param_2;
          uVar3 = uVar3 + 1;
          uVar2 = param_2;
        } while (bVar1);
      }
    }
    *(undefined1 *)(param_1 + uVar2) = 0;
  }
  return;
}

